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
  • Optional inputs (key/value pairs)
  • Outputs
  • Examples

Was this helpful?

  1. Analyse TMS-evoked potentials

Output peak analysis (group)

PreviousOutput peak analysisNextPlot TMS-evoked potentials

Last updated 4 years ago

Was this helpful?

This function returns the peak analysis results across a group of participants in a table in the workspace and in a figure. Results can be calculated on either the peak latencies determined using , or on fixed latencies provided by the user. Users can also opt to have the average amplitude incorporating data points either side of the peak instead of the absolute peak amplitude. Either the average of the TEP curve or the area under the curve (GMFA only) can be calculated.

To use this function, all of the participant files must be in the same folder and all files must have undergone identical tesa_peakanalysis runs. No other files should be in this folder. Open one file from the folder and run the function on this file and all files will be analysed.

Example table from output peak analysis (group). The amplitudes and the latencies of a given ROI are provided in the table.

EEGLAB user interface

1. Turn on/off table plot of peak output data.

2. Select which TEP to perform the analysis on. Selecting All will perform the analysis on all ROI and GMFA analyses in the data.

3. Select the type of calculation to perform, either amplitude of peak or area under the peak (for GMFA only). If area is selected, a value in 5 must also be included.

5. If a value is included here, the function will take the average amplitude +/- the given value either side of the peak. If left blank, the function will return the absolute amplitude at the peak. A value is required for calculating area under the curve for GMFA.

6. [Required for fixed peak calculation]. Define fixed time points to return amplitude values (as opposed to individual peak latencies). Either one or multiple time points can be given.

Scripts

Base function

output = tesa_peakoutputgroup( EEG, tepType, tepName ); Default use.

output = tesa_peakoutput( EEG, tepType, tepName, 'key1', value1... ); Custom inputs.

Pop function

output = pop_tesa_peakoutputgroup( EEG ); Pop up window.

output = pop_tesa_peakoutputgroup( EEG, tepType, tepName ); Default use.

output = pop_tesa_peakoutput( EEG, tepType, tepName, 'key1', value1... ); Custom inputs.

Required inputs

Input

Description

Example

Default

EEG

EEGLAB EEG structure

EEG

-

tepType

'ROI' or 'GMFA'. Indicate whether to perform analysis on ROI or GMFA.

'ROI'

-

tepName

String indicating which specific ROI or GMFA TEP to give output for.

'motor'

-

Optional inputs (key/value pairs)

Key

Input value

Description

Example

Default

'winType'

'individual' or 'fixed'

Calculates values using either the latencies determined for each individual participant (using tesa_peakanalysis) or set latencies provided by the user in 'fixedPeak' (see below).

'fixed'

'individual'

'calcType'

'amplitude' or 'area'

Indicates whether to return the average amplitude of the TEP time series or the area under the curve (area under curve only for GMFA analysis). For area under curve, an analysis time window must also be entered using averageWin.

'area'

'amplitude'

'averageWin'

integer

Integer describing a time window +/- the peak (in ms) in which an average amplitude/area will be taken. If left empty, the absolute amplitude at the peak latency will be returned. A value is required for calculating area under the curve for GMFA.

5

[ ]

'fixedPeak'

integer

[Required for 'winType' fixed]. Integer or vector describing fixed latencies for calculating amplitude or area under the curve.

30 (single); [30,60,100] (multiple)

[ ]

'tablePlot'

'on' or 'off'

Plots a table with results from peak analysis.

'off'

'on'

Outputs

Output

Description

output

Table in workspace with output from peak analysis.

Examples

output = pop_tesa_peakoutputgroup( EEG, 'ROI', 'frontal' ); Returns amplitude at individual latencies for all peaks defined with tesa_peakanalysis in ROI named frontal.

output = pop_tesa_peakoutputgroup( EEG, 'ROI', 'frontal', 'averageWin', 5 ); Returns amplitude averaged +/- 5 ms from individual latencies for all peaks defined with tesa_peakanalysis in ROI named frontal.

output = pop_tesa_peakoutputgroup( EEG, 'GMFA', 'R1', 'averageWin', 10, 'calcType', 'area'); Returns area under the curve +/- 10 ms from individual latencies for all peaks defined in GMFA using tesa_peak analysis.

output = pop_tesa_peakoutputgroup( EEG, 'ROI', 'frontal', 'winType', 'fixed', 'fixedPeak', [30,60,100,180],'averageWin', 5 ); Returns amplitude averaged +/- 5 ms from peaks given in 'fixedPeak'. It is not necessary to run tesa_peakanalysis for this option.

4. Select whether to perform the analysis at the latency of peaks determined for the individual participant with (individual) or on fixed latencies provided by the user (fixed). If fixed is selected, values must be given in 6.

tesa_peakanaysis
tesa_peakanalysis