aim2dat.utils.units

Module containing units and unit conversions.

Module Contents

Classes

Energy

Energy units based on the ase library. eV is set to 1.0.

Frequency

Frequency units based on the ase library.

Length

Length units based on the ase library. Angstrom is set to 1.0.

UnitConverter

Convert units used in spectroscopy.

Wavevector

Wavevector units based on the ase library. Angstrom-1 is set to 1.0.

Attributes

energy

frequency

length

wavevector

class aim2dat.utils.units.Energy[source]

Bases: _BaseQuantity

Energy units based on the ase library. eV is set to 1.0.

Overview

Properties

available_units

List of all available units.

Methods

get_unit(unit)

Return the value of the unit.

property available_units

List of all available units.

get_unit(unit)

Return the value of the unit.

Parameters:

unit (str) – Physical unit.

Returns:

value (float) – Value of the unit.

class aim2dat.utils.units.Frequency[source]

Bases: _BaseQuantity

Frequency units based on the ase library.

Overview

Properties

available_units

List of all available units.

Methods

get_unit(unit)

Return the value of the unit.

property available_units

List of all available units.

get_unit(unit)

Return the value of the unit.

Parameters:

unit (str) – Physical unit.

Returns:

value (float) – Value of the unit.

class aim2dat.utils.units.Length[source]

Bases: _BaseQuantity

Length units based on the ase library. Angstrom is set to 1.0.

Overview

Properties

available_units

List of all available units.

Methods

get_unit(unit)

Return the value of the unit.

property available_units

List of all available units.

get_unit(unit)

Return the value of the unit.

Parameters:

unit (str) – Physical unit.

Returns:

value (float) – Value of the unit.

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
classmethod convert_units(value, unit_1, unit_2)[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[source]

Bases: _BaseQuantity

Wavevector units based on the ase library. Angstrom-1 is set to 1.0.

Overview

Properties

available_units

List of all available units.

Methods

get_unit(unit)

Return the value of the unit.

property available_units

List of all available units.

get_unit(unit)

Return the value of the unit.

Parameters:

unit (str) – Physical unit.

Returns:

value (float) – Value of the unit.

aim2dat.utils.units.energy
aim2dat.utils.units.frequency
aim2dat.utils.units.length
aim2dat.utils.units.wavevector