Unit Converters Module#
- class nexus.unit_converter.Unit(type, name, symbol, value, shift=0)[source]#
Bases:
DevBaseMethods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
extract
extract_optional
get
get_optional
get_path
get_required
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
select_random
serial
set
set_optional
set_path
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
- unit_dicts = all obj charge obj distance obj energy obj force obj mass obj pressure obj therm_cond obj time obj #
- class nexus.unit_converter.UnitConverter[source]#
Bases:
DevBase- Attributes:
- unassigned
Methods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
convert
convert_scalar_to_all
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
extract
extract_optional
get
get_optional
get_path
get_required
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
select_random
serial
set
set_optional
set_path
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
- unassigned = None#
- kb = 1.3806503e-23#
- mol = 6.0221415e+23#
- m = 1.0#
- A = 1e-10#
- B = 5.2917720859e-11#
- nm = 1e-09#
- pm = 1e-12#
- fm = 1e-15#
- s = 1.0#
- ms = 0.001#
- ns = 1e-09#
- ps = 1e-12#
- fs = 1e-15#
- kg = 1.0#
- me = 9.10938291e-31#
- mp = 1.672621777e-27#
- amu = 1.660538921e-27#
- Da = 1.660538921e-27#
- J = 1.0#
- eV = 1.60217646e-19#
- Ry = 2.1798719925063257e-18#
- Ha = 4.359743985012651e-18#
- kJ_mol = 1.660538863127012e-21#
- kcal_mol = 6.947696475840761e-21#
- K = 1.3806503e-23#
- degC = 1.3806503e-23#
- degF = 7.670279444444446e-24#
- degC_shift = -273.15#
- degF_shift = -459.66999999999996#
- C = 1.0#
- e = 1.60217646e-19#
- Pa = 1.0#
- Mbar = 100000000000.0#
- GPa = 1000000000.0#
- atm = 101325.0#
- N = 1.0#
- pN = 1e-12#
- W_mK = 1.0#
- meter = name str shift int symbol str type str value float #
- angstrom = name str shift int symbol str type str value float #
- bohr = name str shift int symbol str type str value float #
- nanometer = name str shift int symbol str type str value float #
- picometer = name str shift int symbol str type str value float #
- femtometer = name str shift int symbol str type str value float #
- second = name str shift int symbol str type str value float #
- millisecond = name str shift int symbol str type str value float #
- nanosecond = name str shift int symbol str type str value float #
- picosecond = name str shift int symbol str type str value float #
- femtosecond = name str shift int symbol str type str value float #
- kilogram = name str shift int symbol str type str value float #
- electron_mass = name str shift int symbol str type str value float #
- proton_mass = name str shift int symbol str type str value float #
- atomic_mass_unit = name str shift int symbol str type str value float #
- dalton = name str shift int symbol str type str value float #
- joule = name str shift int symbol str type str value float #
- electron_volt = name str shift int symbol str type str value float #
- rydberg = name str shift int symbol str type str value float #
- hartree = name str shift int symbol str type str value float #
- kJ_mole = name str shift int symbol str type str value float #
- kcal_mole = name str shift int symbol str type str value float #
- kelvin = name str shift int symbol str type str value float #
- celsius = name str shift float symbol str type str value float #
- fahrenheit = name str shift float symbol str type str value float #
- coulomb = name str shift int symbol str type str value float #
- electron_charge = name str shift int symbol str type str value float #
- pascal = name str shift int symbol str type str value float #
- bar = name str shift int symbol str type str value float #
- megabar = name str shift int symbol str type str value float #
- gigapascal = name str shift int symbol str type str value float #
- atmosphere = name str shift int symbol str type str value float #
- newton = name str shift int symbol str type str value float #
- piconewton = name str shift int symbol str type str value float #
- W_per_mK = name str shift int symbol str type str value float #
- distance_dict = A Unit B Unit m Unit nm Unit pm Unit #
- mass_dict = Da Unit amu Unit kg Unit me Unit mp Unit #
- energy_dict = Ha Unit J Unit K Unit Ry Unit degC Unit degF Unit eV Unit kJ_mol Unit kcal_mol Unit #
- charge_dict = C Unit e Unit #
- pressure_dict = Gpa Unit Mbar Unit Pa Unit atm Unit bar Unit #
- force_dict = N Unit pN Unit #
- therm_cond_dict = W_mK Unit #
- unit_dict = A Unit B Unit C Unit Da Unit Gpa Unit Ha Unit J Unit K Unit Mbar Unit N Unit Pa Unit Ry Unit W_mK Unit amu Unit atm Unit bar Unit degC Unit degF Unit e Unit eV Unit fs Unit kJ_mol Unit kcal_mol Unit kg Unit m Unit me Unit mp Unit ms Unit nm Unit ns Unit pN Unit pm Unit ps Unit s Unit #