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]]
评论列表
文章目录