Skip to content

Zapline plus user guide

MariusKlug edited this page Mar 23, 2022 · 8 revisions

Installation

The package is completely standalone and has no dependencies. You can install it in two ways:

  1. Download the latest release version and unzip it into your MATLAB path.
  2. If you use EEGLAB, you can directly go to the EEGLAB plugins manager and download it from there.

Using the tool

From the command line

If you have your data in any data matrix in MATLAB you can process it with zapline-plus, as long as you also know the sampling rate. To do so, run this command (no need to transpose the data, this is done internally and the shape is preserved):

cleanedData = clean_data_with_zapline_plus(data,srate);

If you want more control over the processing than using defaults you can add parameters in key-value format. For example, this setting replicates the default original Zapline behavior (no chunking, no adaptive cleaning strength, fixed removal of 3 components over the entire data):

cleanedData = clean_data_with_zapline_plus(data,srate,'noisefreqs',50,'adaptiveNremove',0,'fixedNremove',3,'chunkLength',1e9);

If you have your data in EEGLAB structure, you can also use zapline-plus like this:

[EEG plothandles] = clean_data_with_zapline_plus_eeglab_wrapper(EEG,struct('noisefreqs','line')) % specifying the config is optional and can be done as above

The advantage of this case is, that all used parameters are stored in the EEG struct and can be found in EEG.etc.zapline. Specifying the plothandles output is optional and allows saving the plot on disk.

Clone this wiki locally