Barak 0.3.2 documentation

barak.absorb.calctau

«  barak.absorb.calc_tau_peak   ::   Contents   ::   barak.absorb.find_tau  »

barak.absorb.calctau

barak.absorb.calctau(vel, wa0, osc, gam, logN, b, debug=False, verbose=True)[source]

Returns the optical depth (Voigt profile) for a transition.

Given an transition with rest wavelength wa0, osc strength, natural linewidth gam; b parameter (doppler and turbulent); and log10 (column density), returns the optical depth in velocity space. v is an array of velocity values in km/s. The absorption line must be centred at v=0.

Parameters :

vel : array of floats, shape (N,)

Velocities in km/s.

wa0 : float

Rest wavelength of transition in Angstroms.

osc : float

Oscillator strength of transition (dimensionless).

gam : float

Gamma parameter for the transition (dimensionless).

logN : float:

log10 of the column density in absorbers per cm^2.

b : float

b parameter (km/s).

Returns :

tau : array of floats, shape (N,)

The optical depth as a function of vel.

Notes

The step size for vel must be small enough to properly sample the profile.

To map the velocity array to some wavelength for a transitions with rest wavelength wa0 at redshift z:

>>> z = 3.0
>>> wa = wa0 * (1 + z) * (1 + v/c_kms)

«  barak.absorb.calc_tau_peak   ::   Contents   ::   barak.absorb.find_tau  »