Dynamic power spectra

pyspedas.tdpwrspc(varname, newname=None, nboxpoints=256, nshiftpoints=128, binsize=3, nohanning=False, noline=False, notperhz=False, notmvariance=False)

Compute power spectra for a tplot variable.

Parameters
  • varname (str) – Name of pytplot variable.

  • newname (str, optional) – Name of new pytplot variable to save data to.

  • nboxpoints (int, optional) – The number of points to use for the hanning window. The default is 256.

  • nshiftpoints (int, optional) – The number of points to shift for each spectrum. The default is 128.

  • binsize (int, optional) – Size for binning of the data along the frequency domain. The default is 3.

  • nohanning (bool, optional) – If True, no hanning window is applied to the input. The default is False.

  • noline (bool, optional) – If True, no straight line is subtracted. The default is False.

  • notperhz (bool, optional) – If True, the output units are the square of the input units. The default is False.

  • notmvariance (bool, optional) – If True, replace output spectrum for any windows that have variable. cadence with NaNs. The default is False.

Returns

Name of new pytplot variable.

Return type

str

pyspedas.dpwrspc(time, quantity, nboxpoints=256, nshiftpoints=128, binsize=3, nohanning=False, noline=False, notperhz=False, notmvariance=False, tm_sensitivity=None)

Compute power spectra.

Parameters
  • time (list of float) – Time array.

  • quantity (list of float) – Data array.

  • nboxpoints (int, optional) – The number of points to use for the hanning window. The default is 256.

  • nshiftpoints (int, optional) – The number of points to shift for each spectrum. The default is 128.

  • binsize (int, optional) – Size for binning of the data along the frequency domain. The default is 3.

  • nohanning (bool, optional) – If True, no hanning window is applied to the input. The default is False.

  • noline (bool, optional) – If True, no straight line is subtracted. The default is False.

  • notperhz (bool, optional) – If True, the output units are the square of the input units. The default is False.

  • notmvariance (bool, optional) – If True, replace output spectrum for any windows that have variable cadence with NaNs. The default is False.

  • tm_sensitivity (float, optional) – If noTmVariance is set, this number controls how much of a dt anomaly is accepted. The default is None.

Returns

  • tdps (array of float) – The time array for the dynamic power spectrum, the center time of the interval used for the spectrum.

  • fdps (array of float) – The frequency array (units =1/time units).

  • dps (array of float) – The power spectrum, (units of quantity)^2/frequency_units.