SBART.utils.units

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

convert_data(data[, new_units, as_value])

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 data

  • new_units (Optional[Quantity]) – Units to which each element will be converted to

  • as_value (bool) – Switch the list entries to numerical values

Returns:

converted_list – Data in the specified format

Return type:

list