cuperiod.MultiBandLightCurve

class cuperiod.MultiBandLightCurve(bands, meta=<factory>)[source]

Bases: object

Several bands (filters) of the same star, for the multi-band methods.

Parameters:
  • bands (Mapping[str, LightCurve]) – Band name → light curve. Order is preserved (insertion order).

  • meta (Mapping, optional) – Free-form metadata (e.g. object id) carried through results.

property band_names: tuple[str, ...]

The band labels, in order.

property n_bands: int

Number of bands.

classmethod from_light_curves(bands, *, meta=None)[source]

Build from an explicit {band: LightCurve} mapping.

Parameters:
  • bands (Mapping[str, LightCurve])

  • meta (Mapping[str, Any] | None)

Return type:

MultiBandLightCurve

classmethod from_dataframe(df, *, band_column=None, columns=None, domain=None, meta=None)[source]

Build from one long-format DataFrame split on a band column.

Parameters:
Return type:

MultiBandLightCurve

finite()[source]

Return a copy with each band’s non-finite points removed.

Return type:

MultiBandLightCurve

stacked()[source]

Concatenate all bands into time-sorted (time, value, error, band) arrays.

Returns:

  • time, value (numpy.ndarray) – Concatenated, ascending in time.

  • error (numpy.ndarray or None) – Concatenated errors, or None if any band lacks errors.

  • band (numpy.ndarray) – Per-point band label (object dtype), aligned with the sorted arrays.

Return type:

tuple[NDArray[float64], NDArray[float64], NDArray[float64] | None, ndarray]