sed.py 文件源码

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

项目:nmmn 作者: rsnemmen 项目源码 文件源码
def findlum(self,x):
        """
    Given the input frequency in units of log(nu/Hz), returns the list [log(nu),
    Lnu] with the frequency and luminosity closest to the specified value.

    >>> lognu,lum=s.findlum(14)

    will look for the freq. and lum. nearest nu=10^14 Hz
        """
        # Performs interpolation before the search
        if not hasattr(self, 'nlnui'): self.interp()

        # Looks for the frequency
        i=lsd.search(x,self.lognui) # index

        return [self.lognui[i], self.nlnui[i]/self.nui[i]]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号