LogUnit

class astropy.units.function.logarithmic.LogUnit(physical_unit=None, function_unit=None)[source]

Bases: astropy.units.function.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(self, x) Transformation from value in physical to value in logarithmic units.
to_physical(self, x) Transformation from value in logarithmic to value in physical units.

Methods Documentation

from_physical(self, x)[source]

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

to_physical(self, x)[source]

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