pynbody.analysis.ionfrac.IonFractionTableBase#
- class pynbody.analysis.ionfrac.IonFractionTableBase[source]#
Bases:
ABC
Abstract base class for ionization fraction tables
Methods
calculate
(simulation[, ion])Calculate the ion fraction for a given ion in the gas particles of a simulation.
- abstract calculate(simulation, ion='ovi')[source]#
Calculate the ion fraction for a given ion in the gas particles of a simulation.
- Parameters:
simulation (pynbody.snapshot.SimSnap) – The simulation snapshot to calculate the ion fractions for. The gas particles must have ‘rho’ and ‘temp’ fields.
ion (str) – The name of the ion to calculate the fraction for. The default is ‘ovi’. Case insensitive.
- Returns:
The ion fraction for each gas particle in the simulation, according to the table.
- Return type:
array-like