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].exptimeis the total exposure time [s] (sum ofn_expreads). Bins with zero throughput (telluric cores inK_opt, seeTelescope.kopt) are invalid:validis False andsnr/exptimeare 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,exptimeand rates at one wavelength [nm].plot([ax, what])Plot
exptime(if solved for) orsnrversus 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)withgstandard normal; NaN wheresnris NaN.summary([percentiles])Percentiles of
snrandexptimeover the band, plus a saturation flag (saturated_fractionisNonewhen the instrument's full well is unknown).to_table()All per-bin arrays as an
astropy.table.Table(for CSV/FITS export).Attributes
full_wellpixelsetupsolved_forsourcetitlevalidBins with non-zero source throughput (False in telluric cores).
wavelengthdelta_lambdasnrexptimen_starn_sky_pixdark_pixread_noisen_pixn_exppeak_e_per_pixelsaturatedbelow_min_exptime