def klgfbInterp(self, wvl, n, l):
'''A Python version of the CHIANTI IDL procedure karzas_xs.
Interpolates free-bound gaunt factor of Karzas and Latter, (1961, Astrophysical Journal
Supplement Series, 6, 167) as a function of wavelength (wvl).
'''
try:
klgfb = self.Klgfb
except:
self.Klgfb = ch_io.klgfbRead()
klgfb = self.Klgfb
# get log of photon energy relative to the ionization potential
sclE = np.log(self.Ip/(wvl*ch_const.ev2ang))
thisGf = klgfb['klgfb'][n-1, l]
spl = splrep(klgfb['pe'], thisGf)
gf = splev(sclE, spl)
return gf
评论列表
文章目录