yt.analysis_modules.spectral_integrator.spectral_frequency_integrator.add_xray_emissivity_field

yt.analysis_modules.spectral_integrator.spectral_frequency_integrator.add_xray_emissivity_field(ds, e_min, e_max, filename=None, with_metals=True, constant_metallicity=None)[source]

Create X-ray emissivity fields for a given energy range.

Parameters:

e_min: float :

the minimum energy in keV for the energy band.

e_min: float :

the maximum energy in keV for the energy band.

filename: string, optional :

Path to data file containing emissivity values. If None, a file called “cloudy_emissivity.h5” is used, for photoionized plasmas. A second option, for collisionally ionized plasmas, is in the file “apec_emissivity.h5”, available at http://yt-project.org/data. These files contain emissivity tables for primordial elements and for metals at solar metallicity for the energy range 0.1 to 100 keV. Default: None.

with_metals: bool, optional :

If True, use the metallicity field to add the contribution from metals. If False, only the emission from H/He is considered. Default: True.

constant_metallicity: float, optional :

If specified, assume a constant metallicity for the emission from metals. The with_metals keyword must be set to False to use this. Default: None.

This will create three fields: :

“xray_emissivity_{e_min}_{e_max}_keV” (erg s^-1 cm^-3) :

“xray_luminosity_{e_min}_{e_max}_keV” (erg s^-1) :

“xray_photon_emissivity_{e_min}_{e_max}_keV” (photons s^-1 cm^-3) :

Examples

>>> from yt.mods import *
>>> from yt.analysis_modules.spectral_integrator.api import *
>>> ds = load(dataset)
>>> add_xray_emissivity_field(ds, 0.5, 2)
>>> p = ProjectionPlot(ds, 'x', "xray_emissivity_0.5_2_keV")
>>> p.save()