trialfun_neuromag

Robert Oostenveld r.oostenveld at FCDONDERS.RU.NL
Mon Jan 8 14:38:43 CET 2007


On 5 Jan 2007, at 16:53, Jyrki Ahveninen wrote:
> I tried to start my trip in the field of utilizing Fieldtrip, and I
> have
> problems with neuromag data. I have fieldtrip-20070101.

Dear Jyrki,

I recall that depending on the type of system, the neuromag trigger
channels can have _analog_ noise on them. I.e. instead of containing
clean trigger values embedded in a real zero-baseline signal, they
contain a lot of small-amplitude values everywhere. That messes up
the trigger detection, since the trigger detection searches for
changes in the value in the trigger channel. Even a small change
(=noise) will be detected as trigger. Hence you will end up with a
different trigger value at almost each sample. Not only does that
result in a huge amount of triggers, it also causes the trigger
values that will be used by FieldTrip to be inaccurate (since there
is noise on those values).


The relevant code here is line 21 in trialfun_neuromag
   trigindx = find(trigger & [0 diff(trigger)]);
                    ^^^^^     ^^^^^^^^^^^^^^
                      1             2

which finds the samples in the trigger channel where the trigger
value is different from zero (part 1) and where the trigger value
changed w.r.t. teh previous samle (i.e. flank detection, part 2).

I suggest that you read the trigger channel and look at it by hand
(ie. plot it in matlab and zoom in) to see whether the analog noise
problem applies to you. In that case the flang detection should be
replaced by something more robust (e.g. the trigger value should
change with at least a certain amount). If you know of a robust
method for the flank detection, I would be happy to incorporate it
into FT.

best regards,
Robert



More information about the fieldtrip mailing list