redback.analysis.PhotometricClassifier
- class redback.analysis.PhotometricClassifier(model_templates: list | None = None)[source]
Bases:
objectClassify transients from light curve shape using redback photometric models.
Compares an observed normalised light curve against a set of representative model light curves using dynamic time warping (DTW), which is robust to 10–20 day timing offsets between objects of the same type.
Returns a
ClassificationResultwith method=’photometric’.- __init__(model_templates: list | None = None) None[source]
- Parameters:
model_templates – List of (model_name, parameters_dict, label) tuples. If None, uses built-in defaults.
- __call__(**kwargs)
Call self as a function.
Methods
__init__([model_templates])classify_from_lightcurve(transient[, ...])Classify a transient from its bolometric or single-band light curve shape.
- classify_from_lightcurve(transient, time_grid: ndarray | None = None, top_n: int = 5) ClassificationResult[source]
Classify a transient from its bolometric or single-band light curve shape.
- Parameters:
transient – A redback transient object with
timeand a flux/ luminosity attribute, or any object withtimeandflux_densityarrays.time_grid – Time grid (days) on which to evaluate models. If None, uses the transient’s own time array.
top_n – Number of top matches to use for probability estimation.
- Returns:
ClassificationResultwith method=’photometric’.