TheDocumentation 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.
LandauDamp_mod module computes the Landau damping experienced by whistler-mode (or other electromagnetic) waves as they propagate along ray-traced trajectories through the inhomogeneous, anisotropic electron plasma of Earth’s inner magnetosphere. Starting from a ray file produced by an external ray-tracing code, the module integrates the imaginary part of the wave vector at each step to produce a normalised wave-power profile as a function of propagation time. It supports five electron distribution functions (Bell, Bortnik, bi-Maxwellian, Golden, and Golden2) and provides a complete pipeline — from reading the raw ray file, computing and saving the damping, appending derived quantities, and generating publication-quality plots — through the companion RayUtils_mod sub-module.
Import patterns
Typical workflow
The intended pipeline for a Landau damping study proceeds in four stages. Stage 1 — Read the raw ray file.read_input_ray parses the whitespace-delimited .ray file into a pandas DataFrame with standardised column names (positions, refractive indices, magnetic field components, wave frequency, and plasma species data for up to four species).
Stage 2 — Compute and save the damping. landau_damping iterates over every point along the ray, resolves the wave vector components relative to the local background magnetic field, evaluates the imaginary dispersion integral numerically via scipy.integrate.quad, and accumulates the spatial damping rate into a normalised wave-power array. Results are saved alongside the input file as <ray_file>_damping.csv.
Stage 3 — Append derived quantities. append_ray reads both the raw ray file and the damping CSV, computes a rich set of derived quantities (Stix parameters, cyclotron and plasma frequencies for all four species, L-shell, magnetic latitude, wave normal angle relative to B₀, resonance cone angle, Gendrin angle, and wave power — zeroed after the first step where power drops to 1%), and saves everything as <ray_file>_appended.csv.
Stage 4 — Analyse and visualise. read_appended_ray, resonance_along_raypath, enhancement_factor, and ray_plots load the appended file and produce diagnostic outputs ranging from resonant energy profiles versus pitch angle to ray-path plots colour-coded by wave power.
landau_damping writes <ray_file>_damping.csv before append_ray can be called. The _damping.csv file must exist in the same directory as the .ray file.Module contents
Distributions
Reference for all five electron distribution functions and the
landau_damping entry point: Bell (2002), Bortnik (2007), bi-Maxwellian, Golden (2010), and Golden2.Ray Utilities
Reference for
RayUtils_mod: reading, appending, and plotting ray files; resonant energy profiles; and wave-power enhancement histograms.