IGM HI absorption models (simqso.hiforest)

Reference/API

simqso.hiforest.generate_los(model, zmin, zmax)[source]

Given a model for the distribution of absorption systems, generate a random line-of-sight populated with absorbers. returns (z,logNHI,b) for each absorption system.

simqso.hiforest.voigt(a, x)[source]

Tepper-Garcia 2006, footnote 4 (see erratum)

simqso.hiforest.sum_of_voigts(wave, tau_lam, c_voigt, a, lambda_z, b, tauMin, tauMax)[source]

Given arrays of parameters, compute the summed optical depth spectrum of absorbers using Voigt profiles. Uses the Tepper-Garcia 2006 approximation for the Voigt function.

class simqso.hiforest.Singleton(decorated)[source]

Bases: object

Instance(*args, **kwargs)[source]
simqso.hiforest.fast_sum_of_voigts(wave, tau_lam, c_voigt, a, lambda_z, b, tauMin, tauMax, tauSplit)[source]

Given arrays of parameters, compute the summed optical depth spectrum of absorbers using Voigt profiles. Uses the Tepper-Garcia 2006 approximation for the Voigt function for large optical depth systems (defined by tauSplit), and a lookup table for low optical depth systems.

simqso.hiforest.sum_of_continuum_absorption(wave, tau_lam, NHI, z1, tauMin, tauMax)[source]

Compute the summed optical depth for Lyman continuum blanketing given a series of absorbers with column densities NHI and redshifts z1 (=1+z).

simqso.hiforest.calc_tau_lambda(wave, los, **kwargs)[source]

Compute the absorption spectrum, in units of optical depth, for a series of absorbers along a line-of-sight (los).

class simqso.hiforest.IGMTransmissionGrid(wave, forestModel, numSightLines, **kwargs)[source]

Bases: object

Generate a library of forest transmission spectra, by mapping an array of emission redshifts to a set of sightlines.

Parameters:
wave : ~numpy.ndarray

Input wavelength grid (must be at fixed resolution!).

z_em : ~numpy.ndarray

Array containing emission redshifts.

nlos : int

Number of lines-of-sight to generate.

losMap : sequence

Optional mapping from z_em to LOS. Must have the same number of elements and be in the range 0..nlos-1. If not provided and nlos>0, losMap is randomly generated.

Returns:
spectra: dict
T : ~numpy.ndarray

transmission spectra with shape (N(z),N(wave))

z : ~numpy.ndarray

emission redshift for each spectrum

losMap : ~numpy.ndarray

map of z_em <-> line-of-sight

wave : ~numpy.ndarray

input wavelength grid

voigtcache : bool

use a lookup table of Voigt profiles to speed computation (def: True)

reset()[source]
next_spec(sightLine, z, **kwargs)[source]
current_spec(sightLine, z, **kwargs)[source]
all_spec(losMap, z_em, **kwargs)[source]
write(fileName, outputDir, tspec=None, losMap=None, z_em=None, **kwargs)[source]

Save transmissionspectra to a FITS file.

class simqso.hiforest.CachedIGMTransmissionGrid(fileName, outputDir='.')[source]

Bases: object

next_spec(sightLine, z, **kwargs)[source]
current_spec(sightLine, z, **kwargs)[source]
simqso.hiforest.generate_binned_forest(fileName, forestModel, nlos, zbins, waverange, R, outputDir='.', **kwargs)[source]
simqso.hiforest.generate_grid_forest(fileName, forestModel, nlos, zbins, waverange, R, photoMap, outputDir='.', nproc=1, **kwargs)[source]
class simqso.hiforest.GridForest(fileName, simBands, median=False)[source]

Bases: object

get(losNum, z)[source]
class simqso.hiforest.MeanIGMTransmissionGrid(fileName, wave, outputDir='.')[source]

Bases: object

next_spec(sightLine, z, **kwargs)[source]
current_spec(sightLine, z, **kwargs)[source]
spec(z)[source]