Intracranial peak artifact removal

Hi everyone,

I am new to Brainstorm and I am currently trying to analyze data recorded in the subthalamic nucleus.

I have 3 bipolar recordings and when looking at the data I noticed high amplitude artifacts (that last around 2 ms) happening shortly after any stimulus presentation :

Is there an easy way to remove these artifacts ?

What I did so far was try to define these peaks using the detection of custom events which worked nicely. I would like to remove the activity centered around those peak events but I haven't found a way yet.

Do you have any suggestion on what I should do ?

Thanks a lot

Joan

Hello,

Where is this artifact coming from?
Can you please post a screen captured zoomed around the artifact?

Is it just one sample that is completely off? If this is the case, you could reinterpolate the one (or very few samples) at the peak with the process “Artifact > Cut stimulation artifact”. This simply replaces the missing samples with a linear interpolation, it is more designed to fix the signals for display purposes. If you do this with more than one or two samples, it would introduce strong artifacts in frequency domain.

Francois

Hi Joan,

Would you please specify the type of stimulation that you are using?

You mentioned that you observed an artifact shortly after any stimulus presentation. However, from the snapshot that you sent I can see two different artifacts :

  1. on E01 just after an event (dark blue marker)
  2. on E02 just after another type of event (light blue marker)

Do these markers correspond to stimulation events or they are the result of the automatic detection that you performed?

These information might help us to understand the origin of the artifact, thus the way to get rid of it.

Cheers,

AnneSo

Hello everyone,

I have no idea where this artifact comes from.
Here are two zoomed pictures of the same artifact on the first channel :

The experiment has several events (a central fixation point, a cue, a stimulus and a feedback).

What you see on the first picture I attached is an artifact right after the stimulus (on E01) and right after the feedback (on E02, the light blue marker corresponds to the detection I performed but it overlaps with the feedback marker since it happens very quickly after the event).

These artifacts happen on a lot of trials and accross most participants in my study (enough to create a high frequency [>30Hz] rise in power short after time 0 [and lasting around 30-50 ms]), so as you said François maybe the linear interpolation would not be the best. What do you think ?

Thanks a lot for your help !

Joan

It looks like an electrical artifact, but it is weird that it doesn’t show on all the contacts at the same time.
It is like if you had a digital stim channel mixed in with your recordings…
What type of stimulation is this?

You would need to understand first where this artifact is coming from. If there is no direct electrical stimulation of the brain, these peaks are not coming from the electrodes.
For correcting them: it looks like they are only 1 or 2 sample long, you can probably safely remove them with a linear interpolation of the incorrect values. Compute an average time-frequency map of the event after correction to make sure you are not distorting the spectrum too much.

Hi François,

There’s actually no stimulation just recording.

Thanks a lot for your help I will try the linear interpolation and check the TF maps.

Best,

Joan

Hi again,

Linear interpolation works fine but the problem is that the artifact does not happen at the same time at each trial, it spans from 3 ms after stim to 80 ms after stim (oddly seems to happen longer and longer after the event with recording time). This is a problem since it implies that I should cut the artifact trial per trial which would be awfully long (I have 300 trials per participant and 16 participants).
Is there any way to perform this interpolation according to a marker ? Since I was able to define most of the artifacts thanks to the cutom event detection tool, it would be nice to be able to perform the interpolation 1ms before and 1ms after the event.
What do you think ?

Hello,

I edited the process “Cut stimulation artifact” so it can work directly on continuous files.
Now you can enter the name of the event you want to “cut”.
And I also added various options for the interpolation (what was available for Matlab function “interp1”)
Let me know if this works for you.

Cheers
Francois

Hi François,

This works perfectly !
Thank you very much for your help.

Cheers

Joan