spectrum.py 文件源码

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

项目:smhr 作者: andycasey 项目源码 文件源码
def gaussian_smooth(self, fwhm, **kwargs):

        profile_sigma = fwhm / (2 * (2*np.log(2))**0.5)

        # The requested FWHM is in Angstroms, but the dispersion between each
        # pixel is likely less than an Angstrom, so we must calculate the true
        # smoothing value

        true_profile_sigma = profile_sigma / np.median(np.diff(self.dispersion))
        smoothed_flux = ndimage.gaussian_filter1d(self.flux, true_profile_sigma, **kwargs)

        # TODO modify ivar based on smoothing?
        return self.__class__(self.dispersion, smoothed_flux, self.ivar.copy(), metadata=self.metadata.copy())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号