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
  • Cleaning the data
  • Removing spike artifacts

Was this helpful?

Filter data

PreviousSOUNDNextButterworth filter

Last updated 4 years ago

Was this helpful?

Filtering EEG data is a common method for reducing low and high frequency signal that is unlikely to reflect neural activity. Filtering can also improve ICA decomposition by removing low frequency drifts and spurious high frequency noise.

Cleaning the data

TESA includes a zero-phase bandpass and bandstop Butterworth filter which uses the Matlab butter and filtfilt functions. Butterworth filters are common bandpass and bandstop filters used in EEG signal processing.

Example of butterworth filtering. Data before and after bandpass (1-100 Hz) and bandstop (48-52 Hz) filtering using a zero-phase butterworth filter.

Removing spike artifacts

TESA also includes median filters which can be used to remove high frequency spike artifacts introduced by electrical components in some TMS machines. These filters replace small windows of data around an artifact with the median value of data from a larger window (definded by the filter order). Median filters can also be used to remove TMS-evoked pulse and muscle artifacts at the expense of the underlying neural signal.

Example of removing TMS-evoked muscle activity using median filtering. Median filters can also be used to remove the TMS-evoked muscle artifact, however this also removes the underlying TMS-evoked neural activity. Filter settings (window: -10, 40; filter order: 100).

Example of removing spike artifacts using median filtering. Top left: Smaller spike artifacts can be detected and selected using the manual gui option in . Top right: High frequency spike artifacts are not locked to the TMS pulse and can occur randomly, most likely as a result of electrical components within the TMS machine. Bottom left: A magnified view showing a TMS artifact and a spike artifact. Bottom right: The spike artifact is removed with the median filter (window: -2, 2; filter order: 5).

tesa_findpulsepeak