API reference#

deep_lc#

class deep_lc.DeepLC(combined_model=None, lc_component_model=None, ps_component_model=None, parameter_model=None, conformal_calibration=False, device='auto')[source]#

Base class for light curve classification.

__init__(combined_model=None, lc_component_model=None, ps_component_model=None, parameter_model=None, conformal_calibration=False, device='auto') None[source]#

Initialize the classifier.

Parameters:
  • lc_component_model (str, optional) – path to the light curve component model, by default None

  • ps_component_model (str, optional) – path to the power spectrum component model, by default None

  • parameter_model (str, optional) – path to the parameter model, by default None

  • combined_model (str, optional) – path to the combined model, by default None

  • conformal_calibration (bool, optional) – whether to use conformal calibration, by default False

  • device (str, optional) – device of the model, by default ‘auto’

predict(light_curve, multiband_FAP=False, show_intermediate_results=False, return_intermediate_data=False, return_conformal_predictive_sets=False, return_ood_criteria=False)[source]#

Classify the light curve data.

Parameters:
  • light_curve ((N, 2) array for time and flux,) – or (N, 3) array for time, flux, and filter, or (N, 4) array for time, flux, flux_error and filter

  • show_intermediate_results (bool, optional) – whether to show intermediate results, by default False

  • return_intermediate_data (bool, optional) – whether to return intermediate data, by default False

  • return_conformal_predictive_sets (bool, optional) – whether to return conformal predictive sets, by default False

deep_lc.light_curve_preparation(time, flux, flux_err=None, bands=None, magnitude_or_flux='flux')[source]#

Prepare light curve data for modeling.

Parameters:
  • time (array-like) – Time values of the observations in the unit of day.

  • flux (array-like) – Flux or magnitude values of the observations.

  • flux_err (array-like, optional) – Error values of the flux or magnitude measurements.

  • bands (array-like, optional) – Bandpass filter IDs of the observations. Starts from 1.

  • magnitude_or_flux (str, optional) – Whether the input data is in flux or magnitude units. Default is “flux”.

Returns:

  • A numpy array with shape (N, 2) for time and flux input

  • or (N, 3) for time, flux, and bands input,

  • or (N, 4) for time, flux, flux_err, and bands input.