Background
How much background (in counts/sec) to subtract before calibration.
Usage
Background(
mode="none",
rtg_value=0.0004,
spatial_bin=1,
spectral_bin=1,
wavelength_range=None
)Models the two IDL background modes as data instead of flags:
"none"— subtract nothing (default)."rtg"— subtract a constant dark ratertg_value(the radioisotope-thermoelectric-generator background, IDLpass.rtg)."spectral_average"— estimate the background from a featureless wavelength band (wavelength_range) by averaging counts/sec over the spectral axis, then subtract that per-(slit, readout) average from every spectral sample.
spatial_bin/spectral_bin are carried for parity with the IDL spec but are not yet used by the stand-in spectral-average estimator.
Parameter Attributes
mode: str = "none"rtg_value: float = 0.0004spatial_bin: int = 1spectral_bin: int = 1wavelength_range: tuple[float, float] | None = None
Methods
| Name | Description |
|---|---|
| offset() |
Return the amount to subtract from counts_per_sec.
|
offset()
Return the amount to subtract from counts_per_sec.
Usage
offset(counts_per_sec, wavelength)counts_per_sec is the (NX, NY, NZ) cube already divided by the integration time; wavelength is the (NX,) centre-wavelength axis. The return value is a scalar (none/rtg) or a (1, NY, NZ) array (spectral_average) — both broadcast cleanly against the cube.