> For the complete documentation index, see [llms.txt](https://nigelrogasch.gitbook.io/tesa-user-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nigelrogasch.gitbook.io/tesa-user-manual/remove_minimise_tms_muscle_activity.md).

# Remove TMS-evoked muscle activity and other artifacts

## TMS-evoked muscle artifacts

Perhaps the most challenging issue with TMS-EEG research is recovering neural activity from the large TMS-evoked muscle artifact resulting from stimulation of scalp muscles. Ideally, these artifacts can be avoided by stimulating close to the mid-line away from scalp muscles. However, this is not always possible, especially if the region of interest for TMS stimulation is more lateral. The best methods for accurately recovering neural activity from such artifacts is currently an active area of research. TESA provides a collection of different methods for removing or minimising TMS-evoked muscle activity including: independent component analysis using the [FastICA](/tesa-user-manual/remove_minimise_tms_muscle_activity/fastica.md) algorithm (we also provide a method for using rules to [automatically classify artifact components](/tesa-user-manual/remove_minimise_tms_muscle_activity/auto_comp_select.md)), an alternative FastICA algorithm called the [enhanced deflation method](/tesa-user-manual/remove_minimise_tms_muscle_activity/edm.md), [principal component analysis](/tesa-user-manual/remove_minimise_tms_muscle_activity/pca_suppression.md) and several ways of [detrending the data](/tesa-user-manual/remove_minimise_tms_muscle_activity/detrend.md).

&#x20;

![](/files/-LmJDEXJIgluuHCdCDGQ)

**Example 1 - comparison of methods for removing TMS-evoked muscle activity.** For FastICA, three components were removed, for EDM three components were removed, and for PCA suppression one component was removed.

## Other artifacts

In addition to TMS-evoked artifacts, several other artifacts which are common to regular EEG recordings also distort the TMS-evoked neural signal. Such artifacts include: eye blinks, eye movement, persistent muscle activity and electrode noise. [FastICA](/tesa-user-manual/remove_minimise_tms_muscle_activity/fastica.md) with [automatic component classification](/tesa-user-manual/remove_minimise_tms_muscle_activity/auto_comp_select.md) available in TESA can also be used to remove these artifacts.

&#x20;

![](/files/-LmJDEXLqAQZmoS0WI-H)

**Example 2 - removal of additional artifacts using FastICA and automatic component selection.** Of the 59 components, 3 residual TMS-evoked muscle activity artifacts, 3 eye blink/movement, 19 persistent muscle and 10 electrode noise components were removed.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://nigelrogasch.gitbook.io/tesa-user-manual/remove_minimise_tms_muscle_activity.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
