LogUnit

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

Bases: FunctionUnitBase

Logarithmic unit containing a physical one

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

Parameters:
physical_unitUnit or string

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

function_unitUnit 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)[source]

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

to_physical(x)[source]

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