Formulary (plasmapy.formulary)
plasmapy.formulary provides theoretical formulas for calculation of
physical quantities helpful for plasma physics. 🧮
The subpackage makes heavy use of Quantity for handling conversions
between different unit systems. This is especially important for
electron-volts, commonly used in plasma physics to denote temperature,
although it is technically a unit of energy.
Most functions expect Quantity objects as inputs, however some will
use the validate_quantities
decorator to automatically cast arguments to Quantity objects with the
appropriate units. If that happens, you will be notified via a
astropy.units.UnitsWarning.
Please note that well-maintained physical constant data with units and
uncertainties can be found in astropy.constants.
Example notebooks











API
Commonly used formulas for plasma science.
Many of these formulas come from the NRL Plasma Formulary [Richardson, 2019].
Sub-Packages & Modules
Classical transport coefficients. |
|
Formulas related to particle collisions in plasmas. |
|
Formulas for plasma densities. |
|
Plasma dielectric parameters. |
|
Dimensionless plasma parameters. |
|
Distribution functions, including Maxwellian and Kappa distributions. |
|
Particle drift velocities. |
|
Fundamental frequencies for a plasma. |
|
Calculation of ionization equilibria. |
|
Functions for calculating quantities associated with laser pulses. |
|
Characteristic length scales in plasmas. |
|
Calculation of static magnetic fields from known current configurations. |
|
Mathematical formulas relevant to plasma physics. |
|
Miscellaneous plasma parameters. |
|
Quantum parameters, including electron degenerate plasmas and warm dense matter. |
|
Quantities associated with electromagnetic radiation. |
|
Calculation of quantities related to relativity. |
|
Fundamental speeds in plasmas. |
Classes
|
Circular wire (coil) class. |
|
Classical transport coefficients (e.g. Braginskii, 1965). |
|
Finite length straight wire class. |
|
General wire class described by its parametric vector equation. |
|
Infinite straight wire class. |
|
Simple magnetic dipole — two nearby opposite point charges. |
Abstract class for magnetostatic fields. |
|
Compute collision frequencies between two slowly flowing Maxwellian populations. |
|
|
A physical body that is moving at a velocity relative to the speed of light. |
|
Output type for |
Compute collision frequencies between particles. |
|
|
Output type for |
|
Abstract wire class for concrete wires to be inherited from. |

Functions
|
Calculate the Alfvén speed 🏎️💨. |
|
Compute the ratio of thermal pressure to magnetic pressure. |
|
The theoretical electronic stopping power for swift charged particles calculated from the Bethe formula. |
|
The lite-function version of |
|
Return the Bohm diffusion coefficient. |
|
Return the Buchsbaum frequency for a two-ion-species plasma. |
|
Calculate the ideal chemical potential. |
|
Magnetized cold plasma dielectric permittivity tensor elements. |
|
Magnetized cold plasma dielectric permittivity tensor elements. |
|
Collision frequency of particles in a plasma. |
|
Cross-section for a large angle Coulomb collision. |
|
Compute the Coulomb logarithm. |
|
Ratio of the Coulomb energy to the kinetic (usually thermal) energy. |
|
Calculate the plasma critical density for a radiation of a given frequency. |
|
Return the de Broglie wavelength. |
|
Calculate the exponential scale length for charge screening in an electron plasma with stationary ions. |
|
Return the number of electrons within a sphere with a radius of the Debye length. |
|
Calculate the diamagnetic fluid perpendicular drift. |
|
Calculate the electric field amplitude \(E_0\) from the intensity \(I\) of a laser. |
|
Calculate the thermal conductivity for electrons. |
|
Calculate the electron viscosity. |
|
Calculate the angular frequency \(\omega\) of a laser given the the wavelength of the beam \(\lambda\). |
|
Calculate the wavelength of a laser \(\lambda\) given the angular frequency \(\omega\). |
|
Calculate the "electric cross magnetic" particle drift. |
|
Calculate the kinetic energy in a degenerate electron gas. |
|
Calculate the complete Fermi-Dirac integral. |
|
Calculate the general force drift for a particle in a magnetic field. |
|
Average momentum relaxation rate for a slowly flowing Maxwellian distribution of electrons. |
|
Average momentum relaxation rate for a slowly flowing Maxwellian distribution of ions. |
|
Calculate the beam waist radius \(w_0\) for the intensity profile of a Gaussian beam given the Full Width at Half Maximum spot size \(FWHM\). |
|
Calculate the total power of a Gaussian beam \(P_0\) from the intensity \(I\) and the beam waist radius \(w_0\). |
|
Calculate the Rayleigh length \(z_R\) from the beam waist radius \(w_0\) and the wavelength \(\lambda\). |
|
Calculate the Full Width at Half Maximum spot size \(FWHM\) at focus given the beam waist radius of a Gaussian beam \(w_0\). |
|
Calculate the particle gyrofrequency in units of radians per second. |
|
Calculate the radius of circular motion for a charged particle in a uniform magnetic field (including relativistic effects by default). |
|
Calculate the |
|
Impact parameters for classical and quantum Coulomb collision. |
|
Distance of the closest approach for a 90° Coulomb collision. |
|
Calculate a charged particle's inertial length. |
|
Calculate the intensity \(I\) of a laser from the electric field amplitude \(E_0\). |
|
Return the ion sound speed for an electron-ion plasma. |
|
Calculate the thermal conductivity for ions. |
|
Calculate the ion viscosity. |
|
Return the average ionization state of ions in a plasma assuming that the numbers of ions in each state are equal. |
|
Return the most probable speed for a particle within a kappa distribution. |
|
Return the probability density at the velocity |
|
Return the probability density function for finding a particle with velocity components |
|
Knudsen number (dimensionless). |
Return the Lorentz factor. |
|
|
Return the lower hybrid frequency. |
|
Compute the ratio of the Alfén wave crossing timescale to the magnetic diffusion timescale. |
|
Compute the magnetic Reynolds number. |
Calculate the magnetic energy density. |
|
Calculate the magnetic pressure. |
|
|
Calculate the mass density from a number density. |
|
Probability distribution function of velocity for a Maxwellian distribution in 1D. |
|
Probability distribution function of speed for a Maxwellian distribution in 1D. |
|
Probability distribution function of speed for a Maxwellian distribution in 2D. |
|
Probability distribution function of speed for a Maxwellian distribution in 3D. |
|
Probability distribution function of velocity for a Maxwellian distribution in 2D. |
|
Probability distribution function of velocity for a Maxwellian distribution in 3D. |
|
Collisional mean free path (m). |
|
Return the electrical mobility. |
|
Calculate the normalized vector potential \(a_0\) from the intensity \(I\) and the wavelength \(\lambda\). |
|
Compute the classical dielectric permittivity for a 1D Maxwellian plasma. |
|
Calculate the particle plasma frequency. |
|
Compare Fermi energy to thermal kinetic energy to check if quantum effects are important. |
|
Calculate the sum of the mass energy and kinetic energy of a relativistic body. |
|
Calculate the resistivity. |
|
Compute the Reynolds number. |
|
Calculates the 3D rotation matrix that will rotate vector |
|
Return the ratio of populations of two ionization states. |
|
Spitzer resistivity of a plasma. |
|
Calculate the thermalization ratio for a plasma in transit. |
|
Calculate the bremsstrahlung emission spectrum for a Maxwellian plasma in the Rayleigh-Jeans limit \(ℏ ω ≪ k_B T_e\). |
Calculate the thermal de Broglie wavelength for electrons. |
|
|
Return the thermal pressure for a Maxwellian distribution. |
|
Calculate the speed of thermal motion for particles with a Maxwellian distribution. |
|
Get the thermal speed coefficient corresponding to the desired thermal speed definition. |
|
Calculate the thermoelectric conductivity. |
|
Calculate the exponential scale length for charge screening for cold and dense plasmas. |
|
Return the upper hybrid frequency. |
Calculate the Wigner-Seitz radius, which approximates the inter-particle spacing. |
Aliases
PlasmaPy provides aliases of the most common plasma
functionality for user convenience. Aliases in PlasmaPy are
denoted with a trailing underscore (e.g., alias_). For
further details, please refer to the contributor
guide’s section on aliases.
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias to |
|
Alias for |
Lite-Functions
Lite-functions are optimized versions of existing
PlasmaPy functions that are intended for applications where
computational efficiency matters most. Lite-functions accept
numbers and NumPy arrays that are implicitly assumed to be
in SI units, and do not accept Quantity objects as inputs.
For further details, please refer to the contributor
guide’s section on lite-functions.
Caution
Lite-functions do not include the safeguards that are
included in most plasmapy.formulary functions. When
using lite-functions, it is vital to double-check your
implementation!
|
The lite-function for |
|
The lite-function for |
|
The lite-function for |