[FieldTrip] Eletkta Neuromag data in Fieldtrip

Gianpaolo Demarchi gianpaolo.demarchi at unitn.it
Wed Feb 17 10:02:36 CET 2016


Dear Robert,

> Thanks for the detailed reply – yes it looks like it has something to do with powerline noise, but I’m still getting weird plots (and TF plots) even if I low-pass filter at 40Hz..

It depends on what you define as weird. As Niels correctly pointed out, if you don’t filter at all, and you use the HPI, you’ll see a mess @around 300 Hz, plus the mains frequencies and harmonics, plus whatever happened during your experiment (e.g. a car passing by, elevators, etc). Though, if you lp filter at 40 Hz you still should get rid of both HPI(1) and x*50 Hz noise, so I expect that your source of “weirdness” is not there …
One thing that comes to my mind is that you mentioned that you usually use IAS, which I imagine in turns means that the raw data per se are not too nice (therefore for need of IAS), but without further info/pics a "differential diagnosis” of the weirdness is hard, e.g. if you see big “strips” in TF plots at 50 Hz, wo filtering, baseline-ing and/or contrasting, I would just call this normal behavior ….

> Trying out Fieldtrip’s DFT filter doesn’t seem to work either.

Removing power line noise it’s not an easy task, but if you still see “weirdness” filtering @40Hz, then this is not your enemy: if it’s really “power noise like”, take a chunk of a 100ms, count the peaks, and if they are 5 (50Hz) then probably for some reason your filter didn’t do the job (cfg.xxx.lpxxx = ‘yes’ is needed to turn on the filter). If the peaks are less,/more then you have some other problems (although i cannot imagine anything that looks like power line, not at 50, 100, etc (2))

>  
> It’s also strange that motion correction seems to sort out the data .. mmm :/


This is right. If you use maxfilter -movecomp, you get the “SSS” cleaning “for free”, which usually takes care of many noise sources … I tried in the past also with the ‘-nosss’ switch, but still you get some “beatifying” of the data wrt to the “raw” raw, but maybe it’s just SSP projection, that you don’t get for free in fieldtrip … I didn’t investigate much further ….
Try to dig deeper, and feel free to post pics/snip to the list …
Best luck,
G.

(1) although sometimes I had some HPI coils “beatings” @7Hz in few frontal grads, still to understand fully why …
(2) caveat: we see obviously big sinusoidal artifacts, at lower frequencies,  when we do MEG+tACS, but since you don’t mention it I don’t expect this to be your case :-)





Dr. Gianpaolo Demarchi
FB Psychologie - Universität Salzburg
Hellbrunnerstr, 34  5020 Salzburg (A)
Tel: +43 (0) 662 / 8044 - 5135
gianpaolo.demarchi at sbg.ac.at


> 
> Fra: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] på vegne af Gianpaolo Demarchi [gianpaolo.demarchi at unitn.it]
> Sendt: 16. februar 2016 16:18
> Til: FieldTrip discussion list
> Emne: Re: [FieldTrip] Eletkta Neuromag data in Fieldtrip
> 
> Hi,
> just a couple of comments, since nobody chimes in :-)
> 
>> Il giorno 16 feb 2016, alle ore 13:51, Seymour, Robert (Research Student) <seymourr at aston.ac.uk <x-msg://13/redir.aspx?REF=NNaTaB5YCupjtSmHjo5VgJlQUiaQTIcF-AaBp8H8MfRGLd7-FzfTCAFtYWlsdG86c2V5bW91cnJAYXN0b24uYWMudWs.>> ha scritto:
>> 
>> Dear all, 
>> 
>> I am working with Elekta Neuromag data and want to load the raw .fif file into Fieldtrip; i.e. having not undergone Maxfilter cleaning. I have turned off Internal Active Sheilding (IAS) during recording.
>> 
>> Loading in motion-corrected data is fine and produces reasonable results. However using the same code with un-Maxfiltered data produces some very strange plots - please see some pictures I have uploaded online.. http://imgur.com/a/b0Mrl <x-msg://13/redir.aspx?REF=MPTdXmSfB67Ttq_QWI72wJwBqAz65FOCF9eI7nlWTItGLd7-FzfTCAFodHRwOi8vaW1ndXIuY29tL2EvYjBNcmw.> . It is not an issue with the data themselves because it looks sensible in Graph (the Elekta data visualisation program). 
> 
> They look reasonable ... what you see is the effect of the (bp?) filter on your data and the x seconds rectangular window that you’re using for watching at  them. 
> The first pic should be grads, and the second mags, if I’m not mistaken, and in the second one you can clearly see 50 Hz mains noise (you’ve 50Hz over there, isn’t :-) ?!) 
> If you just want to take a look at the data and scroll trough the time, don’t apply “hardcoded” filters with ft_preprocessing, but fully exploit the power of ft_databrowser, and change filters on the fly there with the button on the right, using a cfg.preproc.xxx syntax. 
> 
> For a quick look at e.g. magnetometers, you can use:
> 
> cfg = [];
> cfg.dataset= rawfile; %in your case
> cfg.layout = 'neuromag306mag.lay';
> cfg.channel = 'MEGMAG';
> ft_databrowser(cfg)
> 
> check the help of ft_databrowser to see which option does what, but in this case the important part is cfg.dataset, that ft_databrowser uses to read directly  the file from the disk. The additional stuff is for topoplotting on right click, e.g. to identify eye blinks …
> The code above is not applying any filtering, so expect some mess, but then from the data browser click on the grey button on the right and try e.g.:
> 
> cfg.preproc.lpfilter        =  'yes' ; % you don't want to see 50 Hz now
> cfg.preproc.lpfreq          = 45 ;
> cfg.preproc.hpfilter        =  'yes' ; 
> cfg.preproc.hpfreq          = 1 ; % try out different value, to suit your needs
> 
> 
> then change a bit the values and see how this looks like. Then you can chop the data in epochs as you did (btw, there is no need of both cfg.headerfile and
> cfg.datafile, the latter should suffice), but then again don’t apply any “hardcoded” filter values at this stage, if the idea is still to take a general look at the data. You can filter in plotting later … or just put the hardcoded filter values in your final (data in ->  Nature paper out) script.
> Hope this helps …
> Best,
> G.
> 
> 
>> 
>> My preprocessing code can be loaded here: http://notepad.cc/peebluki61 <x-msg://13/redir.aspx?REF=1O60S-LBtHfQ5-fanXEAFoxJ22Y3eeyRnJJ0NPacrypGLd7-FzfTCAFodHRwOi8vbm90ZXBhZC5jYy9wZWVibHVraTYx> . If anyone has any idea what is going on I would be very grateful!
>> 
>> Many thanks, 
>> 
>> Robert Seymour (PhD student, Aston Brain Centre)
>> 
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl <x-msg://13/redir.aspx?REF=oH37MQwcdbojcl1bM1P0jyURNby4KuXyozlw6yMZAdBGLd7-FzfTCAFtYWlsdG86ZmllbGR0cmlwQGRvbmRlcnMucnUubmw.>
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip <x-msg://13/redir.aspx?REF=rz1MTHElrha9coRQsXc-KtNDgL5jNCwk3Q_N6bvqavVGLd7-FzfTCAFodHRwOi8vbWFpbG1hbi5zY2llbmNlLnJ1Lm5sL21haWxtYW4vbGlzdGluZm8vZmllbGR0cmlw>
> Dr. Gianpaolo Demarchi
> FB Psychologie - Universität Salzburg
> Hellbrunnerstr, 34  5020 Salzburg (A)
> Tel: +43 (0) 662 / 8044 - 5135
> gianpaolo.demarchi at sbg.ac.at <x-msg://13/redir.aspx?REF=rblj9j2riM4kOA1FrhyzTm6JDuMWzcVeex0eZXin8yRGLd7-FzfTCAFtYWlsdG86Z2lhbnBhb2xvLmRlbWFyY2hpQHNiZy5hYy5hdA..>
> 
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl <mailto:fieldtrip at donders.ru.nl>
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip <http://mailman.science.ru.nl/mailman/listinfo/fieldtrip>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160217/d9d7a3ba/attachment-0002.html>


More information about the fieldtrip mailing list