cuperiod.ColumnMap

class cuperiod.ColumnMap(time=None, value=None, error=None, band=None)[source]

Bases: object

Selects the time/value/error/band columns of a light-curve table.

Any field left None is auto-detected from the table’s column names using the package detection lists (TIME_NAMES, MAG_NAMES, FLUX_NAMES, ERR_NAMES, BAND_NAMES); a non-None field pins that column explicitly. Matching is case-insensitive.

Parameters:
  • time (str, optional) – Explicit column names. time and value are required (by detection or override); error and band are optional.

  • value (str, optional) – Explicit column names. time and value are required (by detection or override); error and band are optional.

  • error (str, optional) – Explicit column names. time and value are required (by detection or override); error and band are optional.

  • band (str, optional) – Explicit column names. time and value are required (by detection or override); error and band are optional.

Examples

>>> ColumnMap(time="HJD", value="Vmag", error="e_Vmag")
ColumnMap(time='HJD', value='Vmag', error='e_Vmag', band=None)
resolve(columns, *, domain=None)[source]

Resolve against a table’s actual column names.

Parameters:
  • columns (list of str) – The table’s column names.

  • domain (Domain, optional) – Explicit domain override. If None, the domain is inferred from the resolved value-column name, defaulting to Domain.MAGNITUDE.

Returns:

ResolvedColumns

Raises:

ColumnResolutionError – If the time or value column cannot be resolved.

Return type:

ResolvedColumns