pyrfu.mms.psd_rebin#
- pyrfu.mms.psd_rebin(vdf: Dataset, phi: NDArray[float32], energy0: NDArray[float32], energy1: NDArray[float32], esteptable: NDArray[uint8]) Tuple[NDArray[datetime64], NDArray[float32 | float64], NDArray[float32], NDArray[float32]][source]#
Convert burst mode distribution into 64 energy channel distribution.
Takes the burst mode distribution sampled in two energy tables and converts to a single energy table with 64 energy channels. Time resolution is halved and phi angles are averaged over adjacent times.
- Parameters:
vdf (Dataset) – Time series of the particle distribution.
phi (numpy.ndarray) – Time series of the phi angles.
energy0 (numpy.ndarray) – Energy table 0.
energy1 (numpy.ndarray) – Energy table 1.
esteptable (numpy.ndarray) – Time series of the stepping table between energies (burst).
- Returns:
- time_rnumpy.ndarray
Time array of the recompiled distribution.
- vdf_rnumpy.ndarray
Recompiled distribution.
- energy_rnumpy.ndarray
Recompiled energy table.
- phi_rnumpy.ndarray
Recompiled phi angles.
- Return type:
- Raises:
TypeError – If vdf is not a xarray.Dataset or if phi is not a numpy.ndarray or if energy0 is not a numpy.ndarray or if energy1 is not a numpy.ndarray or if esteptable is not a numpy.ndarray.
Notes
I’m assuming no gaps in the burst data interval. If there is a gap use time_clip before running. To be updated later.
Between two samples, the spin advances the azimuths (2.8 deg for DIS, 0.56 deg for DES burst), and when the first azimuth would pass one bin (11.25 deg) the azimuths are labelled from one bin lower: column j + 1 of the second sample then looks in the direction of column j of the first. The second sample is shifted by -1 bin to pair the same directions (with 360 deg added to its last azimuth). This differs from irfu-matlab mms.psd_rebin, which shifts by +1 bin and pairs directions 20 deg apart (checked on MMS3 DIS and DES burst data, 2015-10-30).