The resonance functions inDocumentation 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.
WaveProperties_mod characterise the geometric and kinematic conditions under which energetic charged particles interact resonantly with electromagnetic waves in the magnetosphere. resonant_velocity solves the relativistic resonance condition for the parallel velocity and energy of a particle interacting with a wave at harmonic number m; res_angle finds the wave normal angle at which the refractive index surface has a conical singularity (resonance cone); and gendrin_angle identifies the wave normal angle that maximises the field-aligned component of the group velocity — a key quantity for chorus-wave duct tracing and Landau-damping studies.
resonant_velocity
Computes the relativistic cyclotron-resonance parallel velocity, perpendicular velocity, total velocity, resonant kinetic energy, and Lorentz factor for a particle interacting with an electromagnetic wave at resonance harmonic number m. The resonance condition is ω − k‖ v‖ − m ωc / γ = 0, which is solved relativistically for v‖ via the quadratic formula implemented in the source.
Reference: Sousa, A. P. (2018). Global and Seasonal Effects of Lightning-Induced Electron Precipitation. Stanford University (PhD thesis).
Parameters
Resonance harmonic number m. Use
m = 0 for Landau (transit-time) resonance,
m = 1 for the fundamental cyclotron resonance, m = −1 for the anomalous cyclotron
resonance, and |m| > 1 for higher harmonics.Wave angular frequency [rad s⁻¹].
z-component of the wave number (field-aligned component) κ‖ [m⁻¹]. Obtain from
refr_index_full, refr_index_appleton, or refr_index_warm as kappa_par.Electron cyclotron angular frequency [rad s⁻¹]. For ion resonances, pass the
appropriate ion cyclotron frequency.
Local particle pitch angle α [rad]. The pitch angle defines the ratio
v_perp / v = sin α and is used to project the total resonant velocity onto
the field-aligned and perpendicular directions.
Rest mass of the resonant particle [kg]. Use
WPIT.Environment_mod.const.me
for electrons or the appropriate ion mass constant.Returns
Parallel (field-aligned) resonant velocity v‖ [m s⁻¹].
For Landau resonance (m = 0) the sign is set to oppose the wave phase velocity direction.
Perpendicular resonant velocity v_perp = v_tot × sin α [m s⁻¹].
Total resonant velocity v = v‖ / cos α [m s⁻¹].
Resonant kinetic energy E = (γ − 1) m c² [J].
Relativistic Lorentz factor γ = 1 / sqrt(1 − v²/c²) (dimensionless). γ = 1 for a
non-relativistic particle; γ greater than 1 for a relativistic particle.
Example
For
m_res_arg = 0 (Landau resonance) the function sets direction to −sign(k‖) so
that the resonant particle moves in the same direction as the wave. For m not equal to 0
the direction is sign(k‖) × sign(m), correctly distinguishing co- and counter-streaming
resonances. Ensure kz_arg carries the correct sign (positive = northward propagation).res_angle
Computes the resonance cone angle — the wave normal angle at which the refractive index surface of a cold plasma diverges (η² → ∞). At this angle wave energy is deposited at the plasma resonance. For whistler-mode waves, the resonance cone limits the obliqueness of propagation paths.
Reference: Stix, T. H. (1992). Waves in Plasmas. Springer Science & Business Media.
Parameters
Stix P parameter (from
stix_parameters). P encodes the field-parallel dielectric
response and equals 1 − Σ ωₚₛ²/ω².Stix S parameter. S = (R + L)/2 encodes the average transverse response.
Returns
Resonance cone half-angle [rad]. Defined by
tan²(θ_res) = −P / S.
Valid only when P/S is negative (i.e., P and S have opposite signs), which is the
condition for the existence of a resonance cone in the cold-plasma model.Example
The expression
tan²(θ_res) = −P/S requires −P/S to be positive, i.e., P and S must
have opposite signs. At frequencies below the lower hybrid resonance, P is negative
and S is positive for whistler-mode waves, so the resonance cone is well-defined. If
P/S is non-negative the function will raise a ValueError from np.sqrt of a negative
number; check the sign of P and S before calling.gendrin_angle
Computes the Gendrin angle — the wave normal angle at which the group velocity vector is directed exactly along the background magnetic field B₀. At this angle the wave energy propagates purely field-aligned regardless of the wave normal direction, making it a natural duct for chorus wave generation and propagation. The Gendrin angle exists only in the frequency band wlhr less than ω less than wce/2.
Reference: Bortnik, J., Inan, U. S., and Bell, T. F. (2006). Landau damping and resultant unidirectional propagation of chorus waves. Geophysical Research Letters 33.
Parameters
Wave angular frequency [rad s⁻¹].
Lower hybrid resonance angular frequency [rad s⁻¹].
Approximately
sqrt(wce × wcH) for an electron–proton plasma.Electron cyclotron angular frequency [rad s⁻¹].
Returns
Gendrin angle [rad]. In the valid range (wlhr less than ω less than 0.5 × wce) the
formula is
arccos(2 * (ω² − ω_lhr²) / (ω × ωce)).
Outside the valid range the function returns:np.nanif ω is less than wlhr (wave below lower hybrid; no Gendrin angle exists)π/2(90°) if ω equals wlhr0if 0.5 × wce is less than ω less than wce
Example
The Gendrin angle is a key parameter in chorus-wave formation models. Below the lower
hybrid frequency, EMIC waves do not have a Gendrin angle and this function returns
np.nan. Code that iterates over a frequency array should guard against np.nan
values before plotting or using the result in further calculations.