Spectra

Resampling

nyx.spectra.resample Module

Functions

bin_edges(wvls)

Bin edges of a wavelength grid: midpoints, half-extrapolated at the ends.

bin_widths(wvls)

Width of each bin of a wavelength grid: the per-nm quadrature weight.

resample_flux(wvls_in, flux_in, wvls_out[, ...])

Resample flux from one wavelength grid to another.

Spectral models

nyx.spectra.models Module

Classes

ParametricSpectrum

Parametric spectral model: model_fn(params, conditions) -> spectra.

PassThroughSpectrum

Pass conditions through unchanged as the spectrum.

SpectralModel

Base class for spectral models: source conditions to spectra.

StoredSpectrum

Pre-computed spectrum array.

Libraries and bandpasses

nyx.spectra.library Module

Functions

load_solar_spectrum_rieke2008()

Load the Rieke (2008) solar spectrum from STScI CALSPEC.

blackbody_photon_flux(wvls, temperature_k[, mag])

Black-body photon flux density, in photon / s / m^2 / nm.

color_grid_spectrum(spec_grid, wvls, ...[, ...])

A ParametricSpectrum from a colour-indexed grid.

create_color_grid(mag_band, color, ...[, ...])

Create a synthetic colour grid with dust reddening.

load_solar_flux(wvls[, normalize_at])

Load the HST/CALSPEC solar spectrum and resample it to wvls.

prepare_flux(wvls_in, flux, wvls_out[, ...])

Convert and resample arbitrary flux data to a target wavelength grid.

Classes

Bandpass

A filter transmission curve.

SpectralGrid

Spectra indexed by one or more parameters, wavelength on the last axis.