uvex_transients.missions#
Missions, including bandpass-downsampled “fast” variants of m4opt missions.
m4opt ships each mission’s bandpasses as dense throughput tables (m4opt 3.1.0 gave the UVEX bands 11000 wavelength samples each, up from 100). Every band-integrated quantity in this package (~uvex_transients.models.core.base.SpectralModel.flux_band, the limiting-magnitude and SNR screening cuts, and m4opt’s own count rates) costs time and memory linear in that sample count, so a fine table is expensive well beyond what a smooth SED can resolve.
downsample_bandpass() replaces a table by a much shorter one whose band integrals agree
with the original to a requested accuracy, for thermal-like spectra over a stated temperature
range. downsample_mission() applies it to every bandpass of an m4opt
~m4opt.missions.Mission, and get_mission() resolves mission names, including the
registered "uvex_fast", honoring the missions.downsample section of the configuration.
Notes
Take n_spec blackbodies spaced log-uniformly in temperature from t_min to t_max.
For each, form the integrands that a band average integrates, throughput times spectrum, both
as a flux-weighted and as a photon-weighted (extra 1/nu) integral, plus the throughput
itself (the denominator of the band average). Each curve is normalized to unit peak. Starting
from only the two end points, the point whose deviation from the straight chord between its
neighboring kept points is largest (taken over all curves) is added as a knot, recursively,
until every deviation is below a threshold eps. The throughput values at the kept
frequencies are the downsampled table, and the table is interpolated linearly between them,
matching the trapezoidal quadrature used throughout the package.
eps is not the accuracy. It is a tuning parameter that is bisected so that the measured
worst-case band magnitude error over a denser set of temperatures (which includes temperatures
between the optimization ones) stays within tol_mag. The measured quantities are the
flux-weighted band average, the photon-weighted band average, and the absolute flux and photon
rates (the latter two are what m4opt’s count rates see, and are what the mass rescale below
corrects).
The kept table is finally rescaled by a single constant so its integrated transmission,
int T dnu, equals that of the original exactly. Band averages are ratios, so the rescale
cancels in them, but absolute count rates carry the mass error directly.
Accuracy is only established for smooth, thermal-like spectra between t_min and t_max.
A spectrum with sharp features, or one cooler than t_min, can exceed tol_mag.
Attributes
name -> the m4opt.missions attribute it is built from. |
Functions
|
Replace a dense bandpass table by a short one with matching thermal band integrals. |
|
Copy a mission with every detector bandpass downsampled. |
|
Resolve a mission name to a ~m4opt.missions.Mission, optionally with downsampled bandpasses. |
List the names accepted by |