lfast_etc.LFASTETC

class lfast_etc.LFASTETC(instrument='bench_r1800', telescope=None, sky=None, n_telescopes=None, fiber=None, wavelength_min_nm=None, wavelength_max_nm=None, grid='resel', step_nm=1.0, apply_extinction=False, lsf='gaussian', oversample=8)[source]

Exposure time calculator for one instrument on the LFAST array.

The object is immutable after construction (throughputs and the sky rate are precomputed): build a new LFASTETC instead of changing instrument/telescope/sky attributes.

Parameters:
  • instrument (str or Instrument) – Preset name (see list_instruments()) or an Instrument.

  • telescope (Telescope, optional) – Defaults to Telescope(n_telescopes=n_telescopes, fiber=fiber).

  • sky (Sky, optional) – Defaults to the bundled SkyCalc table.

  • n_telescopes – Shortcuts for building the default telescope.

  • fiber – Shortcuts for building the default telescope.

  • wavelength_min_nm (float, optional) – Restrict the grid (e.g. one CSHELL echelle setting). Defaults to the instrument bandpass clipped to the throughput/sky data range. For an echelle with a small free spectral range (CSHELL) the per-bin results are what one setting would give at that wavelength; covering the full range takes many settings, which are not summed.

  • wavelength_max_nm (float, optional) – Restrict the grid (e.g. one CSHELL echelle setting). Defaults to the instrument bandpass clipped to the throughput/sky data range. For an echelle with a small free spectral range (CSHELL) the per-bin results are what one setting would give at that wavelength; covering the full range takes many settings, which are not summed.

  • grid ({"resel", "uniform"}) – One bin per resolution element (default), or bins sampled every step_nm. Bins are always one resel wide (delta_lambda = lambda/R), so a uniform grid oversamples (step < resel) or undersamples the band.

  • apply_extinction (bool) – Multiply the source by the SkyCalc atmospheric transmission. Off by default because K_opt already includes extinction at the reference airmass. Ignored with an lsf, which always applies the resolved transmission once (see below).

  • lsf ({"gaussian", "tophat", None}) – Line-spread function. With one, the source, the sky and the atmospheric transmission are evaluated on a fine working grid (oversample samples per detector pixel), the source and sky electron-rate densities are convolved with the LSF ("gaussian": FWHM one resel, lambda/R; "tophat": the fiber image, a top hat pixels_per_resel wide blurred by BLUR_SIGMA_PX), and integrated over each detector pixel (result.pixel) and over each resolution element (the per-resel API, which is thus the sum of its pixels). Narrow lines and airglow then have the instrument’s width instead of being averaged into one bin. K_opt carries a 1 nm-sampled atmosphere: on the fine grid it is divided by the SkyCalc transmission box-averaged over 1 nm (floored at 0.2) and multiplied by the resolved transmission, so telluric lines are resolved too (within the sky table’s own sampling). None is the reference notebook’s boxcar per resel with no pixel view; a "uniform" grid is always that.

  • oversample (int) – Fine-grid samples per detector pixel for the LSF path (default 8).

__init__(instrument='bench_r1800', telescope=None, sky=None, n_telescopes=None, fiber=None, wavelength_min_nm=None, wavelength_max_nm=None, grid='resel', step_nm=1.0, apply_extinction=False, lsf='gaussian', oversample=8)[source]

Methods

__init__([instrument, telescope, sky, ...])

describe()

exptime(source, snr[, n_exp])

Total exposure time [s] to reach snr per resel in every bin.

exptime_vs_mag(source, mags, snr[, ...])

Total exposure time [s] to reach snr versus magnitude, reduced with wavelength as in snr_grid().

limiting_magnitude(source, exptime, snr[, ...])

Magnitude (in source.band) reaching snr per resel in exptime [s].

plot_sky([ax])

Sky surface brightness per resel and the sky electron rate per pixel.

plot_throughput([ax])

Telescope, fiber, instrument and end-to-end throughput versus wavelength.

plot_throughput_cascade([ax, path])

Cumulative throughput after each stage of the Choi et al. (2026) budget plus the instrument.

rates(source)

All noise-model ingredients for source on this setup.

reads_needed(source, exptime[, margin])

Smallest n_exp keeping the brightest pixel below margin * full_well (0 < margin <= 1) in a total exposure exptime [s]; 1 if nothing saturates or the full well is unknown.

sky_radiance([per])

Mean sky radiance per resolution element or per detector pixel [ph/s/m^2/nm/arcsec^2]: the SkyCalc table convolved with the LSF (lsf runs) or bin-averaged (lsf=None, per="resel" only).

sky_rate_per_pixel()

Sky electron rate per pixel [e-/s/pix], whole array (LSF-convolved with an lsf).

snr(source, exptime[, n_exp])

SNR per resel for a total exposure exptime [s] split into n_exp reads.

snr_grid(source, mags, exptimes[, ...])

SNR per resel on a (magnitude x exposure time) grid.

star_rate(source)

Stellar electron rate per resel [e-/s], whole array.

throughput_cascade([path])

Telescope.throughput_cascade on this grid, extended with the spectrograph optics, slit and detector QE; the last cumulative entry is the end-to-end throughput.

throughputs()

Per-bin conversion factors for the whole array, QE included.

Attributes

n_pix

dispersion width x fiber-image height (#13).