MCPcopy
hub / github.com/mne-tools/mne-python / csd_array_morlet

Function csd_array_morlet

mne/time_frequency/csd.py:1129–1238  ·  view source on GitHub ↗

Estimate cross-spectral density from an array using Morlet wavelets. Parameters ---------- X : array-like, shape (n_epochs, n_channels, n_times) The time series data consisting of n_epochs separate observations of signals with n_channels time-series of length n_times.

(
    X,
    sfreq,
    frequencies,
    t0=0,
    tmin=None,
    tmax=None,
    ch_names=None,
    n_cycles=7,
    use_fft=True,
    decim=1,
    projs=None,
    n_jobs=None,
    *,
    verbose=None,
)

Source from the content-addressed store, hash-verified

1127
1128@verbose
1129def csd_array_morlet(
1130 X,
1131 sfreq,
1132 frequencies,
1133 t0=0,
1134 tmin=None,
1135 tmax=None,
1136 ch_names=None,
1137 n_cycles=7,
1138 use_fft=True,
1139 decim=1,
1140 projs=None,
1141 n_jobs=None,
1142 *,
1143 verbose=None,
1144):
1145 """Estimate cross-spectral density from an array using Morlet wavelets.
1146
1147 Parameters
1148 ----------
1149 X : array-like, shape (n_epochs, n_channels, n_times)
1150 The time series data consisting of n_epochs separate observations
1151 of signals with n_channels time-series of length n_times.
1152 sfreq : float
1153 Sampling frequency of observations.
1154 frequencies : list of float
1155 The frequencies of interest, in Hertz.
1156 t0 : float
1157 Time of the first sample relative to the onset of the epoch, in
1158 seconds. Defaults to 0.
1159 tmin : float | None
1160 Minimum time instant to consider, in seconds. If ``None`` start at
1161 first sample.
1162 tmax : float | None
1163 Maximum time instant to consider, in seconds. If ``None`` end at last
1164 sample.
1165 ch_names : list of str | None
1166 A name for each time series. If ``None`` (the default), the series will
1167 be named 'SERIES###'.
1168 n_cycles : float | list of float | None
1169 Number of cycles to use when constructing Morlet wavelets. Fixed number
1170 or one per frequency. Defaults to 7.
1171 use_fft : bool
1172 Whether to use FFT-based convolution to compute the wavelet transform.
1173 Defaults to True.
1174 decim : int | slice
1175 To reduce memory usage, decimation factor during time-frequency
1176 decomposition. Defaults to 1 (no decimation).
1177
1178 If `int`, uses tfr[..., ::decim].
1179 If `slice`, uses tfr[..., decim].
1180
1181 projs : list of Projection | None
1182 List of projectors to store in the CSD object. Defaults to ``None``,
1183 which means the projectors defined in the Epochs object will be copied.
1184 %(n_jobs)s
1185 %(verbose)s
1186

Callers 2

test_csd_morletFunction · 0.90
csd_morletFunction · 0.85

Calls 4

_prepare_csd_arrayFunction · 0.85
morletFunction · 0.85
_get_nfftFunction · 0.85
_execute_csd_functionFunction · 0.85

Tested by 1

test_csd_morletFunction · 0.72