Thomas Witzel twitzel at NMR.MGH.HARVARD.EDU
Mon Jan 8 15:27:43 CET 2007

Thanks Lauri,

I was just going to add here as well. I think the trialfun_neuromag.m
function could have a routine that searches first for STI101, if that is
not there then for STI 014 and only if thats not there rely on user
specified channels. This would increase the user comfort a bit.


  On Mon, 8
Jan 2007, Lauri Parkkonen wrote:

> Hello Jyrki and Robert,
> Just a little addition: the trigger lines in all 306-channel systems are
> purely digital so there is no noise. The channel 'STI 014' (or 'STI101' in
> the most recent model with 32bits/sample) holds the binary trigger word,
> i.e., one bit per trigger line. For backwards compatibility with some old
> analysis setups, there are also analog-like channels named 'STI 001', 'STI
> 002', ... representing just one trigger line each. These channels are
> digitally derived from the binary trigger word thus they do not contain noise
> either.
> With the best regards,
> Lauri
>> 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