Simulation runs (simqso.sqrun)¶
Reference/API¶
-
simqso.sqrun.
buildQsoGrid
(simParams)[source]¶ Create a grid of simulated quasar “points”. This function parses the ‘GridParams’ section of simParams, and intreprets the following options:
- FluxRedshiftGrid : points are defined by (appMag,z)
- LuminosityRedshiftGrid : points are defined by (absMag,z)
- LuminosityFunction : points are defined by (appMag,z) and sampled from a luminosity function.
-
simqso.sqrun.
buildForest
(wave, z, simParams, outputDir)[source]¶ Create a set of absorbers for a given number of lines-of-sight, sampled according to the input forest model. Then calculate the transmission along each line of sight. The input redshifts correspond to individual QSOs. The number of LOSs is generally smaller so that fewer forest computations are needed; individual LOSs are built up in redshift steps as each QSO redshift is iterated.
-
simqso.sqrun.
buildQsoSpectrum
(wave, cosmo, specFeatures, obj, iterNum=1, save_components=False)[source]¶
-
simqso.sqrun.
buildGrpSpectra
(wave, cosmo, specFeatures, photoCache, saveSpectra, fluxBand, nIter, verbose, objGroup)[source]¶
-
simqso.sqrun.
buildSpectraBySightLine
(wave, qsoGrid, procMap=<class 'map'>, maxIter=1, verbose=0, saveSpectra=False)[source]¶ Assemble the spectral components of QSOs from the input parameters.
Parameters: - wave : ~numpy.ndarray
Input wavelength grid.
-
simqso.sqrun.
buildSpecWithPhot
(wave, cosmo, specFeatures, photoCache, objData, iterNum=None, saveSpectra=False)[source]¶
-
simqso.sqrun.
buildSpectraBulk
(wave, qsoGrid, procMap=<class 'map'>, maxIter=1, verbose=0, saveSpectra=False)[source]¶ Assemble the spectral components of QSOs from the input parameters.
Parameters: - wave : ~numpy.ndarray
Input wavelength grid.
-
simqso.sqrun.
qsoSimulation
(simParams, **kwargs)[source]¶ Run a complete simulation.
- Construct grid of QSOs.
- Generate Lyman forest transmission spectra from a subsample of random LOSs (optional).
- Sample QSO spectral features (continuum, emission lines, dust).
- Build simulated spectra and derive photometry (photometry is optional).
- Transfer the simulated photometry to observed photometry by calculating errors and folding them in (optional).
Parameters: - saveSpectra : bool
save the simulated spectra, not just the photometry. Beware! result may be quite large (Nqso x Npixels). [default:False]
- forestOnly : bool
Only generate the forest transmission spectra. [default:False]
- noPhotoMap : bool
skip the simulation of observed photometry [default:False]
- outputDir : str
write files to this directory [default:’./’]
- nproc : int
number of processes to use [default: 1]