cwitools.reduction.units.bunit_to_dict

cwitools.reduction.units.bunit_to_dict(bunit_str)

Convert BUNIT string to a dictionary of ‘unit:power’ key:value pairs (e.g. cm^2 -> {‘cm’:2})

Parameters:st (str) – The input BUNIT string
Returns:The output dictionary of {unit:power} e.g. cm^2 = {‘cm’:2}
Return type:dict