SBART.utils.units#
Collection of utilities to handle units throughout the code base. Aside from the data conversion function, it also provides three RV “measurements”, which are astropy Quantities:
meter_second
kilometer_second
centimeter_second
Functions
|
Accept input data that are astropy.units and converts it to a new unit and/or to a numerical value |
- convert_data(data, new_units=None, as_value=False)#
Accept input data that are astropy.units and converts it to a new unit and/or to a numerical value
- Parameters:
data (
Union
[Iterable
[Quantity
],Quantity
]) – Input datanew_units (
Optional
[Quantity
]) – Units to which each element will be converted toas_value (
bool
) – Switch the list entries to numerical values
- Returns:
converted_list – Data in the specified format
- Return type:
list