syncopy.specest.compRoutines.wavelet_cF
syncopy.specest.compRoutines.wavelet_cF#
- syncopy.specest.compRoutines.wavelet_cF(trl_dat, preselect, postselect, toi=None, timeAxis=0, polyremoval=0, output='pow', noCompute=False, chunkShape=None, method_kwargs=None)[source]#
This is the middleware for the
wavelet()
spectral estimation method.- Parameters
trl_dat (2D
numpy.ndarray
) – Uniformly sampled multi-channel time-seriespreselect (slice) – Begin- to end-samples to perform analysis on (trim data to interval). See Notes for details.
postselect (list of slices or list of 1D NumPy arrays) – Actual time-points of interest within interval defined by preselect See Notes for details.
toi (1D
numpy.ndarray
or str) – Either time-points to center wavelets on if toi is anumpy.ndarray
, or “all” to center wavelets on all samples in trl_dat. Please refer tofreqanalysis()
for further details.timeAxis (int) – Index of running time axis in trl_dat (0 or 1)
polyremoval (int) – Order of polynomial used for de-trending data in the time domain prior to spectral analysis. A value of 0 corresponds to subtracting the mean (“de-meaning”),
polyremoval = 1
removes linear trends (subtracting the least squares fit of a linear polynomial). If polyremoval is None, no de-trending is performed.output (str) – Output of spectral estimation; one of
availableOutputs
noCompute (bool) – Preprocessing flag. If True, do not perform actual calculation but instead return expected shape and
numpy.dtype
of output array.chunkShape (None or tuple) – If not None, represents shape of output object spec (respecting provided values of scales, preselect, postselect etc.)
method_kwargs (dict) – Keyword arguments passed to
wavelet()
controlling the spectral estimation method
- Returns
spec – Complex or real time-frequency representation of (padded) input data. Shape is (nTime, 1, len(scales), nChannels), so that the individual spectra per channel can be assessed via spec[:, 1, :, channel].
- Return type
Notes
This method is intended to be used as
computeFunction()
inside aComputationalRoutine
. Thus, input parameters are presumed to be forwarded from a parent metafunction. Consequently, this function does not perform any error checking and operates under the assumption that all inputs have been externally validated and cross-checked.For wavelets, data concatenation is performed by first trimming trl_dat to an interval of interest (via preselect), then performing the actual wavelet transform, and subsequently extracting the actually wanted time-points (via postselect).
See also
syncopy.freqanalysis
parent metafunction
WaveletTransform
ComputationalRoutine
instance that calls this method ascomputeFunction()