fastar.tools.utils#
Functions
|
Compute AB magnitudes from synthetic spectra using a filter response. |
|
Compute the strength of a spectral feature defined by a Lick-style index. |
|
Integrate spectral flux within a specified wavelength band, accounting for partial pixel coverage at band edges. |
- fastar.tools.utils.compute_ab_magnitudes(wave, spectra, fresp)[source]#
Compute AB magnitudes from synthetic spectra using a filter response.
- Parameters:
wave (array-like) – Wavelength grid (in Angstroms).
spectra (array-like) – Spectral fluxes sampled over wave.
fresp (array-like) – Filter transmission curve sampled over wave.
- Returns:
AB magnitude.
- Return type:
- fastar.tools.utils.compute_linestrengths(wave, flux, index, dat)[source]#
Compute the strength of a spectral feature defined by a Lick-style index.
- Parameters:
wave (array-like) – Wavelength grid.
flux (array-like) – Spectral flux.
index (str) – Name of the index to compute (must match dat[‘NAME’]).
dat (Table) – Table with index definitions (Blue_1, Blue_2, Red_1, Red_2, Line_1, Line_2, T).
- Returns:
Line strength in Angstroms (T=2) or magnitudes (T=1).
- Return type: