get_quantity_str

function of dascore.units source

get_quantity_str(
    quant_value: str | pint.registry.Quantity | None[str, Quantity, None] ,
)-> ‘str | None’

Ensure a unit/quantity is valid and return its string representation.

If it is not valid raise a UnitError.

Parameters

Parameter Description
quant_value A input specifying a quantity.