VelocityDistributionFunctions

Documentation for VelocityDistributionFunctions.

VelocityDistributionFunctions.directional_energy_spectraMethod
directional_energy_spectra(spec_data, time_var, pitch_angles, loss_cone; para_tol=22.25, anti_tol=22.25)

Process 3D spectral data (pitchangle × energy × time) to extract directional flux spectra. This implements the same logic as pyspedas epdl2_Espectra function.

source
VelocityDistributionFunctions.pitch_angle_distributionMethod
pitch_angle_distribution(vdf, B, φ, θ; bins=nothing, method=:mean) -> (; data, pitch_angles)

Compute pitch-angle distributions from particle vdf and magnetic field B measurements, given azimuthal φ and polar θ angles.

Returns a named tuple with fields:

  • data: Pitch-angle distribution array (nbins,) for 2-D input vdf or (nbins, energy) for 3-D input vdf
  • pitch_angles: Bin center angles in degrees

Notes

  • vdf can be either 2-D (φ, θ) or 3-D (φ, θ, energy)
  • bins is used for pitch angle binning. It can be an Integer for uniform bin count, or a Vector of bin edges.
  • method is used for aggregation. It can be :mean (default) or :sum.
source
VelocityDistributionFunctions.tpitch_angle_distributionMethod
tpitch_angle_distribution(vdf, B, φ, θ; bins=nothing, method=:mean)

Compute pitch-angle distributions ***time series*** from particle vdf and magnetic field B measurements, given azimuthal φ and polar θ angles.

Returns a named tuple with fields:

  • data: Pitch-angle distribution array, (nbins, time) for 3-D or (nbins, energy, time) for 4-D input vdf
  • pitch_angles: Bin center angles in degrees

Notes

  • vdf: can be either 3-D (φ, θ, time) or 4-D (φ, θ, energy, time). B should match the time dimension of vdf
  • φ and θ can be either 1-D (n,) or time-varying 2-D (n, time)
  • bins is used for pitch angle binning. It can be an Integer for uniform bin count, or a Vector of bin edges.
  • method is used for aggregation. It can be :mean (default) or :sum.
source