<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Dear Robert,</div><div class=""><br class=""><blockquote type="cite" class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">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.. </div></blockquote><div class=""><br class=""></div><div class="">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 …</div><div class="">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 ….</div><br class=""><blockquote type="cite" class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Trying out Fieldtrip’s DFT filter doesn’t seem to work either.</div></blockquote><div class=""><br class=""></div><div class="">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))</div><br class=""><blockquote type="cite" class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">It’s also strange that motion correction seems to sort out the data .. mmm :/</div></blockquote></div><br class=""><br class=""><div><div>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 ….</div><div>Try to dig deeper, and feel free to post pics/snip to the list …</div><div>Best luck,</div><div>G.</div><div><br class=""></div><div>(1) although sometimes I had some HPI coils “beatings” @7Hz in few frontal grads, still to understand fully why …</div><div>(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 :-)</div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div>Dr. Gianpaolo Demarchi<br class="">FB Psychologie - Universität Salzburg<div class="">Hellbrunnerstr, 34 5020 Salzburg (A)<br class="">Tel: +43 (0) 662 / 8044 - 5135<br class=""><a href="mailto:gianpaolo.demarchi@sbg.ac.at" class="">gianpaolo.demarchi@sbg.ac.at</a><br class=""><br class=""></div></div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; direction: ltr; font-family: Tahoma; font-size: 10pt;" class=""><div class=""><br class=""><div style="font-family: 'Times New Roman'; font-size: 16px;" class=""><hr tabindex="-1" class=""><div id="divRpF163148" style="direction: ltr;" class=""><font face="Tahoma" size="2" class=""><b class="">Fra:</b><span class="Apple-converted-space"> </span><a href="mailto:fieldtrip-bounces@science.ru.nl" class="">fieldtrip-bounces@science.ru.nl</a> [<a href="mailto:fieldtrip-bounces@science.ru.nl" class="">fieldtrip-bounces@science.ru.nl</a>] på vegne af Gianpaolo Demarchi [<a href="mailto:gianpaolo.demarchi@unitn.it" class="">gianpaolo.demarchi@unitn.it</a>]<br class=""><b class="">Sendt:</b><span class="Apple-converted-space"> </span>16. februar 2016 16:18<br class=""><b class="">Til:</b><span class="Apple-converted-space"> </span>FieldTrip discussion list<br class=""><b class="">Emne:</b><span class="Apple-converted-space"> </span>Re: [FieldTrip] Eletkta Neuromag data in Fieldtrip<br class=""></font><br class=""></div><div class=""></div><div class="">Hi,<div class="">just a couple of comments, since nobody chimes in :-)</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">Il giorno 16 feb 2016, alle ore 13:51, Seymour, Robert (Research Student) <<a href="x-msg://13/redir.aspx?REF=NNaTaB5YCupjtSmHjo5VgJlQUiaQTIcF-AaBp8H8MfRGLd7-FzfTCAFtYWlsdG86c2V5bW91cnJAYXN0b24uYWMudWs." class="" target="_blank">seymourr@aston.ac.uk</a>> ha scritto:</div><br class="Apple-interchange-newline"><div class=""><div id="divtagdefaultwrapper" class="" style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;"><div class="" style="margin-top: 0px; margin-bottom: 0px;">Dear all, </div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">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.</div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">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.. <a href="x-msg://13/redir.aspx?REF=MPTdXmSfB67Ttq_QWI72wJwBqAz65FOCF9eI7nlWTItGLd7-FzfTCAFodHRwOi8vaW1ndXIuY29tL2EvYjBNcmw." id="LPlnk511218" title="http://imgur.com/a/b0Mrl
Ctrl+Click or tap to follow the link" class="" target="_blank">http://imgur.com/a/b0Mrl</a> . It is not an issue with the data themselves because it looks sensible in Graph (the Elekta data visualisation program). </div></div></div></blockquote><div class=""><br class=""></div><div class="">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. </div><div class="">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 :-) ?!) </div><div class="">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. </div><div class=""><br class=""></div><div class="">For a quick look at e.g. magnetometers, you can use:</div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">cfg = [];</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">cfg.dataset= rawfile;<span class="Apple-converted-space"> </span><span class="" style="color: rgb(37, 153, 45);">%in your case</span></div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier; color: rgb(178, 69, 243);"><span class="" style="">cfg.layout =<span class="Apple-converted-space"> </span></span>'neuromag306mag.lay'<span class="" style="">;</span></div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">cfg.channel =<span class="Apple-converted-space"> </span><span class="" style="color: rgb(178, 69, 243);">'MEGMAG'</span>;</div><div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">ft_databrowser(cfg)</div><div class=""><br class=""></div></div><div class="">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 …</div><div class="">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.:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;" class="">cfg.preproc.lpfilter = <span class="Apple-converted-space"> </span><span class="" style="color: rgb(178, 69, 243);">'yes'</span><span class="Apple-converted-space"> </span>;<span class="Apple-converted-space"> </span><span class="" style="color: rgb(37, 153, 45);">% you don't want to see 50 Hz now</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;" class="">cfg.preproc.lpfreq = 45 ;</div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;" class="">cfg.preproc.hpfilter = <span class="Apple-converted-space"> </span><span class="" style="color: rgb(178, 69, 243);">'yes'</span><span class="Apple-converted-space"> </span>; </div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier; color: rgb(37, 153, 45);" class=""><span class="" style="">cfg.preproc.hpfreq = 1 ;<span class="Apple-converted-space"> </span></span>% try out different value, to suit your needs</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">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</div><div class="">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.</div><div class="">Hope this helps …</div><div class="">Best,</div><div class="">G.</div><div class=""><br class=""></div><div class=""><br class=""></div></div><blockquote type="cite" class=""><div class=""><div id="divtagdefaultwrapper" class="" style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;"><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">My preprocessing code can be loaded here:<span class="Apple-converted-space"> </span><a href="x-msg://13/redir.aspx?REF=1O60S-LBtHfQ5-fanXEAFoxJ22Y3eeyRnJJ0NPacrypGLd7-FzfTCAFodHRwOi8vbm90ZXBhZC5jYy9wZWVibHVraTYx" id="LPlnk3819" class="" target="_blank">http://notepad.cc/peebluki61</a> . <span class="" style="font-size: 12pt;">If anyone has any idea what is going on I would be very grateful!</span></div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">Many thanks, </div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">Robert Seymour (PhD student, Aston Brain Centre)</div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div></div><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; float: none; display: inline !important;">_______________________________________________</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; float: none; display: inline !important;">fieldtrip mailing list</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"><a href="x-msg://13/redir.aspx?REF=oH37MQwcdbojcl1bM1P0jyURNby4KuXyozlw6yMZAdBGLd7-FzfTCAFtYWlsdG86ZmllbGR0cmlwQGRvbmRlcnMucnUubmw." class="" target="_blank" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">fieldtrip@donders.ru.nl</a><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"><a href="x-msg://13/redir.aspx?REF=rz1MTHElrha9coRQsXc-KtNDgL5jNCwk3Q_N6bvqavVGLd7-FzfTCAFodHRwOi8vbWFpbG1hbi5zY2llbmNlLnJ1Lm5sL21haWxtYW4vbGlzdGluZm8vZmllbGR0cmlw" class="" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div></blockquote><div class=""><br class=""></div>Dr. Gianpaolo Demarchi<br class="">FB Psychologie - Universität Salzburg<div class="">Hellbrunnerstr, 34 5020 Salzburg (A)<br class="">Tel: +43 (0) 662 / 8044 - 5135<br class=""><a href="x-msg://13/redir.aspx?REF=rblj9j2riM4kOA1FrhyzTm6JDuMWzcVeex0eZXin8yRGLd7-FzfTCAFtYWlsdG86Z2lhbnBhb2xvLmRlbWFyY2hpQHNiZy5hYy5hdA.." class="" target="_blank">gianpaolo.demarchi@sbg.ac.at</a></div><br class=""></div><div class=""><br class=""></div><br class=""></div></div></div></div></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">fieldtrip mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:fieldtrip@donders.ru.nl" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">fieldtrip@donders.ru.nl</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div></blockquote></div><br class=""></body></html>