# yt.analysis_modules.photon_simulator.spectral_models module¶

Photon emission and absoprtion models for use with the photon simulator.

class yt.analysis_modules.photon_simulator.spectral_models.SpectralModel(emin, emax, nchan)[source]

Bases: object

cleanup_spectrum()[source]
get_spectrum()[source]
prepare_spectrum()[source]
class yt.analysis_modules.photon_simulator.spectral_models.TableAbsorbModel(filename, nH)[source]

Initialize an absorption model from a table stored in an HDF5 file.

Parameters: filename (string) – The name of the table file. nH (float) – The foreground column density nH in units of 10^22 cm^{-2}.

Examples

>>> abs_model = XSpecAbsorbModel("abs_table.h5", 0.1)

cleanup_spectrum()
get_spectrum()[source]

Get the absorption spectrum.

prepare_spectrum()[source]

Prepare the absorption model for execution.

class yt.analysis_modules.photon_simulator.spectral_models.TableApecModel(apec_root, emin, emax, nchan, apec_vers='2.0.2', thermal_broad=False)[source]

Initialize a thermal gas emission model from the AtomDB APEC tables available at http://www.atomdb.org. This code borrows heavily from Python routines used to read the APEC tables developed by Adam Foster at the CfA (afoster@cfa.harvard.edu).

Parameters: apec_root (string) – The directory root where the APEC model files are stored. emin (float) – The minimum energy for the spectral model. emax (float) – The maximum energy for the spectral model. nchan (integer) – The number of channels in the spectral model. apec_vers (string, optional) – The version identifier string for the APEC files, e.g. “2.0.2” thermal_broad (boolean, optional) – Whether to apply thermal broadening to spectral lines. Only should be used if you are attemping to simulate a high-spectral resolution detector.

Examples

>>> apec_model = TableApecModel("\$SPECTRAL_DATA/spectral/", 0.05, 50.0,

cleanup_spectrum()
get_spectrum(kT)[source]

Get the thermal emission spectrum given a temperature kT in keV.

prepare_spectrum(zobs)[source]

Prepare the thermal model for execution.

class yt.analysis_modules.photon_simulator.spectral_models.XSpecAbsorbModel(model_name, nH, emin=0.01, emax=50.0, nchan=100000, settings=None)[source]

Initialize an absorption model from PyXspec.

Parameters: model_name (string) – The name of the absorption model. nH (float) – The foreground column density nH in units of 10^22 cm^{-2}. emin (float, optional) – The minimum energy for the spectral model. emax (float, optional) – The maximum energy for the spectral model. nchan (integer, optional) – The number of channels in the spectral model. settings (dictionary, optional) – A dictionary of key, value pairs (must both be strings) that can be used to set various options in XSPEC.

Examples

>>> abs_model = XSpecAbsorbModel("wabs", 0.1)

cleanup_spectrum()[source]
get_spectrum()[source]

Get the absorption spectrum.

prepare_spectrum()[source]

Prepare the absorption model for execution given a redshift zobs for the spectrum.

class yt.analysis_modules.photon_simulator.spectral_models.XSpecThermalModel(model_name, emin, emax, nchan, thermal_broad=False, settings=None)[source]

Initialize a thermal gas emission model from PyXspec.

Parameters: model_name (string) – The name of the thermal emission model. emin (float) – The minimum energy for the spectral model. emax (float) – The maximum energy for the spectral model. nchan (integer) – The number of channels in the spectral model. settings (dictionary, optional) – A dictionary of key, value pairs (must both be strings) that can be used to set various options in XSPEC.

Examples

>>> mekal_model = XSpecThermalModel("mekal", 0.05, 50.0, 1000)

cleanup_spectrum()[source]
get_spectrum(kT)[source]

Get the thermal emission spectrum given a temperature kT in keV.

prepare_spectrum(zobs)[source]

Prepare the thermal model for execution given a redshift zobs for the spectrum.