pynbody.analysis.ionfrac#
Ionisation fraction estimations from grids of cloudy models
This module provides a way to estimate the equilibrium ionisation fractions of various ions in a gas particle based on a grid of cloudy models. The grid is defined by redshift, temperature and density, and the ionisation fractions are interpolated from this grid. The grid can be generated by running cloudy with a given radiation table and parameters, or loaded from a pre-existing file.
Note
Cloudy can be downloaded from https://www.nublado.org/. You will need to compile it yourself if you want to
calculate new tables. The hm12 and fg20 tables provided with pynbody are calculated using cloudy version
23.01.
Warning
- There are a number of limitations to the ionisation fractions calculated using this method. The most important are:
The ionisation fractions are calculated assuming the recombination and ionisation rates are in equilibrium.
There is no correction for self-shielding or for local sources of ionising radiation (with the exception of the deprecated
v1_duffy_shieldedtable).The ionisation fractions are calculated assuming a fixed metallicity of 1/10th solar.
The UV backgrounds assumed may not be the same as used in any particular simulation.
If ionisation fractions are a crucial part of your scientific analysis, be sure to understand these limitations and consider using a more sophisticated method e.g. radiative transfer post-processing or in the live simulation.
Information about available tables is provided in the function use_custom_ion_table(). The default table is
hm12, which is calculated based on the Haardt & Madau 2012 ionising background.
Functions
|
Calculate the fractions for the specified ion in the given simulation. |
Get the currently loaded ionisation table. |
|
|
Select an ionisation table to use for subsequent calculations. |
Classes
|
Class for calculating ion fractions from a grid of cloudy models. |
Abstract base class for ionization fraction tables |
|
|
Context manager for temporarily using a custom ionisation fraction table |
|
Calculates HI ion fractions using Alan Duffy's archived pynbody v1 table with self-shielding. |
|
Calculates ion fractions from an archived pynbody v1 table |