yt.analysis_modules.photon_simulator.photon_models module

Classes for specific photon models

The algorithms used here are based off of the method used by the PHOX code (http://www.mpa-garching.mpg.de/~kdolag/Phox/), developed by Veronica Biffi and Klaus Dolag. References for PHOX may be found at:

Biffi, V., Dolag, K., Bohringer, H., & Lemson, G. 2012, MNRAS, 420, 3545 http://adsabs.harvard.edu/abs/2012MNRAS.420.3545B

Biffi, V., Dolag, K., Bohringer, H. 2013, MNRAS, 428, 1395 http://adsabs.harvard.edu/abs/2013MNRAS.428.1395B

class yt.analysis_modules.photon_simulator.photon_models.PhotonModel[source]

Bases: object

class yt.analysis_modules.photon_simulator.photon_models.ThermalPhotonModel(spectral_model, X_H=0.75, Zmet=0.3, photons_per_chunk=10000000, method='invert_cdf', prng=<module 'numpy.random' from '/usr/lib64/python3.4/site-packages/numpy/random/__init__.py'>)[source]

Bases: yt.analysis_modules.photon_simulator.photon_models.PhotonModel

Initialize a ThermalPhotonModel from a thermal spectrum.

Parameters:
  • spectral_model (SpectralModel) – A thermal spectral model instance, either of XSpecThermalModel or TableApecModel.
  • X_H (float, optional) – The hydrogen mass fraction.
  • Zmet (float or string, optional) – The metallicity. If a float, assumes a constant metallicity throughout. If a string, is taken to be the name of the metallicity field.
  • photons_per_chunk (integer) – The maximum number of photons that are allocated per chunk. Increase or decrease as needed.
  • method (string, optional) – The method used to generate the photon energies from the spectrum: “invert_cdf”: Invert the cumulative distribution function of the spectrum. “accept_reject”: Acceptance-rejection method using the spectrum. The first method should be sufficient for most cases.
  • prng (NumPy RandomState object or numpy.random) – A pseudo-random number generator. Typically will only be specified if you have a reason to generate the same set of random numbers, such as for a test. Default is the numpy.random module.