pyrfu.mms.vdf_omni#
- pyrfu.mms.vdf_omni(vdf, method: str = 'mean')[source]#
Computes omni-directional distribution, without changing the units.
- Parameters:
vdf (xarray.Dataset) –
- Time series of the 3D velocity distribution with :
time : Time samples.
data : 3D velocity distribution.
energy : Energy levels.
phi : Azimuthal angles.
theta : Elevation angle.
method ({"mean", "sum"}, Optional) – Method of computation. Use “sum” for counts and “mean” for everything else. Default is “mean”.
- Returns:
out – Time series of the omnidirectional velocity distribution function: a DataArray (time, energy) with one energy table, or a Dataset with (time, energy) energies when the energy tables alternate. Both keep the units and the attributes of vdf (UNITS on the data variable of the Dataset, as for vdf).
- Return type:
- Raises:
ValueError – If method is not “mean” or “sum”.
Notes
As irfu-matlab PDist.omni, “mean” averages the distribution weighted by the solid angles over theta, then phi, and divides by the mean solid angle; without NaNs, this is the solid-angle weighted mean. A channel without data at all angles gives NaN (“mean”) or 0 (“sum”).