nenupy.undysputed.utils


Dynspec ToolBox

nenupy.undysputed.utils.de_disperse_array(data, frequencies, time_step, dispersion_measure)[source]

De-disperse in time an array data whose first two dimensions are time and frequency respectively. The array must be regularly sampled in time. The de-dispersion is made relatively to the highest frequency. De-dedispersed array is filled with NaN in time-frequency places where the shifted values were.

Parameters:
  • data (ndarray) – Data array to de-disperse.

  • frequencies (Quantity) – 1D array of frequencies corresponding to the second dimension of data.

  • time_step (Quantity) – Time step between two spectra.

  • dispersion_measure (Quantity) – Dispersion Measure (in pc/cm3).