trident.spectrum_generator.SpectrumGenerator.add_qso_spectrum

SpectrumGenerator.add_qso_spectrum(flux_field=None, emitting_redshift=None, observing_redshift=None, filename=None)[source]

Postprocess a spectrum to add a QSO spectrum background. Uses data from Telfer et al., ApJ, 565, 773 “The Rest-Frame Extreme Ultraviolet Spectral Properties of QSO”. HST Radio Quiet composite for < 1275 Ang, SDSS composite > 2000 Ang, mean in between 8251 0

Parameters

Flux_field

array, optional

Array of flux values to which the quasar background is applied. Default: None

Emitting_redshift

float, optional

Redshift value at which the QSO emitted its light. If specified as None, use 0. Default: None

Observing_redshift

float, optional

Redshift value at which the quasar is observed. If specified as None, use the observing_redshift value specified in make_spectrum() which defaults to 0. Default: None

Filename

string

Filename where the Milky Way foreground values used to modify the flux are stored. Default: None

Example

Make a one zone ray at redshift of .5 and generate a COS spectrum for it. Add z=0.5 quasar background to it, and save it.

>>> import trident
>>> ray = trident.make_onezone_ray(redshift=0.5)
>>> sg = trident.SpectrumGenerator('COS')
>>> sg.make_spectrum(ray)
>>> sg.add_qso_spectrum(emitting_redshift=0.5)
>>> sg.plot_spectrum('spec_qso_corrected.png')

Plot a naked QSO spectrum at z=.1

>>> import trident
>>> sg = trident.SpectrumGenerator('COS')
>>> sg.add_qso_spectrum(emitting_redshift=.1)
>>> sg.plot_spectrum('spec_qso.png')