indices - Spectral indices

Warning

there’s no verification that the proper computation is used for a given feature. It’s the responsibility of the user to check coherence.

Todo

take into account covariance between bandpasses.

exception inspec.indices.IndexComputationWarning[source]

Spectral index computation warning.

inspec.indices.flambda_integ(lrange, spec, p=0)[source]

Integral of weighted flambda over wavelength range.

\[s_X = \int_{\lambda_{\min}}^{\lambda_{\max}} \left(\frac{\lambda}{hc}\right)^{p} f_{\lambda} d\lambda\]
inspec.indices.flambda_ratio(feature, spec, redshift=0)[source]

flambda ratio continuum index.

Compute flambda ratio for continuum index feature on spectrum spec at redshift:

\[r = \frac{\langle f_{\lambda}\rangle_{\textrm{red}}} {\langle f_{\lambda}\rangle_{\textrm{blue}}}\]

where \(\langle f_{\lambda}\rangle_X\) is the average flux density (in erg/s/cm²/Å) in the wavelength interval X:

\[\langle f_{\lambda}\rangle_X = \frac{1}{\lambda_{\max} - \lambda_{\min}} \int_X f_{\lambda} d\lambda\]

Reference: Spinrad+ 1997

inspec.indices.flambda_normed(feature, spec, redshift=0)[source]

flambda normed ratio continuum index.

Compute flambda normed ratio for continuum index feature on spectrum spec at redshift:

\[r = \frac{2 \int_C f_{\lambda} d\lambda} {\int_B f_{\lambda} d\lambda + \int_R f_{\lambda} d\lambda}\]

where C, B and R are respectively the central, blue and red bandpasses.

Reference: Daddi+ 2005

inspec.indices.D4000_ratio(feature, spec, redshift=0)[source]

D4000-like continuum index.

Compute D4000-like continuum index feature on spectrum spec at redshift:

\[r = \frac{\langle f_{\nu}\rangle_{\textrm{red}}} {\langle f_{\nu}\rangle_{\textrm{blue}}}\]

where \(\langle f_{\nu}\rangle_X\) is defined for historical reasons (see Gorgas+ 1999) as:

\[\langle f_{\nu}\rangle_X = \frac{1}{\lambda_{\max} - \lambda_{\min}} \int_X \lambda^2 f_{\lambda} d\lambda\]

Reference: Spinrad+ 1997