VelocityDistributionFunctions
Documentation for VelocityDistributionFunctions.
VelocityDistributionFunctions.directional_energy_spectraVelocityDistributionFunctions.pitch_angle_distributionVelocityDistributionFunctions.sort_flux_by_pitch_angle!VelocityDistributionFunctions.tpitch_angle_distribution
VelocityDistributionFunctions.directional_energy_spectra — Methoddirectional_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.
VelocityDistributionFunctions.pitch_angle_distribution — Methodpitch_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 inputvdfor(nbins, energy)for 3-D inputvdfpitch_angles: Bin center angles in degrees
Notes
vdfcan be either 2-D(φ, θ)or 3-D(φ, θ, energy)binsis used for pitch angle binning. It can be anIntegerfor uniform bin count, or aVectorof bin edges.methodis used for aggregation. It can be:mean(default) or:sum.
VelocityDistributionFunctions.sort_flux_by_pitch_angle! — Methodsort_flux_by_pitch_angle(flux, pitch_angle)Sort flux by pitch angle into ascending order. Set sort_on_reverse to true to sort only if the pitch angle is in reverse order.
VelocityDistributionFunctions.tpitch_angle_distribution — Methodtpitch_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 inputvdfpitch_angles: Bin center angles in degrees
Notes
vdf: can be either 3-D(φ, θ, time)or 4-D(φ, θ, energy, time).Bshould match the time dimension ofvdfφandθcan be either 1-D(n,)or time-varying 2-D(n, time)binsis used for pitch angle binning. It can be anIntegerfor uniform bin count, or aVectorof bin edges.methodis used for aggregation. It can be:mean(default) or:sum.