cuperiod.ColumnMap¶
- class cuperiod.ColumnMap(time=None, value=None, error=None, band=None)[source]¶
Bases:
objectSelects the time/value/error/band columns of a light-curve table.
Any field left
Noneis 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-Nonefield pins that column explicitly. Matching is case-insensitive.- Parameters:
time (
str, optional) – Explicit column names.timeandvalueare required (by detection or override);errorandbandare optional.value (
str, optional) – Explicit column names.timeandvalueare required (by detection or override);errorandbandare optional.error (
str, optional) – Explicit column names.timeandvalueare required (by detection or override);errorandbandare optional.band (
str, optional) – Explicit column names.timeandvalueare required (by detection or override);errorandbandare 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 (
listofstr) – The table’s column names.domain (
Domain, optional) – Explicit domain override. IfNone, the domain is inferred from the resolved value-column name, defaulting toDomain.MAGNITUDE.
- Returns:
ResolvedColumns- Raises:
ColumnResolutionError – If the time or value column cannot be resolved.
- Return type:
ResolvedColumns