pynbody.analysis.ionfrac.V1DuffyIonFractionTable

pynbody.analysis.ionfrac.V1DuffyIonFractionTable#

class pynbody.analysis.ionfrac.V1DuffyIonFractionTable(selfshield=False)[source]#

Bases: V1IonFractionTable

Calculates HI ion fractions using Alan Duffy’s archived pynbody v1 table with self-shielding.

Only HI fractions are available in this table. It is not recommended for new work.

Methods

calculate(simulation[, ion])

Calculate the ion fraction for a given ion in the gas particles of a simulation.

__init__(selfshield=False)[source]#

Initialise the table

If selfshield is True, self-shielding from Duffy et al 2012 is applied.

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