aim2dat.utils.units
¶
Module containing units and unit conversions. 'eV'
and 'angstrom'
are set to 1.0
and the unit of time is ansgrom/sqrt(u/eV)
per default in the Quantity
classes.
However, other units can be set as base:
>>> length = Length(base_unit="m")
>>> length.m
1.0
Module Contents¶
Classes¶
Class to access fundamental constants. |
|
Energy units. |
|
Force units. |
|
Frequency units. |
|
Length units. |
|
Pressure units. |
|
Convert units used in spectroscopy. |
|
Wavevector units. |
Attributes¶
-
class aim2dat.utils.units.Constants(constants: str | dict =
'CODATA_2022'
)[source]¶ Class to access fundamental constants.
Overview
Methods¶ get_unit
(name)Get unit of constant.
get_value
(name)Get value of constant.
get_value_unit
(name)Get value and unit of constant.
-
class aim2dat.utils.units.Energy(constants: str | dict =
'CODATA_2022'
, base_unit: str =None
)[source]¶ Bases:
_BaseQuantity
Energy units.
Overview
Properties¶ List of all available units.
Methods¶ get_unit
(unit)Return the value of the unit.
- property available_units : list[str]¶
List of all available units.
-
class aim2dat.utils.units.Force(constants: str | dict =
'CODATA_2022'
, base_unit: str =None
)[source]¶ Bases:
_BaseQuantity
Force units.
Overview
Properties¶ List of all available units.
Methods¶ get_unit
(unit)Return the value of the unit.
- property available_units : list[str]¶
List of all available units.
-
class aim2dat.utils.units.Frequency(constants: str | dict =
'CODATA_2022'
, base_unit: str =None
)[source]¶ Bases:
_BaseQuantity
Frequency units.
Overview
Properties¶ List of all available units.
Methods¶ get_unit
(unit)Return the value of the unit.
- property available_units : list[str]¶
List of all available units.
-
class aim2dat.utils.units.Length(constants: str | dict =
'CODATA_2022'
, base_unit: str =None
)[source]¶ Bases:
_BaseQuantity
Length units.
Overview
Properties¶ List of all available units.
Methods¶ get_unit
(unit)Return the value of the unit.
- property available_units : list[str]¶
List of all available units.
-
class aim2dat.utils.units.Pressure(constants: str | dict =
'CODATA_2022'
, base_unit: str =None
)[source]¶ Bases:
_BaseQuantity
Pressure units.
Overview
Properties¶ List of all available units.
Methods¶ get_unit
(unit)Return the value of the unit.
- property available_units : list[str]¶
List of all available units.
- class aim2dat.utils.units.UnitConverter[source]¶
Bases:
_BaseUnitConverter
Convert units used in spectroscopy.
Overview
Methods¶ convert_units
(value, unit_1, unit_2)class Convert one unit into another.
- available_units¶
- plot_labels¶
-
class aim2dat.utils.units.Wavevector(constants: str | dict =
'CODATA_2022'
, base_unit: str =None
)[source]¶ Bases:
_BaseQuantity
Wavevector units.
Overview
Properties¶ List of all available units.
Methods¶ get_unit
(unit)Return the value of the unit.
- property available_units : list[str]¶
List of all available units.
- aim2dat.utils.units.constants¶
- aim2dat.utils.units.energy¶
- aim2dat.utils.units.force¶
- aim2dat.utils.units.frequency¶
- aim2dat.utils.units.length¶
- aim2dat.utils.units.pressure¶
- aim2dat.utils.units.wavevector¶