Skip to content

Commit 27dc34c

Browse files
Jeffrey ReepJeffrey Reep
Jeffrey Reep
authored and
Jeffrey Reep
committed
change name of A_sum and add note in fiasco.io about its origin
1 parent 6c58624 commit 27dc34c

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

fiasco/io/sources/continuum_sources.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -252,15 +252,21 @@ def to_hdf5(self, hf, df, **kwargs):
252252

253253

254254
class HSeqParser(GenericParser):
255-
"""
255+
r"""
256256
Parameters for calculating two-photon continuum for hydrogen-like ions
257+
258+
Notes
259+
-----
260+
* The parameter :math: `\psi_{\text{norm}}` (called :math: `A_{\text{sum}}` in CHIANTI) is a normalization factor of
261+
the integral of the spectral distribution function :math:`\psi(y)` from 0 to 1, such
262+
that :math: `\frac{1}{\psi_{\text{norm}}} \int_{0}^{1} \psi(y) dy = 2`.
257263
"""
258264
filetype = 'hseq_2photon'
259265
dtypes = [int, float, int, float, float, float]
260266
units = [None, u.dimensionless_unscaled, None, 1/u.s, u.dimensionless_unscaled, u.dimensionless_unscaled]
261-
headings = ['Z', 'y', 'Z_0', 'A', 'A_sum', 'psi']
267+
headings = ['Z', 'y', 'Z_0', 'A', 'psi_norm', 'psi']
262268
descriptions = ['atomic number', 'fraction of energy carried by one of the two photons',
263-
'nominal atomic number', 'radiative decay rate', 'summed radiative decay rate',
269+
'nominal atomic number', 'radiative decay rate', 'normalization of the integral of psi from 0 to 1',
264270
'spectral distribution function']
265271

266272
def __init__(self, filename, **kwargs):

fiasco/ions.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1490,11 +1490,11 @@ def two_photon(self, wavelength: u.angstrom, electron_density: u.cm**(-3)) -> u.
14901490
'erg cm^3 s^-1 Angstrom^-1')
14911491
if self.hydrogenic:
14921492
A_ji = self._hseq['A']
1493-
A_sum = self._hseq['A_sum']
1493+
psi_norm = self._hseq['psi_norm']
14941494
cubic_spline = CubicSpline(self._hseq['y'], self._hseq['psi'])
14951495
if self.helium_like:
14961496
A_ji = self._heseq['A']
1497-
A_sum = 1.0 * u.dimensionless_unscaled
1497+
psi_norm = 1.0 * u.dimensionless_unscaled
14981498
cubic_spline = CubicSpline(self._heseq['y'], self._heseq['psi'])
14991499

15001500
# store the rest wavelength:
@@ -1509,7 +1509,7 @@ def two_photon(self, wavelength: u.angstrom, electron_density: u.cm**(-3)) -> u.
15091509
indices = np.where(wavelength < rest_wavelength)
15101510
psi_interp[indices] = 0.0 # intensity below rest_wavelength is 0
15111511

1512-
energy_dist = (A_ji * rest_wavelength * psi_interp) / (A_sum * wavelength**3)
1512+
energy_dist = (A_ji * rest_wavelength * psi_interp) / (psi_norm * wavelength**3)
15131513

15141514
pe_ratio = proton_electron_ratio(self.temperature)
15151515
level_population = self.level_populations(electron_density)[:,:,1]

0 commit comments

Comments
 (0)