Skip to main content
`Ctrl`+`K`

# LogUnit

class astropy.units.LogUnit(physical_unit=None, function_unit=None)

  Bases: `FunctionUnitBase`

  Logarithmic unit containing a physical one.

  Usually, logarithmic units are instantiated via specific subclasses such `MagUnit`, `DecibelUnit`, and `DexUnit`.

  Parameters:
    physical_unit `Unit` or `string`

      Unit that is encapsulated within the logarithmic function unit. If not given, dimensionless.

    function_unit `Unit` or `string`

      By default, the same as the logarithmic unit set by the subclass.

  Methods Summary

  `from_physical`(x) | Transformation from value in physical to value in logarithmic units.
  `to_physical`(x) | Transformation from value in logarithmic to value in physical units.

  Methods Documentation

  from_physical(x)

    Transformation from value in physical to value in logarithmic units. Used in equivalency.

  to_physical(x)

    Transformation from value in logarithmic to value in physical units. Used in equivalency.