Compute phase space density
el_paso.processing.compute_phase_space_density.compute_phase_space_density
compute_phase_space_density
Computes the Phase Space Density (PSD) from differential flux.
This function calculates the Phase Space Density (PSD) for a given differential flux and energy spectrum, based on the particle species. The PSD is a fundamental quantity in space plasma physics. The units of the resulting PSD are typically \((m \cdot kg \cdot m/s)^{-3}\).
The formula used is: \(PSD = \frac{j}{p^2}\) where \(j\) is the differential flux, and \(p\) is the relativistic momentum.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flux_var
|
Variable
|
A Variable object containing the differential flux data. Expected units are inverse of (cm^2 s keV sr). |
required |
energy_var
|
Variable
|
A Variable object containing the energy spectrum data in MeV. |
required |
particle_species
|
Literal['electron', 'proton']
|
The species of the particles (e.g., "electron", "proton") for which the PSD is computed. |
required |
Returns:
| Type | Description |
|---|---|
Variable
|
ep.Variable: A new Variable object containing the computed Phase Space Density (PSD) data, with unit \((m \cdot kg \cdot m/s)^{-3}\). |
Notes
- The constant
(1e3 / 2.997e10)converts units appropriately (e.g., cm to m, keV to J, etc.) and accounts for the speed of light.
Source code in el_paso/processing/compute_phase_space_density.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |