API for Users#

This page gives an overview over all public functions and classes of Syncopy.

High-level functions#

These meta-functions bundle many related analysis methods into one high-level function.

syncopy.preprocessing(data[, filter_class, ...])

Preprocessing of time continuous raw data with IIR and FIR filters

syncopy.resampledata(data[, resamplefs, ...])

Performs resampling or downsampling of AnalogData objects, representing uniformly sampled time series data.

syncopy.freqanalysis(data[, method, output, ...])

Perform (time-)frequency analysis of Syncopy AnalogData objects

syncopy.connectivityanalysis(data[, method, ...])

Perform connectivity analysis of Syncopy SpectralData OR directly AnalogData objects

syncopy.timelockanalysis(data[, latency, ...])

Average, variance and covariance for AnalogData objects across trials.

Descriptive Statistics#

syncopy.mean(spy_data, dim[, keeptrials, ...])

Calculates the average along arbitrary dimensions of a Syncopy data object spy_data.

syncopy.var(spy_data, dim[, keeptrials, ...])

Calculates the variance along arbitrary dimensions of a Syncopy data object spy_data.

syncopy.std(spy_data, dim[, keeptrials, ...])

Calculates the standard deviation along arbitrary dimensions of a Syncopy data object spy_data.

syncopy.median(spy_data, dim[, keeptrials, ...])

Calculates the median along arbitrary dimensions of a Syncopy data object spy_data.

syncopy.itc(spec_data[, select])

Calculates the inter trial coherence for a SpectralData spec_data object, the input spectrum needs to be complex.

syncopy.spike_psth(data[, binsize, output, ...])

Peristimulus time histogram

Utility#

syncopy.definetrial(obj[, trialdefinition, ...])

(Re-)define trials of a Syncopy data object

syncopy.selectdata(data[, trials, channel, ...])

Create a new Syncopy object from a selection

syncopy.redefinetrial(data_obj[, trials, ...])

This function allows you to adjust the time axis of your data, i.e. to change from stimulus-locked to response-locked.

syncopy.show(data[, squeeze])

Show (partial) contents of Syncopy object

syncopy.cleanup([older_than, interactive, ...])

Delete old files in temporary Syncopy folder

I/O#

Functions to import and export data in Syncopy

syncopy.load(filename[, tag, dataclass, ...])

Load Syncopy data object(s) from disk

syncopy.save(out[, container, tag, ...])

Save Syncopy data object to disk

syncopy.load_ft_raw(filename[, list_only, ...])

Imports raw time-series data from Field Trip into potentially multiple AnalogData objects, one for each structure found within the MAT-file.

syncopy.load_tdt(data_path[, start_code, ...])

Imports TDT time series data and meta-information into a single AnalogData object.

syncopy.load_nwb(filename[, memuse, ...])

Read contents of NWB files

syncopy.copy(spydata)

Create a copy of the entire Syncopy object data on disk

Data exchange with MNE-Python#

syncopy.raw_adata_to_mne_raw(adata)

Convert raw spy.AnalogData (single-trial data) to an MNE Python RawArray.

syncopy.raw_mne_to_adata(ar)

Convert MNE python mne.io.RawArray to spy.AnalogData (single-trial data).

syncopy.tldata_to_mne_epochs(tldata)

Convert Syncopy timelocked data to MNE Python mne.EpochsArray.

syncopy.mne_epochs_to_tldata(ea)

Convert MNE EpochsArray to time-locked Syncopy AnalogData instance.

Plotting#

These convenience function are intended to be used for a quick visual inspection of data and results.

syncopy.singlepanelplot(data, **show_kwargs)

Plot Syncopy data in a single panel

syncopy.multipanelplot(data, **show_kwargs)

Plot Syncopy data in multiple panels

Data Types#

Syncopy data types are Python classes, which offer convenient ways for data access and manipulation.

syncopy.AnalogData([data, filename, ...])

Multi-channel, uniformly-sampled, analog (real float) data

syncopy.SpectralData([data, filename, ...])

Multi-channel, real or complex spectral data

syncopy.CrossSpectralData([data, filename, ...])

Multi-channel real or complex spectral connectivity data

syncopy.SpikeData([data, filename, ...])

Spike times of multi- and/or single units

syncopy.EventData([data, filename, ...])

Timestamps and integer codes of experimental events