- syncopy.specest.compRoutines.mtmconvol_cF(trl_dat, soi, postselect, equidistant=True, toi=None, foi=None, nTaper=1, tapsmofrq=None, timeAxis=0, keeptapers=True, polyremoval=0, output_fmt='pow', noCompute=False, chunkShape=None, method_kwargs=None)¶
Perform time-frequency analysis on multi-channel time series data using a sliding window FFT
numpy.ndarray) – Uniformly sampled multi-channel time-series
soi (list of slices or slice) – Samples of interest; either a single slice encoding begin- to end-samples to perform analysis on (if sliding window centroids are equidistant) or list of slices with each slice corresponding to coverage of a single analysis window (if spacing between windows is not constant)
samplerate (float) – Samplerate of trl_dat in Hz
noverlap (int) – Number of samples covered by two adjacent analysis windows
nperseg (int) – Size of analysis windows (in samples)
equidistant (bool) – If True, spacing of window-centroids is equidistant.
numpy.ndarrayor float or str) – Either time-points to center windows on if toi is a
numpy.ndarray, or percentage of overlap between windows if toi is a scalar or “all” to center windows on all samples in trl_dat. Please refer to
freqanalysis()for further details. Note: The value of toi has to agree with provided padding and window settings. See Notes for more information.
numpy.ndarray) – Frequencies of interest (Hz) for output. If desired frequencies cannot be matched exactly the closest possible frequencies (respecting data length and padding) are used.
nTaper (int) – Number of tapers to use
timeAxis (int) – Index of running time axis in trl_dat (0 or 1)
taper (callable) – Taper function to use, one of
keeptapers (bool) – If True, results of Fourier transform are preserved for each taper, otherwise spectrum is averaged across tapers.
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 = 1removes linear trends (subtracting the least squares fit of a linear polynomial). Detrending is done on each segment! If polyremoval is None, no de-trending is performed.
chunkShape (None or tuple) – If not None, represents shape of output object spec (respecting provided values of nTaper, keeptapers etc.)
spec – Complex or real time-frequency representation of (padded) input data.
- Return type
This method is intended to be used as
ComputationalRoutine. 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.
The computational heavy lifting in this code is performed by SciPy’s Short Time Fourier Transform (STFT) implementation