Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the definition of hydrogenic and helium-like ions #252

Merged
merged 3 commits into from
Jan 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions fiasco/ions.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ def hydrogenic(self):

Notes
-----
This is `True` if :math:`Z - z = 1` and :math:`Z\ge6`.
This is `True` if :math:`Z - z = 1`.
"""
return (self.atomic_number - self.charge_state == 1) and (self.atomic_number >= 6)
return (self.atomic_number - self.charge_state == 1)

@property
def helium_like(self):
Expand All @@ -237,9 +237,9 @@ def helium_like(self):

Notes
-----
This is `True` if :math:`Z - z = 2` and :math:`Z\ge10`.
This is `True` if :math:`Z - z = 2`.
"""
return (self.atomic_number - self.charge_state == 2) and (self.atomic_number >= 10)
return (self.atomic_number - self.charge_state == 2)

@property
@u.quantity_input
Expand Down Expand Up @@ -906,8 +906,10 @@ def direct_ionization_cross_section(self, energy: u.erg) -> u.cm**2:
Direct ionization cross-section as a function of energy.

The direction ionization cross-section is calculated one of two ways.
For H and He like ions, the cross-section is computed according to
the method of :cite:t:`fontes_fully_1999`,
See :cite:t:`dere_ionization_2007`, Sections 3.1 and 3.2 for details.
For H-like ions with :math:`Z\ge6` and He-like ions with :math:`Z\ge10`,
the cross-section is computed according to the method of
:cite:t:`fontes_fully_1999`,

.. math::

Expand Down Expand Up @@ -940,7 +942,8 @@ def direct_ionization_cross_section(self, energy: u.erg) -> u.cm**2:
:math:`U,f,\Sigma` are all stored in the CHIANTI database such that :math:`\sigma_I`
can be computed for a given :math:`E`.
"""
if self.hydrogenic or self.helium_like:
if ((self.hydrogenic and self.atomic_number >= 6) or
(self.helium_like and self.atomic_number >= 10)):
return self._fontes_cross_section(energy)
else:
return self._dere_cross_section(energy)
Expand Down