pyrfu.mms.hpca_pad#

pyrfu.mms.hpca_pad(vdf, saz, aze, b_xyz, elim=None, elevation=None, source: str = 'default', data_path: str = '')[source]#

Computes HPCA pitch angle distribution.

Parameters:
  • vdf (xarray.DataArray) – Ion PSD or flux; [nt, npo16, ner63].

  • saz (xarray.DataArray) – Start index of azimuthal angle; [nt], (0 - 15), at the times of vdf.

  • aze (xarray.DataArray) – Azimuthal angle per energy; [nT, naz16, npo16, ner63], one record per half-spin.

  • b_xyz (xarray.DataArray) – B in dmpa coordinate

  • elim (list, Optional) – [emin, emax], energy range for PAD. Default is the whole energy range.

  • elevation (array_like, Optional) – Polar angles (colatitudes, deg) of the 16 anodes. Default reads mms?_hpca_centroid_elevation_angle in the file of vdf.

  • source ({"default", "local", "sdc", "aws"}, Optional) – Resource to read the anode elevations from (if elevation is None). Default uses default in pyrfu/mms/config.json.

  • data_path (str, Optional) – Path of MMS data (for source “local”).

Returns:

pad_spec – PAD spectrum, averaged over the energy range, for 12 pitch angle bins of 15 deg.

Return type:

xarray.DataArray

Raises:

ValueError – If the half-spins of aze and the samples of vdf don’t match.

Notes

The azimuths of aze are those of the look directions of the anodes, and the elevations the polar angles of the particle velocities: the particles move at azimuth + 180 deg and polar angle elevation. With this convention, the flux-weighted direction of the H+ distributions matches the direction of the official HPCA bulk velocity (to 3 deg in the spin plane on 2017-07-06, MMS1, 22:36-22:47 UT), and the pitch angle asymmetry that of FPI. B is resampled to the time of each energy step.

Examples

>>> from pyrfu import mms
>>> tint = ["2019-09-14T07:54:00", "2019-09-14T08:11:00"]
>>> vdf = mms.get_data("dpfhplus_hpca_brst_l2", tint, 1)
>>> saz = mms.get_data("saz_hpca_brst_l2", tint, 1)
>>> aze = mms.get_data("azimuth_hpca_brst_l2", tint, 1)
>>> b_dmpa = mms.get_data("b_dmpa_fgm_brst_l2", tint, 1)
>>> pad_ = mms.hpca_pad(vdf, saz, aze, b_dmpa, elim=[500, 3000])