physics¶

Various physics-related modules.

 density(p, T[, R]) Calculates gas density by ideal gas law. e_eq_ice_mk(T) Calculate the equilibrium water vapor pressure over ice. e_eq_water_mk(T) Calculate the equilibrium water vapor pressure over water. frequency2wavelength(frequency) Convert frequency to wavelength. frequency2wavenumber(frequency) Convert frequency to wavenumber. fresnel(n1, n2, theta1) Fresnel formulas for surface reflection. planck(f, T) Calculate black body radiation for given frequency and temperature. planck_wavelength(l, T) Calculate black body radiation for given wavelength and temperature. planck_wavenumber(n, T) Calculate black body radiation for given wavenumber and temperature. radiance2planckTb(f, r) Convert spectral radiance to Planck brightness temperture. radiance2rayleighjeansTb(f, r) Convert spectral radiance to Rayleight-Jeans brightness temperture. rayleighjeans(f, T) Calculates the Rayleigh-Jeans approximation of the Planck function. rayleighjeans_wavelength(l, T) Calculates the Rayleigh-Jeans approximation of the Planck function. snell(n1, n2, theta1) Calculates the angle of the transmitted wave, according to Snell’s law. wavelength2frequency(wavelength) Convert wavelength to frequency. wavelength2wavenumber(wavelength) Convert wavelength to wavenumber. wavenumber2frequency(wavenumber) Convert wavenumber to frequency. wavenumber2wavelength(wavenumber) Convert wavenumber to wavelength.

physics.metrology¶

Functions related to metrology

All functions in this module need sympy.

 express_uncertainty(expr[, aliases, …]) For a sympy expression, calculate uncertainty.

physics.units¶

Various units-related things

This module has a soft dependency on the pint units library. Please import this module only conditionally or only if you can accept a pint dependency.

 FwmuMixin Mixing for frequency/wavelength/wavenumber neutrality SRF(f, W) Respresents a spectral response function density(p, T[, R]) Wrapper around typhon.physics.thermodynamics.density(). planck_f(f, T) Planck law expressed in frequency. radiance_units dict() -> new empty dictionary specrad_frequency_to_planck_bt(L, f) Convert spectral radiance per frequency to brightness temperature specrad_wavenumber2frequency(specrad_wavenum) Convert spectral radiance from per wavenumber to per frequency ureg The unit registry stores the definitions and relationships between units.

physics.units.constants¶

Collection of physical constants and conversion factors.

The magnitudes of the defined constants are taken from typhon.constants.

This module adds units defined with pint’s UnitRegistry..

Physical constants¶

 g Earth standard gravity h Planck constant k Boltzmann constant c Speed of light N_A Avogadro constant R Universal gas constant molar_mass_dry_air Molar mass for dry air molar_mass_water Molar mass for water vapor gas_constant_dry_air Gas constant for dry air gas_constant_water_vapor Gas constant for water vapor

Mathematical constants¶

 golden Golden ratio

SI prefixes¶

 yotta $$10^{24}$$ zetta $$10^{21}$$ exa $$10^{18}$$ peta $$10^{15}$$ tera $$10^{12}$$ giga $$10^{9}$$ mega $$10^{6}$$ kilo $$10^{3}$$ hecto $$10^{2}$$ deka $$10^{1}$$ deci $$10^{-1}$$ centi $$10^{-2}$$ milli $$10^{-3}$$ micro $$10^{-6}$$ nano $$10^{-9}$$ pico $$10^{-12}$$ femto $$10^{-15}$$ atto $$10^{-18}$$ zepto $$10^{-21}$$

Non-SI ratios¶

 ppm $$10^{-6}$$ parts per million ppb $$10^{-9}$$ parts per billion ppt $$10^{-12}$$ parts per trillion

Binary prefixes¶

 kibi, KiB $$2^{10}$$ mebi, MiB $$2^{20}$$ gibi $$2^{30}$$ tebi $$2^{40}$$ pebi $$2^{50}$$ exbi $$2^{60}$$ zebi $$2^{70}$$ yobi $$2^{80}$$
 KB $$10^3$$ MB $$10^6$$

Earth characteristics¶

 earth_mass Earth mass earth_radius Earth radius atm Standard atmosphere