pyhiperta.waveform_indexing.waveform1Dto2D

pyhiperta.waveform_indexing.waveform1Dto2D(maps1D_to_2D: Tuple[ndarray, ndarray], waveform: ndarray, waveform2D: ndarray = None) ndarray[source]

Get the 2D array representation of waveform

If waveform2D is passed, the values of waveform2D will be updated with waveform’s. Otherwise a new 2D array will be created.

Parameters:
  • maps1D_to_2D (tuple of np.ndarray) – The tuple holding the indices to go from 1D to 2D representation

  • waveform (np.ndarray) – Waveform values in 1D shape.

  • waveform2D (np.ndarray, optionnal) – An already existing 2D representation of the waveform, to update with waveform’s values.

Returns:

A 2D array representing the waveform. (The array is independent of waveform, not a view)

Return type:

np.ndarray