ColInfo

class rubin_sim.maf.stackers.ColInfo

Bases: object

Class to hold the unit and source locations for columns.

The stacker classes which will generate stacker columns are tracked here, as well as some default units for common opsim columns.

Inspect ColInfo.unit_dict for more information.

Methods Summary

get_data_source(col_name)

Identify the appropriate source for a given column.

get_units(col_name)

Return the appropriate units for col_name.

Methods Documentation

get_data_source(col_name)

Identify the appropriate source for a given column.

For values which are calculated via a stacker, the returned value is the stacker class. For values which do not have a recorded source or are known to be coming from the database, the result is self.default_data_source (None), which will be assumed to be queryable from the database.

Parameters:
col_namestr

The name of the column.

Returns:
rubin_sim.maf.stacker or None
get_units(col_name)

Return the appropriate units for col_name.

If no units have been defined for a given column, return the default units (‘’).

Parameters:
col_namestr

The name of the column

Returns:
str