profile.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:smhr 作者: andycasey 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号