pyrfu.mms.psd_rebin module#

pyrfu.mms.psd_rebin.psd_rebin(vdf: ~xarray.core.dataset.Dataset, phi: ~numpy.ndarray, energy0: ~numpy.ndarray, energy1: ~numpy.ndarray, esteptable: ~numpy.ndarray) -> (<class 'numpy.ndarray'>, <class 'numpy.ndarray'>, <class 'numpy.ndarray'>, <class 'numpy.ndarray'>)[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 (xarray.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_r (numpy.ndarray) – Revised time steps.

  • vdf_r (numpy.ndarray) – Rebinned particle distribution.

  • energy_r (numpy.ndarray) – Revised energy table.

  • phi_r (numpy.ndarray) – Time series of the recalculated phi angle.

Raises:
  • TypeError – If vdf is not a xarray.Dataset.

  • TypeError – If phi is not a numpy.ndarray.

  • TypeError – If energy0 is not a numpy.ndarray.

  • TypeError – If energy1 is not a numpy.ndarray.

  • TypeError – 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.