Conversion between SI and atomic

Conversion is done using SiAtomicConverter class. Currently, only SI and atomic units are supported.

Examples

from ifg_py import SiAtomicConverter

# From SI to atomic
converter = SiAtomicConverter(from_si=True)
converter.convert_energy(1)
# 2.2937123163853187e+17
converter.convert_sound_speed(1)
# 4.5710289062645205e-07

# From atomic to SI
converter = SiAtomicConverter(from_si=False)
converter.convert_energy(1)
# 4.35974465e-18
converter.convert_sound_speed(1)
# 2187691.2627472477

API Reference

class ifg_py.units_converter.SiAtomicConverter(from_si=True)
convert_energy(energy)

Converts energy

Parameters:energy – Energy in corresponding units system
Returns:Converted energy
convert_entropy(entropy)

Converts entropy

Parameters:entropy – Entropy in corresponding units system
Returns:Converted entropy
convert_heat_capacity(heat_capacity)

Converts heat_capacity

Parameters:heat_capacity – Heat_capacity in corresponding units system
Returns:Converted heat_capacity
convert_pressure(pressure)

Converts pressure

Parameters:pressure – Pressure in corresponding units system
Returns:Converted pressure
convert_sound_speed(sound_speed)

Converts sound speed

Parameters:sound_speed – Sound speed in corresponding units system
Returns:Converted sound speed
convert_temperature(temperature)

Converts temperature

Parameters:temperature – Temperature in corresponding units system
Returns:Converted temperature
convert_volume(volume)

Converts volume

Parameters:volume – Volume in corresponding units system
Returns:Converted volume