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

Median filter

PreviousButterworth filterNextAnalyse TMS-evoked potentials

Last updated 5 years ago

Was this helpful?

This function applies a 1-dimensional median filter of nth-order to remove artifacts such as spikes and muscle artifacts. Note that spike artifacts can be selected using the gui option in .

EEGLAB user interface

1. Enter the time window to be filtered around the event (in ms). Note that t1 must be either 0 or negative and t2 must be positive. Example: -10, 20

2. Enter the order of the filter. The filter order determines the number of samples considered either side of the data point when calculating the median value. Example: 99.

3. Select the event to be filtered around, for example a spike event selected using tesa_findpulsepeak or the TMS pulse.

Scripts

Base function

EEG = tesa_filtmedian( EEG, timeWin, filtOrd, label ); Default use.

Pop function

EEG = pop_tesa_filtmedian( EEG ); Pop up window

EEG = pop_tesa_filtmedian( EEG, timeWin, filtOrd, label ); Custom inputs

Required inputs

Input

Description

Example

Default

EEG

EEGLAB EEG structure

EEG

-

timeWin

Vector with time range for applying median filter in ms. Note that t1 must be 0 or negative and t2 positive

[-20,30]

-

filtOrd

Integer indicating filter order. The filter order determines the number of samples considered either side of the data point when calculating the median value.

99

-

label

String indicating which event type to filter around

'TMS'

-

Outputs

Output

Description

EEG

EEGLAB EEG structure

Examples

EEG = tesa_filtmedian( EEG, [-2,2], 3, 'spike' ); Apply a 3rd order median filter to remove small spike artifacts

tesa_findpulsepeak