pynbody.analysis.ionfrac.V1IonFractionTable#
- class pynbody.analysis.ionfrac.V1IonFractionTable(filename=None)[source]#
Bases:
IonFractionTableBase
Calculates ion fractions from an archived pynbody v1 table
Methods
calculate
(simulation[, ion])Calculate the ion fraction for a given ion in the gas particles of a simulation.
- 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