Gas Properties Module¶
Tools to generate basic information of gas particles required by following analysing.
- XIGrM.gas_properties.abundance_to_solar(mass_fraction, elements=['H', 'He', 'C', 'N', 'O', 'Ne', 'Mg', 'Si', 'S', 'Ca', 'Fe'])[source]¶
Convert elements mass fraction to abundance relative to AG89 which is accepted by pyatomdb. (AG89: Anders, E. and Grevesse, N. 1989, Geochimica et Cosmochimica Acta, 53, 197)
- Parameters
- mass_fraction
Mass fractions of different elements. In the shape of (n_particles, n_elements). The order of element list must be sorted as atomic number from small to large. Hydrogen must be included.
- elements
List of elements symbols included.
- Returns
- numpy.ndarrays
Abundance with respect to AG89 results. In the shape of (n_particles, n_elements).
- XIGrM.gas_properties.calcu_luminosity(gas, filename, mode='total', elements=['H', 'He', 'C', 'N', 'O', 'Ne', 'Mg', 'Si', 'S', 'Ca', 'Fe'], band=[0.5, 2.0], bins=1000)[source]¶
Calculate X-ray luminosity of gas particles.
- Parameters
- gaspynbody.snapshot.SimSnap
SubSnap of gas particles to be calculated.
- filenameemissivity file
- modestr
If set to ‘total’, both continuum and line emission will be taken into account. If set to ‘cont’, only continuum emission will be considered.
- elements, band, bins
Required by prepare_pyatomdb.load_emissivity_file(). See load_emissivity_file() docmentation for details.
- Returns
- list
List of luminosities.
- XIGrM.gas_properties.n_X(density, mass_fraction, element)[source]¶
Convert mass fractions of other elements to number densities.
- XIGrM.gas_properties.temp(sim)[source]¶
Convert internal energy to temperature, following the instructions from GIZMO documentation