Find and mark TMS pulses

To generate TMS-evoked potentials from EEG recordings, an accurate record of precisely when the TMS pulse was given is required. However, recording TMS triggers in EEG may not always be available due to the experimental arrangement or simply human error. TESA has several functions which use the large TMS pulse recording artifact to detect and mark when TMS pulses occur.

Finding TMS pulses in continuous data

The tesa_findpulse function is useful when no trigger events have been recorded and searches for large rate changes in EEG amplitude during continuous EEG recordings.

Example of TMS pulses found using tesa_findpulse. TMS events are now stored in the EEGLAB data structure.

Correcting TMS event latencies

If TMS trigger events were recorded, however these triggers did not accurately mark the TMS pulse onset, the tesa_fixevent function corrects TMS trigger event latency on epoched EEG data.

Example of TMS event latencies corrected using tesa_fixevent. Original event latencies on the left were approximately 7 ms earlier than the actual TMS pulse. This latency was corrected by tesa_fixevent on right.

Last updated