aim2dat.utils.units

Deprecated units module.

Attributes

constants

energy

force

frequency

length

pressure

wavevector

Classes

Constants

Access fundamental constants.

Energy

Access energy quantity.

Force

Access force quantity.

Frequency

Access frequency quantity.

Length

Access length quantity.

Pressure

Access pressure quantity.

UnitConverter

Deprecated UnitConverter class.

Wavevector

Access wavevector quantity.

Module Contents

class aim2dat.utils.units.Constants(constants: str | dict = 'CODATA_2022')[source]

Bases: aim2dat.units.Constants

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.

get_unit(name: str) str[source]

Get unit of constant.

Parameters:

name (str) – Name of constant.

Returns:

str – Unit of the constant.

get_value(name: str) float[source]

Get value of constant.

Parameters:

name (str) – Name of the constant.

Returns:

float – Value of the constant.

get_value_unit(name: str) tuple[float, str][source]

Get value and unit of constant.

Parameters:

name (str) – Name of constant.

Returns:

tuple – Tuple containing value and unit of constant.

class aim2dat.utils.units.Energy(constants: str | dict = 'CODATA_2022', base_unit: str = None)[source]

Bases: aim2dat.units.Energy

Access energy quantity.

Overview

Properties

available_units

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.

get_unit(unit: str) float

Return the value of the unit.

Parameters:

unit (str) – Physical unit.

Returns:

float – Value of the unit.

class aim2dat.utils.units.Force(constants: str | dict = 'CODATA_2022', base_unit: str = None)[source]

Bases: aim2dat.units.Force

Access force quantity.

Overview

Properties

available_units

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.

get_unit(unit: str) float

Return the value of the unit.

Parameters:

unit (str) – Physical unit.

Returns:

float – Value of the unit.

class aim2dat.utils.units.Frequency(constants: str | dict = 'CODATA_2022', base_unit: str = None)[source]

Bases: aim2dat.units.Frequency

Access frequency quantity.

Overview

Properties

available_units

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.

get_unit(unit: str) float

Return the value of the unit.

Parameters:

unit (str) – Physical unit.

Returns:

float – Value of the unit.

class aim2dat.utils.units.Length(constants: str | dict = 'CODATA_2022', base_unit: str = None)[source]

Bases: aim2dat.units.Length

Access length quantity.

Overview

Properties

available_units

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.

get_unit(unit: str) float

Return the value of the unit.

Parameters:

unit (str) – Physical unit.

Returns:

float – Value of the unit.

class aim2dat.utils.units.Pressure(constants: str | dict = 'CODATA_2022', base_unit: str = None)[source]

Bases: aim2dat.units.Pressure

Access pressure quantity.

Overview

Properties

available_units

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.

get_unit(unit: str) float

Return the value of the unit.

Parameters:

unit (str) – Physical unit.

Returns:

float – Value of the unit.

class aim2dat.utils.units.UnitConverter[source]

Bases: aim2dat.units.UnitConverter

Deprecated UnitConverter class.

Overview

Methods

convert_units(value, unit_1, unit_2)

class Convert one unit into another.

available_units = []
plot_labels
classmethod convert_units(value: int | float, unit_1: str, unit_2: str) float[source]

Convert one unit into another.

Parameters:
  • value (float) – Input value.

  • unit_1 (str) – Physical unit of the input value.

  • unit_2 (str) – Physical unit to be converted into.

Returns:

processed_data (float) – Output value.

class aim2dat.utils.units.Wavevector(constants: str | dict = 'CODATA_2022', base_unit: str = None)[source]

Bases: aim2dat.units.Wavevector

Access wavevector quantity.

Overview

Properties

available_units

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.

get_unit(unit: str) float

Return the value of the unit.

Parameters:

unit (str) – Physical unit.

Returns:

float – Value of the unit.

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