TESA user manual
  • Introduction
  • Installation, getting started, and reporting bugs
    • A quick intro to TESA
    • A quick intro to Matlab
    • A quick intro to EEGLAB
    • Reporting bugs
  • Overview of TMS-EEG analysis
  • Find and mark TMS pulses
    • Find TMS pulses
    • Find TMS pulses (alternative)
    • Fix TMS pulse latencies
  • Remove and interpolate TMS pulse artifacts
    • Remove TMS pulse artifact
    • Interpolate removed data
  • Remove TMS-evoked muscle activity and other artifacts
    • FastICA
    • Component classification (TESA)
    • Plot and remove components
    • Enhanced deflation method (EDM)
    • PCA compression
    • PCA suppression
    • Detrend
    • SSP–SIR
    • SOUND
  • Filter data
    • Butterworth filter
    • Median filter
  • Analyse TMS-evoked potentials
    • Extract TEPs
    • Find and analyse TEP peaks
    • Output peak analysis
    • Output peak analysis (group)
  • Plot TMS-evoked potentials
    • Plot data
    • Plot data (group)
  • Example analysis pipelines
  • TESA functions under development
Powered by GitBook
On this page
  • EEGLAB user interface
  • Scripts
  • Base function
  • Pop function
  • Required inputs
  • Outputs
  • Examples

Was this helpful?

  1. Filter data

Butterworth filter

PreviousFilter dataNextMedian filter

Last updated 4 years ago

Was this helpful?

This function filters the data using a zero-phase butterworth filter. Either a band pass, band stop, high pass, or low pass filter can be implemented. The filter order is defined by the user. This function uses the Matlab butter and filtfilt functions.

EEGLAB user interface

1. Enter the frequencies for filtering.

2. Enter the order of the filter.

3. Select the filter type. For a band-pass filter, frequencies outside of the high and low pass cutoffs will be excluded, whereas for the band-stop filter, frequencies within the high and low pass cutoffs will be excluded. For a high-pass filter, frequencies below the cutoff will be excluded (note that low-pass field can be left blank), whereas for a low-pass filter, frequencies above the cuttoff will be excluded (note that high-pass field can be left blank).

Scripts

Base function

EEG = tesa_filtbutter( EEG, high, low, ord, type ); Default use.

Pop function

EEG = pop_tesa_filtbutter( EEG ); Pop up window

EEG = pop_tesa_filtbutter( EEG, high, low, ord, type ); Custom inputs

Required inputs

Input

Description

Example

Default

EEG

EEGLAB EEG structure

EEG

-

high

Integer setting the high pass frequency

1

-

low

Integer setting the low pass frequency

100

-

ord

Integer setting the filter order

4

-

type

String which sets the design of either a zero-phase band pass, band stop , high pass or low pass butterworth filter; string is either 'bandpass', 'bandstop', 'highpass', or 'lowpass'.

'bandpass'

-

Outputs

Output

Description

EEG

EEGLAB EEG structure

Examples

EEG = pop_tesa_filtbutter( EEG, 1, 100, 4, 'bandpass' ); Zero-phase, 4th-order band pass butterworth filter between 1-100 Hz.

EEG = pop_tesa_filtbutter( EEG, 48, 52, 4, 'bandstop' ); Zero-phase, 4th-order band stop butterworth filter between 48-52 Hz.

EEG = tesa_filtbutter( EEG, 1, [], 4, 'highpass' ); Zero-phase, 4th-order high pass butterworth filter allowing frequencies above 1 Hz

EEG = tesa_filtbutter( EEG, [], 45, 4, 'lowpass' ); Zero-phase, 4th-order low pass butterworth filter allowing frequencies below 45 Hz