get_hms_time

sofia_redux.scan.utilities.utils.get_hms_time(value, angle=False, default=nan)[source]

Return a time or hour angle quantity from a given value.

The provided value may be a Quantity, float, int, or string value. If a string value is provided, it will be parsed according to parse_angle().

Parameters:
valueint or float or str or units.Quantity
anglebool, optional

If True, return an hour angle unit instead of hour unit.

defaultint or float or units.Quantity, optional

The default angle to return in cases where the value cannot be parsed correctly

Returns:
timeunits.Quantity

The resolved time in hours, or as an hour angle.