redback.analysis.PhotometricClassifier

class redback.analysis.PhotometricClassifier(model_templates: list | None = None)[source]

Bases: object

Classify 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 ClassificationResult with 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 time and a flux/ luminosity attribute, or any object with time and flux_density arrays.

  • 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:

ClassificationResult with method=’photometric’.