[FieldTrip] Tms artifact removal from eeg data

Verhagen, L. (Lennart) l.verhagen at fcdonders.ru.nl
Mon Jan 9 19:44:01 CET 2012


Dear Davide,

Currently, there is no dedicated processing pipeline available in
FieldTrip that will allow you to remove TMS artifacts from EEG data.
However, I have been using FieldTrip to analyze TMS-EEG data for the past
two years (with success), so I am happy to give you some advice.

Please remember that the difference between "good" and "bad" TMS-EEG data
will not be made by FieldTrip (or any other analysis package), but by your
data acquisition.

There are a number of artifacts which are dealt with in different ways:
the pulse itself, clipping, ringing step-response of the op-amp, decay of
the RC-circuit in the filters of the amplifier, decay of the
scalp-electrolyte-electrode circuit, muscle twitch, TMS recharging
artifact, auditory evoked response, somatosensory evoked response.

1. Pulse: The data during the pulse (e.g. 0.3 ms) is lost and cannot be
recovered.
2. Clipping: Only the Nexstim amplifier is currently theoretically able to
hold-and-clamp your data acquisition. In all other amplifiers the signal
will go out-of-range ("clip") between 2-6 ms, depending on your setup. In
this time-period, your data is lost. Some people like to interpolate their
data over the missing values. I personally don't like that.
3. Following the clipping of the data your operational amplifier circuit
will be subject to a step-response. This is a characteristic ringing
artifact often lasting up to 10 ms. You can put a lot of effort in
modeling this artifact (search for "Kalman filter"), but I personally have
not seen any modeling/filtering that worked adequately. Therefore many
people consider the first 8-10 ms following the TMS pulse as lost. Some
interpolate, I replace the values by NaNs.
4. Decay step-response. You are very likely to also observe a decay
artifact in some channels, resembling an exponential decay. This decay can
last relatively long. In horrible cases even up to 1 second, but a decay
lasting 50-150 ms is not uncommon. I have addressed this artifact by
developing an constrained iterative fitting algorithm that is capable of
modeling four additive exponential decays with different time constants.
This worked reasonable well for my data, but has not been tested on data
acquired in any other lab (or setup for that matter). If you are
interested, and know what you are doing, I could share my code with you
(ft_tms_fitexpstepresp). I plan to develop this code (and a tutorial
TMS-EEG processing pipeline) together with other TMS-EEG experts at the
Donders, into a tested set op mfiles, which will hopefully find their
place in the FieldTrip distribution.
5. the muscle twitch is notorious and cannot be easily removed.
6. depending on your TMS machine, you can see a recharging artifact.
Sometimes it can be horrendous, other times it is hardly visible or
completely absent. The best way to deal with this artifact is to avoid it.

Next to replacing values by NaNs and modeling artifacts, I have also used
Independent Component Analysis to identify and remove artifacts. Please
keep in mind that you can only use ICA if you have already attempted to
clean up your data by all other means. TMS artifacts can be quite strong
and show non-linear behavior. Therefore the independent components might
be overloaded by the extreme variance provided by the TMS pulse alone.

I hope I have helped you a bit further. I can imagine that you have more
questions. If so, it would be great if you specify them clearly. I could
fill a whole new paper will many little tips and tricks, but that would be
utterly impractical. By the way, a TMS toolkit focusing on multi-modal TMS
(strong emphasis on TMS-EEG) is likely to be organized by the Donders
early this summer, so keep an eye out on this mailing list if you are
interested.

Cheers,
Lennart.


> From: Davide <drivolta81 at gmail.com>
> Date: 9 January 2012 0:00:57 CET
> To: "fieldtrip at donders.ru.nl" <fieldtrip at donders.ru.nl>
> Subject: [FieldTrip] Tms artifact removal from eeg data
> Reply-To: Email discussion list for the FieldTrip project
<fieldtrip at donders.ru.nl>
>
> Dear all,
>
> I just wish to ask what is a good way to remove tms artifacts from eeg
data using fieldtrip.
>
> The artifact lasts for around 4-8 ms after the tms pulse.
>
> Thanks for your help,
> Davide



More information about the fieldtrip mailing list