exa.core.plotting.qpu_core.utils.fix_unit_prefixes

exa.core.plotting.qpu_core.utils.fix_unit_prefixes#

fix_unit_prefixes(exponent, unit, observation_type)#

Identify appropriate prefix to the unit and provides corresponding conversion factor.

Parameters:
  • exponent (float) – The exponent of value (in scientific notation).

  • unit (str) – The unit to change.

  • observation_type (str) – The name of observation/quantity (used to hardcode which quantities to scale).

Returns:

The factor to convert value with and the unit with appropriate prefix.

Return type:

tuple[float, str]