lfast_etc.ETCResult

class lfast_etc.ETCResult(wavelength: ndarray, delta_lambda: ndarray, snr: ndarray, exptime: ndarray, n_star: ndarray, n_sky_pix: ndarray, dark_pix: float, read_noise: float, n_pix: float, n_exp: int, peak_e_per_pixel: ndarray, saturated: ndarray, below_min_exptime: ndarray, full_well: float = inf, source: str = '', setup: str = '', title: str = '', solved_for: str = '', pixel: PixelResult | None = None)[source]

Per-resolution-element output of an ETC calculation.

Arrays are all on wavelength [nm]. exptime is the total exposure time [s] (sum of n_exp reads). Bins with zero throughput (telluric cores in K_opt, see Telescope.kopt) are invalid: valid is False and snr/exptime are NaN there, whichever was solved for.

__init__(wavelength: ndarray, delta_lambda: ndarray, snr: ndarray, exptime: ndarray, n_star: ndarray, n_sky_pix: ndarray, dark_pix: float, read_noise: float, n_pix: float, n_exp: int, peak_e_per_pixel: ndarray, saturated: ndarray, below_min_exptime: ndarray, full_well: float = inf, source: str = '', setup: str = '', title: str = '', solved_for: str = '', pixel: PixelResult | None = None) → None

Methods

__init__(wavelength, delta_lambda, snr, ...)

at(wavelength_nm)

snr, exptime and rates at one wavelength [nm].

plot([ax, what])

Plot exptime (if solved for) or snr versus wavelength.

plot_noise_budget([ax])

Stacked fractions of the noise variance (star, sky, dark, read) per resel.

plot_rates([ax])

Plot stellar, sky and dark electron rates per pixel versus wavelength (effective rates, summed over detectors in independent mode).

plot_spectrum([ax, seed, show_noiseless])

Plot one simulated realisation of the spectrum (see simulate()).

simulate([seed])

One noisy realisation of the extracted spectrum [e- per resel]: N_* t (1 + g/SNR) with g standard normal; NaN where snr is NaN.

summary([percentiles])

Percentiles of snr and exptime over the band, plus a saturation flag (saturated_fraction is None when the instrument's full well is unknown).

to_table()

All per-bin arrays as an astropy.table.Table (for CSV/FITS export).

Attributes

full_well

pixel

setup

solved_for

source

title

valid

Bins with non-zero source throughput (False in telluric cores).

wavelength

delta_lambda

snr

exptime

n_star

n_sky_pix

dark_pix

read_noise

n_pix

n_exp

peak_e_per_pixel

saturated

below_min_exptime