uvex_transients.models.core.lightcurve_metrics#
Reduce sampled light curves to numbers: a peak, and the time to decline from it.
The functions here work on arrays, a time grid t of shape (T,) and the luminosities L of N draws on it,
shape (N, T), from whatever source: an SED evaluated over parameter draws (see
~uvex_transients.models.core.base.SpectralModel.eval_band_luminosity), a bolometric curve, or data. They know nothing
about SEDs or bands.
The helpers at the end, first_true_index and crossing_coordinate, are the shared core of finding where a curve first crosses a level and interpolating the crossing between two samples. The detection-horizon calculation uses them too, to find the redshift at which a population’s peak magnitude crosses a limit.
Functions
|
Interpolate, linearly, where a curve reaches a level between two samples. |
|
Measure the time from the peak until the luminosity first falls to a fraction of it. |
|
Find the first sample of each row at which a condition holds. |
|
Reduce each light curve to its peak. |
|
Turn the user's time-grid arguments into rest-frame times in seconds. |