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 interface
  • Script
  • Base function
  • Pop function
  • Required inputs
  • Outputs
  • Examples

Was this helpful?

  1. Remove and interpolate TMS pulse artifacts

Interpolate removed data

PreviousRemove TMS pulse artifactNextRemove TMS-evoked muscle activity and other artifacts

Last updated 5 years ago

Was this helpful?

This function replaces removed data using interpolation. Either linear or cubic interpolation can be used. All data that has been previously removed will be interpolated. Note that either must be ran prior to this function.

EEGLAB interface

1. Choose the type of interpolation to perform on the data from the drop down menu.

Linear - performs a linear interpolation between the existing data points either side of the removed data.

Cubic - performs a cubic interpolation using Matlab's polyfit function. A cubic function is fitted on the data either side of the removed data indicated in 2.

2. Time window for fitting cubic. This determines how many milliseconds either side of the removed data are considered when fitting the cubic function. Default values are 20 ms. Note that at least two samples must be present in each window for fitting a cubic function (e.g. if the data are sampled at 1 kHz a 1 ms window will only have 1 sample, however if the data are sampled at 5 kHz a 1 ms window will have 5 samples).

Script

Base function

EEG = tesa_interpdata( EEG, interpolation ); Default use.

EEG = tesa_interpdata( EEG, interpolation, interpWin ); Custom input.

Pop function

EEG = pop_tesa_interpdata( EEG ); Pop up window

EEG = pop_tesa_interpdata( EEG, interpolation ); Default use.

EEG = pop_tesa_interpdata( EEG, interpolation, interpWin ); Custom input.

Required inputs

Inputs

Description

Example

Default

EEG

EEGLAB EEG structure

EEG

-

interpolation

(Required) String describing type of interpolation, either 'linear' or 'cubic'

'linear'

-

interpWin

(Optional) Vector with times before and after artifact window for fitting cubic function.

[20, 20]

[20,20]

Outputs

Outputs

Description

EEG

EEGLAB EEG structure

Examples

EEG = pop_tesa_interpdata( EEG, 'linear' ); replaces missing data with linear interpolation. Linear function is fitted on data point before and after missing data.

EEG = pop_tesa_interpdata( EEG, 'cubic', [50,50] ); replaces mising data with cubic interpolation. Cubic is fitted on data 50 ms before and 50 ms after missing data

tesa_removedata or pop_tesa_removedata