lfast_etc.Instrument
- class lfast_etc.Instrument(name: str, wavelength_min_nm: float, wavelength_max_nm: float, resolving_power: float, pixels_per_resel: float, spectrograph_efficiency: float, qe: object = 0.8, slit_throughput: float = 1.0, dark_current: float = 0.0, read_noise: float = 0.0, full_well: float | None = inf, min_exptime: float = 0.0, free_spectral_range_frac: float | None = None, description: str = '', fiber_image_px: float | None = None, profile: str = 'tophat')[source]
A spectrograph configuration.
All parameters are held constant with wavelength;
qemay be a scalar or a callableqe(wavelength_nm)for a wavelength-dependent curve.- Parameters:
name (str)
wavelength_min_nm (float) – Bandpass covered by this configuration.
wavelength_max_nm (float) – Bandpass covered by this configuration.
resolving_power (float) –
R = lambda / delta_lambda.pixels_per_resel (float) – Pixels spanned by one resolution element along the dispersion direction (the width of the fiber image, or of the slit, in pixels).
fiber_image_px (float or None) – Spatial height of the fiber image on the detector in pixels at 1x1 binning.
None(default) assumes a circular fiber image, i.e.pixels_per_resel; slit modes that narrow the dispersion direction only should set the native fiber-image height explicitly. Howell’s extraction aperture isn_pix = pixels_per_resel * fiber_image_px(#13);1.0reproduces the reference notebook’s dispersion-only count.profile ({"tophat", "uniform", "gaussian"}) – Shape of the fiber image on the detector, used for the peak-pixel (saturation) estimate only (#19).
"tophat"(default) is the image of the fiber face with a small camera blur;"uniform"is the pre-#19 convention (peak =1 / n_pix);"gaussian"has the same FWHMs. Seeing does not enter: the fiber scrambles the input.spectrograph_efficiency (float) – Spectrograph optical throughput (
S_opt), excluding slit losses and QE.slit_throughput (float) – Extra multiplicative throughput for slit modes (1 for the bare fiber). Applied to the sky as well as the source: the slit clips the uniformly illuminated fiber face, so both lose the same fraction.
qe (float or callable) – Detector quantum efficiency.
dark_current (float) – e-/s/pixel.
read_noise (float) – e-/pixel per read.
full_well (float) – e-/pixel saturation level (used for the saturation flag only).
inforNonemeans unknown: nothing is flagged andETCResult.summary()["saturated_fraction"]isNone.min_exptime (float) – Shortest exposure [s] for which
read_noiseapplies (e.g. the Fowler-sampling minimum). Results flag reads shorter than this inETCResult.below_min_exptime.free_spectral_range_frac (float or None) –
FSR / lambdafor echelle instruments; a single setting covers onlylambda * free_spectral_range_frac. Informational.
- __init__(name: str, wavelength_min_nm: float, wavelength_max_nm: float, resolving_power: float, pixels_per_resel: float, spectrograph_efficiency: float, qe: object = 0.8, slit_throughput: float = 1.0, dark_current: float = 0.0, read_noise: float = 0.0, full_well: float | None = inf, min_exptime: float = 0.0, free_spectral_range_frac: float | None = None, description: str = '', fiber_image_px: float | None = None, profile: str = 'tophat') None
Methods
__init__(name, wavelength_min_nm, ...[, qe, ...])describe()from_preset(preset, **overrides)Load a bundled preset (see
list_instruments()), optionally overriding any field (nameincluded).pixel_image()Fiber image as per-pixel fractions of the resel's light (see
pixel_image()).plot_profile([ax])Draw the pixelated fiber image with the peak fraction and
n_pix.qe_at(wavelength_nm)replace(**changes)Copy with some fields changed (
dataclasses.replace).setting_window(center_nm)(lo, hi)[nm] covered by one setting centred oncenter_nm.Attributes
dark_currentdescriptionefficiencySpectrograph efficiency including slit losses (
S_opt * slit_throughput).fiber_image_pxfree_spectral_range_fracfull_wellmin_exptimen_pixpixels_per_resel * spatial_pxpixels per resel.peak_fractionFraction of a resel's light in its brightest pixel for this
profile.profileqeread_noiseslit_throughputspatial_pxpixels_per_resel).namewavelength_min_nmwavelength_max_nmresolving_powerpixels_per_reselspectrograph_efficiency