API reference
Top-level objects
Exposure time calculator for one instrument on the LFAST array. |
|
Per-resolution-element output of an ETC calculation. |
|
A point source with a known SED shape and a magnitude. |
|
An array of identical LFAST unit telescopes feeding one spectrograph. |
|
A spectrograph configuration. |
|
Sky radiance and transmission from a SkyCalc FITS table. |
|
Names of the bundled instrument presets. |
Plot helpers
Plot helpers: sensitivity maps, noise budgets, throughput, sky, simulated spectra.
Every function takes an optional ax and returns it, so the plots compose
with plt.subplots. The ETCResult, LFASTETC and Source classes
expose the relevant ones as methods (res.plot_noise_budget() etc.).
Importing this module applies the package matplotlib style (STYLE,
data/lfast.mplstyle): STIX serif, inward ticks, a light grid and a
six-colour palette. plt.style.use('default') afterwards restores matplotlib’s.
- lfast_etc.plotting.plot_noise_budget(res, ax=None)[source]
Stacked fractions of the noise variance (star, sky, dark, read) per resel.
Uses the exposure time stored in
res(per bin), so it answers “what limits me at this wavelength for this observation”.
- lfast_etc.plotting.plot_spectrum(res, ax=None, seed=0, show_noiseless=True)[source]
One noisy realisation of the extracted spectrum (electrons per resel).
The realisation is
N_* t (1 + g / SNR)withgstandard normal, i.e. the per-resel SNR ofresapplied to the noiseless signal.
- lfast_etc.plotting.plot_throughput(etc, ax=None)[source]
Telescope
K_opt, fiber injection, instrument (S_opt x QE) and the end-to-end product.
- lfast_etc.plotting.sky_surface_brightness_ab(etc, per='resel')[source]
Sky surface brightness per resolution element (or per detector pixel,
per="pixel", onetc.pixel_wavelength) [AB mag / arcsec^2], as the spectrograph sees it (LSF-convolved with anlsf, seeLFASTETC.sky_radiance).
- lfast_etc.plotting.plot_sky(etc, ax=None)[source]
Sky surface brightness per resel (AB mag/arcsec^2) and the fiber’s sky electron rate per pixel.
- lfast_etc.plotting.plot_source(source, wavelength_nm=None, ax=None, photon=False)[source]
The source SED (
F_lambdaor photon flux) with the normalising band shaded.
- lfast_etc.plotting.equivalent_diameter_axis(ax, diameter_m=0.726, ticks=(1, 2, 3, 5, 10, 20, 30))[source]
Top axis in single-telescope equivalent diameter for an x axis in number of telescopes.
- lfast_etc.plotting.plot_vs_n_telescopes(make_etc, source, ns, exptimes, snr, wavelength=None, ax=None, nominal=20, label_fmt='{t:g} s')[source]
Limiting magnitude versus number of telescopes for several exposure times.
make_etc(n)must return theLFASTETCforntelescopes (so the caller decides fiber, combiner and bandpass).
- lfast_etc.plotting.plot_snr_map(mags, exptimes, snr, ax=None, levels=(5, 10, 30, 100), band='V', cmap='viridis', title=None)[source]
Colour map of SNR over (exposure time, magnitude) with labelled SNR contours.
snrhas shape(len(mags), len(exptimes))as returned bysnr_grid().
- lfast_etc.plotting.plot_limiting_magnitude(etc, source, exptimes, snr, ax=None, label_fmt='{t:g} s')[source]
Limiting magnitude versus wavelength for several exposure times.
- lfast_etc.plotting.plot_profile(instrument, ax=None)[source]
Pixelated fiber image of one resel on the detector (#19) with the peak fraction.
Constants and data
Physical constants (SI) and package data paths.
- lfast_etc.constants.positive(name, value, allow_zero=False)[source]
Validate a scalar parameter at the public boundary; returns it as float.
lfast_etc.source.BANDS holds the box bands (centre nm, width nm, Vega zero point Jy);
lfast_etc.telescope.FIBERS the two fiber options.
Web application
Browser front-end for lfast_etc (Flask + Bokeh).
Run with lfast-etc-web [--host H] [--port P] or python -m lfast_etc.web.app.