def __call__(self, dispersion, *parameters):
"""
Generate data at the dispersion points, given the parameters.
:param dispersion:
An array of dispersion points to calculate the data for.
:param parameters:
Keyword arguments of the model parameters and their values.
"""
function, profile_parameters = self._profiles[self.metadata["profile"]]
N = len(profile_parameters)
y = 1.0 - function(dispersion, *parameters[:N])
# Assume rest of the parameters are continuum coefficients.
if parameters[N:]:
y *= np.polyval(parameters[N:], dispersion)
return y
评论列表
文章目录