Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/stourgai/WPIT/llms.txt

Use this file to discover all available pages before exploring further.

The dispersion subgroup of WaveProperties_mod covers everything needed to characterise how electromagnetic waves propagate in a magnetised multi-species plasma: computing the Stix parameters S, D, P, R, L in both cold and warm limits; assembling the full cold or warm 3×3 dielectric tensor; and evaluating the squared refractive index η² and wave number κ for the four principal modes (R, L, O, X) plus free-space light. Cutoff-frequency helpers for the R and L modes are also provided.
import WPIT.WaveProperties_mod as wave

stix_parameters

Computes the five cold-plasma Stix parameters from plasma densities and the background magnetic field magnitude. Internally the function derives plasma and cyclotron frequencies for electrons, H⁺, He⁺, and O⁺ from fundamental constants before assembling R, L, P, S, and D. Reference: Stix, T. H. (1992). Waves in Plasmas. Springer Science & Business Media.
S, D, P, R, L = wave.stix_parameters(
    w_arg, Ne_arg, NH_arg, NHe_arg, NO_arg, B0mag_arg
)

Parameters

w_arg
float
required
Wave angular frequency [rad s⁻¹].
Ne_arg
float
required
Electron number density [m⁻³].
NH_arg
float
required
H⁺ number density [m⁻³]. Pass 0 if hydrogen ions are absent.
NHe_arg
float
required
He⁺ number density [m⁻³]. Pass 0 if helium ions are absent.
NO_arg
float
required
O⁺ number density [m⁻³]. Pass 0 if oxygen ions are absent.
B0mag_arg
float
required
Background magnetic field magnitude [T].

Returns

Sstix
float
Stix S parameter — arithmetic mean of R and L: S = (R + L) / 2.
Dstix
float
Stix D parameter — half the difference of R and L: D = (R − L) / 2.
Pstix
float
Stix P parameter — parallel (to B₀) dielectric response.
Rstix
float
Stix R parameter — right-hand resonance factor; diverges at the electron cyclotron frequency.
Lstix
float
Stix L parameter — left-hand resonance factor; diverges at the ion cyclotron frequencies.

Example

import WPIT.WaveProperties_mod as wave
import numpy as np

w   = 2 * np.pi * 5e3          # 5 kHz wave
Ne  = 1e7                       # m^-3
NH  = 0.9e7
NHe = 0.05e7
NO  = 0.05e7
B0  = 3e-5                      # 30 µT (typical inner magnetosphere)

S, D, P, R, L = wave.stix_parameters(w, Ne, NH, NHe, NO, B0)
print(f"S={S:.4f}  D={D:.4f}  P={P:.4f}  R={R:.4f}  L={L:.4f}")

stix_parameters_warm

Applies finite-temperature (warm plasma) corrections to the cold Stix parameters using the warm dielectric tensor components computed by warm_dielectric_tensor. The correction is proportional to the dimensionless thermal parameter τ = (k_B T / m c²) × η². Reference: Maxworth, A. and Gołkowski, M. (2017). Journal of Geophysical Research: Space Physics 122, 7323–7335.
S_w, D_w, P_w, R_w, L_w = wave.stix_parameters_warm(
    S_cold, D_cold, P_cold, Te, Ti, mu_warm, Ke, KH, KHe, KO
)

Parameters

S_cold
float
required
Cold-plasma Stix S parameter (from stix_parameters).
D_cold
float
required
Cold-plasma Stix D parameter.
P_cold
float
required
Cold-plasma Stix P parameter.
Te
float
required
Electron temperature [eV].
Ti
float
required
Ion temperature [eV] (applied uniformly to H⁺, He⁺, and O⁺).
mu_warm
float
required
Warm-plasma refractive index η (dimensionless), used to form τ = (k_B T / m c²) × η².
Ke
list[complex]
required
Electron warm dielectric tensor components as a flat 9-element list [K11, K12, ..., K33] (output of warm_dielectric_tensor).
KH
list[complex]
required
H⁺ warm dielectric tensor components (same layout as Ke).
KHe
list[complex]
required
He⁺ warm dielectric tensor components.
KO
list[complex]
required
O⁺ warm dielectric tensor components.

Returns

S_warm
float
Temperature-corrected Stix S.
D_warm
float
Temperature-corrected Stix D.
P_warm
float
Temperature-corrected Stix P.
R_warm
float
Temperature-corrected Stix R = S_warm + D_warm.
L_warm
float
Temperature-corrected Stix L = S_warm − D_warm.

Example

import WPIT.WaveProperties_mod as wave
import numpy as np

# Assume cold parameters and warm tensor already computed
S_cold, D_cold, P_cold = 15.2, -0.3, -120.0
Te, Ti = 1.0, 0.5         # eV
mu_warm = 5.0             # dimensionless refractive index

# Ke, KH, KHe, KO obtained from warm_dielectric_tensor(...)
S_w, D_w, P_w, R_w, L_w = wave.stix_parameters_warm(
    S_cold, D_cold, P_cold, Te, Ti, mu_warm, Ke, KH, KHe, KO
)

cold_dielectric_tensor

Computes all nine components of the cold-plasma dielectric tensor K for a multi-species plasma. The tensor is Hermitian — K13 = K23 = K31 = K32 = 0 for a cold plasma in a uniform background field aligned with z, and K11 = K22 while K21 = −K12. Reference: Maxworth, A. S., et al. (2020). Journal of Geophysical Research: Space Physics 125(4), e2019JA027154.
K11, K12, K13, K21, K22, K23, K31, K32, K33 = wave.cold_dielectric_tensor(
    w_wave, wce_arg, wpe_arg,
    wcH_arg, wpH_arg, wcHe_arg, wpHe_arg, wcO_arg, wpO_arg
)

Parameters

w_wave
float
required
Wave angular frequency [rad s⁻¹].
wce_arg
float
required
Electron cyclotron angular frequency [rad s⁻¹]. Defined as q_e B₀ / m_e.
wpe_arg
float
required
Electron plasma angular frequency [rad s⁻¹].
wcH_arg
float
required
H⁺ cyclotron angular frequency [rad s⁻¹].
wpH_arg
float
required
H⁺ plasma angular frequency [rad s⁻¹].
wcHe_arg
float
required
He⁺ cyclotron angular frequency [rad s⁻¹].
wpHe_arg
float
required
He⁺ plasma angular frequency [rad s⁻¹].
wcO_arg
float
required
O⁺ cyclotron angular frequency [rad s⁻¹].
wpO_arg
float
required
O⁺ plasma angular frequency [rad s⁻¹].

Returns

K_11 … K_33
complex
Nine individual tensor components. For a cold plasma with B₀ aligned with ẑ the nonzero independent components are K11 (= K22), K12 (purely imaginary), and K33. All off-diagonal z-coupling terms (K13, K23, K31, K32) are identically zero.

Example

import WPIT.WaveProperties_mod as wave
import numpy as np

w      = 2 * np.pi * 5e3
wce    = 2 * np.pi * 1.4e6      # ~1.4 MHz at 30 µT
wpe    = 2 * np.pi * 1.0e5
wcH    = wce / 1836.0
wpH    = wpe / np.sqrt(1836.0)
wcHe   = wce / (4 * 1836.0)
wpHe   = 0.0
wcO    = wce / (16 * 1836.0)
wpO    = 0.0

K11, K12, K13, K21, K22, K23, K31, K32, K33 = wave.cold_dielectric_tensor(
    w, wce, wpe, wcH, wpH, wcHe, wpHe, wcO, wpO
)

warm_dielectric_tensor

Computes warm-plasma dielectric tensor corrections for each ion species and electrons. The tensor components account for finite Larmor radius effects via the wave normal angle psi_arg. The function returns four lists, each a 9-element flat array indexed as [K11, K12, K13, K21, K22, K23, K31, K32, K33]. Reference: Maxworth & Gołkowski (2017). JGR: Space Physics 122, 7323–7335.
K_e, K_H, K_He, K_O = wave.warm_dielectric_tensor(
    w_wave, wce_arg, wpe_arg,
    wcH_arg, wpH_arg, wcHe_arg, wpHe_arg, wcO_arg, wpO_arg, psi_arg
)

Parameters

w_wave
float
required
Wave angular frequency [rad s⁻¹].
wce_arg
float
required
Electron cyclotron angular frequency [rad s⁻¹].
wpe_arg
float
required
Electron plasma angular frequency [rad s⁻¹].
wcH_arg
float
required
H⁺ cyclotron angular frequency [rad s⁻¹].
wpH_arg
float
required
H⁺ plasma angular frequency [rad s⁻¹].
wcHe_arg
float
required
He⁺ cyclotron angular frequency [rad s⁻¹].
wpHe_arg
float
required
He⁺ plasma angular frequency [rad s⁻¹].
wcO_arg
float
required
O⁺ cyclotron angular frequency [rad s⁻¹].
wpO_arg
float
required
O⁺ plasma angular frequency [rad s⁻¹].
psi_arg
float
required
Wave normal angle [rad] with respect to B₀.

Returns

K_e
list[complex]
9-element list of electron warm-correction tensor components.
K_H
list[complex]
9-element list of H⁺ warm-correction tensor components.
K_He
list[complex]
9-element list of He⁺ warm-correction tensor components.
K_O
list[complex]
9-element list of O⁺ warm-correction tensor components.

Example

import WPIT.WaveProperties_mod as wave
import numpy as np

psi = np.deg2rad(30)   # 30° wave normal angle

K_e, K_H, K_He, K_O = wave.warm_dielectric_tensor(
    w, wce, wpe, wcH, wpH, wcHe, wpHe, wcO, wpO, psi
)
print("K11_electron =", K_e[0])
print("K33_electron =", K_e[8])

dispersion_R

Evaluates the R-mode (right-hand, whistler-branch) dispersion relation for a multi-species cold plasma. The R-mode is right-hand circularly polarised for parallel propagation and connects to the whistler mode at sub-electron-cyclotron frequencies. Reference: Swanson, D. G. (2012). Plasma Waves. Elsevier.
nsq, kappa = wave.dispersion_R(w, wpe, wce, wpH, wcH, wpHe, wcHe, wpO, wcO)

Parameters

w
float
required
Wave angular frequency [rad s⁻¹].
wpe
float
required
Electron plasma angular frequency [rad s⁻¹].
wce
float
required
Electron cyclotron angular frequency [rad s⁻¹].
wpH
float
required
H⁺ plasma angular frequency [rad s⁻¹].
wcH
float
required
H⁺ cyclotron angular frequency [rad s⁻¹].
wpHe
float
required
He⁺ plasma angular frequency [rad s⁻¹]. Pass 0 if absent.
wcHe
float
required
He⁺ cyclotron angular frequency [rad s⁻¹]. Pass 0 if absent.
wpO
float
required
O⁺ plasma angular frequency [rad s⁻¹]. Pass 0 if absent.
wcO
float
required
O⁺ cyclotron angular frequency [rad s⁻¹]. Pass 0 if absent.

Returns

nsq_tmp
float
Squared refractive index η² = n² for the R mode (dimensionless). Positive values indicate a propagating wave; negative values indicate evanescence.
kappa_tmp
float
Wave number κ = η ω / c [m⁻¹]. Computed as sqrt(ω² η² / c²).

Example

import WPIT.WaveProperties_mod as wave
import numpy as np

w   = 2 * np.pi * 5e3
wpe = 2 * np.pi * 1.0e5
wce = 2 * np.pi * 1.4e6
wpH = wpe / np.sqrt(1836.0)
wcH = wce / 1836.0

nsq, kappa = wave.dispersion_R(w, wpe, wce, wpH, wcH, 0, 0, 0, 0)
print(f"eta^2 = {nsq:.2f},  kappa = {kappa:.4e} m^-1")
The R-mode becomes evanescent (η² less than 0) below the R-mode cutoff frequency and above the electron cyclotron frequency. Use cutoff_R to find the lower propagation boundary.

dispersion_L

Evaluates the L-mode (left-hand circularly polarised, parallel propagation) dispersion relation for a multi-species cold plasma. The L mode resonates at the ion cyclotron frequencies and is relevant for EMIC wave modelling. Reference: Swanson, D. G. (2012). Plasma Waves. Elsevier.
nsq, kappa = wave.dispersion_L(w, wpe, wce, wpH, wcH, wpHe, wcHe, wpO, wcO)

Parameters

w
float
required
Wave angular frequency [rad s⁻¹].
wpe
float
required
Electron plasma angular frequency [rad s⁻¹].
wce
float
required
Electron cyclotron angular frequency [rad s⁻¹].
wpH
float
required
H⁺ plasma angular frequency [rad s⁻¹].
wcH
float
required
H⁺ cyclotron angular frequency [rad s⁻¹].
wpHe
float
required
He⁺ plasma angular frequency [rad s⁻¹]. Pass 0 if absent.
wcHe
float
required
He⁺ cyclotron angular frequency [rad s⁻¹]. Pass 0 if absent.
wpO
float
required
O⁺ plasma angular frequency [rad s⁻¹]. Pass 0 if absent.
wcO
float
required
O⁺ cyclotron angular frequency [rad s⁻¹]. Pass 0 if absent.

Returns

nsq_tmp
float
Squared refractive index η² for the L mode (dimensionless).
kappa_tmp
float
Wave number κ [m⁻¹].

Example

import WPIT.WaveProperties_mod as wave
import numpy as np

w_emic = 2 * np.pi * 0.5     # 0.5 Hz EMIC wave
wcH    = 2 * np.pi * 0.6     # H+ cyclotron ~0.6 Hz at 40 nT

nsq, kappa = wave.dispersion_L(w_emic, wpe, wce, wpH, wcH, wpHe, wcHe, wpO, wcO)
The L-mode resonates (η² → ∞) at each ion cyclotron frequency. The wave is evanescent below the L-mode cutoff. Use cutoff_L to locate this boundary.

dispersion_O

Evaluates the O-mode (ordinary mode, electric field polarised parallel to B₀) dispersion relation. The O-mode is independent of the magnetic field; it propagates when ω exceeds the total plasma frequency. Reference: Swanson, D. G. (2012). Plasma Waves. Elsevier.
nsq, kappa = wave.dispersion_O(w, wpe, wpH, wpHe, wpO)

Parameters

w
float
required
Wave angular frequency [rad s⁻¹].
wpe
float
required
Electron plasma angular frequency [rad s⁻¹].
wpH
float
required
H⁺ plasma angular frequency [rad s⁻¹]. Pass 0 if absent.
wpHe
float
required
He⁺ plasma angular frequency [rad s⁻¹]. Pass 0 if absent.
wpO
float
required
O⁺ plasma angular frequency [rad s⁻¹]. Pass 0 if absent.

Returns

nsq_tmp
float
Squared refractive index η² = 1 − Σ ωₚₛ² / ω² (dimensionless).
kappa_tmp
float
Wave number κ [m⁻¹].

Example

import WPIT.WaveProperties_mod as wave
import numpy as np

w   = 2 * np.pi * 2e6          # 2 MHz
wpe = 2 * np.pi * 1.5e6        # plasma freq below wave freq

nsq, kappa = wave.dispersion_O(w, wpe, 0, 0, 0)
print(f"O-mode eta^2 = {nsq:.4f}")

dispersion_X

Evaluates the X-mode (extra-ordinary mode, perpendicular propagation) dispersion relation using the lower hybrid resonance frequency wlh as input. The X-mode exists in two distinct pass bands separated by the upper hybrid resonance and the plasma frequency. Reference: Swanson, D. G. (2012). Plasma Waves. Elsevier.
nsq, kappa = wave.dispersion_X(w, wpe, wlh)

Parameters

w
float
required
Wave angular frequency [rad s⁻¹].
wpe
float
required
Electron plasma angular frequency [rad s⁻¹].
wlh
float
required
Lower hybrid resonance angular frequency [rad s⁻¹].

Returns

nsq_tmp
float
Squared refractive index η² for the X mode (dimensionless).
kappa_tmp
float
Wave number κ [m⁻¹].

Example

import WPIT.WaveProperties_mod as wave
import numpy as np

wpe = 2 * np.pi * 1.0e5
wce = 2 * np.pi * 1.4e6
wcH = wce / 1836.0
wlh = np.sqrt(wce * wcH)       # approx. lower hybrid resonance
w   = 2 * np.pi * 5e3

nsq, kappa = wave.dispersion_X(w, wpe, wlh)

dispersion_light

Returns the squared refractive index and wave number for a free-space electromagnetic (light) wave. This is equivalent to the O-mode for an electron-only plasma with η² = 1 − ωₚₑ²/ω². The function accepts wce for interface consistency but does not use it in the calculation. Reference: Swanson, D. G. (2012). Plasma Waves. Elsevier.
nsq, kappa = wave.dispersion_light(w, wpe, wce)

Parameters

w
float
required
Wave angular frequency [rad s⁻¹].
wpe
float
required
Electron plasma angular frequency [rad s⁻¹].
wce
float
required
Electron cyclotron angular frequency [rad s⁻¹]. Accepted for interface consistency but not used in the calculation.

Returns

nsq_tmp
float
Squared refractive index η² = (ω² − ωₚₑ²) / ω² (dimensionless).
kappa_tmp
float
Wave number κ = sqrt((ω² − ωₚₑ²) / c²) [m⁻¹].

Example

import WPIT.WaveProperties_mod as wave
import numpy as np

wpe = 2 * np.pi * 1.0e5
wce = 2 * np.pi * 1.4e6
w   = 2 * np.pi * 3.0e5        # 300 kHz

nsq, kappa = wave.dispersion_light(w, wpe, wce)

cutoff_L

Computes the L-mode cutoff angular frequency, below which the L mode is evanescent. The formula is omega_L = 0.5 * (−wce + sqrt(wce² + 4 * wpe²)). Reference: Swanson, D. G. (2012). Plasma Waves. Elsevier.
omega_L_cutoff = wave.cutoff_L(wce, wpe)

Parameters

wce
float
required
Electron cyclotron angular frequency [rad s⁻¹].
wpe
float
required
Electron plasma angular frequency [rad s⁻¹].

Returns

tmp
float
L-mode cutoff angular frequency [rad s⁻¹].

Example

import WPIT.WaveProperties_mod as wave
import numpy as np

wce = 2 * np.pi * 1.4e6
wpe = 2 * np.pi * 1.0e5

omega_Lc = wave.cutoff_L(wce, wpe)
print(f"L cutoff: {omega_Lc / (2*np.pi):.3e} Hz")

cutoff_R

Computes the R-mode cutoff angular frequency, below which the R mode is evanescent. The formula is omega_R = 0.5 * (wce + sqrt(wce² + 4 * wpe²)). Reference: Swanson, D. G. (2012). Plasma Waves. Elsevier.
omega_R_cutoff = wave.cutoff_R(wce, wpe)

Parameters

wce
float
required
Electron cyclotron angular frequency [rad s⁻¹].
wpe
float
required
Electron plasma angular frequency [rad s⁻¹].

Returns

tmp
float
R-mode cutoff angular frequency [rad s⁻¹].

Example

import WPIT.WaveProperties_mod as wave
import numpy as np

wce = 2 * np.pi * 1.4e6
wpe = 2 * np.pi * 1.0e5

omega_Rc = wave.cutoff_R(wce, wpe)
print(f"R cutoff: {omega_Rc / (2*np.pi):.3e} Hz")
By construction, omega_R is greater than omega_L when wpe is positive. The whistler mode propagates between the L-cutoff and wce on the R-mode branch.

Build docs developers (and LLMs) love