timelockanalysis
timelockanalysis#
- syncopy.timelockanalysis(data, latency='maxperiod', covariance=False, ddof=None, trials='all', keeptrials=False, parallel=None, select=None, **kwargs)[source]#
Average, variance and covariance for
AnalogData
objects across trials.If input
data
is not timelocked already, trial cutting and selections will be applied according to thelatency
setting.The parameters listed below can be provided as is or a via a cfg configuration ‘structure’, see Notes for details.
- Parameters
data (Syncopy
AnalogData
object) – SyncopyAnalogData
object to be averaged across trialslatency (array_like or {'maxperiod', 'minperiod', 'prestim', 'poststim'}) – Either set desired time window ([begin, end]) in seconds, ‘maxperiod’ (default) for the maximum period available or ‘minperiod’ for minimal time-window all trials share, or `’prestim’ (all t < 0) or ‘poststim’ (all t > 0) FieldTrip note: this also sets covarianceWindow
covariance (bool) – Set to
True
to also compute covariance over channelsddof (int or None) – Degrees of freedom for covariance estimation, defaults to
N - 1
trials ('all' or sequence) – Trial selection for FieldTrip compatibility, alternatively use standard Syncopy
select
dictionary which also allows additional selections over channels.keeptrials (bool) – Set to
False
to get single trial covariances inout.cov
parallel (None or bool) – If None (recommended), processing is automatically performed in parallel (i.e., concurrently across trials/channel-groups), provided a dask parallel processing client is running and available. Parallel processing can be manually disabled by setting parallel to False. If parallel is True but no parallel processing client is running, computing will be performed sequentially.
select (dict or
StructDict
or str) – In-place selection of subset of input data for processing. Please refer tosyncopy.selectdata()
for further usage details.
- Returns
out – Time locked data object, with additional datasets: “avg”, “var” and “cov” if
convariance
was set toTrue
- Return type