tape.utils.column_mapper#
Submodules#
Package Contents#
Classes#
Maps columns from a given dataset into known ensemble column |
- class ColumnMapper(id_col=None, time_col=None, flux_col=None, err_col=None, band_col=None)[source]#
Maps columns from a given dataset into known ensemble column
- use_known_map(map_id, hipscat=True)[source]#
Use a known mapping scheme
- Parameters:
map_id ('str') – Identifies which mapping scheme to use
hipscat ('bool') – Indicates whether the data is in hipscat format or not, which will affect the chosen ID column (_hipscat_index will be used when hipscat is true. True by default.
- Returns:
A ColumnMapper subclass object dependent on the map_id provided,
ZTFColumnMapper in the case of “ZTF” for example
- is_ready(show_needed=False)[source]#
shows whether the ColumnMapper has all critical columns assigned
- Parameters:
show_needed ('bool', optional) – Indicates whether to also return a list of missing columns
- Return type:
bool or tuple of (bool, list) dependent on show_needed parameter
- assign(id_col=None, time_col=None, flux_col=None, err_col=None, band_col=None)[source]#
Updates a given set of columns
- Parameters:
id_col ('str', optional) – Identifies which column contains the Object IDs
time_col ('str', optional) – Identifies which column contains the time information
flux_col ('str', optional) – Identifies which column contains the flux/magnitude information
err_col ('str', optional) – Identifies which column contains the flux/mag error information
band_col ('str', optional) – Identifies which column contains the band information
nobs_col (list of 'str', optional) – Identifies which columns contain number of observations for each band, if available in the input object file
nobs_tot_col ('str', optional) – Identifies which column contains the total number of observations, if available in the input object file