aim2dat.units.constants

Module to containing fundamental constants.

Attributes

constants_data

Classes

Constants

Class to access fundamental constants.

Module Contents

class aim2dat.units.constants.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.

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.

aim2dat.units.constants.constants_data