AbsorptionSpectrum.make_spectrum(input_object, output_file=None, line_list_file=None, output_absorbers_file=None, use_peculiar_velocity=True, store_observables=False, subgrid_resolution=10, observing_redshift=0.0, min_tau=0.001, njobs='auto')[source]

Make spectrum from ray data using the line list.



string, dataset, or data container

If a string, the path to the ray dataset. As a dataset, this is the ray dataset loaded by yt. As a data container, this is a data object created from a ray dataset, such as a cut region.


optional, string

Option to save a file containing the wavelength, flux, and optical depth fields. File formats are chosen based on the filename extension. .h5 for hdf5, .fits for fits, and everything else is ASCII. Default: None


optional, string

Option to save a text file containing all of the absorbers and corresponding wavelength and redshift information. For parallel jobs, combining the lines lists can be slow so it is recommended to set to None in such circumstances. Default: None


optional, bool

if True, include peculiar velocity for calculating doppler redshift to shift lines. Requires similar flag to be set in LightRay generation. Default: True


optional, bool

if True, stores observable properties of each cell along the line of sight for each line, such as tau, column density, and thermal b. These quantities will be saved to the AbsorptionSpectrum attribute: ‘line_observables_dict’. Default: False


optional, int

When a line is being added that is unresolved (ie its thermal width is less than the spectral bin width), the voigt profile of the line is deposited into an array of virtual wavelength bins at higher resolution. The optical depth from these virtual bins is integrated and then added to the coarser spectral wavelength bin. The subgrid_resolution value determines the ratio between the thermal width and the bin width of the virtual bins. Increasing this value yields smaller virtual bins, which increases accuracy, but is more expensive. A value of 10 yields accuracy to the 4th significant digit in tau. Default: 10


optional, float

This is the redshift at which the observer is observing the absorption spectrum. Default: 0


optional, float

This value determines size of the wavelength window used to deposit lines or continua. The wavelength window is expanded until the optical depth at the edge is below this value. If too high, this will result in features appearing cut off at the edges. Decreasing this will make features smoother but will also increase run time. An increase by a factor of ten will result in roughly a 2x slow down. Default: 1e-3.


optional, int or “auto”

the number of process groups into which the loop over absorption lines will be divided. If set to -1, each absorption line will be deposited by exactly one processor. If njobs is set to a value less than the total number of available processors (N), then the deposition of an individual line will be parallelized over (N / njobs) processors. If set to “auto”, it will first try to parallelize over the list of lines and only parallelize the line deposition if there are more processors than lines. This is the optimal strategy for parallelizing spectrum generation. Default: “auto”