From r.vandermeij at DONDERS.RU.NL Mon Mar 1 10:19:22 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Mon, 1 Mar 2010 10:19:22 +0100 Subject: clusterstats empty cfg.neighbours, cfg.neighbours example In-Reply-To: Message-ID: Hi Chetan, We noticed this bug a short time ago, the don't-cluster-over-channels option is not catched correctly at the moment. For now, you should be safe if you just change the piece of code you quoted to (so, just removing the rest): /channeighbstructmat = makechanneighbstructmat(cfg);/ / issource = 0;/ This should produce the correct output in your case, and the clustering should work as intended. Kind regards, Roemer van der Meij On 2/27/2010 8:15 AM, Chetan Sharma wrote: > Hello everyone, > > I'm trying to run the coherence Z nonparametric test to detect > synchrony between two channels of MEG data. Because of how restrictive > bonferoni, FDR, and all are, we wanted to use the 'cluster' function > for cfg.correctm. This call to statistics_montecarlo.m, which says in > the description that to do clustering in frequency and time, as we > want to do, we should use an empty cfg.neighbours structure. However, > when the function calls clusterstats.m, it looks like there is a bug > in the code. The relevant code is at line 38 in clusterstats.m, and is: > > if isfield(cfg, 'neighbours') && ~isempty(cfg.neighbours) > channeighbstructmat = makechanneighbstructmat(cfg); > issource = 0; > else > issource = 1; > % cfg contains dim and inside that are needed for reshaping the data > to a volume, and inside should behave as a index vector > cfg = fixinside(cfg, 'index'); > end > > The issue is that the case for an empty cfg.neighbours isn't handled. > Running the function with an empty cfg.neighbours leads to a bug when > calculating the clusters, and makes issource=1, when it should be zero > for freq_time data. The function runs through when I manually set > issource=0, but I don't know if that is the intended purpose. > > Has anyone else run into this problem? Without an example of what > cfg.neighbours should look like, it's hard to determine if we are > doing a correct setup. Could someone either send an example of > cfg.neighbours, or verify this bug and suggest solutions? > > thanks and regards, > -chetan > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > -- Roemer van der Meij MSc Scientific Programmer& Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK Wed Mar 3 14:44:23 2010 From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith) Date: Wed, 3 Mar 2010 13:44:23 +0000 Subject: some small modifications to singleplotER Message-ID: Hi I have been fiddling about with the singleplotER function a little bit to try and make it better suited to my needs. I have made a couple of minor modifications which i think would be useful. Firstly, in interactive mode, I have added support for doing topoplots when multiple datasets are have been plotted. I have also added a way of converting the singleplotER's cfg.maskparamater into highlighted sensors in the topoplot. Secondly, I added a little extra bit for plotting the standard error around the ERPs. It calculates standard error from the data.var field and then plots it around the ERP as an area plot. This can be turned on using: 'cfg.plotstderr = 'yes'. I have added an example of what this looks like with 2 ERPs. It can look a little busy if plotting more than 3 ERPs on the same plot. I'd be happy for these modifications to be included in fieldtrip release and if any one has any suggestions for improving them i would welcome them. I've labelled all my additions as 'MD MODIFIED'. Many thanks Mark -- Mark Drakesmith PhD Student Neuroscience and Aphasia Research Unit (NARU) University of Manchester ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: erp_with_stderr.jpg Type: image/jpeg Size: 55743 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: singleplotER.m URL: From ronitibon at GMAIL.COM Wed Mar 3 14:33:22 2010 From: ronitibon at GMAIL.COM (Roni Tibon) Date: Wed, 3 Mar 2010 14:33:22 +0100 Subject: A typo in the biosemi64.lay file Message-ID: Hi all, I want to report a problem in the biosemi64.lay file: the AFz channel (number 37) appears in the file as Afz (with lower case 'f'). This, of course, leads to problems with topoplots etc. Roni ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK Wed Mar 3 15:17:12 2010 From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith) Date: Wed, 3 Mar 2010 14:17:12 +0000 Subject: bug using planarcombine and with planar 4d/bti data Message-ID: Hi There seems to be a small bug with using using planarcombine with 4D/BTI data after using megplanar. It reports the gradiometer type to be 'bti248' instead of 'bti248_planar' which it should be. The problem is with senstype function, where it puills the definitions from .hdr.grad substructure first instead of .grad substrutre (line 109) which is the one that has the planar-transofrmed definitions. I just swapped the order inwhich the function looks for gradiometer definitions so that it looks in .grad first instead of .hdr.grad. It now correctly reports the gadiometer type as 'bti248_planar'. Many thanks Mark Mark Drakesmith PhD Student Neuroscience and Aphasia Research Unit (NARU) University of Manchester ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From lucie.charles.ens at GOOGLEMAIL.COM Wed Mar 3 15:16:51 2010 From: lucie.charles.ens at GOOGLEMAIL.COM (Lucie Charles) Date: Wed, 3 Mar 2010 15:16:51 +0100 Subject: Label display problem with ft_topoplotER for EEG-MEG data Message-ID: Hi everyone , I noticed a small bug using ft_topoplotER with my EEG-MEG data that I think I managed to correct. When I try to use the option : *cfg.highlight = ' labels ' *or * cfg.marker = ' labels '* I have an error message saying that it doesn't find coordinates for some labels (see at the end for the entire message). I looked into it and it seems that EEG channels are always in the list of channels that the function tries to plot even if I'm trying to plot only magnetometers for example. I made two small changes at the ft_topoplotER and it seems to solve the problem : *line 606 > templay.label = data.label(labelindex); *instead of *templay.label = **channelselection(cfg.highlightchannel{icell}, data.label);* *line 631 > templay.label = data.label(labelindex); * instead of * templay.label = channelselection(setdiff(1:length(data.label),highlightchansel), data.label); *This solution works fine for me but I'm not sure that it will work in any case.* * Still I hope it helps. Cheers, Lucie CHARLES Error Message : *??? Error using ==> text Each string specified must have a corresponding set of coordinates Error in ==> plot_lay at 73 text(X+labeloffset, Y+(labeloffset*1.5), Lbl,'fontsize',labelsize); Error in ==> ft_topoplotER at 617 plot_lay(templay,'box','no','label',labelflg,'point','yes',... Error in ==> topoplotER at 17 [varargout{1:nargout}] = funhandle(varargin{:});* ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Wed Mar 3 15:32:52 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Wed, 3 Mar 2010 15:32:52 +0100 Subject: bug using planarcombine and with planar 4d/bti data In-Reply-To: <4B8E6F68.5090602@postgrad.manchester.ac.uk> Message-ID: Dear Mark, Thanks for the suggestion. I was wondering whether you are using an up- to-date version of fieldtrip, because I looked up the log of senstype and as far as I can see this issue has been resolved a while ago. I must confess that I have not recently encountered your reported issue on my own bti-data. Best Jan-Mathijs On Mar 3, 2010, at 3:17 PM, Mark Drakesmith wrote: > Hi > > There seems to be a small bug with using using planarcombine with 4D/ > BTI data after using megplanar. It reports the gradiometer type to > be 'bti248' instead of 'bti248_planar' which it should be. The > problem is with senstype function, where it puills the definitions > from .hdr.grad substructure first instead of .grad substrutre (line > 109) which is the one that has the planar-transofrmed definitions. > > I just swapped the order inwhich the function looks for gradiometer > definitions so that it looks in .grad first instead of .hdr.grad. It > now correctly reports the gadiometer type as 'bti248_planar'. > > Many thanks > > > Mark > > Mark Drakesmith > PhD Student > > Neuroscience and Aphasia Research Unit (NARU) > University of Manchester > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From maess at CBS.MPG.DE Wed Mar 3 15:40:29 2010 From: maess at CBS.MPG.DE (Burkhard Maess) Date: Wed, 3 Mar 2010 15:40:29 +0100 Subject: Summer School on Multimodal Approaches in Neuroscience, Leipzig, Germany, July 19 - 21, 2010 In-Reply-To: <16025891.1164171267627150012.JavaMail.root@zimbra> Message-ID: Dear fieldtrip community, sorry for advertising - On behalf of Bob Turner I would like to invite interested PhD students to come to Leipzig this summer. Best wishes, Burkhard ........................................................................ Dear colleagues, *International Summer School on Multimodal Approaches in Neuroscience* Leipzig, Germany, July 19 - 21, 2010 Keynote Lecturers: 19th July: Multimodal Methods * Prof. Stefan Debener (University of Oldenburg, Germany) * Prof. Vincent Walsh (University College London, UK) * Prof. Richard Buxton (University of California, San Diego, USA) 20th July: Multimodal Structures * Prof. Dr. Jon Kaas (Vanderbilt University, USA) * Prof. Dr Simon Eickhoff (RWTH Aachen University and Research Center Juelich, Germany) * Dr. Saad Jbabdi (University of Oxford, UK) 21st July: Multimodal Functions * Prof. Guy Orban (Catholic University of Leuven, Belgium) * Prof. Luciano Fadiga (University of Ferrara & Italian Institute of Technology, Genova, Italy) * Prof. Asif Ghazanfar (Princeton University, USA) Please circulate this announcement among your colleagues, your graduate students, and any interested researchers. For more details please see http://imprs-neurocom.mpg.de/summerschool. There is no registration fee for the summer school. Target group: Graduate students interested in any of the disciplines comprising cognitive neuroscience Course dates: July 19 - 21, 2010 Location: Max Planck Institute for Human Cognitive and Brain Sciences Stephanstrasse 1a 04103 Leipzig, Germany Working language: English Registration deadline: April 30, 2010 Online registration: http://imprs-neurocom.mpg.de/summerschool/apply Space is limited: early registration will avoid disappointment. Best regards, Bob Turner Head, *International Max Planck Research School (IMPRS) "Neuroscience of Communication: Function, Structure, and Plasticity"* -- Professor Robert Turner Director, Department of Neurophysics Max-Planck-Institute for Human Cognitive and Brain Sciences Stephanstrasse 1A 04103 Leipzig Germany Tel: +49 341 9940-2242 Fax: +49 341 9940-2448 Email: turner at cbs.mpg.de www.cbs.mpg.de .............................................. Dr. Burkhard Maess Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a, P.O. Box 500355, D-04303 Leipzig Aussenstelle Bennewitz, phone/fax: +49(3425)8875-2526/-2511 mail: maess 'at' cbs.mpg.de, http://www.cbs.mpg.de ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From karl.doron at GMAIL.COM Thu Mar 4 10:52:05 2010 From: karl.doron at GMAIL.COM (Karl Doron) Date: Thu, 4 Mar 2010 10:52:05 +0100 Subject: custom trialfun/begin sample problem Message-ID: Hello, I'm running a modified version of your custom trialfun script. Because I have 'triggers' on data(1,N) and 'responses' on data(2,N), I simply did this: % search for all "trigger" and "response" events value = [event.value]'; sample = [event.sample]'; % determine the number of samples before and after the trigger pretrig = -cfg.trialdef.prestim * hdr.Fs; %0.5 posttrig = cfg.trialdef.poststim * hdr.Fs; %3.5 Then I'm looking for value(j)==62 followed by value(j+1)==112, followed by response value(j+2)==1024. All this seems to work fine. However, after running definetrial, my first trial in cfg.trl begins with a negative number, equal to the offset of 254.xx samples. However, in cfg.event, the first "62" trigger begins at sample 35557, not at sample 1. This isn't happening in any of my other trialfun scripts. Thank you for any help! Karl Doron PhD Candidate UC, Santa Barbara ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From aostendorf at BESA.DE Thu Mar 4 11:27:33 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Thu, 4 Mar 2010 11:27:33 +0100 Subject: clusterstats empty cfg.neighbours, cfg.neighbours example In-Reply-To: <4B8B869A.8070704@donders.ru.nl> Message-ID: Dear Roemer, regarding your reply to Chetan's question / observation: Can I ask you whether what I currently do is correct? I have got time-frequency data, which I sometimes want to cluster over channels or not. So I do the following o) do the modification you recommended to Chetan channeighbstructmat = makechanneighbstructmat(cfg); issource = 0; (commented out the surrounding lines) o) edit cfg.channel o) if clustering over channels is desired: edit cfg.neighbourdist and cfg.minnbchan else (no clustering over channels or if channels are averaged): cfg.neighbours = {} This works and there is a marked difference whether I cluster over channels or not. I am just not sure whether it is correct. Thanks a lot for your help so far! All the best Andrea ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From karl.doron at GMAIL.COM Thu Mar 4 11:31:33 2010 From: karl.doron at GMAIL.COM (Karl Doron) Date: Thu, 4 Mar 2010 11:31:33 +0100 Subject: custom trialfun/begin sample problem Message-ID: Hello, I was able to answer my own question. event.type at sample 1 was of type 'trial' but didn't have a value (value=[]). After read_event() in my trialfun, I added event(1,1).value=1; ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.vandermeij at DONDERS.RU.NL Thu Mar 4 15:00:59 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Thu, 4 Mar 2010 15:00:59 +0100 Subject: clusterstats empty cfg.neighbours, cfg.neighbours example In-Reply-To: Message-ID: Hi Andrea, For a quick work-around the first bullet-point should work out fine, I don't know why you want to edit cfg.channel though. However, if you /do/ want to cluster over channels it is necessary to specify a neighbourhood structure, see ft_neighbourselection for how to do that. The neighbourhood structure you create by doing this should be placed in cfg.neighbours. The result could be the same if you edit the cfg options in the subfunction clusterstat though, but I haven't used those fields directly. Hope this helps, Kind regards, Roemer On 3/4/2010 11:27 AM, Andrea Ostendorf wrote: > Dear Roemer, > > regarding your reply to Chetan's question / observation: Can I ask you > whether what I currently do is correct? > I have got time-frequency data, which I sometimes want to cluster over > channels or not. So I do the following > > o) do the modification you recommended to Chetan > channeighbstructmat = makechanneighbstructmat(cfg); > issource = 0; > (commented out the surrounding lines) > o) edit cfg.channel > o) if clustering over channels is desired: > edit cfg.neighbourdist and cfg.minnbchan > else (no clustering over channels or if channels are averaged): > cfg.neighbours = {} > > This works and there is a marked difference whether I cluster over channels > or not. > I am just not sure whether it is correct. > Thanks a lot for your help so far! > > All the best > Andrea > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > -- Roemer van der Meij MSc Scientific Programmer& Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aostendorf at BESA.DE Thu Mar 4 15:13:38 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Thu, 4 Mar 2010 15:13:38 +0100 Subject: clusterstats empty cfg.neighbours, cfg.neighbours example In-Reply-To: <4B8FBD1B.9050809@donders.ru.nl> Message-ID: Dear Roemer, thanks. Yes, this helps. >I don't know why you want to edit cfg.channel though. Sorry, I just meant that I have to specify the channels which I want to send to ft_freqstatistics. All the best Andrea ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From chesharm at STANFORD.EDU Thu Mar 4 16:51:03 2010 From: chesharm at STANFORD.EDU (Chetan Sharma) Date: Thu, 4 Mar 2010 07:51:03 -0800 Subject: clusterstats empty cfg.neighbours, cfg.neighbours example In-Reply-To: <0BB62A997A9349ECAFC51985354DB86A@LAT6500Andrea> Message-ID: I am still running into bugs when doing the freq_time clustering. I am testing for coherence between the hemispheres during a task, and now it runs into problems at clusterstat() at line 175. The command is: posclusobs = findcluster(reshape(postailobs, [cfg.dim,1]),channeighbstructmat,cfg.minnbchan); The problem is that postailobs has size [nfreq*ntime, 1], while the cfg.dim is [nchan nfreq ntime], where nchan=2 in this case. It seems like it wants to reshape it into size [nfreq, ntime, 1]. Is this indeed the case? And could someone help me out by explaining a bit more about when one would choose for cfg.clusterthreshold the different values, 'nonparametric_common', 'nonparametric_individual', and 'parametric' when testing for coherence in different brain areas? I have read over the documentation and the code but am still somewhat unsure. Thank you for the help, -chetan On Thu, Mar 4, 2010 at 6:13 AM, Andrea Ostendorf wrote: > Dear Roemer, > > thanks. Yes, this helps. > > >I don't know why you want to edit cfg.channel though. > > Sorry, I just meant that I have to specify the channels which I want to > send > to ft_freqstatistics. > > All the best > Andrea > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chesharm at STANFORD.EDU Thu Mar 4 17:15:31 2010 From: chesharm at STANFORD.EDU (Chetan Sharma) Date: Thu, 4 Mar 2010 08:15:31 -0800 Subject: clusterstats empty cfg.neighbours, cfg.neighbours example In-Reply-To: Message-ID: And also, what should the channeighbstructmat look like when doing freq_time clustering? When I do the fix mentioned above, it returns a 2x2 matrix of zeros, which causes problems in findcluster(). I've read over the neighbourselection(), but it doesn't give any clues for freq_time clustering. On Thu, Mar 4, 2010 at 7:51 AM, Chetan Sharma wrote: > I am still running into bugs when doing the freq_time clustering. I am > testing for coherence between the hemispheres during a task, and now it runs > into problems at clusterstat() at line 175. The command is: > > posclusobs = findcluster(reshape(postailobs, > [cfg.dim,1]),channeighbstructmat,cfg.minnbchan); > > The problem is that postailobs has size [nfreq*ntime, 1], while the cfg.dim > is [nchan nfreq ntime], where nchan=2 in this case. It seems like it wants > to reshape it into size [nfreq, ntime, 1]. Is this indeed the case? > > And could someone help me out by explaining a bit more about when one would > choose for cfg.clusterthreshold the different values, > 'nonparametric_common', 'nonparametric_individual', and 'parametric' when > testing for coherence in different brain areas? I have read over the > documentation and the code but am still somewhat unsure. > > Thank you for the help, > -chetan > > > On Thu, Mar 4, 2010 at 6:13 AM, Andrea Ostendorf wrote: > >> Dear Roemer, >> >> thanks. Yes, this helps. >> >> >I don't know why you want to edit cfg.channel though. >> >> Sorry, I just meant that I have to specify the channels which I want to >> send >> to ft_freqstatistics. >> >> All the best >> Andrea >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. >> > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK Thu Mar 4 21:23:45 2010 From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith) Date: Thu, 4 Mar 2010 20:23:45 +0000 Subject: bug using planarcombine and with planar 4d/bti data In-Reply-To: <801C1274-810A-428E-8F27-1484CEB1FC11@donders.ru.nl> Message-ID: Hi. thanks for letting me know. I had updsated my fieldtrip quite recently but i think this file didnt get updated for some reason. I've done another update and the issue is now resolved for good. Thanks Mark > Dear Mark, > > Thanks for the suggestion. I was wondering whether you are using an > up-to-date version of fieldtrip, because I looked up the log of > senstype and as far as I can see this issue has been resolved a while > ago. I must confess that I have not recently encountered your reported > issue on my own bti-data. > > Best > > Jan-Mathijs > > > On Mar 3, 2010, at 3:17 PM, Mark Drakesmith wrote: > >> Hi >> >> There seems to be a small bug with using using planarcombine with >> 4D/BTI data after using megplanar. It reports the gradiometer type to >> be 'bti248' instead of 'bti248_planar' which it should be. The >> problem is with senstype function, where it puills the definitions >> from .hdr.grad substructure first instead of .grad substrutre (line >> 109) which is the one that has the planar-transofrmed definitions. >> >> I just swapped the order inwhich the function looks for gradiometer >> definitions so that it looks in .grad first instead of .hdr.grad. It >> now correctly reports the gadiometer type as 'bti248_planar'. >> >> Many thanks >> >> >> Mark >> >> Mark Drakesmith >> PhD Student >> >> Neuroscience and Aphasia Research Unit (NARU) >> University of Manchester >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of >> the FieldTrip toolbox, to share experiences and to discuss new ideas >> for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. -- Mark Drakesmith PhD Student Neuroscience and Aphasia Research Unit (NARU) University of Manchester ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK Thu Mar 4 23:02:58 2010 From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith) Date: Thu, 4 Mar 2010 22:02:58 +0000 Subject: quiestions about planar transformation Message-ID: Hi all I am currently a little confused as to how to properly use megplanar and combineplanar for my 4D 148 axial gadiometer data. I would ideally like to use planar gradients as it will make subsequent ERF and frequency analysis easier to interpret. My question is when should I combine the v and h components? Looking at some previous posts it is suggested that you should combine the gradients on an individual basis, but when I do this i get an almost flat amplitude across all sensors which doesn't look right (see attached image, 'bad_planar'). When i use combineplanar after averaging, the data the data looks ok (good_planar). I get the same result doing both megplanar and combineplanar on the averaged data. I just want to double check that the 'bad' planar fields i am getting are correct and not due to a bug in field trip. Intuitively, I would expect combining the components on the individual level world be more accurate as it would prevent fields from opposeingly orientated dipoles cancelling out when averaged. If it is the case that you should use combineplanar after trial averaging, how do you go about combining after statistical tests? i.e. when you have a p-value or a test statistic for the v and h components for each sensor, how would you combine these together? Any help or advice would be appreciated. Many thanks Mark -- Mark Drakesmith PhD Student Neuroscience and Aphasia Research Unit (NARU) University of Manchester ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: bad_planar.png Type: image/png Size: 18840 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: good_planar.png Type: image/png Size: 26461 bytes Desc: not available URL: From jan.schoffelen at DONDERS.RU.NL Fri Mar 5 11:12:03 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Fri, 5 Mar 2010 11:12:03 +0100 Subject: quiestions about planar transformation In-Reply-To: <4B902E12.7080405@postgrad.manchester.ac.uk> Message-ID: Dear Mark, There may be some confusion here, relating to whether we are talking about frequency domain data (=power, always a positive value), or whether we are talking about time domain data (=amplitude, can be positive and negative). Single trial combination of planar gradient transformed axial gradient (or magnetometer) data is not the best thing to do for time domain stuff. Reason: combination takes place by applying Pythagoras' rule to the _dV and _dH pairs, and when the individual _dH and _dV components are noisy, the noise is also squared, added, and squar-rooted, which leads to an 'amplification' of noise. Not good. It works after trial- averaging because you squeeze out the noise first and Pythagoras the reduced-noise signals. For frequency domain data this is not an issue. Reason: combination usually takes place by just adding the _dV and _dH pairs (power is a squared value already). This is just a linear step (just like averaging) and the order of performing the linear steps does not matter for the result. So single trial combination prior to averaging or vice versa should not make a difference here. In general I would advise against trying to do statistics on the combined planar gradient and use it for visualization purposes only. Alternatively, one could come up with a non-parametric statistical test (permutation), in which I could think of a way of extracting a p- value from a single _dH/_dV pair combined. But this would be a different story... Best, Jan-Mathijs > Hi all > > I am currently a little confused as to how to properly use megplanar > and combineplanar for my 4D 148 axial gadiometer data. I would > ideally like to use planar gradients as it will make subsequent ERF > and frequency analysis easier to interpret. My question is when > should I combine the v and h components? > > Looking at some previous posts it is suggested that you should > combine the gradients on an individual basis, but when I do this i > get an almost flat amplitude across all sensors which doesn't look > right (see attached image, 'bad_planar'). When i use combineplanar > after averaging, the data the data looks ok (good_planar). I get the > same result doing both megplanar and combineplanar on the averaged > data. > > I just want to double check that the 'bad' planar fields i am > getting are correct and not due to a bug in field trip. Intuitively, > I would expect combining the components on the individual level > world be more accurate as it would prevent fields from opposeingly > orientated dipoles cancelling out when averaged. > > If it is the case that you should use combineplanar after trial > averaging, how do you go about combining after statistical tests? > i.e. when you have a p-value or a test statistic for the v and h > components for each sensor, how would you combine these together? > > Any help or advice would be appreciated. > > Many thanks > > Mark Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From michael.wibral at WEB.DE Fri Mar 5 11:40:23 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Fri, 5 Mar 2010 11:40:23 +0100 Subject: quiestions about planar transformation In-Reply-To: <9A2631B3-A19C-4CF4-A473-F0316F441C9F@donders.ru.nl> Message-ID: Dear Mark, dear Jan-Mathijs, I fully agree with JM on not doing statistics (or even averaging) on the planar (absolute) gradient values when working in the time domain. What I resorted to is doing all statistics on fields and presenting that. I addition I supply the planar gradient of the final raw (field) effect underlying the statistics - solely on a desriptive level. The fundamental underlying problem is that you go from a scalar field and massively paralellel univariate statistics to a vector field and, hence, truly multivariate statistics (e.g. because the local gradient vectors will rotate across the course of an ERP/ERF for example). Coming up with a p-value there sounds difficult to me. I always wondered how people with planar gradiometer devices solve that issue when doing time-domain stuff? Maybe there are solutions out there already? Michael -----Ursprüngliche Nachricht----- Von: jan-mathijs schoffelen Gesendet: Mar 5, 2010 11:12:03 AM An: FIELDTRIP at NIC.SURFNET.NL Betreff: Re: [FIELDTRIP] quiestions about planar transformation >Dear Mark, > >There may be some confusion here, relating to whether we are talking >about frequency domain data (=power, always a positive value), or >whether we are talking about time domain data (=amplitude, can be >positive and negative). > >Single trial combination of planar gradient transformed axial gradient >(or magnetometer) data is not the best thing to do for time domain >stuff. >Reason: combination takes place by applying Pythagoras' rule to the >_dV and _dH pairs, and when the individual _dH and _dV components are >noisy, the noise is also squared, added, and squar-rooted, which leads >to an 'amplification' of noise. Not good. It works after trial- >averaging because you squeeze out the noise first and Pythagoras the >reduced-noise signals. > >For frequency domain data this is not an issue. >Reason: combination usually takes place by just adding the _dV and _dH >pairs (power is a squared value already). This is just a linear step >(just like averaging) and the order of performing the linear steps >does not matter for the result. So single trial combination prior to >averaging or vice versa should not make a difference here. > >In general I would advise against trying to do statistics on the >combined planar gradient and use it for visualization purposes only. >Alternatively, one could come up with a non-parametric statistical >test (permutation), in which I could think of a way of extracting a p- >value from a single _dH/_dV pair combined. But this would be a >different story... > >Best, > >Jan-Mathijs > > >> Hi all >> >> I am currently a little confused as to how to properly use megplanar >> and combineplanar for my 4D 148 axial gadiometer data. I would >> ideally like to use planar gradients as it will make subsequent ERF >> and frequency analysis easier to interpret. My question is when >> should I combine the v and h components? >> >> Looking at some previous posts it is suggested that you should >> combine the gradients on an individual basis, but when I do this i >> get an almost flat amplitude across all sensors which doesn't look >> right (see attached image, 'bad_planar'). When i use combineplanar >> after averaging, the data the data looks ok (good_planar). I get the >> same result doing both megplanar and combineplanar on the averaged >> data. >> >> I just want to double check that the 'bad' planar fields i am >> getting are correct and not due to a bug in field trip. Intuitively, >> I would expect combining the components on the individual level >> world be more accurate as it would prevent fields from opposeingly >> orientated dipoles cancelling out when averaged. >> >> If it is the case that you should use combineplanar after trial >> averaging, how do you go about combining after statistical tests? >> i.e. when you have a p-value or a test statistic for the v and h >> components for each sensor, how would you combine these together? >> >> Any help or advice would be appreciated. >> >> Many thanks >> >> Mark > >Dr. J.M. (Jan-Mathijs) Schoffelen >Donders Institute for Brain, Cognition and Behaviour, >Centre for Cognitive Neuroimaging, >Radboud University Nijmegen, The Netherlands >J.Schoffelen at donders.ru.nl >Telephone: 0031-24-3668063 > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From aostendorf at BESA.DE Fri Mar 5 12:27:00 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Fri, 5 Mar 2010 12:27:00 +0100 Subject: clusterstats empty cfg.neighbours, cfg.neighbours example In-Reply-To: Message-ID: Dear Roemer, Thanks for your advice. Since I would like to use Fieldtrip for TFC data and for images, with an additional cluster-over-channels option in the case of the TFC data, I now edited clusterstat. If called from a TFC script (I introduced a field in cfg for this), it uses the correction you gave to Chetan, otherwise it uses the former code. This appears to work and the results make sense. However, I ask myself whether there is an option for managing this without editing any Fieldtrip functions, just by cfg options? Any help would be greatly appreciated. Thanks! All the best Andrea ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK Fri Mar 5 12:47:43 2010 From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith) Date: Fri, 5 Mar 2010 11:47:43 +0000 Subject: quiestions about planar transformation In-Reply-To: <8745792.274828.1267785623641.JavaMail.fmail@mwmweb056> Message-ID: Hi Thanks very much for your comments. I'll stick to using the axial gradients for stats for now. I was just concerned about the issue with dipoles in the same location but different orientations potentially cancelling each other out when analysising the axial gradients. I suppose, if looking at within-subjects trials, if a set of dipoles are in the same location but showing large variability in orientation, they should not be considered anymore significant than dipoles that have different spatial locations. But between subjects, there is alot of varaiblity in cortex topology which may lead to functionally-equivilent dipoles haveing vastly different orientations. I'm not sure how much this is worth worrying about. Do you ahve any thoguhts on this? Thanks again Mark > Dear Mark, dear Jan-Mathijs, > > I fully agree with JM on not doing statistics (or even averaging) on the planar (absolute) gradient values when working in the time domain. What I resorted to is doing all statistics on fields and presenting that. I addition I supply the planar gradient of the final raw (field) effect underlying the statistics - solely on a desriptive level. > > The fundamental underlying problem is that you go from a scalar field and massively paralellel univariate statistics to a vector field and, hence, truly multivariate statistics (e.g. because the local gradient vectors will rotate across the course of an ERP/ERF for example). Coming up with a p-value there sounds difficult to me. I always wondered how people with planar gradiometer devices solve that issue when doing time-domain stuff? Maybe there are solutions out there already? > > Michael > > -----Ursprüngliche Nachricht----- > Von: jan-mathijs schoffelen > Gesendet: Mar 5, 2010 11:12:03 AM > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] quiestions about planar transformation > > >> Dear Mark, >> >> There may be some confusion here, relating to whether we are talking >> about frequency domain data (=power, always a positive value), or >> whether we are talking about time domain data (=amplitude, can be >> positive and negative). >> >> Single trial combination of planar gradient transformed axial gradient >> (or magnetometer) data is not the best thing to do for time domain >> stuff. >> Reason: combination takes place by applying Pythagoras' rule to the >> _dV and _dH pairs, and when the individual _dH and _dV components are >> noisy, the noise is also squared, added, and squar-rooted, which leads >> to an 'amplification' of noise. Not good. It works after trial- >> averaging because you squeeze out the noise first and Pythagoras the >> reduced-noise signals. >> >> For frequency domain data this is not an issue. >> Reason: combination usually takes place by just adding the _dV and _dH >> pairs (power is a squared value already). This is just a linear step >> (just like averaging) and the order of performing the linear steps >> does not matter for the result. So single trial combination prior to >> averaging or vice versa should not make a difference here. >> >> In general I would advise against trying to do statistics on the >> combined planar gradient and use it for visualization purposes only. >> Alternatively, one could come up with a non-parametric statistical >> test (permutation), in which I could think of a way of extracting a p- >> value from a single _dH/_dV pair combined. But this would be a >> different story... >> >> Best, >> >> Jan-Mathijs >> >> >> >>> Hi all >>> >>> I am currently a little confused as to how to properly use megplanar >>> and combineplanar for my 4D 148 axial gadiometer data. I would >>> ideally like to use planar gradients as it will make subsequent ERF >>> and frequency analysis easier to interpret. My question is when >>> should I combine the v and h components? >>> >>> Looking at some previous posts it is suggested that you should >>> combine the gradients on an individual basis, but when I do this i >>> get an almost flat amplitude across all sensors which doesn't look >>> right (see attached image, 'bad_planar'). When i use combineplanar >>> after averaging, the data the data looks ok (good_planar). I get the >>> same result doing both megplanar and combineplanar on the averaged >>> data. >>> >>> I just want to double check that the 'bad' planar fields i am >>> getting are correct and not due to a bug in field trip. Intuitively, >>> I would expect combining the components on the individual level >>> world be more accurate as it would prevent fields from opposeingly >>> orientated dipoles cancelling out when averaged. >>> >>> If it is the case that you should use combineplanar after trial >>> averaging, how do you go about combining after statistical tests? >>> i.e. when you have a p-value or a test statistic for the v and h >>> components for each sensor, how would you combine these together? >>> >>> Any help or advice would be appreciated. >>> >>> Many thanks >>> >>> Mark >>> >> Dr. J.M. (Jan-Mathijs) Schoffelen >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> J.Schoffelen at donders.ru.nl >> Telephone: 0031-24-3668063 >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. >> > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -- Mark Drakesmith PhD Student Neuroscience and Aphasia Research Unit (NARU) University of Manchester ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From michael.wibral at WEB.DE Fri Mar 5 15:59:39 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Fri, 5 Mar 2010 15:59:39 +0100 Subject: Problem with Fieldtrip conversion Message-ID: Dear FT/SPM Listusers, I am having a (hopefully) trivial problem with converting Fieldtrip MEG data structures to spm8. Here's what I did: 0. Patch spm8 to r3684 1. Load the Fieldtrip data from /path/filename. They contain a variable (FTstruct) named DataFT. 2. Call spm_eeg_ft2spm(DataFT, '/path/filename') The error I get is: checkmeeg: no channel type, assigning default checkmeeg: no units, assigning default checkmeeg: transform type missing, assigning default checkmeeg: data scale missing, assigning default ??? Undefined function or method 'fname' for input arguments of type 'struct'. Error in ==> file_array.subsref>access_fields at 129 case 'fname', t = fname(obj); Error in ==> file_array.subsref at 17 varargout = access_fields(obj,subs); Error in ==> checkmeeg at 203 if ~isa(meegstruct.data.y, 'file_array') || isempty(fileparts(meegstruct.data.y.fname)) ... Error in ==> meeg.meeg at 109 [OK D] = checkmeeg(varargin{1}, 'basic'); Error in ==> spm_eeg_ft2spm at 138 D = meeg(D);   Any help is very much appreciated. Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From v.litvak at ION.UCL.AC.UK Fri Mar 5 16:17:49 2010 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Fri, 5 Mar 2010 15:17:49 +0000 Subject: Problem with Fieldtrip conversion In-Reply-To: <18953776.432346.1267801179379.JavaMail.fmail@mwmweb053> Message-ID: Hi Michael, I'm glad to hear that you started looking at SPM :-) This is more of an SPM than a Fieldtrip question so perhaps the discussion should move to the SPM mailing list. Just from looking at the error message the problem doesn't look familiar. Could you send me your file with the struct (via yousendit.com if it's big) and I'll try to reproduce it? Best, Vladimir On Fri, Mar 5, 2010 at 2:59 PM, Michael Wibral wrote: > Dear FT/SPM Listusers, > > I am having a (hopefully) trivial problem with converting Fieldtrip MEG data structures to spm8. > Here's what I did: > > 0. Patch spm8 to r3684 > 1. Load the Fieldtrip data from /path/filename. They contain a variable (FTstruct) named DataFT. > 2. Call spm_eeg_ft2spm(DataFT, '/path/filename') > > The error I get is: > > checkmeeg: no channel type, assigning default > checkmeeg: no units, assigning default > checkmeeg: transform type missing, assigning default > checkmeeg: data scale missing, assigning default > > ??? Undefined function or method 'fname' for input arguments of type 'struct'. > Error in ==> file_array.subsref>access_fields at 129         case 'fname',      t = fname(obj); > > Error in ==> file_array.subsref at 17         varargout = access_fields(obj,subs); > > Error in ==> checkmeeg at 203     if ~isa(meegstruct.data.y, 'file_array') || isempty(fileparts(meegstruct.data.y.fname)) ... > > Error in ==> meeg.meeg at 109         [OK D] = checkmeeg(varargin{1}, 'basic'); > > Error in ==> spm_eeg_ft2spm at 138 D = meeg(D); > > Any help is very much appreciated. > > Michael > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From thomas.hartmann at UNI-KONSTANZ.DE Fri Mar 5 17:02:24 2010 From: thomas.hartmann at UNI-KONSTANZ.DE (Thomas Hartmann) Date: Fri, 5 Mar 2010 17:02:24 +0100 Subject: reading bdf+ files? Message-ID: hi, i try to read bdf+ files created using edflib (http://www.teuniz.net/edflib/) although the file looks good in the reader, fieldtrip complains about "channels with different sampling rate not supported". i debugged the code. the error occurs because bdf+ files have an additional channel storeing events. this one seems to have a different samplerate. i disabled these checks which resulted in a new error-message: "One ore more output arguments not assigned during call to "read_24bit"." is the support of fieldtrip restricted to bdf and not bdf+-files? or is there something wrong with the lib i use to write the file? thanks a lot in advance, thomas -- Dipl. Psych. Thomas Hartmann OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel.: +49 (0)7531 88 4612 Fax: +49 (0)7531-88 4601 Email: thomas.hartmann at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From michael.wibral at WEB.DE Fri Mar 5 18:51:37 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Fri, 5 Mar 2010 18:51:37 +0100 Subject: Problem with Fieldtrip conversion In-Reply-To: Message-ID: Dear Vladimir, Thanks for the quick reply. Yes, i started looking into it and I really like the first impression (not the speed though :-)). I solved the problem in the meantime. The reason was related to an unsuccesful update attempt. Sorry for the confusion! Could you let me know (and other FT users) the logic behind specifying the data twice, i.e. once as the loaded variable in the workspace and once as a filename. Is this related to memory mapped file use? Michael -----Ursprüngliche Nachricht----- Von: Vladimir Litvak Gesendet: Mar 5, 2010 4:17:49 PM An: FIELDTRIP at NIC.SURFNET.NL Betreff: Re: [FIELDTRIP] Problem with Fieldtrip conversion >Hi Michael, > >I'm glad to hear that you started looking at SPM :-) This is more of >an SPM than a Fieldtrip question so perhaps the discussion should move >to the SPM mailing list. Just from looking at the error message the >problem doesn't look familiar. Could you send me your file with the >struct (via yousendit.com if it's big) and I'll try to reproduce it? > >Best, > >Vladimir > >On Fri, Mar 5, 2010 at 2:59 PM, Michael Wibral wrot= >e: >> Dear FT/SPM Listusers, >> >> I am having a (hopefully) trivial problem with converting Fieldtrip MEG d= >ata structures to spm8. >> Here's what I did: >> >> 0. Patch spm8 to r3684 >> 1. Load the Fieldtrip data from /path/filename. They contain a variable (= >FTstruct) named DataFT. >> 2. Call spm_eeg_ft2spm(DataFT, '/path/filename') >> >> The error I get is: >> >> checkmeeg: no channel type, assigning default >> checkmeeg: no units, assigning default >> checkmeeg: transform type missing, assigning default >> checkmeeg: data scale missing, assigning default >> >> ??? Undefined function or method 'fname' for input arguments of type 'str= >uct'. >> Error in =3D=3D> file_array.subsref>access_fields at 129 =A0 =A0 =A0 =A0 = >case 'fname', =A0 =A0 =A0t =3D fname(obj); >> >> Error in =3D=3D> file_array.subsref at 17 =A0 =A0 =A0 =A0 varargout =3D a= >ccess_fields(obj,subs); >> >> Error in =3D=3D> checkmeeg at 203 =A0 =A0 if ~isa(meegstruct.data.y, 'fil= >e_array') || isempty(fileparts(meegstruct.data.y.fname)) ... >> >> Error in =3D=3D> meeg.meeg at 109 =A0 =A0 =A0 =A0 [OK D] =3D checkmeeg(va= >rargin{1}, 'basic'); >> >> Error in =3D=3D> spm_eeg_ft2spm at 138 D =3D meeg(D); >> >> Any help is very much appreciated. >> >> Michael >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the= > FieldTrip =A0toolbox, to share experiences and to discuss new ideas for ME= >G and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.= >html and http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From v.litvak at ION.UCL.AC.UK Fri Mar 5 19:59:12 2010 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Fri, 5 Mar 2010 18:59:12 +0000 Subject: Problem with Fieldtrip conversion In-Reply-To: <8611969.460599.1267811497771.JavaMail.fmail@mwmweb056> Message-ID: The second argument is not the name of the file from which you loaded the variable but the name for the SPM dataset that will be generated. E.g. if you specify 'test' you'll get two files test.mat and test.dat. Vladimir On Fri, Mar 5, 2010 at 5:51 PM, Michael Wibral wrote: > Dear Vladimir, > > Thanks for the quick reply. Yes, i started looking into it and I really like the first impression (not the speed though :-)). > > I solved the problem in the meantime. The reason was related to an unsuccesful update attempt. Sorry for the confusion! Could you let me know (and other FT users) the logic behind specifying the data twice, i.e. once as the loaded variable in the workspace and once as a filename. Is this related to memory mapped file use? > > Michael > > -----Ursprüngliche Nachricht----- > Von: Vladimir Litvak > Gesendet: Mar 5, 2010 4:17:49 PM > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] Problem with Fieldtrip conversion > >>Hi Michael, >> >>I'm glad to hear that you started looking at SPM :-)  This is more of >>an SPM than a Fieldtrip question so perhaps the discussion should move >>to the SPM mailing list. Just from looking at the error message the >>problem doesn't look familiar. Could you send me your file with the >>struct (via yousendit.com if it's big) and I'll try to reproduce it? >> >>Best, >> >>Vladimir >> >>On Fri, Mar 5, 2010 at 2:59 PM, Michael Wibral wrot= >>e: >>> Dear FT/SPM Listusers, >>> >>> I am having a (hopefully) trivial problem with converting Fieldtrip MEG d= >>ata structures to spm8. >>> Here's what I did: >>> >>> 0. Patch spm8 to r3684 >>> 1. Load the Fieldtrip data from /path/filename. They contain a variable (= >>FTstruct) named DataFT. >>> 2. Call spm_eeg_ft2spm(DataFT, '/path/filename') >>> >>> The error I get is: >>> >>> checkmeeg: no channel type, assigning default >>> checkmeeg: no units, assigning default >>> checkmeeg: transform type missing, assigning default >>> checkmeeg: data scale missing, assigning default >>> >>> ??? Undefined function or method 'fname' for input arguments of type 'str= >>uct'. >>> Error in =3D=3D> file_array.subsref>access_fields at 129 =A0 =A0 =A0 =A0 = >>case 'fname', =A0 =A0 =A0t =3D fname(obj); >>> >>> Error in =3D=3D> file_array.subsref at 17 =A0 =A0 =A0 =A0 varargout =3D a= >>ccess_fields(obj,subs); >>> >>> Error in =3D=3D> checkmeeg at 203 =A0 =A0 if ~isa(meegstruct.data.y, 'fil= >>e_array') || isempty(fileparts(meegstruct.data.y.fname)) ... >>> >>> Error in =3D=3D> meeg.meeg at 109 =A0 =A0 =A0 =A0 [OK D] =3D checkmeeg(va= >>rargin{1}, 'basic'); >>> >>> Error in =3D=3D> spm_eeg_ft2spm at 138 D =3D meeg(D); >>> >>> Any help is very much appreciated. >>> >>> Michael >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the= >> FieldTrip =A0toolbox, to share experiences and to discuss new ideas for ME= >>G and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.= >>html and http://www.ru.nl/neuroimaging/fieldtrip. >> >>---------------------------------- >>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From v.litvak at ION.UCL.AC.UK Fri Mar 5 20:06:00 2010 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Fri, 5 Mar 2010 19:06:00 +0000 Subject: Problem with Fieldtrip conversion In-Reply-To: Message-ID: Just to make things clearer for FT users, the D variable that you get from spm_eeg_ft2spm cannot exist without dataset on the disk. It's different from FT where data can be just a variable in the workspace. The reason is indeed memory mapping. So you must have the two files present two have a valid dataset. I suggest again to post SPM-related questions to the SPM list (even though I like getting good publicity for SPM on the FT list ;-) Best, Vladimir On Fri, Mar 5, 2010 at 6:59 PM, Vladimir Litvak wrote: > The second argument is not the name of the file from which you loaded > the variable but the name for the SPM dataset that will be generated. > E.g. if you specify 'test' you'll get two files test.mat and test.dat. > > Vladimir > > On Fri, Mar 5, 2010 at 5:51 PM, Michael Wibral wrote: >> Dear Vladimir, >> >> Thanks for the quick reply. Yes, i started looking into it and I really like the first impression (not the speed though :-)). >> >> I solved the problem in the meantime. The reason was related to an unsuccesful update attempt. Sorry for the confusion! Could you let me know (and other FT users) the logic behind specifying the data twice, i.e. once as the loaded variable in the workspace and once as a filename. Is this related to memory mapped file use? >> >> Michael >> >> -----Ursprüngliche Nachricht----- >> Von: Vladimir Litvak >> Gesendet: Mar 5, 2010 4:17:49 PM >> An: FIELDTRIP at NIC.SURFNET.NL >> Betreff: Re: [FIELDTRIP] Problem with Fieldtrip conversion >> >>>Hi Michael, >>> >>>I'm glad to hear that you started looking at SPM :-)  This is more of >>>an SPM than a Fieldtrip question so perhaps the discussion should move >>>to the SPM mailing list. Just from looking at the error message the >>>problem doesn't look familiar. Could you send me your file with the >>>struct (via yousendit.com if it's big) and I'll try to reproduce it? >>> >>>Best, >>> >>>Vladimir >>> >>>On Fri, Mar 5, 2010 at 2:59 PM, Michael Wibral wrot= >>>e: >>>> Dear FT/SPM Listusers, >>>> >>>> I am having a (hopefully) trivial problem with converting Fieldtrip MEG d= >>>ata structures to spm8. >>>> Here's what I did: >>>> >>>> 0. Patch spm8 to r3684 >>>> 1. Load the Fieldtrip data from /path/filename. They contain a variable (= >>>FTstruct) named DataFT. >>>> 2. Call spm_eeg_ft2spm(DataFT, '/path/filename') >>>> >>>> The error I get is: >>>> >>>> checkmeeg: no channel type, assigning default >>>> checkmeeg: no units, assigning default >>>> checkmeeg: transform type missing, assigning default >>>> checkmeeg: data scale missing, assigning default >>>> >>>> ??? Undefined function or method 'fname' for input arguments of type 'str= >>>uct'. >>>> Error in =3D=3D> file_array.subsref>access_fields at 129 =A0 =A0 =A0 =A0 = >>>case 'fname', =A0 =A0 =A0t =3D fname(obj); >>>> >>>> Error in =3D=3D> file_array.subsref at 17 =A0 =A0 =A0 =A0 varargout =3D a= >>>ccess_fields(obj,subs); >>>> >>>> Error in =3D=3D> checkmeeg at 203 =A0 =A0 if ~isa(meegstruct.data.y, 'fil= >>>e_array') || isempty(fileparts(meegstruct.data.y.fname)) ... >>>> >>>> Error in =3D=3D> meeg.meeg at 109 =A0 =A0 =A0 =A0 [OK D] =3D checkmeeg(va= >>>rargin{1}, 'basic'); >>>> >>>> Error in =3D=3D> spm_eeg_ft2spm at 138 D =3D meeg(D); >>>> >>>> Any help is very much appreciated. >>>> >>>> Michael >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of the= >>> FieldTrip =A0toolbox, to share experiences and to discuss new ideas for ME= >>>G and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.= >>>html and http://www.ru.nl/neuroimaging/fieldtrip. >>> >>>---------------------------------- >>>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Fri Mar 5 21:52:49 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Fri, 5 Mar 2010 21:52:49 +0100 Subject: quiestions about planar transformation In-Reply-To: <8745792.274828.1267785623641.JavaMail.fmail@mwmweb056> Message-ID: Dear FT-colleagues, > The fundamental underlying problem is that you go from a scalar field > and massively paralellel univariate statistics to a vector field and, > hence, truly multivariate statistics (e.g. because the local gradient > vectors will rotate across the course of an ERP/ERF for example). > Coming up with a p-value there sounds difficult to me. I always > wondered how people with planar gradiometer devices solve that issue > when doing time-domain stuff? Maybe there are solutions out there > already? Following up on the proposal by Jan-Mathijs, this is how you can do it: · Use the following test statistic at the level of the (_dV,_dH) channel pairs: calculate the difference between the experimental conditions of the lengths of the trial-averaged vector-valued (_dV,_dH)-signals (J-M calls this “to Pythagoras”). You do this for all channels and all time points · Find the channel- and time-point-specific permutation distributions of these statistics · Use these channel- and time-point-specific permutation distributions to find sensible thresholds for the statistics · Do cluster-based permutation testing using these thresholded test statistics that are subsequently combined in a maximum cluster statistic to control the false alarm If you write the statfun for the channel-specific test statistic, then the rest can be performed using existing Fieldtrip code. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 E: e. maris at donders.ru.nl > > Michael > > -----Ursprüngliche Nachricht----- > Von: jan-mathijs schoffelen > Gesendet: Mar 5, 2010 11:12:03 AM > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] quiestions about planar transformation > > >Dear Mark, > > > >There may be some confusion here, relating to whether we are talking > >about frequency domain data (=power, always a positive value), or > >whether we are talking about time domain data (=amplitude, can be > >positive and negative). > > > >Single trial combination of planar gradient transformed axial gradient > >(or magnetometer) data is not the best thing to do for time domain > >stuff. > >Reason: combination takes place by applying Pythagoras' rule to the > _dV > >and _dH pairs, and when the individual _dH and _dV components are > >noisy, the noise is also squared, added, and squar-rooted, which leads > >to an 'amplification' of noise. Not good. It works after trial- > >averaging because you squeeze out the noise first and Pythagoras the > >reduced-noise signals. > > > >For frequency domain data this is not an issue. > >Reason: combination usually takes place by just adding the _dV and _dH > >pairs (power is a squared value already). This is just a linear step > >(just like averaging) and the order of performing the linear steps > does > >not matter for the result. So single trial combination prior to > >averaging or vice versa should not make a difference here. > > > >In general I would advise against trying to do statistics on the > >combined planar gradient and use it for visualization purposes only. > >Alternatively, one could come up with a non-parametric statistical > test > >(permutation), in which I could think of a way of extracting a p- > value > >from a single _dH/_dV pair combined. But this would be a different > >story... > > > >Best, > > > >Jan-Mathijs > > > > > >> Hi all > >> > >> I am currently a little confused as to how to properly use megplanar > >> and combineplanar for my 4D 148 axial gadiometer data. I would > >> ideally like to use planar gradients as it will make subsequent ERF > >> and frequency analysis easier to interpret. My question is when > >> should I combine the v and h components? > >> > >> Looking at some previous posts it is suggested that you should > >> combine the gradients on an individual basis, but when I do this i > >> get an almost flat amplitude across all sensors which doesn't look > >> right (see attached image, 'bad_planar'). When i use combineplanar > >> after averaging, the data the data looks ok (good_planar). I get the > >> same result doing both megplanar and combineplanar on the averaged > >> data. > >> > >> I just want to double check that the 'bad' planar fields i am > getting > >> are correct and not due to a bug in field trip. Intuitively, I would > >> expect combining the components on the individual level world be > more > >> accurate as it would prevent fields from opposeingly orientated > >> dipoles cancelling out when averaged. > >> > >> If it is the case that you should use combineplanar after trial > >> averaging, how do you go about combining after statistical tests? > >> i.e. when you have a p-value or a test statistic for the v and h > >> components for each sensor, how would you combine these together? > >> > >> Any help or advice would be appreciated. > >> > >> Many thanks > >> > >> Mark > > > >Dr. J.M. (Jan-Mathijs) Schoffelen > >Donders Institute for Brain, Cognition and Behaviour, Centre for > >Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands > >J.Schoffelen at donders.ru.nl > >Telephone: 0031-24-3668063 > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Mon Mar 8 09:27:24 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 8 Mar 2010 09:27:24 +0100 Subject: reading bdf+ files? In-Reply-To: <4B912B10.6030700@uni-konstanz.de> Message-ID: Hi Thomas, On 5 Mar 2010, at 17:02, Thomas Hartmann wrote: > hi, > i try to read bdf+ files created using edflib (http://www.teuniz.net/edflib/ > ) > > although the file looks good in the reader, fieldtrip complains > about "channels with different sampling rate not supported". i > debugged the code. the error occurs because bdf+ files have an > additional channel storeing events. this one seems to have a > different samplerate. > > i disabled these checks which resulted in a new error-message: > "One ore more output arguments not assigned during call to > "read_24bit"." > > is the support of fieldtrip restricted to bdf and not bdf+-files? or > is there something wrong with the lib i use to write the file? I don't know the details of the bdf+ format, but do know the bdf format. Probably bdf+ is plain bdf with an annotation channel. Are you using annotations? The biosemi system does not, it uses a non-standard trigger channel sampled at the same frequency as all other channels (i.e. "non standard" meaning that it does not comply with the published papers on edf and edf+). Having a trigger channel at the same sampling rate makes the implementation of software and hardware and interpretation of the data much simpler. In general data is desribed as Nchan X Nsamples matrix. If one of the channels has another sampling rate, it does not fit in this matrix, that is why varying sampling rates over channels are not supported. If the event/status/trigger channel is represented as a continuously sampled channel (like in bdf), it is read along with all other channels. The same limitation applies to edf and edf+. The annotation channel is difficult to deal with and in the read_biosemi_bdf implementation not supported. The bdf format has small blocks (usually one second long) in which the channels are stored like ch1_1 ch1_2 ch1_3 ... ch2_1 ch2_2 ch2_3 ... i.e. all samples of one channel as a vector, and then the next channel. This allows for variable sampling rates, whereas a multiplexed representation would not. Specific for the bdf format is that the samples are represented as 24 bit (where 32 bit is more usual). The read_24bit mex file reads such a block and converts the 24 bit values to doubles. The reason for having it in a mex file is that the conversion from 24 bits to double is much more efficient. best regards Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From thomas.hartmann at UNI-KONSTANZ.DE Mon Mar 8 10:30:31 2010 From: thomas.hartmann at UNI-KONSTANZ.DE (Thomas Hartmann) Date: Mon, 8 Mar 2010 10:30:31 +0100 Subject: reading bdf+ files? In-Reply-To: Message-ID: hi robert, thanks for the quick answere. yes, bdf+ is bdf with an annotation-channel added. this channel is unlike the bdf trigger channel. so this, as i had already expected, explains the problem. my major motivation for using bdf+ is the availability of a ready-to-use c++ library. unfortunatly it only writes bdf+ or edf+, not the "standard" format. does someone know of a stable, well-documented, free library (c or c++) to write eeg-data in a format, fieldtrip can read? cheers, thomas Am 08.03.2010 09:27, schrieb Robert Oostenveld: > Hi Thomas, > > > On 5 Mar 2010, at 17:02, Thomas Hartmann wrote: > >> hi, >> i try to read bdf+ files created using edflib >> (http://www.teuniz.net/edflib/) >> >> although the file looks good in the reader, fieldtrip complains about >> "channels with different sampling rate not supported". i debugged the >> code. the error occurs because bdf+ files have an additional channel >> storeing events. this one seems to have a different samplerate. >> >> i disabled these checks which resulted in a new error-message: >> "One ore more output arguments not assigned during call to >> "read_24bit"." >> >> is the support of fieldtrip restricted to bdf and not bdf+-files? or >> is there something wrong with the lib i use to write the file? > > I don't know the details of the bdf+ format, but do know the bdf > format. Probably bdf+ is plain bdf with an annotation channel. Are you > using annotations? The biosemi system does not, it uses a non-standard > trigger channel sampled at the same frequency as all other channels > (i.e. "non standard" meaning that it does not comply with the > published papers on edf and edf+). Having a trigger channel at the > same sampling rate makes the implementation of software and hardware > and interpretation of the data much simpler. > > In general data is desribed as Nchan X Nsamples matrix. If one of the > channels has another sampling rate, it does not fit in this matrix, > that is why varying sampling rates over channels are not supported. If > the event/status/trigger channel is represented as a continuously > sampled channel (like in bdf), it is read along with all other > channels. The same limitation applies to edf and edf+. The annotation > channel is difficult to deal with and in the read_biosemi_bdf > implementation not supported. > > The bdf format has small blocks (usually one second long) in which the > channels are stored like > ch1_1 ch1_2 ch1_3 ... ch2_1 ch2_2 ch2_3 ... > i.e. all samples of one channel as a vector, and then the next > channel. This allows for variable sampling rates, whereas a > multiplexed representation would not. Specific for the bdf format is > that the samples are represented as 24 bit (where 32 bit is more > usual). The read_24bit mex file reads such a block and converts the 24 > bit values to doubles. The reason for having it in a mex file is that > the conversion from 24 bits to double is much more efficient. > > best regards > Robert > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. -- Dipl. Psych. Thomas Hartmann OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel.: +49 (0)7531 88 4612 Fax: +49 (0)7531-88 4601 Email: thomas.hartmann at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From michael.wibral at WEB.DE Mon Mar 8 12:32:22 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Mon, 8 Mar 2010 12:32:22 +0100 Subject: statistic on planar gradients Message-ID: Dear Eric, you suggested to,... Use the following test statistic at the level of the (_dV,_dH) channel pairs: calculate the difference between the experimental conditions of the lengths of the trial-averaged vector-valued (_dV,_dH)-signals (J-M calls this “to Pythagoras”). You do this for all channels and all time points.... I disagree here, but not for mathematical/stastical reason, rather because of neurophysiology and the problem discussed in the thread before : I think of two conditions that differ not in their amplitudes but have completely opposing direction of a dipole (in an identical location), then statitsics on raw fields will easily find this effect, but the length of the trial averaged vector valued signals will be identical (the dipole does not jitter across trials in this example, hence trial averaging of vector valued signals doesn't help. The dipole just inverts it's orientation across conditions). That's what I meant by multivariate statistics. Some importnat information gets lost (and must get lost) when going to a non-directional and unsigned quantity to test. But maybe I simply misunderstood your suggestion altogether?? Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From e.maris at DONDERS.RU.NL Mon Mar 8 13:18:08 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Mon, 8 Mar 2010 13:18:08 +0100 Subject: statistic on planar gradients In-Reply-To: <19371188.1269230.1268047942766.JavaMail.fmail@mwmweb056> Message-ID: Dear Michael, > you suggested to,... > > Use the following test statistic at the level of the (_dV,_dH) channel > pairs: calculate the difference between the experimental conditions of > the lengths of the trial-averaged vector-valued (_dV,_dH)-signals (J-M > calls this “to Pythagoras”). You do this for all channels and all > time points.... > > I disagree here, but not for mathematical/stastical reason, rather > because of neurophysiology and the problem discussed in the thread > before : > I think of two conditions that differ not in their amplitudes but have > completely opposing direction of a dipole (in an identical location), > then statitsics on raw fields will easily find this effect, but the > length of the trial averaged vector valued signals will be identical > (the dipole does not jitter across trials in this example, hence trial > averaging of vector valued signals doesn't help. The dipole just > inverts it's orientation across conditions). That's what I meant by > multivariate statistics. Some importnat information gets lost (and must > get lost) when going to a non-directional and unsigned quantity to > test. My apologies for not having read the thread far enough back in time. If you want to identify shifts in dipole orientation produced by your independent variable, then my proposal doesn´t work. However, here is an alternative (channel,time)-pair-specific test statistic that will do the job: 1. Represent the (dV,dH)-pair of planar gradient evoked responses as a single complex number with dH being the real part and dV the imaginary part. Call this the “complex planar representation”. 2. From the complex planar representations of the two experimental conditions, calculate the complex phase difference between the two. (It may turn out that you get a more sensitive test if this between-condition complex phase difference is weighted by the amplitudes of the complex planars in the two conditions. However this is not central for the main idea.) 3. Find the permutation distributions of the (channel,time)-pair-specific complex phase differences, and use these to find an appropriate threshold. 4. Proceed in the same way as for other cluster-based permutation tests. The main difference between this test, and the previous one that I proposed, is that in step 2 we calculate the phase difference instead of the magnitude difference. Best, Eric > > But maybe I simply misunderstood your suggestion altogether?? > > Michael > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.holle at SUSSEX.AC.UK Mon Mar 8 16:53:35 2010 From: h.holle at SUSSEX.AC.UK (Henning Holle) Date: Mon, 8 Mar 2010 15:53:35 +0000 Subject: problem with definetrials Message-ID: Dear list members, I am trying to define trials for a dataset. When I look for the events contained in the file (like this) cfg = []; cfg.dataset = 'jenna.cnt' cfg.trialdef.eventtype = '?'; dummy = definetrial(cfg); I get the following output. Reading Event Table... the following events were found in the datafile event type: 'trigger' with event values: 1 11 22 33 no trials have been defined yet, see DEFINETRIAL for further help found 202 events created 0 trials Now, when I want to define the trials for all 'standard' events (which have the eventvalue '11'), % define trials cfg = []; cfg.dataset = 'jenna.cnt' cfg.trialdef.eventtype = 'trigger' cfg.trialdef.eventvalue = { '11' }; cfg_standard = definetrial(cfg); I get the following error message. ??? Error using ==> cellstr at 34 Input must be a string. Error in ==> cell.intersect at 44 a = cellstr(a); Error in ==> trialfun_general at 114 elseif ~isempty(intersect(event(i).value, cfg.trialdef.eventvalue)) Error in ==> ft_definetrial at 110 [trl, event] = feval(cfg.trialfun, cfg); Error in ==> definetrial at 17 [varargout{1:nargout}] = funhandle(varargin{:}); How can I solve this problem? Am I doing something wrong? (I am using the most recent version of fieldtrip) Cheers, Henning -- ************************* Dr. Henning Holle, Department of Psychology, University of Sussex, Falmer, Brighton, BN1 9QH, U.K. Tel. : +44 (0)1273 877240 Fax. : +44 (0)1273 678058 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Mar 8 17:58:00 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 8 Mar 2010 17:58:00 +0100 Subject: clusterstats empty cfg.neighbours, cfg.neighbours example In-Reply-To: Message-ID: Hi Chetan, Sorry about that, the bookeeping of the data dimensions is a bit messy, as reflected in the cfg.dim which is pre and post appended all the time. On 4 Mar 2010, at 16:51, Chetan Sharma wrote: > I am still running into bugs when doing the freq_time clustering. I > am testing for coherence between the hemispheres during a task, and > now it runs into problems at clusterstat() at line 175. what is your statfun? Channel clustering is not supported for all possible statistics, and especially has limits in the case of bivariate measures such as coherence. > The command is: > > posclusobs = findcluster(reshape(postailobs, > [cfg.dim,1]),channeighbstructmat,cfg.minnbchan); > > The problem is that postailobs has size [nfreq*ntime, 1], while the > cfg.dim is [nchan nfreq ntime], where nchan=2 in this case. It seems > like it wants to reshape it into size [nfreq, ntime, 1]. Is this > indeed the case? > > And could someone help me out by explaining a bit more about when > one would choose for cfg.clusterthreshold the different values, > 'nonparametric_common', 'nonparametric_individual', and 'parametric' > when testing for coherence in different brain areas? I have read > over the documentation and the code but am still somewhat unsure. parametric uses the known parametric distribution of the statistic, this has to be supported by the statfun. nonparametric_common estimates a threshold from the randomization distribution. The threshold is common to all channe-time-frequency points. nonparametric_individual estimates an individual threshold from the randomization distribution for each channe-time-frequency point. best regards, Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Mar 8 18:00:28 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 8 Mar 2010 18:00:28 +0100 Subject: clusterstats empty cfg.neighbours, cfg.neighbours example In-Reply-To: Message-ID: > And also, what should the channeighbstructmat look like when doing > freq_time clustering? When I do the fix mentioned above, it returns > a 2x2 matrix of zeros, which causes problems in findcluster(). I've > read over the neighbourselection(), but it doesn't give any clues > for freq_time clustering. neighbourselection is only for specifying neighbouring channels. Neighbouring timepoints and frequencies have a trivial definition and don'h have to be specified. If you only want clustering in time and frequency and not over channels, you shoudl specify cfg.neighbours = {} or [] (I don't know for sure which emnptyit should be right now). best Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From arno at CERCO.UPS-TLSE.FR Mon Mar 8 18:05:33 2010 From: arno at CERCO.UPS-TLSE.FR (Arnaud Delorme) Date: Mon, 8 Mar 2010 09:05:33 -0800 Subject: clusterstats empty cfg.neighbours, cfg.neighbours example In-Reply-To: Message-ID: Hi Robert, I was running some correction for multiple comparisons using the cluster method you have developed and I set the number of neighbors for each channel to 4.5 when constructing the channel neighbor matrix (which seem meaningful to me as each channel has in general 4 neighbors in the 4 directions). I did work and returned relevant results. I am now thinking of making a link in EEGLAB to use that function but I want to be sure that my arbitrary choice in the number of channel neighbor is a good one. Thanks a lot, Arno On Mar 8, 2010, at 8:58 AM, Robert Oostenveld wrote: > Hi Chetan, > > Sorry about that, the bookeeping of the data dimensions is a bit > messy, as reflected in the cfg.dim which is pre and post appended all > the time. > > On 4 Mar 2010, at 16:51, Chetan Sharma wrote: >> I am still running into bugs when doing the freq_time clustering. I >> am testing for coherence between the hemispheres during a task, and >> now it runs into problems at clusterstat() at line 175. > > what is your statfun? > > Channel clustering is not supported for all possible statistics, and > especially has limits in the case of bivariate measures such as > coherence. > > >> The command is: >> >> posclusobs = findcluster(reshape(postailobs, >> [cfg.dim,1]),channeighbstructmat,cfg.minnbchan); >> >> The problem is that postailobs has size [nfreq*ntime, 1], while the >> cfg.dim is [nchan nfreq ntime], where nchan=2 in this case. It seems >> like it wants to reshape it into size [nfreq, ntime, 1]. Is this >> indeed the case? >> >> And could someone help me out by explaining a bit more about when >> one would choose for cfg.clusterthreshold the different values, >> 'nonparametric_common', 'nonparametric_individual', and 'parametric' >> when testing for coherence in different brain areas? I have read >> over the documentation and the code but am still somewhat unsure. > > > parametric uses the known parametric distribution of the statistic, > this has to be supported by the statfun. > nonparametric_common estimates a threshold from the randomization > distribution. The threshold is common to all channe-time-frequency > points. > nonparametric_individual estimates an individual threshold from the > randomization distribution for each channe-time-frequency point. > > best regards, > Robert > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From chesharm at STANFORD.EDU Mon Mar 8 18:14:37 2010 From: chesharm at STANFORD.EDU (Chetan Sharma) Date: Mon, 8 Mar 2010 09:14:37 -0800 Subject: clusterstats empty cfg.neighbours, cfg.neighbours example In-Reply-To: Message-ID: Thank you for the help, I am using statfun_indepZCoh, and hoping to cluster over maxsize in freq_time. The problem is that specifying cfg.neighbours = [] causes a problem in findcluster(). I modified line 175 in clusterstats to do reshape [cfg.dim(2:end) 1], but I now run into an error at line 38 of findcluster(). The problem is that makechanneighbstructmat(cfg) returns a 2x2 matrix of zeros when passed a cfg.neighbours = []. As a result it doesn't pass the check at line 37 of findcluster.m, which is: length(size(spatdimneighbstructmat))~=2 || ~all(size(spatdimneighbstructmat)==spatdimlength) So that's why I'd like to know, what should the neighbstructmat that is returned by makechanneighbstructmat() look like when passed cfg.neighbours = []? It doesn't seem like it should be a 2x2 matrix of zeros. -chetan On Mon, Mar 8, 2010 at 9:00 AM, Robert Oostenveld < r.oostenveld at fcdonders.ru.nl> wrote: > And also, what should the channeighbstructmat look like when doing >> freq_time clustering? When I do the fix mentioned above, it returns a 2x2 >> matrix of zeros, which causes problems in findcluster(). I've read over the >> neighbourselection(), but it doesn't give any clues for freq_time >> clustering. >> > > > neighbourselection is only for specifying neighbouring channels. > Neighbouring timepoints and frequencies have a trivial definition and don'h > have to be specified. If you only want clustering in time and frequency and > not over channels, you shoudl specify cfg.neighbours = {} or [] (I don't > know for sure which emnptyit should be right now). > > best > Robert > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at GMAIL.COM Mon Mar 8 22:12:43 2010 From: julian.keil at GMAIL.COM (Julian Keil) Date: Mon, 8 Mar 2010 22:12:43 +0100 Subject: problem with definetrials In-Reply-To: <4B951D7F.50708@sussex.ac.uk> Message-ID: Hi, maybe this I miss your point but when I set the cfg. structure for the trigger values, I use the square brackets e.g. cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue = [4106 4108 4110]; Did you try this? Good luck. Julian Am 08.03.2010 um 16:53 schrieb Henning Holle: > Dear list members, > > I am trying to define trials for a dataset. When I look for the events contained in the file (like this) > > cfg = []; > cfg.dataset = 'jenna.cnt' > cfg.trialdef.eventtype = '?'; > dummy = definetrial(cfg); > > I get the following output. > > Reading Event Table... > the following events were found in the datafile > event type: 'trigger' with event values: 1 11 22 33 > no trials have been defined yet, see DEFINETRIAL for further help > found 202 events > created 0 trials > > > Now, when I want to define the trials for all 'standard' events (which have the eventvalue '11'), > > % define trials > cfg = []; > cfg.dataset = 'jenna.cnt' > cfg.trialdef.eventtype = 'trigger' > cfg.trialdef.eventvalue = { '11' }; > cfg_standard = definetrial(cfg); > > I get the following error message. > > ??? Error using ==> cellstr at 34 > Input must be a string. > > Error in ==> cell.intersect at 44 > a = cellstr(a); > > Error in ==> trialfun_general at 114 > elseif ~isempty(intersect(event(i).value, cfg.trialdef.eventvalue)) > > Error in ==> ft_definetrial at 110 > [trl, event] = feval(cfg.trialfun, cfg); > > Error in ==> definetrial at 17 > [varargout{1:nargout}] = funhandle(varargin{:}); > > How can I solve this problem? Am I doing something wrong? (I am using the most recent version of fieldtrip) > > Cheers, > > Henning > > -- > ************************* > Dr. Henning Holle, > Department of Psychology, > University of Sussex, > Falmer, Brighton, > BN1 9QH, U.K. > Tel. : +44 (0)1273 877240 > Fax. : +44 (0)1273 678058 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: julian.keil at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at DONDERS.RU.NL Tue Mar 9 09:22:19 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Tue, 9 Mar 2010 09:22:19 +0100 Subject: clusterstats empty cfg.neighbours, cfg.neighbours example In-Reply-To: <4DB8175E4BA342CB8D3C331F0E2F2EAC@LAT6500Andrea> Message-ID: Hi Andrea, The bug should be fixed now, and cfg.neighbours should work as intedend. If you use cfg.neighbours = [] in your call to freqstatistics (or time-lock, etc...), clustering will not be done on channels. The fix should be there in the latest fieldtrip version on the ftp-server (put there last night at 23:00 I think). Happy to help, Best, Roemer On 3/5/2010 12:27 PM, Andrea Ostendorf wrote: > Dear Roemer, > > Thanks for your advice. > Since I would like to use Fieldtrip for TFC data and for images, with an > additional cluster-over-channels option in the case of the TFC data, I now > edited clusterstat. > If called from a TFC script (I introduced a field in cfg for this), it uses > the correction you gave to Chetan, otherwise it uses the former code. > This appears to work and the results make sense. However, I ask myself > whether there is an option for managing this without editing any Fieldtrip > functions, just by cfg options? > Any help would be greatly appreciated. > > Thanks! > All the best > Andrea > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > -- Roemer van der Meij MSc Scientific Programmer& Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Jan.Hirschmann at MED.UNI-DUESSELDORF.DE Tue Mar 9 10:20:36 2010 From: Jan.Hirschmann at MED.UNI-DUESSELDORF.DE (Jan Hirschmann) Date: Tue, 9 Mar 2010 10:20:36 +0100 Subject: welch's method Message-ID: Dear fieldtrip experts, as I have used Welch's method with 50% overlap on the sensor level I would like to do the same on the source level prior to using DICS. Now I am not quite sure what configuration I should use for freqanalysis as fieldtrip is all about multitapering. If I specify cfg.t_ftimwin and cfg.toi such that I get 50% overlap and use cfg.taper=hanning and cfg.method=mtmwelch is this equivalent to Welch's method? And is it appropriate to use small windows, i.e. to reduce spectral resolution, to mimic smoothing? Thanks for your help! Jan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.holle at SUSSEX.AC.UK Tue Mar 9 10:57:20 2010 From: h.holle at SUSSEX.AC.UK (Henning Holle) Date: Tue, 9 Mar 2010 10:57:20 +0100 Subject: problem with definetrials Message-ID: Hi Julian, thank you, this worked for me. Cheers, Henning ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From masaki.maruyama at CEA.FR Tue Mar 9 19:04:00 2010 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Tue, 9 Mar 2010 19:04:00 +0100 Subject: clusterstats empty cfg.neighbours, cfg.neighbours example In-Reply-To: A<4B96053B.1020306@donders.ru.nl> Message-ID: Dear Roemer, The last version of fieldtrip fails the clustering in the default option, i.e., no specification of cfg.neighbouring. Since my script works correctly until the previous version, I'm afraid that the recent change might be a causal. Could you please confirm whether the default option can still work after the change? An error message I received is attached below. Thank you in advance for your kind helps. Sincerely yours, Masaki Maruyama ??? Undefined function or variable "channeighbstructmat". Error in ==> clusterstat at 178 posclusobs = findcluster(reshape(postailobs, [cfg.dim,1]),channeighbstructmat,cfg.minnbchan); Error in ==> statistics_montecarlo at 305 [stat, cfg] = clusterstat(cfg, statrand, statobs,'issource',issource); Error in ==> statistics_wrapper at 275 [stat, cfg] = statmethod(cfg, dat, cfg.design); Error in ==> ft_timelockstatistics at 80 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); Error in ==> timelockstatistics at 17 [varargout{1:nargout}] = funhandle(varargin{:}); >-----Message d'origine----- >De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part >de Roemer van der Meij >Envoyé : mardi 9 mars 2010 09:22 >À : FIELDTRIP at NIC.SURFNET.NL >Objet : Re: [FIELDTRIP] clusterstats empty cfg.neighbours, cfg.neighbours >example > >Hi Andrea, > >The bug should be fixed now, and cfg.neighbours should work as intedend. >If you use cfg.neighbours = [] in your call to freqstatistics (or >time-lock, etc...), clustering will not be done on channels. The fix >should be there in the latest fieldtrip version on the ftp-server (put >there last night at 23:00 I think). > >Happy to help, > >Best, >Roemer > > >On 3/5/2010 12:27 PM, Andrea Ostendorf wrote: >> Dear Roemer, >> >> Thanks for your advice. >> Since I would like to use Fieldtrip for TFC data and for images, with an >> additional cluster-over-channels option in the case of the TFC data, I >now >> edited clusterstat. >> If called from a TFC script (I introduced a field in cfg for this), it >uses >> the correction you gave to Chetan, otherwise it uses the former code. >> This appears to work and the results make sense. However, I ask myself >> whether there is an option for managing this without editing any >Fieldtrip >> functions, just by cfg options? >> Any help would be greatly appreciated. >> >> Thanks! >> All the best >> Andrea >> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >and EEG analysis. See also >http://listserv.surfnet.nl/archives/fieldtrip.html and >http://www.ru.nl/neuroimaging/fieldtrip. >> > >-- >Roemer van der Meij MSc >Scientific Programmer& Data-Analyst >Donders Institute for Brain, Cognition and Behaviour >Centre for Cognition >P.O. Box 9104 >6500 HE Nijmegen >The Netherlands >Tel: +31(0)24 3612631 >E-mail: r.vandermeij at donders.ru.nl > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the >FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >and EEG analysis. See also >http://listserv.surfnet.nl/archives/fieldtrip.html and >http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.vandermeij at DONDERS.RU.NL Wed Mar 10 09:56:31 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Wed, 10 Mar 2010 09:56:31 +0100 Subject: clusterstats empty cfg.neighbours, cfg.neighbours example In-Reply-To: Message-ID: Dear Masaki, I'm verry sorry for that, I introduced a bug altering clusterstat.m the day before yesterday. This was resolved yesterday afternoon, so the most recent ftp-version will work appropriately again. Sorry for the inconvenience, Best, Roemer On 3/9/2010 7:04 PM, MARUYAMA Masaki INSERM wrote: > Dear Roemer, > > > The last version of fieldtrip fails the clustering in the default option, i.e., no specification of cfg.neighbouring. Since my script works correctly until the previous version, I'm afraid that the recent change might be a causal. Could you please confirm whether the default option can still work after the change? > An error message I received is attached below. > > Thank you in advance for your kind helps. > > > Sincerely yours, > Masaki Maruyama > > > ??? Undefined function or variable "channeighbstructmat". > > Error in ==> clusterstat at 178 > posclusobs = findcluster(reshape(postailobs, [cfg.dim,1]),channeighbstructmat,cfg.minnbchan); > > Error in ==> statistics_montecarlo at 305 > [stat, cfg] = clusterstat(cfg, statrand, statobs,'issource',issource); > > Error in ==> statistics_wrapper at 275 > [stat, cfg] = statmethod(cfg, dat, cfg.design); > > Error in ==> ft_timelockstatistics at 80 > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > Error in ==> timelockstatistics at 17 > [varargout{1:nargout}] = funhandle(varargin{:}); > > > > > > > > >> -----Message d'origine----- >> De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part >> de Roemer van der Meij >> Envoyé : mardi 9 mars 2010 09:22 >> À : FIELDTRIP at NIC.SURFNET.NL >> Objet : Re: [FIELDTRIP] clusterstats empty cfg.neighbours, cfg.neighbours >> example >> >> Hi Andrea, >> >> The bug should be fixed now, and cfg.neighbours should work as intedend. >> If you use cfg.neighbours = [] in your call to freqstatistics (or >> time-lock, etc...), clustering will not be done on channels. The fix >> should be there in the latest fieldtrip version on the ftp-server (put >> there last night at 23:00 I think). >> >> Happy to help, >> >> Best, >> Roemer >> >> >> On 3/5/2010 12:27 PM, Andrea Ostendorf wrote: >> >>> Dear Roemer, >>> >>> Thanks for your advice. >>> Since I would like to use Fieldtrip for TFC data and for images, with an >>> additional cluster-over-channels option in the case of the TFC data, I >>> >> now >> >>> edited clusterstat. >>> If called from a TFC script (I introduced a field in cfg for this), it >>> >> uses >> >>> the correction you gave to Chetan, otherwise it uses the former code. >>> This appears to work and the results make sense. However, I ask myself >>> whether there is an option for managing this without editing any >>> >> Fieldtrip >> >>> functions, just by cfg options? >>> Any help would be greatly appreciated. >>> >>> Thanks! >>> All the best >>> Andrea >>> >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the >>> >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. >> >>> >> -- >> Roemer van der Meij MSc >> Scientific Programmer& Data-Analyst >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognition >> P.O. Box 9104 >> 6500 HE Nijmegen >> The Netherlands >> Tel: +31(0)24 3612631 >> E-mail: r.vandermeij at donders.ru.nl >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. >> > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > > -- Roemer van der Meij MSc Scientific Programmer& Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From saskia.haegens at DONDERS.RU.NL Wed Mar 10 10:36:11 2010 From: saskia.haegens at DONDERS.RU.NL (Saskia Haegens) Date: Wed, 10 Mar 2010 10:36:11 +0100 Subject: problem with definetrials In-Reply-To: <4B951D7F.50708@sussex.ac.uk> Message-ID: Dear Henning, I think your event value should be a number rather than a string, i.e. cfg.trialdef.eventvalue = 11; Best, Saskia > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Henning Holle > Sent: maandag 8 maart 2010 16:54 > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] problem with definetrials > > Dear list members, > > I am trying to define trials for a dataset. When I look for the events > contained in the file (like this) > > cfg = []; > cfg.dataset = 'jenna.cnt' > cfg.trialdef.eventtype = '?'; > dummy = definetrial(cfg); > > I get the following output. > > Reading Event Table... > the following events were found in the datafile > event type: 'trigger' with event values: 1 11 22 33 > no trials have been defined yet, see DEFINETRIAL for further help > found 202 events > created 0 trials > > > Now, when I want to define the trials for all 'standard' events (which > have the eventvalue '11'), > > % define trials > cfg = []; > cfg.dataset = 'jenna.cnt' > cfg.trialdef.eventtype = 'trigger' > cfg.trialdef.eventvalue = { '11' }; > cfg_standard = definetrial(cfg); > > I get the following error message. > > ??? Error using ==> cellstr at 34 > Input must be a string. > > Error in ==> cell.intersect at 44 > a = cellstr(a); > > Error in ==> trialfun_general at 114 > elseif ~isempty(intersect(event(i).value, cfg.trialdef.eventvalue)) > > Error in ==> ft_definetrial at 110 > [trl, event] = feval(cfg.trialfun, cfg); > > Error in ==> definetrial at 17 > [varargout{1:nargout}] = funhandle(varargin{:}); > > How can I solve this problem? Am I doing something wrong? (I am using > the most recent version of fieldtrip) > > Cheers, > > Henning > > -- > ************************* > Dr. Henning Holle, > Department of Psychology, > University of Sussex, > Falmer, Brighton, > BN1 9QH, U.K. > Tel. : +44 (0)1273 877240 > Fax. : +44 (0)1273 678058 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From masaki.maruyama at CEA.FR Wed Mar 10 10:51:46 2010 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Wed, 10 Mar 2010 10:51:46 +0100 Subject: clusterstats empty cfg.neighbours, cfg.neighbours example In-Reply-To: A<4B975EBF.2000609@donders.ru.nl> Message-ID: Dear Roemer, I greatly appreciate your prompt solving!! With bests, Masaki >-----Message d'origine----- >De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part >de Roemer van der Meij >Envoyé : mercredi 10 mars 2010 09:57 >À : FIELDTRIP at NIC.SURFNET.NL >Objet : Re: [FIELDTRIP] clusterstats empty cfg.neighbours, cfg.neighbours >example > >Dear Masaki, > >I'm verry sorry for that, I introduced a bug altering clusterstat.m the >day before yesterday. This was resolved yesterday afternoon, so the most >recent ftp-version will work appropriately again. > >Sorry for the inconvenience, > >Best, >Roemer > > >On 3/9/2010 7:04 PM, MARUYAMA Masaki INSERM wrote: >> Dear Roemer, >> >> >> The last version of fieldtrip fails the clustering in the default option, >i.e., no specification of cfg.neighbouring. Since my script works correctly >until the previous version, I'm afraid that the recent change might be a >causal. Could you please confirm whether the default option can still work >after the change? >> An error message I received is attached below. >> >> Thank you in advance for your kind helps. >> >> >> Sincerely yours, >> Masaki Maruyama >> >> >> ??? Undefined function or variable "channeighbstructmat". >> >> Error in ==> clusterstat at 178 >> posclusobs = findcluster(reshape(postailobs, >[cfg.dim,1]),channeighbstructmat,cfg.minnbchan); >> >> Error in ==> statistics_montecarlo at 305 >> [stat, cfg] = clusterstat(cfg, statrand, statobs,'issource',issource); >> >> Error in ==> statistics_wrapper at 275 >> [stat, cfg] = statmethod(cfg, dat, cfg.design); >> >> Error in ==> ft_timelockstatistics at 80 >> [stat, cfg] = statistics_wrapper(cfg, varargin{:}); >> >> Error in ==> timelockstatistics at 17 >> [varargout{1:nargout}] = funhandle(varargin{:}); >> >> >> >> >> >> >> >> >>> -----Message d'origine----- >>> De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la >part >>> de Roemer van der Meij >>> Envoyé : mardi 9 mars 2010 09:22 >>> À : FIELDTRIP at NIC.SURFNET.NL >>> Objet : Re: [FIELDTRIP] clusterstats empty cfg.neighbours, >cfg.neighbours >>> example >>> >>> Hi Andrea, >>> >>> The bug should be fixed now, and cfg.neighbours should work as intedend. >>> If you use cfg.neighbours = [] in your call to freqstatistics (or >>> time-lock, etc...), clustering will not be done on channels. The fix >>> should be there in the latest fieldtrip version on the ftp-server (put >>> there last night at 23:00 I think). >>> >>> Happy to help, >>> >>> Best, >>> Roemer >>> >>> >>> On 3/5/2010 12:27 PM, Andrea Ostendorf wrote: >>> >>>> Dear Roemer, >>>> >>>> Thanks for your advice. >>>> Since I would like to use Fieldtrip for TFC data and for images, with >an >>>> additional cluster-over-channels option in the case of the TFC data, I >>>> >>> now >>> >>>> edited clusterstat. >>>> If called from a TFC script (I introduced a field in cfg for this), it >>>> >>> uses >>> >>>> the correction you gave to Chetan, otherwise it uses the former code. >>>> This appears to work and the results make sense. However, I ask myself >>>> whether there is an option for managing this without editing any >>>> >>> Fieldtrip >>> >>>> functions, just by cfg options? >>>> Any help would be greatly appreciated. >>>> >>>> Thanks! >>>> All the best >>>> Andrea >>>> >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between users of >the >>>> >>> FieldTrip toolbox, to share experiences and to discuss new ideas for >MEG >>> and EEG analysis. See also >>> http://listserv.surfnet.nl/archives/fieldtrip.html and >>> http://www.ru.nl/neuroimaging/fieldtrip. >>> >>>> >>> -- >>> Roemer van der Meij MSc >>> Scientific Programmer& Data-Analyst >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognition >>> P.O. Box 9104 >>> 6500 HE Nijmegen >>> The Netherlands >>> Tel: +31(0)24 3612631 >>> E-mail: r.vandermeij at donders.ru.nl >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of >the >>> FieldTrip toolbox, to share experiences and to discuss new ideas for >MEG >>> and EEG analysis. See also >>> http://listserv.surfnet.nl/archives/fieldtrip.html and >>> http://www.ru.nl/neuroimaging/fieldtrip. >>> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >and EEG analysis. See also >http://listserv.surfnet.nl/archives/fieldtrip.html and >http://www.ru.nl/neuroimaging/fieldtrip. >> >> > >-- >Roemer van der Meij MSc >Scientific Programmer& Data-Analyst >Donders Institute for Brain, Cognition and Behaviour >Centre for Cognition >P.O. Box 9104 >6500 HE Nijmegen >The Netherlands >Tel: +31(0)24 3612631 >E-mail: r.vandermeij at donders.ru.nl > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the >FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >and EEG analysis. See also >http://listserv.surfnet.nl/archives/fieldtrip.html and >http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From aostendorf at BESA.DE Wed Mar 10 11:36:23 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Wed, 10 Mar 2010 11:36:23 +0100 Subject: clusterstats empty cfg.neighbours, cfg.neighbours example In-Reply-To: <4B975EBF.2000609@donders.ru.nl> Message-ID: Dear Roemer, thanks a lot for the bugfix! This was really quick. Clustering over neighbouring channels or not in time-frequency data now works fine. But somehow image statistics apparently does not work any more for me. I use the same data and I have tried earlier versions of my script, too, which used to work. I attach the error message. One more question: Could you tell me the correct cfg settings if I would like to use the option cfg.avgoverchan = 'yes'? I always get an error for that too, no matter how and whether I specify cfg.neighbours. Sorry if I just got the settings wrong. Thanks a lot! All the best Andrea Error message in image script: ??? Error using ==> reshape To RESHAPE the number of elements must not change. Error in ==> fieldtrip-20100309\private\clusterstat at 179 posclusobs = findcluster(reshape(postailobs, [cfg.dim,1]),channeighbstructmat,cfg.minnbchan); Error in ==> statistics_montecarlo at 305 [stat, cfg] = clusterstat(cfg, statrand, statobs,'issource',issource); Error in ==> fieldtrip-20100309\private\statistics_wrapper at 275 [stat, cfg] = statmethod(cfg, dat, cfg.design); Error in ==> ft_sourcestatistics at 103 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); Error in ==> compute_image_statistics at 148 stat = ft_sourcestatistics(cfg, sourcega1, sourcega2); Error message for averaging over channels in TF data: ??? Error using ==> fieldtrip-20100309\private\findcluster at 37 invalid dimension of spatdimneighbstructmat Error in ==> fieldtrip-20100309\private\clusterstat at 179 posclusobs = findcluster(reshape(postailobs, [cfg.dim,1]),channeighbstructmat,cfg.minnbchan); Error in ==> statistics_montecarlo at 305 [stat, cfg] = clusterstat(cfg, statrand, statobs,'issource',issource); Error in ==> fieldtrip-20100309\private\statistics_wrapper at 275 [stat, cfg] = statmethod(cfg, dat, cfg.design); Error in ==> ft_freqstatistics at 89 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); Error in ==> compute_tfc_statistics at 516 stat = ft_freqstatistics(cfg,set_1{:},set_2{:}); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From karl.doron at GMAIL.COM Wed Mar 10 14:36:49 2010 From: karl.doron at GMAIL.COM (Karl Doron) Date: Wed, 10 Mar 2010 14:36:49 +0100 Subject: single trial/channel phase angles Message-ID: Hello, I'm looking at some MEG data and have a hypothesis about cross frequency coupling. Specifically, a relationship between lower frequency phase and higher frequency amplitudes. I'm trying to save and view the phase angles after doing wavelet analysis using wltconvol. If this is implemented -great! Otherwise, it seems that somewhere after line 216 of ft_freqanalysis_wltconvol.m (after the ifft), I should be able to save the complex numbers and use angle(input) to find the phase angle of each time point on a trial by trial basis. It seems easier to do in the 'tfr' wavelet code, but the time domain covolution is very slow. Thanks for any help! Karl Doron ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jan.schoffelen at DONDERS.RU.NL Wed Mar 10 15:32:17 2010 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Wed, 10 Mar 2010 15:32:17 +0100 Subject: single trial/channel phase angles In-Reply-To: Message-ID: Hi Karl, freqanalysis with method = 'mtmconvol' allows you to keep the fourier coefficients (cfg.output = 'fourier') so you'll get a complex representation there. Best, Jan-Mathijs On Mar 10, 2010, at 2:36 PM, Karl Doron wrote: > Hello, > > I'm looking at some MEG data and have a hypothesis about cross > frequency > coupling. Specifically, a relationship between lower frequency phase > and > higher frequency amplitudes. I'm trying to save and view the phase > angles > after doing wavelet analysis using wltconvol. > > If this is implemented -great! Otherwise, it seems that somewhere > after line > 216 of ft_freqanalysis_wltconvol.m (after the ifft), I should be > able to > save the complex numbers and use angle(input) to find the phase > angle of > each time point on a trial by trial basis. It seems easier to do in > the > 'tfr' wavelet code, but the time domain covolution is very slow. > > Thanks for any help! > > Karl Doron > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > Dr. J.M. (Jan-Mathijs) Schoffelen Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: 0031-24-3668063 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From karl.doron at GMAIL.COM Wed Mar 10 19:28:45 2010 From: karl.doron at GMAIL.COM (Karl Doron) Date: Wed, 10 Mar 2010 19:28:45 +0100 Subject: single trial/channel phase angles In-Reply-To: <6825D318-71BC-48D1-BD36-5401ED05A611@donders.ru.nl> Message-ID: Hello Jan-Mathijs, I'm able to find the complex trial data now, but I've been avoiding the mtmconvol method because I don't have very good grasp on it. I'm getting phase angles greater than pi. Is there a simple way to run it on some simulated data? I'm trying to find a periodic signal at 2Hz with non-stationary gamma transients linked to its phase. Thanks for any feedback! -karl On Wed, Mar 10, 2010 at 3:32 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Karl, > > freqanalysis with method = 'mtmconvol' allows you to keep the fourier > coefficients (cfg.output = 'fourier') so you'll get a complex representation > there. > > Best, > > Jan-Mathijs > > > > On Mar 10, 2010, at 2:36 PM, Karl Doron wrote: > > Hello, >> >> I'm looking at some MEG data and have a hypothesis about cross frequency >> coupling. Specifically, a relationship between lower frequency phase and >> higher frequency amplitudes. I'm trying to save and view the phase angles >> after doing wavelet analysis using wltconvol. >> >> If this is implemented -great! Otherwise, it seems that somewhere after >> line >> 216 of ft_freqanalysis_wltconvol.m (after the ifft), I should be able to >> save the complex numbers and use angle(input) to find the phase angle of >> each time point on a trial by trial basis. It seems easier to do in the >> 'tfr' wavelet code, but the time domain covolution is very slow. >> >> Thanks for any help! >> >> Karl Doron >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. >> >> > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian.roach at YALE.EDU Wed Mar 10 19:51:39 2010 From: brian.roach at YALE.EDU (Brian Roach) Date: Wed, 10 Mar 2010 10:51:39 -0800 Subject: single trial/channel phase angles In-Reply-To: <1fc4dff91003101028i5460461bn63c1d9edb8fad448@mail.gmail.com> Message-ID: Hi Karl, You can use wltconvol if you edit it. If you step through the code, and find the spot where data are converted form complex numbers to power values, you only need to remove the abs(***) statement to keep the data in complex form. This is how we've done it, but you may have a different version of the code: if keep == 1 powdum = (2.* abs(autspctrmacttap) ./ data.fsample) .^ 2; elseif keep == 2 %this is where we retain complex values: powdum = (autspctrmacttap ./ data.fsample); end Hope this helps, Brian On 3/10/2010 10:28 AM, Karl Doron wrote: > Hello Jan-Mathijs, > > I'm able to find the complex trial data now, but I've been avoiding > the mtmconvol method because I don't have very good grasp on it. I'm > getting phase angles greater than pi. Is there a simple way to run it > on some simulated data? > > I'm trying to find a periodic signal at 2Hz with non-stationary gamma > transients linked to its phase. > > Thanks for any feedback! > > -karl > > On Wed, Mar 10, 2010 at 3:32 PM, jan-mathijs schoffelen > > > wrote: > > Hi Karl, > > freqanalysis with method = 'mtmconvol' allows you to keep the > fourier coefficients (cfg.output = 'fourier') so you'll get a > complex representation there. > > Best, > > Jan-Mathijs > > > > On Mar 10, 2010, at 2:36 PM, Karl Doron wrote: > > Hello, > > I'm looking at some MEG data and have a hypothesis about cross > frequency > coupling. Specifically, a relationship between lower frequency > phase and > higher frequency amplitudes. I'm trying to save and view the > phase angles > after doing wavelet analysis using wltconvol. > > If this is implemented -great! Otherwise, it seems that > somewhere after line > 216 of ft_freqanalysis_wltconvol.m (after the ifft), I should > be able to > save the complex numbers and use angle(input) to find the > phase angle of > each time point on a trial by trial basis. It seems easier to > do in the > 'tfr' wavelet code, but the time domain covolution is very slow. > > Thanks for any help! > > Karl Doron > > ---------------------------------- > The aim of this list is to facilitate the discussion between > users of the FieldTrip toolbox, to share experiences and to > discuss new ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > Dr. J.M. (Jan-Mathijs) Schoffelen > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: 0031-24-3668063 > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Wed Mar 10 21:57:25 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 10 Mar 2010 21:57:25 +0100 Subject: reading bdf+ files? In-Reply-To: <4B94C3B7.5090709@uni-konstanz.de> Message-ID: Hi Thomas, On 8 Mar 2010, at 10:30, Thomas Hartmann wrote: > thanks for the quick answere. > yes, bdf+ is bdf with an annotation-channel added. this channel is unlike the bdf trigger channel. so this, as i had already expected, explains the problem. > > my major motivation for using bdf+ is the availability of a ready-to-use c++ library. unfortunatly it only writes bdf+ or edf+, not the "standard" format. > > does someone know of a stable, well-documented, free library (c or c++) to write eeg-data in a format, fieldtrip can read? I would probably write it in a brainvision analyzer alike format. Although I am not aware of formal/official documentation, the file format is very simple (and widely supported). It consists of an ascii header file (*.vhdr), an ascii marker file (*.vmrk) and a binary file with the data. Although the data file is normally binary, it can also be ascii (but that makes reading it very inefficient). The ascii header file (ini-like) explains the format of the binary file, which can have different data formats (int16,32 and probably floats) and be multiplexed or not. On ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/subj2.zip you can find some example data which is used in http://fieldtrip.fcdonders.nl/tutorial/continuous. I don't know the details of that particular dataset, but probably it is pretty standard. I guess it has 64 channels 32 bit continuous recording with 5 to 10 different trigger values in it. Combined with fieldtrip/fileio/private/read_brainvision_vhdr, read_brainvision_eeg and read_brainvision_vmrk you can probably easily figure out what the file format is. Writing the two text files and a binary multiplexed file could easily be done without a C++ library. I just realised that in fieldtrip you can also export to that file format using the write_data function. Have a look in fieldtrip/fileio/private/write_brainvision_eeg for the details of the simplest format. Hmm, a more challenging problem from the C++ perspective then is to implement the accompanying *reader* for it. In Matlab that is simple, but parsing the text files in C++ and going over all possible options and sub-formats would be non-trivial in C++. You might want to have a look at http://biosig.sourceforge.net/projects.html to see whether that provides a C++ solution. best regards, Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From thomas.hartmann at UNI-KONSTANZ.DE Thu Mar 11 00:38:05 2010 From: thomas.hartmann at UNI-KONSTANZ.DE (Thomas Hartmann) Date: Thu, 11 Mar 2010 00:38:05 +0100 Subject: reading bdf+ files? In-Reply-To: Message-ID: hi robert, thanks again for the detailed answere. i have indeed already thought about the brainvision format. what makes me favor bdf is the fact that it only works with one file. renaming a brainvision-file is a problem as filenames are used to identify trigger and data files. as i got to know the bdf format quite well in the last days, i would prefere that one if its well supported in fieldtrip. i would propably have to write my own lib for that, but the format seems pretty straight forward. can you give me a hint of how triggers are stored in the "original" biosemi bdf format? from what i understood, they use an extra channel with the same samplingrate as the others, writing the trigger values as 24bit values, thus constisting of 3 bytes each. each of the byte seems to have a different meaning. do you know something about that? best regards, thomas Am 10.03.2010 21:57, schrieb Robert Oostenveld: > Hi Thomas, > > > On 8 Mar 2010, at 10:30, Thomas Hartmann wrote: > >> thanks for the quick answere. >> yes, bdf+ is bdf with an annotation-channel added. this channel is unlike the bdf trigger channel. so this, as i had already expected, explains the problem. >> >> my major motivation for using bdf+ is the availability of a ready-to-use c++ library. unfortunatly it only writes bdf+ or edf+, not the "standard" format. >> >> does someone know of a stable, well-documented, free library (c or c++) to write eeg-data in a format, fieldtrip can read? >> > > I would probably write it in a brainvision analyzer alike format. Although I am not aware of formal/official documentation, the file format is very simple (and widely supported). It consists of an ascii header file (*.vhdr), an ascii marker file (*.vmrk) and a binary file with the data. Although the data file is normally binary, it can also be ascii (but that makes reading it very inefficient). > > The ascii header file (ini-like) explains the format of the binary file, which can have different data formats (int16,32 and probably floats) and be multiplexed or not. > > On ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/subj2.zip you can find some example data which is used in http://fieldtrip.fcdonders.nl/tutorial/continuous. I don't know the details of that particular dataset, but probably it is pretty standard. I guess it has 64 channels 32 bit continuous recording with 5 to 10 different trigger values in it. Combined with fieldtrip/fileio/private/read_brainvision_vhdr, read_brainvision_eeg and read_brainvision_vmrk you can probably easily figure out what the file format is. Writing the two text files and a binary multiplexed file could easily be done without a C++ library. I just realised that in fieldtrip you can also export to that file format using the write_data function. Have a look in fieldtrip/fileio/private/write_brainvision_eeg for the details of the simplest format. > > Hmm, a more challenging problem from the C++ perspective then is to implement the accompanying *reader* for it. In Matlab that is simple, but parsing the text files in C++ and going over all possible options and sub-formats would be non-trivial in C++. You might want to have a look at http://biosig.sourceforge.net/projects.html to see whether that provides a C++ solution. > > best regards, > Robert > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > -- Dipl. Psych. Thomas Hartmann OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel.: +49 (0)7531 88 4612 Fax: +49 (0)7531-88 4601 Email: thomas.hartmann at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From karl.doron at GMAIL.COM Thu Mar 11 11:26:31 2010 From: karl.doron at GMAIL.COM (Karl Doron) Date: Thu, 11 Mar 2010 11:26:31 +0100 Subject: single trial/channel phase angles In-Reply-To: <4B97E99B.10900@ncire.org> Message-ID: Great! - thanks for the helpful information. Now I'm having trouble recovering frequencies below 6Hz using the wltconvol method. My trial time window is 3.5 seconds, so I am guessing this has to do with a minimum number of time bins left from the partial artifact rejection. Does anyone have any recommendations for setting a minimum trial length, and where I might do this? minoffset? Thanks, karl doron On Wed, Mar 10, 2010 at 7:48 PM, Brian Roach wrote: > Hi Karl, > > You can use wltconvol if you edit it. If you step through the code, and > find the spot where data are converted form complex numbers to power values, > you only need to remove the abs(***) statement to keep the data in complex > form. This is how we've done it, but you may have a different version of > the code: > > if keep == 1 > powdum = (2.* abs(autspctrmacttap) ./ data.fsample) .^ 2; > elseif keep == 2 > %this is where we retain complex values: > powdum = (autspctrmacttap ./ data.fsample); > end > > > Hope this helps, > Brian > > > > On 3/10/2010 10:28 AM, Karl Doron wrote: > > Hello Jan-Mathijs, > > I'm able to find the complex trial data now, but I've been avoiding the > mtmconvol method because I don't have very good grasp on it. I'm getting > phase angles greater than pi. Is there a simple way to run it on some > simulated data? > > I'm trying to find a periodic signal at 2Hz with non-stationary gamma > transients linked to its phase. > > Thanks for any feedback! > > -karl > > On Wed, Mar 10, 2010 at 3:32 PM, jan-mathijs schoffelen < > jan.schoffelen at donders.ru.nl> wrote: > >> Hi Karl, >> >> freqanalysis with method = 'mtmconvol' allows you to keep the fourier >> coefficients (cfg.output = 'fourier') so you'll get a complex representation >> there. >> >> Best, >> >> Jan-Mathijs >> >> >> >> On Mar 10, 2010, at 2:36 PM, Karl Doron wrote: >> >> Hello, >>> >>> I'm looking at some MEG data and have a hypothesis about cross frequency >>> coupling. Specifically, a relationship between lower frequency phase and >>> higher frequency amplitudes. I'm trying to save and view the phase angles >>> after doing wavelet analysis using wltconvol. >>> >>> If this is implemented -great! Otherwise, it seems that somewhere after >>> line >>> 216 of ft_freqanalysis_wltconvol.m (after the ifft), I should be able to >>> save the complex numbers and use angle(input) to find the phase angle of >>> each time point on a trial by trial basis. It seems easier to do in the >>> 'tfr' wavelet code, but the time domain covolution is very slow. >>> >>> Thanks for any help! >>> >>> Karl Doron >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between users of the >>> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >>> and EEG analysis. See also >>> http://listserv.surfnet.nl/archives/fieldtrip.html and >>> http://www.ru.nl/neuroimaging/fieldtrip. >>> >>> >> Dr. J.M. (Jan-Mathijs) Schoffelen >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> J.Schoffelen at donders.ru.nl >> Telephone: 0031-24-3668063 >> >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. >> > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at DONDERS.RU.NL Thu Mar 11 11:44:17 2010 From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij) Date: Thu, 11 Mar 2010 11:44:17 +0100 Subject: Label display problem with ft_topoplotER for EEG-MEG data In-Reply-To: <4b0f659b1003030616k235ffc75n4a787e1fb5095bcb@mail.gmail.com> Message-ID: Hi Lucie, Could you perhaps send the script with the relevant options you used with a bit of data so I can try to replicate the bug? If your data has to be larger than a 1 or 2 MB you can also send it my e-mail address (see signature). This would be very helpful in fixing the bug. Thanks in advance, Best, Roemer On 3/3/2010 3:16 PM, Lucie Charles wrote: > Hi everyone , > > I noticed a small bug using ft_topoplotER with my EEG-MEG data that I > think I managed to correct. > > When I try to use the option : > > /cfg.highlight = ' labels ' > /or / > cfg.marker = ' labels '/ > > I have an error message saying that it doesn't find coordinates for > some labels (see at the end for the entire message). I looked into it > and it seems that EEG channels are always in the list of channels that > the function tries to plot even if I'm trying to plot only > magnetometers for example. > > I made two small changes at the ft_topoplotER and it seems to solve > the problem : > > /line 606 > templay.label = data.label(labelindex); > /instead of > /templay.label = //channelselection(cfg.highlightchannel{icell}, > data.label);/ > > /line 631 > templay.label = data.label(labelindex); / > instead of / > templay.label = > channelselection(setdiff(1:length(data.label),highlightchansel), > data.label); > > /This solution works fine for me but I'm not sure that it will work in > any case./ > / > Still I hope it helps. > > Cheers, > > Lucie CHARLES > > > > Error Message : > > /??? Error using ==> text > Each string specified must have a corresponding set of coordinates > > Error in ==> plot_lay at 73 > text(X+labeloffset, Y+(labeloffset*1.5), Lbl,'fontsize',labelsize); > > Error in ==> ft_topoplotER at 617 > plot_lay(templay,'box','no','label',labelflg,'point','yes',... > > Error in ==> topoplotER at 17 > [varargout{1:nargout}] = funhandle(varargin{:});/ > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > -- Roemer van der Meij MSc Scientific Programmer& Data-Analyst Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3612631 E-mail: r.vandermeij at donders.ru.nl ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zaifengg at GMAIL.COM Fri Mar 12 11:07:48 2010 From: zaifengg at GMAIL.COM (gao zai) Date: Fri, 12 Mar 2010 12:07:48 +0200 Subject: Questions on High pass filter and Padding in Preprocessing Message-ID: Dear all, I am now working on the MEG data in 4D format. Since it was collected in DC, so I want to first use a bandpass filter [0.1 80] to filter my data. However, I found that the latter part of averaged results drifted away relative to the results when no filter or only a low-pass filter is used (see the attached Fig.1). I thought it may be related to the end effect, so I used cfg.padding=1, it didn't work. Latter I turned to use cfg.padding=10 (1/.1=10) it works and no obvious drift was found. However, when tried to only apply a high pass filter to the raw data, regardless of using cfg.padding=10, the results always showed a square wave (see Fig.2). And there is a warning:"Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 6.669292e-17."I don't understand why this happened. Does anybody know what is the problem with it? How can I get a right result in this case? Thank you very much. The script I used: ---------------------------------------------------- cfg=[]; cfg.dataset ='c,rfDC'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue =42; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1.5; cfg.trialdef.offset = 1; cfg.trialfun = 'mytrialfun'; cfg = definetrial(cfg); %for band pass %cfg.bpfilter='yes'; %cfg.bpfreq=[0.1 80]; %padding cfg.padding=10; %for hp filter cfg.hpfilter='yes'; %high pass filter cfg.hpfreq=0.1; %cutoff cfg.blc = 'yes'; %baseline correct cfg.blcwindow = [-0.30 -0.10]; cfg.channel={'MEG'}; [data] = preprocessing(cfg); -------------------------------- Best, Feng ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Fig1.png Type: image/png Size: 11637 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Fig.2_square wave.png Type: image/png Size: 1041 bytes Desc: not available URL: From a.wollbrink at UNI-MUENSTER.DE Fri Mar 12 11:33:28 2010 From: a.wollbrink at UNI-MUENSTER.DE (Andreas Wollbrink) Date: Fri, 12 Mar 2010 11:33:28 +0100 Subject: support for Besa Toolbox for .avr files Message-ID: Dear all, is there any reason the support for the high level input functions provided by the Besa Toolbox (by Carsten Hochstaetter) is not implemented in the besa2fieldtrip function in case using the 'besa_avr' file format even the related function readBESAavr.m does exist? For the other formats (besa_mul, besa_tfc, besa_swf, besa_src) this is realised using the hasbes(-toolbox) switch. Thanks in advance, Andreas Wollbrink -- ====================================================================== Andreas Wollbrink, Biomedical Engineer Institute for Biomagnetism and Biosignalanalysis Muenster University Hospital Malmedyweg 15 phone: +49-(0)251-83-52546 D-48149 Muenster fax: +49-(0)251-83-56874 Germany e-Mail: a.wollbrink at uni-muenster.de ====================================================================== ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From aostendorf at BESA.DE Fri Mar 12 11:52:06 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Fri, 12 Mar 2010 11:52:06 +0100 Subject: support for Besa Toolbox for .avr files In-Reply-To: <4B9A1878.5050907@uni-muenster.de> Message-ID: Dear Andreas, Thanks for noticing. readBESAavr has not been included for long. I will see to it. Best, Andrea > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Andreas Wollbrink > Sent: Freitag, 12. März 2010 11:33 > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] support for Besa Toolbox for .avr files > > Dear all, > > is there any reason the support for the high level input functions > provided by the Besa Toolbox (by Carsten Hochstaetter) is not > implemented in the besa2fieldtrip function in case using the 'besa_avr' > file format even the related function readBESAavr.m does exist? > For the other formats (besa_mul, besa_tfc, besa_swf, besa_src) this is > realised using the hasbes(-toolbox) switch. > > Thanks in advance, > Andreas Wollbrink > > -- > > > ====================================================================== > > Andreas Wollbrink, Biomedical Engineer > > Institute for Biomagnetism and Biosignalanalysis > Muenster University Hospital > > Malmedyweg 15 phone: +49-(0)251-83-52546 > D-48149 Muenster fax: +49-(0)251-83-56874 > Germany > e-Mail: a.wollbrink at uni-muenster.de > > ====================================================================== > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4937 (20100311) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From aostendorf at BESA.DE Sun Mar 14 17:26:49 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Sun, 14 Mar 2010 17:26:49 +0100 Subject: support for Besa Toolbox for .avr files In-Reply-To: <4B9A1878.5050907@uni-muenster.de> Message-ID: Dear Mr Wollbrink, In the current Fieldtrip version, readBESAavr has been implemented. Thank you for noticing the omission! Best regards Andrea Ostendorf Dr. Andrea Ostendorf Research & Development MEGIS Software GmbH Freihamer Str. 18 82166 Gräfelfing/Germany HRB München 109956 CEOs: Dr. Michael Scherg, Theodor Scherg > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Andreas Wollbrink > Sent: Freitag, 12. März 2010 11:33 > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] support for Besa Toolbox for .avr files > > Dear all, > > is there any reason the support for the high level input functions > provided by the Besa Toolbox (by Carsten Hochstaetter) is not > implemented in the besa2fieldtrip function in case using the 'besa_avr' > file format even the related function readBESAavr.m does exist? > For the other formats (besa_mul, besa_tfc, besa_swf, besa_src) this is > realised using the hasbes(-toolbox) switch. > > Thanks in advance, > Andreas Wollbrink > > -- > > > ====================================================================== > > Andreas Wollbrink, Biomedical Engineer > > Institute for Biomagnetism and Biosignalanalysis > Muenster University Hospital > > Malmedyweg 15 phone: +49-(0)251-83-52546 > D-48149 Muenster fax: +49-(0)251-83-56874 > Germany > e-Mail: a.wollbrink at uni-muenster.de > > ====================================================================== > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4937 (20100311) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From a.wollbrink at UNI-MUENSTER.DE Mon Mar 15 09:40:19 2010 From: a.wollbrink at UNI-MUENSTER.DE (Andreas Wollbrink) Date: Mon, 15 Mar 2010 09:40:19 +0100 Subject: support for Besa Toolbox for .avr files In-Reply-To: Message-ID: Dear Mrs Ostendorf, thanks for implementing the readBESAavr function. Unfortunately the code fails in case no channel labels are defined in the second row of the .avr file (which were optionally at least in previous versions of Besa). To fix the problem you may add a few lines to the besa2fieldtrip function (see below) to account for a missing 'ChannelLabels' field in the ('tmp') structure returned by 'readBESAavr': data.label = []; if isfield(tmp, 'ChannelLabels'), data.label = fixlabels(tmp.ChannelLabels); end In this case later on the channel labels have to be defined either manually by the user or they can be determined from other files (see below). dat = besa2fieldtrip(avrFile); dat.elec = read_sens(elecPosFile); if isempty(dat.label), dat.label = dat.elec.label; end Regards, Andreas Wollbrink On 03/14/10 17:26, Andrea Ostendorf wrote: > Dear Mr Wollbrink, > > In the current Fieldtrip version, readBESAavr has been implemented. Thank > you for noticing the omission! > > Best regards > Andrea Ostendorf > > Dr. Andrea Ostendorf > Research& Development > > MEGIS Software GmbH > Freihamer Str. 18 > 82166 Gräfelfing/Germany > HRB München 109956 > CEOs: Dr. Michael Scherg, Theodor Scherg > > > >> -----Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >> Behalf Of Andreas Wollbrink >> Sent: Freitag, 12. März 2010 11:33 >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: [FIELDTRIP] support for Besa Toolbox for .avr files >> >> Dear all, >> >> is there any reason the support for the high level input functions >> provided by the Besa Toolbox (by Carsten Hochstaetter) is not >> implemented in the besa2fieldtrip function in case using the 'besa_avr' >> file format even the related function readBESAavr.m does exist? >> For the other formats (besa_mul, besa_tfc, besa_swf, besa_src) this is >> realised using the hasbes(-toolbox) switch. >> >> Thanks in advance, >> Andreas Wollbrink >> >> -- >> >> >> ====================================================================== >> >> Andreas Wollbrink, Biomedical Engineer >> >> Institute for Biomagnetism and Biosignalanalysis >> Muenster University Hospital >> >> Malmedyweg 15 phone: +49-(0)251-83-52546 >> D-48149 Muenster fax: +49-(0)251-83-56874 >> Germany >> e-Mail: a.wollbrink at uni-muenster.de >> >> ====================================================================== >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. >> >> __________ Information from ESET NOD32 Antivirus, version of virus >> signature database 4937 (20100311) __________ >> >> The message was checked by ESET NOD32 Antivirus. >> >> http://www.eset.com >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -- ====================================================================== Andreas Wollbrink, Biomedical Engineer Institute for Biomagnetism and Biosignalanalysis Muenster University Hospital Malmedyweg 15 phone: +49-(0)251-83-52546 D-48149 Muenster fax: +49-(0)251-83-56874 Germany e-Mail: a.wollbrink at uni-muenster.de ====================================================================== ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From aostendorf at BESA.DE Mon Mar 15 10:26:11 2010 From: aostendorf at BESA.DE (Andrea Ostendorf) Date: Mon, 15 Mar 2010 10:26:11 +0100 Subject: support for Besa Toolbox for .avr files In-Reply-To: <4B9DF273.4090201@uni-muenster.de> Message-ID: Dear Mr Wollbrink, Thanks for noticing! I saw that read_besa_avr had a problem if the elp file did not contain the optional channel labels but omitted to test besa2fieldtrip with readBESAavr for an elp file without channel labels. Sorry about that. I just amended besa2fieldtrip using your advice. Thanks! Best regards Andrea Ostendorf > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Andreas Wollbrink > Sent: Montag, 15. März 2010 09:40 > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] support for Besa Toolbox for .avr files > > Dear Mrs Ostendorf, > > thanks for implementing the readBESAavr function. > > Unfortunately the code fails in case no channel labels are defined in > the second row of the .avr file (which were optionally at least in > previous versions of Besa). > > To fix the problem you may add a few lines to the besa2fieldtrip > function (see below) to account for a missing 'ChannelLabels' field in > the ('tmp') structure returned by 'readBESAavr': > > data.label = []; > if isfield(tmp, 'ChannelLabels'), > data.label = fixlabels(tmp.ChannelLabels); > end > > > In this case later on the channel labels have to be defined either > manually by the user or they can be determined from other files (see > below). > > dat = besa2fieldtrip(avrFile); > dat.elec = read_sens(elecPosFile); > if isempty(dat.label), dat.label = dat.elec.label; end > > > Regards, > Andreas Wollbrink > > > On 03/14/10 17:26, Andrea Ostendorf wrote: > > Dear Mr Wollbrink, > > > > In the current Fieldtrip version, readBESAavr has been implemented. > Thank > > you for noticing the omission! > > > > Best regards > > Andrea Ostendorf > > > > Dr. Andrea Ostendorf > > Research& Development > > > > MEGIS Software GmbH > > Freihamer Str. 18 > > 82166 Gräfelfing/Germany > > HRB München 109956 > > CEOs: Dr. Michael Scherg, Theodor Scherg > > > > > > > >> -----Original Message----- > >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > >> Behalf Of Andreas Wollbrink > >> Sent: Freitag, 12. März 2010 11:33 > >> To: FIELDTRIP at NIC.SURFNET.NL > >> Subject: [FIELDTRIP] support for Besa Toolbox for .avr files > >> > >> Dear all, > >> > >> is there any reason the support for the high level input functions > >> provided by the Besa Toolbox (by Carsten Hochstaetter) is not > >> implemented in the besa2fieldtrip function in case using the 'besa_avr' > >> file format even the related function readBESAavr.m does exist? > >> For the other formats (besa_mul, besa_tfc, besa_swf, besa_src) this is > >> realised using the hasbes(-toolbox) switch. > >> > >> Thanks in advance, > >> Andreas Wollbrink > >> > >> -- > >> > >> > >> ====================================================================== > >> > >> Andreas Wollbrink, Biomedical Engineer > >> > >> Institute for Biomagnetism and Biosignalanalysis > >> Muenster University Hospital > >> > >> Malmedyweg 15 phone: +49-(0)251-83-52546 > >> D-48149 Muenster fax: +49-(0)251-83-56874 > >> Germany > >> e-Mail: a.wollbrink at uni-muenster.de > >> > >> ====================================================================== > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users of > the > >> FieldTrip toolbox, to share experiences and to discuss new ideas for > MEG > >> and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > >> > >> __________ Information from ESET NOD32 Antivirus, version of virus > >> signature database 4937 (20100311) __________ > >> > >> The message was checked by ESET NOD32 Antivirus. > >> > >> http://www.eset.com > >> > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas for > MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > -- > > > ====================================================================== > > Andreas Wollbrink, Biomedical Engineer > > Institute for Biomagnetism and Biosignalanalysis > Muenster University Hospital > > Malmedyweg 15 phone: +49-(0)251-83-52546 > D-48149 Muenster fax: +49-(0)251-83-56874 > Germany > e-Mail: a.wollbrink at uni-muenster.de > > ====================================================================== > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4940 (20100312) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jonas at OBLESER.DE Tue Mar 16 09:29:39 2010 From: jonas at OBLESER.DE (Jonas Obleser) Date: Tue, 16 Mar 2010 09:29:39 +0100 Subject: depsampregrT: no difference between contrasts? Message-ID: Hello FTs, here comes a question concerning the wonderful stats function depsampregrT I am using it mainly for running time–frequency–electrode cluster tests. I usually use contrasts like cfg.contrastcoefs=[-3 -1 1 3] and it has proven pretty powerful. With a new data set, I sadly have only three levels of data, which is of course always a bit of a pain for linear contrasts. What puzzles me is that [-2 -1 3] (i.e., linear increase; trying to keep it zero-weighted) and [-1 2 -1] (i.e. trying to crudely model an inverse u-shape relationship) give the very same result (not exactly numerically, but very much in terms of clusters, down to very similar p-values, etc). Q: Any idea why this might be the case? Of course, linear and cubic trends can be sometimes both significant, but I was slightly worried seeing this strong concordance in this case. (Also, does any of you have a better/best/gold standard way to model 3-level linear contrasts? mathematically, in [-1 0 1], the middle condition is basically switched off, isn’t it.) Anyway, thanks very much for a quick reply! Best wishes, Jonas http://jonasobleser.com +49 171 6993337 mobile +49 341 304 7980 home ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at DONDERS.RU.NL Wed Mar 17 10:56:47 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 17 Mar 2010 10:56:47 +0100 Subject: depsampregrT: no difference between contrasts? In-Reply-To: Message-ID: Dear Jonas, here comes a question concerning the wonderful stats function depsampregrT I am using it mainly for running time–frequency–electrode cluster tests. I usually use contrasts like cfg.contrastcoefs=[-3 -1 1 3] and it has proven pretty powerful. With a new data set, I sadly have only three levels of data, which is of course always a bit of a pain for linear contrasts. What puzzles me is that [-2 -1 3] (i.e., linear increase; trying to keep it zero-weighted) and [-1 2 -1] (i.e. trying to crudely model an inverse u-shape relationship) give the very same result (not exactly numerically, but very much in terms of clusters, down to very similar p-values, etc). Q: Any idea why this might be the case? Of course, linear and cubic trends can be sometimes both significant, but I was slightly worried seeing this strong concordance in this case. (Also, does any of you have a better/best/gold standard way to model 3-level linear contrasts? mathematically, in [-1 0 1], the middle condition is basically switched off, isn’t it.) I’m not sure, but it may reflect a property in your data. If the first two levels show about the same mean physiological response and only the third level differs, then your observation is what you should expect. Best, Anyway, thanks very much for a quick reply! Best wishes, Jonas http://jonasobleser.com +49 171 6993337 mobile +49 341 304 7980 home ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ElisabethSusanne.May at UNI-DUESSELDORF.DE Thu Mar 18 09:51:01 2010 From: ElisabethSusanne.May at UNI-DUESSELDORF.DE (Elisabeth May) Date: Thu, 18 Mar 2010 09:51:01 +0100 Subject: questions on ICA to remove EOG artifacts from MEG data Message-ID: Dear Fieldtrip users, I am trying to use independent component analysis (ft_componentanalysis) to remove eye artifacts from my MEG data. The dataset was recorded with the Neuromag 306 system and contains two conditions with 40 trials each (one where a painful laser stimulation was applied to the subject's right hand and one where the same stimulation was applied to the left hand). So far, I am trying to do the ICA just for the gradiometers on preprocessed data (after removal of bad channels) and then plotting the topographies of the components to identify and then reject components representing the eye artifacts (as suggested in the example script on the Fieldtrip webpage). I have used different settings with the default option cfg.method = 'runica' (no PCA before ICA, different numbers of principal components to be retained (cfg.runica.pca), both conditions sepparately and together...). However, I have never gotten component topographies that I can clearly identify as components representing eye artifacts (showing two sources right above the eyes), although there are almost 200 eye artifacts in the 80 trials of this data set (i.e. there was usually more than one EOG artifact in every single trial). So I am still wondering about a few questions on the exact settings for the ICA in my case and if I am missing something really obvious: * Is it correct to do the ICA on both horizontal and vertical gradiometers together and then plot them sepparately to identify artifacts? * Should I do the PCA before the ICA and if so, how many principal components should I retain? * Should I do the ICA on both conditions together or sepparately (since I expect different sources to be activated in both conditions, e.g. one of the two primary somatsensory cortices activated according to stimulation of the right or left hand)? * Is it accurate enough to use complete trials for the component analysis or do I have to extract and use just the parts containing EOG artifacts? * And finally, are the component topographies usually sufficient to identify eye artifacts? Any help or advise on this would be greatly appreciated! Thanks in advance, Elisabeth -- Dipl.-Psych. Elisabeth May Universitätsklinikum Düsseldorf Institut für Klinische Neurowissenschaften und Medizinische Psychologie Universitätsstr. 1 40225 Düsseldorf Tel: +49 211 81-18075 http://www.uniklinik-duesseldorf.de/med-psychologie ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From h.holle at SUSSEX.AC.UK Thu Mar 18 18:58:55 2010 From: h.holle at SUSSEX.AC.UK (Henning Holle) Date: Thu, 18 Mar 2010 17:58:55 +0000 Subject: artifact rejection of continuous data in fieldtrip Message-ID: Dear list members, I have a more general question about how continuous data is treated in fieldtrip. After playing around with the package for a bit, I noticed that although using continuous data is in principle supported, sooner or later one always runs into a dead-end, because most functions assume that trials are defined very early on in the processing tree (i.e., they don't work without a cfg.trl present). For instance, most artifact rejection functions seem to work only on epoched data. I have used EEProbe previously, and what I quite liked about that program was that is was possible to do artifact rejection once for the continuous data set, and subsequently one was free to define trials however one wanted to. In contrast, in fieldtrip one is forced to do a new artifact rejection (which is very time-consuming!), when one chooses to analyse the ERPs time-locked to a different event. Or am I missing something here? Is there a possibility to do an artifact rejction before the data is cut into epochs? Best wishes Henning -- ************************* Dr. Henning Holle, Department of Psychology, University of Sussex, Falmer, Brighton, BN1 9QH, U.K. Tel. : +44 (0)1273 877240 Fax. : +44 (0)1273 678058 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From masaki.maruyama at CEA.FR Thu Mar 18 19:26:20 2010 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Thu, 18 Mar 2010 19:26:20 +0100 Subject: questions on ICA to remove EOG artifacts from MEG data In-Reply-To: A<4BA1E975.3080101@uni-duesseldorf.de> Message-ID: Dear Elisabeth, I am a person who uses the ICA to Neuromag data. As far as I understand your data, at least one blink component should be found with the typical blink-topography. My first impression is that you might separate latitude and longitude gradiometers incorrectly in plotting topographies. Have you already obtained reasonable topographies with your script? If it is not the case, it will be difficult for me to give you appropriate suggestions. > * Is it correct to do the ICA on both horizontal and vertical > gradiometers together and then plot them sepparately to identify > artifacts? I don't see any theoretical reason why we must do separately. Indeed, I apply ICA both gradiometers (GMs) and magnetometers (MMs) together. As far as I examined details for few subjects' results, its performance becomes more stable than ICA to GMs alone. To apply ICA together, GMs and MMs must be I normalised separately before ICA, since the scale of signals is different between these types of sensors and Neuromag data often need PCA before ICA (Please see my response to the next question). After the ICA, I inversely normalized to recover the original scales. > * Should I do the PCA before the ICA and if so, how many principal > components should I retain? I would say YES to users of 306ch Neuromag system. Without reducing the number of decomposing components, ICA results often contain complex values. Probably it is because the number of components to be decomposed (306) is too large relative to the number of actual components in MEG data. I always use PCA to reduce the components from 306 to around 80. If you applied SST in addition to SSS using Maxfilter (Neuromag preprocessing software), you may need to reduce more. > * Should I do the ICA on both conditions together or sepparately > (since I expect different sources to be activated in both > conditions, e.g. one of the two primary somatsensory cortices > activated according to stimulation of the right or left hand)? Arguments on this issue will be very similar to those on the optimization of spatial filter in beamformer (common across conditions <--> separately). You will find out advantages/disadvantages on the fieldtrip website. I use common ICA, since it avoids a risk of removing different noise components from different conditions. > * Is it accurate enough to use complete trials for the component > analysis or do I have to extract and use just the parts containing > EOG artifacts? I would recommend doing the standard method explained on the fieldtrip website: Decompose MEG data of whole trials and get topography components -> Decompose the segmented data using the topography components. > * And finally, are the component topographies usually sufficient to > identify eye artifacts? I think the usage of topographies alone does not highlight advantages of ICA. ICA decomposes data so that temporal independency between components becomes maximum, whereas PCA decomposes so that topographies of components are orthogonal to each other. Therefore, the timing of EOG noises is much helpful to identify in ICA. Sincerely yours, Masaki Maruyama >-----Message d'origine----- >De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part >de Elisabeth May >Envoyé : jeudi 18 mars 2010 09:51 >À : FIELDTRIP at NIC.SURFNET.NL >Objet : [FIELDTRIP] questions on ICA to remove EOG artifacts from MEG data > >Dear Fieldtrip users, > >I am trying to use independent component analysis (ft_componentanalysis) >to remove eye artifacts from my MEG data. The dataset was recorded with >the Neuromag 306 system and contains two conditions with 40 trials each >(one where a painful laser stimulation was applied to the subject's >right hand and one where the same stimulation was applied to the left >hand). So far, I am trying to do the ICA just for the gradiometers on >preprocessed data (after removal of bad channels) and then plotting the >topographies of the components to identify and then reject components >representing the eye artifacts (as suggested in the example script on >the Fieldtrip webpage). I have used different settings with the default >option cfg.method = 'runica' (no PCA before ICA, different numbers of >principal components to be retained (cfg.runica.pca), both conditions >sepparately and together...). However, I have never gotten component >topographies that I can clearly identify as components representing eye >artifacts (showing two sources right above the eyes), although there are >almost 200 eye artifacts in the 80 trials of this data set (i.e. there >was usually more than one EOG artifact in every single trial). So I am >still wondering about a few questions on the exact settings for the ICA >in my case and if I am missing something really obvious: > > * Is it correct to do the ICA on both horizontal and vertical > gradiometers together and then plot them sepparately to identify > artifacts? > * Should I do the PCA before the ICA and if so, how many principal > components should I retain? > * Should I do the ICA on both conditions together or sepparately > (since I expect different sources to be activated in both > conditions, e.g. one of the two primary somatsensory cortices > activated according to stimulation of the right or left hand)? > * Is it accurate enough to use complete trials for the component > analysis or do I have to extract and use just the parts containing > EOG artifacts? > * And finally, are the component topographies usually sufficient to > identify eye artifacts? > >Any help or advise on this would be greatly appreciated! Thanks in advance, >Elisabeth > > >-- >Dipl.-Psych. Elisabeth May > >Universitätsklinikum Düsseldorf >Institut für Klinische Neurowissenschaften und Medizinische Psychologie >Universitätsstr. 1 >40225 Düsseldorf > >Tel: +49 211 81-18075 > >http://www.uniklinik-duesseldorf.de/med-psychologie > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the >FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >and EEG analysis. See also >http://listserv.surfnet.nl/archives/fieldtrip.html and >http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From h.holle at SUSSEX.AC.UK Thu Mar 18 19:54:42 2010 From: h.holle at SUSSEX.AC.UK (Henning Holle) Date: Thu, 18 Mar 2010 18:54:42 +0000 Subject: impossible to call definetrials after preprocessing? Message-ID: Dear list members, I have an EEG data set, for which I prepared the EOG channels for artifact rejection and referenced the EEG data to linked mastoids (as described here http://fieldtrip.fcdonders.nl/example/re-referencing). I thought I'd do this once at the beginning, save the dataset to disk, and then continue with definetrials. However, definetrials only seems to be able read raw data, not the matlab data set I created by the re-rereferencing procedure. Does that mean that I can only prepare EOG channels and re-rereferencing after calling definetrials? (which would duplicate a lot of code...) Or is there also another of doing this that involves less duplication of code? Many thanks in advance, Henning -- ************************* Dr. Henning Holle, Department of Psychology, University of Sussex, Falmer, Brighton, BN1 9QH, U.K. Tel. : +44 (0)1273 877240 Fax. : +44 (0)1273 678058 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From matthew.mollison at COLORADO.EDU Thu Mar 18 20:13:04 2010 From: matthew.mollison at COLORADO.EDU (Matt Mollison) Date: Thu, 18 Mar 2010 13:13:04 -0600 Subject: artifact rejection of continuous data in fieldtrip In-Reply-To: <4BA269DF.4050400@sussex.ac.uk> Message-ID: Dr. Holle, In initially learning to use FieldTrip I set up a script to do artifact detection/rejection on continuous data, but I have since switched to segmented processing because, as you say, it is just easier to deal with segmented trials. The way I coded it is as follows, but I cannot be sure that it is correct because I did not extensively compare continuous to segmented preprocessing. This does artifact detection before epoching (which is the time consuming part, especially on continuous data), and the actual rejection occurs after defining events. Playing around with different epochs does not sound as easy as you describe for EEProbe, but I think the nature of the FT data structure prevents what you are looking for from happening (i.e., the actual data is stored in the struct and is not just referencing a continuous file). If anyone has suggestions or corrections, I would like to hear them as well. 1. Read in the continuous data. 2. Read in electrode locations. 3. Set up EOG vertical and horizontal channels and append them to the data. 4. Lowpass and line noise (DFT) filter. 5. Use eventtype = '?' and trialfun = 'trialfun_general' in ft_definetrial, and then define 1 big trial by manually set the resulting cfg's trl field to be [1 length(data.time{1}) 0]; then run ft_preprocessing with the cfg that has the modified trl field. 6. Detect artifacts across the continuous data using whichever functions are appropriate. Note: Use a unique name for the resulting cfg as it is used later; do not reject artifacts yet. I start a for loop here for each event type; this contains steps 7–10. 7. Use ft_definetrial with your own trialfun to get a cfg and then ft_redefinetrial to get the data in trial format. 8. Use ft_rejectartifact with the cfg from step 6, and then ft_preprocessing to get the trials without artifacts. 9. Finish with any remaining preprocessing (rereference, baseline correction, etc.). 10. Store this event type in a struct, indexed by the number of event types for this subject. I hope that helps. Again, any improvements on this would be interesting to hear. Maybe a FT wiki page could be made describing this process. Matt -- Univ. of Colorado at Boulder Dept. of Psychology and Neuroscience matthew.mollison at colorado.edu http://psych.colorado.edu/~mollison/ On Thu, Mar 18, 2010 at 11:58 AM, Henning Holle wrote: > Dear list members, > > I have a more general question about how continuous data is treated in > fieldtrip. After playing around with the package for a bit, I noticed that > although using continuous data is in principle supported, sooner or later > one always runs into a dead-end, because most functions assume that trials > are defined very early on in the processing tree (i.e., they don't work > without a cfg.trl present). For instance, most artifact rejection functions > seem to work only on epoched data. > > I have used EEProbe previously, and what I quite liked about that program > was that is was possible to do artifact rejection once for the continuous > data set, and subsequently one was free to define trials however one wanted > to. In contrast, in fieldtrip one is forced to do a new artifact rejection > (which is very time-consuming!), when one chooses to analyse the ERPs > time-locked to a different event. Or am I missing something here? > > Is there a possibility to do an artifact rejction before the data is cut > into epochs? > > Best wishes > > Henning > > -- > ************************* > Dr. Henning Holle, > Department of Psychology, > University of Sussex, > Falmer, Brighton, > BN1 9QH, U.K. > Tel. : +44 (0)1273 877240 > Fax. : +44 (0)1273 678058 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at MAC.COM Thu Mar 18 21:32:46 2010 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Thu, 18 Mar 2010 21:32:46 +0100 Subject: artifact rejection of continuous data in fieldtrip In-Reply-To: <4BA269DF.4050400@sussex.ac.uk> Message-ID: dear henning, is this what you want? http://sccn.ucsd.edu/wiki/Chapter_01:_Rejecting_Artifacts#Rejecting_artifacts_in_continuous_data you could then do some preprocessing in eeglab, epoch the data and the get your data into fieldtrip via eeglab2fieldtrip.m. good luck, nathan On 18.03.2010, at 18:58, Henning Holle wrote: > Dear list members, > > I have a more general question about how continuous data is treated in fieldtrip. After playing around with the package for a bit, I noticed that although using continuous data is in principle supported, sooner or later one always runs into a dead-end, because most functions assume that trials are defined very early on in the processing tree (i.e., they don't work without a cfg.trl present). For instance, most artifact rejection functions seem to work only on epoched data. > > I have used EEProbe previously, and what I quite liked about that program was that is was possible to do artifact rejection once for the continuous data set, and subsequently one was free to define trials however one wanted to. In contrast, in fieldtrip one is forced to do a new artifact rejection (which is very time-consuming!), when one chooses to analyse the ERPs time-locked to a different event. Or am I missing something here? > > Is there a possibility to do an artifact rejction before the data is cut into epochs? > > Best wishes > > Henning > > -- > ************************* > Dr. Henning Holle, > Department of Psychology, > University of Sussex, > Falmer, Brighton, > BN1 9QH, U.K. > Tel. : +44 (0)1273 877240 > Fax. : +44 (0)1273 678058 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------------------------------------- Dr. Nathan Weisz OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 45 84 Email: nathan.weisz at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "Nothing shocks me. I'm a scientist." (Indiana Jones) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lhunt at FMRIB.OX.AC.UK Thu Mar 18 21:51:29 2010 From: lhunt at FMRIB.OX.AC.UK (Laurence Hunt) Date: Thu, 18 Mar 2010 20:51:29 +0000 Subject: questions on ICA to remove EOG artifacts from MEG data In-Reply-To: <4BA1E975.3080101@uni-duesseldorf.de> Message-ID: Dear Elisabeth, I'm not very experienced with using ICA nor with using fieldtrip, but I do have some experience of obtaining reliable eyeblink spatial topographies from Neuromag 306 data (using SPM), so I thought I'd chip in with some advice... On 18 Mar 2010, at 08:51, Elisabeth May wrote: > Dear Fieldtrip users, > > I am trying to use independent component analysis (ft_componentanalysis) to remove eye artifacts from my MEG data. The dataset was recorded with the Neuromag 306 system and contains two conditions with 40 trials each (one where a painful laser stimulation was applied to the subject's right hand and one where the same stimulation was applied to the left hand). So far, I am trying to do the ICA just for the gradiometers on preprocessed data (after removal of bad channels) and then plotting the topographies of the components to identify and then reject components representing the eye artifacts (as suggested in the example script on the Fieldtrip webpage). I have used different settings with the default option cfg.method = 'runica' (no PCA before ICA, different numbers of principal components to be retained (cfg.runica.pca), both conditions sepparately and together...). However, I have never gotten component topographies that I can clearly identify as components representing eye artifacts (showing two sources right above the eyes), although there are almost 200 eye artifacts in the 80 trials of this data set (i.e. there was usually more than one EOG artifact in every single trial). So I am still wondering about a few questions on the exact settings for the ICA in my case and if I am missing something really obvious: > > * Is it correct to do the ICA on both horizontal and vertical > gradiometers together and then plot them sepparately to identify > artifacts? Yes, this sounds sensible - there should be covariance across horizontal and vertical gradiometers during an eyeblink, which should help you in isolating a component, but of course they will have a very different spatial topography, which means you would want to plot them separately. I have attached a snapshot of an eyeblink component that I identified, in vertical and horizontal gradiometers (top left and top right), magnetometers (bottom left), and 60 EEG sensors (bottom right). Note that I didn't obtain this component with ICA, but with PCA of an 'average eyeblink' (see below). > * Should I do the PCA before the ICA and if so, how many principal > components should I retain? > * Should I do the ICA on both conditions together or sepparately > (since I expect different sources to be activated in both > conditions, e.g. one of the two primary somatsensory cortices > activated according to stimulation of the right or left hand)? > * Is it accurate enough to use complete trials for the component > analysis or do I have to extract and use just the parts containing > EOG artifacts? In my (limited) experience, I have had good success identifying eyeblink components with a slightly simpler method than ICA. I epoch the data with respect to well-identified eyeblinks (detected using EOG), then create an 'average eyeblink' using these epochs, so that I know what the timecourse of an eyeblink should look on average look like. I then just run a simple PCA on this 'average eyeblink', and normally the eyeblink is well captured by the first (and sometimes second) spatial component of this PCA. I then use this PCA map just as you might use an ICA map, i.e. regress it out of the raw (original) data. As a sanity check, you can correlate the timecourse of this component against the EOG channel, and this should correlate quite nicely. You can also try recomputing the average eyeblink after you have regressed the component out of the data, in order to see that it has been effective in removing most of the artefact. I find this a bit simpler than ICA, and maybe comes with a few advantages. First, it doesn't use all the data to derive the components, only the data epoched around EOG-detected eyeblinks, so it is quite a bit faster on big datasets. Second, by creating an average eyeblink, it removes any variability in the data driven by other boring stuff (like the brain :) ), so it should pretty much always be the component which explains the most variance in the 'average' eyeblink (i.e. the first principal component). Finally, it is important to note that although the method requires you to detect some eyeblinks using the EOG channel, it is still robust against you failing to detect all eyeblinks, as the regression is done on the raw data, rather than just on the epochs where you have already detected the blinks. However, there are some caveats; the first being that you assume that all eyeblinks look similar (in my experience they do), and perhaps more importantly that the component doesn't change (spatially) during the course of the experiment - with Neuromag data, you might be able to get around this to some extent by using Maxfilter for movement compensation. I think these caveats both also apply to ICA, but I'd be interested to hear other people's thoughts (particularly those who have more experience with ICA). Finally, I guess if you are interested in isolating interesting (brain) signals as well as boring (noise) signals simultaneously, then ICA is the way to go. I use this method just to remove eyeblinks before I do subsequent processing. > * And finally, are the component topographies usually sufficient to > identify eye artifacts? > I find with this method they are very easy to identify, and I imagine they would be reasonably straightforward in ICA also? Again, perhaps someone with more ICA experience can comment... > Any help or advise on this would be greatly appreciated! Thanks in advance, > Elisabeth > > Hope this helps, Laurence =========================================== Laurence Hunt, DPhil Student Centre for Functional MRI of the Brain (FMRIB), University of Oxford lhunt at fmrib.ox.ac.uk Phone: (+44)1865-(2)22738 =========================================== ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: blinkcomp.jpeg Type: image/jpg Size: 133395 bytes Desc: not available URL: From brian.roach at YALE.EDU Thu Mar 18 22:38:24 2010 From: brian.roach at YALE.EDU (Brian Roach) Date: Thu, 18 Mar 2010 14:38:24 -0700 Subject: research jobs in San Francisco, CA Message-ID: Dear fieldtrip users, We are hiring for multiple positions in our San Francisco-based schizophrenia brain-imaging EEG research lab. Please visit the links below for additional details: http://jobs-ncire.icims.com/jobs/1504/job http://jobs-ncire.icims.com/jobs/1505/job Thank you, Brian ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.toffanin at RUG.NL Fri Mar 19 08:28:11 2010 From: p.toffanin at RUG.NL (Paolo Toffanin) Date: Fri, 19 Mar 2010 08:28:11 +0100 Subject: impossible to call definetrials after preprocessing? In-Reply-To: <4BA276F2.3060109@sussex.ac.uk> Message-ID: Call 'define' trial first and then use 'redefinetrial' HTH Paolo On Thursday 18 March 2010 07:54:42 pm you wrote: > Dear list members, > > I have an EEG data set, for which I prepared the EOG channels for > artifact rejection and referenced the EEG data to linked mastoids (as > described here http://fieldtrip.fcdonders.nl/example/re-referencing). > > I thought I'd do this once at the beginning, save the dataset to disk, > and then continue with definetrials. However, definetrials only seems to > be able read raw data, not the matlab data set I created by the > re-rereferencing procedure. Does that mean that I can only prepare EOG > channels and re-rereferencing after calling definetrials? (which would > duplicate a lot of code...) Or is there also another of doing this that > involves less duplication of code? > > Many thanks in advance, > > Henning ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From ElisabethSusanne.May at UNI-DUESSELDORF.DE Fri Mar 19 10:01:16 2010 From: ElisabethSusanne.May at UNI-DUESSELDORF.DE (Elisabeth May) Date: Fri, 19 Mar 2010 10:01:16 +0100 Subject: questions on ICA to remove EOG artifacts from MEG data In-Reply-To: Message-ID: Dear Masaki, dear Laurence, thank you a lot for your really quick and extensive replies to my long list of questions! Masaki, you are right with your first point: so far I am not completely sure that my plotting scripts correctly sepparates the two gradiometer types. I do get the same results with my plotting function and ft_topoplotIC. However, I use my own layout files for horizontal and vertical gradiometers in both functions so there might be something wrong with the layout files. I'll check those again to be sure. I'll also try to scale gradiometers and magnetometers and do ICA on all sensors together. Laurence, thank you for the plots, they will give me a better idea of what to look for! I only want to use ICA to remove artifacts from my data so I guess I might try the approach you suggested, too. I'll let you know as soon as I make any progress with my data! Thanks again and best wishes, Elisabeth > Dear Elisabeth, > > I'm not very experienced with using ICA nor with using fieldtrip, but > I do have some experience of obtaining reliable eyeblink spatial > topographies from Neuromag 306 data (using SPM), so I thought I'd chip > in with some advice... > > On 18 Mar 2010, at 08:51, Elisabeth May wrote: > >> Dear Fieldtrip users, >> >> I am trying to use independent component analysis >> (ft_componentanalysis) to remove eye artifacts from my MEG data. The >> dataset was recorded with the Neuromag 306 system and contains two >> conditions with 40 trials each (one where a painful laser stimulation >> was applied to the subject's right hand and one where the same >> stimulation was applied to the left hand). So far, I am trying to do >> the ICA just for the gradiometers on preprocessed data (after removal >> of bad channels) and then plotting the topographies of the components >> to identify and then reject components representing the eye artifacts >> (as suggested in the example script on the Fieldtrip webpage). I have >> used different settings with the default option cfg.method = 'runica' >> (no PCA before ICA, different numbers of principal components to be >> retained (cfg.runica.pca), both conditions sepparately and >> together...). However, I have never gotten component topographies >> that I can clearly identify as components representing eye artifacts >> (showing two sources right above the eyes), although there are almost >> 200 eye artifacts in the 80 trials of this data set (i.e. there was >> usually more than one EOG artifact in every single trial). So I am >> still wondering about a few questions on the exact settings for the >> ICA in my case and if I am missing something really obvious: >> >> * Is it correct to do the ICA on both horizontal and vertical >> gradiometers together and then plot them sepparately to identify >> artifacts? > > Yes, this sounds sensible - there should be covariance across > horizontal and vertical gradiometers during an eyeblink, which should > help you in isolating a component, but of course they will have a very > different spatial topography, which means you would want to plot them > separately. I have attached a snapshot of an eyeblink component that I > identified, in vertical and horizontal gradiometers (top left and top > right), magnetometers (bottom left), and 60 EEG sensors (bottom > right). Note that I didn't obtain this component with ICA, but with > PCA of an 'average eyeblink' (see below). > >> * Should I do the PCA before the ICA and if so, how many principal >> components should I retain? >> * Should I do the ICA on both conditions together or sepparately >> (since I expect different sources to be activated in both >> conditions, e.g. one of the two primary somatsensory cortices >> activated according to stimulation of the right or left hand)? >> * Is it accurate enough to use complete trials for the component >> analysis or do I have to extract and use just the parts containing >> EOG artifacts? > > In my (limited) experience, I have had good success identifying > eyeblink components with a slightly simpler method than ICA. I epoch > the data with respect to well-identified eyeblinks (detected using > EOG), then create an 'average eyeblink' using these epochs, so that I > know what the timecourse of an eyeblink should look on average look > like. I then just run a simple PCA on this 'average eyeblink', and > normally the eyeblink is well captured by the first (and sometimes > second) spatial component of this PCA. I then use this PCA map just as > you might use an ICA map, i.e. regress it out of the raw (original) > data. As a sanity check, you can correlate the timecourse of this > component against the EOG channel, and this should correlate quite > nicely. You can also try recomputing the average eyeblink after you > have regressed the component out of the data, in order to see that it > has been effective in removing most of the artefact. > > I find this a bit simpler than ICA, and maybe comes with a few > advantages. First, it doesn't use all the data to derive the > components, only the data epoched around EOG-detected eyeblinks, so it > is quite a bit faster on big datasets. Second, by creating an average > eyeblink, it removes any variability in the data driven by other > boring stuff (like the brain :) ), so it should pretty much always be > the component which explains the most variance in the 'average' > eyeblink (i.e. the first principal component). Finally, it is > important to note that although the method requires you to detect > /some/ eyeblinks using the EOG channel, it is still robust against you > failing to detect /all/ eyeblinks, as the regression is done on the > raw data, rather than just on the epochs where you have already > detected the blinks. > > However, there are some caveats; the first being that you assume that > all eyeblinks look similar (in my experience they do), and perhaps > more importantly that the component doesn't change (spatially) during > the course of the experiment - with Neuromag data, you might be able > to get around this to some extent by using Maxfilter for movement > compensation. I think these caveats both also apply to ICA, but I'd be > interested to hear other people's thoughts (particularly those who > have more experience with ICA). Finally, I guess if you are interested > in isolating interesting (brain) signals as well as boring (noise) > signals simultaneously, then ICA is the way to go. I use this method > just to remove eyeblinks before I do subsequent processing. > >> * And finally, are the component topographies usually sufficient to >> identify eye artifacts? >> > > I find with this method they are very easy to identify, and I imagine > they would be reasonably straightforward in ICA also? Again, perhaps > someone with more ICA experience can comment... > >> Any help or advise on this would be greatly appreciated! Thanks in >> advance, >> Elisabeth >> >> > > Hope this helps, > Laurence > > > =========================================== > Laurence Hunt, DPhil Student > Centre for Functional MRI of the Brain (FMRIB), > University of Oxford > lhunt at fmrib.ox.ac.uk > Phone: (+44)1865-(2)22738 > =========================================== > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > -- Dipl.-Psych. Elisabeth May Universitätsklinikum Düsseldorf Institut für Klinische Neurowissenschaften und Medizinische Psychologie Universitätsstr. 1 40225 Düsseldorf Tel: +49 211 81-18075 http://www.uniklinik-duesseldorf.de/med-psychologie ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Fri Mar 19 11:21:02 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 19 Mar 2010 11:21:02 +0100 Subject: Questions on High pass filter and Padding in Preprocessing In-Reply-To: Message-ID: Dear Feng, On 12 Mar 2010, at 11:07, gao zai wrote: > I am now working on the MEG data in 4D format. Since it was > collected in DC, so I want to first use a bandpass filter [0.1 80] > to filter my data. However, I found that the latter part of averaged > results drifted away relative to the results when no filter or only > a low-pass filter is used (see the attached Fig.1). I thought it may > be related to the end effect, so I used cfg.padding=1, it didn't work. the padding option in ft_preprocessing pads the data _to_ the specified length, not _with_ the indicated length. In your case according to the figure the trial was ~2.5 seconds long, i.e. already longer than 1 second, so cfg.padding=1 did not have an efefct (whereas cfg.padding=10 does). > Latter I turned to use cfg.padding=10 (1/.1=10) it works and no > obvious drift was found. > > However, when tried to only apply a high pass filter to the raw > data, regardless of using cfg.padding=10, the results always showed > a square wave (see Fig.2). And there is a warning:"Matrix is close > to singular or badly scaled. Results may be inaccurate. RCOND = > 6.669292e-17."I don't understand why this happened. Does anybody > know what is the problem with it? How can I get a right result in > this case? Thank you very much. You specified cfg.hpfreq=0.1, i.e. that frequencies below 0.1 Hz should be removed. These frequencies correspond to dripfts in the data of about 10 seconds. The data segment you are working with is only 2.5 seconds, so removing the 10 second drift fails. You can increase the cfg.hpfreq to around 1/2.5 = 0.4 Hz, which would be the lowest frequency that can be estimated from the 2.5 second data segment. Alternatively, you could use the following pipeline cfg=[]; cfg.dataset ='c,rfDC'; cfg.continuous = 'yes'; cfg.hpfilter = 'yes'; cfg.hpfreq = 0.1; datacnt = ft_preprocessing(cfg); to read it into memory as one continuous segment, and apply the filter on the complete data. Then you can do cfg=[]; cfg.dataset ='c,rfDC'; cfg.trialdef.eventtype = 'TRIGGER'; cfg.trialdef.eventvalue =42; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1.5; cfg.trialdef.offset = 1; cfg.trialfun = 'mytrialfun'; cfg = definetrial(cfg); followed by datatrl = ft_redefinetrial(cfg, datacnt); Reading all data (also the inter-trial interval, the breaks, and the instruction periods) into memory requires a lot of RAM. If it does not fit all at once, you could do the above section for small groups of channels cfg.channel = 1:10; % cfg.channel = 11:20; % cfg.channel = 21:30; % ... and then call ft_appenddata([], datatrl_changroup1, datatrl_changroup2, ...) best, Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Fri Mar 19 11:26:40 2010 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 19 Mar 2010 11:26:40 +0100 Subject: questions on ICA to remove EOG artifacts from MEG data In-Reply-To: <4BA33D5C.1030503@uni-duesseldorf.de> Message-ID: Dear Elisabeth, please note that Saskia has just created a draft page on the wiki for using ICA to remove EOG artifacts from MEG data. Have a look here http://fieldtrip.fcdonders.nl/example/use_independent_component_analysis_ica_to_remove_eog_artifacts . The example there is using 151 channel CTF data avaoalble from the ftp server. Feel free to improve the documentation on that page. Since the plotting of the topographies is tricky for the mixed planar/ magnetometer data that you are working on, I can imagine that especially using the topographies for identifying the components requires a neuromag specific approach. best, Robert On 19 Mar 2010, at 10:01, Elisabeth May wrote: > Dear Masaki, dear Laurence, > > thank you a lot for your really quick and extensive replies to my > long list of questions! > > Masaki, you are right with your first point: so far I am not > completely sure that my plotting scripts correctly sepparates the > two gradiometer types. I do get the same results with my plotting > function and ft_topoplotIC. However, I use my own layout files for > horizontal and vertical gradiometers in both functions so there > might be something wrong with the layout files. I'll check those > again to be sure. I'll also try to scale gradiometers and > magnetometers and do ICA on all sensors together. > > Laurence, thank you for the plots, they will give me a better idea > of what to look for! I only want to use ICA to remove artifacts from > my data so I guess I might try the approach you suggested, too. > > I'll let you know as soon as I make any progress with my data! > > Thanks again and best wishes, > Elisabeth > >> Dear Elisabeth, >> >> I'm not very experienced with using ICA nor with using fieldtrip, >> but I do have some experience of obtaining reliable eyeblink >> spatial topographies from Neuromag 306 data (using SPM), so I >> thought I'd chip in with some advice... >> >> On 18 Mar 2010, at 08:51, Elisabeth May wrote: >> >>> Dear Fieldtrip users, >>> >>> I am trying to use independent component analysis >>> (ft_componentanalysis) to remove eye artifacts from my MEG data. >>> The dataset was recorded with the Neuromag 306 system and contains >>> two conditions with 40 trials each (one where a painful laser >>> stimulation was applied to the subject's right hand and one where >>> the same stimulation was applied to the left hand). So far, I am >>> trying to do the ICA just for the gradiometers on preprocessed >>> data (after removal of bad channels) and then plotting the >>> topographies of the components to identify and then reject >>> components representing the eye artifacts (as suggested in the >>> example script on the Fieldtrip webpage). I have used different >>> settings with the default option cfg.method = 'runica' (no PCA >>> before ICA, different numbers of principal components to be >>> retained (cfg.runica.pca), both conditions sepparately and >>> together...). However, I have never gotten component topographies >>> that I can clearly identify as components representing eye >>> artifacts (showing two sources right above the eyes), although >>> there are almost 200 eye artifacts in the 80 trials of this data >>> set (i.e. there was usually more than one EOG artifact in every >>> single trial). So I am still wondering about a few questions on >>> the exact settings for the ICA in my case and if I am missing >>> something really obvious: >>> >>> * Is it correct to do the ICA on both horizontal and vertical >>> gradiometers together and then plot them sepparately to identify >>> artifacts? >> >> Yes, this sounds sensible - there should be covariance across >> horizontal and vertical gradiometers during an eyeblink, which >> should help you in isolating a component, but of course they will >> have a very different spatial topography, which means you would >> want to plot them separately. I have attached a snapshot of an >> eyeblink component that I identified, in vertical and horizontal >> gradiometers (top left and top right), magnetometers (bottom left), >> and 60 EEG sensors (bottom right). Note that I didn't obtain this >> component with ICA, but with PCA of an 'average eyeblink' (see >> below). >> >>> * Should I do the PCA before the ICA and if so, how many principal >>> components should I retain? >>> * Should I do the ICA on both conditions together or sepparately >>> (since I expect different sources to be activated in both >>> conditions, e.g. one of the two primary somatsensory cortices >>> activated according to stimulation of the right or left hand)? >>> * Is it accurate enough to use complete trials for the component >>> analysis or do I have to extract and use just the parts >>> containing >>> EOG artifacts? >> >> In my (limited) experience, I have had good success identifying >> eyeblink components with a slightly simpler method than ICA. I >> epoch the data with respect to well-identified eyeblinks (detected >> using EOG), then create an 'average eyeblink' using these epochs, >> so that I know what the timecourse of an eyeblink should look on >> average look like. I then just run a simple PCA on this 'average >> eyeblink', and normally the eyeblink is well captured by the first >> (and sometimes second) spatial component of this PCA. I then use >> this PCA map just as you might use an ICA map, i.e. regress it out >> of the raw (original) data. As a sanity check, you can correlate >> the timecourse of this component against the EOG channel, and this >> should correlate quite nicely. You can also try recomputing the >> average eyeblink after you have regressed the component out of the >> data, in order to see that it has been effective in removing most >> of the artefact. >> >> I find this a bit simpler than ICA, and maybe comes with a few >> advantages. First, it doesn't use all the data to derive the >> components, only the data epoched around EOG-detected eyeblinks, so >> it is quite a bit faster on big datasets. Second, by creating an >> average eyeblink, it removes any variability in the data driven by >> other boring stuff (like the brain :) ), so it should pretty much >> always be the component which explains the most variance in the >> 'average' eyeblink (i.e. the first principal component). Finally, >> it is important to note that although the method requires you to >> detect /some/ eyeblinks using the EOG channel, it is still robust >> against you failing to detect /all/ eyeblinks, as the regression is >> done on the raw data, rather than just on the epochs where you have >> already detected the blinks. >> >> However, there are some caveats; the first being that you assume >> that all eyeblinks look similar (in my experience they do), and >> perhaps more importantly that the component doesn't change >> (spatially) during the course of the experiment - with Neuromag >> data, you might be able to get around this to some extent by using >> Maxfilter for movement compensation. I think these caveats both >> also apply to ICA, but I'd be interested to hear other people's >> thoughts (particularly those who have more experience with ICA). >> Finally, I guess if you are interested in isolating interesting >> (brain) signals as well as boring (noise) signals simultaneously, >> then ICA is the way to go. I use this method just to remove >> eyeblinks before I do subsequent processing. >> >>> * And finally, are the component topographies usually sufficient to >>> identify eye artifacts? >>> >> >> I find with this method they are very easy to identify, and I >> imagine they would be reasonably straightforward in ICA also? >> Again, perhaps someone with more ICA experience can comment... >> >>> Any help or advise on this would be greatly appreciated! Thanks in >>> advance, >>> Elisabeth >>> >>> >> >> Hope this helps, >> Laurence >> >> >> =========================================== >> Laurence Hunt, DPhil Student >> Centre for Functional MRI of the Brain (FMRIB), University of Oxford >> lhunt at fmrib.ox.ac.uk >> Phone: (+44)1865-(2)22738 >> =========================================== >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ >> > > > -- > Dipl.-Psych. Elisabeth May > > Universitätsklinikum Düsseldorf > Institut für Klinische Neurowissenschaften und Medizinische > Psychologie > Universitätsstr. 1 > 40225 Düsseldorf > > Tel: +49 211 81-18075 > > http://www.uniklinik-duesseldorf.de/med-psychologie > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From zaifengg at GMAIL.COM Fri Mar 19 11:57:26 2010 From: zaifengg at GMAIL.COM (gao zai) Date: Fri, 19 Mar 2010 12:57:26 +0200 Subject: Questions on High pass filter and Padding in Preprocessing In-Reply-To: Message-ID: Dear Robert, Thanks very much for your great answer. As you mentioned, I tried to read the continuous data into memory, it was slow. I will try to read them in group of channels. BTW, what do you mean by "the padding option in ft_preprocessing pads the data _to_ the specified length, not _with_ the indicated length. " I checked the script about ft-preprocessing, it seems to me that if the padding length is shorter than the specified length (in my case, 2.5s), as you point it out, it will not work. If the padding is longer than that, then fieldtrip will read a longer epoch than the specified length, so if I use a cfg.padding=10, it will input a 10s epoch (and the middle part of 2.5s is the trial I am focused) into memory, am I right? If I am right, can I just use the padding here (e.g., cfg.padding=10) instead of filtering the continuous data, since it is equal to filtering a longer trial and then drop the padding part after completion? Millions of thanks. Best, Feng On Fri, Mar 19, 2010 at 12:21 PM, Robert Oostenveld < r.oostenveld at fcdonders.ru.nl> wrote: > Dear Feng, > > > On 12 Mar 2010, at 11:07, gao zai wrote: > >> I am now working on the MEG data in 4D format. Since it was collected in >> DC, so I want to first use a bandpass filter [0.1 80] to filter my data. >> However, I found that the latter part of averaged results drifted away >> relative to the results when no filter or only a low-pass filter is used >> (see the attached Fig.1). I thought it may be related to the end effect, so >> I used cfg.padding=1, it didn't work. >> > > the padding option in ft_preprocessing pads the data _to_ the specified > length, not _with_ the indicated length. In your case according to the > figure the trial was ~2.5 seconds long, i.e. already longer than 1 second, > so cfg.padding=1 did not have an efefct (whereas cfg.padding=10 does). > > > Latter I turned to use cfg.padding=10 (1/.1=10) it works and no obvious >> drift was found. >> >> However, when tried to only apply a high pass filter to the raw data, >> regardless of using cfg.padding=10, the results always showed a square wave >> (see Fig.2). And there is a warning:"Matrix is close to singular or badly >> scaled. Results may be inaccurate. RCOND = 6.669292e-17."I don't understand >> why this happened. Does anybody know what is the problem with it? How can I >> get a right result in this case? Thank you very much. >> > > You specified cfg.hpfreq=0.1, i.e. that frequencies below 0.1 Hz should be > removed. These frequencies correspond to dripfts in the data of about 10 > seconds. The data segment you are working with is only 2.5 seconds, so > removing the 10 second drift fails. You can increase the cfg.hpfreq to > around 1/2.5 = 0.4 Hz, which would be the lowest frequency that can be > estimated from the 2.5 second data segment. > > Alternatively, you could use the following pipeline > > > cfg=[]; > cfg.dataset ='c,rfDC'; > cfg.continuous = 'yes'; > cfg.hpfilter = 'yes'; > cfg.hpfreq = 0.1; > datacnt = ft_preprocessing(cfg); > > to read it into memory as one continuous segment, and apply the filter on > the complete data. > > Then you can do > > > cfg=[]; > cfg.dataset ='c,rfDC'; > cfg.trialdef.eventtype = 'TRIGGER'; > cfg.trialdef.eventvalue =42; > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 1.5; > cfg.trialdef.offset = 1; > cfg.trialfun = 'mytrialfun'; > cfg = definetrial(cfg); > > followed by > > datatrl = ft_redefinetrial(cfg, datacnt); > > Reading all data (also the inter-trial interval, the breaks, and the > instruction periods) into memory requires a lot of RAM. If it does not fit > all at once, you could do the above section for small groups of channels > > cfg.channel = 1:10; > % cfg.channel = 11:20; > % cfg.channel = 21:30; > % ... > > and then call ft_appenddata([], datatrl_changroup1, datatrl_changroup2, > ...) > > best, > Robert > > > > > > > > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tim.Curran at COLORADO.EDU Sat Mar 20 01:17:01 2010 From: Tim.Curran at COLORADO.EDU (Tim Curran) Date: Fri, 19 Mar 2010 18:17:01 -0600 Subject: JOB OPENING Message-ID: JOB OPENING: COGNITIVE/SYSTEMS NEUROSCIENTIST Science Applications International Corporation (SAIC) SAIC's Technology and Advanced Systems Business Unit has an opening for a Cognitive/Systems Neuroscientist to join a multidisciplinary team conducting research and building systems based on the translation of neuroscience and neuro-imaging (specifically, EEG) research. The individual will support one or more projects, providing expertise in developing protocols, conducting studies, analyzing data, and writing papers and proposals. Applications of interest include brain-computer interfaces and perception, memory, and attention as they relate to man-machine interactions. Required Skills: The candidate must have 6+ years of hands-on relevant research and demonstrated mathematical and computational expertise. Strong written and oral communication skills are a must. Desired Skills: Experience with EEG collection and processing is highly desired. Current knowledge of research literature with a history of publication in the field is also desired. Education Requirements: Ph.D Degree in Psychology, Neuroscience, or related field is required. Location: Louisville/Boulder, Colorado Contact: Laurie Gibson, gibsonld at saic.com ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.holle at SUSSEX.AC.UK Mon Mar 22 12:52:21 2010 From: h.holle at SUSSEX.AC.UK (Henning Holle) Date: Mon, 22 Mar 2010 12:52:21 +0100 Subject: artifact rejection of continuous data in fieldtrip Message-ID: Hi Matt, thanks a lot sharing this information, much appreciated. I'll try retracing your processing steps now. I like your suggestion of turning this into a FT tutorial, once I am more familiar with FT I might try to have a go at that. Cheers, Henning ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Tim.Curran at COLORADO.EDU Mon Mar 22 19:42:02 2010 From: Tim.Curran at COLORADO.EDU (Tim Curran) Date: Mon, 22 Mar 2010 12:42:02 -0600 Subject: Fwd: [FIELDTRIP] JOB OPENING CLARIFICATION Message-ID: Dear All, I previously posted the following job ad, which I was forwarding for a colleague. Please note, because this position requires the ability to obtain a US government security clearance, it is open to US citizens only. I was not aware of this originally, so sorry for posting it to lists with many non-US members. Also, I have no official ties with this position, so please do not send application materials to me. I was just passing it along as a favor to a colleague. regards, Tim Begin forwarded message: > From: Tim Curran > Date: March 19, 2010 6:17:01 PM MDT > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] JOB OPENING > Reply-To: FieldTrip discussion list > > JOB OPENING: > COGNITIVE/SYSTEMS NEUROSCIENTIST > > Science Applications International Corporation (SAIC) > > SAIC's Technology and Advanced Systems Business Unit has an opening for a Cognitive/Systems Neuroscientist to join a multidisciplinary team conducting research and building systems based on the translation of neuroscience and neuro-imaging (specifically, EEG) research. The individual will support one or more projects, providing expertise in developing protocols, conducting studies, analyzing data, and writing papers and proposals. Applications of interest include brain-computer interfaces and perception, memory, and attention as they relate to man-machine interactions. > > Required Skills: > > The candidate must have 6+ years of hands-on relevant research and demonstrated mathematical and computational expertise. Strong written and oral communication skills are a must. > > Desired Skills: > > Experience with EEG collection and processing is highly desired. Current knowledge of research literature with a history of publication in the field is also desired. > > Education Requirements: > > Ph.D Degree in Psychology, Neuroscience, or related field is required. > > Location: > > Louisville/Boulder, Colorado > > Contact: > > Laurie Gibson, gibsonld at saic.com > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ole.jensen at DONDERS.RU.NL Tue Mar 23 11:56:51 2010 From: ole.jensen at DONDERS.RU.NL (Ole Jensen) Date: Tue, 23 Mar 2010 11:56:51 +0100 Subject: PhD/postdoc jobs at the Donders Message-ID: *PhD students/Post-docs, Donders Institute Nijmegen, Netherlands* *Job description* The Neuronal Oscillation group at the Donders Institute for Brain, Cognition and Behaviour has funding available for PhD student and post-doctoral positions in the context of a project focused on studying how oscillatory activity controls the flow of information in the human working brain. The human brain is composed of multiple regions that need to be flexibly engaged and disengaged depending on the cognitive task performed. A fundamental question in cognitive neuroscience is how the functional architecture of the working brain is shaped. You will investigate the role of oscillatory brain activity in determining the functional architecture by studying cross-frequency interactions between different regions in the context of cognitive experiments. You will do so using magnetoencephalography (MEG), electroencephalography (EEG) combined with TMS and functional magnetic resonance imaging (fMRI). You will also use a brain-computer interface to interact with the working brain. Requirements Candidates for the PhD position should have a Master's degree (or equivalent) in a field related to cognitive neuroscience or signal processing (e.g. experimental/cognitive psychology, biology, neuroscience, computer science, electrical engineering). Excellent candidates from other scientific backgrounds will also be considered. Good programming skills (Matlab) are highly desirable. Candidates for the postdoctoral research position should have a PhD degree in a field related to cognitive neuroscience, but candidates from other scientific backgrounds can also apply. The record of published research familiarity with neuroimaging techniques (fMRI, EEG-MEG, and/or TMS) and programming skills (Matlab) will be taken into account in the selection criteria. Proficiency in oral and written English is essential. You are expected to work as part of a team, sharing technical know-how and ideas. * Organization* The Donders Institute for Brain, Cognition and Behaviour consists of the Centre for Cognition, the Centre for Cognitive Neuroimaging and the Centre for Neuroscience. The mission of the Centre for Cognitive Neuroimaging is to conduct cutting-edge fundamental research in cognitive neuroscience. Much of the rapid progress in this field is driven by the development of complex neuro-imaging techniques for measuring activity in the human working brain - an area in which the Centre plays a leading role. The research themes cover central cognitive functions, such as perception, action, control, decision making, attention, memory, language, learning and plasticity. The Centre also aims to establish how the different brain areas coordinate their activity with very high temporal precision to enable human and animal cognition. This internationally renowned centre currently is home to more than 100 PhD students and post-docs from more than 20 different countries, offering a stimulating and multidisciplinary research environment. The centre is equipped with three MRI scanners (7T, 3T, 1.5T), a 275 channels MEG system, a EEG-TMS laboratory, several (MR-compatible) EEG systems, and high-performance computational facilities. English is the lingua franca at the centre. You will work within the Centre's Neuronal Oscillations group ( http://ojensen.ruhosting.nl/). *Conditions of employment* Employment: 1,0 fte PhD student: The starting salary is EUR2,042 per month and will increase to EUR2,612 per month in the fourth year. Post-doc: Depending on experience, the gross salary will be between EUR3,195 and EUR4,374. Two annual 8% bonuses (holiday and end-of-year) will be added to the monthly gross salaries. Additional conditions of employment Duration of the PhD student contract: 4 years. Duration of the post-doc contract: 5 years maximum. * Other Information* You should submit an application letter, a CV, and the names of two persons who can provide references. *Additional Information* Dr. Ole Jensen Telephone: +31 24 3610884 E-mail: ole.jensen at donders.ru.nl This e-mail address is being protected from spambots. You need JavaScript enabled to view it Application You can apply for the job (mention the vacancy number 30.02.10) before 15 April 2010 by sending your application -preferably by email- to: Radboud University Nijmegen, Dienst P&O Postbus 7005, 6503 GM NIJMEGEN- NL Telephone: + 31 24 3611173 E-mail: vacatures at dpo.ru.nl This e-mail address is being protected from spambots. You need JavaScript enabled to view it -- Ole Jensen Principal Investigator Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at donders.ru.nl URL : http://ojensen.ruhosting.nl/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From p_trigkas at HOTMAIL.COM Wed Mar 24 15:53:46 2010 From: p_trigkas at HOTMAIL.COM (PERI TRIGKAS) Date: Wed, 24 Mar 2010 14:53:46 +0000 Subject: Invalid MEX file - Buffer Message-ID: Dear list members I have only recently started my Phd project. I'm trying to work with some on-line MEG data. I have done some research regarding any software that could do my job easier. I have decided to use the FieldTrip Buffer in order to store the data while I am doing the processing. Initially, I thought that it would be good to have everything or at least the buffer on the same machine with the acquisition system. The OS on the acquisition system machine is a Linux distribution of Red Hat. The problem is that the OS version is too old. gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-59) I installed Matlab on top of that -7.2.0.294 (R2006a)- That was the newest version that I managed to get it worked. It did not accept 7.4 or any other later version of Matlab. When I tried to run some of the examples that you provide in order to test the operation of the buffer I got errors regarding the MEX file. I followed the instruction and tried to compile the .c files. Despite the fact that everything went well with the compilation, buffer.mexglx was created, I got again the same error. ??? Invalid MEX-file '/home/peri/fieldtrip-20100314/fileio/private/buffer.mexglx': /matlab/bin/glnx86/../../sys/os/glnx86/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.5). Error in ==> write_data at 189 buffer('put_dat', packet, host, port); Error in ==> rt_signalproxy at 116 write_data(cfg.target.datafile, dat, 'header', hdr, 'dataformat', cfg.target.dataformat, 'append', false); The compatibility has been checked in a Virtual machine in order to keep the MEG system clean as I am not the only person who uses it. I have checked everything that I could and I even asked help from the I.T. support but my problem has not been solved. I would like to ask if the error I get, is a compatibility error since the program is looking for another gcc version (version `GCC_4.2.0' not found) . Could you please suggest me what can be done in order to overcome such problems? Thanks in advance P. Trigkas _________________________________________________________________ We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now http://clk.atdmt.com/UKM/go/195013117/direct/01/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gflandin at FIL.ION.UCL.AC.UK Wed Mar 24 16:35:57 2010 From: gflandin at FIL.ION.UCL.AC.UK (Guillaume Flandin) Date: Wed, 24 Mar 2010 15:35:57 +0000 Subject: Invalid MEX file - Buffer In-Reply-To: Message-ID: Dear Peri, if you follow the same instructions than there and recompile, it should get you sorted: http://en.wikibooks.org/wiki/SPM/Installation_on_64bit_Linux#Other_problems_with_lstdc.2B.2B (basically, remove all reference to -lstdc++ in mexopts.sh). Best regards, Guillaume. PERI TRIGKAS wrote: > Dear list members > > I have only recently started my Phd project. I'm trying to work with > some on-line MEG data. I have done some research regarding any software > that could do my job easier. I have decided to use the FieldTrip Buffer > in order to store the data while I am doing the processing. > Initially, I thought that it would be good to have everything or at > least the buffer on the same machine with the acquisition system. The OS > on the acquisition system machine is a Linux distribution of Red Hat. > The problem is that the OS version is too old. > > /gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-59)/ > > I installed Matlab on top of that /-7.2.0.294 (R2006a)/- That was the > newest version that I managed to get it worked. It did not accept 7.4 or > any other later version of Matlab. > When I tried to run some of the examples that you provide in order to > test the operation of the buffer I got errors regarding the MEX file. I > followed the instruction and tried to compile the .c files. Despite the > fact that everything went well with the compilation, buffer.mexglx was > created, I got again the same error. > > ?/?? Invalid MEX-file > '/home/peri/fieldtrip-20100314/fileio/private/buffer.mexglx': > /matlab/bin/glnx86/../../sys/os/glnx86/libgcc_s.so.1: version > `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.5). > > Error in ==> write_data at 189 > buffer('put_dat', packet, host, port); > > Error in ==> rt_signalproxy at 116 > write_data(cfg.target.datafile, dat, 'header', hdr, 'dataformat', > cfg.target.dataformat, 'append', false); > / > The compatibility has been checked in a Virtual machine in order to keep > the MEG system clean as I am not the only person who uses it. > I have checked everything that I could and I even asked help from the > I.T. support but my problem has not been solved. I would like to ask if > the error I get, is a compatibility error since the program is looking > for another gcc version (version `GCC_4.2.0' not found) . > > Could you please suggest me what can be done in order to overcome such > problems? > > Thanks in advance > > P. Trigkas -- Guillaume Flandin, PhD Wellcome Trust Centre for Neuroimaging University College London 12 Queen Square London WC1N 3BG ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From njkillian at GATECH.EDU Wed Mar 24 21:20:59 2010 From: njkillian at GATECH.EDU (Nathan Killian) Date: Wed, 24 Mar 2010 16:20:59 -0400 Subject: freqdescriptives/statistics In-Reply-To: Message-ID: Hi Fieldtrip Users, I'm curious about the "bias correct" for coherence existing in past versions of fieldtrip (old discussion thread below) but I couldn't locate in the FT code (October 14 2009 version) what this is actually doing and what bias it was addressing (e.g. bias from number of trials used in an average). Can anyone explain what this was meant to do? Also is there any other sort of bias correction done in the more recent versions of FT? Thanks for any help! Nathan On Tue, Sep 1, 2009 at 6:40 PM, Dahlia Sharon wrote: > Thanks Jan-Mathijs for that useful reply. > > Regarding permutation analysis, we're running into some difficulty > understanding what the code does. Could you clarify these points? > > 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate > layout file (all channels). Does fieldtrip take into account which channels > are gradiometers and which magnetometers when it calculates adjacency for > clustering? > > 2. How does fieldtrip calculate adjacency for channels? (time and frequency > are obvious...) > > 3. How is the clustering performed? > > We're getting a significant cluster but it doesn't look like a single blob > in the time-frequency domain (averaging over sensors) but like two very > distant blobs, which is very strange... > > On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen > wrote: > > >Dear Dahlia, > > > >Hemant Bokil indeed uses the jackknife to obtain variance estimates of > >power (and coherence), see also for example his 2007 paper in > >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', > >he has shown that by applying a specific correction to the power > >estimate, in combination of the jackknife, generates a test-statistic > >from a differential (i.e. contrast) power spectrum which has a > >standard normal distribution (i.e. the jackknife estimate of the > >variance is expected to be 1 and the estimate of the mean 0). > >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to > >use non-parametric techniques to do statistical inference. > >Freqdescriptives in this respect still historically has the option of > >computing a jackknife estimate of the SEM of the powerspectrum/ > >coherencespectrum, which can be used to compute a T-statistic across > >two conditions for example. However, I you would choose this path, you > >have to write some code which does this, because it is not in > >fieldtrip. The biascorrect option has been taken out altogether as far > >as I can see, (and had been designed only to correct the bias in the > >coherence spectra, and not in the power spectra if I remember > >correctly), and any reference in the documentation should be removed. > >Unfortunately, we did not yet have time to considerably clean up > >freqdescriptives, but this is quite high on the developer's to do list. > >The bottom line is: ignore biascorrect, and if you use the jackknife > >estimate of the SEM, you have to come up with some code of your own. > >Alternatively, you could look into freqstatistics and use > >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do > >statistical inference. > > > >Best, > > > >Jan-Mathijs > > > > > >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > > > >> Hi all, > >> > >> Is there a more detailed explanation of usage for the jackknife and > >> biascorrect options for freqdescriptives than the one in the > >> freqdescriptives reference > page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? > >> > >> More specifically, are these options related to Bokil et al NeuroIm > >> 2007? How should they be employed to determine significance of > >> difference between conditions? (Is there somewhere a tutorial for > >> the use of these options analogous to the one about cluster-based > >> permutation testing?) > >> > >> Also, for the permutation analysis of TFRs > (http://fieldtrip.fcdonders.nl/tutorial/statistics?s > >> []=freqstatistics), if I don't want to employ the planar gradient > >> step (what exactly IS combineplanar? sorry I couldn't find it), can > >> I simply skip it and calculate the TFRs of the raw sensor data? > >> > >> Many thanks! > >> Dahlia. > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > >> of the FieldTrip toolbox, to share experiences and to discuss new > >> ideas for MEG and EEG analysis. > >> http://listserv.surfnet.nl/archives/fieldtrip.html > >> http://www.ru.nl/fcdonders/fieldtrip/ > > > >---------------------------------- > > > >The aim of this list is to facilitate the discussion between users of > >the FieldTrip toolbox, to share experiences and to discuss new ideas > >for MEG and EEG analysis. > > > >http://listserv.surfnet.nl/archives/fieldtrip.html > > > >http://www.ru.nl/fcdonders/fieldtrip/ > > > > > > > > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at DONDERS.RU.NL Wed Mar 24 22:11:07 2010 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Wed, 24 Mar 2010 22:11:07 +0100 Subject: freqdescriptives/statistics In-Reply-To: Message-ID: Hi Nathan, I have implemented the biascorrect option in one of the older versions of freqdescriptives. With this option, the Jacknife was used to calculate a bias-corrected version of coherence. Actually, there is a very nice theorem about the fact that Jacknife-based bias correction effectively removes the first order bias. Surprisingly, the Jacknife is mainly used to calculate a proxy for the standard error, and for this application a similar theorem does not exist. I learned this from a nice chapter by John Tukey in a book called “(Exploratory) Data Analysis” (or something like that). Best, Eric dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 E: e. maris at donders.ru.nl From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Nathan Killian Sent: woensdag 24 maart 2010 21:21 To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] freqdescriptives/statistics Hi Fieldtrip Users, I'm curious about the "bias correct" for coherence existing in past versions of fieldtrip (old discussion thread below) but I couldn't locate in the FT code (October 14 2009 version) what this is actually doing and what bias it was addressing (e.g. bias from number of trials used in an average). Can anyone explain what this was meant to do? Also is there any other sort of bias correction done in the more recent versions of FT? Thanks for any help! Nathan On Tue, Sep 1, 2009 at 6:40 PM, Dahlia Sharon wrote: Thanks Jan-Mathijs for that useful reply. Regarding permutation analysis, we're running into some difficulty understanding what the code does. Could you clarify these points? 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate layout file (all channels). Does fieldtrip take into account which channels are gradiometers and which magnetometers when it calculates adjacency for clustering? 2. How does fieldtrip calculate adjacency for channels? (time and frequency are obvious...) 3. How is the clustering performed? We're getting a significant cluster but it doesn't look like a single blob in the time-frequency domain (averaging over sensors) but like two very distant blobs, which is very strange... On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen wrote: >Dear Dahlia, > >Hemant Bokil indeed uses the jackknife to obtain variance estimates of >power (and coherence), see also for example his 2007 paper in >J.Neurosci.Methods. More specifically, if your data is 'well-behaved', >he has shown that by applying a specific correction to the power >estimate, in combination of the jackknife, generates a test-statistic >from a differential (i.e. contrast) power spectrum which has a >standard normal distribution (i.e. the jackknife estimate of the >variance is expected to be 1 and the estimate of the mean 0). >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to >use non-parametric techniques to do statistical inference. >Freqdescriptives in this respect still historically has the option of >computing a jackknife estimate of the SEM of the powerspectrum/ >coherencespectrum, which can be used to compute a T-statistic across >two conditions for example. However, I you would choose this path, you >have to write some code which does this, because it is not in >fieldtrip. The biascorrect option has been taken out altogether as far >as I can see, (and had been designed only to correct the bias in the >coherence spectra, and not in the power spectra if I remember >correctly), and any reference in the documentation should be removed. >Unfortunately, we did not yet have time to considerably clean up >freqdescriptives, but this is quite high on the developer's to do list. >The bottom line is: ignore biascorrect, and if you use the jackknife >estimate of the SEM, you have to come up with some code of your own. >Alternatively, you could look into freqstatistics and use >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do >statistical inference. > >Best, > >Jan-Mathijs > > >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote: > >> Hi all, >> >> Is there a more detailed explanation of usage for the jackknife and >> biascorrect options for freqdescriptives than the one in the >> freqdescriptives reference page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? >> >> More specifically, are these options related to Bokil et al NeuroIm >> 2007? How should they be employed to determine significance of >> difference between conditions? (Is there somewhere a tutorial for >> the use of these options analogous to the one about cluster-based >> permutation testing?) >> >> Also, for the permutation analysis of TFRs (http://fieldtrip.fcdonders.nl/tutorial/statistics?s >> []=freqstatistics), if I don't want to employ the planar gradient >> step (what exactly IS combineplanar? sorry I couldn't find it), can >> I simply skip it and calculate the TFRs of the raw sensor data? >> >> Many thanks! >> Dahlia. >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> http://listserv.surfnet.nl/archives/fieldtrip.html >> http://www.ru.nl/fcdonders/fieldtrip/ > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of >the FieldTrip toolbox, to share experiences and to discuss new ideas >for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ > > > > > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stojanoski at UTSC.UTORONTO.CA Thu Mar 25 18:33:14 2010 From: stojanoski at UTSC.UTORONTO.CA (Bobby Stojanoski) Date: Thu, 25 Mar 2010 13:33:14 -0400 Subject: Induced activity Message-ID: Dear Fieldtrippers, I am a relatively new user of fieldtrip and am very impressed! I am interested in comparing differences at certain frequencies – induced 40-100 Hz – between 2 experimental conditions. My understanding was that I can calculate induced activity in the gamma range by calculating the power for each trial (subject average -- freqanalysis) and then averaging across subjects (grand average -- freqdescriptives/freqgrandaverage). To my dismay, when I plotted the results of my grandaverage I found a band of power at 55 - 65 Hz for the entire duration of my epoch. I should add this was not the case when I plotted power across trials for each participant. Earlier discussions mention computing induced+evoked (using freqanalysis and freqgrandaverage) and subtracting that from evoked (using timelockanalysis+freqanalysis) to get extract induced only activity. However, later posts suggest that this is not a valid approach. 1. Where have I made my mistake? 2. If ((induced+evoked)-evoked)) is not valid, what is the correct approach to calculating induced activity at 40 - 100 Hz? Any help would be greatly appreciated! Thank you Bobby Stojanoski ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adrian.m.bartlett at GMAIL.COM Thu Mar 25 18:51:51 2010 From: adrian.m.bartlett at GMAIL.COM (Adrian Bartlett) Date: Thu, 25 Mar 2010 13:51:51 -0400 Subject: Induced activity In-Reply-To: Message-ID: Hi Bobby, This sounds like you may have a case of line noise contamination, which is usually seen at 50/60Hz (depends on which continent you are on). While I am not familiar with it's implementation in FIELDTRIP, there are notch filtering solutions to eliminate this contamination. Using multitaper FFT will usually result in the 0 power (post-notch-filtering) at ~60 Hz being smoothed over by the narrowband frequency bias. - A On Thu, Mar 25, 2010 at 1:33 PM, Bobby Stojanoski < stojanoski at utsc.utoronto.ca> wrote: > Dear Fieldtrippers, > > > > I am a relatively new user of fieldtrip and am very impressed! > > > I am interested in comparing differences at certain frequencies – induced > 40-100 Hz – between 2 experimental conditions. My understanding was that > I can calculate induced activity in the gamma range by calculating the power > for each trial (subject average -- freqanalysis) and then averaging across > subjects (grand average -- freqdescriptives/freqgrandaverage). > > > To my dismay, when I plotted the results of my grandaverage I found a band > of power at 55 - 65 Hz for the entire duration of my epoch. I should add > this was not the case when I plotted power across trials for each > participant. > > > Earlier discussions mention computing induced+evoked (using freqanalysis > and freqgrandaverage) and subtracting that from evoked (using > timelockanalysis+freqanalysis) to get extract induced only activity. > However, later posts suggest that this is not a valid approach. > > > 1. Where have I made my mistake? > > > 2. If ((induced+evoked)-evoked)) is not valid, what is the correct approach > to calculating induced activity at 40 - 100 Hz? > > > Any help would be greatly appreciated! > > > Thank you > > Bobby Stojanoski > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sweiss at AECOM.YU.EDU Thu Mar 25 21:49:01 2010 From: sweiss at AECOM.YU.EDU (Shennan Weiss) Date: Thu, 25 Mar 2010 16:49:01 -0400 Subject: old CTF format Message-ID: Hi, In order to input my CTF data in to fieldtrip I had to set cfg.dataformat and cfg.headerformat to ctf_old. This worked. However, when I try to run applications like megplanar even when I list my channels it does not work. Perhaps this is because my MEG channels begin with 'M' and not 'MEG'? Does anyone know a way to convert old CTF data to new CTF? or any other fixes? Thanks, Shennan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From sweiss at AECOM.YU.EDU Thu Mar 25 23:48:43 2010 From: sweiss at AECOM.YU.EDU (Shennan Weiss) Date: Thu, 25 Mar 2010 18:48:43 -0400 Subject: megplanar Message-ID: Hi again, I wanted to specify the error I am encountering with megplanar analyzing CTF275 data. Note in preprocessing I had to set the read parameters to ctf_old. The specific problem occurs in channelposition.m at the following lines used = any(abs(sens.tra)<0.5, 1); % allow a little bit of rounding-off error sens.pnt = sens.pnt(used,:); the problem is that sens.tra that is equivalent to data.grad.tra and is a 273 x 574 array. While sens.pnt is a array of 543x3. Any help would be greatly appreciated. Thanks, Shennan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From michael.wibral at WEB.DE Fri Mar 26 18:29:10 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Fri, 26 Mar 2010 18:29:10 +0100 Subject: megplanar In-Reply-To: <610ef88c5eff801021e76bccd135c364.squirrel@netmail.aecom.yu.edu> Message-ID: Hi Shennan, could you post the code to read in the data, and the specific error message you ge - that would be very helpful. Here are some more questions: Did you use the tools provided by ctf to read in the data? Did you read in only MEG channels (and not the refence ones etc.)? Did you try to plot or statistically analyze your megplanar data *before* using combineplanar (only after using combineplanar plotting and statitistcs are possible to my knowledge)? Michael -----Ursprüngliche Nachricht----- Von: Shennan Weiss Gesendet: Mar 25, 2010 11:48:43 PM An: FIELDTRIP at NIC.SURFNET.NL Betreff: [FIELDTRIP] megplanar >Hi again, > >I wanted to specify the error I am encountering with megplanar analyzing >CTF275 data. Note in preprocessing I had to set the read parameters to >ctf_old. The specific problem occurs in channelposition.m > >at the following lines > >used = any(abs(sens.tra)<0.5, 1); % allow a little bit of rounding-off error >sens.pnt = sens.pnt(used,:); > >the problem is that sens.tra that is equivalent to data.grad.tra and is a >273 x 574 array. While sens.pnt is a array of 543x3. > >Any help would be greatly appreciated. > >Thanks, Shennan > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From michael.wibral at WEB.DE Fri Mar 26 19:24:51 2010 From: michael.wibral at WEB.DE (Michael Wibral) Date: Fri, 26 Mar 2010 19:24:51 +0100 Subject: Induced activity In-Reply-To: <7834c8d31003251051t6ebcf886jdbe595916a639638@mail.gmail.com> Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 628 bytes Desc: not available URL: From sweiss at AECOM.YU.EDU Sat Mar 27 01:24:21 2010 From: sweiss at AECOM.YU.EDU (Shennan Weiss) Date: Fri, 26 Mar 2010 20:24:21 -0400 Subject: megplanar In-Reply-To: <12290700.448458.1269624550752.JavaMail.fmail@mwmweb055> Message-ID: Hi Michael and others, Thank you for the help. When I try to load a ctf275 dataset using the following commands (for example) cfg = []; cfg.dataset = 'trial1.ds'; data=preprocessing(cfg); readCTFds: You are reading CTF data for use with a software-application tool that is not manufactured by VSM MedTech Ltd. and has not received marketing clearance for clinical applications. If CTF MEG data are processed by this tool, they should not be later employed for clinical and/or diagnostic purposes. ??? Index exceeds matrix dimensions. Error in ==> /fieldtrip-20100101/external/ctf/readCTFds.p>readHc at 599 Error in ==> /fieldtrip-20100101/external/ctf/readCTFds.p>readCTFds at 203 Error in ==> read_header at 404 orig = readCTFds(filename); Error in ==> ft_preprocessing at 278 hdr = read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> preprocessing at 17 [varargout{1:nargout}] = funhandle(varargin{:}); However when I add cfg.headerformat = 'ctf_old'; cfg.dataformat= 'ctf_old'; The complete file is loaded. Yet I have encountered numerous problems. For example, when I try to run topoplot on the basis of the organization of the data.grad structure it thinks the file has 151 channels.... Even when I open the ctf file in an updated version of dataeditor and resave it after applying a filter for instance I still get the same error message in Matlab. -Shen Any help would be wonderful. I really hope I can smoothly use the fieldtrip package. Thanks, Shennan > Hi Shennan, > > could you post the code to read in the data, and the specific error > message you ge - that would be very helpful. > Here are some more questions: > Did you use the tools provided by ctf to read in the data? > Did you read in only MEG channels (and not the refence ones etc.)? > Did you try to plot or statistically analyze your megplanar data *before* > using combineplanar (only after using combineplanar plotting and > statitistcs are possible to my knowledge)? > > Michael > > > > > > > -----Ursprüngliche Nachricht----- > Von: Shennan Weiss > Gesendet: Mar 25, 2010 11:48:43 PM > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] megplanar > >>Hi again, >> >>I wanted to specify the error I am encountering with megplanar analyzing >>CTF275 data. Note in preprocessing I had to set the read parameters to >>ctf_old. The specific problem occurs in channelposition.m >> >>at the following lines >> >>used = any(abs(sens.tra)<0.5, 1); % allow a little bit of rounding-off >> error >>sens.pnt = sens.pnt(used,:); >> >>the problem is that sens.tra that is equivalent to data.grad.tra and is a >>273 x 574 array. While sens.pnt is a array of 543x3. >> >>Any help would be greatly appreciated. >> >>Thanks, Shennan >> >>---------------------------------- >>The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From nathanweisz at MAC.COM Sat Mar 27 11:41:48 2010 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Sat, 27 Mar 2010 11:41:48 +0100 Subject: Induced activity In-Reply-To: <26662339.467176.1269627891260.JavaMail.fmail@mwmweb055> Message-ID: hi bobby, i agree with michael that there is no method -at least that i'm aware of- to get rid of evoked parts, just due to the issues he mentions. the solution of reporting the averaged single-trial TF response along with ITC would be ok if one could assume a strict sequence of evoked and induced responses (e.g. <300 ms evoked; >300 ms induced). in practice this however is not the case and induced and evoked processes overlap considerably. This will make problems when you are specifically interested in what is induced: the evoked parts will dominate the entire picture. overlaps may also be created due to the analysis method. e.g. a practical problem my group sometimes encounters is that pre-stimulus alpha desynchronizations are sometimes rendered almost "invisible" in time-frequency analysis due to post-stimulus increases at low frequencies (that largely compose the ERP), that "bleed" into the pre-stimulus period (also an issue regarding baseline correction of post-stimulus responses). these issues will not be solved by reporting inter-trial coherence. so depending on what you are interested in, i think that sometimes the best (not conceptually ideal) you can do is to remove the time-frequency representation of the ERP (of course before baseline correction; this would not increase computation time a lot and you could report both if needed). of course you need to be aware of the limitations michael mentioned and decide whether you want to forgo investigating something altogether due to a lack of 100% valid methods. in general however, one could pose a similar question for many things we do e.g. regarding source localization: even though we can not be 100% sure whether the "blobs" or dipole fits we see are valid we do it anyway (or at least many of us). if anybody has a better idea rather than primitive ERP removal, for separating evoked and incuced activity when they overlap, then it would be great to share it with the community. cheers, nathan On 26.03.2010, at 19:24, Michael Wibral wrote: > Hi Bobby, > > > for fundamental reasons there is (of yet?) no valid approach to get at "pure" induced activity. To see this, imagine a process that produces induced responses, but in a particular participant and day you get by chance mostly responses with relatively similar phases - such that you get a nonnegligible average (some would call it an ERP). Is it still induced? Did it convert to evoked (without the underlying process having changed) ? > > > As at least three different mechanisms (additive evoked activity, phase rest of ongoing oscillations, asymmetric amplitude modulation of ongoing oscillations) have been shown to produce non-vanishing averages / ERPs I would also strictly advise against regressing out "evoked" activity from each trial to get induced activity. > > I also do not see a need for analysis of "pure" induced activity. You can calculate power and inter-trial phase-coherence for each time-frequency bin. For the various peaks in your time-frequency representation you quote these two values and most people should be fine with this. > > > Michael > > > > > > > > > > > Von: Adrian Bartlett > Gesendet: Mar 25, 2010 6:51:51 PM > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] Induced activity > > Hi Bobby, > This sounds like you may have a case of line noise contamination, which is usually seen at 50/60Hz (depends on which continent you are on). While I am not familiar with it's implementation in FIELDTRIP, there are notch filtering solutions to eliminate this contamination. Using multitaper FFT will usually result in the 0 power (post-notch-filtering) at ~60 Hz being smoothed over by the narrowband frequency bias. > - A > > On Thu, Mar 25, 2010 at 1:33 PM, Bobby Stojanoski wrote: > Dear Fieldtrippers, > > I am a relatively new user of fieldtrip and am very impressed! > > I am interested in comparing differences at certain frequencies – induced 40-100 Hz – between 2 experimental conditions. My understanding was that I can calculate induced activity in the gamma range by calculating the power for each trial (subject average -- freqanalysis) and then averaging across subjects (grand average -- freqdescriptives/freqgrandaverage). > > To my dismay, when I plotted the results of my grandaverage I found a band of power at 55 - 65 Hz for the entire duration of my epoch. I should add this was not the case when I plotted power across trials for each participant. > > Earlier discussions mention computing induced+evoked (using freqanalysis and freqgrandaverage) and subtracting that from evoked (using timelockanalysis+freqanalysis) to get extract induced only activity. However, later posts suggest that this is not a valid approach. > > > 1. Where have I made my mistake? > > 2. If ((induced+evoked)-evoked)) is not valid, what is the correct approach to calculating induced activity at 40 - 100 Hz? > > > Any help would be greatly appreciated! > > > Thank you > Bobby Stojanoski > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.holle at SUSSEX.AC.UK Sun Mar 28 17:02:40 2010 From: h.holle at SUSSEX.AC.UK (Henning Holle) Date: Sun, 28 Mar 2010 17:02:40 +0200 Subject: channel selection in ft_preproccesing does not update elec field Message-ID: Dear list members, In a call to ft_precessing, I have selected a number of interesting channels for further analysis cfg = []; cfg.channel = {'Fz', 'Cz', 'Pz'}; data_eeg = ft_preprocessing(cfg,data_tmp); After this call, the data_eeg.label is updated, and now contains only these three channels. However, data_eeg.elec does not seem to be updated, and is still containing all original channels (which causes problems later on when I try to plot the results). Shouldn't ft_preprocessing also update the data_eeg.elec field? Best wishes, Henning ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From nathanweisz at MAC.COM Mon Mar 29 10:18:55 2010 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Mon, 29 Mar 2010 10:18:55 +0200 Subject: channel selection in ft_preproccesing does not update elec field In-Reply-To: Message-ID: > After this call, the data_eeg.label is updated, and now contains only these > three channels. However, data_eeg.elec does not seem to be updated, and is > still containing all original channels (which causes problems later on when > I try to plot the results). Shouldn't ft_preprocessing also update the > data_eeg.elec field? no ... not as far as i know. the elec-field contains all info no matter what you do. for plotting the main thing is that the electrodes in the label field should also appear somewhere in the elec.label field. n ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From h.holle at SUSSEX.AC.UK Mon Mar 29 14:23:03 2010 From: h.holle at SUSSEX.AC.UK (Henning Holle) Date: Mon, 29 Mar 2010 14:23:03 +0200 Subject: channel selection in ft_preproccesing does not update elec field Message-ID: Hello Nathan, thank you for your response. I have created an average for three 3 electrodes of interest (Fz, Cz, Pz). When I try to plot it, like so cfg = []; cfg.showlabels = 'yes'; cfg.fontsize = 6; multiplotER(cfg, avg_STD); the electrodes are not in the layout I would have expected (see attachment). What is causing this behavior? This are my electrode positions, if this information helps: >> avg_STD.elec.pnt(strmatch('Fz',avg_STD.elec.label),:) ans = 0 8.6070 5.8872 >> avg_STD.elec.pnt(strmatch('Cz',avg_STD.elec.label),:) ans = 0 0 8.5313 >> avg_STD.elec.pnt(strmatch('Pz',avg_STD.elec.label),:) ans = 0 -5.6243 7.1065 Best wishes Henning ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: output_multiplot.fig Type: application/octet-stream Size: 16503 bytes Desc: not available URL: From nathanweisz at MAC.COM Tue Mar 30 00:42:28 2010 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Tue, 30 Mar 2010 00:42:28 +0200 Subject: channel selection in ft_preproccesing does not update elec field In-Reply-To: Message-ID: Dear Henning, I'm not sure why the data is plotted as it is (i.e. in a topographical sense, e.g. Cz in the upper left corner). but i don't think that with 3 electrodes a multiplot is really necessary anyway. why not use singleplot? best, n On 29.03.2010, at 14:23, Henning Holle wrote: > Hello Nathan, > > thank you for your response. I have created an average for three 3 > electrodes of interest (Fz, Cz, Pz). When I try to plot it, like so > > cfg = []; > cfg.showlabels = 'yes'; > cfg.fontsize = 6; > multiplotER(cfg, avg_STD); > > the electrodes are not in the layout I would have expected (see attachment). > What is causing this behavior? > > This are my electrode positions, if this information helps: > >>> avg_STD.elec.pnt(strmatch('Fz',avg_STD.elec.label),:) > > ans = > > 0 8.6070 5.8872 > >>> avg_STD.elec.pnt(strmatch('Cz',avg_STD.elec.label),:) > > ans = > > 0 0 8.5313 > >>> avg_STD.elec.pnt(strmatch('Pz',avg_STD.elec.label),:) > > ans = > > 0 -5.6243 7.1065 > > Best wishes > > Henning > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Erin.Oakman at NYUMC.ORG Tue Mar 30 19:01:25 2010 From: Erin.Oakman at NYUMC.ORG (Oakman, Erin) Date: Tue, 30 Mar 2010 13:01:25 -0400 Subject: Induced activity In-Reply-To: Message-ID: Hello Bobby, Thanks for raising a very relevant question about the difference between induced and evoked activity ! A good discussion of this can be found here, or attached as text https://listserv.surfnet.nl/scripts/wa.cgi?A3=ind0704&L=FIELDTRIP&E=quoted-printable&P=234745&B=--Apple-Mail-1--1050075873&T=text%2Fhtml;%20charset=WINDOWS-1252&XSS=3 There is not a definite way to separate the induced and evoked activity. The reason is that the sum of the squares is not the same as the square of the sum. In my very limited experience, I have noticed that researchers sometimes use the term "induced" or "event-related spectral perturbation" to refer to the average of the single-trials power, which has been base-line corrected . At least that is the case in the "induced power" in this paper: Krishnan, G. P., W.P. Hetrick, C.A. Brenner, A. Shekhar, A.N. Steffen and B.F. O'Donnell 2009. Steady state and induced auditory gamma deficits in schizophrenia. Neuroimage. Erin Hi > A late follow-up to this topic. I have recentrly been musing over how to > get a "clean" measure of the non-phase locked activity. I have tried > subtracting the ERF out prior to time-frequency computation but this > produces quite a bit of artifact...presumably since the single trial data > will have considerable ;atency "jitter" The ERF collapses two sources of "jitter"; in the latency of the transient activity (if it exists) and the phase of ongoing oscillatory activity. > The comments from Christian below make sense ( I think) why simply > subtracting the two time-frequency power representaions is not valid. But I > wonder would this subtractive approach be valid if one worked with the > magnitude of the signal rather than power..omitting all the squaring operations? Computing the magnitude is still a non-linear operation (square root of a sum of squares, rectification, whatever ... ). The problem for why this won't work either resides in averaging part: in the evoked case you have a linear average followed by a non-linear operation, and in the induced case you have an average of the non-linearly transformed quantity. The "catch phrase" here is: the sum of the squares is not the same as the square of the sum! (or the sum of the rectified data is not the same as the rectified sum) Hope this helps, Christian > If this right theoretically, how to achieve this in Fieldtrip?. Would > setting cfg.output = 'fourier then abs'ing the output work. My suspicion is > no since the summing is being done first here. Alternatively, does one need > to hack the code to return the magnitude. > > Thanks for your help on this and sorry for waking old threads :) > > - Suresh > > On Fri, 23 Feb 2007 01:44:59 +0100, Christian Hesse > wrote: > >> One further comment (please see below): >> >>> Hi Thomas, >>>> Following up on this conversation. It seems that the ‘induced >>>> activity’ contains both phase-locked and non-phase-locked >>>> activity, whereby the ‘evoked’ activity contains only phase-locked >>>> activity. Is it then kosher to separate these components by linear >>>> subtraction? For example, if we first compute the ‘induced’ >>>> activity by averaging power over individual trials, and from that >>>> subtract the ‘evoked activity’ (calculated based on average >>>> response) to get the induced activity without any phase-locked >>>> activity? >>> >>> It is not correct to subtract because computing the induced and >>> evoked power spectra involves squaring signal amplitudes (a non- >>> linear operation), and hence, taking your terminology to refer to >>> the instantaneous amplitudes of the signal components (this applies >>> to any time-frequency tile) >>>> Induced = Phase + Non-Phase >>>> >>>> And >>>> >>>> Evoked = Phase >>>> >>>> Then >>>> >>>> Non-Phase = Induced – Evoked >>>> >>>> >>> what you actually get from spectral or time-frequency analysis is >>> the power of your MEASURED signal >>> >>> Induced^2 = (Phase + Non-Phase)^2 = Phase^2 + 2*Phase*Non-Phase + >>> Non-Phase^2 >>> >>> Evoked^2 = Phase^2 >>> >>> Then >>> >>> Induced^2 - Evoked^2 = 2*Phase*Non-Phase + Non-Phase^2 AND NOT Non- >>> Phase^2 >>> >> Note that the other crucial thing to consider here is that you are in >> one case averaging power over trials over trials: >> >> E[ (Induced^2) ] = E[ (Phase + Non-Phase)^2 ] = E[ (Phase^2 + >> 2*Phase*Non-Phase + Non-Phase^2) ] = E[ (Phase^2) ] E[ (Non- >> Phase^2) ] + E[ 2*Phase*Non-Phase ] >> >> this is why taking the square root of sqrt(Induced^2) does not give >> (Phase + Non-Phase) but sqrt(E[ (Phase+Non-Phase)^2 ]). >> >> in the evoked case you are taking the power of the average amplitude >> >> Evoked^2 = E[ Phase ]^2 (---> note the ^2 on the outside of the sum) >> >> so in subtracting you are actually assuming that E[Phase]^2 = E >> [(Phase)^2] which is unlikely to be accurate the case in finite samples. >> >> Hope I have not confused others (or myself) here. >> Christian >> >> > > This is indeed the approach that I have followed succesfully a couple of > times (e.g. Bastiaansen et al., JOCN 2006), although the terminology that > you are using is somewhat confusing. I (and I guess most people) would refer > to induced activity as that part of the EEG that is non-phase-locked, so I > would restate your equation to: > induced = EEG - evoked. > > However, there is a drawback to this approach, since it assumes that the ERP > is absolutely stationary over trials. This is not the case in reality (e.g. > subjects' attentional level or other states may change from trial to trial, > giving rise to variability in the single-trial ERPs). This means that by > subtracting the average ERP, one may introduce frequency components in the > residual EEG that were not present before. Klimesch, and Kalcher and > Pfurtscheller, have come up with ways of scaling the average ERP so as to > yield a best fit of the average with each single-trial ERP, but also that > approach may be sub-optimal. > My latest way around the problem is to run a TF analysis on the untreated > EEG (containing both evoked and induced activity), and comparing this to a > TF analysis of the subject-averaged ERPs (the evoked activity alone). > Qualitative differences between the two analyses can now only be attributed > to induced activity. > > Marcel > > Thomas Thesen wrote: >> >> Hi FieldTrippers, >> >> >> >> Following up on this conversation. It seems that the ‘induced activity’ > contains both phase-locked and non-phase-locked activity, whereby the > ‘evoked’ activity contains only phase-locked activity. Is it then kosher to > separate these components by linear subtraction? For example, if we first > compute the ‘induced’ activity by averaging power over individual trials, > and from that subtract the ‘evoked activity’ (calculated based on average > response) to get the induced activity without any phase-locked activity? >> >> >> >> So if >> >> Induced = Phase + Non-Phase >> >> And >> >> Evoked = Phase >> >> Then >> >> Non-Phase = Induced – Evoked >> >> >> >> Or does the fact that this is a linear operations on data that have been > constructed through a non-linear process render this somehow invalid? It has > certainly been done before. Your comments would be much appreciated. ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Bobby Stojanoski [stojanoski at UTSC.UTORONTO.CA] Sent: Thursday, March 25, 2010 1:33 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Induced activity Dear Fieldtrippers, I am a relatively new user of fieldtrip and am very impressed! I am interested in comparing differences at certain frequencies – induced 40-100 Hz – between 2 experimental conditions. My understanding was that I can calculate induced activity in the gamma range by calculating the power for each trial (subject average -- freqanalysis) and then averaging across subjects (grand average -- freqdescriptives/freqgrandaverage). To my dismay, when I plotted the results of my grandaverage I found a band of power at 55 - 65 Hz for the entire duration of my epoch. I should add this was not the case when I plotted power across trials for each participant. Earlier discussions mention computing induced+evoked (using freqanalysis and freqgrandaverage) and subtracting that from evoked (using timelockanalysis+freqanalysis) to get extract induced only activity. However, later posts suggest that this is not a valid approach. 1. Where have I made my mistake? 2. If ((induced+evoked)-evoked)) is not valid, what is the correct approach to calculating induced activity at 40 - 100 Hz? Any help would be greatly appreciated! Thank you Bobby Stojanoski ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: induced v evoked
Type: application/octet-stream
Size: 7762 bytes
Desc: induced v evoked
URL: 

From twitzel at NMR.MGH.HARVARD.EDU  Tue Mar 30 19:24:16 2010
From: twitzel at NMR.MGH.HARVARD.EDU (Thomas Witzel)
Date: Tue, 30 Mar 2010 13:24:16 -0400
Subject: Induced activity
In-Reply-To: <0F47B6EFAC0110438AE026CEF86D445912EEEDA7B4@MSGWSDCPMB04.nyumc.org>
Message-ID: 

Hello all,

just my two cents late in this discussion, and I hope I'm not repeating
what someone else has just said. The way I and my code calculate induced
activity was that I would first average all trials to get an ERF, then
subtract the ERF from each individual trial, and then calculate the the
power. This can be done in complex domain (i.e. after some frequency
analysis as well) as long no non-linear operations have been applied.
I never really had any problems with this approach.
As for the point made by Bobby about the frequency band being strong
troughout the trial (even baseline), this makes sense as there is
presumably some variation during the baseline as well. To get the "nice"
picture, you need to represent the result relative to the baseline to show
change of power/magnitude relative to the baseline with whatever flavour
normalization you like....

Thomas

  On
Tue, 30 Mar 2010, Oakman, Erin wrote:

> Hello Bobby,
>
> Thanks for raising a very relevant question about the difference between induced and evoked activity !
>
> A good discussion of this can be found here, or attached as text
> https://listserv.surfnet.nl/scripts/wa.cgi?A3=ind0704&L=FIELDTRIP&E=quoted-printable&P=234745&B=--Apple-Mail-1--1050075873&T=text%2Fhtml;%20charset=WINDOWS-1252&XSS=3
>
> There is not a definite way to separate the induced and evoked activity.  The reason is that the sum of the squares is not the same as the square of the sum.
>
> In my very limited experience, I have noticed that researchers sometimes use the term "induced" or "event-related spectral perturbation" to refer to the average of the single-trials power, which has been base-line corrected .  At least that is the case in the "induced power" in this paper:   Krishnan, G. P., W.P. Hetrick, C.A. Brenner, A. Shekhar, A.N. Steffen and B.F. O'Donnell 2009. Steady state and induced auditory gamma deficits in schizophrenia. Neuroimage.
>
>
> Erin
>
>
>
> Hi
>>     A late follow-up to this topic. I have recentrly been musing over how to
>> get a "clean" measure of the non-phase locked activity. I have tried
>> subtracting the ERF out prior to time-frequency computation but this
>> produces quite a bit of artifact...presumably since the single trial data
>> will have considerable ;atency "jitter"
>
> The ERF collapses two sources of "jitter"; in the latency of the transient activity (if it exists) and the phase of ongoing oscillatory activity.
>
>>    The comments from Christian below make sense ( I think) why simply
>> subtracting the two time-frequency power representaions is not valid. But I
>> wonder would this subtractive approach be valid if one worked with the
>> magnitude of the signal rather than power..omitting all the squaring operations?
>
> Computing the magnitude is still a non-linear operation (square root of a sum of squares, rectification, whatever ... ). The problem for why this won't work either resides in averaging part: in the evoked case you have a linear average followed by a non-linear operation, and in the induced case you have an average of the non-linearly transformed quantity. The "catch phrase" here is: the sum of the squares is not the same as the square of the sum! (or the sum of the rectified data is not the same as the rectified sum)
>
> Hope this helps,
> Christian
>
>
>>   If this right theoretically, how to achieve this in Fieldtrip?. Would
>> setting cfg.output = 'fourier then abs'ing the output work. My suspicion is
>> no since the summing is being done first here. Alternatively, does one need
>> to hack the code to return the magnitude.
>>
>> Thanks for your help on this and sorry for waking old threads :)
>>
>>    - Suresh
>>
>> On Fri, 23 Feb 2007 01:44:59 +0100, Christian Hesse
>>  wrote:
>>
>>> One further comment (please see below):
>>>
>>>> Hi Thomas,
>>>>> Following up on this conversation. It seems that the ?induced
>>>>> activity? contains both phase-locked and non-phase-locked
>>>>> activity, whereby the ?evoked? activity contains only phase-locked
>>>>> activity. Is it then kosher to separate these components by linear
>>>>> subtraction? For example, if we first compute the ?induced?
>>>>> activity by averaging power over individual trials, and from that
>>>>> subtract the ?evoked activity? (calculated based on average
>>>>> response) to get the induced activity without any phase-locked
>>>>> activity?
>>>>
>>>> It is not correct to subtract because computing the induced and
>>>> evoked power spectra involves squaring signal amplitudes (a non-
>>>> linear operation), and hence, taking your terminology to refer to
>>>> the instantaneous amplitudes of the signal components (this applies
>>>> to any time-frequency tile)
>>>>> Induced = Phase + Non-Phase
>>>>>
>>>>> And
>>>>>
>>>>> Evoked = Phase
>>>>>
>>>>> Then
>>>>>
>>>>> Non-Phase = Induced ? Evoked
>>>>>
>>>>>
>>>> what you actually get from spectral or time-frequency analysis is
>>>> the power of your MEASURED signal
>>>>
>>>> Induced^2 = (Phase + Non-Phase)^2 = Phase^2 + 2*Phase*Non-Phase +
>>>> Non-Phase^2
>>>>
>>>> Evoked^2 = Phase^2
>>>>
>>>> Then
>>>>
>>>> Induced^2 - Evoked^2 = 2*Phase*Non-Phase + Non-Phase^2  AND NOT Non-
>>>> Phase^2
>>>>
>>> Note that the other crucial thing to consider here is that you are in
>>> one case averaging power over trials over trials:
>>>
>>> E[ (Induced^2)  ] =  E[ (Phase + Non-Phase)^2 ] = E[ (Phase^2 +
>>> 2*Phase*Non-Phase + Non-Phase^2) ] = E[ (Phase^2) ] E[ (Non-
>>> Phase^2) ] + E[ 2*Phase*Non-Phase ]
>>>
>>> this is why taking the square root of sqrt(Induced^2) does not give
>>> (Phase + Non-Phase) but sqrt(E[ (Phase+Non-Phase)^2 ]).
>>>
>>> in the evoked case you are taking the power of the average amplitude
>>>
>>> Evoked^2 = E[ Phase ]^2  (---> note the ^2 on the outside of the sum)
>>>
>>> so in subtracting you are actually assuming that E[Phase]^2 = E
>>> [(Phase)^2] which is unlikely to be accurate the case in finite samples.
>>>
>>> Hope I have not confused others (or myself) here.
>>> Christian
>>>
>>>
>
>
>>
>> This is indeed the approach that I have followed succesfully a couple of
>> times (e.g. Bastiaansen et al., JOCN 2006), although the terminology that
>> you are using is somewhat confusing. I (and I guess most people) would refer
>> to induced activity as that part of the EEG that is non-phase-locked, so I
>> would restate your equation to:
>> induced = EEG - evoked.
>>
>> However, there is a drawback to this approach, since it assumes that the ERP
>> is absolutely stationary over trials. This is not the case in reality (e.g.
>> subjects' attentional level or other states may change from trial to trial,
>> giving rise to variability in the single-trial ERPs). This means that by
>> subtracting the average ERP, one may introduce frequency components in the
>> residual EEG that were not present before. Klimesch, and Kalcher and
>> Pfurtscheller, have come up with ways of scaling the average ERP so as to
>> yield a best fit of the average with each single-trial ERP, but also that
>> approach may be sub-optimal.
>> My latest way around the problem is to run a TF analysis on the untreated
>> EEG (containing both evoked and induced activity), and comparing this to a
>> TF analysis of the subject-averaged ERPs (the evoked activity alone).
>> Qualitative differences between the two analyses can now only be attributed
>> to induced activity.
>>
>> Marcel
>>
>> Thomas Thesen wrote:
>>>
>>> Hi FieldTrippers,
>>>
>>>
>>>
>>> Following up on this conversation. It seems that the ?induced activity?
>> contains both phase-locked and non-phase-locked activity, whereby the
>> ?evoked? activity contains only phase-locked activity. Is it then kosher to
>> separate these components by linear subtraction? For example, if we first
>> compute the ?induced? activity by averaging power over individual trials,
>> and from that subtract the ?evoked activity? (calculated based on average
>> response) to get the induced activity without any phase-locked activity?
>>>
>>>
>>>
>>> So if
>>>
>>> Induced = Phase + Non-Phase
>>>
>>> And
>>>
>>> Evoked = Phase
>>>
>>> Then
>>>
>>> Non-Phase = Induced ? Evoked
>>>
>>>
>>>
>>> Or does the fact that this is a linear operations on data that have been
>> constructed through a non-linear process render this somehow invalid? It has
>> certainly been done before. Your comments would be much appreciated.
>
>
>
>
> ________________________________________
> From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Bobby Stojanoski [stojanoski at UTSC.UTORONTO.CA]
> Sent: Thursday, March 25, 2010 1:33 PM
> To: FIELDTRIP at NIC.SURFNET.NL
> Subject: [FIELDTRIP] Induced activity
>
> Dear Fieldtrippers,
>
> I am a relatively new user of fieldtrip and am very impressed!
>
> I am interested in comparing differences at certain frequencies ? induced 40-100 Hz ? between 2 experimental conditions.  My understanding was that I can calculate induced activity in the gamma range by calculating the power for each trial (subject average -- freqanalysis) and then averaging across subjects (grand average -- freqdescriptives/freqgrandaverage).
>
> To my dismay, when I plotted the results of my grandaverage I found a band of power at 55 - 65 Hz for the entire duration of my epoch. I should add this was not the case when I plotted power across trials for each participant.
>
> Earlier discussions mention computing induced+evoked (using freqanalysis and freqgrandaverage) and subtracting that from evoked (using timelockanalysis+freqanalysis) to get extract induced only activity. However, later posts suggest that this is not a valid approach.
>
> 1. Where have I made my mistake?
>
> 2. If ((induced+evoked)-evoked)) is not valid, what is the correct approach to calculating induced activity at 40 - 100 Hz?
>
> Any help would be greatly appreciated!
>
> Thank you
> Bobby Stojanoski
>
>
>
>
> ----------------------------------
>
> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.
>
> http://listserv.surfnet.nl/archives/fieldtrip.html
>
> http://www.ru.nl/fcdonders/fieldtrip/
>
> 
> > > ------------------------------------------------------------
> This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
> ================================= > > >
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From karl.doron at GMAIL.COM  Wed Mar 31 01:02:12 2010
From: karl.doron at GMAIL.COM (Karl Doron)
Date: Wed, 31 Mar 2010 01:02:12 +0200
Subject: ft_preprocessing for bandpass and hilbert
Message-ID: 

Hello,

I would be grateful for some advice on a couple of processing pipeline
questions.

1. I'm wondering if I need two calls to ft_preprocessing() --with one for
bandpass filtering and then another for a hilbert transform to get the
complex values.

2. Is the cfg.padding applied here separate from that specified during
artifact rejection, i.e., cfg.artfctdef.xxx.fltpadding?


Thanks,
karl doron

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From muthuraman10 at HOTMAIL.COM  Wed Mar 31 16:03:07 2010
From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman)
Date: Wed, 31 Mar 2010 14:03:07 +0000
Subject: DICS on Frequency bands!
Message-ID: 


Hello Fieldtrippers,

 

In order to do the source analysis DICS on a band of frequencies. For example the beta band (15-30 Hz), the source analysis need to repeated for each frequency and grandaverage need to be done for all these frequencies. Or is there a way to do for the whole frequency band?

 

Thanking you 

 

With regards,

M.Muthuraman.
 		 	   		  
_________________________________________________________________
Fight for the top Test spot
http://sports.in.msn.com/cricket/ 
----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From michael.wibral at WEB.DE  Wed Mar 31 22:49:18 2010
From: michael.wibral at WEB.DE (Michael Wibral)
Date: Wed, 31 Mar 2010 22:49:18 +0200
Subject: DICS on Frequency bands!
In-Reply-To: 
Message-ID: 

An HTML attachment was scrubbed...
URL: 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 628 bytes
Desc: not available
URL: 

From r.vandermeij at DONDERS.RU.NL  Mon Mar  1 10:19:22 2010
From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij)
Date: Mon, 1 Mar 2010 10:19:22 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: 
Message-ID: 

Hi Chetan,

We noticed this bug a short time ago, the don't-cluster-over-channels
option is not catched correctly at the moment.
For now, you should be safe if you just change the piece of code you
quoted to (so, just removing the rest):

/channeighbstructmat = makechanneighbstructmat(cfg);/
/ issource = 0;/

This should produce the correct output in your case, and the clustering
should work as intended.

Kind regards,
Roemer van der Meij


On 2/27/2010 8:15 AM, Chetan Sharma wrote:
> Hello everyone,
>
> I'm trying to run the coherence Z nonparametric test to detect
> synchrony between two channels of MEG data. Because of how restrictive
> bonferoni, FDR, and all are, we wanted to use the 'cluster' function
> for cfg.correctm. This call to statistics_montecarlo.m, which says in
> the description that to do clustering in frequency and time, as we
> want to do, we should use an empty cfg.neighbours structure. However,
> when the function calls clusterstats.m, it looks like there is a bug
> in the code. The relevant code is at line 38 in clusterstats.m, and is:
>
> if isfield(cfg, 'neighbours') && ~isempty(cfg.neighbours)
>   channeighbstructmat = makechanneighbstructmat(cfg);
>   issource = 0;
> else
>   issource = 1;
>   % cfg contains dim and inside that are needed for reshaping the data
> to a volume, and inside should behave as a index vector
>   cfg = fixinside(cfg, 'index');
> end
>
> The issue is that the case for an empty cfg.neighbours isn't handled.
> Running the function with an empty cfg.neighbours leads to a bug when
> calculating the clusters, and makes issource=1, when it should be zero
> for freq_time data. The function runs through when I manually set
> issource=0, but I don't know if that is the intended purpose.
>
> Has anyone else run into this problem? Without an example of what
> cfg.neighbours should look like, it's hard to determine if we are
> doing a correct setup. Could someone either send an example of
> cfg.neighbours, or verify this bug and suggest solutions?
>
> thanks and regards,
> -chetan
>
> ----------------------------------
>
> The aim of this list is to facilitate the discussion between users of
> the FieldTrip toolbox, to share experiences and to discuss new ideas
> for MEG and EEG analysis.
>
> http://listserv.surfnet.nl/archives/fieldtrip.html
>
> http://www.ru.nl/fcdonders/fieldtrip/
>

--
Roemer van der Meij MSc
Scientific Programmer&  Data-Analyst
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognition
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
Tel: +31(0)24 3612631
E-mail: r.vandermeij at donders.ru.nl


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK  Wed Mar  3 14:44:23 2010
From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith)
Date: Wed, 3 Mar 2010 13:44:23 +0000
Subject: some small modifications to singleplotER
Message-ID: 

Hi

I have been fiddling about with the singleplotER function a little bit
to try and make it better suited to my needs. I have made a couple of
minor modifications which i think would be useful.

Firstly, in interactive mode, I have added support for doing topoplots
when multiple datasets are have been plotted. I have also added a way of
converting the singleplotER's cfg.maskparamater into highlighted sensors
in the topoplot.

Secondly, I added a little extra bit for plotting the standard error
around the ERPs. It calculates standard error from the data.var field
and then plots it around the ERP as an area plot. This can be turned on
using: 'cfg.plotstderr = 'yes'. I have added an example of what this
looks like with 2 ERPs. It can look a little busy if plotting more than
3 ERPs on the same plot.

I'd be happy for these modifications to be included in fieldtrip release
and if any one has any suggestions for improving them i would welcome
them. I've labelled all my additions as 'MD MODIFIED'.

Many thanks

Mark

--

Mark Drakesmith
PhD Student

Neuroscience and Aphasia Research Unit (NARU)
University of Manchester


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: erp_with_stderr.jpg
Type: image/jpeg
Size: 55743 bytes
Desc: not available
URL: 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: singleplotER.m
URL: 

From ronitibon at GMAIL.COM  Wed Mar  3 14:33:22 2010
From: ronitibon at GMAIL.COM (Roni Tibon)
Date: Wed, 3 Mar 2010 14:33:22 +0100
Subject: A typo in the biosemi64.lay file
Message-ID: 

Hi all,

I want to report a problem in the biosemi64.lay file: the AFz channel
(number 37) appears in the file as Afz (with lower case 'f'). 

This, of course, leads to problems with topoplots etc. 

Roni

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK  Wed Mar  3 15:17:12 2010
From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith)
Date: Wed, 3 Mar 2010 14:17:12 +0000
Subject: bug using planarcombine and with planar 4d/bti data
Message-ID: 

Hi

There seems to be a small bug with using using planarcombine with 4D/BTI
data after using megplanar. It reports the gradiometer type to be
'bti248' instead of 'bti248_planar' which it should be. The problem is
with senstype function, where it puills the definitions from .hdr.grad
substructure first instead of .grad substrutre (line 109) which is the
one that  has the planar-transofrmed definitions.

I just swapped the order inwhich the function looks for gradiometer
definitions so that it looks in .grad first instead of .hdr.grad. It now
correctly reports the gadiometer type as 'bti248_planar'.

Many thanks


Mark

Mark Drakesmith
PhD Student

Neuroscience and Aphasia Research Unit (NARU)
University of Manchester

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From lucie.charles.ens at GOOGLEMAIL.COM  Wed Mar  3 15:16:51 2010
From: lucie.charles.ens at GOOGLEMAIL.COM (Lucie Charles)
Date: Wed, 3 Mar 2010 15:16:51 +0100
Subject: Label display problem with ft_topoplotER for EEG-MEG data
Message-ID: 

Hi everyone ,

I noticed a small bug using ft_topoplotER with my EEG-MEG data that I think
I managed to correct.

When I try to use the option :

*cfg.highlight = ' labels '
*or *
cfg.marker  = ' labels '*

I have an error message saying that it doesn't find coordinates for some
labels (see at the end for the entire message). I looked into it and it
seems that EEG channels are always in the list of channels that the function
tries to plot even if I'm trying to plot only magnetometers for example.

I made two small changes at the ft_topoplotER and it seems to solve the
problem :

*line 606 >  templay.label      =  data.label(labelindex);
*instead of
*templay.label      =  **channelselection(cfg.highlightchannel{icell},
data.label);*

*line 631 >  templay.label    = data.label(labelindex); *
instead of  *
templay.label    =
channelselection(setdiff(1:length(data.label),highlightchansel),
data.label);

*This solution works fine for me but I'm not sure that it will work in any
case.*
*
Still I hope it helps.

Cheers,

Lucie CHARLES



Error Message :

*??? Error using ==> text
Each string specified must have a corresponding set of coordinates

Error in ==> plot_lay at 73
  text(X+labeloffset, Y+(labeloffset*1.5), Lbl,'fontsize',labelsize);

Error in ==> ft_topoplotER at 617
    plot_lay(templay,'box','no','label',labelflg,'point','yes',...

Error in ==> topoplotER at 17
[varargout{1:nargout}] = funhandle(varargin{:});*

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From jan.schoffelen at DONDERS.RU.NL  Wed Mar  3 15:32:52 2010
From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen)
Date: Wed, 3 Mar 2010 15:32:52 +0100
Subject: bug using planarcombine and with planar 4d/bti data
In-Reply-To: <4B8E6F68.5090602@postgrad.manchester.ac.uk>
Message-ID: 

Dear Mark,

Thanks for the suggestion. I was wondering whether you are using an up-
to-date version of fieldtrip, because I looked up the log of senstype
and as far as I can see this issue has been resolved a while ago. I
must confess that I have not recently encountered your reported issue
on my own bti-data.

Best

Jan-Mathijs


On Mar 3, 2010, at 3:17 PM, Mark Drakesmith wrote:

> Hi
>
> There seems to be a small bug with using using planarcombine with 4D/
> BTI data after using megplanar. It reports the gradiometer type to
> be 'bti248' instead of 'bti248_planar' which it should be. The
> problem is with senstype function, where it puills the definitions
> from .hdr.grad substructure first instead of .grad substrutre (line
> 109) which is the one that  has the planar-transofrmed definitions.
>
> I just swapped the order inwhich the function looks for gradiometer
> definitions so that it looks in .grad first instead of .hdr.grad. It
> now correctly reports the gadiometer type as 'bti248_planar'.
>
> Many thanks
>
>
> Mark
>
> Mark Drakesmith
> PhD Student
>
> Neuroscience and Aphasia Research Unit (NARU)
> University of Manchester
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users
> of the FieldTrip  toolbox, to share experiences and to discuss new
> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html
>  and http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From maess at CBS.MPG.DE  Wed Mar  3 15:40:29 2010
From: maess at CBS.MPG.DE (Burkhard Maess)
Date: Wed, 3 Mar 2010 15:40:29 +0100
Subject: Summer School on Multimodal Approaches in Neuroscience, Leipzig,
 Germany, July 19 - 21, 2010
In-Reply-To: <16025891.1164171267627150012.JavaMail.root@zimbra>
Message-ID: 

Dear fieldtrip community,

sorry for advertising - On behalf of Bob Turner I would like to invite interested PhD students to come to Leipzig this summer.
Best wishes,
Burkhard

........................................................................

Dear colleagues,

*International Summer School on Multimodal Approaches in Neuroscience*
Leipzig, Germany, July 19 - 21, 2010

Keynote Lecturers:



19th July: Multimodal Methods

    * Prof. Stefan Debener (University of Oldenburg, Germany)
    * Prof. Vincent Walsh (University College London, UK)
    * Prof. Richard Buxton (University of California, San Diego, USA)


20th July: Multimodal Structures

    * Prof. Dr. Jon Kaas (Vanderbilt University, USA)
    * Prof. Dr Simon Eickhoff (RWTH Aachen University and Research
      Center Juelich, Germany)
    * Dr. Saad Jbabdi (University of Oxford, UK)


21st July: Multimodal Functions

    * Prof. Guy Orban (Catholic University of Leuven, Belgium)
    * Prof. Luciano Fadiga (University of Ferrara & Italian Institute of
      Technology, Genova, Italy)
    * Prof. Asif Ghazanfar (Princeton University, USA)


Please circulate this announcement among your colleagues, your graduate students, and any interested researchers.

For more details please see http://imprs-neurocom.mpg.de/summerschool.

There is no registration fee for the summer school.

Target group: Graduate students interested in any of the disciplines comprising cognitive neuroscience

Course dates:
July 19 - 21, 2010

Location:
Max Planck Institute for Human Cognitive and Brain Sciences
Stephanstrasse 1a
04103 Leipzig, Germany

Working language: English

Registration deadline: April 30, 2010
Online registration: http://imprs-neurocom.mpg.de/summerschool/apply

Space is limited: early registration will avoid disappointment.

Best regards,

Bob Turner
Head, *International Max Planck Research School (IMPRS) "Neuroscience of Communication: Function, Structure, and Plasticity"*

--
Professor Robert Turner
Director, Department of Neurophysics
Max-Planck-Institute for Human Cognitive and Brain Sciences
Stephanstrasse 1A
04103 Leipzig
Germany

Tel: +49 341 9940-2242
Fax: +49 341 9940-2448
Email: turner at cbs.mpg.de
www.cbs.mpg.de



..............................................

Dr. Burkhard Maess
Max Planck Institute for Human Cognitive and Brain Sciences
Stephanstr. 1a, P.O. Box 500355, D-04303 Leipzig
Aussenstelle Bennewitz, phone/fax: +49(3425)8875-2526/-2511   mail: maess 'at' cbs.mpg.de,           http://www.cbs.mpg.de

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From karl.doron at GMAIL.COM  Thu Mar  4 10:52:05 2010
From: karl.doron at GMAIL.COM (Karl Doron)
Date: Thu, 4 Mar 2010 10:52:05 +0100
Subject: custom trialfun/begin sample problem
Message-ID: 

Hello,

I'm running a modified version of your custom trialfun script. Because I
have 'triggers' on data(1,N) and 'responses' on data(2,N), I simply did this:

% search for all "trigger" and "response" events
value  = [event.value]';

sample = [event.sample]';

% determine the number of samples before and after the trigger
pretrig  = -cfg.trialdef.prestim  * hdr.Fs; %0.5
posttrig =  cfg.trialdef.poststim * hdr.Fs; %3.5


Then I'm looking for value(j)==62 followed by value(j+1)==112, followed by
response value(j+2)==1024. All this seems to work fine. However, after
running definetrial, my first trial in cfg.trl begins with a negative
number, equal to the offset of 254.xx samples. 

However, in cfg.event, the first "62" trigger begins at sample 35557, not at
sample 1. This isn't happening in any of my other trialfun scripts.

Thank you for any help!

Karl Doron
PhD Candidate
UC, Santa Barbara

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From aostendorf at BESA.DE  Thu Mar  4 11:27:33 2010
From: aostendorf at BESA.DE (Andrea Ostendorf)
Date: Thu, 4 Mar 2010 11:27:33 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: <4B8B869A.8070704@donders.ru.nl>
Message-ID: 

Dear Roemer,

regarding your reply to Chetan's question / observation: Can I ask you
whether what I currently do is correct?
I have got time-frequency data, which I sometimes want to cluster over
channels or not. So I do the following

o) do the modification you recommended to Chetan
      channeighbstructmat = makechanneighbstructmat(cfg);
  	issource = 0;
	(commented out the surrounding lines)
o) edit cfg.channel
o) if clustering over channels is desired:
	edit cfg.neighbourdist and cfg.minnbchan
   else (no clustering over channels or if channels are averaged):
	cfg.neighbours = {}

This works and there is a marked difference whether I cluster over channels
or not.
I am just not sure whether it is correct.
Thanks a lot for your help so far!

All the best
Andrea

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From karl.doron at GMAIL.COM  Thu Mar  4 11:31:33 2010
From: karl.doron at GMAIL.COM (Karl Doron)
Date: Thu, 4 Mar 2010 11:31:33 +0100
Subject: custom trialfun/begin sample problem
Message-ID: 

Hello,

I was able to answer my own question. event.type at sample 1 was of type
'trial' but didn't have a value (value=[]).

After read_event() in my trialfun, I added event(1,1).value=1;

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From r.vandermeij at DONDERS.RU.NL  Thu Mar  4 15:00:59 2010
From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij)
Date: Thu, 4 Mar 2010 15:00:59 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: 
Message-ID: 

Hi Andrea,

For a quick work-around the first bullet-point should work out fine, I
don't know why you want to edit cfg.channel though.
However, if you /do/ want to cluster over channels it is necessary to
specify a neighbourhood structure, see ft_neighbourselection for how to
do that. The neighbourhood structure you create by doing this should be
placed in cfg.neighbours. The result could be the same if you edit the
cfg options in the subfunction clusterstat though, but I haven't used
those fields directly.

Hope this helps,
Kind regards,
Roemer



On 3/4/2010 11:27 AM, Andrea Ostendorf wrote:
> Dear Roemer,
>
> regarding your reply to Chetan's question / observation: Can I ask you
> whether what I currently do is correct?
> I have got time-frequency data, which I sometimes want to cluster over
> channels or not. So I do the following
>
> o) do the modification you recommended to Chetan
>        channeighbstructmat = makechanneighbstructmat(cfg);
>    	issource = 0;
> 	(commented out the surrounding lines)
> o) edit cfg.channel
> o) if clustering over channels is desired:
> 	edit cfg.neighbourdist and cfg.minnbchan
>     else (no clustering over channels or if channels are averaged):
> 	cfg.neighbours = {}
>
> This works and there is a marked difference whether I cluster over channels
> or not.
> I am just not sure whether it is correct.
> Thanks a lot for your help so far!
>
> All the best
> Andrea
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>

--
Roemer van der Meij MSc
Scientific Programmer&  Data-Analyst
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognition
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
Tel: +31(0)24 3612631
E-mail: r.vandermeij at donders.ru.nl


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From aostendorf at BESA.DE  Thu Mar  4 15:13:38 2010
From: aostendorf at BESA.DE (Andrea Ostendorf)
Date: Thu, 4 Mar 2010 15:13:38 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: <4B8FBD1B.9050809@donders.ru.nl>
Message-ID: 

Dear Roemer,

thanks. Yes, this helps.

>I don't know why you want to edit cfg.channel though.

Sorry, I just meant that I have to specify the channels which I want to send
to ft_freqstatistics.

All the best
Andrea

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From chesharm at STANFORD.EDU  Thu Mar  4 16:51:03 2010
From: chesharm at STANFORD.EDU (Chetan Sharma)
Date: Thu, 4 Mar 2010 07:51:03 -0800
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: <0BB62A997A9349ECAFC51985354DB86A@LAT6500Andrea>
Message-ID: 

I am still running into bugs when doing the freq_time clustering. I am
testing for coherence between the hemispheres during a task, and now it runs
into problems at clusterstat() at line 175. The command is:

posclusobs = findcluster(reshape(postailobs,
      [cfg.dim,1]),channeighbstructmat,cfg.minnbchan);

The problem is that postailobs has size [nfreq*ntime, 1], while the cfg.dim
is [nchan nfreq ntime], where nchan=2 in this case. It seems like it wants
to reshape it into size [nfreq, ntime, 1]. Is this indeed the case?

And could someone help me out by explaining a bit more about when one would
choose for cfg.clusterthreshold the different values,
'nonparametric_common', 'nonparametric_individual', and 'parametric' when
testing for coherence in different brain areas? I have read over the
documentation and the code but am still somewhat unsure.

Thank you for the help,
-chetan

On Thu, Mar 4, 2010 at 6:13 AM, Andrea Ostendorf  wrote:

> Dear Roemer,
>
> thanks. Yes, this helps.
>
> >I don't know why you want to edit cfg.channel though.
>
> Sorry, I just meant that I have to specify the channels which I want to
> send
> to ft_freqstatistics.
>
> All the best
> Andrea
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From chesharm at STANFORD.EDU  Thu Mar  4 17:15:31 2010
From: chesharm at STANFORD.EDU (Chetan Sharma)
Date: Thu, 4 Mar 2010 08:15:31 -0800
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: 
Message-ID: 

And also, what should the channeighbstructmat look like when doing freq_time
clustering? When I do the fix mentioned above, it returns a 2x2 matrix of
zeros, which causes problems in findcluster(). I've read over the
neighbourselection(), but it doesn't give any clues for freq_time
clustering.

On Thu, Mar 4, 2010 at 7:51 AM, Chetan Sharma  wrote:

> I am still running into bugs when doing the freq_time clustering. I am
> testing for coherence between the hemispheres during a task, and now it runs
> into problems at clusterstat() at line 175. The command is:
>
> posclusobs = findcluster(reshape(postailobs,
>       [cfg.dim,1]),channeighbstructmat,cfg.minnbchan);
>
> The problem is that postailobs has size [nfreq*ntime, 1], while the cfg.dim
> is [nchan nfreq ntime], where nchan=2 in this case. It seems like it wants
> to reshape it into size [nfreq, ntime, 1]. Is this indeed the case?
>
> And could someone help me out by explaining a bit more about when one would
> choose for cfg.clusterthreshold the different values,
> 'nonparametric_common', 'nonparametric_individual', and 'parametric' when
> testing for coherence in different brain areas? I have read over the
> documentation and the code but am still somewhat unsure.
>
> Thank you for the help,
> -chetan
>
>
> On Thu, Mar 4, 2010 at 6:13 AM, Andrea Ostendorf wrote:
>
>> Dear Roemer,
>>
>> thanks. Yes, this helps.
>>
>> >I don't know why you want to edit cfg.channel though.
>>
>> Sorry, I just meant that I have to specify the channels which I want to
>> send
>> to ft_freqstatistics.
>>
>> All the best
>> Andrea
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the
>> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>> and EEG analysis. See also
>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>> http://www.ru.nl/neuroimaging/fieldtrip.
>>
>
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK  Thu Mar  4 21:23:45 2010
From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith)
Date: Thu, 4 Mar 2010 20:23:45 +0000
Subject: bug using planarcombine and with planar 4d/bti data
In-Reply-To: <801C1274-810A-428E-8F27-1484CEB1FC11@donders.ru.nl>
Message-ID: 

Hi.

thanks for letting me know. I had updsated my fieldtrip quite recently
but i think this file didnt get updated for some reason. I've done
another update and the issue is now resolved for good.

Thanks
Mark


> Dear Mark,
>
> Thanks for the suggestion. I was wondering whether you are using an
> up-to-date version of fieldtrip, because I looked up the log of
> senstype and as far as I can see this issue has been resolved a while
> ago. I must confess that I have not recently encountered your reported
> issue on my own bti-data.
>
> Best
>
> Jan-Mathijs
>
>
> On Mar 3, 2010, at 3:17 PM, Mark Drakesmith wrote:
>
>> Hi
>>
>> There seems to be a small bug with using using planarcombine with
>> 4D/BTI data after using megplanar. It reports the gradiometer type to
>> be 'bti248' instead of 'bti248_planar' which it should be. The
>> problem is with senstype function, where it puills the definitions
>> from .hdr.grad substructure first instead of .grad substrutre (line
>> 109) which is the one that  has the planar-transofrmed definitions.
>>
>> I just swapped the order inwhich the function looks for gradiometer
>> definitions so that it looks in .grad first instead of .hdr.grad. It
>> now correctly reports the gadiometer type as 'bti248_planar'.
>>
>> Many thanks
>>
>>
>> Mark
>>
>> Mark Drakesmith
>> PhD Student
>>
>> Neuroscience and Aphasia Research Unit (NARU)
>> University of Manchester
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of
>> the FieldTrip  toolbox, to share experiences and to discuss new ideas
>> for MEG and EEG analysis. See also
>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>> http://www.ru.nl/neuroimaging/fieldtrip.
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of
> the FieldTrip  toolbox, to share experiences and to discuss new ideas
> for MEG and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.


--

Mark Drakesmith
PhD Student

Neuroscience and Aphasia Research Unit (NARU)
University of Manchester

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK  Thu Mar  4 23:02:58 2010
From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith)
Date: Thu, 4 Mar 2010 22:02:58 +0000
Subject: quiestions about planar transformation
Message-ID: 

Hi all

I am currently a little confused as to how to properly use megplanar and
combineplanar for my 4D 148 axial gadiometer data. I would ideally like
to use planar gradients as it will make subsequent ERF and frequency
analysis easier to interpret. My question is when should I combine the v
and h components?

Looking  at some previous posts it is suggested that you should combine
the gradients on an individual basis, but when I do this i get an almost
flat amplitude across all sensors which doesn't look right (see attached
image, 'bad_planar'). When i use combineplanar after averaging, the data
the data looks ok (good_planar). I get the same result doing both
megplanar and combineplanar on the averaged data.

I just want to double check that the 'bad' planar fields i am getting
are correct and not due to a bug in field trip. Intuitively, I would
expect combining the components on the individual level world be more
accurate as it would prevent fields from opposeingly orientated dipoles
cancelling out when averaged.

If it is the case that you should use combineplanar after trial
averaging, how do you go about combining after statistical tests? i.e.
when you have a p-value or a test statistic for the v and h components
for each sensor, how would you combine these together?

Any help or advice would be appreciated.

Many thanks

Mark

--

Mark Drakesmith
PhD Student

Neuroscience and Aphasia Research Unit (NARU)
University of Manchester


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bad_planar.png
Type: image/png
Size: 18840 bytes
Desc: not available
URL: 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: good_planar.png
Type: image/png
Size: 26461 bytes
Desc: not available
URL: 

From jan.schoffelen at DONDERS.RU.NL  Fri Mar  5 11:12:03 2010
From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen)
Date: Fri, 5 Mar 2010 11:12:03 +0100
Subject: quiestions about planar transformation
In-Reply-To: <4B902E12.7080405@postgrad.manchester.ac.uk>
Message-ID: 

Dear Mark,

There may be some confusion here, relating to whether we are talking
about frequency domain data (=power, always a positive value), or
whether we are talking about time domain data (=amplitude, can be
positive and negative).

Single trial combination of planar gradient transformed axial gradient
(or magnetometer) data is not the best thing to do for time domain
stuff.
Reason: combination takes place by applying Pythagoras' rule to the
_dV and _dH pairs, and when the individual _dH and _dV components are
noisy, the noise is also squared, added, and squar-rooted, which leads
to an 'amplification' of noise. Not good. It works after trial-
averaging because you squeeze out the noise first and Pythagoras the
reduced-noise signals.

For frequency domain data this is not an issue.
Reason: combination usually takes place by just adding the _dV and _dH
pairs (power is a squared value already). This is just a linear step
(just like averaging) and the order of performing the linear steps
does not matter for the result. So single trial combination prior to
averaging or vice versa should not make a difference here.

In general I would advise against trying to do statistics on the
combined planar gradient and use it for visualization purposes only.
Alternatively, one could come up with a non-parametric statistical
test (permutation), in which I could think of a way of extracting a p-
value from a single _dH/_dV pair combined. But this would be a
different story...

Best,

Jan-Mathijs


> Hi all
>
> I am currently a little confused as to how to properly use megplanar
> and combineplanar for my 4D 148 axial gadiometer data. I would
> ideally like to use planar gradients as it will make subsequent ERF
> and frequency analysis easier to interpret. My question is when
> should I combine the v and h components?
>
> Looking  at some previous posts it is suggested that you should
> combine the gradients on an individual basis, but when I do this i
> get an almost flat amplitude across all sensors which doesn't look
> right (see attached image, 'bad_planar'). When i use combineplanar
> after averaging, the data the data looks ok (good_planar). I get the
> same result doing both megplanar and combineplanar on the averaged
> data.
>
> I just want to double check that the 'bad' planar fields i am
> getting are correct and not due to a bug in field trip. Intuitively,
> I would expect combining the components on the individual level
> world be more accurate as it would prevent fields from opposeingly
> orientated dipoles cancelling out when averaged.
>
> If it is the case that you should use combineplanar after trial
> averaging, how do you go about combining after statistical tests?
> i.e. when you have a p-value or a test statistic for the v and h
> components for each sensor, how would you combine these together?
>
> Any help or advice would be appreciated.
>
> Many thanks
>
> Mark

Dr. J.M. (Jan-Mathijs) Schoffelen
Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
Telephone: 0031-24-3668063

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From michael.wibral at WEB.DE  Fri Mar  5 11:40:23 2010
From: michael.wibral at WEB.DE (Michael Wibral)
Date: Fri, 5 Mar 2010 11:40:23 +0100
Subject: quiestions about planar transformation
In-Reply-To: <9A2631B3-A19C-4CF4-A473-F0316F441C9F@donders.ru.nl>
Message-ID: 

Dear Mark, dear Jan-Mathijs,

I fully agree with JM on not doing statistics (or even averaging) on the planar (absolute) gradient values when working in the time domain. What I resorted to is doing all statistics on fields and presenting that. I addition I supply the planar gradient of the final raw (field) effect underlying the statistics - solely on a desriptive level.

The fundamental underlying problem is that you go from a scalar field and massively paralellel univariate statistics to a vector field and, hence, truly multivariate statistics (e.g. because the local gradient vectors will rotate across the course of an ERP/ERF for example). Coming up with a p-value there sounds difficult to me. I always wondered how people with planar gradiometer devices solve that issue when doing time-domain stuff? Maybe there are solutions out there already?

Michael

-----Ursprüngliche Nachricht-----
Von: jan-mathijs schoffelen 
Gesendet: Mar 5, 2010 11:12:03 AM
An: FIELDTRIP at NIC.SURFNET.NL
Betreff: Re: [FIELDTRIP] quiestions about planar transformation

>Dear Mark,
>
>There may be some confusion here, relating to whether we are talking  
>about frequency domain data (=power, always a positive value), or  
>whether we are talking about time domain data (=amplitude, can be  
>positive and negative).
>
>Single trial combination of planar gradient transformed axial gradient  
>(or magnetometer) data is not the best thing to do for time domain  
>stuff.
>Reason: combination takes place by applying Pythagoras' rule to the  
>_dV and _dH pairs, and when the individual _dH and _dV components are  
>noisy, the noise is also squared, added, and squar-rooted, which leads  
>to an 'amplification' of noise. Not good. It works after trial- 
>averaging because you squeeze out the noise first and Pythagoras the  
>reduced-noise signals.
>
>For frequency domain data this is not an issue.
>Reason: combination usually takes place by just adding the _dV and _dH  
>pairs (power is a squared value already). This is just a linear step  
>(just like averaging) and the order of performing the linear steps  
>does not matter for the result. So single trial combination prior to  
>averaging or vice versa should not make a difference here.
>
>In general I would advise against trying to do statistics on the  
>combined planar gradient and use it for visualization purposes only.  
>Alternatively, one could come up with a non-parametric statistical  
>test (permutation), in which I could think of a way of extracting a p- 
>value from a single _dH/_dV pair combined. But this would be a  
>different story...
>
>Best,
>
>Jan-Mathijs
>
>
>> Hi all
>>
>> I am currently a little confused as to how to properly use megplanar  
>> and combineplanar for my 4D 148 axial gadiometer data. I would  
>> ideally like to use planar gradients as it will make subsequent ERF  
>> and frequency analysis easier to interpret. My question is when  
>> should I combine the v and h components?
>>
>> Looking  at some previous posts it is suggested that you should  
>> combine the gradients on an individual basis, but when I do this i  
>> get an almost flat amplitude across all sensors which doesn't look  
>> right (see attached image, 'bad_planar'). When i use combineplanar  
>> after averaging, the data the data looks ok (good_planar). I get the  
>> same result doing both megplanar and combineplanar on the averaged  
>> data.
>>
>> I just want to double check that the 'bad' planar fields i am  
>> getting are correct and not due to a bug in field trip. Intuitively,  
>> I would expect combining the components on the individual level  
>> world be more accurate as it would prevent fields from opposeingly  
>> orientated dipoles cancelling out when averaged.
>>
>> If it is the case that you should use combineplanar after trial  
>> averaging, how do you go about combining after statistical tests?  
>> i.e. when you have a p-value or a test statistic for the v and h  
>> components for each sensor, how would you combine these together?
>>
>> Any help or advice would be appreciated.
>>
>> Many thanks
>>
>> Mark
>
>Dr. J.M. (Jan-Mathijs) Schoffelen
>Donders Institute for Brain, Cognition and Behaviour,
>Centre for Cognitive Neuroimaging,
>Radboud University Nijmegen, The Netherlands
>J.Schoffelen at donders.ru.nl
>Telephone: 0031-24-3668063
>
>----------------------------------
>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 628 bytes
Desc: not available
URL: 

From aostendorf at BESA.DE  Fri Mar  5 12:27:00 2010
From: aostendorf at BESA.DE (Andrea Ostendorf)
Date: Fri, 5 Mar 2010 12:27:00 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: 
Message-ID: 

Dear Roemer,

Thanks for your advice.
Since I would like to use Fieldtrip for TFC data and for images, with an
additional cluster-over-channels option in the case of the TFC data, I now
edited clusterstat.
If called from a TFC script (I introduced a field in cfg for this), it uses
the correction you gave to Chetan, otherwise it uses the former code.
This appears to work and the results make sense. However, I ask myself
whether there is an option for managing this without editing any Fieldtrip
functions, just by cfg options?
Any help would be greatly appreciated.

Thanks!
All the best
Andrea


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK  Fri Mar  5 12:47:43 2010
From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith)
Date: Fri, 5 Mar 2010 11:47:43 +0000
Subject: quiestions about planar transformation
In-Reply-To: <8745792.274828.1267785623641.JavaMail.fmail@mwmweb056>
Message-ID: 

Hi

Thanks very much for your comments. I'll stick to using the axial
gradients for stats for now. I was just concerned about the issue with
dipoles in the same location but different orientations potentially
cancelling each other out when analysising the axial gradients.

  I suppose, if looking at within-subjects trials, if a set of dipoles
are  in the same location but showing large variability in orientation,
they should not be considered anymore significant than dipoles that have
different spatial locations. But between subjects, there is alot of
varaiblity in cortex topology which may lead to functionally-equivilent
dipoles haveing vastly different orientations.

I'm not sure how much this is worth worrying about. Do you ahve any
thoguhts on this?

Thanks again

Mark

> Dear Mark, dear Jan-Mathijs,
>
> I fully agree with JM on not doing statistics (or even averaging) on the planar (absolute) gradient values when working in the time domain. What I resorted to is doing all statistics on fields and presenting that. I addition I supply the planar gradient of the final raw (field) effect underlying the statistics - solely on a desriptive level.
>
> The fundamental underlying problem is that you go from a scalar field and massively paralellel univariate statistics to a vector field and, hence, truly multivariate statistics (e.g. because the local gradient vectors will rotate across the course of an ERP/ERF for example). Coming up with a p-value there sounds difficult to me. I always wondered how people with planar gradiometer devices solve that issue when doing time-domain stuff? Maybe there are solutions out there already?
>
> Michael
>
> -----Ursprüngliche Nachricht-----
> Von: jan-mathijs schoffelen
> Gesendet: Mar 5, 2010 11:12:03 AM
> An: FIELDTRIP at NIC.SURFNET.NL
> Betreff: Re: [FIELDTRIP] quiestions about planar transformation
>
>
>> Dear Mark,
>>
>> There may be some confusion here, relating to whether we are talking
>> about frequency domain data (=power, always a positive value), or
>> whether we are talking about time domain data (=amplitude, can be
>> positive and negative).
>>
>> Single trial combination of planar gradient transformed axial gradient
>> (or magnetometer) data is not the best thing to do for time domain
>> stuff.
>> Reason: combination takes place by applying Pythagoras' rule to the
>> _dV and _dH pairs, and when the individual _dH and _dV components are
>> noisy, the noise is also squared, added, and squar-rooted, which leads
>> to an 'amplification' of noise. Not good. It works after trial-
>> averaging because you squeeze out the noise first and Pythagoras the
>> reduced-noise signals.
>>
>> For frequency domain data this is not an issue.
>> Reason: combination usually takes place by just adding the _dV and _dH
>> pairs (power is a squared value already). This is just a linear step
>> (just like averaging) and the order of performing the linear steps
>> does not matter for the result. So single trial combination prior to
>> averaging or vice versa should not make a difference here.
>>
>> In general I would advise against trying to do statistics on the
>> combined planar gradient and use it for visualization purposes only.
>> Alternatively, one could come up with a non-parametric statistical
>> test (permutation), in which I could think of a way of extracting a p-
>> value from a single _dH/_dV pair combined. But this would be a
>> different story...
>>
>> Best,
>>
>> Jan-Mathijs
>>
>>
>>
>>> Hi all
>>>
>>> I am currently a little confused as to how to properly use megplanar
>>> and combineplanar for my 4D 148 axial gadiometer data. I would
>>> ideally like to use planar gradients as it will make subsequent ERF
>>> and frequency analysis easier to interpret. My question is when
>>> should I combine the v and h components?
>>>
>>> Looking  at some previous posts it is suggested that you should
>>> combine the gradients on an individual basis, but when I do this i
>>> get an almost flat amplitude across all sensors which doesn't look
>>> right (see attached image, 'bad_planar'). When i use combineplanar
>>> after averaging, the data the data looks ok (good_planar). I get the
>>> same result doing both megplanar and combineplanar on the averaged
>>> data.
>>>
>>> I just want to double check that the 'bad' planar fields i am
>>> getting are correct and not due to a bug in field trip. Intuitively,
>>> I would expect combining the components on the individual level
>>> world be more accurate as it would prevent fields from opposeingly
>>> orientated dipoles cancelling out when averaged.
>>>
>>> If it is the case that you should use combineplanar after trial
>>> averaging, how do you go about combining after statistical tests?
>>> i.e. when you have a p-value or a test statistic for the v and h
>>> components for each sensor, how would you combine these together?
>>>
>>> Any help or advice would be appreciated.
>>>
>>> Many thanks
>>>
>>> Mark
>>>
>> Dr. J.M. (Jan-Mathijs) Schoffelen
>> Donders Institute for Brain, Cognition and Behaviour,
>> Centre for Cognitive Neuroimaging,
>> Radboud University Nijmegen, The Netherlands
>> J.Schoffelen at donders.ru.nl
>> Telephone: 0031-24-3668063
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


--

Mark Drakesmith
PhD Student

Neuroscience and Aphasia Research Unit (NARU)
University of Manchester

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From michael.wibral at WEB.DE  Fri Mar  5 15:59:39 2010
From: michael.wibral at WEB.DE (Michael Wibral)
Date: Fri, 5 Mar 2010 15:59:39 +0100
Subject: Problem with Fieldtrip conversion
Message-ID: 

Dear FT/SPM Listusers,

I am having a (hopefully) trivial problem with converting Fieldtrip MEG data structures to spm8.
Here's what I did:

0. Patch spm8 to r3684
1. Load the Fieldtrip data from /path/filename. They contain a variable (FTstruct) named DataFT.
2. Call spm_eeg_ft2spm(DataFT, '/path/filename')

The error I get is: 

checkmeeg: no channel type, assigning default
checkmeeg: no units, assigning default
checkmeeg: transform type missing, assigning default
checkmeeg: data scale missing, assigning default

??? Undefined function or method 'fname' for input arguments of type 'struct'. 
Error in ==> file_array.subsref>access_fields at 129         case 'fname',      t = fname(obj);

Error in ==> file_array.subsref at 17         varargout = access_fields(obj,subs);

Error in ==> checkmeeg at 203     if ~isa(meegstruct.data.y, 'file_array') || isempty(fileparts(meegstruct.data.y.fname)) ...

Error in ==> meeg.meeg at 109         [OK D] = checkmeeg(varargin{1}, 'basic');

Error in ==> spm_eeg_ft2spm at 138 D = meeg(D);  

Any help is very much appreciated.

Michael

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 628 bytes
Desc: not available
URL: 

From v.litvak at ION.UCL.AC.UK  Fri Mar  5 16:17:49 2010
From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak)
Date: Fri, 5 Mar 2010 15:17:49 +0000
Subject: Problem with Fieldtrip conversion
In-Reply-To: <18953776.432346.1267801179379.JavaMail.fmail@mwmweb053>
Message-ID: 

Hi Michael,

I'm glad to hear that you started looking at SPM :-)  This is more of
an SPM than a Fieldtrip question so perhaps the discussion should move
to the SPM mailing list. Just from looking at the error message the
problem doesn't look familiar. Could you send me your file with the
struct (via yousendit.com if it's big) and I'll try to reproduce it?

Best,

Vladimir

On Fri, Mar 5, 2010 at 2:59 PM, Michael Wibral  wrote:
> Dear FT/SPM Listusers,
>
> I am having a (hopefully) trivial problem with converting Fieldtrip MEG data structures to spm8.
> Here's what I did:
>
> 0. Patch spm8 to r3684
> 1. Load the Fieldtrip data from /path/filename. They contain a variable (FTstruct) named DataFT.
> 2. Call spm_eeg_ft2spm(DataFT, '/path/filename')
>
> The error I get is:
>
> checkmeeg: no channel type, assigning default
> checkmeeg: no units, assigning default
> checkmeeg: transform type missing, assigning default
> checkmeeg: data scale missing, assigning default
>
> ??? Undefined function or method 'fname' for input arguments of type 'struct'.
> Error in ==> file_array.subsref>access_fields at 129         case 'fname',      t = fname(obj);
>
> Error in ==> file_array.subsref at 17         varargout = access_fields(obj,subs);
>
> Error in ==> checkmeeg at 203     if ~isa(meegstruct.data.y, 'file_array') || isempty(fileparts(meegstruct.data.y.fname)) ...
>
> Error in ==> meeg.meeg at 109         [OK D] = checkmeeg(varargin{1}, 'basic');
>
> Error in ==> spm_eeg_ft2spm at 138 D = meeg(D);
>
> Any help is very much appreciated.
>
> Michael
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From thomas.hartmann at UNI-KONSTANZ.DE  Fri Mar  5 17:02:24 2010
From: thomas.hartmann at UNI-KONSTANZ.DE (Thomas Hartmann)
Date: Fri, 5 Mar 2010 17:02:24 +0100
Subject: reading bdf+ files?
Message-ID: 

hi,
i try to read bdf+ files created using edflib
(http://www.teuniz.net/edflib/)

although the file looks good in the reader, fieldtrip complains about
"channels with different sampling rate not supported". i debugged the
code. the error occurs because bdf+ files have an additional channel
storeing events. this one seems to have a different samplerate.

i disabled these checks which resulted in a new error-message:
"One ore more output arguments not assigned during call to "read_24bit"."

is the support of fieldtrip restricted to bdf and not bdf+-files? or is
there something wrong with the lib i use to write the file?

thanks a lot in advance,
thomas

--
Dipl. Psych. Thomas Hartmann

OBOB-Lab
University of Konstanz
Department of Psychology
P.O. Box D25
78457 Konstanz
Germany

Tel.: +49 (0)7531 88 4612
Fax: +49 (0)7531-88 4601
Email: thomas.hartmann at uni-konstanz.de
Homepage: http://www.uni-konstanz.de/obob

"I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle)

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From michael.wibral at WEB.DE  Fri Mar  5 18:51:37 2010
From: michael.wibral at WEB.DE (Michael Wibral)
Date: Fri, 5 Mar 2010 18:51:37 +0100
Subject: Problem with Fieldtrip conversion
In-Reply-To: 
Message-ID: 

Dear Vladimir,

Thanks for the quick reply. Yes, i started looking into it and I really like the first impression (not the speed though :-)).

I solved the problem in the meantime. The reason was related to an unsuccesful update attempt. Sorry for the confusion! Could you let me know (and other FT users) the logic behind specifying the data twice, i.e. once as the loaded variable in the workspace and once as a filename. Is this related to memory mapped file use?

Michael

-----Ursprüngliche Nachricht-----
Von: Vladimir Litvak 
Gesendet: Mar 5, 2010 4:17:49 PM
An: FIELDTRIP at NIC.SURFNET.NL
Betreff: Re: [FIELDTRIP] Problem with Fieldtrip conversion

>Hi Michael,
>
>I'm glad to hear that you started looking at SPM :-)  This is more of
>an SPM than a Fieldtrip question so perhaps the discussion should move
>to the SPM mailing list. Just from looking at the error message the
>problem doesn't look familiar. Could you send me your file with the
>struct (via yousendit.com if it's big) and I'll try to reproduce it?
>
>Best,
>
>Vladimir
>
>On Fri, Mar 5, 2010 at 2:59 PM, Michael Wibral  wrot=
>e:
>> Dear FT/SPM Listusers,
>>
>> I am having a (hopefully) trivial problem with converting Fieldtrip MEG d=
>ata structures to spm8.
>> Here's what I did:
>>
>> 0. Patch spm8 to r3684
>> 1. Load the Fieldtrip data from /path/filename. They contain a variable (=
>FTstruct) named DataFT.
>> 2. Call spm_eeg_ft2spm(DataFT, '/path/filename')
>>
>> The error I get is:
>>
>> checkmeeg: no channel type, assigning default
>> checkmeeg: no units, assigning default
>> checkmeeg: transform type missing, assigning default
>> checkmeeg: data scale missing, assigning default
>>
>> ??? Undefined function or method 'fname' for input arguments of type 'str=
>uct'.
>> Error in =3D=3D> file_array.subsref>access_fields at 129 =A0 =A0 =A0 =A0 =
>case 'fname', =A0 =A0 =A0t =3D fname(obj);
>>
>> Error in =3D=3D> file_array.subsref at 17 =A0 =A0 =A0 =A0 varargout =3D a=
>ccess_fields(obj,subs);
>>
>> Error in =3D=3D> checkmeeg at 203 =A0 =A0 if ~isa(meegstruct.data.y, 'fil=
>e_array') || isempty(fileparts(meegstruct.data.y.fname)) ...
>>
>> Error in =3D=3D> meeg.meeg at 109 =A0 =A0 =A0 =A0 [OK D] =3D checkmeeg(va=
>rargin{1}, 'basic');
>>
>> Error in =3D=3D> spm_eeg_ft2spm at 138 D =3D meeg(D);
>>
>> Any help is very much appreciated.
>>
>> Michael
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the=
> FieldTrip =A0toolbox, to share experiences and to discuss new ideas for ME=
>G and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.=
>html and http://www.ru.nl/neuroimaging/fieldtrip.
>
>----------------------------------
>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 628 bytes
Desc: not available
URL: 

From v.litvak at ION.UCL.AC.UK  Fri Mar  5 19:59:12 2010
From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak)
Date: Fri, 5 Mar 2010 18:59:12 +0000
Subject: Problem with Fieldtrip conversion
In-Reply-To: <8611969.460599.1267811497771.JavaMail.fmail@mwmweb056>
Message-ID: 

The second argument is not the name of the file from which you loaded
the variable but the name for the SPM dataset that will be generated.
E.g. if you specify 'test' you'll get two files test.mat and test.dat.

Vladimir

On Fri, Mar 5, 2010 at 5:51 PM, Michael Wibral  wrote:
> Dear Vladimir,
>
> Thanks for the quick reply. Yes, i started looking into it and I really like the first impression (not the speed though :-)).
>
> I solved the problem in the meantime. The reason was related to an unsuccesful update attempt. Sorry for the confusion! Could you let me know (and other FT users) the logic behind specifying the data twice, i.e. once as the loaded variable in the workspace and once as a filename. Is this related to memory mapped file use?
>
> Michael
>
> -----Ursprüngliche Nachricht-----
> Von: Vladimir Litvak 
> Gesendet: Mar 5, 2010 4:17:49 PM
> An: FIELDTRIP at NIC.SURFNET.NL
> Betreff: Re: [FIELDTRIP] Problem with Fieldtrip conversion
>
>>Hi Michael,
>>
>>I'm glad to hear that you started looking at SPM :-)  This is more of
>>an SPM than a Fieldtrip question so perhaps the discussion should move
>>to the SPM mailing list. Just from looking at the error message the
>>problem doesn't look familiar. Could you send me your file with the
>>struct (via yousendit.com if it's big) and I'll try to reproduce it?
>>
>>Best,
>>
>>Vladimir
>>
>>On Fri, Mar 5, 2010 at 2:59 PM, Michael Wibral  wrot=
>>e:
>>> Dear FT/SPM Listusers,
>>>
>>> I am having a (hopefully) trivial problem with converting Fieldtrip MEG d=
>>ata structures to spm8.
>>> Here's what I did:
>>>
>>> 0. Patch spm8 to r3684
>>> 1. Load the Fieldtrip data from /path/filename. They contain a variable (=
>>FTstruct) named DataFT.
>>> 2. Call spm_eeg_ft2spm(DataFT, '/path/filename')
>>>
>>> The error I get is:
>>>
>>> checkmeeg: no channel type, assigning default
>>> checkmeeg: no units, assigning default
>>> checkmeeg: transform type missing, assigning default
>>> checkmeeg: data scale missing, assigning default
>>>
>>> ??? Undefined function or method 'fname' for input arguments of type 'str=
>>uct'.
>>> Error in =3D=3D> file_array.subsref>access_fields at 129 =A0 =A0 =A0 =A0 =
>>case 'fname', =A0 =A0 =A0t =3D fname(obj);
>>>
>>> Error in =3D=3D> file_array.subsref at 17 =A0 =A0 =A0 =A0 varargout =3D a=
>>ccess_fields(obj,subs);
>>>
>>> Error in =3D=3D> checkmeeg at 203 =A0 =A0 if ~isa(meegstruct.data.y, 'fil=
>>e_array') || isempty(fileparts(meegstruct.data.y.fname)) ...
>>>
>>> Error in =3D=3D> meeg.meeg at 109 =A0 =A0 =A0 =A0 [OK D] =3D checkmeeg(va=
>>rargin{1}, 'basic');
>>>
>>> Error in =3D=3D> spm_eeg_ft2spm at 138 D =3D meeg(D);
>>>
>>> Any help is very much appreciated.
>>>
>>> Michael
>>>
>>> ----------------------------------
>>> The aim of this list is to facilitate the discussion between users of the=
>> FieldTrip =A0toolbox, to share experiences and to discuss new ideas for ME=
>>G and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.=
>>html and http://www.ru.nl/neuroimaging/fieldtrip.
>>
>>----------------------------------
>>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From v.litvak at ION.UCL.AC.UK  Fri Mar  5 20:06:00 2010
From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak)
Date: Fri, 5 Mar 2010 19:06:00 +0000
Subject: Problem with Fieldtrip conversion
In-Reply-To: 
Message-ID: 

Just to make things clearer for FT users, the D variable that you get
from spm_eeg_ft2spm cannot exist without dataset on the disk. It's
different from FT where data can be just a variable in the workspace.
The reason is indeed memory mapping. So you must have the two files
present two have a valid dataset.

I suggest again to post SPM-related questions to the SPM list (even
though I like getting good publicity for SPM on the FT list ;-)

Best,

Vladimir

On Fri, Mar 5, 2010 at 6:59 PM, Vladimir Litvak  wrote:
> The second argument is not the name of the file from which you loaded
> the variable but the name for the SPM dataset that will be generated.
> E.g. if you specify 'test' you'll get two files test.mat and test.dat.
>
> Vladimir
>
> On Fri, Mar 5, 2010 at 5:51 PM, Michael Wibral  wrote:
>> Dear Vladimir,
>>
>> Thanks for the quick reply. Yes, i started looking into it and I really like the first impression (not the speed though :-)).
>>
>> I solved the problem in the meantime. The reason was related to an unsuccesful update attempt. Sorry for the confusion! Could you let me know (and other FT users) the logic behind specifying the data twice, i.e. once as the loaded variable in the workspace and once as a filename. Is this related to memory mapped file use?
>>
>> Michael
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Vladimir Litvak 
>> Gesendet: Mar 5, 2010 4:17:49 PM
>> An: FIELDTRIP at NIC.SURFNET.NL
>> Betreff: Re: [FIELDTRIP] Problem with Fieldtrip conversion
>>
>>>Hi Michael,
>>>
>>>I'm glad to hear that you started looking at SPM :-)  This is more of
>>>an SPM than a Fieldtrip question so perhaps the discussion should move
>>>to the SPM mailing list. Just from looking at the error message the
>>>problem doesn't look familiar. Could you send me your file with the
>>>struct (via yousendit.com if it's big) and I'll try to reproduce it?
>>>
>>>Best,
>>>
>>>Vladimir
>>>
>>>On Fri, Mar 5, 2010 at 2:59 PM, Michael Wibral  wrot=
>>>e:
>>>> Dear FT/SPM Listusers,
>>>>
>>>> I am having a (hopefully) trivial problem with converting Fieldtrip MEG d=
>>>ata structures to spm8.
>>>> Here's what I did:
>>>>
>>>> 0. Patch spm8 to r3684
>>>> 1. Load the Fieldtrip data from /path/filename. They contain a variable (=
>>>FTstruct) named DataFT.
>>>> 2. Call spm_eeg_ft2spm(DataFT, '/path/filename')
>>>>
>>>> The error I get is:
>>>>
>>>> checkmeeg: no channel type, assigning default
>>>> checkmeeg: no units, assigning default
>>>> checkmeeg: transform type missing, assigning default
>>>> checkmeeg: data scale missing, assigning default
>>>>
>>>> ??? Undefined function or method 'fname' for input arguments of type 'str=
>>>uct'.
>>>> Error in =3D=3D> file_array.subsref>access_fields at 129 =A0 =A0 =A0 =A0 =
>>>case 'fname', =A0 =A0 =A0t =3D fname(obj);
>>>>
>>>> Error in =3D=3D> file_array.subsref at 17 =A0 =A0 =A0 =A0 varargout =3D a=
>>>ccess_fields(obj,subs);
>>>>
>>>> Error in =3D=3D> checkmeeg at 203 =A0 =A0 if ~isa(meegstruct.data.y, 'fil=
>>>e_array') || isempty(fileparts(meegstruct.data.y.fname)) ...
>>>>
>>>> Error in =3D=3D> meeg.meeg at 109 =A0 =A0 =A0 =A0 [OK D] =3D checkmeeg(va=
>>>rargin{1}, 'basic');
>>>>
>>>> Error in =3D=3D> spm_eeg_ft2spm at 138 D =3D meeg(D);
>>>>
>>>> Any help is very much appreciated.
>>>>
>>>> Michael
>>>>
>>>> ----------------------------------
>>>> The aim of this list is to facilitate the discussion between users of the=
>>> FieldTrip =A0toolbox, to share experiences and to discuss new ideas for ME=
>>>G and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.=
>>>html and http://www.ru.nl/neuroimaging/fieldtrip.
>>>
>>>----------------------------------
>>>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From e.maris at DONDERS.RU.NL  Fri Mar  5 21:52:49 2010
From: e.maris at DONDERS.RU.NL (Eric Maris)
Date: Fri, 5 Mar 2010 21:52:49 +0100
Subject: quiestions about planar transformation
In-Reply-To: <8745792.274828.1267785623641.JavaMail.fmail@mwmweb056>
Message-ID: 

Dear FT-colleagues,

 

 

> The fundamental underlying problem is that you go from a scalar field

> and massively paralellel univariate statistics to a vector field and,

> hence, truly multivariate statistics (e.g. because the local gradient

> vectors will rotate across the course of an ERP/ERF for example).

> Coming up with a p-value there sounds difficult to me. I always

> wondered how people with planar gradiometer devices solve that issue

> when doing time-domain stuff? Maybe there are solutions out there

> already?

 

Following up on the proposal by Jan-Mathijs, this is how you can do it:

·        Use the following test statistic at the level of the (_dV,_dH) channel pairs: calculate the difference between the experimental conditions of the lengths of the trial-averaged vector-valued (_dV,_dH)-signals (J-M calls this “to Pythagoras”). You do this for all channels and all time points

·        Find the channel- and time-point-specific permutation distributions of these statistics

·        Use these channel- and time-point-specific permutation distributions to find sensible thresholds for the statistics

·        Do cluster-based permutation testing using these thresholded test statistics that are subsequently combined in a maximum cluster statistic to control the false alarm

 

If you write the statfun for the channel-specific test statistic, then the rest can be performed using existing Fieldtrip code.

 

 

Best,

 

Eric Maris

 

 

dr. Eric Maris
Donders Institute for Brain, Cognition and Behavior

Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging

Radboud University
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
T:+31 24 3612651
Mobile: 06 39584581

F:+31 24 3616066
E: e.  maris at donders.ru.nl

 

 

 

 

 

> 

> Michael

> 

> -----Ursprüngliche Nachricht-----

> Von: jan-mathijs schoffelen 

> Gesendet: Mar 5, 2010 11:12:03 AM

> An: FIELDTRIP at NIC.SURFNET.NL

> Betreff: Re: [FIELDTRIP] quiestions about planar transformation

> 

> >Dear Mark,

> >

> >There may be some confusion here, relating to whether we are talking

> >about frequency domain data (=power, always a positive value), or

> >whether we are talking about time domain data (=amplitude, can be

> >positive and negative).

> >

> >Single trial combination of planar gradient transformed axial gradient

> >(or magnetometer) data is not the best thing to do for time domain

> >stuff.

> >Reason: combination takes place by applying Pythagoras' rule to the

> _dV

> >and _dH pairs, and when the individual _dH and _dV components are

> >noisy, the noise is also squared, added, and squar-rooted, which leads

> >to an 'amplification' of noise. Not good. It works after trial-

> >averaging because you squeeze out the noise first and Pythagoras the

> >reduced-noise signals.

> >

> >For frequency domain data this is not an issue.

> >Reason: combination usually takes place by just adding the _dV and _dH

> >pairs (power is a squared value already). This is just a linear step

> >(just like averaging) and the order of performing the linear steps

> does

> >not matter for the result. So single trial combination prior to

> >averaging or vice versa should not make a difference here.

> >

> >In general I would advise against trying to do statistics on the

> >combined planar gradient and use it for visualization purposes only.

> >Alternatively, one could come up with a non-parametric statistical

> test

> >(permutation), in which I could think of a way of extracting a p-

> value

> >from a single _dH/_dV pair combined. But this would be a different

> >story...

> >

> >Best,

> >

> >Jan-Mathijs

> >

> >

> >> Hi all

> >>

> >> I am currently a little confused as to how to properly use megplanar

> >> and combineplanar for my 4D 148 axial gadiometer data. I would

> >> ideally like to use planar gradients as it will make subsequent ERF

> >> and frequency analysis easier to interpret. My question is when

> >> should I combine the v and h components?

> >>

> >> Looking  at some previous posts it is suggested that you should

> >> combine the gradients on an individual basis, but when I do this i

> >> get an almost flat amplitude across all sensors which doesn't look

> >> right (see attached image, 'bad_planar'). When i use combineplanar

> >> after averaging, the data the data looks ok (good_planar). I get the

> >> same result doing both megplanar and combineplanar on the averaged

> >> data.

> >>

> >> I just want to double check that the 'bad' planar fields i am

> getting

> >> are correct and not due to a bug in field trip. Intuitively, I would

> >> expect combining the components on the individual level world be

> more

> >> accurate as it would prevent fields from opposeingly orientated

> >> dipoles cancelling out when averaged.

> >>

> >> If it is the case that you should use combineplanar after trial

> >> averaging, how do you go about combining after statistical tests?

> >> i.e. when you have a p-value or a test statistic for the v and h

> >> components for each sensor, how would you combine these together?

> >>

> >> Any help or advice would be appreciated.

> >>

> >> Many thanks

> >>

> >> Mark

> >

> >Dr. J.M. (Jan-Mathijs) Schoffelen

> >Donders Institute for Brain, Cognition and Behaviour, Centre for

> >Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands

> >J.Schoffelen at donders.ru.nl

> >Telephone: 0031-24-3668063

> >

> >----------------------------------

> >The aim of this list is to facilitate the discussion between users of

> the FieldTrip  toolbox, to share experiences and to discuss new ideas

> for MEG and EEG analysis. See also

> http://listserv.surfnet.nl/archives/fieldtrip.html and

> http://www.ru.nl/neuroimaging/fieldtrip.

> 

> ----------------------------------

> The aim of this list is to facilitate the discussion between users of

> the FieldTrip  toolbox, to share experiences and to discuss new ideas

> for MEG and EEG analysis. See also

> http://listserv.surfnet.nl/archives/fieldtrip.html and

> http://www.ru.nl/neuroimaging/fieldtrip.


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From r.oostenveld at FCDONDERS.RU.NL  Mon Mar  8 09:27:24 2010
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Mon, 8 Mar 2010 09:27:24 +0100
Subject: reading bdf+ files?
In-Reply-To: <4B912B10.6030700@uni-konstanz.de>
Message-ID: 

Hi Thomas,


On 5 Mar 2010, at 17:02, Thomas Hartmann wrote:

> hi,
> i try to read bdf+ files created using edflib (http://www.teuniz.net/edflib/
> )
>
> although the file looks good in the reader, fieldtrip complains
> about "channels with different sampling rate not supported". i
> debugged the code. the error occurs because bdf+ files have an
> additional channel storeing events. this one seems to have a
> different samplerate.
>
> i disabled these checks which resulted in a new error-message:
> "One ore more output arguments not assigned during call to
> "read_24bit"."
>
> is the support of fieldtrip restricted to bdf and not bdf+-files? or
> is there something wrong with the lib i use to write the file?

I don't know the details of the bdf+ format, but do know the bdf
format. Probably bdf+ is plain bdf with an annotation channel. Are you
using annotations? The biosemi system does not, it uses a non-standard
trigger channel sampled at the same frequency as all other channels
(i.e. "non standard" meaning that it does not comply with the
published papers on edf and edf+). Having a trigger channel at the
same sampling rate makes the implementation of software and hardware
and interpretation of the data much simpler.

In general data is desribed as Nchan X Nsamples matrix. If one of the
channels has another sampling rate, it does not fit in this matrix,
that is why varying sampling rates over channels are not supported. If
the event/status/trigger channel is represented as a continuously
sampled channel (like in bdf), it is read along with all other
channels. The same limitation applies to edf and edf+. The annotation
channel is difficult to deal with and in the read_biosemi_bdf
implementation not supported.

The bdf format has small blocks (usually one second long) in which the
channels are stored like
ch1_1 ch1_2 ch1_3 ... ch2_1 ch2_2 ch2_3 ...
i.e. all samples of one channel as a vector, and then the next
channel. This allows for variable sampling rates, whereas a
multiplexed representation would not. Specific for the bdf format is
that the samples are represented as 24 bit (where 32 bit is more
usual). The read_24bit mex file reads such a block and converts the 24
bit values to doubles. The reason for having it in a mex file is that
the conversion from 24 bits to double is much more efficient.

best regards
Robert

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From thomas.hartmann at UNI-KONSTANZ.DE  Mon Mar  8 10:30:31 2010
From: thomas.hartmann at UNI-KONSTANZ.DE (Thomas Hartmann)
Date: Mon, 8 Mar 2010 10:30:31 +0100
Subject: reading bdf+ files?
In-Reply-To: 
Message-ID: 

hi robert,
thanks for the quick answere.
yes, bdf+ is bdf with an annotation-channel added. this channel is
unlike the bdf trigger channel. so this, as i had already expected,
explains the problem.

my major motivation for using bdf+ is the availability of a ready-to-use
c++ library. unfortunatly it only writes bdf+ or edf+, not the
"standard" format.

does someone know of a stable, well-documented, free library (c or c++)
to write eeg-data in a format, fieldtrip can read?

cheers,
thomas

Am 08.03.2010 09:27, schrieb Robert Oostenveld:
> Hi Thomas,
>
>
> On 5 Mar 2010, at 17:02, Thomas Hartmann wrote:
>
>> hi,
>> i try to read bdf+ files created using edflib
>> (http://www.teuniz.net/edflib/)
>>
>> although the file looks good in the reader, fieldtrip complains about
>> "channels with different sampling rate not supported". i debugged the
>> code. the error occurs because bdf+ files have an additional channel
>> storeing events. this one seems to have a different samplerate.
>>
>> i disabled these checks which resulted in a new error-message:
>> "One ore more output arguments not assigned during call to
>> "read_24bit"."
>>
>> is the support of fieldtrip restricted to bdf and not bdf+-files? or
>> is there something wrong with the lib i use to write the file?
>
> I don't know the details of the bdf+ format, but do know the bdf
> format. Probably bdf+ is plain bdf with an annotation channel. Are you
> using annotations? The biosemi system does not, it uses a non-standard
> trigger channel sampled at the same frequency as all other channels
> (i.e. "non standard" meaning that it does not comply with the
> published papers on edf and edf+). Having a trigger channel at the
> same sampling rate makes the implementation of software and hardware
> and interpretation of the data much simpler.
>
> In general data is desribed as Nchan X Nsamples matrix. If one of the
> channels has another sampling rate, it does not fit in this matrix,
> that is why varying sampling rates over channels are not supported. If
> the event/status/trigger channel is represented as a continuously
> sampled channel (like in bdf), it is read along with all other
> channels. The same limitation applies to edf and edf+. The annotation
> channel is difficult to deal with and in the read_biosemi_bdf
> implementation not supported.
>
> The bdf format has small blocks (usually one second long) in which the
> channels are stored like
> ch1_1 ch1_2 ch1_3 ... ch2_1 ch2_2 ch2_3 ...
> i.e. all samples of one channel as a vector, and then the next
> channel. This allows for variable sampling rates, whereas a
> multiplexed representation would not. Specific for the bdf format is
> that the samples are represented as 24 bit (where 32 bit is more
> usual). The read_24bit mex file reads such a block and converts the 24
> bit values to doubles. The reason for having it in a mex file is that
> the conversion from 24 bits to double is much more efficient.
>
> best regards
> Robert
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of
> the FieldTrip  toolbox, to share experiences and to discuss new ideas
> for MEG and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.


--
Dipl. Psych. Thomas Hartmann

OBOB-Lab
University of Konstanz
Department of Psychology
P.O. Box D25
78457 Konstanz
Germany

Tel.: +49 (0)7531 88 4612
Fax: +49 (0)7531-88 4601
Email: thomas.hartmann at uni-konstanz.de
Homepage: http://www.uni-konstanz.de/obob

"I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle)

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From michael.wibral at WEB.DE  Mon Mar  8 12:32:22 2010
From: michael.wibral at WEB.DE (Michael Wibral)
Date: Mon, 8 Mar 2010 12:32:22 +0100
Subject: statistic on planar gradients
Message-ID: 

Dear Eric,

you suggested to,...

Use the following test statistic at the level of the (_dV,_dH) channel pairs: calculate the difference between the experimental conditions of the lengths of the trial-averaged vector-valued (_dV,_dH)-signals (J-M calls this “to Pythagoras”). You do this for all channels and all time points....

I disagree here, but not for mathematical/stastical reason, rather because of neurophysiology and the problem discussed in the thread before :
I think of two conditions that differ not in their amplitudes but have completely opposing direction of a dipole (in an identical location), then statitsics on raw fields will easily find this effect, but the length of the trial averaged vector valued signals will be identical (the dipole does not jitter across trials in this example, hence trial averaging of vector valued signals doesn't help. The dipole just inverts it's orientation across conditions). That's what I meant by multivariate statistics. Some importnat information gets lost (and must get lost) when going to a non-directional and unsigned quantity to test.

But maybe I simply misunderstood your suggestion altogether??

Michael

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 628 bytes
Desc: not available
URL: 

From e.maris at DONDERS.RU.NL  Mon Mar  8 13:18:08 2010
From: e.maris at DONDERS.RU.NL (Eric Maris)
Date: Mon, 8 Mar 2010 13:18:08 +0100
Subject: statistic on planar gradients
In-Reply-To: <19371188.1269230.1268047942766.JavaMail.fmail@mwmweb056>
Message-ID: 

Dear Michael,

 

 

> you suggested to,...

> 

> Use the following test statistic at the level of the (_dV,_dH) channel

> pairs: calculate the difference between the experimental conditions of

> the lengths of the trial-averaged vector-valued (_dV,_dH)-signals (J-M

> calls this “to Pythagoras”). You do this for all channels and all

> time points....

> 

> I disagree here, but not for mathematical/stastical reason, rather

> because of neurophysiology and the problem discussed in the thread

> before :

> I think of two conditions that differ not in their amplitudes but have

> completely opposing direction of a dipole (in an identical location),

> then statitsics on raw fields will easily find this effect, but the

> length of the trial averaged vector valued signals will be identical

> (the dipole does not jitter across trials in this example, hence trial

> averaging of vector valued signals doesn't help. The dipole just

> inverts it's orientation across conditions). That's what I meant by

> multivariate statistics. Some importnat information gets lost (and must

> get lost) when going to a non-directional and unsigned quantity to

> test.

 

My apologies for not having read the thread far enough back in time.

 

If you want to identify shifts in dipole orientation produced by your independent variable, then my proposal doesn´t work. However, here is an alternative (channel,time)-pair-specific test statistic that will do the job:

1.  Represent the (dV,dH)-pair of planar gradient evoked responses as a single complex number with dH being the real part and dV the imaginary part. Call this the “complex planar representation”.

2.  From the complex planar representations of the two experimental conditions, calculate the complex phase difference between the two. (It may turn out that you get a more sensitive test if this between-condition complex phase difference is weighted by the amplitudes of the complex planars in the two conditions. However this is not central for the main idea.)

3.  Find the permutation distributions of the (channel,time)-pair-specific complex phase differences, and use these to find an appropriate threshold.

4.  Proceed in the same way as for other cluster-based permutation tests.

 

The main difference between this test, and the previous one that I proposed, is that in step 2 we calculate the phase difference instead of the magnitude difference.

 

 

Best,

 

 

Eric 

 

 

 

 

 

 

 

 

> 

> But maybe I simply misunderstood your suggestion altogether??

> 

> Michael

> 

> ----------------------------------

> The aim of this list is to facilitate the discussion between users of

> the FieldTrip  toolbox, to share experiences and to discuss new ideas

> for MEG and EEG analysis. See also

> http://listserv.surfnet.nl/archives/fieldtrip.html and

> http://www.ru.nl/neuroimaging/fieldtrip.


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From h.holle at SUSSEX.AC.UK  Mon Mar  8 16:53:35 2010
From: h.holle at SUSSEX.AC.UK (Henning Holle)
Date: Mon, 8 Mar 2010 15:53:35 +0000
Subject: problem with definetrials
Message-ID: 

Dear list members,

I am trying to define trials for a dataset. When I look for the events
contained in the file (like this)

cfg = [];
cfg.dataset             = 'jenna.cnt'
cfg.trialdef.eventtype = '?';
dummy                   = definetrial(cfg);

I get the following output.

Reading Event Table...
the following events were found in the datafile
event type: 'trigger' with event values: 1  11  22  33
no trials have been defined yet, see DEFINETRIAL for further help
found 202 events
created 0 trials


Now, when I want to define the trials for all 'standard' events (which
have the eventvalue '11'),

% define trials
cfg = [];
cfg.dataset             = 'jenna.cnt'
cfg.trialdef.eventtype = 'trigger'
cfg.trialdef.eventvalue = { '11' };
cfg_standard          = definetrial(cfg);

I get the following error message.

??? Error using ==> cellstr at 34
Input must be a string.

Error in ==> cell.intersect at 44
     a = cellstr(a);

Error in ==> trialfun_general at 114
   elseif ~isempty(intersect(event(i).value, cfg.trialdef.eventvalue))

Error in ==> ft_definetrial at 110
     [trl, event] = feval(cfg.trialfun, cfg);

Error in ==> definetrial at 17
[varargout{1:nargout}] = funhandle(varargin{:});

How can I solve this problem? Am I doing something wrong? (I am using
the most recent version of fieldtrip)

Cheers,

Henning

--
*************************
Dr. Henning Holle,
Department of Psychology,
University of Sussex,
Falmer, Brighton,
BN1 9QH, U.K.
Tel. : +44 (0)1273 877240
Fax. : +44 (0)1273 678058

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From r.oostenveld at FCDONDERS.RU.NL  Mon Mar  8 17:58:00 2010
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Mon, 8 Mar 2010 17:58:00 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: 
Message-ID: 

Hi Chetan,

Sorry about that, the bookeeping of the data dimensions is a bit
messy, as reflected in the cfg.dim which is pre and post appended all
the time.

On 4 Mar 2010, at 16:51, Chetan Sharma wrote:
> I am still running into bugs when doing the freq_time clustering. I
> am testing for coherence between the hemispheres during a task, and
> now it runs into problems at clusterstat() at line 175.

what is your statfun?

Channel clustering is not supported for all possible statistics, and
especially has limits in the case of bivariate measures such as
coherence.


> The command is:
>
> posclusobs = findcluster(reshape(postailobs,
>       [cfg.dim,1]),channeighbstructmat,cfg.minnbchan);
>
> The problem is that postailobs has size [nfreq*ntime, 1], while the
> cfg.dim is [nchan nfreq ntime], where nchan=2 in this case. It seems
> like it wants to reshape it into size [nfreq, ntime, 1]. Is this
> indeed the case?
>
> And could someone help me out by explaining a bit more about when
> one would choose for cfg.clusterthreshold the different values,
> 'nonparametric_common', 'nonparametric_individual', and 'parametric'
> when testing for coherence in different brain areas? I have read
> over the documentation and the code but am still somewhat unsure.


parametric uses the known parametric distribution of the statistic,
this has to be supported by the statfun.
nonparametric_common estimates a threshold from the randomization
distribution. The threshold is common to all channe-time-frequency
points.
nonparametric_individual estimates an individual threshold from the
randomization distribution for each channe-time-frequency point.

best regards,
Robert

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From r.oostenveld at FCDONDERS.RU.NL  Mon Mar  8 18:00:28 2010
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Mon, 8 Mar 2010 18:00:28 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: 
Message-ID: 

> And also, what should the channeighbstructmat look like when doing
> freq_time clustering? When I do the fix mentioned above, it returns
> a 2x2 matrix of zeros, which causes problems in findcluster(). I've
> read over the neighbourselection(), but it doesn't give any clues
> for freq_time clustering.


neighbourselection is only for specifying neighbouring channels.
Neighbouring timepoints and frequencies have a trivial definition and
don'h have to be specified. If you only want clustering in time and
frequency and not over channels, you shoudl specify cfg.neighbours =
{} or [] (I don't know for sure which emnptyit should be right now).

best
Robert

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From arno at CERCO.UPS-TLSE.FR  Mon Mar  8 18:05:33 2010
From: arno at CERCO.UPS-TLSE.FR (Arnaud Delorme)
Date: Mon, 8 Mar 2010 09:05:33 -0800
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: 
Message-ID: 

Hi Robert,

I was running some correction for multiple comparisons using the
cluster method you have developed and I set the number of neighbors
for each channel to 4.5 when constructing the channel neighbor matrix
(which seem meaningful to me as each channel has in general 4
neighbors in the 4 directions). I did work and returned relevant
results. I am now thinking of making a link in EEGLAB to use that
function but I want to be sure that my arbitrary choice in the number
of channel neighbor is a good one.

Thanks a lot,

Arno

On Mar 8, 2010, at 8:58 AM, Robert Oostenveld wrote:

> Hi Chetan,
>
> Sorry about that, the bookeeping of the data dimensions is a bit
> messy, as reflected in the cfg.dim which is pre and post appended all
> the time.
>
> On 4 Mar 2010, at 16:51, Chetan Sharma wrote:
>> I am still running into bugs when doing the freq_time clustering. I
>> am testing for coherence between the hemispheres during a task, and
>> now it runs into problems at clusterstat() at line 175.
>
> what is your statfun?
>
> Channel clustering is not supported for all possible statistics, and
> especially has limits in the case of bivariate measures such as
> coherence.
>
>
>> The command is:
>>
>> posclusobs = findcluster(reshape(postailobs,
>>      [cfg.dim,1]),channeighbstructmat,cfg.minnbchan);
>>
>> The problem is that postailobs has size [nfreq*ntime, 1], while the
>> cfg.dim is [nchan nfreq ntime], where nchan=2 in this case. It seems
>> like it wants to reshape it into size [nfreq, ntime, 1]. Is this
>> indeed the case?
>>
>> And could someone help me out by explaining a bit more about when
>> one would choose for cfg.clusterthreshold the different values,
>> 'nonparametric_common', 'nonparametric_individual', and 'parametric'
>> when testing for coherence in different brain areas? I have read
>> over the documentation and the code but am still somewhat unsure.
>
>
> parametric uses the known parametric distribution of the statistic,
> this has to be supported by the statfun.
> nonparametric_common estimates a threshold from the randomization
> distribution. The threshold is common to all channe-time-frequency
> points.
> nonparametric_individual estimates an individual threshold from the
> randomization distribution for each channe-time-frequency point.
>
> best regards,
> Robert
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users
> of the FieldTrip  toolbox, to share experiences and to discuss new
> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html
>  and http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From chesharm at STANFORD.EDU  Mon Mar  8 18:14:37 2010
From: chesharm at STANFORD.EDU (Chetan Sharma)
Date: Mon, 8 Mar 2010 09:14:37 -0800
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: 
Message-ID: 

Thank you for the help, I am using statfun_indepZCoh, and hoping to cluster
over maxsize in freq_time. The problem is that specifying cfg.neighbours =
[] causes a problem in findcluster(). I modified line 175 in clusterstats to
do reshape [cfg.dim(2:end) 1], but I now run into an error at line 38 of
findcluster().

The problem is that makechanneighbstructmat(cfg) returns a 2x2 matrix of
zeros when passed a cfg.neighbours = []. As a result it doesn't pass the
check at line 37 of findcluster.m, which is:

length(size(spatdimneighbstructmat))~=2 ||
~all(size(spatdimneighbstructmat)==spatdimlength)

So that's why I'd like to know, what should the neighbstructmat that is
returned by makechanneighbstructmat() look like when passed cfg.neighbours =
[]? It doesn't seem like it should be a 2x2 matrix of zeros.
-chetan

On Mon, Mar 8, 2010 at 9:00 AM, Robert Oostenveld <
r.oostenveld at fcdonders.ru.nl> wrote:

> And also, what should the channeighbstructmat look like when doing
>> freq_time clustering? When I do the fix mentioned above, it returns a 2x2
>> matrix of zeros, which causes problems in findcluster(). I've read over the
>> neighbourselection(), but it doesn't give any clues for freq_time
>> clustering.
>>
>
>
> neighbourselection is only for specifying neighbouring channels.
> Neighbouring timepoints and frequencies have a trivial definition and don'h
> have to be specified. If you only want clustering in time and frequency and
> not over channels, you shoudl specify cfg.neighbours = {} or [] (I don't
> know for sure which emnptyit should be right now).
>
> best
> Robert
>
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From julian.keil at GMAIL.COM  Mon Mar  8 22:12:43 2010
From: julian.keil at GMAIL.COM (Julian Keil)
Date: Mon, 8 Mar 2010 22:12:43 +0100
Subject: problem with definetrials
In-Reply-To: <4B951D7F.50708@sussex.ac.uk>
Message-ID: 

Hi,

maybe this I miss your point but when I set the cfg. structure for the trigger values, I use the square brackets
e.g. 
cfg.trialdef.eventtype  = 'TRIGGER'; 
cfg.trialdef.eventvalue = [4106 4108 4110];
Did you try this?
Good luck.

Julian

Am 08.03.2010 um 16:53 schrieb Henning Holle:

> Dear list members,
> 
> I am trying to define trials for a dataset. When I look for the events contained in the file (like this)
> 
> cfg = [];
> cfg.dataset             = 'jenna.cnt'
> cfg.trialdef.eventtype = '?';
> dummy                   = definetrial(cfg);
> 
> I get the following output.
> 
> Reading Event Table...
> the following events were found in the datafile
> event type: 'trigger' with event values: 1  11  22  33
> no trials have been defined yet, see DEFINETRIAL for further help
> found 202 events
> created 0 trials
> 
> 
> Now, when I want to define the trials for all 'standard' events (which have the eventvalue '11'),
> 
> % define trials
> cfg = [];
> cfg.dataset             = 'jenna.cnt'
> cfg.trialdef.eventtype = 'trigger'
> cfg.trialdef.eventvalue = { '11' };
> cfg_standard          = definetrial(cfg);
> 
> I get the following error message.
> 
> ??? Error using ==> cellstr at 34
> Input must be a string.
> 
> Error in ==> cell.intersect at 44
>    a = cellstr(a);
> 
> Error in ==> trialfun_general at 114
>  elseif ~isempty(intersect(event(i).value, cfg.trialdef.eventvalue))
> 
> Error in ==> ft_definetrial at 110
>    [trl, event] = feval(cfg.trialfun, cfg);
> 
> Error in ==> definetrial at 17
> [varargout{1:nargout}] = funhandle(varargin{:});
> 
> How can I solve this problem? Am I doing something wrong? (I am using the most recent version of fieldtrip)
> 
> Cheers,
> 
> Henning
> 
> -- 
> *************************
> Dr. Henning Holle,
> Department of Psychology,
> University of Sussex,
> Falmer, Brighton,
> BN1 9QH, U.K.
> Tel. : +44 (0)1273 877240
> Fax. : +44 (0)1273 678058
> 
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.



Dipl. Psych. Julian Keil

OBOB-Lab
University of Konstanz
Department of Psychology
P.O. Box D25
78457 Konstanz
Germany

Tel: ++49 - (0)7531 - 88 42 50
Fax: ++49 - (0)7531 - 88 28 91
Email: julian.keil at uni-konstanz.de
Homepage: http://www.uni-konstanz.de/obob








----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From r.vandermeij at DONDERS.RU.NL  Tue Mar  9 09:22:19 2010
From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij)
Date: Tue, 9 Mar 2010 09:22:19 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: <4DB8175E4BA342CB8D3C331F0E2F2EAC@LAT6500Andrea>
Message-ID: 

Hi Andrea,

The bug should be fixed now, and cfg.neighbours should work as intedend.
If you use cfg.neighbours = [] in your call to freqstatistics (or
time-lock, etc...), clustering will not be done on channels. The fix
should be there in the latest fieldtrip version on the ftp-server (put
there last night at 23:00 I think).

Happy to help,

Best,
Roemer


On 3/5/2010 12:27 PM, Andrea Ostendorf wrote:
> Dear Roemer,
>
> Thanks for your advice.
> Since I would like to use Fieldtrip for TFC data and for images, with an
> additional cluster-over-channels option in the case of the TFC data, I now
> edited clusterstat.
> If called from a TFC script (I introduced a field in cfg for this), it uses
> the correction you gave to Chetan, otherwise it uses the former code.
> This appears to work and the results make sense. However, I ask myself
> whether there is an option for managing this without editing any Fieldtrip
> functions, just by cfg options?
> Any help would be greatly appreciated.
>
> Thanks!
> All the best
> Andrea
>
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>

--
Roemer van der Meij MSc
Scientific Programmer&  Data-Analyst
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognition
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
Tel: +31(0)24 3612631
E-mail: r.vandermeij at donders.ru.nl

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From Jan.Hirschmann at MED.UNI-DUESSELDORF.DE  Tue Mar  9 10:20:36 2010
From: Jan.Hirschmann at MED.UNI-DUESSELDORF.DE (Jan Hirschmann)
Date: Tue, 9 Mar 2010 10:20:36 +0100
Subject: welch's method
Message-ID: 

Dear fieldtrip experts,

 

as I have used Welch's method with 50% overlap on the sensor level I
would like to do the same on the source level prior to using DICS.  Now
I am not quite sure what configuration I should use for freqanalysis as
fieldtrip is all about multitapering. If I specify cfg.t_ftimwin and
cfg.toi such that I get 50% overlap and use cfg.taper=hanning and
cfg.method=mtmwelch is this equivalent to Welch's method? And is it
appropriate to use small windows, i.e. to reduce spectral resolution, to
mimic smoothing?

 

Thanks for your help!

 

Jan

 

 

 

 

 


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From h.holle at SUSSEX.AC.UK  Tue Mar  9 10:57:20 2010
From: h.holle at SUSSEX.AC.UK (Henning Holle)
Date: Tue, 9 Mar 2010 10:57:20 +0100
Subject: problem with definetrials
Message-ID: 

Hi Julian,

thank you, this worked for me.

Cheers,

Henning

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From masaki.maruyama at CEA.FR  Tue Mar  9 19:04:00 2010
From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM)
Date: Tue, 9 Mar 2010 19:04:00 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: A<4B96053B.1020306@donders.ru.nl>
Message-ID: 

Dear Roemer,


The last version of fieldtrip fails the clustering in the default option, i.e., no specification of cfg.neighbouring. Since my script works correctly until the previous version, I'm afraid that the recent change might be a causal. Could you please confirm whether the default option can still work after the change?
An error message I received is attached below.

Thank you in advance for your kind helps.


Sincerely yours,
Masaki Maruyama  


??? Undefined function or variable "channeighbstructmat".

Error in ==> clusterstat at 178
      posclusobs = findcluster(reshape(postailobs, [cfg.dim,1]),channeighbstructmat,cfg.minnbchan);

Error in ==> statistics_montecarlo at 305
  [stat, cfg] = clusterstat(cfg, statrand, statobs,'issource',issource);

Error in ==> statistics_wrapper at 275
    [stat, cfg] = statmethod(cfg, dat, cfg.design);

Error in ==> ft_timelockstatistics at 80
[stat, cfg] = statistics_wrapper(cfg, varargin{:});

Error in ==> timelockstatistics at 17
[varargout{1:nargout}] = funhandle(varargin{:});







>-----Message d'origine-----
>De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part
>de Roemer van der Meij
>Envoyé : mardi 9 mars 2010 09:22
>À : FIELDTRIP at NIC.SURFNET.NL
>Objet : Re: [FIELDTRIP] clusterstats empty cfg.neighbours, cfg.neighbours
>example
>
>Hi Andrea,
>
>The bug should be fixed now, and cfg.neighbours should work as intedend.
>If you use cfg.neighbours = [] in your call to freqstatistics (or
>time-lock, etc...), clustering will not be done on channels. The fix
>should be there in the latest fieldtrip version on the ftp-server (put
>there last night at 23:00 I think).
>
>Happy to help,
>
>Best,
>Roemer
>
>
>On 3/5/2010 12:27 PM, Andrea Ostendorf wrote:
>> Dear Roemer,
>>
>> Thanks for your advice.
>> Since I would like to use Fieldtrip for TFC data and for images, with an
>> additional cluster-over-channels option in the case of the TFC data, I
>now
>> edited clusterstat.
>> If called from a TFC script (I introduced a field in cfg for this), it
>uses
>> the correction you gave to Chetan, otherwise it uses the former code.
>> This appears to work and the results make sense. However, I ask myself
>> whether there is an option for managing this without editing any
>Fieldtrip
>> functions, just by cfg options?
>> Any help would be greatly appreciated.
>>
>> Thanks!
>> All the best
>> Andrea
>>
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the
>FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>and EEG analysis. See also
>http://listserv.surfnet.nl/archives/fieldtrip.html and
>http://www.ru.nl/neuroimaging/fieldtrip.
>>
>
>--
>Roemer van der Meij MSc
>Scientific Programmer&  Data-Analyst
>Donders Institute for Brain, Cognition and Behaviour
>Centre for Cognition
>P.O. Box 9104
>6500 HE Nijmegen
>The Netherlands
>Tel: +31(0)24 3612631
>E-mail: r.vandermeij at donders.ru.nl
>
>----------------------------------
>The aim of this list is to facilitate the discussion between users of the
>FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>and EEG analysis. See also
>http://listserv.surfnet.nl/archives/fieldtrip.html and
>http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From r.vandermeij at DONDERS.RU.NL  Wed Mar 10 09:56:31 2010
From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij)
Date: Wed, 10 Mar 2010 09:56:31 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: 
Message-ID: 

Dear Masaki,

I'm verry sorry for that, I introduced a bug altering clusterstat.m the
day before yesterday. This was resolved yesterday afternoon, so the most
recent ftp-version will work appropriately again.

Sorry for the inconvenience,

Best,
Roemer


On 3/9/2010 7:04 PM, MARUYAMA Masaki INSERM wrote:
> Dear Roemer,
>
>
> The last version of fieldtrip fails the clustering in the default option, i.e., no specification of cfg.neighbouring. Since my script works correctly until the previous version, I'm afraid that the recent change might be a causal. Could you please confirm whether the default option can still work after the change?
> An error message I received is attached below.
>
> Thank you in advance for your kind helps.
>
>
> Sincerely yours,
> Masaki Maruyama
>
>
> ??? Undefined function or variable "channeighbstructmat".
>
> Error in ==>  clusterstat at 178
>        posclusobs = findcluster(reshape(postailobs, [cfg.dim,1]),channeighbstructmat,cfg.minnbchan);
>
> Error in ==>  statistics_montecarlo at 305
>    [stat, cfg] = clusterstat(cfg, statrand, statobs,'issource',issource);
>
> Error in ==>  statistics_wrapper at 275
>      [stat, cfg] = statmethod(cfg, dat, cfg.design);
>
> Error in ==>  ft_timelockstatistics at 80
> [stat, cfg] = statistics_wrapper(cfg, varargin{:});
>
> Error in ==>  timelockstatistics at 17
> [varargout{1:nargout}] = funhandle(varargin{:});
>
>
>
>
>
>
>
>
>> -----Message d'origine-----
>> De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part
>> de Roemer van der Meij
>> Envoyé : mardi 9 mars 2010 09:22
>> À : FIELDTRIP at NIC.SURFNET.NL
>> Objet : Re: [FIELDTRIP] clusterstats empty cfg.neighbours, cfg.neighbours
>> example
>>
>> Hi Andrea,
>>
>> The bug should be fixed now, and cfg.neighbours should work as intedend.
>> If you use cfg.neighbours = [] in your call to freqstatistics (or
>> time-lock, etc...), clustering will not be done on channels. The fix
>> should be there in the latest fieldtrip version on the ftp-server (put
>> there last night at 23:00 I think).
>>
>> Happy to help,
>>
>> Best,
>> Roemer
>>
>>
>> On 3/5/2010 12:27 PM, Andrea Ostendorf wrote:
>>
>>> Dear Roemer,
>>>
>>> Thanks for your advice.
>>> Since I would like to use Fieldtrip for TFC data and for images, with an
>>> additional cluster-over-channels option in the case of the TFC data, I
>>>
>> now
>>
>>> edited clusterstat.
>>> If called from a TFC script (I introduced a field in cfg for this), it
>>>
>> uses
>>
>>> the correction you gave to Chetan, otherwise it uses the former code.
>>> This appears to work and the results make sense. However, I ask myself
>>> whether there is an option for managing this without editing any
>>>
>> Fieldtrip
>>
>>> functions, just by cfg options?
>>> Any help would be greatly appreciated.
>>>
>>> Thanks!
>>> All the best
>>> Andrea
>>>
>>>
>>> ----------------------------------
>>> The aim of this list is to facilitate the discussion between users of the
>>>
>> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>> and EEG analysis. See also
>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>> http://www.ru.nl/neuroimaging/fieldtrip.
>>
>>>
>> --
>> Roemer van der Meij MSc
>> Scientific Programmer&   Data-Analyst
>> Donders Institute for Brain, Cognition and Behaviour
>> Centre for Cognition
>> P.O. Box 9104
>> 6500 HE Nijmegen
>> The Netherlands
>> Tel: +31(0)24 3612631
>> E-mail: r.vandermeij at donders.ru.nl
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the
>> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>> and EEG analysis. See also
>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>> http://www.ru.nl/neuroimaging/fieldtrip.
>>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>
>

--
Roemer van der Meij MSc
Scientific Programmer&  Data-Analyst
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognition
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
Tel: +31(0)24 3612631
E-mail: r.vandermeij at donders.ru.nl

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From saskia.haegens at DONDERS.RU.NL  Wed Mar 10 10:36:11 2010
From: saskia.haegens at DONDERS.RU.NL (Saskia Haegens)
Date: Wed, 10 Mar 2010 10:36:11 +0100
Subject: problem with definetrials
In-Reply-To: <4B951D7F.50708@sussex.ac.uk>
Message-ID: 

Dear Henning,

I think your event value should be a number rather than a string, i.e.

cfg.trialdef.eventvalue = 11;

Best,
Saskia


> -----Original Message-----
> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On
> Behalf Of Henning Holle
> Sent: maandag 8 maart 2010 16:54
> To: FIELDTRIP at NIC.SURFNET.NL
> Subject: [FIELDTRIP] problem with definetrials
>
> Dear list members,
>
> I am trying to define trials for a dataset. When I look for the events
> contained in the file (like this)
>
> cfg = [];
> cfg.dataset             = 'jenna.cnt'
> cfg.trialdef.eventtype = '?';
> dummy                   = definetrial(cfg);
>
> I get the following output.
>
> Reading Event Table...
> the following events were found in the datafile
> event type: 'trigger' with event values: 1  11  22  33
> no trials have been defined yet, see DEFINETRIAL for further help
> found 202 events
> created 0 trials
>
>
> Now, when I want to define the trials for all 'standard' events (which
> have the eventvalue '11'),
>
> % define trials
> cfg = [];
> cfg.dataset             = 'jenna.cnt'
> cfg.trialdef.eventtype = 'trigger'
> cfg.trialdef.eventvalue = { '11' };
> cfg_standard          = definetrial(cfg);
>
> I get the following error message.
>
> ??? Error using ==> cellstr at 34
> Input must be a string.
>
> Error in ==> cell.intersect at 44
>      a = cellstr(a);
>
> Error in ==> trialfun_general at 114
>    elseif ~isempty(intersect(event(i).value, cfg.trialdef.eventvalue))
>
> Error in ==> ft_definetrial at 110
>      [trl, event] = feval(cfg.trialfun, cfg);
>
> Error in ==> definetrial at 17
> [varargout{1:nargout}] = funhandle(varargin{:});
>
> How can I solve this problem? Am I doing something wrong? (I am using
> the most recent version of fieldtrip)
>
> Cheers,
>
> Henning
>
> --
> *************************
> Dr. Henning Holle,
> Department of Psychology,
> University of Sussex,
> Falmer, Brighton,
> BN1 9QH, U.K.
> Tel. : +44 (0)1273 877240
> Fax. : +44 (0)1273 678058
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From masaki.maruyama at CEA.FR  Wed Mar 10 10:51:46 2010
From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM)
Date: Wed, 10 Mar 2010 10:51:46 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: A<4B975EBF.2000609@donders.ru.nl>
Message-ID: 

Dear Roemer,

I greatly appreciate your prompt solving!!

With bests,
Masaki

>-----Message d'origine-----
>De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part
>de Roemer van der Meij
>Envoyé : mercredi 10 mars 2010 09:57
>À : FIELDTRIP at NIC.SURFNET.NL
>Objet : Re: [FIELDTRIP] clusterstats empty cfg.neighbours, cfg.neighbours
>example
>
>Dear Masaki,
>
>I'm verry sorry for that, I introduced a bug altering clusterstat.m the
>day before yesterday. This was resolved yesterday afternoon, so the most
>recent ftp-version will work appropriately again.
>
>Sorry for the inconvenience,
>
>Best,
>Roemer
>
>
>On 3/9/2010 7:04 PM, MARUYAMA Masaki INSERM wrote:
>> Dear Roemer,
>>
>>
>> The last version of fieldtrip fails the clustering in the default option,
>i.e., no specification of cfg.neighbouring. Since my script works correctly
>until the previous version, I'm afraid that the recent change might be a
>causal. Could you please confirm whether the default option can still work
>after the change?
>> An error message I received is attached below.
>>
>> Thank you in advance for your kind helps.
>>
>>
>> Sincerely yours,
>> Masaki Maruyama
>>
>>
>> ??? Undefined function or variable "channeighbstructmat".
>>
>> Error in ==>  clusterstat at 178
>>        posclusobs = findcluster(reshape(postailobs,
>[cfg.dim,1]),channeighbstructmat,cfg.minnbchan);
>>
>> Error in ==>  statistics_montecarlo at 305
>>    [stat, cfg] = clusterstat(cfg, statrand, statobs,'issource',issource);
>>
>> Error in ==>  statistics_wrapper at 275
>>      [stat, cfg] = statmethod(cfg, dat, cfg.design);
>>
>> Error in ==>  ft_timelockstatistics at 80
>> [stat, cfg] = statistics_wrapper(cfg, varargin{:});
>>
>> Error in ==>  timelockstatistics at 17
>> [varargout{1:nargout}] = funhandle(varargin{:});
>>
>>
>>
>>
>>
>>
>>
>>
>>> -----Message d'origine-----
>>> De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la
>part
>>> de Roemer van der Meij
>>> Envoyé : mardi 9 mars 2010 09:22
>>> À : FIELDTRIP at NIC.SURFNET.NL
>>> Objet : Re: [FIELDTRIP] clusterstats empty cfg.neighbours,
>cfg.neighbours
>>> example
>>>
>>> Hi Andrea,
>>>
>>> The bug should be fixed now, and cfg.neighbours should work as intedend.
>>> If you use cfg.neighbours = [] in your call to freqstatistics (or
>>> time-lock, etc...), clustering will not be done on channels. The fix
>>> should be there in the latest fieldtrip version on the ftp-server (put
>>> there last night at 23:00 I think).
>>>
>>> Happy to help,
>>>
>>> Best,
>>> Roemer
>>>
>>>
>>> On 3/5/2010 12:27 PM, Andrea Ostendorf wrote:
>>>
>>>> Dear Roemer,
>>>>
>>>> Thanks for your advice.
>>>> Since I would like to use Fieldtrip for TFC data and for images, with
>an
>>>> additional cluster-over-channels option in the case of the TFC data, I
>>>>
>>> now
>>>
>>>> edited clusterstat.
>>>> If called from a TFC script (I introduced a field in cfg for this), it
>>>>
>>> uses
>>>
>>>> the correction you gave to Chetan, otherwise it uses the former code.
>>>> This appears to work and the results make sense. However, I ask myself
>>>> whether there is an option for managing this without editing any
>>>>
>>> Fieldtrip
>>>
>>>> functions, just by cfg options?
>>>> Any help would be greatly appreciated.
>>>>
>>>> Thanks!
>>>> All the best
>>>> Andrea
>>>>
>>>>
>>>> ----------------------------------
>>>> The aim of this list is to facilitate the discussion between users of
>the
>>>>
>>> FieldTrip  toolbox, to share experiences and to discuss new ideas for
>MEG
>>> and EEG analysis. See also
>>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>>> http://www.ru.nl/neuroimaging/fieldtrip.
>>>
>>>>
>>> --
>>> Roemer van der Meij MSc
>>> Scientific Programmer&   Data-Analyst
>>> Donders Institute for Brain, Cognition and Behaviour
>>> Centre for Cognition
>>> P.O. Box 9104
>>> 6500 HE Nijmegen
>>> The Netherlands
>>> Tel: +31(0)24 3612631
>>> E-mail: r.vandermeij at donders.ru.nl
>>>
>>> ----------------------------------
>>> The aim of this list is to facilitate the discussion between users of
>the
>>> FieldTrip  toolbox, to share experiences and to discuss new ideas for
>MEG
>>> and EEG analysis. See also
>>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>>> http://www.ru.nl/neuroimaging/fieldtrip.
>>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the
>FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>and EEG analysis. See also
>http://listserv.surfnet.nl/archives/fieldtrip.html and
>http://www.ru.nl/neuroimaging/fieldtrip.
>>
>>
>
>--
>Roemer van der Meij MSc
>Scientific Programmer&  Data-Analyst
>Donders Institute for Brain, Cognition and Behaviour
>Centre for Cognition
>P.O. Box 9104
>6500 HE Nijmegen
>The Netherlands
>Tel: +31(0)24 3612631
>E-mail: r.vandermeij at donders.ru.nl
>
>----------------------------------
>The aim of this list is to facilitate the discussion between users of the
>FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>and EEG analysis. See also
>http://listserv.surfnet.nl/archives/fieldtrip.html and
>http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From aostendorf at BESA.DE  Wed Mar 10 11:36:23 2010
From: aostendorf at BESA.DE (Andrea Ostendorf)
Date: Wed, 10 Mar 2010 11:36:23 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: <4B975EBF.2000609@donders.ru.nl>
Message-ID: 

Dear Roemer,

thanks a lot for the bugfix! This was really quick. Clustering over
neighbouring channels or not in time-frequency data now works fine.
But somehow image statistics apparently does not work any more for me. I use
the same data and I have tried earlier versions of my script, too, which
used to work.
I attach the error message.

One more question: Could you tell me the correct cfg settings if I would
like to use the option cfg.avgoverchan = 'yes'? I always get an error for
that too, no matter how and whether I specify cfg.neighbours.

Sorry if I just got the settings wrong.

Thanks a lot!
All the best

Andrea

Error message in image script:

??? Error using ==> reshape
To RESHAPE the number of elements must not change.

Error in ==> fieldtrip-20100309\private\clusterstat at 179
      posclusobs = findcluster(reshape(postailobs,
[cfg.dim,1]),channeighbstructmat,cfg.minnbchan);

Error in ==> statistics_montecarlo at 305
  [stat, cfg] = clusterstat(cfg, statrand, statobs,'issource',issource);

Error in ==> fieldtrip-20100309\private\statistics_wrapper at 275
    [stat, cfg] = statmethod(cfg, dat, cfg.design);

Error in ==> ft_sourcestatistics at 103
      [stat, cfg] = statistics_wrapper(cfg, varargin{:});

Error in ==> compute_image_statistics at 148
stat = ft_sourcestatistics(cfg, sourcega1, sourcega2);


Error message for averaging over channels in TF data:

??? Error using ==> fieldtrip-20100309\private\findcluster at 37
invalid dimension of spatdimneighbstructmat

Error in ==> fieldtrip-20100309\private\clusterstat at 179
      posclusobs = findcluster(reshape(postailobs,
[cfg.dim,1]),channeighbstructmat,cfg.minnbchan);

Error in ==> statistics_montecarlo at 305
  [stat, cfg] = clusterstat(cfg, statrand, statobs,'issource',issource);

Error in ==> fieldtrip-20100309\private\statistics_wrapper at 275
    [stat, cfg] = statmethod(cfg, dat, cfg.design);

Error in ==> ft_freqstatistics at 89
  [stat, cfg] = statistics_wrapper(cfg, varargin{:});

Error in ==> compute_tfc_statistics at 516
    stat = ft_freqstatistics(cfg,set_1{:},set_2{:});

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From karl.doron at GMAIL.COM  Wed Mar 10 14:36:49 2010
From: karl.doron at GMAIL.COM (Karl Doron)
Date: Wed, 10 Mar 2010 14:36:49 +0100
Subject: single trial/channel phase angles
Message-ID: 

Hello,

I'm looking at some MEG data and have a hypothesis about cross frequency
coupling. Specifically, a relationship between lower frequency phase and
higher frequency amplitudes. I'm trying to save and view the phase angles
after doing wavelet analysis using wltconvol. 

If this is implemented -great! Otherwise, it seems that somewhere after line
216 of ft_freqanalysis_wltconvol.m (after the ifft), I should be able to
save the complex numbers and use angle(input) to find the phase angle of
each time point on a trial by trial basis. It seems easier to do in the
'tfr' wavelet code, but the time domain covolution is very slow.

Thanks for any help!

Karl Doron

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From jan.schoffelen at DONDERS.RU.NL  Wed Mar 10 15:32:17 2010
From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen)
Date: Wed, 10 Mar 2010 15:32:17 +0100
Subject: single trial/channel phase angles
In-Reply-To: 
Message-ID: 

Hi Karl,

freqanalysis with method = 'mtmconvol' allows you to keep the fourier
coefficients (cfg.output = 'fourier') so you'll get a complex
representation there.

Best,

Jan-Mathijs


On Mar 10, 2010, at 2:36 PM, Karl Doron wrote:

> Hello,
>
> I'm looking at some MEG data and have a hypothesis about cross
> frequency
> coupling. Specifically, a relationship between lower frequency phase
> and
> higher frequency amplitudes. I'm trying to save and view the phase
> angles
> after doing wavelet analysis using wltconvol.
>
> If this is implemented -great! Otherwise, it seems that somewhere
> after line
> 216 of ft_freqanalysis_wltconvol.m (after the ifft), I should be
> able to
> save the complex numbers and use angle(input) to find the phase
> angle of
> each time point on a trial by trial basis. It seems easier to do in
> the
> 'tfr' wavelet code, but the time domain covolution is very slow.
>
> Thanks for any help!
>
> Karl Doron
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users
> of the FieldTrip  toolbox, to share experiences and to discuss new
> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html
>  and http://www.ru.nl/neuroimaging/fieldtrip.
>

Dr. J.M. (Jan-Mathijs) Schoffelen
Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
Telephone: 0031-24-3668063

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From karl.doron at GMAIL.COM  Wed Mar 10 19:28:45 2010
From: karl.doron at GMAIL.COM (Karl Doron)
Date: Wed, 10 Mar 2010 19:28:45 +0100
Subject: single trial/channel phase angles
In-Reply-To: <6825D318-71BC-48D1-BD36-5401ED05A611@donders.ru.nl>
Message-ID: 

Hello Jan-Mathijs,

I'm able to find the complex trial data now, but I've been avoiding the
mtmconvol method because I don't have very good grasp on it. I'm getting
phase angles greater than pi. Is there a simple way to run it on some
simulated data?

I'm trying to find a periodic signal at 2Hz with non-stationary gamma
transients linked to its phase.

Thanks for any feedback!

-karl

On Wed, Mar 10, 2010 at 3:32 PM, jan-mathijs schoffelen <
jan.schoffelen at donders.ru.nl> wrote:

> Hi Karl,
>
> freqanalysis with method = 'mtmconvol' allows you to keep the fourier
> coefficients (cfg.output = 'fourier') so you'll get a complex representation
> there.
>
> Best,
>
> Jan-Mathijs
>
>
>
> On Mar 10, 2010, at 2:36 PM, Karl Doron wrote:
>
>  Hello,
>>
>> I'm looking at some MEG data and have a hypothesis about cross frequency
>> coupling. Specifically, a relationship between lower frequency phase and
>> higher frequency amplitudes. I'm trying to save and view the phase angles
>> after doing wavelet analysis using wltconvol.
>>
>> If this is implemented -great! Otherwise, it seems that somewhere after
>> line
>> 216 of ft_freqanalysis_wltconvol.m (after the ifft), I should be able to
>> save the complex numbers and use angle(input) to find the phase angle of
>> each time point on a trial by trial basis. It seems easier to do in the
>> 'tfr' wavelet code, but the time domain covolution is very slow.
>>
>> Thanks for any help!
>>
>> Karl Doron
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the
>> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>> and EEG analysis. See also
>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>> http://www.ru.nl/neuroimaging/fieldtrip.
>>
>>
> Dr. J.M. (Jan-Mathijs) Schoffelen
> Donders Institute for Brain, Cognition and Behaviour,
> Centre for Cognitive Neuroimaging,
> Radboud University Nijmegen, The Netherlands
> J.Schoffelen at donders.ru.nl
> Telephone: 0031-24-3668063
>
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From brian.roach at YALE.EDU  Wed Mar 10 19:51:39 2010
From: brian.roach at YALE.EDU (Brian Roach)
Date: Wed, 10 Mar 2010 10:51:39 -0800
Subject: single trial/channel phase angles
In-Reply-To: <1fc4dff91003101028i5460461bn63c1d9edb8fad448@mail.gmail.com>
Message-ID: 

Hi Karl,

You can use wltconvol if you edit it.  If you step through the code, and
find the spot where data are converted form complex numbers to power
values, you only need to remove the abs(***) statement to keep the data
in complex form.  This is how we've done it, but you may have a
different version of the code:

if keep == 1
             powdum = (2.* abs(autspctrmacttap)  ./ data.fsample) .^ 2;
         elseif keep == 2
             %this is where we retain complex values:
             powdum = (autspctrmacttap  ./ data.fsample);
         end


Hope this helps,
Brian
On 3/10/2010 10:28 AM, Karl Doron wrote:
> Hello Jan-Mathijs,
>
> I'm able to find the complex trial data now, but I've been avoiding
> the mtmconvol method because I don't have very good grasp on it. I'm
> getting phase angles greater than pi. Is there a simple way to run it
> on some simulated data?
>
> I'm trying to find a periodic signal at 2Hz with non-stationary gamma
> transients linked to its phase.
>
> Thanks for any feedback!
>
> -karl
>
> On Wed, Mar 10, 2010 at 3:32 PM, jan-mathijs schoffelen
> >
> wrote:
>
>     Hi Karl,
>
>     freqanalysis with method = 'mtmconvol' allows you to keep the
>     fourier coefficients (cfg.output = 'fourier') so you'll get a
>     complex representation there.
>
>     Best,
>
>     Jan-Mathijs
>
>
>
>     On Mar 10, 2010, at 2:36 PM, Karl Doron wrote:
>
>         Hello,
>
>         I'm looking at some MEG data and have a hypothesis about cross
>         frequency
>         coupling. Specifically, a relationship between lower frequency
>         phase and
>         higher frequency amplitudes. I'm trying to save and view the
>         phase angles
>         after doing wavelet analysis using wltconvol.
>
>         If this is implemented -great! Otherwise, it seems that
>         somewhere after line
>         216 of ft_freqanalysis_wltconvol.m (after the ifft), I should
>         be able to
>         save the complex numbers and use angle(input) to find the
>         phase angle of
>         each time point on a trial by trial basis. It seems easier to
>         do in the
>         'tfr' wavelet code, but the time domain covolution is very slow.
>
>         Thanks for any help!
>
>         Karl Doron
>
>         ----------------------------------
>         The aim of this list is to facilitate the discussion between
>         users of the FieldTrip  toolbox, to share experiences and to
>         discuss new ideas for MEG and EEG analysis. See also
>         http://listserv.surfnet.nl/archives/fieldtrip.html and
>         http://www.ru.nl/neuroimaging/fieldtrip.
>
>
>     Dr. J.M. (Jan-Mathijs) Schoffelen
>     Donders Institute for Brain, Cognition and Behaviour,
>     Centre for Cognitive Neuroimaging,
>     Radboud University Nijmegen, The Netherlands
>     J.Schoffelen at donders.ru.nl 
>     Telephone: 0031-24-3668063
>
>
>     ----------------------------------
>     The aim of this list is to facilitate the discussion between users
>     of the FieldTrip  toolbox, to share experiences and to discuss new
>     ideas for MEG and EEG analysis. See also
>     http://listserv.surfnet.nl/archives/fieldtrip.html and
>     http://www.ru.nl/neuroimaging/fieldtrip.
>
>
> ----------------------------------
>
> The aim of this list is to facilitate the discussion between users of
> the FieldTrip toolbox, to share experiences and to discuss new ideas
> for MEG and EEG analysis.
>
> http://listserv.surfnet.nl/archives/fieldtrip.html
>
> http://www.ru.nl/fcdonders/fieldtrip/
>


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From r.oostenveld at FCDONDERS.RU.NL  Wed Mar 10 21:57:25 2010
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Wed, 10 Mar 2010 21:57:25 +0100
Subject: reading bdf+ files?
In-Reply-To: <4B94C3B7.5090709@uni-konstanz.de>
Message-ID: 

Hi Thomas,


On 8 Mar 2010, at 10:30, Thomas Hartmann wrote:
> thanks for the quick answere.
> yes, bdf+ is bdf with an annotation-channel added. this channel is unlike the bdf trigger channel. so this, as i had already expected, explains the problem.
> 
> my major motivation for using bdf+ is the availability of a ready-to-use c++ library. unfortunatly it only writes bdf+ or edf+, not the "standard" format.
> 
> does someone know of a stable, well-documented, free library (c or c++) to write eeg-data in a format, fieldtrip can read?


I would probably write it in a brainvision analyzer alike format. Although I am not aware of formal/official documentation, the file format is very simple (and widely supported). It consists of an ascii header file (*.vhdr), an ascii marker file (*.vmrk) and a binary file with the data. Although the data file is normally binary, it can also be ascii (but that makes reading it very inefficient).

The ascii header file (ini-like) explains the format of the binary file, which can have different data formats (int16,32 and probably floats) and be multiplexed or not. 

On ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/subj2.zip you can find some example data which is used in http://fieldtrip.fcdonders.nl/tutorial/continuous. I don't know the details of that particular dataset, but probably it is pretty standard. I guess it has 64 channels 32 bit continuous recording with 5 to 10 different trigger values in it. Combined with fieldtrip/fileio/private/read_brainvision_vhdr, read_brainvision_eeg and read_brainvision_vmrk you can probably easily figure out what the file format is. Writing the two text files and a binary multiplexed file could easily be done without a C++ library. I just realised that in fieldtrip you can also export to that file format using the write_data function. Have a look in fieldtrip/fileio/private/write_brainvision_eeg for the details of the simplest format. 

Hmm, a more challenging problem from the C++ perspective then is to implement the accompanying *reader* for it. In Matlab that is simple, but parsing the text files in C++ and going over all possible options and sub-formats would be non-trivial in C++. You might want to have a look at http://biosig.sourceforge.net/projects.html to see whether that provides a C++ solution.

best regards,
Robert

 

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From thomas.hartmann at UNI-KONSTANZ.DE  Thu Mar 11 00:38:05 2010
From: thomas.hartmann at UNI-KONSTANZ.DE (Thomas Hartmann)
Date: Thu, 11 Mar 2010 00:38:05 +0100
Subject: reading bdf+ files?
In-Reply-To: 
Message-ID: 

hi robert,
thanks again for the detailed answere. i have indeed already thought
about the brainvision format. what makes me favor bdf is the fact that
it only works with one file. renaming a brainvision-file is a problem as
filenames are used to identify trigger and data files.

as i got to know the bdf format quite well in the last days, i would
prefere that one if its well supported in fieldtrip. i would propably
have to write my own lib for that, but the format seems pretty straight
forward.

can you give me a hint of how triggers are stored in the "original"
biosemi bdf format? from what i understood, they use an extra channel
with the same samplingrate as the others, writing the trigger values as
24bit values, thus constisting of 3 bytes each. each of the byte seems
to have a different meaning. do you know something about that?

best regards,
thomas

Am 10.03.2010 21:57, schrieb Robert Oostenveld:
> Hi Thomas,
>
>
> On 8 Mar 2010, at 10:30, Thomas Hartmann wrote:
>
>> thanks for the quick answere.
>> yes, bdf+ is bdf with an annotation-channel added. this channel is unlike the bdf trigger channel. so this, as i had already expected, explains the problem.
>>
>> my major motivation for using bdf+ is the availability of a ready-to-use c++ library. unfortunatly it only writes bdf+ or edf+, not the "standard" format.
>>
>> does someone know of a stable, well-documented, free library (c or c++) to write eeg-data in a format, fieldtrip can read?
>>
>
> I would probably write it in a brainvision analyzer alike format. Although I am not aware of formal/official documentation, the file format is very simple (and widely supported). It consists of an ascii header file (*.vhdr), an ascii marker file (*.vmrk) and a binary file with the data. Although the data file is normally binary, it can also be ascii (but that makes reading it very inefficient).
>
> The ascii header file (ini-like) explains the format of the binary file, which can have different data formats (int16,32 and probably floats) and be multiplexed or not.
>
> On ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/subj2.zip you can find some example data which is used in http://fieldtrip.fcdonders.nl/tutorial/continuous. I don't know the details of that particular dataset, but probably it is pretty standard. I guess it has 64 channels 32 bit continuous recording with 5 to 10 different trigger values in it. Combined with fieldtrip/fileio/private/read_brainvision_vhdr, read_brainvision_eeg and read_brainvision_vmrk you can probably easily figure out what the file format is. Writing the two text files and a binary multiplexed file could easily be done without a C++ library. I just realised that in fieldtrip you can also export to that file format using the write_data function. Have a look in fieldtrip/fileio/private/write_brainvision_eeg for the details of the simplest format.
>
> Hmm, a more challenging problem from the C++ perspective then is to implement the accompanying *reader* for it. In Matlab that is simple, but parsing the text files in C++ and going over all possible options and sub-formats would be non-trivial in C++. You might want to have a look at http://biosig.sourceforge.net/projects.html to see whether that provides a C++ solution.
>
> best regards,
> Robert
>
>
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>


--
Dipl. Psych. Thomas Hartmann

OBOB-Lab
University of Konstanz
Department of Psychology
P.O. Box D25
78457 Konstanz
Germany

Tel.: +49 (0)7531 88 4612
Fax: +49 (0)7531-88 4601
Email: thomas.hartmann at uni-konstanz.de
Homepage: http://www.uni-konstanz.de/obob

"I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle)

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From karl.doron at GMAIL.COM  Thu Mar 11 11:26:31 2010
From: karl.doron at GMAIL.COM (Karl Doron)
Date: Thu, 11 Mar 2010 11:26:31 +0100
Subject: single trial/channel phase angles
In-Reply-To: <4B97E99B.10900@ncire.org>
Message-ID: 

Great! - thanks for the helpful information. Now I'm having trouble
recovering frequencies below 6Hz using the wltconvol method. My trial time
window is 3.5 seconds, so I am guessing this has to do with a minimum number
of time bins left from the partial artifact rejection.

Does anyone have any recommendations for setting a minimum trial length, and
where I might do this?  minoffset?

Thanks,
karl doron

On Wed, Mar 10, 2010 at 7:48 PM, Brian Roach  wrote:

>  Hi Karl,
>
> You can use wltconvol if you edit it.  If you step through the code, and
> find the spot where data are converted form complex numbers to power values,
> you only need to remove the abs(***) statement to keep the data in complex
> form.  This is how we've done it, but you may have a different version of
> the code:
>
> if keep == 1
>             powdum = (2.* abs(autspctrmacttap)  ./ data.fsample) .^ 2;
>         elseif keep == 2
>             %this is where we retain complex values:
>             powdum = (autspctrmacttap  ./ data.fsample);
>         end
>
>
> Hope this helps,
> Brian
>
>
>
> On 3/10/2010 10:28 AM, Karl Doron wrote:
>
> Hello Jan-Mathijs,
>
> I'm able to find the complex trial data now, but I've been avoiding the
> mtmconvol method because I don't have very good grasp on it. I'm getting
> phase angles greater than pi. Is there a simple way to run it on some
> simulated data?
>
> I'm trying to find a periodic signal at 2Hz with non-stationary gamma
> transients linked to its phase.
>
> Thanks for any feedback!
>
> -karl
>
> On Wed, Mar 10, 2010 at 3:32 PM, jan-mathijs schoffelen <
> jan.schoffelen at donders.ru.nl> wrote:
>
>> Hi Karl,
>>
>> freqanalysis with method = 'mtmconvol' allows you to keep the fourier
>> coefficients (cfg.output = 'fourier') so you'll get a complex representation
>> there.
>>
>> Best,
>>
>> Jan-Mathijs
>>
>>
>>
>> On Mar 10, 2010, at 2:36 PM, Karl Doron wrote:
>>
>>  Hello,
>>>
>>> I'm looking at some MEG data and have a hypothesis about cross frequency
>>> coupling. Specifically, a relationship between lower frequency phase and
>>> higher frequency amplitudes. I'm trying to save and view the phase angles
>>> after doing wavelet analysis using wltconvol.
>>>
>>> If this is implemented -great! Otherwise, it seems that somewhere after
>>> line
>>> 216 of ft_freqanalysis_wltconvol.m (after the ifft), I should be able to
>>> save the complex numbers and use angle(input) to find the phase angle of
>>> each time point on a trial by trial basis. It seems easier to do in the
>>> 'tfr' wavelet code, but the time domain covolution is very slow.
>>>
>>> Thanks for any help!
>>>
>>> Karl Doron
>>>
>>> ----------------------------------
>>> The aim of this list is to facilitate the discussion between users of the
>>> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>>> and EEG analysis. See also
>>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>>> http://www.ru.nl/neuroimaging/fieldtrip.
>>>
>>>
>>  Dr. J.M. (Jan-Mathijs) Schoffelen
>> Donders Institute for Brain, Cognition and Behaviour,
>> Centre for Cognitive Neuroimaging,
>> Radboud University Nijmegen, The Netherlands
>> J.Schoffelen at donders.ru.nl
>> Telephone: 0031-24-3668063
>>
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the
>> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>> and EEG analysis. See also
>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>> http://www.ru.nl/neuroimaging/fieldtrip.
>>
>
> ----------------------------------
>
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and
> EEG analysis.
>
> http://listserv.surfnet.nl/archives/fieldtrip.html
>
> http://www.ru.nl/fcdonders/fieldtrip/
>
>
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From r.vandermeij at DONDERS.RU.NL  Thu Mar 11 11:44:17 2010
From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij)
Date: Thu, 11 Mar 2010 11:44:17 +0100
Subject: Label display problem with ft_topoplotER for EEG-MEG data
In-Reply-To: <4b0f659b1003030616k235ffc75n4a787e1fb5095bcb@mail.gmail.com>
Message-ID: 

Hi Lucie,

Could you perhaps send the script with the relevant options you used
with a bit of data so I can try to replicate the bug? If your data has
to be larger than a 1 or 2 MB you can also send it my e-mail address
(see signature).
This would be very helpful in fixing the bug.

Thanks in advance,

Best,
Roemer




On 3/3/2010 3:16 PM, Lucie Charles wrote:
> Hi everyone ,
>
> I noticed a small bug using ft_topoplotER with my EEG-MEG data that I
> think I managed to correct.
>
> When I try to use the option :
>
> /cfg.highlight = ' labels '
> /or /
> cfg.marker  = ' labels '/
>
> I have an error message saying that it doesn't find coordinates for
> some labels (see at the end for the entire message). I looked into it
> and it seems that EEG channels are always in the list of channels that
> the function tries to plot even if I'm trying to plot only
> magnetometers for example.
>
> I made two small changes at the ft_topoplotER and it seems to solve
> the problem :
>
> /line 606 >  templay.label      =  data.label(labelindex);
> /instead of
> /templay.label      = //channelselection(cfg.highlightchannel{icell},
> data.label);/
>
> /line 631 >  templay.label    = data.label(labelindex); /
> instead of /
> templay.label    =
> channelselection(setdiff(1:length(data.label),highlightchansel),
> data.label);
>
> /This solution works fine for me but I'm not sure that it will work in
> any case./
> /
> Still I hope it helps.
>
> Cheers,
>
> Lucie CHARLES
>
>
>
> Error Message :
>
> /??? Error using ==> text
> Each string specified must have a corresponding set of coordinates
>
> Error in ==> plot_lay at 73
>   text(X+labeloffset, Y+(labeloffset*1.5), Lbl,'fontsize',labelsize);
>
> Error in ==> ft_topoplotER at 617
>     plot_lay(templay,'box','no','label',labelflg,'point','yes',...
>
> Error in ==> topoplotER at 17
> [varargout{1:nargout}] = funhandle(varargin{:});/
>
> ----------------------------------
>
> The aim of this list is to facilitate the discussion between users of
> the FieldTrip toolbox, to share experiences and to discuss new ideas
> for MEG and EEG analysis.
>
> http://listserv.surfnet.nl/archives/fieldtrip.html
>
> http://www.ru.nl/fcdonders/fieldtrip/
>

--
Roemer van der Meij MSc
Scientific Programmer&  Data-Analyst
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognition
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
Tel: +31(0)24 3612631
E-mail: r.vandermeij at donders.ru.nl


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From zaifengg at GMAIL.COM  Fri Mar 12 11:07:48 2010
From: zaifengg at GMAIL.COM (gao zai)
Date: Fri, 12 Mar 2010 12:07:48 +0200
Subject: Questions on High pass filter and Padding in Preprocessing
Message-ID: 

Dear all,

I am now working on the MEG data in 4D format. Since it was collected in DC,
so I want to first use a bandpass filter [0.1 80] to filter my data.
However, I found that the latter part of averaged results drifted away
relative to the  results when no filter or only a low-pass filter is used
(see the attached Fig.1). I thought it may be related to the end effect, so
I used cfg.padding=1, it didn't work. Latter I turned to use cfg.padding=10
(1/.1=10) it works and no obvious drift was found.

However, when tried to only apply a high pass filter to the raw data,
regardless of using cfg.padding=10, the results always showed a square wave
(see Fig.2). And there is a warning:"Matrix is close to singular or badly
scaled. Results may be inaccurate. RCOND = 6.669292e-17."I don't understand
why this happened. Does anybody know what is the problem with it? How can I
get a right result in this case? Thank you very much.

The script I used:
----------------------------------------------------
cfg=[];
cfg.dataset ='c,rfDC';
cfg.trialdef.eventtype  = 'TRIGGER';
cfg.trialdef.eventvalue =42;
cfg.trialdef.prestim    = 1;
cfg.trialdef.poststim   = 1.5;
cfg.trialdef.offset     = 1;
cfg.trialfun            = 'mytrialfun';
cfg = definetrial(cfg);

%for band pass
%cfg.bpfilter='yes';
%cfg.bpfreq=[0.1 80];

%padding
cfg.padding=10;

%for hp filter
cfg.hpfilter='yes';    %high pass filter
cfg.hpfreq=0.1;         %cutoff

cfg.blc = 'yes'; %baseline correct
cfg.blcwindow  = [-0.30 -0.10];
cfg.channel={'MEG'};
[data] = preprocessing(cfg);
--------------------------------

Best,
Feng

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Fig1.png
Type: image/png
Size: 11637 bytes
Desc: not available
URL: 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Fig.2_square wave.png
Type: image/png
Size: 1041 bytes
Desc: not available
URL: 

From a.wollbrink at UNI-MUENSTER.DE  Fri Mar 12 11:33:28 2010
From: a.wollbrink at UNI-MUENSTER.DE (Andreas Wollbrink)
Date: Fri, 12 Mar 2010 11:33:28 +0100
Subject: support for Besa Toolbox for .avr files
Message-ID: 

Dear all,

is there any reason the support for the high level input functions
provided by the Besa Toolbox (by Carsten Hochstaetter) is not
implemented in the besa2fieldtrip function in case using the 'besa_avr'
file format even the related function readBESAavr.m does exist?
For the other formats (besa_mul, besa_tfc, besa_swf, besa_src) this is
realised using the hasbes(-toolbox) switch.

Thanks in advance,
Andreas Wollbrink

--


======================================================================

   Andreas Wollbrink, Biomedical Engineer

   Institute for Biomagnetism and Biosignalanalysis       	
   Muenster University Hospital

   Malmedyweg 15        phone:   +49-(0)251-83-52546
   D-48149 Muenster     fax:     +49-(0)251-83-56874	
   Germany
                        e-Mail: a.wollbrink at uni-muenster.de

======================================================================

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From aostendorf at BESA.DE  Fri Mar 12 11:52:06 2010
From: aostendorf at BESA.DE (Andrea Ostendorf)
Date: Fri, 12 Mar 2010 11:52:06 +0100
Subject: support for Besa Toolbox for .avr files
In-Reply-To: <4B9A1878.5050907@uni-muenster.de>
Message-ID: 

Dear Andreas,

Thanks for noticing. readBESAavr has not been included for long. I will see
to it.

Best,
Andrea
 
> -----Original Message-----
> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On
> Behalf Of Andreas Wollbrink
> Sent: Freitag, 12. März 2010 11:33
> To: FIELDTRIP at NIC.SURFNET.NL
> Subject: [FIELDTRIP] support for Besa Toolbox for .avr files
> 
> Dear all,
> 
> is there any reason the support for the high level input functions
> provided by the Besa Toolbox (by Carsten Hochstaetter) is not
> implemented in the besa2fieldtrip function in case using the 'besa_avr'
> file format even the related function readBESAavr.m does exist?
> For the other formats (besa_mul, besa_tfc, besa_swf, besa_src) this is
> realised using the hasbes(-toolbox) switch.
> 
> Thanks in advance,
> Andreas Wollbrink
> 
> --
> 
> 
> ======================================================================
> 
>    Andreas Wollbrink, Biomedical Engineer
> 
>    Institute for Biomagnetism and Biosignalanalysis
>    Muenster University Hospital
> 
>    Malmedyweg 15        phone:   +49-(0)251-83-52546
>    D-48149 Muenster     fax:     +49-(0)251-83-56874
>    Germany
>                         e-Mail: a.wollbrink at uni-muenster.de
> 
> ======================================================================
> 
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
> 
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4937 (20100311) __________
> 
> The message was checked by ESET NOD32 Antivirus.
> 
> http://www.eset.com
> 

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From aostendorf at BESA.DE  Sun Mar 14 17:26:49 2010
From: aostendorf at BESA.DE (Andrea Ostendorf)
Date: Sun, 14 Mar 2010 17:26:49 +0100
Subject: support for Besa Toolbox for .avr files
In-Reply-To: <4B9A1878.5050907@uni-muenster.de>
Message-ID: 

Dear Mr Wollbrink,

In the current Fieldtrip version, readBESAavr has been implemented. Thank
you for noticing the omission!

Best regards
Andrea Ostendorf 

Dr. Andrea Ostendorf
Research & Development
 
MEGIS Software GmbH
Freihamer Str. 18
82166 Gräfelfing/Germany
HRB München 109956
CEOs: Dr. Michael Scherg, Theodor Scherg
 
 

> -----Original Message-----
> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On
> Behalf Of Andreas Wollbrink
> Sent: Freitag, 12. März 2010 11:33
> To: FIELDTRIP at NIC.SURFNET.NL
> Subject: [FIELDTRIP] support for Besa Toolbox for .avr files
> 
> Dear all,
> 
> is there any reason the support for the high level input functions
> provided by the Besa Toolbox (by Carsten Hochstaetter) is not
> implemented in the besa2fieldtrip function in case using the 'besa_avr'
> file format even the related function readBESAavr.m does exist?
> For the other formats (besa_mul, besa_tfc, besa_swf, besa_src) this is
> realised using the hasbes(-toolbox) switch.
> 
> Thanks in advance,
> Andreas Wollbrink
> 
> --
> 
> 
> ======================================================================
> 
>    Andreas Wollbrink, Biomedical Engineer
> 
>    Institute for Biomagnetism and Biosignalanalysis
>    Muenster University Hospital
> 
>    Malmedyweg 15        phone:   +49-(0)251-83-52546
>    D-48149 Muenster     fax:     +49-(0)251-83-56874
>    Germany
>                         e-Mail: a.wollbrink at uni-muenster.de
> 
> ======================================================================
> 
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
> 
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4937 (20100311) __________
> 
> The message was checked by ESET NOD32 Antivirus.
> 
> http://www.eset.com
> 

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From a.wollbrink at UNI-MUENSTER.DE  Mon Mar 15 09:40:19 2010
From: a.wollbrink at UNI-MUENSTER.DE (Andreas Wollbrink)
Date: Mon, 15 Mar 2010 09:40:19 +0100
Subject: support for Besa Toolbox for .avr files
In-Reply-To: 
Message-ID: 

Dear Mrs Ostendorf,

thanks for implementing the readBESAavr function.

Unfortunately the code fails in case no channel labels are defined in
the second row of the .avr file (which were optionally at least in
previous versions of Besa).

To fix the problem you may add a few lines to the besa2fieldtrip
function (see below) to account for a missing 'ChannelLabels' field in
the ('tmp') structure returned by 'readBESAavr':

data.label = [];
if isfield(tmp, 'ChannelLabels'),
	data.label = fixlabels(tmp.ChannelLabels);
end


In this case later on the channel labels have to be defined either
manually by the user or they can be determined from other files (see below).

dat = besa2fieldtrip(avrFile);
dat.elec = read_sens(elecPosFile);
if isempty(dat.label), dat.label = dat.elec.label; end


Regards,
Andreas Wollbrink


On 03/14/10 17:26, Andrea Ostendorf wrote:
> Dear Mr Wollbrink,
>
> In the current Fieldtrip version, readBESAavr has been implemented. Thank
> you for noticing the omission!
>
> Best regards
> Andrea Ostendorf
>
> Dr. Andrea Ostendorf
> Research&  Development
>
> MEGIS Software GmbH
> Freihamer Str. 18
> 82166 Gräfelfing/Germany
> HRB München 109956
> CEOs: Dr. Michael Scherg, Theodor Scherg
>
>
>
>> -----Original Message-----
>> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On
>> Behalf Of Andreas Wollbrink
>> Sent: Freitag, 12. März 2010 11:33
>> To: FIELDTRIP at NIC.SURFNET.NL
>> Subject: [FIELDTRIP] support for Besa Toolbox for .avr files
>>
>> Dear all,
>>
>> is there any reason the support for the high level input functions
>> provided by the Besa Toolbox (by Carsten Hochstaetter) is not
>> implemented in the besa2fieldtrip function in case using the 'besa_avr'
>> file format even the related function readBESAavr.m does exist?
>> For the other formats (besa_mul, besa_tfc, besa_swf, besa_src) this is
>> realised using the hasbes(-toolbox) switch.
>>
>> Thanks in advance,
>> Andreas Wollbrink
>>
>> --
>>
>>
>> ======================================================================
>>
>>     Andreas Wollbrink, Biomedical Engineer
>>
>>     Institute for Biomagnetism and Biosignalanalysis
>>     Muenster University Hospital
>>
>>     Malmedyweg 15        phone:   +49-(0)251-83-52546
>>     D-48149 Muenster     fax:     +49-(0)251-83-56874
>>     Germany
>>                          e-Mail: a.wollbrink at uni-muenster.de
>>
>> ======================================================================
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the
>> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>> and EEG analysis. See also
>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>> http://www.ru.nl/neuroimaging/fieldtrip.
>>
>> __________ Information from ESET NOD32 Antivirus, version of virus
>> signature database 4937 (20100311) __________
>>
>> The message was checked by ESET NOD32 Antivirus.
>>
>> http://www.eset.com
>>
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.

--


======================================================================

   Andreas Wollbrink, Biomedical Engineer

   Institute for Biomagnetism and Biosignalanalysis       	
   Muenster University Hospital

   Malmedyweg 15        phone:   +49-(0)251-83-52546
   D-48149 Muenster     fax:     +49-(0)251-83-56874	
   Germany
                        e-Mail: a.wollbrink at uni-muenster.de

======================================================================

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From aostendorf at BESA.DE  Mon Mar 15 10:26:11 2010
From: aostendorf at BESA.DE (Andrea Ostendorf)
Date: Mon, 15 Mar 2010 10:26:11 +0100
Subject: support for Besa Toolbox for .avr files
In-Reply-To: <4B9DF273.4090201@uni-muenster.de>
Message-ID: 

Dear Mr Wollbrink,

Thanks for noticing! I saw that read_besa_avr had a problem if the elp file
did not contain the optional channel labels but omitted to test
besa2fieldtrip with readBESAavr for an elp file without channel labels.
Sorry about that. I just amended besa2fieldtrip using your advice.
Thanks!

Best regards
Andrea Ostendorf


 
> -----Original Message-----
> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On
> Behalf Of Andreas Wollbrink
> Sent: Montag, 15. März 2010 09:40
> To: FIELDTRIP at NIC.SURFNET.NL
> Subject: Re: [FIELDTRIP] support for Besa Toolbox for .avr files
> 
> Dear Mrs Ostendorf,
> 
> thanks for implementing the readBESAavr function.
> 
> Unfortunately the code fails in case no channel labels are defined in
> the second row of the .avr file (which were optionally at least in
> previous versions of Besa).
> 
> To fix the problem you may add a few lines to the besa2fieldtrip
> function (see below) to account for a missing 'ChannelLabels' field in
> the ('tmp') structure returned by 'readBESAavr':
> 
> data.label = [];
> if isfield(tmp, 'ChannelLabels'),
> 	data.label = fixlabels(tmp.ChannelLabels);
> end
> 
> 
> In this case later on the channel labels have to be defined either
> manually by the user or they can be determined from other files (see
> below).
> 
> dat = besa2fieldtrip(avrFile);
> dat.elec = read_sens(elecPosFile);
> if isempty(dat.label), dat.label = dat.elec.label; end
> 
> 
> Regards,
> Andreas Wollbrink
> 
> 
> On 03/14/10 17:26, Andrea Ostendorf wrote:
> > Dear Mr Wollbrink,
> >
> > In the current Fieldtrip version, readBESAavr has been implemented.
> Thank
> > you for noticing the omission!
> >
> > Best regards
> > Andrea Ostendorf
> >
> > Dr. Andrea Ostendorf
> > Research&  Development
> >
> > MEGIS Software GmbH
> > Freihamer Str. 18
> > 82166 Gräfelfing/Germany
> > HRB München 109956
> > CEOs: Dr. Michael Scherg, Theodor Scherg
> >
> >
> >
> >> -----Original Message-----
> >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On
> >> Behalf Of Andreas Wollbrink
> >> Sent: Freitag, 12. März 2010 11:33
> >> To: FIELDTRIP at NIC.SURFNET.NL
> >> Subject: [FIELDTRIP] support for Besa Toolbox for .avr files
> >>
> >> Dear all,
> >>
> >> is there any reason the support for the high level input functions
> >> provided by the Besa Toolbox (by Carsten Hochstaetter) is not
> >> implemented in the besa2fieldtrip function in case using the 'besa_avr'
> >> file format even the related function readBESAavr.m does exist?
> >> For the other formats (besa_mul, besa_tfc, besa_swf, besa_src) this is
> >> realised using the hasbes(-toolbox) switch.
> >>
> >> Thanks in advance,
> >> Andreas Wollbrink
> >>
> >> --
> >>
> >>
> >> ======================================================================
> >>
> >>     Andreas Wollbrink, Biomedical Engineer
> >>
> >>     Institute for Biomagnetism and Biosignalanalysis
> >>     Muenster University Hospital
> >>
> >>     Malmedyweg 15        phone:   +49-(0)251-83-52546
> >>     D-48149 Muenster     fax:     +49-(0)251-83-56874
> >>     Germany
> >>                          e-Mail: a.wollbrink at uni-muenster.de
> >>
> >> ======================================================================
> >>
> >> ----------------------------------
> >> The aim of this list is to facilitate the discussion between users of
> the
> >> FieldTrip  toolbox, to share experiences and to discuss new ideas for
> MEG
> >> and EEG analysis. See also
> >> http://listserv.surfnet.nl/archives/fieldtrip.html and
> >> http://www.ru.nl/neuroimaging/fieldtrip.
> >>
> >> __________ Information from ESET NOD32 Antivirus, version of virus
> >> signature database 4937 (20100311) __________
> >>
> >> The message was checked by ESET NOD32 Antivirus.
> >>
> >> http://www.eset.com
> >>
> >
> > ----------------------------------
> > The aim of this list is to facilitate the discussion between users of
> the FieldTrip  toolbox, to share experiences and to discuss new ideas for
> MEG and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
> 
> --
> 
> 
> ======================================================================
> 
>    Andreas Wollbrink, Biomedical Engineer
> 
>    Institute for Biomagnetism and Biosignalanalysis
>    Muenster University Hospital
> 
>    Malmedyweg 15        phone:   +49-(0)251-83-52546
>    D-48149 Muenster     fax:     +49-(0)251-83-56874
>    Germany
>                         e-Mail: a.wollbrink at uni-muenster.de
> 
> ======================================================================
> 
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
> 
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4940 (20100312) __________
> 
> The message was checked by ESET NOD32 Antivirus.
> 
> http://www.eset.com
> 

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From jonas at OBLESER.DE  Tue Mar 16 09:29:39 2010
From: jonas at OBLESER.DE (Jonas Obleser)
Date: Tue, 16 Mar 2010 09:29:39 +0100
Subject: depsampregrT: no difference between contrasts?
Message-ID: 


Hello FTs,
here comes a question concerning the wonderful stats function

depsampregrT

I am using it mainly for running time–frequency–electrode cluster tests. I usually use contrasts like cfg.contrastcoefs=[-3 -1 1 3] and it has proven pretty powerful.

With a new data set, I sadly have only three levels of data, which is of course always a bit of a pain for linear contrasts.
What puzzles me is that

[-2 -1 3] (i.e., linear increase; trying to keep it zero-weighted)

and 

[-1 2 -1]  (i.e. trying to crudely model an inverse u-shape relationship)

give the very same result (not exactly numerically,  but very much in terms of clusters, down to very similar p-values, etc).

Q: Any idea why this might be the case?
Of course, linear and cubic trends can be sometimes both significant, but I was slightly worried seeing this strong concordance in this case.

(Also, does any of you have a better/best/gold standard way to model 3-level linear contrasts? mathematically, in [-1 0 1], the middle condition is basically switched off, isn’t it.)

Anyway, thanks very much for a quick reply!
Best wishes, Jonas




http://jonasobleser.com
+49 171 6993337 mobile
+49 341 304 7980  home






----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From e.maris at DONDERS.RU.NL  Wed Mar 17 10:56:47 2010
From: e.maris at DONDERS.RU.NL (Eric Maris)
Date: Wed, 17 Mar 2010 10:56:47 +0100
Subject: depsampregrT: no difference between contrasts?
In-Reply-To: 
Message-ID: 

Dear Jonas,

 

 

here comes a question concerning the wonderful stats function

 

depsampregrT

 

I am using it mainly for running time–frequency–electrode cluster tests. I usually use contrasts like cfg.contrastcoefs=[-3 -1 1 3] and it has proven pretty powerful.

 

With a new data set, I sadly have only three levels of data, which is of course always a bit of a pain for linear contrasts.

What puzzles me is that

 

[-2 -1 3] (i.e., linear increase; trying to keep it zero-weighted)

 

and 

 

[-1 2 -1]  (i.e. trying to crudely model an inverse u-shape relationship)

 

give the very same result (not exactly numerically,  but very much in terms of clusters, down to very similar p-values, etc).

 

Q: Any idea why this might be the case?

Of course, linear and cubic trends can be sometimes both significant, but I was slightly worried seeing this strong concordance in this case.

 

(Also, does any of you have a better/best/gold standard way to model 3-level linear contrasts? mathematically, in [-1 0 1], the middle condition is basically switched off, isn’t it.)

 

I’m not sure, but it may reflect a property in your data. If the first two levels show about the same mean physiological response and only the third level differs, then your observation is what you should expect.

 

 

Best,

 

 

 

 

 

 

Anyway, thanks very much for a quick reply!

Best wishes, Jonas

 

 

 


http://jonasobleser.com

+49 171 6993337 mobile

+49 341 304 7980  home

 

 





 

----------------------------------

The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.

http://listserv.surfnet.nl/archives/fieldtrip.html

http://www.ru.nl/fcdonders/fieldtrip/


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From ElisabethSusanne.May at UNI-DUESSELDORF.DE  Thu Mar 18 09:51:01 2010
From: ElisabethSusanne.May at UNI-DUESSELDORF.DE (Elisabeth May)
Date: Thu, 18 Mar 2010 09:51:01 +0100
Subject: questions on ICA to remove EOG artifacts from MEG data
Message-ID: 

Dear Fieldtrip users,

I am trying to use independent component analysis (ft_componentanalysis)
to remove eye artifacts from my MEG data. The dataset was recorded with
the Neuromag 306 system and contains two conditions with 40 trials each
(one where a painful laser stimulation was applied to the subject's
right hand and one where the same stimulation was applied to the left
hand). So far, I am trying to do the ICA just for the gradiometers on
preprocessed data (after removal of bad channels) and then plotting the
topographies of the components to identify and then reject components
representing the eye artifacts (as suggested in the example script on
the Fieldtrip webpage). I have used different settings with the default
option cfg.method = 'runica' (no PCA before ICA, different numbers of
principal components to be retained (cfg.runica.pca), both conditions
sepparately and together...). However, I have never gotten component
topographies that I can clearly identify as components representing eye
artifacts (showing two sources right above the eyes), although there are
almost 200 eye artifacts in the 80 trials of this data set (i.e. there
was usually more than one EOG artifact in every single trial). So I am
still wondering about a few questions on the exact settings for the ICA
in my case and if I am missing something really obvious:

    * Is it correct to do the ICA on both horizontal and vertical
      gradiometers together and then plot them sepparately to identify
      artifacts?
    * Should I do the PCA before the ICA and if so, how many principal
      components should I retain?
    * Should I do the ICA on both conditions together or sepparately
      (since I expect different sources to be activated in both
      conditions, e.g. one of the two primary somatsensory cortices
      activated according to stimulation of the right or left hand)?
    * Is it accurate enough to use complete trials for the component
      analysis or do I have to extract and use just the parts containing
      EOG artifacts?
    * And finally, are the component topographies usually sufficient to
      identify eye artifacts?

Any help or advise on this would be greatly appreciated! Thanks in advance,
Elisabeth


--
Dipl.-Psych. Elisabeth May

Universitätsklinikum Düsseldorf
Institut für Klinische Neurowissenschaften und Medizinische Psychologie
Universitätsstr. 1
40225 Düsseldorf

Tel: +49 211 81-18075

http://www.uniklinik-duesseldorf.de/med-psychologie

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From h.holle at SUSSEX.AC.UK  Thu Mar 18 18:58:55 2010
From: h.holle at SUSSEX.AC.UK (Henning Holle)
Date: Thu, 18 Mar 2010 17:58:55 +0000
Subject: artifact rejection of continuous data in fieldtrip
Message-ID: 

Dear list members,

I have a more general question about how continuous data is treated in
fieldtrip. After playing around with the package for a bit, I noticed
that although using continuous data is in principle supported, sooner or
later one always runs into a dead-end, because most functions assume
that trials are defined very early on in the processing tree (i.e., they
don't work without a cfg.trl present). For instance, most artifact
rejection functions seem to work only on epoched data.

I have used EEProbe previously, and what I quite liked about that
program was that is was possible to do artifact rejection once for the
continuous data set, and subsequently one was free to define trials
however one wanted to. In contrast, in fieldtrip one is forced to do a
new artifact rejection (which is very time-consuming!), when one chooses
to analyse the ERPs time-locked to a different event. Or am I missing
something here?

Is there a possibility to do an artifact rejction before the data is cut
into epochs?

Best wishes

Henning

--
*************************
Dr. Henning Holle,
Department of Psychology,
University of Sussex,
Falmer, Brighton,
BN1 9QH, U.K.
Tel. : +44 (0)1273 877240
Fax. : +44 (0)1273 678058

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From masaki.maruyama at CEA.FR  Thu Mar 18 19:26:20 2010
From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM)
Date: Thu, 18 Mar 2010 19:26:20 +0100
Subject: questions on ICA to remove EOG artifacts from MEG data
In-Reply-To: A<4BA1E975.3080101@uni-duesseldorf.de>
Message-ID: 

Dear Elisabeth,


I am a person who uses the ICA to Neuromag data. As far as I understand your data, at least one blink component should be found with the typical blink-topography. My first impression is that you might separate latitude and longitude gradiometers incorrectly in plotting topographies. Have you already obtained reasonable topographies with your script? If it is not the case, it will be difficult for me to give you appropriate suggestions.


>    * Is it correct to do the ICA on both horizontal and vertical
>      gradiometers together and then plot them sepparately to identify
>      artifacts?

I don't see any theoretical reason why we must do separately. Indeed, I apply ICA both gradiometers (GMs) and magnetometers (MMs) together. As far as I examined details for few subjects' results, its performance becomes more stable than ICA to GMs alone. 
To apply ICA together, GMs and MMs must be I normalised separately before ICA, since the scale of signals is different between these types of sensors and Neuromag data often need PCA before ICA (Please see my response to the next question). After the ICA, I inversely normalized to recover the original scales. 

>    * Should I do the PCA before the ICA and if so, how many principal
>      components should I retain?

I would say YES to users of 306ch Neuromag system. Without reducing the number of decomposing components, ICA results often contain complex values. Probably it is because the number of components to be decomposed (306) is too large relative to the number of actual components in MEG data. I always use PCA to reduce the components from 306 to around 80. If you applied SST in addition to SSS using Maxfilter (Neuromag preprocessing software), you may need to reduce more. 

>    * Should I do the ICA on both conditions together or sepparately
>      (since I expect different sources to be activated in both
>      conditions, e.g. one of the two primary somatsensory cortices
>      activated according to stimulation of the right or left hand)?

Arguments on this issue will be very similar to those on the optimization of spatial filter in beamformer (common across conditions <--> separately). You will find out advantages/disadvantages on the fieldtrip website. I use common ICA, since it avoids a risk of removing different noise components from different conditions.      

>    * Is it accurate enough to use complete trials for the component
>      analysis or do I have to extract and use just the parts containing
>      EOG artifacts?

I would recommend doing the standard method explained on the fieldtrip website: Decompose MEG data of whole trials and get topography components -> Decompose the segmented data using the topography components. 

>    * And finally, are the component topographies usually sufficient to
>      identify eye artifacts?

I think the usage of topographies alone does not highlight advantages of ICA. ICA decomposes data so that temporal independency between components becomes maximum, whereas PCA decomposes so that topographies of components are orthogonal to each other. Therefore, the timing of EOG noises is much helpful to identify in ICA. 



Sincerely yours,
Masaki Maruyama







>-----Message d'origine-----
>De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part
>de Elisabeth May
>Envoyé : jeudi 18 mars 2010 09:51
>À : FIELDTRIP at NIC.SURFNET.NL
>Objet : [FIELDTRIP] questions on ICA to remove EOG artifacts from MEG data
>
>Dear Fieldtrip users,
>
>I am trying to use independent component analysis (ft_componentanalysis)
>to remove eye artifacts from my MEG data. The dataset was recorded with
>the Neuromag 306 system and contains two conditions with 40 trials each
>(one where a painful laser stimulation was applied to the subject's
>right hand and one where the same stimulation was applied to the left
>hand). So far, I am trying to do the ICA just for the gradiometers on
>preprocessed data (after removal of bad channels) and then plotting the
>topographies of the components to identify and then reject components
>representing the eye artifacts (as suggested in the example script on
>the Fieldtrip webpage). I have used different settings with the default
>option cfg.method = 'runica' (no PCA before ICA, different numbers of
>principal components to be retained (cfg.runica.pca), both conditions
>sepparately and together...). However, I have never gotten component
>topographies that I can clearly identify as components representing eye
>artifacts (showing two sources right above the eyes), although there are
>almost 200 eye artifacts in the 80 trials of this data set (i.e. there
>was usually more than one EOG artifact in every single trial). So I am
>still wondering about a few questions on the exact settings for the ICA
>in my case and if I am missing something really obvious:
>
>    * Is it correct to do the ICA on both horizontal and vertical
>      gradiometers together and then plot them sepparately to identify
>      artifacts?
>    * Should I do the PCA before the ICA and if so, how many principal
>      components should I retain?
>    * Should I do the ICA on both conditions together or sepparately
>      (since I expect different sources to be activated in both
>      conditions, e.g. one of the two primary somatsensory cortices
>      activated according to stimulation of the right or left hand)?
>    * Is it accurate enough to use complete trials for the component
>      analysis or do I have to extract and use just the parts containing
>      EOG artifacts?
>    * And finally, are the component topographies usually sufficient to
>      identify eye artifacts?
>
>Any help or advise on this would be greatly appreciated! Thanks in advance,
>Elisabeth
>
>
>--
>Dipl.-Psych. Elisabeth May
>
>Universitätsklinikum Düsseldorf
>Institut für Klinische Neurowissenschaften und Medizinische Psychologie
>Universitätsstr. 1
>40225 Düsseldorf
>
>Tel: +49 211 81-18075
>
>http://www.uniklinik-duesseldorf.de/med-psychologie
>
>----------------------------------
>The aim of this list is to facilitate the discussion between users of the
>FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>and EEG analysis. See also
>http://listserv.surfnet.nl/archives/fieldtrip.html and
>http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From h.holle at SUSSEX.AC.UK  Thu Mar 18 19:54:42 2010
From: h.holle at SUSSEX.AC.UK (Henning Holle)
Date: Thu, 18 Mar 2010 18:54:42 +0000
Subject: impossible to call definetrials after preprocessing?
Message-ID: 

Dear list members,

I have an EEG data set, for which I prepared the EOG channels for
artifact rejection and referenced the EEG data to linked mastoids (as
described here http://fieldtrip.fcdonders.nl/example/re-referencing).

I thought I'd do this once at the beginning, save the dataset to disk,
and then continue with definetrials. However, definetrials only seems to
be able read raw data, not the matlab data set I created by the
re-rereferencing procedure. Does that mean that I can only prepare EOG
channels and  re-rereferencing after calling definetrials? (which would
duplicate a lot of code...) Or is there also another of doing this that
involves less duplication of code?

Many thanks in advance,

Henning


--
*************************
Dr. Henning Holle,
Department of Psychology,
University of Sussex,
Falmer, Brighton,
BN1 9QH, U.K.
Tel. : +44 (0)1273 877240
Fax. : +44 (0)1273 678058

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From matthew.mollison at COLORADO.EDU  Thu Mar 18 20:13:04 2010
From: matthew.mollison at COLORADO.EDU (Matt Mollison)
Date: Thu, 18 Mar 2010 13:13:04 -0600
Subject: artifact rejection of continuous data in fieldtrip
In-Reply-To: <4BA269DF.4050400@sussex.ac.uk>
Message-ID: 

Dr. Holle,

In initially learning to use FieldTrip I set up a script to do artifact
detection/rejection on continuous data, but I have since switched to
segmented processing because, as you say, it is just easier to deal with
segmented trials.  The way I coded it is as follows, but I cannot be sure
that it is correct because I did not extensively compare continuous to
segmented preprocessing.

This does artifact detection before epoching (which is the time consuming
part, especially on continuous data), and the actual rejection occurs after
defining events.  Playing around with different epochs does not sound as
easy as you describe for EEProbe, but I think the nature of the FT data
structure prevents what you are looking for from happening (i.e., the actual
data is stored in the struct and is not just referencing a continuous file).
 If anyone has suggestions or corrections, I would like to hear them as
well.

1. Read in the continuous data.
2. Read in electrode locations.
3. Set up EOG vertical and horizontal channels and append them to the data.
4. Lowpass and line noise (DFT) filter.
5. Use eventtype = '?' and trialfun = 'trialfun_general' in ft_definetrial,
and then define 1 big trial by manually set the resulting cfg's trl field to
be [1 length(data.time{1}) 0]; then run ft_preprocessing with the cfg that
has the modified trl field.
6. Detect artifacts across the continuous data using whichever functions are
appropriate. Note: Use a unique name for the resulting cfg as it is used
later; do not reject artifacts yet.

I start a for loop here for each event type; this contains steps 7–10.

7. Use ft_definetrial with your own trialfun to get a cfg and then
ft_redefinetrial to get the data in trial format.
8. Use ft_rejectartifact with the cfg from step 6, and then ft_preprocessing
to get the trials without artifacts.
9. Finish with any remaining preprocessing (rereference, baseline
correction, etc.).
10. Store this event type in a struct, indexed by the number of event types
for this subject.

I hope that helps. Again, any improvements on this would be interesting to
hear. Maybe a FT wiki page could be made describing this process.

Matt

--
Univ. of Colorado at Boulder
Dept. of Psychology and Neuroscience
matthew.mollison at colorado.edu
http://psych.colorado.edu/~mollison/


On Thu, Mar 18, 2010 at 11:58 AM, Henning Holle wrote:

> Dear list members,
>
> I have a more general question about how continuous data is treated in
> fieldtrip. After playing around with the package for a bit, I noticed that
> although using continuous data is in principle supported, sooner or later
> one always runs into a dead-end, because most functions assume that trials
> are defined very early on in the processing tree (i.e., they don't work
> without a cfg.trl present). For instance, most artifact rejection functions
> seem to work only on epoched data.
>
> I have used EEProbe previously, and what I quite liked about that program
> was that is was possible to do artifact rejection once for the continuous
> data set, and subsequently one was free to define trials however one wanted
> to. In contrast, in fieldtrip one is forced to do a new artifact rejection
> (which is very time-consuming!), when one chooses to analyse the ERPs
> time-locked to a different event. Or am I missing something here?
>
> Is there a possibility to do an artifact rejction before the data is cut
> into epochs?
>
> Best wishes
>
> Henning
>
> --
> *************************
> Dr. Henning Holle,
> Department of Psychology,
> University of Sussex,
> Falmer, Brighton,
> BN1 9QH, U.K.
> Tel. : +44 (0)1273 877240
> Fax. : +44 (0)1273 678058
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From nathanweisz at MAC.COM  Thu Mar 18 21:32:46 2010
From: nathanweisz at MAC.COM (Nathan Weisz)
Date: Thu, 18 Mar 2010 21:32:46 +0100
Subject: artifact rejection of continuous data in fieldtrip
In-Reply-To: <4BA269DF.4050400@sussex.ac.uk>
Message-ID: 

dear henning,

is this what you want?
http://sccn.ucsd.edu/wiki/Chapter_01:_Rejecting_Artifacts#Rejecting_artifacts_in_continuous_data

you could then do some preprocessing in eeglab, epoch the data and the get your data into fieldtrip via eeglab2fieldtrip.m.

good luck,
nathan

On 18.03.2010, at 18:58, Henning Holle wrote:

> Dear list members,
>
> I have a more general question about how continuous data is treated in fieldtrip. After playing around with the package for a bit, I noticed that although using continuous data is in principle supported, sooner or later one always runs into a dead-end, because most functions assume that trials are defined very early on in the processing tree (i.e., they don't work without a cfg.trl present). For instance, most artifact rejection functions seem to work only on epoched data.
>
> I have used EEProbe previously, and what I quite liked about that program was that is was possible to do artifact rejection once for the continuous data set, and subsequently one was free to define trials however one wanted to. In contrast, in fieldtrip one is forced to do a new artifact rejection (which is very time-consuming!), when one chooses to analyse the ERPs time-locked to a different event. Or am I missing something here?
>
> Is there a possibility to do an artifact rejction before the data is cut into epochs?
>
> Best wishes
>
> Henning
>
> --
> *************************
> Dr. Henning Holle,
> Department of Psychology,
> University of Sussex,
> Falmer, Brighton,
> BN1 9QH, U.K.
> Tel. : +44 (0)1273 877240
> Fax. : +44 (0)1273 678058
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.

--------------------------------------------
Dr. Nathan Weisz

OBOB-Lab
University of Konstanz
Department of Psychology
P.O. Box D23
78457 Konstanz
Germany

Tel: ++49 - (0)7531 - 88 45 84
Email: nathan.weisz at uni-konstanz.de
Homepage: http://www.uni-konstanz.de/obob

"Nothing shocks me. I'm a scientist." (Indiana Jones)


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From lhunt at FMRIB.OX.AC.UK  Thu Mar 18 21:51:29 2010
From: lhunt at FMRIB.OX.AC.UK (Laurence Hunt)
Date: Thu, 18 Mar 2010 20:51:29 +0000
Subject: questions on ICA to remove EOG artifacts from MEG data
In-Reply-To: <4BA1E975.3080101@uni-duesseldorf.de>
Message-ID: 

Dear Elisabeth,

I'm not very experienced with using ICA nor with using fieldtrip, but I do have some experience of obtaining reliable eyeblink spatial topographies from Neuromag 306 data (using SPM), so I thought I'd chip in with some advice...

On 18 Mar 2010, at 08:51, Elisabeth May wrote:

> Dear Fieldtrip users,
> 
> I am trying to use independent component analysis (ft_componentanalysis) to remove eye artifacts from my MEG data. The dataset was recorded with the Neuromag 306 system and contains two conditions with 40 trials each (one where a painful laser stimulation was applied to the subject's right hand and one where the same stimulation was applied to the left hand). So far, I am trying to do the ICA just for the gradiometers on preprocessed data (after removal of bad channels) and then plotting the topographies of the components to identify and then reject components representing the eye artifacts (as suggested in the example script on the Fieldtrip webpage). I have used different settings with the default option cfg.method = 'runica' (no PCA before ICA, different numbers of principal components to be retained (cfg.runica.pca), both conditions sepparately and together...). However, I have never gotten component topographies that I can clearly identify as components representing eye artifacts (showing two sources right above the eyes), although there are almost 200 eye artifacts in the 80 trials of this data set (i.e. there was usually more than one EOG artifact in every single trial). So I am still wondering about a few questions on the exact settings for the ICA in my case and if I am missing something really obvious:
> 
>   * Is it correct to do the ICA on both horizontal and vertical
>     gradiometers together and then plot them sepparately to identify
>     artifacts?

Yes, this sounds sensible - there should be covariance across horizontal and vertical gradiometers during an eyeblink, which should help you in isolating a component, but of course they will have a very different spatial topography, which means you would want to plot them separately. I have attached a snapshot of an eyeblink component that I identified, in vertical and horizontal gradiometers (top left and top right), magnetometers (bottom left), and 60 EEG sensors (bottom right). Note that I didn't obtain this component with ICA, but with PCA of an 'average eyeblink' (see below).

>   * Should I do the PCA before the ICA and if so, how many principal
>     components should I retain?
>   * Should I do the ICA on both conditions together or sepparately
>     (since I expect different sources to be activated in both
>     conditions, e.g. one of the two primary somatsensory cortices
>     activated according to stimulation of the right or left hand)?
>   * Is it accurate enough to use complete trials for the component
>     analysis or do I have to extract and use just the parts containing
>     EOG artifacts?

In my (limited) experience, I have had good success identifying eyeblink components with a slightly simpler method than ICA. I epoch the data with respect to well-identified eyeblinks (detected using EOG), then create an 'average eyeblink' using these epochs, so that I know what the timecourse of an eyeblink should look on average look like. I then just run a simple PCA on this 'average eyeblink', and normally the eyeblink is well captured by the first (and sometimes second) spatial component of this PCA. I then use this PCA map just as you might use an ICA map, i.e. regress it out of the raw (original) data. As a sanity check, you can correlate the timecourse of this component against the EOG channel, and this should correlate quite nicely. You can also try recomputing the average eyeblink after you have regressed the component out of the data, in order to see that it has been effective in removing most of the artefact.

I find this a bit simpler than ICA, and maybe comes with a few advantages. First, it doesn't use all the data to derive the components, only the data epoched around EOG-detected eyeblinks, so it is quite a bit faster on big datasets. Second, by creating an average eyeblink, it removes any variability in the data driven by other boring stuff (like the brain :) ), so it should pretty much always be the component which explains the most variance in the 'average' eyeblink (i.e. the first principal component). Finally, it is important to note that although the method requires you to detect some eyeblinks using the EOG channel, it is still robust against you failing to detect all eyeblinks, as the regression is done on the raw data, rather than just on the epochs where you have already detected the blinks.

However, there are some caveats; the first being that you assume that all eyeblinks look similar (in my experience they do), and perhaps more importantly that the component doesn't change (spatially) during the course of the experiment - with Neuromag data, you might be able to get around this to some extent by using Maxfilter for movement compensation. I think these caveats both also apply to ICA, but I'd be interested to hear other people's thoughts (particularly those who have more experience with ICA). Finally, I guess if you are interested in isolating interesting (brain) signals as well as boring (noise) signals simultaneously, then ICA is the way to go. I use this method just to remove eyeblinks before I do subsequent processing.

>   * And finally, are the component topographies usually sufficient to
>     identify eye artifacts?
> 

I find with this method they are very easy to identify, and I imagine they would be reasonably straightforward in ICA also? Again, perhaps someone with more ICA experience can comment...

> Any help or advise on this would be greatly appreciated! Thanks in advance,
> Elisabeth
> 
> 

Hope this helps,
Laurence



===========================================
Laurence Hunt, DPhil Student
 Centre for Functional MRI of the Brain (FMRIB), 
University of Oxford
lhunt at fmrib.ox.ac.uk
Phone: (+44)1865-(2)22738
===========================================
----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: blinkcomp.jpeg
Type: image/jpg
Size: 133395 bytes
Desc: not available
URL: 

From brian.roach at YALE.EDU  Thu Mar 18 22:38:24 2010
From: brian.roach at YALE.EDU (Brian Roach)
Date: Thu, 18 Mar 2010 14:38:24 -0700
Subject: research jobs in San Francisco, CA
Message-ID: 

Dear fieldtrip users,

We are hiring for multiple positions in our San Francisco-based
schizophrenia brain-imaging EEG research lab.  Please visit the links
below for additional details:

http://jobs-ncire.icims.com/jobs/1504/job
http://jobs-ncire.icims.com/jobs/1505/job

Thank you,
Brian

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From p.toffanin at RUG.NL  Fri Mar 19 08:28:11 2010
From: p.toffanin at RUG.NL (Paolo Toffanin)
Date: Fri, 19 Mar 2010 08:28:11 +0100
Subject: impossible to call definetrials after preprocessing?
In-Reply-To: <4BA276F2.3060109@sussex.ac.uk>
Message-ID: 

Call 'define' trial first and then use 'redefinetrial'

HTH
Paolo
On Thursday 18 March 2010 07:54:42 pm you wrote:
> Dear list members,
>
> I have an EEG data set, for which I prepared the EOG channels for
> artifact rejection and referenced the EEG data to linked mastoids (as
> described here http://fieldtrip.fcdonders.nl/example/re-referencing).
>
> I thought I'd do this once at the beginning, save the dataset to disk,
> and then continue with definetrials. However, definetrials only seems to
> be able read raw data, not the matlab data set I created by the
> re-rereferencing procedure. Does that mean that I can only prepare EOG
> channels and  re-rereferencing after calling definetrials? (which would
> duplicate a lot of code...) Or is there also another of doing this that
> involves less duplication of code?
>
> Many thanks in advance,
>
> Henning

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From ElisabethSusanne.May at UNI-DUESSELDORF.DE  Fri Mar 19 10:01:16 2010
From: ElisabethSusanne.May at UNI-DUESSELDORF.DE (Elisabeth May)
Date: Fri, 19 Mar 2010 10:01:16 +0100
Subject: questions on ICA to remove EOG artifacts from MEG data
In-Reply-To: 
Message-ID: 

Dear Masaki, dear Laurence,

thank you a lot for your really quick and extensive replies to my long
list of questions!

Masaki, you are right with your first point: so far I am not completely
sure that my plotting scripts correctly sepparates the two gradiometer
types. I do get the same results with my plotting function and
ft_topoplotIC. However, I use my own layout files for horizontal and
vertical gradiometers in both functions so there might be something
wrong with the layout files. I'll check those again to be sure. I'll
also try to scale gradiometers and magnetometers and do ICA on all
sensors together.

Laurence, thank you for the plots, they will give me a better idea of
what to look for! I only want to use ICA to remove artifacts from my
data so I guess I might try the approach you suggested, too.

I'll let you know as soon as I make any progress with my data!

Thanks again and best wishes,
Elisabeth

> Dear Elisabeth,
>
> I'm not very experienced with using ICA nor with using fieldtrip, but
> I do have some experience of obtaining reliable eyeblink spatial
> topographies from Neuromag 306 data (using SPM), so I thought I'd chip
> in with some advice...
>
> On 18 Mar 2010, at 08:51, Elisabeth May wrote:
>
>> Dear Fieldtrip users,
>>
>> I am trying to use independent component analysis
>> (ft_componentanalysis) to remove eye artifacts from my MEG data. The
>> dataset was recorded with the Neuromag 306 system and contains two
>> conditions with 40 trials each (one where a painful laser stimulation
>> was applied to the subject's right hand and one where the same
>> stimulation was applied to the left hand). So far, I am trying to do
>> the ICA just for the gradiometers on preprocessed data (after removal
>> of bad channels) and then plotting the topographies of the components
>> to identify and then reject components representing the eye artifacts
>> (as suggested in the example script on the Fieldtrip webpage). I have
>> used different settings with the default option cfg.method = 'runica'
>> (no PCA before ICA, different numbers of principal components to be
>> retained (cfg.runica.pca), both conditions sepparately and
>> together...). However, I have never gotten component topographies
>> that I can clearly identify as components representing eye artifacts
>> (showing two sources right above the eyes), although there are almost
>> 200 eye artifacts in the 80 trials of this data set (i.e. there was
>> usually more than one EOG artifact in every single trial). So I am
>> still wondering about a few questions on the exact settings for the
>> ICA in my case and if I am missing something really obvious:
>>
>>   * Is it correct to do the ICA on both horizontal and vertical
>>     gradiometers together and then plot them sepparately to identify
>>     artifacts?
>
> Yes, this sounds sensible - there should be covariance across
> horizontal and vertical gradiometers during an eyeblink, which should
> help you in isolating a component, but of course they will have a very
> different spatial topography, which means you would want to plot them
> separately. I have attached a snapshot of an eyeblink component that I
> identified, in vertical and horizontal gradiometers (top left and top
> right), magnetometers (bottom left), and 60 EEG sensors (bottom
> right). Note that I didn't obtain this component with ICA, but with
> PCA of an 'average eyeblink' (see below).
>
>>   * Should I do the PCA before the ICA and if so, how many principal
>>     components should I retain?
>>   * Should I do the ICA on both conditions together or sepparately
>>     (since I expect different sources to be activated in both
>>     conditions, e.g. one of the two primary somatsensory cortices
>>     activated according to stimulation of the right or left hand)?
>>   * Is it accurate enough to use complete trials for the component
>>     analysis or do I have to extract and use just the parts containing
>>     EOG artifacts?
>
> In my (limited) experience, I have had good success identifying
> eyeblink components with a slightly simpler method than ICA. I epoch
> the data with respect to well-identified eyeblinks (detected using
> EOG), then create an 'average eyeblink' using these epochs, so that I
> know what the timecourse of an eyeblink should look on average look
> like. I then just run a simple PCA on this 'average eyeblink', and
> normally the eyeblink is well captured by the first (and sometimes
> second) spatial component of this PCA. I then use this PCA map just as
> you might use an ICA map, i.e. regress it out of the raw (original)
> data. As a sanity check, you can correlate the timecourse of this
> component against the EOG channel, and this should correlate quite
> nicely. You can also try recomputing the average eyeblink after you
> have regressed the component out of the data, in order to see that it
> has been effective in removing most of the artefact.
>
> I find this a bit simpler than ICA, and maybe comes with a few
> advantages. First, it doesn't use all the data to derive the
> components, only the data epoched around EOG-detected eyeblinks, so it
> is quite a bit faster on big datasets. Second, by creating an average
> eyeblink, it removes any variability in the data driven by other
> boring stuff (like the brain :) ), so it should pretty much always be
> the component which explains the most variance in the 'average'
> eyeblink (i.e. the first principal component). Finally, it is
> important to note that although the method requires you to detect
> /some/ eyeblinks using the EOG channel, it is still robust against you
> failing to detect /all/ eyeblinks, as the regression is done on the
> raw data, rather than just on the epochs where you have already
> detected the blinks.
>
> However, there are some caveats; the first being that you assume that
> all eyeblinks look similar (in my experience they do), and perhaps
> more importantly that the component doesn't change (spatially) during
> the course of the experiment - with Neuromag data, you might be able
> to get around this to some extent by using Maxfilter for movement
> compensation. I think these caveats both also apply to ICA, but I'd be
> interested to hear other people's thoughts (particularly those who
> have more experience with ICA). Finally, I guess if you are interested
> in isolating interesting (brain) signals as well as boring (noise)
> signals simultaneously, then ICA is the way to go. I use this method
> just to remove eyeblinks before I do subsequent processing.
>
>>   * And finally, are the component topographies usually sufficient to
>>     identify eye artifacts?
>>
>
> I find with this method they are very easy to identify, and I imagine
> they would be reasonably straightforward in ICA also? Again, perhaps
> someone with more ICA experience can comment...
>
>> Any help or advise on this would be greatly appreciated! Thanks in
>> advance,
>> Elisabeth
>>
>>
>
> Hope this helps,
> Laurence
>
>
> ===========================================
> Laurence Hunt, DPhil Student
>  Centre for Functional MRI of the Brain (FMRIB),
> University of Oxford
> lhunt at fmrib.ox.ac.uk 
> Phone: (+44)1865-(2)22738
> ===========================================
>
> ----------------------------------
>
> The aim of this list is to facilitate the discussion between users of
> the FieldTrip toolbox, to share experiences and to discuss new ideas
> for MEG and EEG analysis.
>
> http://listserv.surfnet.nl/archives/fieldtrip.html
>
> http://www.ru.nl/fcdonders/fieldtrip/
>


--
Dipl.-Psych. Elisabeth May

Universitätsklinikum Düsseldorf
Institut für Klinische Neurowissenschaften und Medizinische Psychologie
Universitätsstr. 1
40225 Düsseldorf

Tel: +49 211 81-18075

http://www.uniklinik-duesseldorf.de/med-psychologie

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From r.oostenveld at FCDONDERS.RU.NL  Fri Mar 19 11:21:02 2010
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Fri, 19 Mar 2010 11:21:02 +0100
Subject: Questions on High pass filter and Padding in Preprocessing
In-Reply-To: 
Message-ID: 

Dear Feng,

On 12 Mar 2010, at 11:07, gao zai wrote:
> I am now working on the MEG data in 4D format. Since it was
> collected in DC, so I want to first use a bandpass filter [0.1 80]
> to filter my data. However, I found that the latter part of averaged
> results drifted away relative to the  results when no filter or only
> a low-pass filter is used (see the attached Fig.1). I thought it may
> be related to the end effect, so I used cfg.padding=1, it didn't work.

the padding option in ft_preprocessing pads the data _to_ the
specified length, not _with_ the indicated length. In your case
according to the figure the trial was ~2.5 seconds long, i.e. already
longer than 1 second, so cfg.padding=1 did not have an efefct (whereas
cfg.padding=10 does).

> Latter I turned to use cfg.padding=10 (1/.1=10) it works and no
> obvious drift was found.
>
> However, when tried to only apply a high pass filter to the raw
> data, regardless of using cfg.padding=10, the results always showed
> a square wave (see Fig.2). And there is a warning:"Matrix is close
> to singular or badly scaled. Results may be inaccurate. RCOND =
> 6.669292e-17."I don't understand why this happened. Does anybody
> know what is the problem with it? How can I get a right result in
> this case? Thank you very much.

You specified cfg.hpfreq=0.1, i.e. that frequencies below 0.1 Hz
should be removed. These frequencies correspond to dripfts in the data
of about 10 seconds. The data segment you are working with is only 2.5
seconds, so removing the 10 second drift fails. You can increase the
cfg.hpfreq to around 1/2.5 = 0.4 Hz, which would be the lowest
frequency that can be estimated from the 2.5 second data segment.

Alternatively, you could use the following pipeline

cfg=[];
cfg.dataset ='c,rfDC';
cfg.continuous = 'yes';
cfg.hpfilter = 'yes';
cfg.hpfreq = 0.1;
datacnt = ft_preprocessing(cfg);

to read it into memory as one continuous segment, and apply the filter
on the complete data.

Then you can do

cfg=[];
cfg.dataset ='c,rfDC';
cfg.trialdef.eventtype  = 'TRIGGER';
cfg.trialdef.eventvalue =42;
cfg.trialdef.prestim    = 1;
cfg.trialdef.poststim   = 1.5;
cfg.trialdef.offset     = 1;
cfg.trialfun            = 'mytrialfun';
cfg = definetrial(cfg);

followed by

datatrl = ft_redefinetrial(cfg, datacnt);

Reading all data (also the inter-trial interval, the breaks, and the
instruction periods) into memory requires a lot of RAM. If it does not
fit all at once, you could do the above section for small groups of
channels

cfg.channel = 1:10;
% cfg.channel = 11:20;
% cfg.channel = 21:30;
% ...

and then call ft_appenddata([], datatrl_changroup1,
datatrl_changroup2, ...)

best,
Robert











----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From r.oostenveld at FCDONDERS.RU.NL  Fri Mar 19 11:26:40 2010
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Fri, 19 Mar 2010 11:26:40 +0100
Subject: questions on ICA to remove EOG artifacts from MEG data
In-Reply-To: <4BA33D5C.1030503@uni-duesseldorf.de>
Message-ID: 

Dear Elisabeth,

please note that Saskia has just created a draft page on the wiki for  
using ICA to remove EOG artifacts from MEG data. Have a look here
http://fieldtrip.fcdonders.nl/example/use_independent_component_analysis_ica_to_remove_eog_artifacts 
. The example there is using 151 channel CTF data avaoalble from the  
ftp server.

Feel free to improve the documentation on that page. Since the  
plotting of the topographies is tricky for the mixed planar/ 
magnetometer data that you are working on, I can imagine that  
especially using the topographies for identifying the components  
requires a neuromag specific approach.

best,
Robert


On 19 Mar 2010, at 10:01, Elisabeth May wrote:

> Dear Masaki, dear Laurence,
>
> thank you a lot for your really quick and extensive replies to my  
> long list of questions!
>
> Masaki, you are right with your first point: so far I am not  
> completely sure that my plotting scripts correctly sepparates the  
> two gradiometer types. I do get the same results with my plotting  
> function and ft_topoplotIC. However, I use my own layout files for  
> horizontal and vertical gradiometers in both functions so there  
> might be something wrong with the layout files. I'll check those  
> again to be sure. I'll also try to scale gradiometers and  
> magnetometers and do ICA on all sensors together.
>
> Laurence, thank you for the plots, they will give me a better idea  
> of what to look for! I only want to use ICA to remove artifacts from  
> my data so I guess I might try the approach you suggested, too.
>
> I'll let you know as soon as I make any progress with my data!
>
> Thanks again and best wishes,
> Elisabeth
>
>> Dear Elisabeth,
>>
>> I'm not very experienced with using ICA nor with using fieldtrip,  
>> but I do have some experience of obtaining reliable eyeblink  
>> spatial topographies from Neuromag 306 data (using SPM), so I  
>> thought I'd chip in with some advice...
>>
>> On 18 Mar 2010, at 08:51, Elisabeth May wrote:
>>
>>> Dear Fieldtrip users,
>>>
>>> I am trying to use independent component analysis  
>>> (ft_componentanalysis) to remove eye artifacts from my MEG data.  
>>> The dataset was recorded with the Neuromag 306 system and contains  
>>> two conditions with 40 trials each (one where a painful laser  
>>> stimulation was applied to the subject's right hand and one where  
>>> the same stimulation was applied to the left hand). So far, I am  
>>> trying to do the ICA just for the gradiometers on preprocessed  
>>> data (after removal of bad channels) and then plotting the  
>>> topographies of the components to identify and then reject  
>>> components representing the eye artifacts (as suggested in the  
>>> example script on the Fieldtrip webpage). I have used different  
>>> settings with the default option cfg.method = 'runica' (no PCA  
>>> before ICA, different numbers of principal components to be  
>>> retained (cfg.runica.pca), both conditions sepparately and  
>>> together...). However, I have never gotten component topographies  
>>> that I can clearly identify as components representing eye  
>>> artifacts (showing two sources right above the eyes), although  
>>> there are almost 200 eye artifacts in the 80 trials of this data  
>>> set (i.e. there was usually more than one EOG artifact in every  
>>> single trial). So I am still wondering about a few questions on  
>>> the exact settings for the ICA in my case and if I am missing  
>>> something really obvious:
>>>
>>>  * Is it correct to do the ICA on both horizontal and vertical
>>>    gradiometers together and then plot them sepparately to identify
>>>    artifacts?
>>
>> Yes, this sounds sensible - there should be covariance across  
>> horizontal and vertical gradiometers during an eyeblink, which  
>> should help you in isolating a component, but of course they will  
>> have a very different spatial topography, which means you would  
>> want to plot them separately. I have attached a snapshot of an  
>> eyeblink component that I identified, in vertical and horizontal  
>> gradiometers (top left and top right), magnetometers (bottom left),  
>> and 60 EEG sensors (bottom right). Note that I didn't obtain this  
>> component with ICA, but with PCA of an 'average eyeblink' (see  
>> below).
>>
>>>  * Should I do the PCA before the ICA and if so, how many principal
>>>    components should I retain?
>>>  * Should I do the ICA on both conditions together or sepparately
>>>    (since I expect different sources to be activated in both
>>>    conditions, e.g. one of the two primary somatsensory cortices
>>>    activated according to stimulation of the right or left hand)?
>>>  * Is it accurate enough to use complete trials for the component
>>>    analysis or do I have to extract and use just the parts  
>>> containing
>>>    EOG artifacts?
>>
>> In my (limited) experience, I have had good success identifying  
>> eyeblink components with a slightly simpler method than ICA. I  
>> epoch the data with respect to well-identified eyeblinks (detected  
>> using EOG), then create an 'average eyeblink' using these epochs,  
>> so that I know what the timecourse of an eyeblink should look on  
>> average look like. I then just run a simple PCA on this 'average  
>> eyeblink', and normally the eyeblink is well captured by the first  
>> (and sometimes second) spatial component of this PCA. I then use  
>> this PCA map just as you might use an ICA map, i.e. regress it out  
>> of the raw (original) data. As a sanity check, you can correlate  
>> the timecourse of this component against the EOG channel, and this  
>> should correlate quite nicely. You can also try recomputing the  
>> average eyeblink after you have regressed the component out of the  
>> data, in order to see that it has been effective in removing most  
>> of the artefact.
>>
>> I find this a bit simpler than ICA, and maybe comes with a few  
>> advantages. First, it doesn't use all the data to derive the  
>> components, only the data epoched around EOG-detected eyeblinks, so  
>> it is quite a bit faster on big datasets. Second, by creating an  
>> average eyeblink, it removes any variability in the data driven by  
>> other boring stuff (like the brain :) ), so it should pretty much  
>> always be the component which explains the most variance in the  
>> 'average' eyeblink (i.e. the first principal component). Finally,  
>> it is important to note that although the method requires you to  
>> detect /some/ eyeblinks using the EOG channel, it is still robust  
>> against you failing to detect /all/ eyeblinks, as the regression is  
>> done on the raw data, rather than just on the epochs where you have  
>> already detected the blinks.
>>
>> However, there are some caveats; the first being that you assume  
>> that all eyeblinks look similar (in my experience they do), and  
>> perhaps more importantly that the component doesn't change  
>> (spatially) during the course of the experiment - with Neuromag  
>> data, you might be able to get around this to some extent by using  
>> Maxfilter for movement compensation. I think these caveats both  
>> also apply to ICA, but I'd be interested to hear other people's  
>> thoughts (particularly those who have more experience with ICA).  
>> Finally, I guess if you are interested in isolating interesting  
>> (brain) signals as well as boring (noise) signals simultaneously,  
>> then ICA is the way to go. I use this method just to remove  
>> eyeblinks before I do subsequent processing.
>>
>>>  * And finally, are the component topographies usually sufficient to
>>>    identify eye artifacts?
>>>
>>
>> I find with this method they are very easy to identify, and I  
>> imagine they would be reasonably straightforward in ICA also?  
>> Again, perhaps someone with more ICA experience can comment...
>>
>>> Any help or advise on this would be greatly appreciated! Thanks in  
>>> advance,
>>> Elisabeth
>>>
>>>
>>
>> Hope this helps,
>> Laurence
>>
>>
>> ===========================================
>> Laurence Hunt, DPhil Student
>> Centre for Functional MRI of the Brain (FMRIB), University of Oxford
>> lhunt at fmrib.ox.ac.uk 
>> Phone: (+44)1865-(2)22738
>> ===========================================
>>
>> ----------------------------------
>>
>> The aim of this list is to facilitate the discussion between users  
>> of the FieldTrip toolbox, to share experiences and to discuss new  
>> ideas for MEG and EEG analysis.
>>
>> http://listserv.surfnet.nl/archives/fieldtrip.html
>>
>> http://www.ru.nl/fcdonders/fieldtrip/
>>
>
>
> -- 
> Dipl.-Psych. Elisabeth May
>
> Universitätsklinikum Düsseldorf
> Institut für Klinische Neurowissenschaften und Medizinische  
> Psychologie
> Universitätsstr. 1
> 40225 Düsseldorf
>
> Tel: +49 211 81-18075
>
> http://www.uniklinik-duesseldorf.de/med-psychologie
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users  
> of the FieldTrip  toolbox, to share experiences and to discuss new  
> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html 
>  and http://www.ru.nl/neuroimaging/fieldtrip.
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From zaifengg at GMAIL.COM  Fri Mar 19 11:57:26 2010
From: zaifengg at GMAIL.COM (gao zai)
Date: Fri, 19 Mar 2010 12:57:26 +0200
Subject: Questions on High pass filter and Padding in Preprocessing
In-Reply-To: 
Message-ID: 

Dear Robert,

Thanks very much for your great answer. As you mentioned, I tried to read
the continuous data into memory, it was slow. I will try to read them in
group of channels.

BTW, what do you mean by "the padding option in ft_preprocessing pads the
data _to_ the specified length, not _with_ the indicated length. " I checked
the script about ft-preprocessing, it seems to me that if the padding length
is shorter than the specified length (in my case, 2.5s),  as you point it
out, it will not work. If the padding is longer than that, then fieldtrip
will read a longer epoch than the specified length, so if I use a
cfg.padding=10, it will input a 10s epoch (and the middle part of 2.5s is
the trial I am focused) into memory, am I right? If I am right, can I just
use the padding here (e.g., cfg.padding=10) instead of filtering the
continuous data, since it is equal to filtering a longer trial and then drop
the padding part after completion?

Millions of thanks.

Best,
Feng



On Fri, Mar 19, 2010 at 12:21 PM, Robert Oostenveld <
r.oostenveld at fcdonders.ru.nl> wrote:

> Dear Feng,
>
>
> On 12 Mar 2010, at 11:07, gao zai wrote:
>
>> I am now working on the MEG data in 4D format. Since it was collected in
>> DC, so I want to first use a bandpass filter [0.1 80] to filter my data.
>> However, I found that the latter part of averaged results drifted away
>> relative to the  results when no filter or only a low-pass filter is used
>> (see the attached Fig.1). I thought it may be related to the end effect, so
>> I used cfg.padding=1, it didn't work.
>>
>
> the padding option in ft_preprocessing pads the data _to_ the specified
> length, not _with_ the indicated length. In your case according to the
> figure the trial was ~2.5 seconds long, i.e. already longer than 1 second,
> so cfg.padding=1 did not have an efefct (whereas cfg.padding=10 does).
>
>
>  Latter I turned to use cfg.padding=10 (1/.1=10) it works and no obvious
>> drift was found.
>>
>> However, when tried to only apply a high pass filter to the raw data,
>> regardless of using cfg.padding=10, the results always showed a square wave
>> (see Fig.2). And there is a warning:"Matrix is close to singular or badly
>> scaled. Results may be inaccurate. RCOND = 6.669292e-17."I don't understand
>> why this happened. Does anybody know what is the problem with it? How can I
>> get a right result in this case? Thank you very much.
>>
>
> You specified cfg.hpfreq=0.1, i.e. that frequencies below 0.1 Hz should be
> removed. These frequencies correspond to dripfts in the data of about 10
> seconds. The data segment you are working with is only 2.5 seconds, so
> removing the 10 second drift fails. You can increase the cfg.hpfreq to
> around 1/2.5 = 0.4 Hz, which would be the lowest frequency that can be
> estimated from the 2.5 second data segment.
>
> Alternatively, you could use the following pipeline
>
>
> cfg=[];
> cfg.dataset ='c,rfDC';
> cfg.continuous = 'yes';
> cfg.hpfilter = 'yes';
> cfg.hpfreq = 0.1;
> datacnt = ft_preprocessing(cfg);
>
> to read it into memory as one continuous segment, and apply the filter on
> the complete data.
>
> Then you can do
>
>
> cfg=[];
> cfg.dataset ='c,rfDC';
> cfg.trialdef.eventtype  = 'TRIGGER';
> cfg.trialdef.eventvalue =42;
> cfg.trialdef.prestim    = 1;
> cfg.trialdef.poststim   = 1.5;
> cfg.trialdef.offset     = 1;
> cfg.trialfun            = 'mytrialfun';
> cfg = definetrial(cfg);
>
> followed by
>
> datatrl = ft_redefinetrial(cfg, datacnt);
>
> Reading all data (also the inter-trial interval, the breaks, and the
> instruction periods) into memory requires a lot of RAM. If it does not fit
> all at once, you could do the above section for small groups of channels
>
> cfg.channel = 1:10;
> % cfg.channel = 11:20;
> % cfg.channel = 21:30;
> % ...
>
> and then call ft_appenddata([], datatrl_changroup1, datatrl_changroup2,
> ...)
>
> best,
> Robert
>
>
>
>
>
>
>
>
>
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From Tim.Curran at COLORADO.EDU  Sat Mar 20 01:17:01 2010
From: Tim.Curran at COLORADO.EDU (Tim Curran)
Date: Fri, 19 Mar 2010 18:17:01 -0600
Subject: JOB OPENING
Message-ID: 

JOB OPENING:  
COGNITIVE/SYSTEMS NEUROSCIENTIST

Science Applications International Corporation (SAIC)

SAIC's Technology and Advanced Systems Business Unit has an opening for a Cognitive/Systems Neuroscientist to join a multidisciplinary team conducting research and building systems based on the translation of neuroscience and neuro-imaging (specifically, EEG) research. The individual will support one or more projects, providing expertise in developing protocols, conducting studies, analyzing data, and writing papers and proposals. Applications of interest include brain-computer interfaces and perception, memory, and attention as they relate to man-machine interactions.

Required Skills:

The candidate must have 6+ years of hands-on relevant research and demonstrated mathematical and computational expertise. Strong written and oral communication skills are a must.

Desired Skills:

Experience with EEG collection and processing is highly desired. Current knowledge of research literature with a history of publication in the field is also desired.

Education Requirements:

Ph.D Degree in Psychology, Neuroscience, or related field is required.

Location:   

Louisville/Boulder, Colorado

Contact:

Laurie Gibson, gibsonld at saic.com


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From h.holle at SUSSEX.AC.UK  Mon Mar 22 12:52:21 2010
From: h.holle at SUSSEX.AC.UK (Henning Holle)
Date: Mon, 22 Mar 2010 12:52:21 +0100
Subject: artifact rejection of continuous data in fieldtrip
Message-ID: 

Hi Matt,

thanks a lot sharing this information, much appreciated. I'll try retracing
your processing steps now.

I like your suggestion of turning this into a FT tutorial, once I am more
familiar with FT I might try to have a go at that.

Cheers,

Henning

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From Tim.Curran at COLORADO.EDU  Mon Mar 22 19:42:02 2010
From: Tim.Curran at COLORADO.EDU (Tim Curran)
Date: Mon, 22 Mar 2010 12:42:02 -0600
Subject: Fwd: [FIELDTRIP] JOB OPENING CLARIFICATION
Message-ID: 

Dear All,
I previously posted the following job ad, which I was forwarding for a colleague.  Please note, because this position requires the ability to obtain a US government
security clearance, it is open to US citizens only.    I was not aware of this originally, so sorry for posting it to lists with many non-US members.  Also, I have no official ties with this position, so please do not send application materials to me.  I was just passing it along as a favor to a colleague. 
regards,
Tim



Begin forwarded message:

> From: Tim Curran 
> Date: March 19, 2010 6:17:01 PM MDT
> To: FIELDTRIP at NIC.SURFNET.NL
> Subject: [FIELDTRIP] JOB OPENING
> Reply-To: FieldTrip discussion list 
> 
> JOB OPENING:  
> COGNITIVE/SYSTEMS NEUROSCIENTIST
> 
> Science Applications International Corporation (SAIC)
> 
> SAIC's Technology and Advanced Systems Business Unit has an opening for a Cognitive/Systems Neuroscientist to join a multidisciplinary team conducting research and building systems based on the translation of neuroscience and neuro-imaging (specifically, EEG) research. The individual will support one or more projects, providing expertise in developing protocols, conducting studies, analyzing data, and writing papers and proposals. Applications of interest include brain-computer interfaces and perception, memory, and attention as they relate to man-machine interactions.
> 
> Required Skills:
> 
> The candidate must have 6+ years of hands-on relevant research and demonstrated mathematical and computational expertise. Strong written and oral communication skills are a must.
> 
> Desired Skills:
> 
> Experience with EEG collection and processing is highly desired. Current knowledge of research literature with a history of publication in the field is also desired.
> 
> Education Requirements:
> 
> Ph.D Degree in Psychology, Neuroscience, or related field is required.
> 
> Location:   
> 
> Louisville/Boulder, Colorado
> 
> Contact:
> 
> Laurie Gibson, gibsonld at saic.com
> 
> ----------------------------------
> 
> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.
> 
> http://listserv.surfnet.nl/archives/fieldtrip.html
> 
> http://www.ru.nl/fcdonders/fieldtrip/
> 


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From ole.jensen at DONDERS.RU.NL  Tue Mar 23 11:56:51 2010
From: ole.jensen at DONDERS.RU.NL (Ole Jensen)
Date: Tue, 23 Mar 2010 11:56:51 +0100
Subject: PhD/postdoc jobs at the Donders
Message-ID: 

*PhD students/Post-docs, Donders Institute Nijmegen, Netherlands*

*Job description*

The Neuronal Oscillation group at the Donders Institute for Brain,
Cognition and Behaviour has funding available for PhD student and
post-doctoral positions in the context of a project focused on studying
how oscillatory activity controls the flow of information in the human
working brain. The human brain is composed of multiple regions that need
to be flexibly engaged and disengaged depending on the cognitive task
performed. A fundamental question in cognitive neuroscience is how the
functional architecture of the working brain is shaped. You will
investigate the role of oscillatory brain activity in determining the
functional architecture by studying cross-frequency interactions between
different regions in the context of cognitive experiments. You will do
so using magnetoencephalography (MEG), electroencephalography (EEG)
combined with TMS and functional magnetic resonance imaging (fMRI). You
will also use a brain-computer interface to interact with the working brain.
Requirements

Candidates for the PhD position should have a Master's degree (or
equivalent) in a field related to cognitive neuroscience or signal
processing (e.g. experimental/cognitive psychology, biology,
neuroscience, computer science, electrical engineering). Excellent
candidates from other scientific backgrounds will also be considered.
Good programming skills (Matlab) are highly desirable. Candidates for
the postdoctoral research position should have a PhD degree in a field
related to cognitive neuroscience, but candidates from other scientific
backgrounds can also apply. The record of published research familiarity
with neuroimaging techniques (fMRI, EEG-MEG, and/or TMS) and programming
skills (Matlab) will be taken into account in the selection criteria.
Proficiency in oral and written English is essential. You are expected
to work as part of a team, sharing technical know-how and ideas.
*
Organization*

The Donders Institute for Brain, Cognition and Behaviour consists of the
Centre for Cognition, the Centre for Cognitive Neuroimaging and the
Centre for Neuroscience. The mission of the Centre for Cognitive
Neuroimaging is to conduct cutting-edge fundamental research in
cognitive neuroscience. Much of the rapid progress in this field is
driven by the development of complex neuro-imaging techniques for
measuring activity in the human working brain - an area in which the
Centre plays a leading role. The research themes cover central cognitive
functions, such as perception, action, control, decision making,
attention, memory, language, learning and plasticity. The Centre also
aims to establish how the different brain areas coordinate their
activity with very high temporal precision to enable human and animal
cognition. This internationally renowned centre currently is home to
more than 100 PhD students and post-docs from more than 20 different
countries, offering a stimulating and multidisciplinary research
environment. The centre is equipped with three MRI scanners (7T, 3T,
1.5T), a 275 channels MEG system, a EEG-TMS laboratory, several
(MR-compatible) EEG systems, and high-performance computational
facilities. English is the lingua franca at the centre. You will work
within the Centre's Neuronal Oscillations group (
http://ojensen.ruhosting.nl/).

*Conditions of employment*

Employment: 1,0 fte
PhD student: The starting salary is EUR2,042 per month and will increase
to EUR2,612 per month in the fourth year.
Post-doc: Depending on experience, the gross salary will be between
EUR3,195 and EUR4,374.
Two annual 8% bonuses (holiday and end-of-year) will be added to the
monthly gross salaries.

Additional conditions of employment
Duration of the PhD student contract: 4 years.
Duration of the post-doc contract: 5 years maximum.
*
Other Information*
You should submit an application letter, a CV, and the names of two
persons who can provide references.

*Additional Information*
Dr. Ole Jensen
Telephone: +31 24 3610884
E-mail: ole.jensen at donders.ru.nl This e-mail address is being protected
from spambots. You need JavaScript enabled to view it
Application
You can apply for the job (mention the vacancy number 30.02.10) before
15 April 2010 by sending your application -preferably by email- to:

Radboud University Nijmegen, Dienst P&O
Postbus 7005, 6503 GM NIJMEGEN- NL
Telephone: + 31 24 3611173
E-mail: vacatures at dpo.ru.nl This e-mail address is being protected from
spambots. You need JavaScript enabled to view it

--
 Ole Jensen
 Principal Investigator
 Neuronal Oscillations Group
 Donders Institute for Brain, Cognition and Behaviour
 Centre for Cognitive Neuroimaging
 P.O. Box 9101
 NL-6500 HB Nijmegen
 The Netherlands

 Office  : +31 24 36 10884
 MEG lab : +31 24 36 10988

 Fax     : +31 24 36 10989

 e-mail : ole.jensen at donders.ru.nl
 URL    : http://ojensen.ruhosting.nl/



----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From p_trigkas at HOTMAIL.COM  Wed Mar 24 15:53:46 2010
From: p_trigkas at HOTMAIL.COM (PERI TRIGKAS)
Date: Wed, 24 Mar 2010 14:53:46 +0000
Subject: Invalid MEX file - Buffer
Message-ID: 


Dear list members

I have only recently started my Phd project.
I'm trying to work with some on-line MEG data. I have done
some research regarding any software that could do my job easier. I
have decided to use the FieldTrip Buffer in order to store the data
while I am doing the processing. 
Initially, I thought that it
would be good to have everything or at least the buffer on the
same machine with the acquisition system. The OS on the acquisition
system machine is a Linux distribution of Red Hat. The problem is that the OS version is too old. 

gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-59)
 
I
installed Matlab on top of that -7.2.0.294 (R2006a)- That was the
newest version that I managed to get it worked. It did not accept 7.4
or any other later version of Matlab.
When I tried to run some of
the examples that you provide in order to test the operation of the
buffer I got errors regarding the MEX file. I followed the instruction
and tried to compile the .c files. Despite the fact that everything
went well with the compilation, buffer.mexglx  was created, I got again
the same error.

??? Invalid MEX-file
'/home/peri/fieldtrip-20100314/fileio/private/buffer.mexglx':
/matlab/bin/glnx86/../../sys/os/glnx86/libgcc_s.so.1: version
`GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.5).

Error in ==> write_data at 189
        buffer('put_dat', packet, host, port);

Error in ==> rt_signalproxy at 116
    write_data(cfg.target.datafile, dat, 'header', hdr, 'dataformat', cfg.target.dataformat, 'append', false);
  
The
compatibility has been checked in a Virtual machine in order to keep
the MEG system clean as I am not the only person who uses it. 
I
have checked everything that I could and I even asked help from the
I.T. support but my problem has not been solved. I would like to ask if
the error I get, is a compatibility error since the program is looking
for another gcc version (version `GCC_4.2.0' not found)   . 

Could you
please suggest me what can be done in order to overcome such problems?  

Thanks in advance 

P. Trigkas


 		 	   		  
_________________________________________________________________
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
http://clk.atdmt.com/UKM/go/195013117/direct/01/
----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From gflandin at FIL.ION.UCL.AC.UK  Wed Mar 24 16:35:57 2010
From: gflandin at FIL.ION.UCL.AC.UK (Guillaume Flandin)
Date: Wed, 24 Mar 2010 15:35:57 +0000
Subject: Invalid MEX file - Buffer
In-Reply-To: 
Message-ID: 

Dear Peri,

if you follow the same instructions than there and recompile, it should
get you sorted:
http://en.wikibooks.org/wiki/SPM/Installation_on_64bit_Linux#Other_problems_with_lstdc.2B.2B
(basically, remove all reference to -lstdc++ in mexopts.sh).

Best regards,
Guillaume.


PERI TRIGKAS wrote:
> Dear list members
>
> I have only recently started my Phd project. I'm trying to work with
> some on-line MEG data. I have done some research regarding any software
> that could do my job easier. I have decided to use the FieldTrip Buffer
> in order to store the data while I am doing the processing.
> Initially, I thought that it would be good to have everything or at
> least the buffer on the same machine with the acquisition system. The OS
> on the acquisition system machine is a Linux distribution of Red Hat.
> The problem is that the OS version is too old.
>
> /gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-59)/
>
> I installed Matlab on top of that /-7.2.0.294 (R2006a)/- That was the
> newest version that I managed to get it worked. It did not accept 7.4 or
> any other later version of Matlab.
> When I tried to run some of the examples that you provide in order to
> test the operation of the buffer I got errors regarding the MEX file. I
> followed the instruction and tried to compile the .c files. Despite the
> fact that everything went well with the compilation, buffer.mexglx  was
> created, I got again the same error.
>
> ?/?? Invalid MEX-file
> '/home/peri/fieldtrip-20100314/fileio/private/buffer.mexglx':
> /matlab/bin/glnx86/../../sys/os/glnx86/libgcc_s.so.1: version
> `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.5).
>
> Error in ==> write_data at 189
>        buffer('put_dat', packet, host, port);
>
> Error in ==> rt_signalproxy at 116
>    write_data(cfg.target.datafile, dat, 'header', hdr, 'dataformat',
> cfg.target.dataformat, 'append', false);
> /
> The compatibility has been checked in a Virtual machine in order to keep
> the MEG system clean as I am not the only person who uses it.
> I have checked everything that I could and I even asked help from the
> I.T. support but my problem has not been solved. I would like to ask if
> the error I get, is a compatibility error since the program is looking
> for another gcc version (version `GCC_4.2.0' not found)   .
>
> Could you please suggest me what can be done in order to overcome such
> problems?
>
> Thanks in advance
>
> P. Trigkas

--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From njkillian at GATECH.EDU  Wed Mar 24 21:20:59 2010
From: njkillian at GATECH.EDU (Nathan Killian)
Date: Wed, 24 Mar 2010 16:20:59 -0400
Subject: freqdescriptives/statistics
In-Reply-To: 
Message-ID: 

Hi Fieldtrip Users,
I'm curious about the "bias correct" for coherence existing in past versions
of fieldtrip (old discussion thread below) but I couldn't locate in the FT
code (October 14 2009 version) what this is actually doing and what bias it
was addressing (e.g. bias from number of trials used in an average). Can
anyone explain what this was meant to do? Also is there any other sort of
bias correction done in the more recent versions of FT?
Thanks for any help!
Nathan

On Tue, Sep 1, 2009 at 6:40 PM, Dahlia Sharon  wrote:

> Thanks Jan-Mathijs for that useful reply.
>
> Regarding permutation analysis, we're running into some difficulty
> understanding what the code does. Could you clarify these points?
>
> 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate
> layout file (all channels). Does fieldtrip take into account which channels
> are gradiometers and which magnetometers when it calculates adjacency for
> clustering?
>
> 2. How does fieldtrip calculate adjacency for channels? (time and frequency
> are obvious...)
>
> 3. How is the clustering performed?
>
> We're getting a significant cluster but it doesn't look like a single blob
> in the time-frequency domain (averaging over sensors) but like two very
> distant blobs, which is very strange...
>
> On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen
>  wrote:
>
> >Dear Dahlia,
> >
> >Hemant Bokil indeed uses the jackknife to obtain variance estimates of
> >power (and coherence), see also for example his 2007 paper in
> >J.Neurosci.Methods. More specifically, if your data is 'well-behaved',
> >he has shown that by applying a specific correction to the power
> >estimate, in combination of the jackknife, generates a test-statistic
> >from a differential (i.e. contrast) power spectrum which has a
> >standard normal distribution (i.e. the jackknife estimate of the
> >variance is expected to be 1 and the estimate of the mean 0).
> >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to
> >use non-parametric techniques to do statistical inference.
> >Freqdescriptives in this respect still historically has the option of
> >computing a jackknife estimate of the SEM of the powerspectrum/
> >coherencespectrum, which can be used to compute a T-statistic across
> >two conditions for example. However, I you would choose this path, you
> >have to write some code which does this, because it is not in
> >fieldtrip. The biascorrect option has been taken out altogether as far
> >as I can see, (and had been designed only to correct the bias in the
> >coherence spectra, and not in the power spectra if I remember
> >correctly), and any reference in the documentation should be removed.
> >Unfortunately, we did not yet have time to considerably clean up
> >freqdescriptives, but this is quite high on the developer's to do list.
> >The bottom line is: ignore biascorrect, and if you use the jackknife
> >estimate of the SEM, you have to come up with some code of your own.
> >Alternatively, you could look into freqstatistics and use
> >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do
> >statistical inference.
> >
> >Best,
> >
> >Jan-Mathijs
> >
> >
> >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote:
> >
> >> Hi all,
> >>
> >> Is there a more detailed explanation of usage for the jackknife and
> >> biascorrect options for freqdescriptives than the one in the
> >> freqdescriptives reference
> page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)?
> >>
> >> More specifically, are these options related to Bokil et al NeuroIm
> >> 2007? How should they be employed to determine significance of
> >> difference between conditions? (Is there somewhere a tutorial for
> >> the use of these options analogous to the one about cluster-based
> >> permutation testing?)
> >>
> >> Also, for the permutation analysis of TFRs
> (http://fieldtrip.fcdonders.nl/tutorial/statistics?s
> >> []=freqstatistics), if I don't want to employ the planar gradient
> >> step (what exactly IS combineplanar? sorry I couldn't find it), can
> >> I simply skip it and calculate the TFRs of the raw sensor data?
> >>
> >> Many thanks!
> >> Dahlia.
> >> ----------------------------------
> >> The aim of this list is to facilitate the discussion between users
> >> of the FieldTrip toolbox, to share experiences and to discuss new
> >> ideas for MEG and EEG analysis.
> >> http://listserv.surfnet.nl/archives/fieldtrip.html
> >> http://www.ru.nl/fcdonders/fieldtrip/
> >
> >----------------------------------
> >
> >The aim of this list is to facilitate the discussion between users of
> >the FieldTrip toolbox, to share experiences and to discuss new ideas
> >for MEG and EEG analysis.
> >
> >http://listserv.surfnet.nl/archives/fieldtrip.html
> >
> >http://www.ru.nl/fcdonders/fieldtrip/
> >
> >
> >
> >
> >
> >----------------------------------
> >The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
> >
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From e.maris at DONDERS.RU.NL  Wed Mar 24 22:11:07 2010
From: e.maris at DONDERS.RU.NL (Eric Maris)
Date: Wed, 24 Mar 2010 22:11:07 +0100
Subject: freqdescriptives/statistics
In-Reply-To: 
Message-ID: 

Hi Nathan,

 

 

I have implemented the biascorrect option in one of the older versions of freqdescriptives.  With this option, the Jacknife was used to calculate a bias-corrected version of coherence. Actually, there is a very nice theorem about the fact that Jacknife-based bias correction effectively removes the first order bias. Surprisingly, the Jacknife is mainly used to calculate a proxy for the standard error, and for this application a similar theorem does not exist. I learned this from a nice chapter by John Tukey in a book called “(Exploratory) Data Analysis” (or something like that).

 

 

Best,

 

Eric

 

 

dr. Eric Maris
Donders Institute for Brain, Cognition and Behavior

Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging

Radboud University
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
T:+31 24 3612651
Mobile: 06 39584581

F:+31 24 3616066
E: e.  maris at donders.ru.nl

 

 

 

 

 

From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Nathan Killian
Sent: woensdag 24 maart 2010 21:21
To: FIELDTRIP at NIC.SURFNET.NL
Subject: Re: [FIELDTRIP] freqdescriptives/statistics

 

Hi Fieldtrip Users,

I'm curious about the "bias correct" for coherence existing in past versions of fieldtrip (old discussion thread below) but I couldn't locate in the FT code (October 14 2009 version) what this is actually doing and what bias it was addressing (e.g. bias from number of trials used in an average). Can anyone explain what this was meant to do? Also is there any other sort of bias correction done in the more recent versions of FT?

Thanks for any help!

Nathan

 

On Tue, Sep 1, 2009 at 6:40 PM, Dahlia Sharon  wrote:

Thanks Jan-Mathijs for that useful reply.

Regarding permutation analysis, we're running into some difficulty
understanding what the code does. Could you clarify these points?

1. We're using Neuromag (Vectorview 306) data, and giving the appropriate
layout file (all channels). Does fieldtrip take into account which channels
are gradiometers and which magnetometers when it calculates adjacency for
clustering?

2. How does fieldtrip calculate adjacency for channels? (time and frequency
are obvious...)

3. How is the clustering performed?

We're getting a significant cluster but it doesn't look like a single blob
in the time-frequency domain (averaging over sensors) but like two very
distant blobs, which is very strange...


On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen
 wrote:

>Dear Dahlia,
>
>Hemant Bokil indeed uses the jackknife to obtain variance estimates of
>power (and coherence), see also for example his 2007 paper in
>J.Neurosci.Methods. More specifically, if your data is 'well-behaved',
>he has shown that by applying a specific correction to the power
>estimate, in combination of the jackknife, generates a test-statistic
>from a differential (i.e. contrast) power spectrum which has a
>standard normal distribution (i.e. the jackknife estimate of the
>variance is expected to be 1 and the estimate of the mean 0).
>Unfortunately, MEG data is hardly ever well-behaved, so we prefer to
>use non-parametric techniques to do statistical inference.
>Freqdescriptives in this respect still historically has the option of
>computing a jackknife estimate of the SEM of the powerspectrum/
>coherencespectrum, which can be used to compute a T-statistic across
>two conditions for example. However, I you would choose this path, you
>have to write some code which does this, because it is not in
>fieldtrip. The biascorrect option has been taken out altogether as far
>as I can see, (and had been designed only to correct the bias in the
>coherence spectra, and not in the power spectra if I remember
>correctly), and any reference in the documentation should be removed.
>Unfortunately, we did not yet have time to considerably clean up
>freqdescriptives, but this is quite high on the developer's to do list.
>The bottom line is: ignore biascorrect, and if you use the jackknife
>estimate of the SEM, you have to come up with some code of your own.
>Alternatively, you could look into freqstatistics and use
>cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do
>statistical inference.
>
>Best,
>
>Jan-Mathijs
>
>
>On 28 Aug 2009, at 06:34, Dahlia Sharon wrote:
>
>> Hi all,
>>
>> Is there a more detailed explanation of usage for the jackknife and
>> biascorrect options for freqdescriptives than the one in the
>> freqdescriptives reference
page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)?
>>
>> More specifically, are these options related to Bokil et al NeuroIm
>> 2007? How should they be employed to determine significance of
>> difference between conditions? (Is there somewhere a tutorial for
>> the use of these options analogous to the one about cluster-based
>> permutation testing?)
>>
>> Also, for the permutation analysis of TFRs
(http://fieldtrip.fcdonders.nl/tutorial/statistics?s
>> []=freqstatistics), if I don't want to employ the planar gradient
>> step (what exactly IS combineplanar? sorry I couldn't find it), can
>> I simply skip it and calculate the TFRs of the raw sensor data?
>>
>> Many thanks!
>> Dahlia.
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users
>> of the FieldTrip toolbox, to share experiences and to discuss new
>> ideas for MEG and EEG analysis.
>> http://listserv.surfnet.nl/archives/fieldtrip.html
>> http://www.ru.nl/fcdonders/fieldtrip/
>
>----------------------------------
>
>The aim of this list is to facilitate the discussion between users of
>the FieldTrip toolbox, to share experiences and to discuss new ideas
>for MEG and EEG analysis.
>
>http://listserv.surfnet.nl/archives/fieldtrip.html
>
>http://www.ru.nl/fcdonders/fieldtrip/
>
>
>
>
>
>----------------------------------
>The aim of this list is to facilitate the discussion between users of the
FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG

and EEG analysis. See also
http://listserv.surfnet.nl/archives/fieldtrip.html and
http://www.ru.nl/neuroimaging/fieldtrip.
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.

 

----------------------------------

The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.

http://listserv.surfnet.nl/archives/fieldtrip.html

http://www.ru.nl/fcdonders/fieldtrip/


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From stojanoski at UTSC.UTORONTO.CA  Thu Mar 25 18:33:14 2010
From: stojanoski at UTSC.UTORONTO.CA (Bobby Stojanoski)
Date: Thu, 25 Mar 2010 13:33:14 -0400
Subject: Induced activity
Message-ID: 

Dear Fieldtrippers,



I am a relatively new user of fieldtrip and am very impressed!


I am interested in comparing differences at certain frequencies – induced
40-100 Hz – between 2 experimental conditions.  My understanding was that I
can calculate induced activity in the gamma range by calculating the power
for each trial (subject average -- freqanalysis) and then averaging across
subjects (grand average -- freqdescriptives/freqgrandaverage).


To my dismay, when I plotted the results of my grandaverage I found a band
of power at 55 - 65 Hz for the entire duration of my epoch. I should add
this was not the case when I plotted power across trials for each
participant.


Earlier discussions mention computing induced+evoked (using freqanalysis and
freqgrandaverage) and subtracting that from evoked (using
timelockanalysis+freqanalysis) to get extract induced only activity.
However, later posts suggest that this is not a valid approach.


1. Where have I made my mistake?


2. If ((induced+evoked)-evoked)) is not valid, what is the correct approach
to calculating induced activity at 40 - 100 Hz?


Any help would be greatly appreciated!


Thank you

Bobby Stojanoski

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From adrian.m.bartlett at GMAIL.COM  Thu Mar 25 18:51:51 2010
From: adrian.m.bartlett at GMAIL.COM (Adrian Bartlett)
Date: Thu, 25 Mar 2010 13:51:51 -0400
Subject: Induced activity
In-Reply-To: 
Message-ID: 

Hi Bobby,

This sounds like you may have a case of line noise contamination, which is
usually seen at 50/60Hz (depends on which continent you are on). While I am
not familiar with it's implementation in FIELDTRIP, there are notch
filtering solutions to eliminate this contamination. Using multitaper FFT
will usually result in the 0 power (post-notch-filtering) at ~60 Hz being
smoothed over by the narrowband frequency bias.

- A

On Thu, Mar 25, 2010 at 1:33 PM, Bobby Stojanoski <
stojanoski at utsc.utoronto.ca> wrote:

> Dear Fieldtrippers,
>
>
>
> I am a relatively new user of fieldtrip and am very impressed!
>
>
> I am interested in comparing differences at certain frequencies – induced
> 40-100 Hz – between 2 experimental conditions.  My understanding was that
> I can calculate induced activity in the gamma range by calculating the power
> for each trial (subject average -- freqanalysis) and then averaging across
> subjects (grand average -- freqdescriptives/freqgrandaverage).
>
>
> To my dismay, when I plotted the results of my grandaverage I found a band
> of power at 55 - 65 Hz for the entire duration of my epoch. I should add
> this was not the case when I plotted power across trials for each
> participant.
>
>
> Earlier discussions mention computing induced+evoked (using freqanalysis
> and freqgrandaverage) and subtracting that from evoked (using
> timelockanalysis+freqanalysis) to get extract induced only activity.
> However, later posts suggest that this is not a valid approach.
>
>
> 1. Where have I made my mistake?
>
>
> 2. If ((induced+evoked)-evoked)) is not valid, what is the correct approach
> to calculating induced activity at 40 - 100 Hz?
>
>
> Any help would be greatly appreciated!
>
>
> Thank you
>
> Bobby Stojanoski
>
>
>
> ----------------------------------
>
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and
> EEG analysis.
>
> http://listserv.surfnet.nl/archives/fieldtrip.html
>
> http://www.ru.nl/fcdonders/fieldtrip/
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From sweiss at AECOM.YU.EDU  Thu Mar 25 21:49:01 2010
From: sweiss at AECOM.YU.EDU (Shennan Weiss)
Date: Thu, 25 Mar 2010 16:49:01 -0400
Subject: old CTF format
Message-ID: 

Hi,

In order to input my CTF data in to fieldtrip I had to set cfg.dataformat
and cfg.headerformat to ctf_old. This worked. However, when I try to run
applications like megplanar even when I list my channels it does not work.
Perhaps this is because my MEG channels begin with 'M' and not 'MEG'?

Does anyone know a way to convert old CTF data to new CTF? or any other
fixes?

Thanks,
Shennan

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From sweiss at AECOM.YU.EDU  Thu Mar 25 23:48:43 2010
From: sweiss at AECOM.YU.EDU (Shennan Weiss)
Date: Thu, 25 Mar 2010 18:48:43 -0400
Subject: megplanar
Message-ID: 

Hi again,

I wanted to specify the error I am encountering with megplanar analyzing
CTF275 data. Note in preprocessing I had to set the read parameters to
ctf_old. The specific problem occurs in channelposition.m

at the following lines

used = any(abs(sens.tra)<0.5, 1);  % allow a little bit of rounding-off error
sens.pnt = sens.pnt(used,:);

the problem is that sens.tra that is equivalent to data.grad.tra and is a
273 x 574 array. While sens.pnt is a array of 543x3.

Any help would be greatly appreciated.

Thanks, Shennan

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From michael.wibral at WEB.DE  Fri Mar 26 18:29:10 2010
From: michael.wibral at WEB.DE (Michael Wibral)
Date: Fri, 26 Mar 2010 18:29:10 +0100
Subject: megplanar
In-Reply-To: <610ef88c5eff801021e76bccd135c364.squirrel@netmail.aecom.yu.edu>
Message-ID: 

Hi Shennan,

could you post the code to read in the data, and the specific error message you ge - that would be very helpful.
Here are some more questions:
Did you use the tools provided by ctf to read in the data? 
Did you read in only MEG channels (and not the refence ones etc.)?
Did you try to plot or statistically analyze your megplanar data *before* using combineplanar (only after using combineplanar plotting and statitistcs are possible to my knowledge)?

Michael






-----Ursprüngliche Nachricht-----
Von: Shennan Weiss 
Gesendet: Mar 25, 2010 11:48:43 PM
An: FIELDTRIP at NIC.SURFNET.NL
Betreff: [FIELDTRIP] megplanar

>Hi again,
>
>I wanted to specify the error I am encountering with megplanar analyzing
>CTF275 data. Note in preprocessing I had to set the read parameters to
>ctf_old. The specific problem occurs in channelposition.m
>
>at the following lines
>
>used = any(abs(sens.tra)<0.5, 1);  % allow a little bit of rounding-off error
>sens.pnt = sens.pnt(used,:);
>
>the problem is that sens.tra that is equivalent to data.grad.tra and is a
>273 x 574 array. While sens.pnt is a array of 543x3.
>
>Any help would be greatly appreciated.
>
>Thanks, Shennan
>
>----------------------------------
>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 628 bytes
Desc: not available
URL: 

From michael.wibral at WEB.DE  Fri Mar 26 19:24:51 2010
From: michael.wibral at WEB.DE (Michael Wibral)
Date: Fri, 26 Mar 2010 19:24:51 +0100
Subject: Induced activity
In-Reply-To: <7834c8d31003251051t6ebcf886jdbe595916a639638@mail.gmail.com>
Message-ID: 

An HTML attachment was scrubbed...
URL: 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 628 bytes
Desc: not available
URL: 

From sweiss at AECOM.YU.EDU  Sat Mar 27 01:24:21 2010
From: sweiss at AECOM.YU.EDU (Shennan Weiss)
Date: Fri, 26 Mar 2010 20:24:21 -0400
Subject: megplanar
In-Reply-To: <12290700.448458.1269624550752.JavaMail.fmail@mwmweb055>
Message-ID: 

Hi Michael and others,

Thank you for the help. When I try to load a ctf275 dataset using the
following commands (for example)

cfg = [];
cfg.dataset = 'trial1.ds';
data=preprocessing(cfg);

readCTFds: You are reading CTF data for use with a software-application
tool that is not manufactured by VSM MedTech Ltd. and has not received
marketing clearance for clinical applications.  If CTF MEG data are
processed by this tool, they should not be later employed for clinical
and/or diagnostic purposes.

??? Index exceeds matrix dimensions.

Error in ==> /fieldtrip-20100101/external/ctf/readCTFds.p>readHc at 599

Error in ==> /fieldtrip-20100101/external/ctf/readCTFds.p>readCTFds at 203

Error in ==> read_header at 404
    orig             = readCTFds(filename);

Error in ==> ft_preprocessing at 278
  hdr = read_header(cfg.headerfile, 'headerformat', cfg.headerformat);

Error in ==> preprocessing at 17
[varargout{1:nargout}] = funhandle(varargin{:});

However when I add

cfg.headerformat = 'ctf_old';
cfg.dataformat= 'ctf_old';

The complete file is loaded. Yet I have encountered numerous problems. For
example, when I try to run topoplot on the basis of the organization of
the data.grad structure it thinks the file has 151 channels....

Even when I open the ctf file in an updated version of dataeditor and
resave it after applying a filter for instance I still get the same error
message in Matlab.

-Shen

Any help would be wonderful. I really hope I can smoothly use the
fieldtrip package.

Thanks,
Shennan

> Hi Shennan,
>
> could you post the code to read in the data, and the specific error
> message you ge - that would be very helpful.
> Here are some more questions:
> Did you use the tools provided by ctf to read in the data?
> Did you read in only MEG channels (and not the refence ones etc.)?
> Did you try to plot or statistically analyze your megplanar data *before*
> using combineplanar (only after using combineplanar plotting and
> statitistcs are possible to my knowledge)?
>
> Michael
>
>
>
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Shennan Weiss
> Gesendet: Mar 25, 2010 11:48:43 PM
> An: FIELDTRIP at NIC.SURFNET.NL
> Betreff: [FIELDTRIP] megplanar
>
>>Hi again,
>>
>>I wanted to specify the error I am encountering with megplanar analyzing
>>CTF275 data. Note in preprocessing I had to set the read parameters to
>>ctf_old. The specific problem occurs in channelposition.m
>>
>>at the following lines
>>
>>used = any(abs(sens.tra)<0.5, 1);  % allow a little bit of rounding-off
>> error
>>sens.pnt = sens.pnt(used,:);
>>
>>the problem is that sens.tra that is equivalent to data.grad.tra and is a
>>273 x 574 array. While sens.pnt is a array of 543x3.
>>
>>Any help would be greatly appreciated.
>>
>>Thanks, Shennan
>>
>>----------------------------------
>>The aim of this list is to facilitate the discussion between users of the
>> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>> and EEG analysis. See also
>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>> http://www.ru.nl/neuroimaging/fieldtrip.
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From nathanweisz at MAC.COM  Sat Mar 27 11:41:48 2010
From: nathanweisz at MAC.COM (Nathan Weisz)
Date: Sat, 27 Mar 2010 11:41:48 +0100
Subject: Induced activity
In-Reply-To: <26662339.467176.1269627891260.JavaMail.fmail@mwmweb055>
Message-ID: 

hi bobby,

i agree with michael that there is no method -at least that i'm aware of- to get rid of evoked parts, just due to the issues he mentions.

the solution of reporting the averaged single-trial TF response along with ITC would be ok if one could assume a strict sequence of evoked and induced responses (e.g. <300 ms evoked; >300 ms induced). in practice this however is not the case and induced and evoked processes overlap considerably. This will make problems when you are specifically interested in what is induced: the evoked parts will dominate the entire picture. overlaps may also be created due to the analysis method. e.g. a practical problem my group sometimes encounters is that pre-stimulus alpha desynchronizations are sometimes rendered almost "invisible" in time-frequency analysis due to post-stimulus increases at low frequencies (that largely compose the ERP), that "bleed" into the pre-stimulus period (also an issue regarding baseline correction of post-stimulus responses).
these issues will not be solved by reporting inter-trial coherence.

so depending on what you are interested in, i think that sometimes the best (not conceptually ideal) you can do is to remove the time-frequency representation of the ERP (of course before baseline correction; this would not increase computation time a lot and you could report both if needed). of course you need to be aware of the limitations michael mentioned and decide whether you want to forgo investigating something altogether due to a lack of 100% valid methods. in general however, one could pose a similar question for many things we do e.g. regarding source localization: even though we can not be 100% sure whether the "blobs" or dipole fits we see are valid we do it anyway (or at least many of us).

if anybody has a better idea rather than primitive ERP removal, for separating evoked and incuced activity when they overlap, then it would be great to share it with the community.

cheers,
nathan

On 26.03.2010, at 19:24, Michael Wibral wrote:

> Hi Bobby,
> 
>  
> for fundamental reasons there is (of yet?) no valid approach to get at "pure" induced activity. To see this, imagine a process that produces induced responses, but in a particular participant and day you get by chance mostly responses with relatively similar phases - such that you get a nonnegligible average (some would call it an ERP). Is it still induced? Did it convert to evoked (without the underlying process having changed) ?
> 
>  
> As at least three different mechanisms (additive evoked activity, phase rest of ongoing oscillations, asymmetric amplitude modulation of ongoing oscillations) have been shown to produce non-vanishing averages / ERPs I would also strictly advise against regressing out "evoked" activity from each trial to get induced activity.
> 
> I also do not see a need for analysis of "pure" induced activity. You can calculate power and inter-trial phase-coherence for each time-frequency bin. For the various peaks in your time-frequency representation you quote these two values and most people should be fine with this.
> 
>  
> Michael
> 
>  
>  
>  
>  
>  
> 
> 
> 
> 
> Von: Adrian Bartlett 
> Gesendet: Mar 25, 2010 6:51:51 PM
> An: FIELDTRIP at NIC.SURFNET.NL
> Betreff: Re: [FIELDTRIP] Induced activity
> 
> Hi Bobby,
> This sounds like you may have a case of line noise contamination, which is usually seen at 50/60Hz (depends on which continent you are on). While I am not familiar with it's implementation in FIELDTRIP, there are notch filtering solutions to eliminate this contamination. Using multitaper FFT will usually result in the 0 power (post-notch-filtering) at ~60 Hz being smoothed over by the narrowband frequency bias.
> - A
> 
> On Thu, Mar 25, 2010 at 1:33 PM, Bobby Stojanoski  wrote:
> Dear Fieldtrippers,  
>              
> I am a relatively new user of fieldtrip and am very impressed!
>  
> I am interested in comparing differences at certain frequencies – induced 40-100 Hz – between 2 experimental conditions.  My understanding was that I can calculate induced activity in the gamma range by calculating the power for each trial (subject average -- freqanalysis) and then averaging across subjects (grand average -- freqdescriptives/freqgrandaverage).
>  
> To my dismay, when I plotted the results of my grandaverage I found a band of power at 55 - 65 Hz for the entire duration of my epoch. I should add this was not the case when I plotted power across trials for each participant.   
>  
> Earlier discussions mention computing induced+evoked (using freqanalysis and freqgrandaverage) and subtracting that from evoked (using timelockanalysis+freqanalysis) to get extract induced only activity. However, later posts suggest that this is not a valid approach.
>  
>  
> 1. Where have I made my mistake?
>  
> 2. If ((induced+evoked)-evoked)) is not valid, what is the correct approach to calculating induced activity at 40 - 100 Hz?
>  
>  
> Any help would be greatly appreciated!
>  
>  
> Thank you
> Bobby Stojanoski
> 
> 
> 
> ----------------------------------
> 
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.
> 
> http://listserv.surfnet.nl/archives/fieldtrip.html
> 
> http://www.ru.nl/fcdonders/fieldtrip/
> 
> ----------------------------------
> 
> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.
> 
> http://listserv.surfnet.nl/archives/fieldtrip.html
> 
> http://www.ru.nl/fcdonders/fieldtrip/
> 
> ----------------------------------
> 
> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.
> 
> http://listserv.surfnet.nl/archives/fieldtrip.html
> 
> http://www.ru.nl/fcdonders/fieldtrip/
> 
> 


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From h.holle at SUSSEX.AC.UK  Sun Mar 28 17:02:40 2010
From: h.holle at SUSSEX.AC.UK (Henning Holle)
Date: Sun, 28 Mar 2010 17:02:40 +0200
Subject: channel selection in ft_preproccesing does not update elec field
Message-ID: 

Dear list members,

In a call to ft_precessing, I have selected a number of interesting channels
for further analysis

cfg = [];
cfg.channel     = {'Fz', 'Cz', 'Pz'};
data_eeg        = ft_preprocessing(cfg,data_tmp);

After this call, the data_eeg.label is updated, and now contains only these
three channels. However, data_eeg.elec does not seem to be updated, and is
still containing all original channels (which causes problems later on when
I try to plot the results). Shouldn't ft_preprocessing also update the
data_eeg.elec field?

Best wishes,

Henning

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From nathanweisz at MAC.COM  Mon Mar 29 10:18:55 2010
From: nathanweisz at MAC.COM (Nathan Weisz)
Date: Mon, 29 Mar 2010 10:18:55 +0200
Subject: channel selection in ft_preproccesing does not update elec
 field
In-Reply-To: 
Message-ID: 

> After this call, the data_eeg.label is updated, and now contains only these
> three channels. However, data_eeg.elec does not seem to be updated, and is
> still containing all original channels (which causes problems later on when
> I try to plot the results). Shouldn't ft_preprocessing also update the
> data_eeg.elec field?

no ... not as far as i know.
the elec-field contains all info no matter what you do. for plotting the main thing is that the electrodes in the label field should also appear somewhere in the elec.label field.

n

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From h.holle at SUSSEX.AC.UK  Mon Mar 29 14:23:03 2010
From: h.holle at SUSSEX.AC.UK (Henning Holle)
Date: Mon, 29 Mar 2010 14:23:03 +0200
Subject: channel selection in ft_preproccesing does not update elec
 field
Message-ID: 

Hello Nathan,

thank you for your response. I have created an average for three 3
electrodes of interest (Fz, Cz, Pz). When I try to plot it, like so

cfg = [];
cfg.showlabels = 'yes'; 
cfg.fontsize = 6; 
multiplotER(cfg, avg_STD); 

the electrodes are not in the layout I would have expected (see attachment).
What is causing this behavior?

This are my electrode positions, if this information helps:

>> avg_STD.elec.pnt(strmatch('Fz',avg_STD.elec.label),:)

ans =

         0    8.6070    5.8872

>> avg_STD.elec.pnt(strmatch('Cz',avg_STD.elec.label),:)

ans =

         0         0    8.5313

>> avg_STD.elec.pnt(strmatch('Pz',avg_STD.elec.label),:)

ans =

         0   -5.6243    7.1065

Best wishes

Henning

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output_multiplot.fig
Type: application/octet-stream
Size: 16503 bytes
Desc: not available
URL: 

From nathanweisz at MAC.COM  Tue Mar 30 00:42:28 2010
From: nathanweisz at MAC.COM (Nathan Weisz)
Date: Tue, 30 Mar 2010 00:42:28 +0200
Subject: channel selection in ft_preproccesing does not update elec
 field
In-Reply-To: 
Message-ID: 

Dear Henning,

I'm not sure why the data is plotted as it is (i.e. in a topographical sense, e.g. Cz in the upper left corner). but i don't think that with 3 electrodes a multiplot is really necessary anyway. why not use singleplot?

best,
n

On 29.03.2010, at 14:23, Henning Holle wrote:

> Hello Nathan,
>
> thank you for your response. I have created an average for three 3
> electrodes of interest (Fz, Cz, Pz). When I try to plot it, like so
>
> cfg = [];
> cfg.showlabels = 'yes';
> cfg.fontsize = 6;
> multiplotER(cfg, avg_STD);
>
> the electrodes are not in the layout I would have expected (see attachment).
> What is causing this behavior?
>
> This are my electrode positions, if this information helps:
>
>>> avg_STD.elec.pnt(strmatch('Fz',avg_STD.elec.label),:)
>
> ans =
>
>         0    8.6070    5.8872
>
>>> avg_STD.elec.pnt(strmatch('Cz',avg_STD.elec.label),:)
>
> ans =
>
>         0         0    8.5313
>
>>> avg_STD.elec.pnt(strmatch('Pz',avg_STD.elec.label),:)
>
> ans =
>
>         0   -5.6243    7.1065
>
> Best wishes
>
> Henning
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
> 

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From Erin.Oakman at NYUMC.ORG  Tue Mar 30 19:01:25 2010
From: Erin.Oakman at NYUMC.ORG (Oakman, Erin)
Date: Tue, 30 Mar 2010 13:01:25 -0400
Subject: Induced activity
In-Reply-To: 
Message-ID: 

Hello Bobby,

Thanks for raising a very relevant question about the difference between induced and evoked activity !  

A good discussion of this can be found here, or attached as text
https://listserv.surfnet.nl/scripts/wa.cgi?A3=ind0704&L=FIELDTRIP&E=quoted-printable&P=234745&B=--Apple-Mail-1--1050075873&T=text%2Fhtml;%20charset=WINDOWS-1252&XSS=3

There is not a definite way to separate the induced and evoked activity.  The reason is that the sum of the squares is not the same as the square of the sum.

In my very limited experience, I have noticed that researchers sometimes use the term "induced" or "event-related spectral perturbation" to refer to the average of the single-trials power, which has been base-line corrected .  At least that is the case in the "induced power" in this paper:   Krishnan, G. P., W.P. Hetrick, C.A. Brenner, A. Shekhar, A.N. Steffen and B.F. O'Donnell 2009. Steady state and induced auditory gamma deficits in schizophrenia. Neuroimage.


Erin



Hi 
>     A late follow-up to this topic. I have recentrly been musing over how to
> get a "clean" measure of the non-phase locked activity. I have tried
> subtracting the ERF out prior to time-frequency computation but this
> produces quite a bit of artifact...presumably since the single trial data
> will have considerable ;atency "jitter"

The ERF collapses two sources of "jitter"; in the latency of the transient activity (if it exists) and the phase of ongoing oscillatory activity.

>    The comments from Christian below make sense ( I think) why simply
> subtracting the two time-frequency power representaions is not valid. But I
> wonder would this subtractive approach be valid if one worked with the
> magnitude of the signal rather than power..omitting all the squaring operations?

Computing the magnitude is still a non-linear operation (square root of a sum of squares, rectification, whatever ... ). The problem for why this won't work either resides in averaging part: in the evoked case you have a linear average followed by a non-linear operation, and in the induced case you have an average of the non-linearly transformed quantity. The "catch phrase" here is: the sum of the squares is not the same as the square of the sum! (or the sum of the rectified data is not the same as the rectified sum)

Hope this helps,
Christian


>   If this right theoretically, how to achieve this in Fieldtrip?. Would
> setting cfg.output = 'fourier then abs'ing the output work. My suspicion is
> no since the summing is being done first here. Alternatively, does one need
> to hack the code to return the magnitude.
>
> Thanks for your help on this and sorry for waking old threads :)
>
>    - Suresh   
>
> On Fri, 23 Feb 2007 01:44:59 +0100, Christian Hesse
>  wrote:
>
>> One further comment (please see below):
>>
>>> Hi Thomas,
>>>> Following up on this conversation. It seems that the ‘induced  
>>>> activity’ contains both phase-locked and non-phase-locked  
>>>> activity, whereby the ‘evoked’ activity contains only phase-locked  
>>>> activity. Is it then kosher to separate these components by linear  
>>>> subtraction? For example, if we first compute the ‘induced’  
>>>> activity by averaging power over individual trials, and from that  
>>>> subtract the ‘evoked activity’ (calculated based on average  
>>>> response) to get the induced activity without any phase-locked  
>>>> activity?
>>>
>>> It is not correct to subtract because computing the induced and  
>>> evoked power spectra involves squaring signal amplitudes (a non- 
>>> linear operation), and hence, taking your terminology to refer to  
>>> the instantaneous amplitudes of the signal components (this applies  
>>> to any time-frequency tile)
>>>> Induced = Phase + Non-Phase
>>>>
>>>> And
>>>>
>>>> Evoked = Phase
>>>>
>>>> Then
>>>>
>>>> Non-Phase = Induced – Evoked
>>>>
>>>>
>>> what you actually get from spectral or time-frequency analysis is  
>>> the power of your MEASURED signal
>>>
>>> Induced^2 = (Phase + Non-Phase)^2 = Phase^2 + 2*Phase*Non-Phase +  
>>> Non-Phase^2
>>>
>>> Evoked^2 = Phase^2
>>>
>>> Then
>>>
>>> Induced^2 - Evoked^2 = 2*Phase*Non-Phase + Non-Phase^2  AND NOT Non- 
>>> Phase^2
>>>
>> Note that the other crucial thing to consider here is that you are in  
>> one case averaging power over trials over trials:
>>
>> E[ (Induced^2)  ] =  E[ (Phase + Non-Phase)^2 ] = E[ (Phase^2 +  
>> 2*Phase*Non-Phase + Non-Phase^2) ] = E[ (Phase^2) ] E[ (Non- 
>> Phase^2) ] + E[ 2*Phase*Non-Phase ]
>>
>> this is why taking the square root of sqrt(Induced^2) does not give  
>> (Phase + Non-Phase) but sqrt(E[ (Phase+Non-Phase)^2 ]).
>>
>> in the evoked case you are taking the power of the average amplitude
>>
>> Evoked^2 = E[ Phase ]^2  (---> note the ^2 on the outside of the sum)
>>
>> so in subtracting you are actually assuming that E[Phase]^2 = E 
>> [(Phase)^2] which is unlikely to be accurate the case in finite samples.
>>
>> Hope I have not confused others (or myself) here.
>> Christian
>>
>>


>
> This is indeed the approach that I have followed succesfully a couple of
> times (e.g. Bastiaansen et al., JOCN 2006), although the terminology that
> you are using is somewhat confusing. I (and I guess most people) would refer
> to induced activity as that part of the EEG that is non-phase-locked, so I
> would restate your equation to:
> induced = EEG - evoked.
>
> However, there is a drawback to this approach, since it assumes that the ERP
> is absolutely stationary over trials. This is not the case in reality (e.g.
> subjects' attentional level or other states may change from trial to trial,
> giving rise to variability in the single-trial ERPs). This means that by
> subtracting the average ERP, one may introduce frequency components in the
> residual EEG that were not present before. Klimesch, and Kalcher and
> Pfurtscheller, have come up with ways of scaling the average ERP so as to
> yield a best fit of the average with each single-trial ERP, but also that 
> approach may be sub-optimal.
> My latest way around the problem is to run a TF analysis on the untreated
> EEG (containing both evoked and induced activity), and comparing this to a
> TF analysis of the subject-averaged ERPs (the evoked activity alone).
> Qualitative differences between the two analyses can now only be attributed
> to induced activity.
>
> Marcel
>
> Thomas Thesen wrote:
>>
>> Hi FieldTrippers,
>>
>>
>>
>> Following up on this conversation. It seems that the ‘induced activity’
> contains both phase-locked and non-phase-locked activity, whereby the
> ‘evoked’ activity contains only phase-locked activity. Is it then kosher to
> separate these components by linear subtraction? For example, if we first
> compute the ‘induced’ activity by averaging power over individual trials,
> and from that subtract the ‘evoked activity’ (calculated based on average
> response) to get the induced activity without any phase-locked activity?
>>
>>
>>
>> So if
>>
>> Induced = Phase + Non-Phase
>>
>> And
>>
>> Evoked = Phase
>>
>> Then
>>
>> Non-Phase = Induced – Evoked
>>
>>
>>
>> Or does the fact that this is a linear operations on data that have been
> constructed through a non-linear process render this somehow invalid? It has
> certainly been done before. Your comments would be much appreciated.




________________________________________
From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Bobby Stojanoski [stojanoski at UTSC.UTORONTO.CA]
Sent: Thursday, March 25, 2010 1:33 PM
To: FIELDTRIP at NIC.SURFNET.NL
Subject: [FIELDTRIP] Induced activity

Dear Fieldtrippers,

I am a relatively new user of fieldtrip and am very impressed!

I am interested in comparing differences at certain frequencies – induced 40-100 Hz – between 2 experimental conditions.  My understanding was that I can calculate induced activity in the gamma range by calculating the power for each trial (subject average -- freqanalysis) and then averaging across subjects (grand average -- freqdescriptives/freqgrandaverage).

To my dismay, when I plotted the results of my grandaverage I found a band of power at 55 - 65 Hz for the entire duration of my epoch. I should add this was not the case when I plotted power across trials for each participant.

Earlier discussions mention computing induced+evoked (using freqanalysis and freqgrandaverage) and subtracting that from evoked (using timelockanalysis+freqanalysis) to get extract induced only activity. However, later posts suggest that this is not a valid approach.

1. Where have I made my mistake?

2. If ((induced+evoked)-evoked)) is not valid, what is the correct approach to calculating induced activity at 40 - 100 Hz?

Any help would be greatly appreciated!

Thank you
Bobby Stojanoski




----------------------------------

The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.

http://listserv.surfnet.nl/archives/fieldtrip.html

http://www.ru.nl/fcdonders/fieldtrip/

------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: induced v evoked
Type: application/octet-stream
Size: 7762 bytes
Desc: induced v evoked
URL: 

From twitzel at NMR.MGH.HARVARD.EDU  Tue Mar 30 19:24:16 2010
From: twitzel at NMR.MGH.HARVARD.EDU (Thomas Witzel)
Date: Tue, 30 Mar 2010 13:24:16 -0400
Subject: Induced activity
In-Reply-To: <0F47B6EFAC0110438AE026CEF86D445912EEEDA7B4@MSGWSDCPMB04.nyumc.org>
Message-ID: 

Hello all,

just my two cents late in this discussion, and I hope I'm not repeating
what someone else has just said. The way I and my code calculate induced
activity was that I would first average all trials to get an ERF, then
subtract the ERF from each individual trial, and then calculate the the
power. This can be done in complex domain (i.e. after some frequency
analysis as well) as long no non-linear operations have been applied.
I never really had any problems with this approach.
As for the point made by Bobby about the frequency band being strong
troughout the trial (even baseline), this makes sense as there is
presumably some variation during the baseline as well. To get the "nice"
picture, you need to represent the result relative to the baseline to show
change of power/magnitude relative to the baseline with whatever flavour
normalization you like....

Thomas

  On
Tue, 30 Mar 2010, Oakman, Erin wrote:

> Hello Bobby,
>
> Thanks for raising a very relevant question about the difference between induced and evoked activity !
>
> A good discussion of this can be found here, or attached as text
> https://listserv.surfnet.nl/scripts/wa.cgi?A3=ind0704&L=FIELDTRIP&E=quoted-printable&P=234745&B=--Apple-Mail-1--1050075873&T=text%2Fhtml;%20charset=WINDOWS-1252&XSS=3
>
> There is not a definite way to separate the induced and evoked activity.  The reason is that the sum of the squares is not the same as the square of the sum.
>
> In my very limited experience, I have noticed that researchers sometimes use the term "induced" or "event-related spectral perturbation" to refer to the average of the single-trials power, which has been base-line corrected .  At least that is the case in the "induced power" in this paper:   Krishnan, G. P., W.P. Hetrick, C.A. Brenner, A. Shekhar, A.N. Steffen and B.F. O'Donnell 2009. Steady state and induced auditory gamma deficits in schizophrenia. Neuroimage.
>
>
> Erin
>
>
>
> Hi
>>     A late follow-up to this topic. I have recentrly been musing over how to
>> get a "clean" measure of the non-phase locked activity. I have tried
>> subtracting the ERF out prior to time-frequency computation but this
>> produces quite a bit of artifact...presumably since the single trial data
>> will have considerable ;atency "jitter"
>
> The ERF collapses two sources of "jitter"; in the latency of the transient activity (if it exists) and the phase of ongoing oscillatory activity.
>
>>    The comments from Christian below make sense ( I think) why simply
>> subtracting the two time-frequency power representaions is not valid. But I
>> wonder would this subtractive approach be valid if one worked with the
>> magnitude of the signal rather than power..omitting all the squaring operations?
>
> Computing the magnitude is still a non-linear operation (square root of a sum of squares, rectification, whatever ... ). The problem for why this won't work either resides in averaging part: in the evoked case you have a linear average followed by a non-linear operation, and in the induced case you have an average of the non-linearly transformed quantity. The "catch phrase" here is: the sum of the squares is not the same as the square of the sum! (or the sum of the rectified data is not the same as the rectified sum)
>
> Hope this helps,
> Christian
>
>
>>   If this right theoretically, how to achieve this in Fieldtrip?. Would
>> setting cfg.output = 'fourier then abs'ing the output work. My suspicion is
>> no since the summing is being done first here. Alternatively, does one need
>> to hack the code to return the magnitude.
>>
>> Thanks for your help on this and sorry for waking old threads :)
>>
>>    - Suresh
>>
>> On Fri, 23 Feb 2007 01:44:59 +0100, Christian Hesse
>>  wrote:
>>
>>> One further comment (please see below):
>>>
>>>> Hi Thomas,
>>>>> Following up on this conversation. It seems that the ?induced
>>>>> activity? contains both phase-locked and non-phase-locked
>>>>> activity, whereby the ?evoked? activity contains only phase-locked
>>>>> activity. Is it then kosher to separate these components by linear
>>>>> subtraction? For example, if we first compute the ?induced?
>>>>> activity by averaging power over individual trials, and from that
>>>>> subtract the ?evoked activity? (calculated based on average
>>>>> response) to get the induced activity without any phase-locked
>>>>> activity?
>>>>
>>>> It is not correct to subtract because computing the induced and
>>>> evoked power spectra involves squaring signal amplitudes (a non-
>>>> linear operation), and hence, taking your terminology to refer to
>>>> the instantaneous amplitudes of the signal components (this applies
>>>> to any time-frequency tile)
>>>>> Induced = Phase + Non-Phase
>>>>>
>>>>> And
>>>>>
>>>>> Evoked = Phase
>>>>>
>>>>> Then
>>>>>
>>>>> Non-Phase = Induced ? Evoked
>>>>>
>>>>>
>>>> what you actually get from spectral or time-frequency analysis is
>>>> the power of your MEASURED signal
>>>>
>>>> Induced^2 = (Phase + Non-Phase)^2 = Phase^2 + 2*Phase*Non-Phase +
>>>> Non-Phase^2
>>>>
>>>> Evoked^2 = Phase^2
>>>>
>>>> Then
>>>>
>>>> Induced^2 - Evoked^2 = 2*Phase*Non-Phase + Non-Phase^2  AND NOT Non-
>>>> Phase^2
>>>>
>>> Note that the other crucial thing to consider here is that you are in
>>> one case averaging power over trials over trials:
>>>
>>> E[ (Induced^2)  ] =  E[ (Phase + Non-Phase)^2 ] = E[ (Phase^2 +
>>> 2*Phase*Non-Phase + Non-Phase^2) ] = E[ (Phase^2) ] E[ (Non-
>>> Phase^2) ] + E[ 2*Phase*Non-Phase ]
>>>
>>> this is why taking the square root of sqrt(Induced^2) does not give
>>> (Phase + Non-Phase) but sqrt(E[ (Phase+Non-Phase)^2 ]).
>>>
>>> in the evoked case you are taking the power of the average amplitude
>>>
>>> Evoked^2 = E[ Phase ]^2  (---> note the ^2 on the outside of the sum)
>>>
>>> so in subtracting you are actually assuming that E[Phase]^2 = E
>>> [(Phase)^2] which is unlikely to be accurate the case in finite samples.
>>>
>>> Hope I have not confused others (or myself) here.
>>> Christian
>>>
>>>
>
>
>>
>> This is indeed the approach that I have followed succesfully a couple of
>> times (e.g. Bastiaansen et al., JOCN 2006), although the terminology that
>> you are using is somewhat confusing. I (and I guess most people) would refer
>> to induced activity as that part of the EEG that is non-phase-locked, so I
>> would restate your equation to:
>> induced = EEG - evoked.
>>
>> However, there is a drawback to this approach, since it assumes that the ERP
>> is absolutely stationary over trials. This is not the case in reality (e.g.
>> subjects' attentional level or other states may change from trial to trial,
>> giving rise to variability in the single-trial ERPs). This means that by
>> subtracting the average ERP, one may introduce frequency components in the
>> residual EEG that were not present before. Klimesch, and Kalcher and
>> Pfurtscheller, have come up with ways of scaling the average ERP so as to
>> yield a best fit of the average with each single-trial ERP, but also that
>> approach may be sub-optimal.
>> My latest way around the problem is to run a TF analysis on the untreated
>> EEG (containing both evoked and induced activity), and comparing this to a
>> TF analysis of the subject-averaged ERPs (the evoked activity alone).
>> Qualitative differences between the two analyses can now only be attributed
>> to induced activity.
>>
>> Marcel
>>
>> Thomas Thesen wrote:
>>>
>>> Hi FieldTrippers,
>>>
>>>
>>>
>>> Following up on this conversation. It seems that the ?induced activity?
>> contains both phase-locked and non-phase-locked activity, whereby the
>> ?evoked? activity contains only phase-locked activity. Is it then kosher to
>> separate these components by linear subtraction? For example, if we first
>> compute the ?induced? activity by averaging power over individual trials,
>> and from that subtract the ?evoked activity? (calculated based on average
>> response) to get the induced activity without any phase-locked activity?
>>>
>>>
>>>
>>> So if
>>>
>>> Induced = Phase + Non-Phase
>>>
>>> And
>>>
>>> Evoked = Phase
>>>
>>> Then
>>>
>>> Non-Phase = Induced ? Evoked
>>>
>>>
>>>
>>> Or does the fact that this is a linear operations on data that have been
>> constructed through a non-linear process render this somehow invalid? It has
>> certainly been done before. Your comments would be much appreciated.
>
>
>
>
> ________________________________________
> From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Bobby Stojanoski [stojanoski at UTSC.UTORONTO.CA]
> Sent: Thursday, March 25, 2010 1:33 PM
> To: FIELDTRIP at NIC.SURFNET.NL
> Subject: [FIELDTRIP] Induced activity
>
> Dear Fieldtrippers,
>
> I am a relatively new user of fieldtrip and am very impressed!
>
> I am interested in comparing differences at certain frequencies ? induced 40-100 Hz ? between 2 experimental conditions.  My understanding was that I can calculate induced activity in the gamma range by calculating the power for each trial (subject average -- freqanalysis) and then averaging across subjects (grand average -- freqdescriptives/freqgrandaverage).
>
> To my dismay, when I plotted the results of my grandaverage I found a band of power at 55 - 65 Hz for the entire duration of my epoch. I should add this was not the case when I plotted power across trials for each participant.
>
> Earlier discussions mention computing induced+evoked (using freqanalysis and freqgrandaverage) and subtracting that from evoked (using timelockanalysis+freqanalysis) to get extract induced only activity. However, later posts suggest that this is not a valid approach.
>
> 1. Where have I made my mistake?
>
> 2. If ((induced+evoked)-evoked)) is not valid, what is the correct approach to calculating induced activity at 40 - 100 Hz?
>
> Any help would be greatly appreciated!
>
> Thank you
> Bobby Stojanoski
>
>
>
>
> ----------------------------------
>
> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.
>
> http://listserv.surfnet.nl/archives/fieldtrip.html
>
> http://www.ru.nl/fcdonders/fieldtrip/
>
> 
> > > ------------------------------------------------------------
> This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
> ================================= > > >
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From karl.doron at GMAIL.COM  Wed Mar 31 01:02:12 2010
From: karl.doron at GMAIL.COM (Karl Doron)
Date: Wed, 31 Mar 2010 01:02:12 +0200
Subject: ft_preprocessing for bandpass and hilbert
Message-ID: 

Hello,

I would be grateful for some advice on a couple of processing pipeline
questions.

1. I'm wondering if I need two calls to ft_preprocessing() --with one for
bandpass filtering and then another for a hilbert transform to get the
complex values.

2. Is the cfg.padding applied here separate from that specified during
artifact rejection, i.e., cfg.artfctdef.xxx.fltpadding?


Thanks,
karl doron

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From muthuraman10 at HOTMAIL.COM  Wed Mar 31 16:03:07 2010
From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman)
Date: Wed, 31 Mar 2010 14:03:07 +0000
Subject: DICS on Frequency bands!
Message-ID: 


Hello Fieldtrippers,

 

In order to do the source analysis DICS on a band of frequencies. For example the beta band (15-30 Hz), the source analysis need to repeated for each frequency and grandaverage need to be done for all these frequencies. Or is there a way to do for the whole frequency band?

 

Thanking you 

 

With regards,

M.Muthuraman.
 		 	   		  
_________________________________________________________________
Fight for the top Test spot
http://sports.in.msn.com/cricket/ 
----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From michael.wibral at WEB.DE  Wed Mar 31 22:49:18 2010
From: michael.wibral at WEB.DE (Michael Wibral)
Date: Wed, 31 Mar 2010 22:49:18 +0200
Subject: DICS on Frequency bands!
In-Reply-To: 
Message-ID: 

An HTML attachment was scrubbed...
URL: 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 628 bytes
Desc: not available
URL: 

From r.vandermeij at DONDERS.RU.NL  Mon Mar  1 10:19:22 2010
From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij)
Date: Mon, 1 Mar 2010 10:19:22 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: 
Message-ID: 

Hi Chetan,

We noticed this bug a short time ago, the don't-cluster-over-channels
option is not catched correctly at the moment.
For now, you should be safe if you just change the piece of code you
quoted to (so, just removing the rest):

/channeighbstructmat = makechanneighbstructmat(cfg);/
/ issource = 0;/

This should produce the correct output in your case, and the clustering
should work as intended.

Kind regards,
Roemer van der Meij


On 2/27/2010 8:15 AM, Chetan Sharma wrote:
> Hello everyone,
>
> I'm trying to run the coherence Z nonparametric test to detect
> synchrony between two channels of MEG data. Because of how restrictive
> bonferoni, FDR, and all are, we wanted to use the 'cluster' function
> for cfg.correctm. This call to statistics_montecarlo.m, which says in
> the description that to do clustering in frequency and time, as we
> want to do, we should use an empty cfg.neighbours structure. However,
> when the function calls clusterstats.m, it looks like there is a bug
> in the code. The relevant code is at line 38 in clusterstats.m, and is:
>
> if isfield(cfg, 'neighbours') && ~isempty(cfg.neighbours)
>   channeighbstructmat = makechanneighbstructmat(cfg);
>   issource = 0;
> else
>   issource = 1;
>   % cfg contains dim and inside that are needed for reshaping the data
> to a volume, and inside should behave as a index vector
>   cfg = fixinside(cfg, 'index');
> end
>
> The issue is that the case for an empty cfg.neighbours isn't handled.
> Running the function with an empty cfg.neighbours leads to a bug when
> calculating the clusters, and makes issource=1, when it should be zero
> for freq_time data. The function runs through when I manually set
> issource=0, but I don't know if that is the intended purpose.
>
> Has anyone else run into this problem? Without an example of what
> cfg.neighbours should look like, it's hard to determine if we are
> doing a correct setup. Could someone either send an example of
> cfg.neighbours, or verify this bug and suggest solutions?
>
> thanks and regards,
> -chetan
>
> ----------------------------------
>
> The aim of this list is to facilitate the discussion between users of
> the FieldTrip toolbox, to share experiences and to discuss new ideas
> for MEG and EEG analysis.
>
> http://listserv.surfnet.nl/archives/fieldtrip.html
>
> http://www.ru.nl/fcdonders/fieldtrip/
>

--
Roemer van der Meij MSc
Scientific Programmer&  Data-Analyst
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognition
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
Tel: +31(0)24 3612631
E-mail: r.vandermeij at donders.ru.nl


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK  Wed Mar  3 14:44:23 2010
From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith)
Date: Wed, 3 Mar 2010 13:44:23 +0000
Subject: some small modifications to singleplotER
Message-ID: 

Hi

I have been fiddling about with the singleplotER function a little bit
to try and make it better suited to my needs. I have made a couple of
minor modifications which i think would be useful.

Firstly, in interactive mode, I have added support for doing topoplots
when multiple datasets are have been plotted. I have also added a way of
converting the singleplotER's cfg.maskparamater into highlighted sensors
in the topoplot.

Secondly, I added a little extra bit for plotting the standard error
around the ERPs. It calculates standard error from the data.var field
and then plots it around the ERP as an area plot. This can be turned on
using: 'cfg.plotstderr = 'yes'. I have added an example of what this
looks like with 2 ERPs. It can look a little busy if plotting more than
3 ERPs on the same plot.

I'd be happy for these modifications to be included in fieldtrip release
and if any one has any suggestions for improving them i would welcome
them. I've labelled all my additions as 'MD MODIFIED'.

Many thanks

Mark

--

Mark Drakesmith
PhD Student

Neuroscience and Aphasia Research Unit (NARU)
University of Manchester


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: erp_with_stderr.jpg
Type: image/jpeg
Size: 55743 bytes
Desc: not available
URL: 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: singleplotER.m
URL: 

From ronitibon at GMAIL.COM  Wed Mar  3 14:33:22 2010
From: ronitibon at GMAIL.COM (Roni Tibon)
Date: Wed, 3 Mar 2010 14:33:22 +0100
Subject: A typo in the biosemi64.lay file
Message-ID: 

Hi all,

I want to report a problem in the biosemi64.lay file: the AFz channel
(number 37) appears in the file as Afz (with lower case 'f'). 

This, of course, leads to problems with topoplots etc. 

Roni

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK  Wed Mar  3 15:17:12 2010
From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith)
Date: Wed, 3 Mar 2010 14:17:12 +0000
Subject: bug using planarcombine and with planar 4d/bti data
Message-ID: 

Hi

There seems to be a small bug with using using planarcombine with 4D/BTI
data after using megplanar. It reports the gradiometer type to be
'bti248' instead of 'bti248_planar' which it should be. The problem is
with senstype function, where it puills the definitions from .hdr.grad
substructure first instead of .grad substrutre (line 109) which is the
one that  has the planar-transofrmed definitions.

I just swapped the order inwhich the function looks for gradiometer
definitions so that it looks in .grad first instead of .hdr.grad. It now
correctly reports the gadiometer type as 'bti248_planar'.

Many thanks


Mark

Mark Drakesmith
PhD Student

Neuroscience and Aphasia Research Unit (NARU)
University of Manchester

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From lucie.charles.ens at GOOGLEMAIL.COM  Wed Mar  3 15:16:51 2010
From: lucie.charles.ens at GOOGLEMAIL.COM (Lucie Charles)
Date: Wed, 3 Mar 2010 15:16:51 +0100
Subject: Label display problem with ft_topoplotER for EEG-MEG data
Message-ID: 

Hi everyone ,

I noticed a small bug using ft_topoplotER with my EEG-MEG data that I think
I managed to correct.

When I try to use the option :

*cfg.highlight = ' labels '
*or *
cfg.marker  = ' labels '*

I have an error message saying that it doesn't find coordinates for some
labels (see at the end for the entire message). I looked into it and it
seems that EEG channels are always in the list of channels that the function
tries to plot even if I'm trying to plot only magnetometers for example.

I made two small changes at the ft_topoplotER and it seems to solve the
problem :

*line 606 >  templay.label      =  data.label(labelindex);
*instead of
*templay.label      =  **channelselection(cfg.highlightchannel{icell},
data.label);*

*line 631 >  templay.label    = data.label(labelindex); *
instead of  *
templay.label    =
channelselection(setdiff(1:length(data.label),highlightchansel),
data.label);

*This solution works fine for me but I'm not sure that it will work in any
case.*
*
Still I hope it helps.

Cheers,

Lucie CHARLES



Error Message :

*??? Error using ==> text
Each string specified must have a corresponding set of coordinates

Error in ==> plot_lay at 73
  text(X+labeloffset, Y+(labeloffset*1.5), Lbl,'fontsize',labelsize);

Error in ==> ft_topoplotER at 617
    plot_lay(templay,'box','no','label',labelflg,'point','yes',...

Error in ==> topoplotER at 17
[varargout{1:nargout}] = funhandle(varargin{:});*

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From jan.schoffelen at DONDERS.RU.NL  Wed Mar  3 15:32:52 2010
From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen)
Date: Wed, 3 Mar 2010 15:32:52 +0100
Subject: bug using planarcombine and with planar 4d/bti data
In-Reply-To: <4B8E6F68.5090602@postgrad.manchester.ac.uk>
Message-ID: 

Dear Mark,

Thanks for the suggestion. I was wondering whether you are using an up-
to-date version of fieldtrip, because I looked up the log of senstype
and as far as I can see this issue has been resolved a while ago. I
must confess that I have not recently encountered your reported issue
on my own bti-data.

Best

Jan-Mathijs


On Mar 3, 2010, at 3:17 PM, Mark Drakesmith wrote:

> Hi
>
> There seems to be a small bug with using using planarcombine with 4D/
> BTI data after using megplanar. It reports the gradiometer type to
> be 'bti248' instead of 'bti248_planar' which it should be. The
> problem is with senstype function, where it puills the definitions
> from .hdr.grad substructure first instead of .grad substrutre (line
> 109) which is the one that  has the planar-transofrmed definitions.
>
> I just swapped the order inwhich the function looks for gradiometer
> definitions so that it looks in .grad first instead of .hdr.grad. It
> now correctly reports the gadiometer type as 'bti248_planar'.
>
> Many thanks
>
>
> Mark
>
> Mark Drakesmith
> PhD Student
>
> Neuroscience and Aphasia Research Unit (NARU)
> University of Manchester
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users
> of the FieldTrip  toolbox, to share experiences and to discuss new
> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html
>  and http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From maess at CBS.MPG.DE  Wed Mar  3 15:40:29 2010
From: maess at CBS.MPG.DE (Burkhard Maess)
Date: Wed, 3 Mar 2010 15:40:29 +0100
Subject: Summer School on Multimodal Approaches in Neuroscience, Leipzig,
 Germany, July 19 - 21, 2010
In-Reply-To: <16025891.1164171267627150012.JavaMail.root@zimbra>
Message-ID: 

Dear fieldtrip community,

sorry for advertising - On behalf of Bob Turner I would like to invite interested PhD students to come to Leipzig this summer.
Best wishes,
Burkhard

........................................................................

Dear colleagues,

*International Summer School on Multimodal Approaches in Neuroscience*
Leipzig, Germany, July 19 - 21, 2010

Keynote Lecturers:



19th July: Multimodal Methods

    * Prof. Stefan Debener (University of Oldenburg, Germany)
    * Prof. Vincent Walsh (University College London, UK)
    * Prof. Richard Buxton (University of California, San Diego, USA)


20th July: Multimodal Structures

    * Prof. Dr. Jon Kaas (Vanderbilt University, USA)
    * Prof. Dr Simon Eickhoff (RWTH Aachen University and Research
      Center Juelich, Germany)
    * Dr. Saad Jbabdi (University of Oxford, UK)


21st July: Multimodal Functions

    * Prof. Guy Orban (Catholic University of Leuven, Belgium)
    * Prof. Luciano Fadiga (University of Ferrara & Italian Institute of
      Technology, Genova, Italy)
    * Prof. Asif Ghazanfar (Princeton University, USA)


Please circulate this announcement among your colleagues, your graduate students, and any interested researchers.

For more details please see http://imprs-neurocom.mpg.de/summerschool.

There is no registration fee for the summer school.

Target group: Graduate students interested in any of the disciplines comprising cognitive neuroscience

Course dates:
July 19 - 21, 2010

Location:
Max Planck Institute for Human Cognitive and Brain Sciences
Stephanstrasse 1a
04103 Leipzig, Germany

Working language: English

Registration deadline: April 30, 2010
Online registration: http://imprs-neurocom.mpg.de/summerschool/apply

Space is limited: early registration will avoid disappointment.

Best regards,

Bob Turner
Head, *International Max Planck Research School (IMPRS) "Neuroscience of Communication: Function, Structure, and Plasticity"*

--
Professor Robert Turner
Director, Department of Neurophysics
Max-Planck-Institute for Human Cognitive and Brain Sciences
Stephanstrasse 1A
04103 Leipzig
Germany

Tel: +49 341 9940-2242
Fax: +49 341 9940-2448
Email: turner at cbs.mpg.de
www.cbs.mpg.de



..............................................

Dr. Burkhard Maess
Max Planck Institute for Human Cognitive and Brain Sciences
Stephanstr. 1a, P.O. Box 500355, D-04303 Leipzig
Aussenstelle Bennewitz, phone/fax: +49(3425)8875-2526/-2511   mail: maess 'at' cbs.mpg.de,           http://www.cbs.mpg.de

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From karl.doron at GMAIL.COM  Thu Mar  4 10:52:05 2010
From: karl.doron at GMAIL.COM (Karl Doron)
Date: Thu, 4 Mar 2010 10:52:05 +0100
Subject: custom trialfun/begin sample problem
Message-ID: 

Hello,

I'm running a modified version of your custom trialfun script. Because I
have 'triggers' on data(1,N) and 'responses' on data(2,N), I simply did this:

% search for all "trigger" and "response" events
value  = [event.value]';

sample = [event.sample]';

% determine the number of samples before and after the trigger
pretrig  = -cfg.trialdef.prestim  * hdr.Fs; %0.5
posttrig =  cfg.trialdef.poststim * hdr.Fs; %3.5


Then I'm looking for value(j)==62 followed by value(j+1)==112, followed by
response value(j+2)==1024. All this seems to work fine. However, after
running definetrial, my first trial in cfg.trl begins with a negative
number, equal to the offset of 254.xx samples. 

However, in cfg.event, the first "62" trigger begins at sample 35557, not at
sample 1. This isn't happening in any of my other trialfun scripts.

Thank you for any help!

Karl Doron
PhD Candidate
UC, Santa Barbara

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From aostendorf at BESA.DE  Thu Mar  4 11:27:33 2010
From: aostendorf at BESA.DE (Andrea Ostendorf)
Date: Thu, 4 Mar 2010 11:27:33 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: <4B8B869A.8070704@donders.ru.nl>
Message-ID: 

Dear Roemer,

regarding your reply to Chetan's question / observation: Can I ask you
whether what I currently do is correct?
I have got time-frequency data, which I sometimes want to cluster over
channels or not. So I do the following

o) do the modification you recommended to Chetan
      channeighbstructmat = makechanneighbstructmat(cfg);
  	issource = 0;
	(commented out the surrounding lines)
o) edit cfg.channel
o) if clustering over channels is desired:
	edit cfg.neighbourdist and cfg.minnbchan
   else (no clustering over channels or if channels are averaged):
	cfg.neighbours = {}

This works and there is a marked difference whether I cluster over channels
or not.
I am just not sure whether it is correct.
Thanks a lot for your help so far!

All the best
Andrea

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From karl.doron at GMAIL.COM  Thu Mar  4 11:31:33 2010
From: karl.doron at GMAIL.COM (Karl Doron)
Date: Thu, 4 Mar 2010 11:31:33 +0100
Subject: custom trialfun/begin sample problem
Message-ID: 

Hello,

I was able to answer my own question. event.type at sample 1 was of type
'trial' but didn't have a value (value=[]).

After read_event() in my trialfun, I added event(1,1).value=1;

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From r.vandermeij at DONDERS.RU.NL  Thu Mar  4 15:00:59 2010
From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij)
Date: Thu, 4 Mar 2010 15:00:59 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: 
Message-ID: 

Hi Andrea,

For a quick work-around the first bullet-point should work out fine, I
don't know why you want to edit cfg.channel though.
However, if you /do/ want to cluster over channels it is necessary to
specify a neighbourhood structure, see ft_neighbourselection for how to
do that. The neighbourhood structure you create by doing this should be
placed in cfg.neighbours. The result could be the same if you edit the
cfg options in the subfunction clusterstat though, but I haven't used
those fields directly.

Hope this helps,
Kind regards,
Roemer



On 3/4/2010 11:27 AM, Andrea Ostendorf wrote:
> Dear Roemer,
>
> regarding your reply to Chetan's question / observation: Can I ask you
> whether what I currently do is correct?
> I have got time-frequency data, which I sometimes want to cluster over
> channels or not. So I do the following
>
> o) do the modification you recommended to Chetan
>        channeighbstructmat = makechanneighbstructmat(cfg);
>    	issource = 0;
> 	(commented out the surrounding lines)
> o) edit cfg.channel
> o) if clustering over channels is desired:
> 	edit cfg.neighbourdist and cfg.minnbchan
>     else (no clustering over channels or if channels are averaged):
> 	cfg.neighbours = {}
>
> This works and there is a marked difference whether I cluster over channels
> or not.
> I am just not sure whether it is correct.
> Thanks a lot for your help so far!
>
> All the best
> Andrea
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>

--
Roemer van der Meij MSc
Scientific Programmer&  Data-Analyst
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognition
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
Tel: +31(0)24 3612631
E-mail: r.vandermeij at donders.ru.nl


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From aostendorf at BESA.DE  Thu Mar  4 15:13:38 2010
From: aostendorf at BESA.DE (Andrea Ostendorf)
Date: Thu, 4 Mar 2010 15:13:38 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: <4B8FBD1B.9050809@donders.ru.nl>
Message-ID: 

Dear Roemer,

thanks. Yes, this helps.

>I don't know why you want to edit cfg.channel though.

Sorry, I just meant that I have to specify the channels which I want to send
to ft_freqstatistics.

All the best
Andrea

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From chesharm at STANFORD.EDU  Thu Mar  4 16:51:03 2010
From: chesharm at STANFORD.EDU (Chetan Sharma)
Date: Thu, 4 Mar 2010 07:51:03 -0800
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: <0BB62A997A9349ECAFC51985354DB86A@LAT6500Andrea>
Message-ID: 

I am still running into bugs when doing the freq_time clustering. I am
testing for coherence between the hemispheres during a task, and now it runs
into problems at clusterstat() at line 175. The command is:

posclusobs = findcluster(reshape(postailobs,
      [cfg.dim,1]),channeighbstructmat,cfg.minnbchan);

The problem is that postailobs has size [nfreq*ntime, 1], while the cfg.dim
is [nchan nfreq ntime], where nchan=2 in this case. It seems like it wants
to reshape it into size [nfreq, ntime, 1]. Is this indeed the case?

And could someone help me out by explaining a bit more about when one would
choose for cfg.clusterthreshold the different values,
'nonparametric_common', 'nonparametric_individual', and 'parametric' when
testing for coherence in different brain areas? I have read over the
documentation and the code but am still somewhat unsure.

Thank you for the help,
-chetan

On Thu, Mar 4, 2010 at 6:13 AM, Andrea Ostendorf  wrote:

> Dear Roemer,
>
> thanks. Yes, this helps.
>
> >I don't know why you want to edit cfg.channel though.
>
> Sorry, I just meant that I have to specify the channels which I want to
> send
> to ft_freqstatistics.
>
> All the best
> Andrea
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From chesharm at STANFORD.EDU  Thu Mar  4 17:15:31 2010
From: chesharm at STANFORD.EDU (Chetan Sharma)
Date: Thu, 4 Mar 2010 08:15:31 -0800
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: 
Message-ID: 

And also, what should the channeighbstructmat look like when doing freq_time
clustering? When I do the fix mentioned above, it returns a 2x2 matrix of
zeros, which causes problems in findcluster(). I've read over the
neighbourselection(), but it doesn't give any clues for freq_time
clustering.

On Thu, Mar 4, 2010 at 7:51 AM, Chetan Sharma  wrote:

> I am still running into bugs when doing the freq_time clustering. I am
> testing for coherence between the hemispheres during a task, and now it runs
> into problems at clusterstat() at line 175. The command is:
>
> posclusobs = findcluster(reshape(postailobs,
>       [cfg.dim,1]),channeighbstructmat,cfg.minnbchan);
>
> The problem is that postailobs has size [nfreq*ntime, 1], while the cfg.dim
> is [nchan nfreq ntime], where nchan=2 in this case. It seems like it wants
> to reshape it into size [nfreq, ntime, 1]. Is this indeed the case?
>
> And could someone help me out by explaining a bit more about when one would
> choose for cfg.clusterthreshold the different values,
> 'nonparametric_common', 'nonparametric_individual', and 'parametric' when
> testing for coherence in different brain areas? I have read over the
> documentation and the code but am still somewhat unsure.
>
> Thank you for the help,
> -chetan
>
>
> On Thu, Mar 4, 2010 at 6:13 AM, Andrea Ostendorf wrote:
>
>> Dear Roemer,
>>
>> thanks. Yes, this helps.
>>
>> >I don't know why you want to edit cfg.channel though.
>>
>> Sorry, I just meant that I have to specify the channels which I want to
>> send
>> to ft_freqstatistics.
>>
>> All the best
>> Andrea
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the
>> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>> and EEG analysis. See also
>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>> http://www.ru.nl/neuroimaging/fieldtrip.
>>
>
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK  Thu Mar  4 21:23:45 2010
From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith)
Date: Thu, 4 Mar 2010 20:23:45 +0000
Subject: bug using planarcombine and with planar 4d/bti data
In-Reply-To: <801C1274-810A-428E-8F27-1484CEB1FC11@donders.ru.nl>
Message-ID: 

Hi.

thanks for letting me know. I had updsated my fieldtrip quite recently
but i think this file didnt get updated for some reason. I've done
another update and the issue is now resolved for good.

Thanks
Mark


> Dear Mark,
>
> Thanks for the suggestion. I was wondering whether you are using an
> up-to-date version of fieldtrip, because I looked up the log of
> senstype and as far as I can see this issue has been resolved a while
> ago. I must confess that I have not recently encountered your reported
> issue on my own bti-data.
>
> Best
>
> Jan-Mathijs
>
>
> On Mar 3, 2010, at 3:17 PM, Mark Drakesmith wrote:
>
>> Hi
>>
>> There seems to be a small bug with using using planarcombine with
>> 4D/BTI data after using megplanar. It reports the gradiometer type to
>> be 'bti248' instead of 'bti248_planar' which it should be. The
>> problem is with senstype function, where it puills the definitions
>> from .hdr.grad substructure first instead of .grad substrutre (line
>> 109) which is the one that  has the planar-transofrmed definitions.
>>
>> I just swapped the order inwhich the function looks for gradiometer
>> definitions so that it looks in .grad first instead of .hdr.grad. It
>> now correctly reports the gadiometer type as 'bti248_planar'.
>>
>> Many thanks
>>
>>
>> Mark
>>
>> Mark Drakesmith
>> PhD Student
>>
>> Neuroscience and Aphasia Research Unit (NARU)
>> University of Manchester
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of
>> the FieldTrip  toolbox, to share experiences and to discuss new ideas
>> for MEG and EEG analysis. See also
>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>> http://www.ru.nl/neuroimaging/fieldtrip.
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of
> the FieldTrip  toolbox, to share experiences and to discuss new ideas
> for MEG and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.


--

Mark Drakesmith
PhD Student

Neuroscience and Aphasia Research Unit (NARU)
University of Manchester

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK  Thu Mar  4 23:02:58 2010
From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith)
Date: Thu, 4 Mar 2010 22:02:58 +0000
Subject: quiestions about planar transformation
Message-ID: 

Hi all

I am currently a little confused as to how to properly use megplanar and
combineplanar for my 4D 148 axial gadiometer data. I would ideally like
to use planar gradients as it will make subsequent ERF and frequency
analysis easier to interpret. My question is when should I combine the v
and h components?

Looking  at some previous posts it is suggested that you should combine
the gradients on an individual basis, but when I do this i get an almost
flat amplitude across all sensors which doesn't look right (see attached
image, 'bad_planar'). When i use combineplanar after averaging, the data
the data looks ok (good_planar). I get the same result doing both
megplanar and combineplanar on the averaged data.

I just want to double check that the 'bad' planar fields i am getting
are correct and not due to a bug in field trip. Intuitively, I would
expect combining the components on the individual level world be more
accurate as it would prevent fields from opposeingly orientated dipoles
cancelling out when averaged.

If it is the case that you should use combineplanar after trial
averaging, how do you go about combining after statistical tests? i.e.
when you have a p-value or a test statistic for the v and h components
for each sensor, how would you combine these together?

Any help or advice would be appreciated.

Many thanks

Mark

--

Mark Drakesmith
PhD Student

Neuroscience and Aphasia Research Unit (NARU)
University of Manchester


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bad_planar.png
Type: image/png
Size: 18840 bytes
Desc: not available
URL: 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: good_planar.png
Type: image/png
Size: 26461 bytes
Desc: not available
URL: 

From jan.schoffelen at DONDERS.RU.NL  Fri Mar  5 11:12:03 2010
From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen)
Date: Fri, 5 Mar 2010 11:12:03 +0100
Subject: quiestions about planar transformation
In-Reply-To: <4B902E12.7080405@postgrad.manchester.ac.uk>
Message-ID: 

Dear Mark,

There may be some confusion here, relating to whether we are talking
about frequency domain data (=power, always a positive value), or
whether we are talking about time domain data (=amplitude, can be
positive and negative).

Single trial combination of planar gradient transformed axial gradient
(or magnetometer) data is not the best thing to do for time domain
stuff.
Reason: combination takes place by applying Pythagoras' rule to the
_dV and _dH pairs, and when the individual _dH and _dV components are
noisy, the noise is also squared, added, and squar-rooted, which leads
to an 'amplification' of noise. Not good. It works after trial-
averaging because you squeeze out the noise first and Pythagoras the
reduced-noise signals.

For frequency domain data this is not an issue.
Reason: combination usually takes place by just adding the _dV and _dH
pairs (power is a squared value already). This is just a linear step
(just like averaging) and the order of performing the linear steps
does not matter for the result. So single trial combination prior to
averaging or vice versa should not make a difference here.

In general I would advise against trying to do statistics on the
combined planar gradient and use it for visualization purposes only.
Alternatively, one could come up with a non-parametric statistical
test (permutation), in which I could think of a way of extracting a p-
value from a single _dH/_dV pair combined. But this would be a
different story...

Best,

Jan-Mathijs


> Hi all
>
> I am currently a little confused as to how to properly use megplanar
> and combineplanar for my 4D 148 axial gadiometer data. I would
> ideally like to use planar gradients as it will make subsequent ERF
> and frequency analysis easier to interpret. My question is when
> should I combine the v and h components?
>
> Looking  at some previous posts it is suggested that you should
> combine the gradients on an individual basis, but when I do this i
> get an almost flat amplitude across all sensors which doesn't look
> right (see attached image, 'bad_planar'). When i use combineplanar
> after averaging, the data the data looks ok (good_planar). I get the
> same result doing both megplanar and combineplanar on the averaged
> data.
>
> I just want to double check that the 'bad' planar fields i am
> getting are correct and not due to a bug in field trip. Intuitively,
> I would expect combining the components on the individual level
> world be more accurate as it would prevent fields from opposeingly
> orientated dipoles cancelling out when averaged.
>
> If it is the case that you should use combineplanar after trial
> averaging, how do you go about combining after statistical tests?
> i.e. when you have a p-value or a test statistic for the v and h
> components for each sensor, how would you combine these together?
>
> Any help or advice would be appreciated.
>
> Many thanks
>
> Mark

Dr. J.M. (Jan-Mathijs) Schoffelen
Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
Telephone: 0031-24-3668063

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From michael.wibral at WEB.DE  Fri Mar  5 11:40:23 2010
From: michael.wibral at WEB.DE (Michael Wibral)
Date: Fri, 5 Mar 2010 11:40:23 +0100
Subject: quiestions about planar transformation
In-Reply-To: <9A2631B3-A19C-4CF4-A473-F0316F441C9F@donders.ru.nl>
Message-ID: 

Dear Mark, dear Jan-Mathijs,

I fully agree with JM on not doing statistics (or even averaging) on the planar (absolute) gradient values when working in the time domain. What I resorted to is doing all statistics on fields and presenting that. I addition I supply the planar gradient of the final raw (field) effect underlying the statistics - solely on a desriptive level.

The fundamental underlying problem is that you go from a scalar field and massively paralellel univariate statistics to a vector field and, hence, truly multivariate statistics (e.g. because the local gradient vectors will rotate across the course of an ERP/ERF for example). Coming up with a p-value there sounds difficult to me. I always wondered how people with planar gradiometer devices solve that issue when doing time-domain stuff? Maybe there are solutions out there already?

Michael

-----Ursprüngliche Nachricht-----
Von: jan-mathijs schoffelen 
Gesendet: Mar 5, 2010 11:12:03 AM
An: FIELDTRIP at NIC.SURFNET.NL
Betreff: Re: [FIELDTRIP] quiestions about planar transformation

>Dear Mark,
>
>There may be some confusion here, relating to whether we are talking  
>about frequency domain data (=power, always a positive value), or  
>whether we are talking about time domain data (=amplitude, can be  
>positive and negative).
>
>Single trial combination of planar gradient transformed axial gradient  
>(or magnetometer) data is not the best thing to do for time domain  
>stuff.
>Reason: combination takes place by applying Pythagoras' rule to the  
>_dV and _dH pairs, and when the individual _dH and _dV components are  
>noisy, the noise is also squared, added, and squar-rooted, which leads  
>to an 'amplification' of noise. Not good. It works after trial- 
>averaging because you squeeze out the noise first and Pythagoras the  
>reduced-noise signals.
>
>For frequency domain data this is not an issue.
>Reason: combination usually takes place by just adding the _dV and _dH  
>pairs (power is a squared value already). This is just a linear step  
>(just like averaging) and the order of performing the linear steps  
>does not matter for the result. So single trial combination prior to  
>averaging or vice versa should not make a difference here.
>
>In general I would advise against trying to do statistics on the  
>combined planar gradient and use it for visualization purposes only.  
>Alternatively, one could come up with a non-parametric statistical  
>test (permutation), in which I could think of a way of extracting a p- 
>value from a single _dH/_dV pair combined. But this would be a  
>different story...
>
>Best,
>
>Jan-Mathijs
>
>
>> Hi all
>>
>> I am currently a little confused as to how to properly use megplanar  
>> and combineplanar for my 4D 148 axial gadiometer data. I would  
>> ideally like to use planar gradients as it will make subsequent ERF  
>> and frequency analysis easier to interpret. My question is when  
>> should I combine the v and h components?
>>
>> Looking  at some previous posts it is suggested that you should  
>> combine the gradients on an individual basis, but when I do this i  
>> get an almost flat amplitude across all sensors which doesn't look  
>> right (see attached image, 'bad_planar'). When i use combineplanar  
>> after averaging, the data the data looks ok (good_planar). I get the  
>> same result doing both megplanar and combineplanar on the averaged  
>> data.
>>
>> I just want to double check that the 'bad' planar fields i am  
>> getting are correct and not due to a bug in field trip. Intuitively,  
>> I would expect combining the components on the individual level  
>> world be more accurate as it would prevent fields from opposeingly  
>> orientated dipoles cancelling out when averaged.
>>
>> If it is the case that you should use combineplanar after trial  
>> averaging, how do you go about combining after statistical tests?  
>> i.e. when you have a p-value or a test statistic for the v and h  
>> components for each sensor, how would you combine these together?
>>
>> Any help or advice would be appreciated.
>>
>> Many thanks
>>
>> Mark
>
>Dr. J.M. (Jan-Mathijs) Schoffelen
>Donders Institute for Brain, Cognition and Behaviour,
>Centre for Cognitive Neuroimaging,
>Radboud University Nijmegen, The Netherlands
>J.Schoffelen at donders.ru.nl
>Telephone: 0031-24-3668063
>
>----------------------------------
>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 628 bytes
Desc: not available
URL: 

From aostendorf at BESA.DE  Fri Mar  5 12:27:00 2010
From: aostendorf at BESA.DE (Andrea Ostendorf)
Date: Fri, 5 Mar 2010 12:27:00 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: 
Message-ID: 

Dear Roemer,

Thanks for your advice.
Since I would like to use Fieldtrip for TFC data and for images, with an
additional cluster-over-channels option in the case of the TFC data, I now
edited clusterstat.
If called from a TFC script (I introduced a field in cfg for this), it uses
the correction you gave to Chetan, otherwise it uses the former code.
This appears to work and the results make sense. However, I ask myself
whether there is an option for managing this without editing any Fieldtrip
functions, just by cfg options?
Any help would be greatly appreciated.

Thanks!
All the best
Andrea


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK  Fri Mar  5 12:47:43 2010
From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith)
Date: Fri, 5 Mar 2010 11:47:43 +0000
Subject: quiestions about planar transformation
In-Reply-To: <8745792.274828.1267785623641.JavaMail.fmail@mwmweb056>
Message-ID: 

Hi

Thanks very much for your comments. I'll stick to using the axial
gradients for stats for now. I was just concerned about the issue with
dipoles in the same location but different orientations potentially
cancelling each other out when analysising the axial gradients.

  I suppose, if looking at within-subjects trials, if a set of dipoles
are  in the same location but showing large variability in orientation,
they should not be considered anymore significant than dipoles that have
different spatial locations. But between subjects, there is alot of
varaiblity in cortex topology which may lead to functionally-equivilent
dipoles haveing vastly different orientations.

I'm not sure how much this is worth worrying about. Do you ahve any
thoguhts on this?

Thanks again

Mark

> Dear Mark, dear Jan-Mathijs,
>
> I fully agree with JM on not doing statistics (or even averaging) on the planar (absolute) gradient values when working in the time domain. What I resorted to is doing all statistics on fields and presenting that. I addition I supply the planar gradient of the final raw (field) effect underlying the statistics - solely on a desriptive level.
>
> The fundamental underlying problem is that you go from a scalar field and massively paralellel univariate statistics to a vector field and, hence, truly multivariate statistics (e.g. because the local gradient vectors will rotate across the course of an ERP/ERF for example). Coming up with a p-value there sounds difficult to me. I always wondered how people with planar gradiometer devices solve that issue when doing time-domain stuff? Maybe there are solutions out there already?
>
> Michael
>
> -----Ursprüngliche Nachricht-----
> Von: jan-mathijs schoffelen
> Gesendet: Mar 5, 2010 11:12:03 AM
> An: FIELDTRIP at NIC.SURFNET.NL
> Betreff: Re: [FIELDTRIP] quiestions about planar transformation
>
>
>> Dear Mark,
>>
>> There may be some confusion here, relating to whether we are talking
>> about frequency domain data (=power, always a positive value), or
>> whether we are talking about time domain data (=amplitude, can be
>> positive and negative).
>>
>> Single trial combination of planar gradient transformed axial gradient
>> (or magnetometer) data is not the best thing to do for time domain
>> stuff.
>> Reason: combination takes place by applying Pythagoras' rule to the
>> _dV and _dH pairs, and when the individual _dH and _dV components are
>> noisy, the noise is also squared, added, and squar-rooted, which leads
>> to an 'amplification' of noise. Not good. It works after trial-
>> averaging because you squeeze out the noise first and Pythagoras the
>> reduced-noise signals.
>>
>> For frequency domain data this is not an issue.
>> Reason: combination usually takes place by just adding the _dV and _dH
>> pairs (power is a squared value already). This is just a linear step
>> (just like averaging) and the order of performing the linear steps
>> does not matter for the result. So single trial combination prior to
>> averaging or vice versa should not make a difference here.
>>
>> In general I would advise against trying to do statistics on the
>> combined planar gradient and use it for visualization purposes only.
>> Alternatively, one could come up with a non-parametric statistical
>> test (permutation), in which I could think of a way of extracting a p-
>> value from a single _dH/_dV pair combined. But this would be a
>> different story...
>>
>> Best,
>>
>> Jan-Mathijs
>>
>>
>>
>>> Hi all
>>>
>>> I am currently a little confused as to how to properly use megplanar
>>> and combineplanar for my 4D 148 axial gadiometer data. I would
>>> ideally like to use planar gradients as it will make subsequent ERF
>>> and frequency analysis easier to interpret. My question is when
>>> should I combine the v and h components?
>>>
>>> Looking  at some previous posts it is suggested that you should
>>> combine the gradients on an individual basis, but when I do this i
>>> get an almost flat amplitude across all sensors which doesn't look
>>> right (see attached image, 'bad_planar'). When i use combineplanar
>>> after averaging, the data the data looks ok (good_planar). I get the
>>> same result doing both megplanar and combineplanar on the averaged
>>> data.
>>>
>>> I just want to double check that the 'bad' planar fields i am
>>> getting are correct and not due to a bug in field trip. Intuitively,
>>> I would expect combining the components on the individual level
>>> world be more accurate as it would prevent fields from opposeingly
>>> orientated dipoles cancelling out when averaged.
>>>
>>> If it is the case that you should use combineplanar after trial
>>> averaging, how do you go about combining after statistical tests?
>>> i.e. when you have a p-value or a test statistic for the v and h
>>> components for each sensor, how would you combine these together?
>>>
>>> Any help or advice would be appreciated.
>>>
>>> Many thanks
>>>
>>> Mark
>>>
>> Dr. J.M. (Jan-Mathijs) Schoffelen
>> Donders Institute for Brain, Cognition and Behaviour,
>> Centre for Cognitive Neuroimaging,
>> Radboud University Nijmegen, The Netherlands
>> J.Schoffelen at donders.ru.nl
>> Telephone: 0031-24-3668063
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


--

Mark Drakesmith
PhD Student

Neuroscience and Aphasia Research Unit (NARU)
University of Manchester

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From michael.wibral at WEB.DE  Fri Mar  5 15:59:39 2010
From: michael.wibral at WEB.DE (Michael Wibral)
Date: Fri, 5 Mar 2010 15:59:39 +0100
Subject: Problem with Fieldtrip conversion
Message-ID: 

Dear FT/SPM Listusers,

I am having a (hopefully) trivial problem with converting Fieldtrip MEG data structures to spm8.
Here's what I did:

0. Patch spm8 to r3684
1. Load the Fieldtrip data from /path/filename. They contain a variable (FTstruct) named DataFT.
2. Call spm_eeg_ft2spm(DataFT, '/path/filename')

The error I get is: 

checkmeeg: no channel type, assigning default
checkmeeg: no units, assigning default
checkmeeg: transform type missing, assigning default
checkmeeg: data scale missing, assigning default

??? Undefined function or method 'fname' for input arguments of type 'struct'. 
Error in ==> file_array.subsref>access_fields at 129         case 'fname',      t = fname(obj);

Error in ==> file_array.subsref at 17         varargout = access_fields(obj,subs);

Error in ==> checkmeeg at 203     if ~isa(meegstruct.data.y, 'file_array') || isempty(fileparts(meegstruct.data.y.fname)) ...

Error in ==> meeg.meeg at 109         [OK D] = checkmeeg(varargin{1}, 'basic');

Error in ==> spm_eeg_ft2spm at 138 D = meeg(D);  

Any help is very much appreciated.

Michael

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 628 bytes
Desc: not available
URL: 

From v.litvak at ION.UCL.AC.UK  Fri Mar  5 16:17:49 2010
From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak)
Date: Fri, 5 Mar 2010 15:17:49 +0000
Subject: Problem with Fieldtrip conversion
In-Reply-To: <18953776.432346.1267801179379.JavaMail.fmail@mwmweb053>
Message-ID: 

Hi Michael,

I'm glad to hear that you started looking at SPM :-)  This is more of
an SPM than a Fieldtrip question so perhaps the discussion should move
to the SPM mailing list. Just from looking at the error message the
problem doesn't look familiar. Could you send me your file with the
struct (via yousendit.com if it's big) and I'll try to reproduce it?

Best,

Vladimir

On Fri, Mar 5, 2010 at 2:59 PM, Michael Wibral  wrote:
> Dear FT/SPM Listusers,
>
> I am having a (hopefully) trivial problem with converting Fieldtrip MEG data structures to spm8.
> Here's what I did:
>
> 0. Patch spm8 to r3684
> 1. Load the Fieldtrip data from /path/filename. They contain a variable (FTstruct) named DataFT.
> 2. Call spm_eeg_ft2spm(DataFT, '/path/filename')
>
> The error I get is:
>
> checkmeeg: no channel type, assigning default
> checkmeeg: no units, assigning default
> checkmeeg: transform type missing, assigning default
> checkmeeg: data scale missing, assigning default
>
> ??? Undefined function or method 'fname' for input arguments of type 'struct'.
> Error in ==> file_array.subsref>access_fields at 129         case 'fname',      t = fname(obj);
>
> Error in ==> file_array.subsref at 17         varargout = access_fields(obj,subs);
>
> Error in ==> checkmeeg at 203     if ~isa(meegstruct.data.y, 'file_array') || isempty(fileparts(meegstruct.data.y.fname)) ...
>
> Error in ==> meeg.meeg at 109         [OK D] = checkmeeg(varargin{1}, 'basic');
>
> Error in ==> spm_eeg_ft2spm at 138 D = meeg(D);
>
> Any help is very much appreciated.
>
> Michael
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From thomas.hartmann at UNI-KONSTANZ.DE  Fri Mar  5 17:02:24 2010
From: thomas.hartmann at UNI-KONSTANZ.DE (Thomas Hartmann)
Date: Fri, 5 Mar 2010 17:02:24 +0100
Subject: reading bdf+ files?
Message-ID: 

hi,
i try to read bdf+ files created using edflib
(http://www.teuniz.net/edflib/)

although the file looks good in the reader, fieldtrip complains about
"channels with different sampling rate not supported". i debugged the
code. the error occurs because bdf+ files have an additional channel
storeing events. this one seems to have a different samplerate.

i disabled these checks which resulted in a new error-message:
"One ore more output arguments not assigned during call to "read_24bit"."

is the support of fieldtrip restricted to bdf and not bdf+-files? or is
there something wrong with the lib i use to write the file?

thanks a lot in advance,
thomas

--
Dipl. Psych. Thomas Hartmann

OBOB-Lab
University of Konstanz
Department of Psychology
P.O. Box D25
78457 Konstanz
Germany

Tel.: +49 (0)7531 88 4612
Fax: +49 (0)7531-88 4601
Email: thomas.hartmann at uni-konstanz.de
Homepage: http://www.uni-konstanz.de/obob

"I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle)

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From michael.wibral at WEB.DE  Fri Mar  5 18:51:37 2010
From: michael.wibral at WEB.DE (Michael Wibral)
Date: Fri, 5 Mar 2010 18:51:37 +0100
Subject: Problem with Fieldtrip conversion
In-Reply-To: 
Message-ID: 

Dear Vladimir,

Thanks for the quick reply. Yes, i started looking into it and I really like the first impression (not the speed though :-)).

I solved the problem in the meantime. The reason was related to an unsuccesful update attempt. Sorry for the confusion! Could you let me know (and other FT users) the logic behind specifying the data twice, i.e. once as the loaded variable in the workspace and once as a filename. Is this related to memory mapped file use?

Michael

-----Ursprüngliche Nachricht-----
Von: Vladimir Litvak 
Gesendet: Mar 5, 2010 4:17:49 PM
An: FIELDTRIP at NIC.SURFNET.NL
Betreff: Re: [FIELDTRIP] Problem with Fieldtrip conversion

>Hi Michael,
>
>I'm glad to hear that you started looking at SPM :-)  This is more of
>an SPM than a Fieldtrip question so perhaps the discussion should move
>to the SPM mailing list. Just from looking at the error message the
>problem doesn't look familiar. Could you send me your file with the
>struct (via yousendit.com if it's big) and I'll try to reproduce it?
>
>Best,
>
>Vladimir
>
>On Fri, Mar 5, 2010 at 2:59 PM, Michael Wibral  wrot=
>e:
>> Dear FT/SPM Listusers,
>>
>> I am having a (hopefully) trivial problem with converting Fieldtrip MEG d=
>ata structures to spm8.
>> Here's what I did:
>>
>> 0. Patch spm8 to r3684
>> 1. Load the Fieldtrip data from /path/filename. They contain a variable (=
>FTstruct) named DataFT.
>> 2. Call spm_eeg_ft2spm(DataFT, '/path/filename')
>>
>> The error I get is:
>>
>> checkmeeg: no channel type, assigning default
>> checkmeeg: no units, assigning default
>> checkmeeg: transform type missing, assigning default
>> checkmeeg: data scale missing, assigning default
>>
>> ??? Undefined function or method 'fname' for input arguments of type 'str=
>uct'.
>> Error in =3D=3D> file_array.subsref>access_fields at 129 =A0 =A0 =A0 =A0 =
>case 'fname', =A0 =A0 =A0t =3D fname(obj);
>>
>> Error in =3D=3D> file_array.subsref at 17 =A0 =A0 =A0 =A0 varargout =3D a=
>ccess_fields(obj,subs);
>>
>> Error in =3D=3D> checkmeeg at 203 =A0 =A0 if ~isa(meegstruct.data.y, 'fil=
>e_array') || isempty(fileparts(meegstruct.data.y.fname)) ...
>>
>> Error in =3D=3D> meeg.meeg at 109 =A0 =A0 =A0 =A0 [OK D] =3D checkmeeg(va=
>rargin{1}, 'basic');
>>
>> Error in =3D=3D> spm_eeg_ft2spm at 138 D =3D meeg(D);
>>
>> Any help is very much appreciated.
>>
>> Michael
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the=
> FieldTrip =A0toolbox, to share experiences and to discuss new ideas for ME=
>G and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.=
>html and http://www.ru.nl/neuroimaging/fieldtrip.
>
>----------------------------------
>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 628 bytes
Desc: not available
URL: 

From v.litvak at ION.UCL.AC.UK  Fri Mar  5 19:59:12 2010
From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak)
Date: Fri, 5 Mar 2010 18:59:12 +0000
Subject: Problem with Fieldtrip conversion
In-Reply-To: <8611969.460599.1267811497771.JavaMail.fmail@mwmweb056>
Message-ID: 

The second argument is not the name of the file from which you loaded
the variable but the name for the SPM dataset that will be generated.
E.g. if you specify 'test' you'll get two files test.mat and test.dat.

Vladimir

On Fri, Mar 5, 2010 at 5:51 PM, Michael Wibral  wrote:
> Dear Vladimir,
>
> Thanks for the quick reply. Yes, i started looking into it and I really like the first impression (not the speed though :-)).
>
> I solved the problem in the meantime. The reason was related to an unsuccesful update attempt. Sorry for the confusion! Could you let me know (and other FT users) the logic behind specifying the data twice, i.e. once as the loaded variable in the workspace and once as a filename. Is this related to memory mapped file use?
>
> Michael
>
> -----Ursprüngliche Nachricht-----
> Von: Vladimir Litvak 
> Gesendet: Mar 5, 2010 4:17:49 PM
> An: FIELDTRIP at NIC.SURFNET.NL
> Betreff: Re: [FIELDTRIP] Problem with Fieldtrip conversion
>
>>Hi Michael,
>>
>>I'm glad to hear that you started looking at SPM :-)  This is more of
>>an SPM than a Fieldtrip question so perhaps the discussion should move
>>to the SPM mailing list. Just from looking at the error message the
>>problem doesn't look familiar. Could you send me your file with the
>>struct (via yousendit.com if it's big) and I'll try to reproduce it?
>>
>>Best,
>>
>>Vladimir
>>
>>On Fri, Mar 5, 2010 at 2:59 PM, Michael Wibral  wrot=
>>e:
>>> Dear FT/SPM Listusers,
>>>
>>> I am having a (hopefully) trivial problem with converting Fieldtrip MEG d=
>>ata structures to spm8.
>>> Here's what I did:
>>>
>>> 0. Patch spm8 to r3684
>>> 1. Load the Fieldtrip data from /path/filename. They contain a variable (=
>>FTstruct) named DataFT.
>>> 2. Call spm_eeg_ft2spm(DataFT, '/path/filename')
>>>
>>> The error I get is:
>>>
>>> checkmeeg: no channel type, assigning default
>>> checkmeeg: no units, assigning default
>>> checkmeeg: transform type missing, assigning default
>>> checkmeeg: data scale missing, assigning default
>>>
>>> ??? Undefined function or method 'fname' for input arguments of type 'str=
>>uct'.
>>> Error in =3D=3D> file_array.subsref>access_fields at 129 =A0 =A0 =A0 =A0 =
>>case 'fname', =A0 =A0 =A0t =3D fname(obj);
>>>
>>> Error in =3D=3D> file_array.subsref at 17 =A0 =A0 =A0 =A0 varargout =3D a=
>>ccess_fields(obj,subs);
>>>
>>> Error in =3D=3D> checkmeeg at 203 =A0 =A0 if ~isa(meegstruct.data.y, 'fil=
>>e_array') || isempty(fileparts(meegstruct.data.y.fname)) ...
>>>
>>> Error in =3D=3D> meeg.meeg at 109 =A0 =A0 =A0 =A0 [OK D] =3D checkmeeg(va=
>>rargin{1}, 'basic');
>>>
>>> Error in =3D=3D> spm_eeg_ft2spm at 138 D =3D meeg(D);
>>>
>>> Any help is very much appreciated.
>>>
>>> Michael
>>>
>>> ----------------------------------
>>> The aim of this list is to facilitate the discussion between users of the=
>> FieldTrip =A0toolbox, to share experiences and to discuss new ideas for ME=
>>G and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.=
>>html and http://www.ru.nl/neuroimaging/fieldtrip.
>>
>>----------------------------------
>>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From v.litvak at ION.UCL.AC.UK  Fri Mar  5 20:06:00 2010
From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak)
Date: Fri, 5 Mar 2010 19:06:00 +0000
Subject: Problem with Fieldtrip conversion
In-Reply-To: 
Message-ID: 

Just to make things clearer for FT users, the D variable that you get
from spm_eeg_ft2spm cannot exist without dataset on the disk. It's
different from FT where data can be just a variable in the workspace.
The reason is indeed memory mapping. So you must have the two files
present two have a valid dataset.

I suggest again to post SPM-related questions to the SPM list (even
though I like getting good publicity for SPM on the FT list ;-)

Best,

Vladimir

On Fri, Mar 5, 2010 at 6:59 PM, Vladimir Litvak  wrote:
> The second argument is not the name of the file from which you loaded
> the variable but the name for the SPM dataset that will be generated.
> E.g. if you specify 'test' you'll get two files test.mat and test.dat.
>
> Vladimir
>
> On Fri, Mar 5, 2010 at 5:51 PM, Michael Wibral  wrote:
>> Dear Vladimir,
>>
>> Thanks for the quick reply. Yes, i started looking into it and I really like the first impression (not the speed though :-)).
>>
>> I solved the problem in the meantime. The reason was related to an unsuccesful update attempt. Sorry for the confusion! Could you let me know (and other FT users) the logic behind specifying the data twice, i.e. once as the loaded variable in the workspace and once as a filename. Is this related to memory mapped file use?
>>
>> Michael
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Vladimir Litvak 
>> Gesendet: Mar 5, 2010 4:17:49 PM
>> An: FIELDTRIP at NIC.SURFNET.NL
>> Betreff: Re: [FIELDTRIP] Problem with Fieldtrip conversion
>>
>>>Hi Michael,
>>>
>>>I'm glad to hear that you started looking at SPM :-)  This is more of
>>>an SPM than a Fieldtrip question so perhaps the discussion should move
>>>to the SPM mailing list. Just from looking at the error message the
>>>problem doesn't look familiar. Could you send me your file with the
>>>struct (via yousendit.com if it's big) and I'll try to reproduce it?
>>>
>>>Best,
>>>
>>>Vladimir
>>>
>>>On Fri, Mar 5, 2010 at 2:59 PM, Michael Wibral  wrot=
>>>e:
>>>> Dear FT/SPM Listusers,
>>>>
>>>> I am having a (hopefully) trivial problem with converting Fieldtrip MEG d=
>>>ata structures to spm8.
>>>> Here's what I did:
>>>>
>>>> 0. Patch spm8 to r3684
>>>> 1. Load the Fieldtrip data from /path/filename. They contain a variable (=
>>>FTstruct) named DataFT.
>>>> 2. Call spm_eeg_ft2spm(DataFT, '/path/filename')
>>>>
>>>> The error I get is:
>>>>
>>>> checkmeeg: no channel type, assigning default
>>>> checkmeeg: no units, assigning default
>>>> checkmeeg: transform type missing, assigning default
>>>> checkmeeg: data scale missing, assigning default
>>>>
>>>> ??? Undefined function or method 'fname' for input arguments of type 'str=
>>>uct'.
>>>> Error in =3D=3D> file_array.subsref>access_fields at 129 =A0 =A0 =A0 =A0 =
>>>case 'fname', =A0 =A0 =A0t =3D fname(obj);
>>>>
>>>> Error in =3D=3D> file_array.subsref at 17 =A0 =A0 =A0 =A0 varargout =3D a=
>>>ccess_fields(obj,subs);
>>>>
>>>> Error in =3D=3D> checkmeeg at 203 =A0 =A0 if ~isa(meegstruct.data.y, 'fil=
>>>e_array') || isempty(fileparts(meegstruct.data.y.fname)) ...
>>>>
>>>> Error in =3D=3D> meeg.meeg at 109 =A0 =A0 =A0 =A0 [OK D] =3D checkmeeg(va=
>>>rargin{1}, 'basic');
>>>>
>>>> Error in =3D=3D> spm_eeg_ft2spm at 138 D =3D meeg(D);
>>>>
>>>> Any help is very much appreciated.
>>>>
>>>> Michael
>>>>
>>>> ----------------------------------
>>>> The aim of this list is to facilitate the discussion between users of the=
>>> FieldTrip =A0toolbox, to share experiences and to discuss new ideas for ME=
>>>G and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.=
>>>html and http://www.ru.nl/neuroimaging/fieldtrip.
>>>
>>>----------------------------------
>>>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From e.maris at DONDERS.RU.NL  Fri Mar  5 21:52:49 2010
From: e.maris at DONDERS.RU.NL (Eric Maris)
Date: Fri, 5 Mar 2010 21:52:49 +0100
Subject: quiestions about planar transformation
In-Reply-To: <8745792.274828.1267785623641.JavaMail.fmail@mwmweb056>
Message-ID: 

Dear FT-colleagues,

 

 

> The fundamental underlying problem is that you go from a scalar field

> and massively paralellel univariate statistics to a vector field and,

> hence, truly multivariate statistics (e.g. because the local gradient

> vectors will rotate across the course of an ERP/ERF for example).

> Coming up with a p-value there sounds difficult to me. I always

> wondered how people with planar gradiometer devices solve that issue

> when doing time-domain stuff? Maybe there are solutions out there

> already?

 

Following up on the proposal by Jan-Mathijs, this is how you can do it:

·        Use the following test statistic at the level of the (_dV,_dH) channel pairs: calculate the difference between the experimental conditions of the lengths of the trial-averaged vector-valued (_dV,_dH)-signals (J-M calls this “to Pythagoras”). You do this for all channels and all time points

·        Find the channel- and time-point-specific permutation distributions of these statistics

·        Use these channel- and time-point-specific permutation distributions to find sensible thresholds for the statistics

·        Do cluster-based permutation testing using these thresholded test statistics that are subsequently combined in a maximum cluster statistic to control the false alarm

 

If you write the statfun for the channel-specific test statistic, then the rest can be performed using existing Fieldtrip code.

 

 

Best,

 

Eric Maris

 

 

dr. Eric Maris
Donders Institute for Brain, Cognition and Behavior

Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging

Radboud University
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
T:+31 24 3612651
Mobile: 06 39584581

F:+31 24 3616066
E: e.  maris at donders.ru.nl

 

 

 

 

 

> 

> Michael

> 

> -----Ursprüngliche Nachricht-----

> Von: jan-mathijs schoffelen 

> Gesendet: Mar 5, 2010 11:12:03 AM

> An: FIELDTRIP at NIC.SURFNET.NL

> Betreff: Re: [FIELDTRIP] quiestions about planar transformation

> 

> >Dear Mark,

> >

> >There may be some confusion here, relating to whether we are talking

> >about frequency domain data (=power, always a positive value), or

> >whether we are talking about time domain data (=amplitude, can be

> >positive and negative).

> >

> >Single trial combination of planar gradient transformed axial gradient

> >(or magnetometer) data is not the best thing to do for time domain

> >stuff.

> >Reason: combination takes place by applying Pythagoras' rule to the

> _dV

> >and _dH pairs, and when the individual _dH and _dV components are

> >noisy, the noise is also squared, added, and squar-rooted, which leads

> >to an 'amplification' of noise. Not good. It works after trial-

> >averaging because you squeeze out the noise first and Pythagoras the

> >reduced-noise signals.

> >

> >For frequency domain data this is not an issue.

> >Reason: combination usually takes place by just adding the _dV and _dH

> >pairs (power is a squared value already). This is just a linear step

> >(just like averaging) and the order of performing the linear steps

> does

> >not matter for the result. So single trial combination prior to

> >averaging or vice versa should not make a difference here.

> >

> >In general I would advise against trying to do statistics on the

> >combined planar gradient and use it for visualization purposes only.

> >Alternatively, one could come up with a non-parametric statistical

> test

> >(permutation), in which I could think of a way of extracting a p-

> value

> >from a single _dH/_dV pair combined. But this would be a different

> >story...

> >

> >Best,

> >

> >Jan-Mathijs

> >

> >

> >> Hi all

> >>

> >> I am currently a little confused as to how to properly use megplanar

> >> and combineplanar for my 4D 148 axial gadiometer data. I would

> >> ideally like to use planar gradients as it will make subsequent ERF

> >> and frequency analysis easier to interpret. My question is when

> >> should I combine the v and h components?

> >>

> >> Looking  at some previous posts it is suggested that you should

> >> combine the gradients on an individual basis, but when I do this i

> >> get an almost flat amplitude across all sensors which doesn't look

> >> right (see attached image, 'bad_planar'). When i use combineplanar

> >> after averaging, the data the data looks ok (good_planar). I get the

> >> same result doing both megplanar and combineplanar on the averaged

> >> data.

> >>

> >> I just want to double check that the 'bad' planar fields i am

> getting

> >> are correct and not due to a bug in field trip. Intuitively, I would

> >> expect combining the components on the individual level world be

> more

> >> accurate as it would prevent fields from opposeingly orientated

> >> dipoles cancelling out when averaged.

> >>

> >> If it is the case that you should use combineplanar after trial

> >> averaging, how do you go about combining after statistical tests?

> >> i.e. when you have a p-value or a test statistic for the v and h

> >> components for each sensor, how would you combine these together?

> >>

> >> Any help or advice would be appreciated.

> >>

> >> Many thanks

> >>

> >> Mark

> >

> >Dr. J.M. (Jan-Mathijs) Schoffelen

> >Donders Institute for Brain, Cognition and Behaviour, Centre for

> >Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands

> >J.Schoffelen at donders.ru.nl

> >Telephone: 0031-24-3668063

> >

> >----------------------------------

> >The aim of this list is to facilitate the discussion between users of

> the FieldTrip  toolbox, to share experiences and to discuss new ideas

> for MEG and EEG analysis. See also

> http://listserv.surfnet.nl/archives/fieldtrip.html and

> http://www.ru.nl/neuroimaging/fieldtrip.

> 

> ----------------------------------

> The aim of this list is to facilitate the discussion between users of

> the FieldTrip  toolbox, to share experiences and to discuss new ideas

> for MEG and EEG analysis. See also

> http://listserv.surfnet.nl/archives/fieldtrip.html and

> http://www.ru.nl/neuroimaging/fieldtrip.


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From r.oostenveld at FCDONDERS.RU.NL  Mon Mar  8 09:27:24 2010
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Mon, 8 Mar 2010 09:27:24 +0100
Subject: reading bdf+ files?
In-Reply-To: <4B912B10.6030700@uni-konstanz.de>
Message-ID: 

Hi Thomas,


On 5 Mar 2010, at 17:02, Thomas Hartmann wrote:

> hi,
> i try to read bdf+ files created using edflib (http://www.teuniz.net/edflib/
> )
>
> although the file looks good in the reader, fieldtrip complains
> about "channels with different sampling rate not supported". i
> debugged the code. the error occurs because bdf+ files have an
> additional channel storeing events. this one seems to have a
> different samplerate.
>
> i disabled these checks which resulted in a new error-message:
> "One ore more output arguments not assigned during call to
> "read_24bit"."
>
> is the support of fieldtrip restricted to bdf and not bdf+-files? or
> is there something wrong with the lib i use to write the file?

I don't know the details of the bdf+ format, but do know the bdf
format. Probably bdf+ is plain bdf with an annotation channel. Are you
using annotations? The biosemi system does not, it uses a non-standard
trigger channel sampled at the same frequency as all other channels
(i.e. "non standard" meaning that it does not comply with the
published papers on edf and edf+). Having a trigger channel at the
same sampling rate makes the implementation of software and hardware
and interpretation of the data much simpler.

In general data is desribed as Nchan X Nsamples matrix. If one of the
channels has another sampling rate, it does not fit in this matrix,
that is why varying sampling rates over channels are not supported. If
the event/status/trigger channel is represented as a continuously
sampled channel (like in bdf), it is read along with all other
channels. The same limitation applies to edf and edf+. The annotation
channel is difficult to deal with and in the read_biosemi_bdf
implementation not supported.

The bdf format has small blocks (usually one second long) in which the
channels are stored like
ch1_1 ch1_2 ch1_3 ... ch2_1 ch2_2 ch2_3 ...
i.e. all samples of one channel as a vector, and then the next
channel. This allows for variable sampling rates, whereas a
multiplexed representation would not. Specific for the bdf format is
that the samples are represented as 24 bit (where 32 bit is more
usual). The read_24bit mex file reads such a block and converts the 24
bit values to doubles. The reason for having it in a mex file is that
the conversion from 24 bits to double is much more efficient.

best regards
Robert

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From thomas.hartmann at UNI-KONSTANZ.DE  Mon Mar  8 10:30:31 2010
From: thomas.hartmann at UNI-KONSTANZ.DE (Thomas Hartmann)
Date: Mon, 8 Mar 2010 10:30:31 +0100
Subject: reading bdf+ files?
In-Reply-To: 
Message-ID: 

hi robert,
thanks for the quick answere.
yes, bdf+ is bdf with an annotation-channel added. this channel is
unlike the bdf trigger channel. so this, as i had already expected,
explains the problem.

my major motivation for using bdf+ is the availability of a ready-to-use
c++ library. unfortunatly it only writes bdf+ or edf+, not the
"standard" format.

does someone know of a stable, well-documented, free library (c or c++)
to write eeg-data in a format, fieldtrip can read?

cheers,
thomas

Am 08.03.2010 09:27, schrieb Robert Oostenveld:
> Hi Thomas,
>
>
> On 5 Mar 2010, at 17:02, Thomas Hartmann wrote:
>
>> hi,
>> i try to read bdf+ files created using edflib
>> (http://www.teuniz.net/edflib/)
>>
>> although the file looks good in the reader, fieldtrip complains about
>> "channels with different sampling rate not supported". i debugged the
>> code. the error occurs because bdf+ files have an additional channel
>> storeing events. this one seems to have a different samplerate.
>>
>> i disabled these checks which resulted in a new error-message:
>> "One ore more output arguments not assigned during call to
>> "read_24bit"."
>>
>> is the support of fieldtrip restricted to bdf and not bdf+-files? or
>> is there something wrong with the lib i use to write the file?
>
> I don't know the details of the bdf+ format, but do know the bdf
> format. Probably bdf+ is plain bdf with an annotation channel. Are you
> using annotations? The biosemi system does not, it uses a non-standard
> trigger channel sampled at the same frequency as all other channels
> (i.e. "non standard" meaning that it does not comply with the
> published papers on edf and edf+). Having a trigger channel at the
> same sampling rate makes the implementation of software and hardware
> and interpretation of the data much simpler.
>
> In general data is desribed as Nchan X Nsamples matrix. If one of the
> channels has another sampling rate, it does not fit in this matrix,
> that is why varying sampling rates over channels are not supported. If
> the event/status/trigger channel is represented as a continuously
> sampled channel (like in bdf), it is read along with all other
> channels. The same limitation applies to edf and edf+. The annotation
> channel is difficult to deal with and in the read_biosemi_bdf
> implementation not supported.
>
> The bdf format has small blocks (usually one second long) in which the
> channels are stored like
> ch1_1 ch1_2 ch1_3 ... ch2_1 ch2_2 ch2_3 ...
> i.e. all samples of one channel as a vector, and then the next
> channel. This allows for variable sampling rates, whereas a
> multiplexed representation would not. Specific for the bdf format is
> that the samples are represented as 24 bit (where 32 bit is more
> usual). The read_24bit mex file reads such a block and converts the 24
> bit values to doubles. The reason for having it in a mex file is that
> the conversion from 24 bits to double is much more efficient.
>
> best regards
> Robert
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of
> the FieldTrip  toolbox, to share experiences and to discuss new ideas
> for MEG and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.


--
Dipl. Psych. Thomas Hartmann

OBOB-Lab
University of Konstanz
Department of Psychology
P.O. Box D25
78457 Konstanz
Germany

Tel.: +49 (0)7531 88 4612
Fax: +49 (0)7531-88 4601
Email: thomas.hartmann at uni-konstanz.de
Homepage: http://www.uni-konstanz.de/obob

"I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle)

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From michael.wibral at WEB.DE  Mon Mar  8 12:32:22 2010
From: michael.wibral at WEB.DE (Michael Wibral)
Date: Mon, 8 Mar 2010 12:32:22 +0100
Subject: statistic on planar gradients
Message-ID: 

Dear Eric,

you suggested to,...

Use the following test statistic at the level of the (_dV,_dH) channel pairs: calculate the difference between the experimental conditions of the lengths of the trial-averaged vector-valued (_dV,_dH)-signals (J-M calls this “to Pythagoras”). You do this for all channels and all time points....

I disagree here, but not for mathematical/stastical reason, rather because of neurophysiology and the problem discussed in the thread before :
I think of two conditions that differ not in their amplitudes but have completely opposing direction of a dipole (in an identical location), then statitsics on raw fields will easily find this effect, but the length of the trial averaged vector valued signals will be identical (the dipole does not jitter across trials in this example, hence trial averaging of vector valued signals doesn't help. The dipole just inverts it's orientation across conditions). That's what I meant by multivariate statistics. Some importnat information gets lost (and must get lost) when going to a non-directional and unsigned quantity to test.

But maybe I simply misunderstood your suggestion altogether??

Michael

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 628 bytes
Desc: not available
URL: 

From e.maris at DONDERS.RU.NL  Mon Mar  8 13:18:08 2010
From: e.maris at DONDERS.RU.NL (Eric Maris)
Date: Mon, 8 Mar 2010 13:18:08 +0100
Subject: statistic on planar gradients
In-Reply-To: <19371188.1269230.1268047942766.JavaMail.fmail@mwmweb056>
Message-ID: 

Dear Michael,

 

 

> you suggested to,...

> 

> Use the following test statistic at the level of the (_dV,_dH) channel

> pairs: calculate the difference between the experimental conditions of

> the lengths of the trial-averaged vector-valued (_dV,_dH)-signals (J-M

> calls this “to Pythagoras”). You do this for all channels and all

> time points....

> 

> I disagree here, but not for mathematical/stastical reason, rather

> because of neurophysiology and the problem discussed in the thread

> before :

> I think of two conditions that differ not in their amplitudes but have

> completely opposing direction of a dipole (in an identical location),

> then statitsics on raw fields will easily find this effect, but the

> length of the trial averaged vector valued signals will be identical

> (the dipole does not jitter across trials in this example, hence trial

> averaging of vector valued signals doesn't help. The dipole just

> inverts it's orientation across conditions). That's what I meant by

> multivariate statistics. Some importnat information gets lost (and must

> get lost) when going to a non-directional and unsigned quantity to

> test.

 

My apologies for not having read the thread far enough back in time.

 

If you want to identify shifts in dipole orientation produced by your independent variable, then my proposal doesn´t work. However, here is an alternative (channel,time)-pair-specific test statistic that will do the job:

1.  Represent the (dV,dH)-pair of planar gradient evoked responses as a single complex number with dH being the real part and dV the imaginary part. Call this the “complex planar representation”.

2.  From the complex planar representations of the two experimental conditions, calculate the complex phase difference between the two. (It may turn out that you get a more sensitive test if this between-condition complex phase difference is weighted by the amplitudes of the complex planars in the two conditions. However this is not central for the main idea.)

3.  Find the permutation distributions of the (channel,time)-pair-specific complex phase differences, and use these to find an appropriate threshold.

4.  Proceed in the same way as for other cluster-based permutation tests.

 

The main difference between this test, and the previous one that I proposed, is that in step 2 we calculate the phase difference instead of the magnitude difference.

 

 

Best,

 

 

Eric 

 

 

 

 

 

 

 

 

> 

> But maybe I simply misunderstood your suggestion altogether??

> 

> Michael

> 

> ----------------------------------

> The aim of this list is to facilitate the discussion between users of

> the FieldTrip  toolbox, to share experiences and to discuss new ideas

> for MEG and EEG analysis. See also

> http://listserv.surfnet.nl/archives/fieldtrip.html and

> http://www.ru.nl/neuroimaging/fieldtrip.


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From h.holle at SUSSEX.AC.UK  Mon Mar  8 16:53:35 2010
From: h.holle at SUSSEX.AC.UK (Henning Holle)
Date: Mon, 8 Mar 2010 15:53:35 +0000
Subject: problem with definetrials
Message-ID: 

Dear list members,

I am trying to define trials for a dataset. When I look for the events
contained in the file (like this)

cfg = [];
cfg.dataset             = 'jenna.cnt'
cfg.trialdef.eventtype = '?';
dummy                   = definetrial(cfg);

I get the following output.

Reading Event Table...
the following events were found in the datafile
event type: 'trigger' with event values: 1  11  22  33
no trials have been defined yet, see DEFINETRIAL for further help
found 202 events
created 0 trials


Now, when I want to define the trials for all 'standard' events (which
have the eventvalue '11'),

% define trials
cfg = [];
cfg.dataset             = 'jenna.cnt'
cfg.trialdef.eventtype = 'trigger'
cfg.trialdef.eventvalue = { '11' };
cfg_standard          = definetrial(cfg);

I get the following error message.

??? Error using ==> cellstr at 34
Input must be a string.

Error in ==> cell.intersect at 44
     a = cellstr(a);

Error in ==> trialfun_general at 114
   elseif ~isempty(intersect(event(i).value, cfg.trialdef.eventvalue))

Error in ==> ft_definetrial at 110
     [trl, event] = feval(cfg.trialfun, cfg);

Error in ==> definetrial at 17
[varargout{1:nargout}] = funhandle(varargin{:});

How can I solve this problem? Am I doing something wrong? (I am using
the most recent version of fieldtrip)

Cheers,

Henning

--
*************************
Dr. Henning Holle,
Department of Psychology,
University of Sussex,
Falmer, Brighton,
BN1 9QH, U.K.
Tel. : +44 (0)1273 877240
Fax. : +44 (0)1273 678058

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From r.oostenveld at FCDONDERS.RU.NL  Mon Mar  8 17:58:00 2010
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Mon, 8 Mar 2010 17:58:00 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: 
Message-ID: 

Hi Chetan,

Sorry about that, the bookeeping of the data dimensions is a bit
messy, as reflected in the cfg.dim which is pre and post appended all
the time.

On 4 Mar 2010, at 16:51, Chetan Sharma wrote:
> I am still running into bugs when doing the freq_time clustering. I
> am testing for coherence between the hemispheres during a task, and
> now it runs into problems at clusterstat() at line 175.

what is your statfun?

Channel clustering is not supported for all possible statistics, and
especially has limits in the case of bivariate measures such as
coherence.


> The command is:
>
> posclusobs = findcluster(reshape(postailobs,
>       [cfg.dim,1]),channeighbstructmat,cfg.minnbchan);
>
> The problem is that postailobs has size [nfreq*ntime, 1], while the
> cfg.dim is [nchan nfreq ntime], where nchan=2 in this case. It seems
> like it wants to reshape it into size [nfreq, ntime, 1]. Is this
> indeed the case?
>
> And could someone help me out by explaining a bit more about when
> one would choose for cfg.clusterthreshold the different values,
> 'nonparametric_common', 'nonparametric_individual', and 'parametric'
> when testing for coherence in different brain areas? I have read
> over the documentation and the code but am still somewhat unsure.


parametric uses the known parametric distribution of the statistic,
this has to be supported by the statfun.
nonparametric_common estimates a threshold from the randomization
distribution. The threshold is common to all channe-time-frequency
points.
nonparametric_individual estimates an individual threshold from the
randomization distribution for each channe-time-frequency point.

best regards,
Robert

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From r.oostenveld at FCDONDERS.RU.NL  Mon Mar  8 18:00:28 2010
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Mon, 8 Mar 2010 18:00:28 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: 
Message-ID: 

> And also, what should the channeighbstructmat look like when doing
> freq_time clustering? When I do the fix mentioned above, it returns
> a 2x2 matrix of zeros, which causes problems in findcluster(). I've
> read over the neighbourselection(), but it doesn't give any clues
> for freq_time clustering.


neighbourselection is only for specifying neighbouring channels.
Neighbouring timepoints and frequencies have a trivial definition and
don'h have to be specified. If you only want clustering in time and
frequency and not over channels, you shoudl specify cfg.neighbours =
{} or [] (I don't know for sure which emnptyit should be right now).

best
Robert

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From arno at CERCO.UPS-TLSE.FR  Mon Mar  8 18:05:33 2010
From: arno at CERCO.UPS-TLSE.FR (Arnaud Delorme)
Date: Mon, 8 Mar 2010 09:05:33 -0800
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: 
Message-ID: 

Hi Robert,

I was running some correction for multiple comparisons using the
cluster method you have developed and I set the number of neighbors
for each channel to 4.5 when constructing the channel neighbor matrix
(which seem meaningful to me as each channel has in general 4
neighbors in the 4 directions). I did work and returned relevant
results. I am now thinking of making a link in EEGLAB to use that
function but I want to be sure that my arbitrary choice in the number
of channel neighbor is a good one.

Thanks a lot,

Arno

On Mar 8, 2010, at 8:58 AM, Robert Oostenveld wrote:

> Hi Chetan,
>
> Sorry about that, the bookeeping of the data dimensions is a bit
> messy, as reflected in the cfg.dim which is pre and post appended all
> the time.
>
> On 4 Mar 2010, at 16:51, Chetan Sharma wrote:
>> I am still running into bugs when doing the freq_time clustering. I
>> am testing for coherence between the hemispheres during a task, and
>> now it runs into problems at clusterstat() at line 175.
>
> what is your statfun?
>
> Channel clustering is not supported for all possible statistics, and
> especially has limits in the case of bivariate measures such as
> coherence.
>
>
>> The command is:
>>
>> posclusobs = findcluster(reshape(postailobs,
>>      [cfg.dim,1]),channeighbstructmat,cfg.minnbchan);
>>
>> The problem is that postailobs has size [nfreq*ntime, 1], while the
>> cfg.dim is [nchan nfreq ntime], where nchan=2 in this case. It seems
>> like it wants to reshape it into size [nfreq, ntime, 1]. Is this
>> indeed the case?
>>
>> And could someone help me out by explaining a bit more about when
>> one would choose for cfg.clusterthreshold the different values,
>> 'nonparametric_common', 'nonparametric_individual', and 'parametric'
>> when testing for coherence in different brain areas? I have read
>> over the documentation and the code but am still somewhat unsure.
>
>
> parametric uses the known parametric distribution of the statistic,
> this has to be supported by the statfun.
> nonparametric_common estimates a threshold from the randomization
> distribution. The threshold is common to all channe-time-frequency
> points.
> nonparametric_individual estimates an individual threshold from the
> randomization distribution for each channe-time-frequency point.
>
> best regards,
> Robert
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users
> of the FieldTrip  toolbox, to share experiences and to discuss new
> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html
>  and http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From chesharm at STANFORD.EDU  Mon Mar  8 18:14:37 2010
From: chesharm at STANFORD.EDU (Chetan Sharma)
Date: Mon, 8 Mar 2010 09:14:37 -0800
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: 
Message-ID: 

Thank you for the help, I am using statfun_indepZCoh, and hoping to cluster
over maxsize in freq_time. The problem is that specifying cfg.neighbours =
[] causes a problem in findcluster(). I modified line 175 in clusterstats to
do reshape [cfg.dim(2:end) 1], but I now run into an error at line 38 of
findcluster().

The problem is that makechanneighbstructmat(cfg) returns a 2x2 matrix of
zeros when passed a cfg.neighbours = []. As a result it doesn't pass the
check at line 37 of findcluster.m, which is:

length(size(spatdimneighbstructmat))~=2 ||
~all(size(spatdimneighbstructmat)==spatdimlength)

So that's why I'd like to know, what should the neighbstructmat that is
returned by makechanneighbstructmat() look like when passed cfg.neighbours =
[]? It doesn't seem like it should be a 2x2 matrix of zeros.
-chetan

On Mon, Mar 8, 2010 at 9:00 AM, Robert Oostenveld <
r.oostenveld at fcdonders.ru.nl> wrote:

> And also, what should the channeighbstructmat look like when doing
>> freq_time clustering? When I do the fix mentioned above, it returns a 2x2
>> matrix of zeros, which causes problems in findcluster(). I've read over the
>> neighbourselection(), but it doesn't give any clues for freq_time
>> clustering.
>>
>
>
> neighbourselection is only for specifying neighbouring channels.
> Neighbouring timepoints and frequencies have a trivial definition and don'h
> have to be specified. If you only want clustering in time and frequency and
> not over channels, you shoudl specify cfg.neighbours = {} or [] (I don't
> know for sure which emnptyit should be right now).
>
> best
> Robert
>
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From julian.keil at GMAIL.COM  Mon Mar  8 22:12:43 2010
From: julian.keil at GMAIL.COM (Julian Keil)
Date: Mon, 8 Mar 2010 22:12:43 +0100
Subject: problem with definetrials
In-Reply-To: <4B951D7F.50708@sussex.ac.uk>
Message-ID: 

Hi,

maybe this I miss your point but when I set the cfg. structure for the trigger values, I use the square brackets
e.g. 
cfg.trialdef.eventtype  = 'TRIGGER'; 
cfg.trialdef.eventvalue = [4106 4108 4110];
Did you try this?
Good luck.

Julian

Am 08.03.2010 um 16:53 schrieb Henning Holle:

> Dear list members,
> 
> I am trying to define trials for a dataset. When I look for the events contained in the file (like this)
> 
> cfg = [];
> cfg.dataset             = 'jenna.cnt'
> cfg.trialdef.eventtype = '?';
> dummy                   = definetrial(cfg);
> 
> I get the following output.
> 
> Reading Event Table...
> the following events were found in the datafile
> event type: 'trigger' with event values: 1  11  22  33
> no trials have been defined yet, see DEFINETRIAL for further help
> found 202 events
> created 0 trials
> 
> 
> Now, when I want to define the trials for all 'standard' events (which have the eventvalue '11'),
> 
> % define trials
> cfg = [];
> cfg.dataset             = 'jenna.cnt'
> cfg.trialdef.eventtype = 'trigger'
> cfg.trialdef.eventvalue = { '11' };
> cfg_standard          = definetrial(cfg);
> 
> I get the following error message.
> 
> ??? Error using ==> cellstr at 34
> Input must be a string.
> 
> Error in ==> cell.intersect at 44
>    a = cellstr(a);
> 
> Error in ==> trialfun_general at 114
>  elseif ~isempty(intersect(event(i).value, cfg.trialdef.eventvalue))
> 
> Error in ==> ft_definetrial at 110
>    [trl, event] = feval(cfg.trialfun, cfg);
> 
> Error in ==> definetrial at 17
> [varargout{1:nargout}] = funhandle(varargin{:});
> 
> How can I solve this problem? Am I doing something wrong? (I am using the most recent version of fieldtrip)
> 
> Cheers,
> 
> Henning
> 
> -- 
> *************************
> Dr. Henning Holle,
> Department of Psychology,
> University of Sussex,
> Falmer, Brighton,
> BN1 9QH, U.K.
> Tel. : +44 (0)1273 877240
> Fax. : +44 (0)1273 678058
> 
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.



Dipl. Psych. Julian Keil

OBOB-Lab
University of Konstanz
Department of Psychology
P.O. Box D25
78457 Konstanz
Germany

Tel: ++49 - (0)7531 - 88 42 50
Fax: ++49 - (0)7531 - 88 28 91
Email: julian.keil at uni-konstanz.de
Homepage: http://www.uni-konstanz.de/obob








----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From r.vandermeij at DONDERS.RU.NL  Tue Mar  9 09:22:19 2010
From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij)
Date: Tue, 9 Mar 2010 09:22:19 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: <4DB8175E4BA342CB8D3C331F0E2F2EAC@LAT6500Andrea>
Message-ID: 

Hi Andrea,

The bug should be fixed now, and cfg.neighbours should work as intedend.
If you use cfg.neighbours = [] in your call to freqstatistics (or
time-lock, etc...), clustering will not be done on channels. The fix
should be there in the latest fieldtrip version on the ftp-server (put
there last night at 23:00 I think).

Happy to help,

Best,
Roemer


On 3/5/2010 12:27 PM, Andrea Ostendorf wrote:
> Dear Roemer,
>
> Thanks for your advice.
> Since I would like to use Fieldtrip for TFC data and for images, with an
> additional cluster-over-channels option in the case of the TFC data, I now
> edited clusterstat.
> If called from a TFC script (I introduced a field in cfg for this), it uses
> the correction you gave to Chetan, otherwise it uses the former code.
> This appears to work and the results make sense. However, I ask myself
> whether there is an option for managing this without editing any Fieldtrip
> functions, just by cfg options?
> Any help would be greatly appreciated.
>
> Thanks!
> All the best
> Andrea
>
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>

--
Roemer van der Meij MSc
Scientific Programmer&  Data-Analyst
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognition
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
Tel: +31(0)24 3612631
E-mail: r.vandermeij at donders.ru.nl

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From Jan.Hirschmann at MED.UNI-DUESSELDORF.DE  Tue Mar  9 10:20:36 2010
From: Jan.Hirschmann at MED.UNI-DUESSELDORF.DE (Jan Hirschmann)
Date: Tue, 9 Mar 2010 10:20:36 +0100
Subject: welch's method
Message-ID: 

Dear fieldtrip experts,

 

as I have used Welch's method with 50% overlap on the sensor level I
would like to do the same on the source level prior to using DICS.  Now
I am not quite sure what configuration I should use for freqanalysis as
fieldtrip is all about multitapering. If I specify cfg.t_ftimwin and
cfg.toi such that I get 50% overlap and use cfg.taper=hanning and
cfg.method=mtmwelch is this equivalent to Welch's method? And is it
appropriate to use small windows, i.e. to reduce spectral resolution, to
mimic smoothing?

 

Thanks for your help!

 

Jan

 

 

 

 

 


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From h.holle at SUSSEX.AC.UK  Tue Mar  9 10:57:20 2010
From: h.holle at SUSSEX.AC.UK (Henning Holle)
Date: Tue, 9 Mar 2010 10:57:20 +0100
Subject: problem with definetrials
Message-ID: 

Hi Julian,

thank you, this worked for me.

Cheers,

Henning

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From masaki.maruyama at CEA.FR  Tue Mar  9 19:04:00 2010
From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM)
Date: Tue, 9 Mar 2010 19:04:00 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: A<4B96053B.1020306@donders.ru.nl>
Message-ID: 

Dear Roemer,


The last version of fieldtrip fails the clustering in the default option, i.e., no specification of cfg.neighbouring. Since my script works correctly until the previous version, I'm afraid that the recent change might be a causal. Could you please confirm whether the default option can still work after the change?
An error message I received is attached below.

Thank you in advance for your kind helps.


Sincerely yours,
Masaki Maruyama  


??? Undefined function or variable "channeighbstructmat".

Error in ==> clusterstat at 178
      posclusobs = findcluster(reshape(postailobs, [cfg.dim,1]),channeighbstructmat,cfg.minnbchan);

Error in ==> statistics_montecarlo at 305
  [stat, cfg] = clusterstat(cfg, statrand, statobs,'issource',issource);

Error in ==> statistics_wrapper at 275
    [stat, cfg] = statmethod(cfg, dat, cfg.design);

Error in ==> ft_timelockstatistics at 80
[stat, cfg] = statistics_wrapper(cfg, varargin{:});

Error in ==> timelockstatistics at 17
[varargout{1:nargout}] = funhandle(varargin{:});







>-----Message d'origine-----
>De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part
>de Roemer van der Meij
>Envoyé : mardi 9 mars 2010 09:22
>À : FIELDTRIP at NIC.SURFNET.NL
>Objet : Re: [FIELDTRIP] clusterstats empty cfg.neighbours, cfg.neighbours
>example
>
>Hi Andrea,
>
>The bug should be fixed now, and cfg.neighbours should work as intedend.
>If you use cfg.neighbours = [] in your call to freqstatistics (or
>time-lock, etc...), clustering will not be done on channels. The fix
>should be there in the latest fieldtrip version on the ftp-server (put
>there last night at 23:00 I think).
>
>Happy to help,
>
>Best,
>Roemer
>
>
>On 3/5/2010 12:27 PM, Andrea Ostendorf wrote:
>> Dear Roemer,
>>
>> Thanks for your advice.
>> Since I would like to use Fieldtrip for TFC data and for images, with an
>> additional cluster-over-channels option in the case of the TFC data, I
>now
>> edited clusterstat.
>> If called from a TFC script (I introduced a field in cfg for this), it
>uses
>> the correction you gave to Chetan, otherwise it uses the former code.
>> This appears to work and the results make sense. However, I ask myself
>> whether there is an option for managing this without editing any
>Fieldtrip
>> functions, just by cfg options?
>> Any help would be greatly appreciated.
>>
>> Thanks!
>> All the best
>> Andrea
>>
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the
>FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>and EEG analysis. See also
>http://listserv.surfnet.nl/archives/fieldtrip.html and
>http://www.ru.nl/neuroimaging/fieldtrip.
>>
>
>--
>Roemer van der Meij MSc
>Scientific Programmer&  Data-Analyst
>Donders Institute for Brain, Cognition and Behaviour
>Centre for Cognition
>P.O. Box 9104
>6500 HE Nijmegen
>The Netherlands
>Tel: +31(0)24 3612631
>E-mail: r.vandermeij at donders.ru.nl
>
>----------------------------------
>The aim of this list is to facilitate the discussion between users of the
>FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>and EEG analysis. See also
>http://listserv.surfnet.nl/archives/fieldtrip.html and
>http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From r.vandermeij at DONDERS.RU.NL  Wed Mar 10 09:56:31 2010
From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij)
Date: Wed, 10 Mar 2010 09:56:31 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: 
Message-ID: 

Dear Masaki,

I'm verry sorry for that, I introduced a bug altering clusterstat.m the
day before yesterday. This was resolved yesterday afternoon, so the most
recent ftp-version will work appropriately again.

Sorry for the inconvenience,

Best,
Roemer


On 3/9/2010 7:04 PM, MARUYAMA Masaki INSERM wrote:
> Dear Roemer,
>
>
> The last version of fieldtrip fails the clustering in the default option, i.e., no specification of cfg.neighbouring. Since my script works correctly until the previous version, I'm afraid that the recent change might be a causal. Could you please confirm whether the default option can still work after the change?
> An error message I received is attached below.
>
> Thank you in advance for your kind helps.
>
>
> Sincerely yours,
> Masaki Maruyama
>
>
> ??? Undefined function or variable "channeighbstructmat".
>
> Error in ==>  clusterstat at 178
>        posclusobs = findcluster(reshape(postailobs, [cfg.dim,1]),channeighbstructmat,cfg.minnbchan);
>
> Error in ==>  statistics_montecarlo at 305
>    [stat, cfg] = clusterstat(cfg, statrand, statobs,'issource',issource);
>
> Error in ==>  statistics_wrapper at 275
>      [stat, cfg] = statmethod(cfg, dat, cfg.design);
>
> Error in ==>  ft_timelockstatistics at 80
> [stat, cfg] = statistics_wrapper(cfg, varargin{:});
>
> Error in ==>  timelockstatistics at 17
> [varargout{1:nargout}] = funhandle(varargin{:});
>
>
>
>
>
>
>
>
>> -----Message d'origine-----
>> De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part
>> de Roemer van der Meij
>> Envoyé : mardi 9 mars 2010 09:22
>> À : FIELDTRIP at NIC.SURFNET.NL
>> Objet : Re: [FIELDTRIP] clusterstats empty cfg.neighbours, cfg.neighbours
>> example
>>
>> Hi Andrea,
>>
>> The bug should be fixed now, and cfg.neighbours should work as intedend.
>> If you use cfg.neighbours = [] in your call to freqstatistics (or
>> time-lock, etc...), clustering will not be done on channels. The fix
>> should be there in the latest fieldtrip version on the ftp-server (put
>> there last night at 23:00 I think).
>>
>> Happy to help,
>>
>> Best,
>> Roemer
>>
>>
>> On 3/5/2010 12:27 PM, Andrea Ostendorf wrote:
>>
>>> Dear Roemer,
>>>
>>> Thanks for your advice.
>>> Since I would like to use Fieldtrip for TFC data and for images, with an
>>> additional cluster-over-channels option in the case of the TFC data, I
>>>
>> now
>>
>>> edited clusterstat.
>>> If called from a TFC script (I introduced a field in cfg for this), it
>>>
>> uses
>>
>>> the correction you gave to Chetan, otherwise it uses the former code.
>>> This appears to work and the results make sense. However, I ask myself
>>> whether there is an option for managing this without editing any
>>>
>> Fieldtrip
>>
>>> functions, just by cfg options?
>>> Any help would be greatly appreciated.
>>>
>>> Thanks!
>>> All the best
>>> Andrea
>>>
>>>
>>> ----------------------------------
>>> The aim of this list is to facilitate the discussion between users of the
>>>
>> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>> and EEG analysis. See also
>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>> http://www.ru.nl/neuroimaging/fieldtrip.
>>
>>>
>> --
>> Roemer van der Meij MSc
>> Scientific Programmer&   Data-Analyst
>> Donders Institute for Brain, Cognition and Behaviour
>> Centre for Cognition
>> P.O. Box 9104
>> 6500 HE Nijmegen
>> The Netherlands
>> Tel: +31(0)24 3612631
>> E-mail: r.vandermeij at donders.ru.nl
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the
>> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>> and EEG analysis. See also
>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>> http://www.ru.nl/neuroimaging/fieldtrip.
>>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>
>

--
Roemer van der Meij MSc
Scientific Programmer&  Data-Analyst
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognition
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
Tel: +31(0)24 3612631
E-mail: r.vandermeij at donders.ru.nl

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From saskia.haegens at DONDERS.RU.NL  Wed Mar 10 10:36:11 2010
From: saskia.haegens at DONDERS.RU.NL (Saskia Haegens)
Date: Wed, 10 Mar 2010 10:36:11 +0100
Subject: problem with definetrials
In-Reply-To: <4B951D7F.50708@sussex.ac.uk>
Message-ID: 

Dear Henning,

I think your event value should be a number rather than a string, i.e.

cfg.trialdef.eventvalue = 11;

Best,
Saskia


> -----Original Message-----
> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On
> Behalf Of Henning Holle
> Sent: maandag 8 maart 2010 16:54
> To: FIELDTRIP at NIC.SURFNET.NL
> Subject: [FIELDTRIP] problem with definetrials
>
> Dear list members,
>
> I am trying to define trials for a dataset. When I look for the events
> contained in the file (like this)
>
> cfg = [];
> cfg.dataset             = 'jenna.cnt'
> cfg.trialdef.eventtype = '?';
> dummy                   = definetrial(cfg);
>
> I get the following output.
>
> Reading Event Table...
> the following events were found in the datafile
> event type: 'trigger' with event values: 1  11  22  33
> no trials have been defined yet, see DEFINETRIAL for further help
> found 202 events
> created 0 trials
>
>
> Now, when I want to define the trials for all 'standard' events (which
> have the eventvalue '11'),
>
> % define trials
> cfg = [];
> cfg.dataset             = 'jenna.cnt'
> cfg.trialdef.eventtype = 'trigger'
> cfg.trialdef.eventvalue = { '11' };
> cfg_standard          = definetrial(cfg);
>
> I get the following error message.
>
> ??? Error using ==> cellstr at 34
> Input must be a string.
>
> Error in ==> cell.intersect at 44
>      a = cellstr(a);
>
> Error in ==> trialfun_general at 114
>    elseif ~isempty(intersect(event(i).value, cfg.trialdef.eventvalue))
>
> Error in ==> ft_definetrial at 110
>      [trl, event] = feval(cfg.trialfun, cfg);
>
> Error in ==> definetrial at 17
> [varargout{1:nargout}] = funhandle(varargin{:});
>
> How can I solve this problem? Am I doing something wrong? (I am using
> the most recent version of fieldtrip)
>
> Cheers,
>
> Henning
>
> --
> *************************
> Dr. Henning Holle,
> Department of Psychology,
> University of Sussex,
> Falmer, Brighton,
> BN1 9QH, U.K.
> Tel. : +44 (0)1273 877240
> Fax. : +44 (0)1273 678058
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From masaki.maruyama at CEA.FR  Wed Mar 10 10:51:46 2010
From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM)
Date: Wed, 10 Mar 2010 10:51:46 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: A<4B975EBF.2000609@donders.ru.nl>
Message-ID: 

Dear Roemer,

I greatly appreciate your prompt solving!!

With bests,
Masaki

>-----Message d'origine-----
>De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part
>de Roemer van der Meij
>Envoyé : mercredi 10 mars 2010 09:57
>À : FIELDTRIP at NIC.SURFNET.NL
>Objet : Re: [FIELDTRIP] clusterstats empty cfg.neighbours, cfg.neighbours
>example
>
>Dear Masaki,
>
>I'm verry sorry for that, I introduced a bug altering clusterstat.m the
>day before yesterday. This was resolved yesterday afternoon, so the most
>recent ftp-version will work appropriately again.
>
>Sorry for the inconvenience,
>
>Best,
>Roemer
>
>
>On 3/9/2010 7:04 PM, MARUYAMA Masaki INSERM wrote:
>> Dear Roemer,
>>
>>
>> The last version of fieldtrip fails the clustering in the default option,
>i.e., no specification of cfg.neighbouring. Since my script works correctly
>until the previous version, I'm afraid that the recent change might be a
>causal. Could you please confirm whether the default option can still work
>after the change?
>> An error message I received is attached below.
>>
>> Thank you in advance for your kind helps.
>>
>>
>> Sincerely yours,
>> Masaki Maruyama
>>
>>
>> ??? Undefined function or variable "channeighbstructmat".
>>
>> Error in ==>  clusterstat at 178
>>        posclusobs = findcluster(reshape(postailobs,
>[cfg.dim,1]),channeighbstructmat,cfg.minnbchan);
>>
>> Error in ==>  statistics_montecarlo at 305
>>    [stat, cfg] = clusterstat(cfg, statrand, statobs,'issource',issource);
>>
>> Error in ==>  statistics_wrapper at 275
>>      [stat, cfg] = statmethod(cfg, dat, cfg.design);
>>
>> Error in ==>  ft_timelockstatistics at 80
>> [stat, cfg] = statistics_wrapper(cfg, varargin{:});
>>
>> Error in ==>  timelockstatistics at 17
>> [varargout{1:nargout}] = funhandle(varargin{:});
>>
>>
>>
>>
>>
>>
>>
>>
>>> -----Message d'origine-----
>>> De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la
>part
>>> de Roemer van der Meij
>>> Envoyé : mardi 9 mars 2010 09:22
>>> À : FIELDTRIP at NIC.SURFNET.NL
>>> Objet : Re: [FIELDTRIP] clusterstats empty cfg.neighbours,
>cfg.neighbours
>>> example
>>>
>>> Hi Andrea,
>>>
>>> The bug should be fixed now, and cfg.neighbours should work as intedend.
>>> If you use cfg.neighbours = [] in your call to freqstatistics (or
>>> time-lock, etc...), clustering will not be done on channels. The fix
>>> should be there in the latest fieldtrip version on the ftp-server (put
>>> there last night at 23:00 I think).
>>>
>>> Happy to help,
>>>
>>> Best,
>>> Roemer
>>>
>>>
>>> On 3/5/2010 12:27 PM, Andrea Ostendorf wrote:
>>>
>>>> Dear Roemer,
>>>>
>>>> Thanks for your advice.
>>>> Since I would like to use Fieldtrip for TFC data and for images, with
>an
>>>> additional cluster-over-channels option in the case of the TFC data, I
>>>>
>>> now
>>>
>>>> edited clusterstat.
>>>> If called from a TFC script (I introduced a field in cfg for this), it
>>>>
>>> uses
>>>
>>>> the correction you gave to Chetan, otherwise it uses the former code.
>>>> This appears to work and the results make sense. However, I ask myself
>>>> whether there is an option for managing this without editing any
>>>>
>>> Fieldtrip
>>>
>>>> functions, just by cfg options?
>>>> Any help would be greatly appreciated.
>>>>
>>>> Thanks!
>>>> All the best
>>>> Andrea
>>>>
>>>>
>>>> ----------------------------------
>>>> The aim of this list is to facilitate the discussion between users of
>the
>>>>
>>> FieldTrip  toolbox, to share experiences and to discuss new ideas for
>MEG
>>> and EEG analysis. See also
>>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>>> http://www.ru.nl/neuroimaging/fieldtrip.
>>>
>>>>
>>> --
>>> Roemer van der Meij MSc
>>> Scientific Programmer&   Data-Analyst
>>> Donders Institute for Brain, Cognition and Behaviour
>>> Centre for Cognition
>>> P.O. Box 9104
>>> 6500 HE Nijmegen
>>> The Netherlands
>>> Tel: +31(0)24 3612631
>>> E-mail: r.vandermeij at donders.ru.nl
>>>
>>> ----------------------------------
>>> The aim of this list is to facilitate the discussion between users of
>the
>>> FieldTrip  toolbox, to share experiences and to discuss new ideas for
>MEG
>>> and EEG analysis. See also
>>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>>> http://www.ru.nl/neuroimaging/fieldtrip.
>>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the
>FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>and EEG analysis. See also
>http://listserv.surfnet.nl/archives/fieldtrip.html and
>http://www.ru.nl/neuroimaging/fieldtrip.
>>
>>
>
>--
>Roemer van der Meij MSc
>Scientific Programmer&  Data-Analyst
>Donders Institute for Brain, Cognition and Behaviour
>Centre for Cognition
>P.O. Box 9104
>6500 HE Nijmegen
>The Netherlands
>Tel: +31(0)24 3612631
>E-mail: r.vandermeij at donders.ru.nl
>
>----------------------------------
>The aim of this list is to facilitate the discussion between users of the
>FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>and EEG analysis. See also
>http://listserv.surfnet.nl/archives/fieldtrip.html and
>http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From aostendorf at BESA.DE  Wed Mar 10 11:36:23 2010
From: aostendorf at BESA.DE (Andrea Ostendorf)
Date: Wed, 10 Mar 2010 11:36:23 +0100
Subject: clusterstats empty cfg.neighbours, cfg.neighbours example
In-Reply-To: <4B975EBF.2000609@donders.ru.nl>
Message-ID: 

Dear Roemer,

thanks a lot for the bugfix! This was really quick. Clustering over
neighbouring channels or not in time-frequency data now works fine.
But somehow image statistics apparently does not work any more for me. I use
the same data and I have tried earlier versions of my script, too, which
used to work.
I attach the error message.

One more question: Could you tell me the correct cfg settings if I would
like to use the option cfg.avgoverchan = 'yes'? I always get an error for
that too, no matter how and whether I specify cfg.neighbours.

Sorry if I just got the settings wrong.

Thanks a lot!
All the best

Andrea

Error message in image script:

??? Error using ==> reshape
To RESHAPE the number of elements must not change.

Error in ==> fieldtrip-20100309\private\clusterstat at 179
      posclusobs = findcluster(reshape(postailobs,
[cfg.dim,1]),channeighbstructmat,cfg.minnbchan);

Error in ==> statistics_montecarlo at 305
  [stat, cfg] = clusterstat(cfg, statrand, statobs,'issource',issource);

Error in ==> fieldtrip-20100309\private\statistics_wrapper at 275
    [stat, cfg] = statmethod(cfg, dat, cfg.design);

Error in ==> ft_sourcestatistics at 103
      [stat, cfg] = statistics_wrapper(cfg, varargin{:});

Error in ==> compute_image_statistics at 148
stat = ft_sourcestatistics(cfg, sourcega1, sourcega2);


Error message for averaging over channels in TF data:

??? Error using ==> fieldtrip-20100309\private\findcluster at 37
invalid dimension of spatdimneighbstructmat

Error in ==> fieldtrip-20100309\private\clusterstat at 179
      posclusobs = findcluster(reshape(postailobs,
[cfg.dim,1]),channeighbstructmat,cfg.minnbchan);

Error in ==> statistics_montecarlo at 305
  [stat, cfg] = clusterstat(cfg, statrand, statobs,'issource',issource);

Error in ==> fieldtrip-20100309\private\statistics_wrapper at 275
    [stat, cfg] = statmethod(cfg, dat, cfg.design);

Error in ==> ft_freqstatistics at 89
  [stat, cfg] = statistics_wrapper(cfg, varargin{:});

Error in ==> compute_tfc_statistics at 516
    stat = ft_freqstatistics(cfg,set_1{:},set_2{:});

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From karl.doron at GMAIL.COM  Wed Mar 10 14:36:49 2010
From: karl.doron at GMAIL.COM (Karl Doron)
Date: Wed, 10 Mar 2010 14:36:49 +0100
Subject: single trial/channel phase angles
Message-ID: 

Hello,

I'm looking at some MEG data and have a hypothesis about cross frequency
coupling. Specifically, a relationship between lower frequency phase and
higher frequency amplitudes. I'm trying to save and view the phase angles
after doing wavelet analysis using wltconvol. 

If this is implemented -great! Otherwise, it seems that somewhere after line
216 of ft_freqanalysis_wltconvol.m (after the ifft), I should be able to
save the complex numbers and use angle(input) to find the phase angle of
each time point on a trial by trial basis. It seems easier to do in the
'tfr' wavelet code, but the time domain covolution is very slow.

Thanks for any help!

Karl Doron

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From jan.schoffelen at DONDERS.RU.NL  Wed Mar 10 15:32:17 2010
From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen)
Date: Wed, 10 Mar 2010 15:32:17 +0100
Subject: single trial/channel phase angles
In-Reply-To: 
Message-ID: 

Hi Karl,

freqanalysis with method = 'mtmconvol' allows you to keep the fourier
coefficients (cfg.output = 'fourier') so you'll get a complex
representation there.

Best,

Jan-Mathijs


On Mar 10, 2010, at 2:36 PM, Karl Doron wrote:

> Hello,
>
> I'm looking at some MEG data and have a hypothesis about cross
> frequency
> coupling. Specifically, a relationship between lower frequency phase
> and
> higher frequency amplitudes. I'm trying to save and view the phase
> angles
> after doing wavelet analysis using wltconvol.
>
> If this is implemented -great! Otherwise, it seems that somewhere
> after line
> 216 of ft_freqanalysis_wltconvol.m (after the ifft), I should be
> able to
> save the complex numbers and use angle(input) to find the phase
> angle of
> each time point on a trial by trial basis. It seems easier to do in
> the
> 'tfr' wavelet code, but the time domain covolution is very slow.
>
> Thanks for any help!
>
> Karl Doron
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users
> of the FieldTrip  toolbox, to share experiences and to discuss new
> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html
>  and http://www.ru.nl/neuroimaging/fieldtrip.
>

Dr. J.M. (Jan-Mathijs) Schoffelen
Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
Telephone: 0031-24-3668063

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From karl.doron at GMAIL.COM  Wed Mar 10 19:28:45 2010
From: karl.doron at GMAIL.COM (Karl Doron)
Date: Wed, 10 Mar 2010 19:28:45 +0100
Subject: single trial/channel phase angles
In-Reply-To: <6825D318-71BC-48D1-BD36-5401ED05A611@donders.ru.nl>
Message-ID: 

Hello Jan-Mathijs,

I'm able to find the complex trial data now, but I've been avoiding the
mtmconvol method because I don't have very good grasp on it. I'm getting
phase angles greater than pi. Is there a simple way to run it on some
simulated data?

I'm trying to find a periodic signal at 2Hz with non-stationary gamma
transients linked to its phase.

Thanks for any feedback!

-karl

On Wed, Mar 10, 2010 at 3:32 PM, jan-mathijs schoffelen <
jan.schoffelen at donders.ru.nl> wrote:

> Hi Karl,
>
> freqanalysis with method = 'mtmconvol' allows you to keep the fourier
> coefficients (cfg.output = 'fourier') so you'll get a complex representation
> there.
>
> Best,
>
> Jan-Mathijs
>
>
>
> On Mar 10, 2010, at 2:36 PM, Karl Doron wrote:
>
>  Hello,
>>
>> I'm looking at some MEG data and have a hypothesis about cross frequency
>> coupling. Specifically, a relationship between lower frequency phase and
>> higher frequency amplitudes. I'm trying to save and view the phase angles
>> after doing wavelet analysis using wltconvol.
>>
>> If this is implemented -great! Otherwise, it seems that somewhere after
>> line
>> 216 of ft_freqanalysis_wltconvol.m (after the ifft), I should be able to
>> save the complex numbers and use angle(input) to find the phase angle of
>> each time point on a trial by trial basis. It seems easier to do in the
>> 'tfr' wavelet code, but the time domain covolution is very slow.
>>
>> Thanks for any help!
>>
>> Karl Doron
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the
>> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>> and EEG analysis. See also
>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>> http://www.ru.nl/neuroimaging/fieldtrip.
>>
>>
> Dr. J.M. (Jan-Mathijs) Schoffelen
> Donders Institute for Brain, Cognition and Behaviour,
> Centre for Cognitive Neuroimaging,
> Radboud University Nijmegen, The Netherlands
> J.Schoffelen at donders.ru.nl
> Telephone: 0031-24-3668063
>
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From brian.roach at YALE.EDU  Wed Mar 10 19:51:39 2010
From: brian.roach at YALE.EDU (Brian Roach)
Date: Wed, 10 Mar 2010 10:51:39 -0800
Subject: single trial/channel phase angles
In-Reply-To: <1fc4dff91003101028i5460461bn63c1d9edb8fad448@mail.gmail.com>
Message-ID: 

Hi Karl,

You can use wltconvol if you edit it.  If you step through the code, and
find the spot where data are converted form complex numbers to power
values, you only need to remove the abs(***) statement to keep the data
in complex form.  This is how we've done it, but you may have a
different version of the code:

if keep == 1
             powdum = (2.* abs(autspctrmacttap)  ./ data.fsample) .^ 2;
         elseif keep == 2
             %this is where we retain complex values:
             powdum = (autspctrmacttap  ./ data.fsample);
         end


Hope this helps,
Brian
On 3/10/2010 10:28 AM, Karl Doron wrote:
> Hello Jan-Mathijs,
>
> I'm able to find the complex trial data now, but I've been avoiding
> the mtmconvol method because I don't have very good grasp on it. I'm
> getting phase angles greater than pi. Is there a simple way to run it
> on some simulated data?
>
> I'm trying to find a periodic signal at 2Hz with non-stationary gamma
> transients linked to its phase.
>
> Thanks for any feedback!
>
> -karl
>
> On Wed, Mar 10, 2010 at 3:32 PM, jan-mathijs schoffelen
> >
> wrote:
>
>     Hi Karl,
>
>     freqanalysis with method = 'mtmconvol' allows you to keep the
>     fourier coefficients (cfg.output = 'fourier') so you'll get a
>     complex representation there.
>
>     Best,
>
>     Jan-Mathijs
>
>
>
>     On Mar 10, 2010, at 2:36 PM, Karl Doron wrote:
>
>         Hello,
>
>         I'm looking at some MEG data and have a hypothesis about cross
>         frequency
>         coupling. Specifically, a relationship between lower frequency
>         phase and
>         higher frequency amplitudes. I'm trying to save and view the
>         phase angles
>         after doing wavelet analysis using wltconvol.
>
>         If this is implemented -great! Otherwise, it seems that
>         somewhere after line
>         216 of ft_freqanalysis_wltconvol.m (after the ifft), I should
>         be able to
>         save the complex numbers and use angle(input) to find the
>         phase angle of
>         each time point on a trial by trial basis. It seems easier to
>         do in the
>         'tfr' wavelet code, but the time domain covolution is very slow.
>
>         Thanks for any help!
>
>         Karl Doron
>
>         ----------------------------------
>         The aim of this list is to facilitate the discussion between
>         users of the FieldTrip  toolbox, to share experiences and to
>         discuss new ideas for MEG and EEG analysis. See also
>         http://listserv.surfnet.nl/archives/fieldtrip.html and
>         http://www.ru.nl/neuroimaging/fieldtrip.
>
>
>     Dr. J.M. (Jan-Mathijs) Schoffelen
>     Donders Institute for Brain, Cognition and Behaviour,
>     Centre for Cognitive Neuroimaging,
>     Radboud University Nijmegen, The Netherlands
>     J.Schoffelen at donders.ru.nl 
>     Telephone: 0031-24-3668063
>
>
>     ----------------------------------
>     The aim of this list is to facilitate the discussion between users
>     of the FieldTrip  toolbox, to share experiences and to discuss new
>     ideas for MEG and EEG analysis. See also
>     http://listserv.surfnet.nl/archives/fieldtrip.html and
>     http://www.ru.nl/neuroimaging/fieldtrip.
>
>
> ----------------------------------
>
> The aim of this list is to facilitate the discussion between users of
> the FieldTrip toolbox, to share experiences and to discuss new ideas
> for MEG and EEG analysis.
>
> http://listserv.surfnet.nl/archives/fieldtrip.html
>
> http://www.ru.nl/fcdonders/fieldtrip/
>


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From r.oostenveld at FCDONDERS.RU.NL  Wed Mar 10 21:57:25 2010
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Wed, 10 Mar 2010 21:57:25 +0100
Subject: reading bdf+ files?
In-Reply-To: <4B94C3B7.5090709@uni-konstanz.de>
Message-ID: 

Hi Thomas,


On 8 Mar 2010, at 10:30, Thomas Hartmann wrote:
> thanks for the quick answere.
> yes, bdf+ is bdf with an annotation-channel added. this channel is unlike the bdf trigger channel. so this, as i had already expected, explains the problem.
> 
> my major motivation for using bdf+ is the availability of a ready-to-use c++ library. unfortunatly it only writes bdf+ or edf+, not the "standard" format.
> 
> does someone know of a stable, well-documented, free library (c or c++) to write eeg-data in a format, fieldtrip can read?


I would probably write it in a brainvision analyzer alike format. Although I am not aware of formal/official documentation, the file format is very simple (and widely supported). It consists of an ascii header file (*.vhdr), an ascii marker file (*.vmrk) and a binary file with the data. Although the data file is normally binary, it can also be ascii (but that makes reading it very inefficient).

The ascii header file (ini-like) explains the format of the binary file, which can have different data formats (int16,32 and probably floats) and be multiplexed or not. 

On ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/subj2.zip you can find some example data which is used in http://fieldtrip.fcdonders.nl/tutorial/continuous. I don't know the details of that particular dataset, but probably it is pretty standard. I guess it has 64 channels 32 bit continuous recording with 5 to 10 different trigger values in it. Combined with fieldtrip/fileio/private/read_brainvision_vhdr, read_brainvision_eeg and read_brainvision_vmrk you can probably easily figure out what the file format is. Writing the two text files and a binary multiplexed file could easily be done without a C++ library. I just realised that in fieldtrip you can also export to that file format using the write_data function. Have a look in fieldtrip/fileio/private/write_brainvision_eeg for the details of the simplest format. 

Hmm, a more challenging problem from the C++ perspective then is to implement the accompanying *reader* for it. In Matlab that is simple, but parsing the text files in C++ and going over all possible options and sub-formats would be non-trivial in C++. You might want to have a look at http://biosig.sourceforge.net/projects.html to see whether that provides a C++ solution.

best regards,
Robert

 

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From thomas.hartmann at UNI-KONSTANZ.DE  Thu Mar 11 00:38:05 2010
From: thomas.hartmann at UNI-KONSTANZ.DE (Thomas Hartmann)
Date: Thu, 11 Mar 2010 00:38:05 +0100
Subject: reading bdf+ files?
In-Reply-To: 
Message-ID: 

hi robert,
thanks again for the detailed answere. i have indeed already thought
about the brainvision format. what makes me favor bdf is the fact that
it only works with one file. renaming a brainvision-file is a problem as
filenames are used to identify trigger and data files.

as i got to know the bdf format quite well in the last days, i would
prefere that one if its well supported in fieldtrip. i would propably
have to write my own lib for that, but the format seems pretty straight
forward.

can you give me a hint of how triggers are stored in the "original"
biosemi bdf format? from what i understood, they use an extra channel
with the same samplingrate as the others, writing the trigger values as
24bit values, thus constisting of 3 bytes each. each of the byte seems
to have a different meaning. do you know something about that?

best regards,
thomas

Am 10.03.2010 21:57, schrieb Robert Oostenveld:
> Hi Thomas,
>
>
> On 8 Mar 2010, at 10:30, Thomas Hartmann wrote:
>
>> thanks for the quick answere.
>> yes, bdf+ is bdf with an annotation-channel added. this channel is unlike the bdf trigger channel. so this, as i had already expected, explains the problem.
>>
>> my major motivation for using bdf+ is the availability of a ready-to-use c++ library. unfortunatly it only writes bdf+ or edf+, not the "standard" format.
>>
>> does someone know of a stable, well-documented, free library (c or c++) to write eeg-data in a format, fieldtrip can read?
>>
>
> I would probably write it in a brainvision analyzer alike format. Although I am not aware of formal/official documentation, the file format is very simple (and widely supported). It consists of an ascii header file (*.vhdr), an ascii marker file (*.vmrk) and a binary file with the data. Although the data file is normally binary, it can also be ascii (but that makes reading it very inefficient).
>
> The ascii header file (ini-like) explains the format of the binary file, which can have different data formats (int16,32 and probably floats) and be multiplexed or not.
>
> On ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/subj2.zip you can find some example data which is used in http://fieldtrip.fcdonders.nl/tutorial/continuous. I don't know the details of that particular dataset, but probably it is pretty standard. I guess it has 64 channels 32 bit continuous recording with 5 to 10 different trigger values in it. Combined with fieldtrip/fileio/private/read_brainvision_vhdr, read_brainvision_eeg and read_brainvision_vmrk you can probably easily figure out what the file format is. Writing the two text files and a binary multiplexed file could easily be done without a C++ library. I just realised that in fieldtrip you can also export to that file format using the write_data function. Have a look in fieldtrip/fileio/private/write_brainvision_eeg for the details of the simplest format.
>
> Hmm, a more challenging problem from the C++ perspective then is to implement the accompanying *reader* for it. In Matlab that is simple, but parsing the text files in C++ and going over all possible options and sub-formats would be non-trivial in C++. You might want to have a look at http://biosig.sourceforge.net/projects.html to see whether that provides a C++ solution.
>
> best regards,
> Robert
>
>
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>


--
Dipl. Psych. Thomas Hartmann

OBOB-Lab
University of Konstanz
Department of Psychology
P.O. Box D25
78457 Konstanz
Germany

Tel.: +49 (0)7531 88 4612
Fax: +49 (0)7531-88 4601
Email: thomas.hartmann at uni-konstanz.de
Homepage: http://www.uni-konstanz.de/obob

"I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle)

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From karl.doron at GMAIL.COM  Thu Mar 11 11:26:31 2010
From: karl.doron at GMAIL.COM (Karl Doron)
Date: Thu, 11 Mar 2010 11:26:31 +0100
Subject: single trial/channel phase angles
In-Reply-To: <4B97E99B.10900@ncire.org>
Message-ID: 

Great! - thanks for the helpful information. Now I'm having trouble
recovering frequencies below 6Hz using the wltconvol method. My trial time
window is 3.5 seconds, so I am guessing this has to do with a minimum number
of time bins left from the partial artifact rejection.

Does anyone have any recommendations for setting a minimum trial length, and
where I might do this?  minoffset?

Thanks,
karl doron

On Wed, Mar 10, 2010 at 7:48 PM, Brian Roach  wrote:

>  Hi Karl,
>
> You can use wltconvol if you edit it.  If you step through the code, and
> find the spot where data are converted form complex numbers to power values,
> you only need to remove the abs(***) statement to keep the data in complex
> form.  This is how we've done it, but you may have a different version of
> the code:
>
> if keep == 1
>             powdum = (2.* abs(autspctrmacttap)  ./ data.fsample) .^ 2;
>         elseif keep == 2
>             %this is where we retain complex values:
>             powdum = (autspctrmacttap  ./ data.fsample);
>         end
>
>
> Hope this helps,
> Brian
>
>
>
> On 3/10/2010 10:28 AM, Karl Doron wrote:
>
> Hello Jan-Mathijs,
>
> I'm able to find the complex trial data now, but I've been avoiding the
> mtmconvol method because I don't have very good grasp on it. I'm getting
> phase angles greater than pi. Is there a simple way to run it on some
> simulated data?
>
> I'm trying to find a periodic signal at 2Hz with non-stationary gamma
> transients linked to its phase.
>
> Thanks for any feedback!
>
> -karl
>
> On Wed, Mar 10, 2010 at 3:32 PM, jan-mathijs schoffelen <
> jan.schoffelen at donders.ru.nl> wrote:
>
>> Hi Karl,
>>
>> freqanalysis with method = 'mtmconvol' allows you to keep the fourier
>> coefficients (cfg.output = 'fourier') so you'll get a complex representation
>> there.
>>
>> Best,
>>
>> Jan-Mathijs
>>
>>
>>
>> On Mar 10, 2010, at 2:36 PM, Karl Doron wrote:
>>
>>  Hello,
>>>
>>> I'm looking at some MEG data and have a hypothesis about cross frequency
>>> coupling. Specifically, a relationship between lower frequency phase and
>>> higher frequency amplitudes. I'm trying to save and view the phase angles
>>> after doing wavelet analysis using wltconvol.
>>>
>>> If this is implemented -great! Otherwise, it seems that somewhere after
>>> line
>>> 216 of ft_freqanalysis_wltconvol.m (after the ifft), I should be able to
>>> save the complex numbers and use angle(input) to find the phase angle of
>>> each time point on a trial by trial basis. It seems easier to do in the
>>> 'tfr' wavelet code, but the time domain covolution is very slow.
>>>
>>> Thanks for any help!
>>>
>>> Karl Doron
>>>
>>> ----------------------------------
>>> The aim of this list is to facilitate the discussion between users of the
>>> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>>> and EEG analysis. See also
>>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>>> http://www.ru.nl/neuroimaging/fieldtrip.
>>>
>>>
>>  Dr. J.M. (Jan-Mathijs) Schoffelen
>> Donders Institute for Brain, Cognition and Behaviour,
>> Centre for Cognitive Neuroimaging,
>> Radboud University Nijmegen, The Netherlands
>> J.Schoffelen at donders.ru.nl
>> Telephone: 0031-24-3668063
>>
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the
>> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>> and EEG analysis. See also
>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>> http://www.ru.nl/neuroimaging/fieldtrip.
>>
>
> ----------------------------------
>
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and
> EEG analysis.
>
> http://listserv.surfnet.nl/archives/fieldtrip.html
>
> http://www.ru.nl/fcdonders/fieldtrip/
>
>
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From r.vandermeij at DONDERS.RU.NL  Thu Mar 11 11:44:17 2010
From: r.vandermeij at DONDERS.RU.NL (Roemer van der Meij)
Date: Thu, 11 Mar 2010 11:44:17 +0100
Subject: Label display problem with ft_topoplotER for EEG-MEG data
In-Reply-To: <4b0f659b1003030616k235ffc75n4a787e1fb5095bcb@mail.gmail.com>
Message-ID: 

Hi Lucie,

Could you perhaps send the script with the relevant options you used
with a bit of data so I can try to replicate the bug? If your data has
to be larger than a 1 or 2 MB you can also send it my e-mail address
(see signature).
This would be very helpful in fixing the bug.

Thanks in advance,

Best,
Roemer




On 3/3/2010 3:16 PM, Lucie Charles wrote:
> Hi everyone ,
>
> I noticed a small bug using ft_topoplotER with my EEG-MEG data that I
> think I managed to correct.
>
> When I try to use the option :
>
> /cfg.highlight = ' labels '
> /or /
> cfg.marker  = ' labels '/
>
> I have an error message saying that it doesn't find coordinates for
> some labels (see at the end for the entire message). I looked into it
> and it seems that EEG channels are always in the list of channels that
> the function tries to plot even if I'm trying to plot only
> magnetometers for example.
>
> I made two small changes at the ft_topoplotER and it seems to solve
> the problem :
>
> /line 606 >  templay.label      =  data.label(labelindex);
> /instead of
> /templay.label      = //channelselection(cfg.highlightchannel{icell},
> data.label);/
>
> /line 631 >  templay.label    = data.label(labelindex); /
> instead of /
> templay.label    =
> channelselection(setdiff(1:length(data.label),highlightchansel),
> data.label);
>
> /This solution works fine for me but I'm not sure that it will work in
> any case./
> /
> Still I hope it helps.
>
> Cheers,
>
> Lucie CHARLES
>
>
>
> Error Message :
>
> /??? Error using ==> text
> Each string specified must have a corresponding set of coordinates
>
> Error in ==> plot_lay at 73
>   text(X+labeloffset, Y+(labeloffset*1.5), Lbl,'fontsize',labelsize);
>
> Error in ==> ft_topoplotER at 617
>     plot_lay(templay,'box','no','label',labelflg,'point','yes',...
>
> Error in ==> topoplotER at 17
> [varargout{1:nargout}] = funhandle(varargin{:});/
>
> ----------------------------------
>
> The aim of this list is to facilitate the discussion between users of
> the FieldTrip toolbox, to share experiences and to discuss new ideas
> for MEG and EEG analysis.
>
> http://listserv.surfnet.nl/archives/fieldtrip.html
>
> http://www.ru.nl/fcdonders/fieldtrip/
>

--
Roemer van der Meij MSc
Scientific Programmer&  Data-Analyst
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognition
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
Tel: +31(0)24 3612631
E-mail: r.vandermeij at donders.ru.nl


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From zaifengg at GMAIL.COM  Fri Mar 12 11:07:48 2010
From: zaifengg at GMAIL.COM (gao zai)
Date: Fri, 12 Mar 2010 12:07:48 +0200
Subject: Questions on High pass filter and Padding in Preprocessing
Message-ID: 

Dear all,

I am now working on the MEG data in 4D format. Since it was collected in DC,
so I want to first use a bandpass filter [0.1 80] to filter my data.
However, I found that the latter part of averaged results drifted away
relative to the  results when no filter or only a low-pass filter is used
(see the attached Fig.1). I thought it may be related to the end effect, so
I used cfg.padding=1, it didn't work. Latter I turned to use cfg.padding=10
(1/.1=10) it works and no obvious drift was found.

However, when tried to only apply a high pass filter to the raw data,
regardless of using cfg.padding=10, the results always showed a square wave
(see Fig.2). And there is a warning:"Matrix is close to singular or badly
scaled. Results may be inaccurate. RCOND = 6.669292e-17."I don't understand
why this happened. Does anybody know what is the problem with it? How can I
get a right result in this case? Thank you very much.

The script I used:
----------------------------------------------------
cfg=[];
cfg.dataset ='c,rfDC';
cfg.trialdef.eventtype  = 'TRIGGER';
cfg.trialdef.eventvalue =42;
cfg.trialdef.prestim    = 1;
cfg.trialdef.poststim   = 1.5;
cfg.trialdef.offset     = 1;
cfg.trialfun            = 'mytrialfun';
cfg = definetrial(cfg);

%for band pass
%cfg.bpfilter='yes';
%cfg.bpfreq=[0.1 80];

%padding
cfg.padding=10;

%for hp filter
cfg.hpfilter='yes';    %high pass filter
cfg.hpfreq=0.1;         %cutoff

cfg.blc = 'yes'; %baseline correct
cfg.blcwindow  = [-0.30 -0.10];
cfg.channel={'MEG'};
[data] = preprocessing(cfg);
--------------------------------

Best,
Feng

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Fig1.png
Type: image/png
Size: 11637 bytes
Desc: not available
URL: 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Fig.2_square wave.png
Type: image/png
Size: 1041 bytes
Desc: not available
URL: 

From a.wollbrink at UNI-MUENSTER.DE  Fri Mar 12 11:33:28 2010
From: a.wollbrink at UNI-MUENSTER.DE (Andreas Wollbrink)
Date: Fri, 12 Mar 2010 11:33:28 +0100
Subject: support for Besa Toolbox for .avr files
Message-ID: 

Dear all,

is there any reason the support for the high level input functions
provided by the Besa Toolbox (by Carsten Hochstaetter) is not
implemented in the besa2fieldtrip function in case using the 'besa_avr'
file format even the related function readBESAavr.m does exist?
For the other formats (besa_mul, besa_tfc, besa_swf, besa_src) this is
realised using the hasbes(-toolbox) switch.

Thanks in advance,
Andreas Wollbrink

--


======================================================================

   Andreas Wollbrink, Biomedical Engineer

   Institute for Biomagnetism and Biosignalanalysis       	
   Muenster University Hospital

   Malmedyweg 15        phone:   +49-(0)251-83-52546
   D-48149 Muenster     fax:     +49-(0)251-83-56874	
   Germany
                        e-Mail: a.wollbrink at uni-muenster.de

======================================================================

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From aostendorf at BESA.DE  Fri Mar 12 11:52:06 2010
From: aostendorf at BESA.DE (Andrea Ostendorf)
Date: Fri, 12 Mar 2010 11:52:06 +0100
Subject: support for Besa Toolbox for .avr files
In-Reply-To: <4B9A1878.5050907@uni-muenster.de>
Message-ID: 

Dear Andreas,

Thanks for noticing. readBESAavr has not been included for long. I will see
to it.

Best,
Andrea
 
> -----Original Message-----
> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On
> Behalf Of Andreas Wollbrink
> Sent: Freitag, 12. März 2010 11:33
> To: FIELDTRIP at NIC.SURFNET.NL
> Subject: [FIELDTRIP] support for Besa Toolbox for .avr files
> 
> Dear all,
> 
> is there any reason the support for the high level input functions
> provided by the Besa Toolbox (by Carsten Hochstaetter) is not
> implemented in the besa2fieldtrip function in case using the 'besa_avr'
> file format even the related function readBESAavr.m does exist?
> For the other formats (besa_mul, besa_tfc, besa_swf, besa_src) this is
> realised using the hasbes(-toolbox) switch.
> 
> Thanks in advance,
> Andreas Wollbrink
> 
> --
> 
> 
> ======================================================================
> 
>    Andreas Wollbrink, Biomedical Engineer
> 
>    Institute for Biomagnetism and Biosignalanalysis
>    Muenster University Hospital
> 
>    Malmedyweg 15        phone:   +49-(0)251-83-52546
>    D-48149 Muenster     fax:     +49-(0)251-83-56874
>    Germany
>                         e-Mail: a.wollbrink at uni-muenster.de
> 
> ======================================================================
> 
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
> 
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4937 (20100311) __________
> 
> The message was checked by ESET NOD32 Antivirus.
> 
> http://www.eset.com
> 

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From aostendorf at BESA.DE  Sun Mar 14 17:26:49 2010
From: aostendorf at BESA.DE (Andrea Ostendorf)
Date: Sun, 14 Mar 2010 17:26:49 +0100
Subject: support for Besa Toolbox for .avr files
In-Reply-To: <4B9A1878.5050907@uni-muenster.de>
Message-ID: 

Dear Mr Wollbrink,

In the current Fieldtrip version, readBESAavr has been implemented. Thank
you for noticing the omission!

Best regards
Andrea Ostendorf 

Dr. Andrea Ostendorf
Research & Development
 
MEGIS Software GmbH
Freihamer Str. 18
82166 Gräfelfing/Germany
HRB München 109956
CEOs: Dr. Michael Scherg, Theodor Scherg
 
 

> -----Original Message-----
> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On
> Behalf Of Andreas Wollbrink
> Sent: Freitag, 12. März 2010 11:33
> To: FIELDTRIP at NIC.SURFNET.NL
> Subject: [FIELDTRIP] support for Besa Toolbox for .avr files
> 
> Dear all,
> 
> is there any reason the support for the high level input functions
> provided by the Besa Toolbox (by Carsten Hochstaetter) is not
> implemented in the besa2fieldtrip function in case using the 'besa_avr'
> file format even the related function readBESAavr.m does exist?
> For the other formats (besa_mul, besa_tfc, besa_swf, besa_src) this is
> realised using the hasbes(-toolbox) switch.
> 
> Thanks in advance,
> Andreas Wollbrink
> 
> --
> 
> 
> ======================================================================
> 
>    Andreas Wollbrink, Biomedical Engineer
> 
>    Institute for Biomagnetism and Biosignalanalysis
>    Muenster University Hospital
> 
>    Malmedyweg 15        phone:   +49-(0)251-83-52546
>    D-48149 Muenster     fax:     +49-(0)251-83-56874
>    Germany
>                         e-Mail: a.wollbrink at uni-muenster.de
> 
> ======================================================================
> 
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
> 
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4937 (20100311) __________
> 
> The message was checked by ESET NOD32 Antivirus.
> 
> http://www.eset.com
> 

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From a.wollbrink at UNI-MUENSTER.DE  Mon Mar 15 09:40:19 2010
From: a.wollbrink at UNI-MUENSTER.DE (Andreas Wollbrink)
Date: Mon, 15 Mar 2010 09:40:19 +0100
Subject: support for Besa Toolbox for .avr files
In-Reply-To: 
Message-ID: 

Dear Mrs Ostendorf,

thanks for implementing the readBESAavr function.

Unfortunately the code fails in case no channel labels are defined in
the second row of the .avr file (which were optionally at least in
previous versions of Besa).

To fix the problem you may add a few lines to the besa2fieldtrip
function (see below) to account for a missing 'ChannelLabels' field in
the ('tmp') structure returned by 'readBESAavr':

data.label = [];
if isfield(tmp, 'ChannelLabels'),
	data.label = fixlabels(tmp.ChannelLabels);
end


In this case later on the channel labels have to be defined either
manually by the user or they can be determined from other files (see below).

dat = besa2fieldtrip(avrFile);
dat.elec = read_sens(elecPosFile);
if isempty(dat.label), dat.label = dat.elec.label; end


Regards,
Andreas Wollbrink


On 03/14/10 17:26, Andrea Ostendorf wrote:
> Dear Mr Wollbrink,
>
> In the current Fieldtrip version, readBESAavr has been implemented. Thank
> you for noticing the omission!
>
> Best regards
> Andrea Ostendorf
>
> Dr. Andrea Ostendorf
> Research&  Development
>
> MEGIS Software GmbH
> Freihamer Str. 18
> 82166 Gräfelfing/Germany
> HRB München 109956
> CEOs: Dr. Michael Scherg, Theodor Scherg
>
>
>
>> -----Original Message-----
>> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On
>> Behalf Of Andreas Wollbrink
>> Sent: Freitag, 12. März 2010 11:33
>> To: FIELDTRIP at NIC.SURFNET.NL
>> Subject: [FIELDTRIP] support for Besa Toolbox for .avr files
>>
>> Dear all,
>>
>> is there any reason the support for the high level input functions
>> provided by the Besa Toolbox (by Carsten Hochstaetter) is not
>> implemented in the besa2fieldtrip function in case using the 'besa_avr'
>> file format even the related function readBESAavr.m does exist?
>> For the other formats (besa_mul, besa_tfc, besa_swf, besa_src) this is
>> realised using the hasbes(-toolbox) switch.
>>
>> Thanks in advance,
>> Andreas Wollbrink
>>
>> --
>>
>>
>> ======================================================================
>>
>>     Andreas Wollbrink, Biomedical Engineer
>>
>>     Institute for Biomagnetism and Biosignalanalysis
>>     Muenster University Hospital
>>
>>     Malmedyweg 15        phone:   +49-(0)251-83-52546
>>     D-48149 Muenster     fax:     +49-(0)251-83-56874
>>     Germany
>>                          e-Mail: a.wollbrink at uni-muenster.de
>>
>> ======================================================================
>>
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users of the
>> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>> and EEG analysis. See also
>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>> http://www.ru.nl/neuroimaging/fieldtrip.
>>
>> __________ Information from ESET NOD32 Antivirus, version of virus
>> signature database 4937 (20100311) __________
>>
>> The message was checked by ESET NOD32 Antivirus.
>>
>> http://www.eset.com
>>
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.

--


======================================================================

   Andreas Wollbrink, Biomedical Engineer

   Institute for Biomagnetism and Biosignalanalysis       	
   Muenster University Hospital

   Malmedyweg 15        phone:   +49-(0)251-83-52546
   D-48149 Muenster     fax:     +49-(0)251-83-56874	
   Germany
                        e-Mail: a.wollbrink at uni-muenster.de

======================================================================

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From aostendorf at BESA.DE  Mon Mar 15 10:26:11 2010
From: aostendorf at BESA.DE (Andrea Ostendorf)
Date: Mon, 15 Mar 2010 10:26:11 +0100
Subject: support for Besa Toolbox for .avr files
In-Reply-To: <4B9DF273.4090201@uni-muenster.de>
Message-ID: 

Dear Mr Wollbrink,

Thanks for noticing! I saw that read_besa_avr had a problem if the elp file
did not contain the optional channel labels but omitted to test
besa2fieldtrip with readBESAavr for an elp file without channel labels.
Sorry about that. I just amended besa2fieldtrip using your advice.
Thanks!

Best regards
Andrea Ostendorf


 
> -----Original Message-----
> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On
> Behalf Of Andreas Wollbrink
> Sent: Montag, 15. März 2010 09:40
> To: FIELDTRIP at NIC.SURFNET.NL
> Subject: Re: [FIELDTRIP] support for Besa Toolbox for .avr files
> 
> Dear Mrs Ostendorf,
> 
> thanks for implementing the readBESAavr function.
> 
> Unfortunately the code fails in case no channel labels are defined in
> the second row of the .avr file (which were optionally at least in
> previous versions of Besa).
> 
> To fix the problem you may add a few lines to the besa2fieldtrip
> function (see below) to account for a missing 'ChannelLabels' field in
> the ('tmp') structure returned by 'readBESAavr':
> 
> data.label = [];
> if isfield(tmp, 'ChannelLabels'),
> 	data.label = fixlabels(tmp.ChannelLabels);
> end
> 
> 
> In this case later on the channel labels have to be defined either
> manually by the user or they can be determined from other files (see
> below).
> 
> dat = besa2fieldtrip(avrFile);
> dat.elec = read_sens(elecPosFile);
> if isempty(dat.label), dat.label = dat.elec.label; end
> 
> 
> Regards,
> Andreas Wollbrink
> 
> 
> On 03/14/10 17:26, Andrea Ostendorf wrote:
> > Dear Mr Wollbrink,
> >
> > In the current Fieldtrip version, readBESAavr has been implemented.
> Thank
> > you for noticing the omission!
> >
> > Best regards
> > Andrea Ostendorf
> >
> > Dr. Andrea Ostendorf
> > Research&  Development
> >
> > MEGIS Software GmbH
> > Freihamer Str. 18
> > 82166 Gräfelfing/Germany
> > HRB München 109956
> > CEOs: Dr. Michael Scherg, Theodor Scherg
> >
> >
> >
> >> -----Original Message-----
> >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On
> >> Behalf Of Andreas Wollbrink
> >> Sent: Freitag, 12. März 2010 11:33
> >> To: FIELDTRIP at NIC.SURFNET.NL
> >> Subject: [FIELDTRIP] support for Besa Toolbox for .avr files
> >>
> >> Dear all,
> >>
> >> is there any reason the support for the high level input functions
> >> provided by the Besa Toolbox (by Carsten Hochstaetter) is not
> >> implemented in the besa2fieldtrip function in case using the 'besa_avr'
> >> file format even the related function readBESAavr.m does exist?
> >> For the other formats (besa_mul, besa_tfc, besa_swf, besa_src) this is
> >> realised using the hasbes(-toolbox) switch.
> >>
> >> Thanks in advance,
> >> Andreas Wollbrink
> >>
> >> --
> >>
> >>
> >> ======================================================================
> >>
> >>     Andreas Wollbrink, Biomedical Engineer
> >>
> >>     Institute for Biomagnetism and Biosignalanalysis
> >>     Muenster University Hospital
> >>
> >>     Malmedyweg 15        phone:   +49-(0)251-83-52546
> >>     D-48149 Muenster     fax:     +49-(0)251-83-56874
> >>     Germany
> >>                          e-Mail: a.wollbrink at uni-muenster.de
> >>
> >> ======================================================================
> >>
> >> ----------------------------------
> >> The aim of this list is to facilitate the discussion between users of
> the
> >> FieldTrip  toolbox, to share experiences and to discuss new ideas for
> MEG
> >> and EEG analysis. See also
> >> http://listserv.surfnet.nl/archives/fieldtrip.html and
> >> http://www.ru.nl/neuroimaging/fieldtrip.
> >>
> >> __________ Information from ESET NOD32 Antivirus, version of virus
> >> signature database 4937 (20100311) __________
> >>
> >> The message was checked by ESET NOD32 Antivirus.
> >>
> >> http://www.eset.com
> >>
> >
> > ----------------------------------
> > The aim of this list is to facilitate the discussion between users of
> the FieldTrip  toolbox, to share experiences and to discuss new ideas for
> MEG and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
> 
> --
> 
> 
> ======================================================================
> 
>    Andreas Wollbrink, Biomedical Engineer
> 
>    Institute for Biomagnetism and Biosignalanalysis
>    Muenster University Hospital
> 
>    Malmedyweg 15        phone:   +49-(0)251-83-52546
>    D-48149 Muenster     fax:     +49-(0)251-83-56874
>    Germany
>                         e-Mail: a.wollbrink at uni-muenster.de
> 
> ======================================================================
> 
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
> 
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4940 (20100312) __________
> 
> The message was checked by ESET NOD32 Antivirus.
> 
> http://www.eset.com
> 

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From jonas at OBLESER.DE  Tue Mar 16 09:29:39 2010
From: jonas at OBLESER.DE (Jonas Obleser)
Date: Tue, 16 Mar 2010 09:29:39 +0100
Subject: depsampregrT: no difference between contrasts?
Message-ID: 


Hello FTs,
here comes a question concerning the wonderful stats function

depsampregrT

I am using it mainly for running time–frequency–electrode cluster tests. I usually use contrasts like cfg.contrastcoefs=[-3 -1 1 3] and it has proven pretty powerful.

With a new data set, I sadly have only three levels of data, which is of course always a bit of a pain for linear contrasts.
What puzzles me is that

[-2 -1 3] (i.e., linear increase; trying to keep it zero-weighted)

and 

[-1 2 -1]  (i.e. trying to crudely model an inverse u-shape relationship)

give the very same result (not exactly numerically,  but very much in terms of clusters, down to very similar p-values, etc).

Q: Any idea why this might be the case?
Of course, linear and cubic trends can be sometimes both significant, but I was slightly worried seeing this strong concordance in this case.

(Also, does any of you have a better/best/gold standard way to model 3-level linear contrasts? mathematically, in [-1 0 1], the middle condition is basically switched off, isn’t it.)

Anyway, thanks very much for a quick reply!
Best wishes, Jonas




http://jonasobleser.com
+49 171 6993337 mobile
+49 341 304 7980  home






----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From e.maris at DONDERS.RU.NL  Wed Mar 17 10:56:47 2010
From: e.maris at DONDERS.RU.NL (Eric Maris)
Date: Wed, 17 Mar 2010 10:56:47 +0100
Subject: depsampregrT: no difference between contrasts?
In-Reply-To: 
Message-ID: 

Dear Jonas,

 

 

here comes a question concerning the wonderful stats function

 

depsampregrT

 

I am using it mainly for running time–frequency–electrode cluster tests. I usually use contrasts like cfg.contrastcoefs=[-3 -1 1 3] and it has proven pretty powerful.

 

With a new data set, I sadly have only three levels of data, which is of course always a bit of a pain for linear contrasts.

What puzzles me is that

 

[-2 -1 3] (i.e., linear increase; trying to keep it zero-weighted)

 

and 

 

[-1 2 -1]  (i.e. trying to crudely model an inverse u-shape relationship)

 

give the very same result (not exactly numerically,  but very much in terms of clusters, down to very similar p-values, etc).

 

Q: Any idea why this might be the case?

Of course, linear and cubic trends can be sometimes both significant, but I was slightly worried seeing this strong concordance in this case.

 

(Also, does any of you have a better/best/gold standard way to model 3-level linear contrasts? mathematically, in [-1 0 1], the middle condition is basically switched off, isn’t it.)

 

I’m not sure, but it may reflect a property in your data. If the first two levels show about the same mean physiological response and only the third level differs, then your observation is what you should expect.

 

 

Best,

 

 

 

 

 

 

Anyway, thanks very much for a quick reply!

Best wishes, Jonas

 

 

 


http://jonasobleser.com

+49 171 6993337 mobile

+49 341 304 7980  home

 

 





 

----------------------------------

The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.

http://listserv.surfnet.nl/archives/fieldtrip.html

http://www.ru.nl/fcdonders/fieldtrip/


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From ElisabethSusanne.May at UNI-DUESSELDORF.DE  Thu Mar 18 09:51:01 2010
From: ElisabethSusanne.May at UNI-DUESSELDORF.DE (Elisabeth May)
Date: Thu, 18 Mar 2010 09:51:01 +0100
Subject: questions on ICA to remove EOG artifacts from MEG data
Message-ID: 

Dear Fieldtrip users,

I am trying to use independent component analysis (ft_componentanalysis)
to remove eye artifacts from my MEG data. The dataset was recorded with
the Neuromag 306 system and contains two conditions with 40 trials each
(one where a painful laser stimulation was applied to the subject's
right hand and one where the same stimulation was applied to the left
hand). So far, I am trying to do the ICA just for the gradiometers on
preprocessed data (after removal of bad channels) and then plotting the
topographies of the components to identify and then reject components
representing the eye artifacts (as suggested in the example script on
the Fieldtrip webpage). I have used different settings with the default
option cfg.method = 'runica' (no PCA before ICA, different numbers of
principal components to be retained (cfg.runica.pca), both conditions
sepparately and together...). However, I have never gotten component
topographies that I can clearly identify as components representing eye
artifacts (showing two sources right above the eyes), although there are
almost 200 eye artifacts in the 80 trials of this data set (i.e. there
was usually more than one EOG artifact in every single trial). So I am
still wondering about a few questions on the exact settings for the ICA
in my case and if I am missing something really obvious:

    * Is it correct to do the ICA on both horizontal and vertical
      gradiometers together and then plot them sepparately to identify
      artifacts?
    * Should I do the PCA before the ICA and if so, how many principal
      components should I retain?
    * Should I do the ICA on both conditions together or sepparately
      (since I expect different sources to be activated in both
      conditions, e.g. one of the two primary somatsensory cortices
      activated according to stimulation of the right or left hand)?
    * Is it accurate enough to use complete trials for the component
      analysis or do I have to extract and use just the parts containing
      EOG artifacts?
    * And finally, are the component topographies usually sufficient to
      identify eye artifacts?

Any help or advise on this would be greatly appreciated! Thanks in advance,
Elisabeth


--
Dipl.-Psych. Elisabeth May

Universitätsklinikum Düsseldorf
Institut für Klinische Neurowissenschaften und Medizinische Psychologie
Universitätsstr. 1
40225 Düsseldorf

Tel: +49 211 81-18075

http://www.uniklinik-duesseldorf.de/med-psychologie

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From h.holle at SUSSEX.AC.UK  Thu Mar 18 18:58:55 2010
From: h.holle at SUSSEX.AC.UK (Henning Holle)
Date: Thu, 18 Mar 2010 17:58:55 +0000
Subject: artifact rejection of continuous data in fieldtrip
Message-ID: 

Dear list members,

I have a more general question about how continuous data is treated in
fieldtrip. After playing around with the package for a bit, I noticed
that although using continuous data is in principle supported, sooner or
later one always runs into a dead-end, because most functions assume
that trials are defined very early on in the processing tree (i.e., they
don't work without a cfg.trl present). For instance, most artifact
rejection functions seem to work only on epoched data.

I have used EEProbe previously, and what I quite liked about that
program was that is was possible to do artifact rejection once for the
continuous data set, and subsequently one was free to define trials
however one wanted to. In contrast, in fieldtrip one is forced to do a
new artifact rejection (which is very time-consuming!), when one chooses
to analyse the ERPs time-locked to a different event. Or am I missing
something here?

Is there a possibility to do an artifact rejction before the data is cut
into epochs?

Best wishes

Henning

--
*************************
Dr. Henning Holle,
Department of Psychology,
University of Sussex,
Falmer, Brighton,
BN1 9QH, U.K.
Tel. : +44 (0)1273 877240
Fax. : +44 (0)1273 678058

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From masaki.maruyama at CEA.FR  Thu Mar 18 19:26:20 2010
From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM)
Date: Thu, 18 Mar 2010 19:26:20 +0100
Subject: questions on ICA to remove EOG artifacts from MEG data
In-Reply-To: A<4BA1E975.3080101@uni-duesseldorf.de>
Message-ID: 

Dear Elisabeth,


I am a person who uses the ICA to Neuromag data. As far as I understand your data, at least one blink component should be found with the typical blink-topography. My first impression is that you might separate latitude and longitude gradiometers incorrectly in plotting topographies. Have you already obtained reasonable topographies with your script? If it is not the case, it will be difficult for me to give you appropriate suggestions.


>    * Is it correct to do the ICA on both horizontal and vertical
>      gradiometers together and then plot them sepparately to identify
>      artifacts?

I don't see any theoretical reason why we must do separately. Indeed, I apply ICA both gradiometers (GMs) and magnetometers (MMs) together. As far as I examined details for few subjects' results, its performance becomes more stable than ICA to GMs alone. 
To apply ICA together, GMs and MMs must be I normalised separately before ICA, since the scale of signals is different between these types of sensors and Neuromag data often need PCA before ICA (Please see my response to the next question). After the ICA, I inversely normalized to recover the original scales. 

>    * Should I do the PCA before the ICA and if so, how many principal
>      components should I retain?

I would say YES to users of 306ch Neuromag system. Without reducing the number of decomposing components, ICA results often contain complex values. Probably it is because the number of components to be decomposed (306) is too large relative to the number of actual components in MEG data. I always use PCA to reduce the components from 306 to around 80. If you applied SST in addition to SSS using Maxfilter (Neuromag preprocessing software), you may need to reduce more. 

>    * Should I do the ICA on both conditions together or sepparately
>      (since I expect different sources to be activated in both
>      conditions, e.g. one of the two primary somatsensory cortices
>      activated according to stimulation of the right or left hand)?

Arguments on this issue will be very similar to those on the optimization of spatial filter in beamformer (common across conditions <--> separately). You will find out advantages/disadvantages on the fieldtrip website. I use common ICA, since it avoids a risk of removing different noise components from different conditions.      

>    * Is it accurate enough to use complete trials for the component
>      analysis or do I have to extract and use just the parts containing
>      EOG artifacts?

I would recommend doing the standard method explained on the fieldtrip website: Decompose MEG data of whole trials and get topography components -> Decompose the segmented data using the topography components. 

>    * And finally, are the component topographies usually sufficient to
>      identify eye artifacts?

I think the usage of topographies alone does not highlight advantages of ICA. ICA decomposes data so that temporal independency between components becomes maximum, whereas PCA decomposes so that topographies of components are orthogonal to each other. Therefore, the timing of EOG noises is much helpful to identify in ICA. 



Sincerely yours,
Masaki Maruyama







>-----Message d'origine-----
>De : FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] De la part
>de Elisabeth May
>Envoyé : jeudi 18 mars 2010 09:51
>À : FIELDTRIP at NIC.SURFNET.NL
>Objet : [FIELDTRIP] questions on ICA to remove EOG artifacts from MEG data
>
>Dear Fieldtrip users,
>
>I am trying to use independent component analysis (ft_componentanalysis)
>to remove eye artifacts from my MEG data. The dataset was recorded with
>the Neuromag 306 system and contains two conditions with 40 trials each
>(one where a painful laser stimulation was applied to the subject's
>right hand and one where the same stimulation was applied to the left
>hand). So far, I am trying to do the ICA just for the gradiometers on
>preprocessed data (after removal of bad channels) and then plotting the
>topographies of the components to identify and then reject components
>representing the eye artifacts (as suggested in the example script on
>the Fieldtrip webpage). I have used different settings with the default
>option cfg.method = 'runica' (no PCA before ICA, different numbers of
>principal components to be retained (cfg.runica.pca), both conditions
>sepparately and together...). However, I have never gotten component
>topographies that I can clearly identify as components representing eye
>artifacts (showing two sources right above the eyes), although there are
>almost 200 eye artifacts in the 80 trials of this data set (i.e. there
>was usually more than one EOG artifact in every single trial). So I am
>still wondering about a few questions on the exact settings for the ICA
>in my case and if I am missing something really obvious:
>
>    * Is it correct to do the ICA on both horizontal and vertical
>      gradiometers together and then plot them sepparately to identify
>      artifacts?
>    * Should I do the PCA before the ICA and if so, how many principal
>      components should I retain?
>    * Should I do the ICA on both conditions together or sepparately
>      (since I expect different sources to be activated in both
>      conditions, e.g. one of the two primary somatsensory cortices
>      activated according to stimulation of the right or left hand)?
>    * Is it accurate enough to use complete trials for the component
>      analysis or do I have to extract and use just the parts containing
>      EOG artifacts?
>    * And finally, are the component topographies usually sufficient to
>      identify eye artifacts?
>
>Any help or advise on this would be greatly appreciated! Thanks in advance,
>Elisabeth
>
>
>--
>Dipl.-Psych. Elisabeth May
>
>Universitätsklinikum Düsseldorf
>Institut für Klinische Neurowissenschaften und Medizinische Psychologie
>Universitätsstr. 1
>40225 Düsseldorf
>
>Tel: +49 211 81-18075
>
>http://www.uniklinik-duesseldorf.de/med-psychologie
>
>----------------------------------
>The aim of this list is to facilitate the discussion between users of the
>FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>and EEG analysis. See also
>http://listserv.surfnet.nl/archives/fieldtrip.html and
>http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From h.holle at SUSSEX.AC.UK  Thu Mar 18 19:54:42 2010
From: h.holle at SUSSEX.AC.UK (Henning Holle)
Date: Thu, 18 Mar 2010 18:54:42 +0000
Subject: impossible to call definetrials after preprocessing?
Message-ID: 

Dear list members,

I have an EEG data set, for which I prepared the EOG channels for
artifact rejection and referenced the EEG data to linked mastoids (as
described here http://fieldtrip.fcdonders.nl/example/re-referencing).

I thought I'd do this once at the beginning, save the dataset to disk,
and then continue with definetrials. However, definetrials only seems to
be able read raw data, not the matlab data set I created by the
re-rereferencing procedure. Does that mean that I can only prepare EOG
channels and  re-rereferencing after calling definetrials? (which would
duplicate a lot of code...) Or is there also another of doing this that
involves less duplication of code?

Many thanks in advance,

Henning


--
*************************
Dr. Henning Holle,
Department of Psychology,
University of Sussex,
Falmer, Brighton,
BN1 9QH, U.K.
Tel. : +44 (0)1273 877240
Fax. : +44 (0)1273 678058

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From matthew.mollison at COLORADO.EDU  Thu Mar 18 20:13:04 2010
From: matthew.mollison at COLORADO.EDU (Matt Mollison)
Date: Thu, 18 Mar 2010 13:13:04 -0600
Subject: artifact rejection of continuous data in fieldtrip
In-Reply-To: <4BA269DF.4050400@sussex.ac.uk>
Message-ID: 

Dr. Holle,

In initially learning to use FieldTrip I set up a script to do artifact
detection/rejection on continuous data, but I have since switched to
segmented processing because, as you say, it is just easier to deal with
segmented trials.  The way I coded it is as follows, but I cannot be sure
that it is correct because I did not extensively compare continuous to
segmented preprocessing.

This does artifact detection before epoching (which is the time consuming
part, especially on continuous data), and the actual rejection occurs after
defining events.  Playing around with different epochs does not sound as
easy as you describe for EEProbe, but I think the nature of the FT data
structure prevents what you are looking for from happening (i.e., the actual
data is stored in the struct and is not just referencing a continuous file).
 If anyone has suggestions or corrections, I would like to hear them as
well.

1. Read in the continuous data.
2. Read in electrode locations.
3. Set up EOG vertical and horizontal channels and append them to the data.
4. Lowpass and line noise (DFT) filter.
5. Use eventtype = '?' and trialfun = 'trialfun_general' in ft_definetrial,
and then define 1 big trial by manually set the resulting cfg's trl field to
be [1 length(data.time{1}) 0]; then run ft_preprocessing with the cfg that
has the modified trl field.
6. Detect artifacts across the continuous data using whichever functions are
appropriate. Note: Use a unique name for the resulting cfg as it is used
later; do not reject artifacts yet.

I start a for loop here for each event type; this contains steps 7–10.

7. Use ft_definetrial with your own trialfun to get a cfg and then
ft_redefinetrial to get the data in trial format.
8. Use ft_rejectartifact with the cfg from step 6, and then ft_preprocessing
to get the trials without artifacts.
9. Finish with any remaining preprocessing (rereference, baseline
correction, etc.).
10. Store this event type in a struct, indexed by the number of event types
for this subject.

I hope that helps. Again, any improvements on this would be interesting to
hear. Maybe a FT wiki page could be made describing this process.

Matt

--
Univ. of Colorado at Boulder
Dept. of Psychology and Neuroscience
matthew.mollison at colorado.edu
http://psych.colorado.edu/~mollison/


On Thu, Mar 18, 2010 at 11:58 AM, Henning Holle wrote:

> Dear list members,
>
> I have a more general question about how continuous data is treated in
> fieldtrip. After playing around with the package for a bit, I noticed that
> although using continuous data is in principle supported, sooner or later
> one always runs into a dead-end, because most functions assume that trials
> are defined very early on in the processing tree (i.e., they don't work
> without a cfg.trl present). For instance, most artifact rejection functions
> seem to work only on epoched data.
>
> I have used EEProbe previously, and what I quite liked about that program
> was that is was possible to do artifact rejection once for the continuous
> data set, and subsequently one was free to define trials however one wanted
> to. In contrast, in fieldtrip one is forced to do a new artifact rejection
> (which is very time-consuming!), when one chooses to analyse the ERPs
> time-locked to a different event. Or am I missing something here?
>
> Is there a possibility to do an artifact rejction before the data is cut
> into epochs?
>
> Best wishes
>
> Henning
>
> --
> *************************
> Dr. Henning Holle,
> Department of Psychology,
> University of Sussex,
> Falmer, Brighton,
> BN1 9QH, U.K.
> Tel. : +44 (0)1273 877240
> Fax. : +44 (0)1273 678058
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From nathanweisz at MAC.COM  Thu Mar 18 21:32:46 2010
From: nathanweisz at MAC.COM (Nathan Weisz)
Date: Thu, 18 Mar 2010 21:32:46 +0100
Subject: artifact rejection of continuous data in fieldtrip
In-Reply-To: <4BA269DF.4050400@sussex.ac.uk>
Message-ID: 

dear henning,

is this what you want?
http://sccn.ucsd.edu/wiki/Chapter_01:_Rejecting_Artifacts#Rejecting_artifacts_in_continuous_data

you could then do some preprocessing in eeglab, epoch the data and the get your data into fieldtrip via eeglab2fieldtrip.m.

good luck,
nathan

On 18.03.2010, at 18:58, Henning Holle wrote:

> Dear list members,
>
> I have a more general question about how continuous data is treated in fieldtrip. After playing around with the package for a bit, I noticed that although using continuous data is in principle supported, sooner or later one always runs into a dead-end, because most functions assume that trials are defined very early on in the processing tree (i.e., they don't work without a cfg.trl present). For instance, most artifact rejection functions seem to work only on epoched data.
>
> I have used EEProbe previously, and what I quite liked about that program was that is was possible to do artifact rejection once for the continuous data set, and subsequently one was free to define trials however one wanted to. In contrast, in fieldtrip one is forced to do a new artifact rejection (which is very time-consuming!), when one chooses to analyse the ERPs time-locked to a different event. Or am I missing something here?
>
> Is there a possibility to do an artifact rejction before the data is cut into epochs?
>
> Best wishes
>
> Henning
>
> --
> *************************
> Dr. Henning Holle,
> Department of Psychology,
> University of Sussex,
> Falmer, Brighton,
> BN1 9QH, U.K.
> Tel. : +44 (0)1273 877240
> Fax. : +44 (0)1273 678058
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.

--------------------------------------------
Dr. Nathan Weisz

OBOB-Lab
University of Konstanz
Department of Psychology
P.O. Box D23
78457 Konstanz
Germany

Tel: ++49 - (0)7531 - 88 45 84
Email: nathan.weisz at uni-konstanz.de
Homepage: http://www.uni-konstanz.de/obob

"Nothing shocks me. I'm a scientist." (Indiana Jones)


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From lhunt at FMRIB.OX.AC.UK  Thu Mar 18 21:51:29 2010
From: lhunt at FMRIB.OX.AC.UK (Laurence Hunt)
Date: Thu, 18 Mar 2010 20:51:29 +0000
Subject: questions on ICA to remove EOG artifacts from MEG data
In-Reply-To: <4BA1E975.3080101@uni-duesseldorf.de>
Message-ID: 

Dear Elisabeth,

I'm not very experienced with using ICA nor with using fieldtrip, but I do have some experience of obtaining reliable eyeblink spatial topographies from Neuromag 306 data (using SPM), so I thought I'd chip in with some advice...

On 18 Mar 2010, at 08:51, Elisabeth May wrote:

> Dear Fieldtrip users,
> 
> I am trying to use independent component analysis (ft_componentanalysis) to remove eye artifacts from my MEG data. The dataset was recorded with the Neuromag 306 system and contains two conditions with 40 trials each (one where a painful laser stimulation was applied to the subject's right hand and one where the same stimulation was applied to the left hand). So far, I am trying to do the ICA just for the gradiometers on preprocessed data (after removal of bad channels) and then plotting the topographies of the components to identify and then reject components representing the eye artifacts (as suggested in the example script on the Fieldtrip webpage). I have used different settings with the default option cfg.method = 'runica' (no PCA before ICA, different numbers of principal components to be retained (cfg.runica.pca), both conditions sepparately and together...). However, I have never gotten component topographies that I can clearly identify as components representing eye artifacts (showing two sources right above the eyes), although there are almost 200 eye artifacts in the 80 trials of this data set (i.e. there was usually more than one EOG artifact in every single trial). So I am still wondering about a few questions on the exact settings for the ICA in my case and if I am missing something really obvious:
> 
>   * Is it correct to do the ICA on both horizontal and vertical
>     gradiometers together and then plot them sepparately to identify
>     artifacts?

Yes, this sounds sensible - there should be covariance across horizontal and vertical gradiometers during an eyeblink, which should help you in isolating a component, but of course they will have a very different spatial topography, which means you would want to plot them separately. I have attached a snapshot of an eyeblink component that I identified, in vertical and horizontal gradiometers (top left and top right), magnetometers (bottom left), and 60 EEG sensors (bottom right). Note that I didn't obtain this component with ICA, but with PCA of an 'average eyeblink' (see below).

>   * Should I do the PCA before the ICA and if so, how many principal
>     components should I retain?
>   * Should I do the ICA on both conditions together or sepparately
>     (since I expect different sources to be activated in both
>     conditions, e.g. one of the two primary somatsensory cortices
>     activated according to stimulation of the right or left hand)?
>   * Is it accurate enough to use complete trials for the component
>     analysis or do I have to extract and use just the parts containing
>     EOG artifacts?

In my (limited) experience, I have had good success identifying eyeblink components with a slightly simpler method than ICA. I epoch the data with respect to well-identified eyeblinks (detected using EOG), then create an 'average eyeblink' using these epochs, so that I know what the timecourse of an eyeblink should look on average look like. I then just run a simple PCA on this 'average eyeblink', and normally the eyeblink is well captured by the first (and sometimes second) spatial component of this PCA. I then use this PCA map just as you might use an ICA map, i.e. regress it out of the raw (original) data. As a sanity check, you can correlate the timecourse of this component against the EOG channel, and this should correlate quite nicely. You can also try recomputing the average eyeblink after you have regressed the component out of the data, in order to see that it has been effective in removing most of the artefact.

I find this a bit simpler than ICA, and maybe comes with a few advantages. First, it doesn't use all the data to derive the components, only the data epoched around EOG-detected eyeblinks, so it is quite a bit faster on big datasets. Second, by creating an average eyeblink, it removes any variability in the data driven by other boring stuff (like the brain :) ), so it should pretty much always be the component which explains the most variance in the 'average' eyeblink (i.e. the first principal component). Finally, it is important to note that although the method requires you to detect some eyeblinks using the EOG channel, it is still robust against you failing to detect all eyeblinks, as the regression is done on the raw data, rather than just on the epochs where you have already detected the blinks.

However, there are some caveats; the first being that you assume that all eyeblinks look similar (in my experience they do), and perhaps more importantly that the component doesn't change (spatially) during the course of the experiment - with Neuromag data, you might be able to get around this to some extent by using Maxfilter for movement compensation. I think these caveats both also apply to ICA, but I'd be interested to hear other people's thoughts (particularly those who have more experience with ICA). Finally, I guess if you are interested in isolating interesting (brain) signals as well as boring (noise) signals simultaneously, then ICA is the way to go. I use this method just to remove eyeblinks before I do subsequent processing.

>   * And finally, are the component topographies usually sufficient to
>     identify eye artifacts?
> 

I find with this method they are very easy to identify, and I imagine they would be reasonably straightforward in ICA also? Again, perhaps someone with more ICA experience can comment...

> Any help or advise on this would be greatly appreciated! Thanks in advance,
> Elisabeth
> 
> 

Hope this helps,
Laurence



===========================================
Laurence Hunt, DPhil Student
 Centre for Functional MRI of the Brain (FMRIB), 
University of Oxford
lhunt at fmrib.ox.ac.uk
Phone: (+44)1865-(2)22738
===========================================
----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: blinkcomp.jpeg
Type: image/jpg
Size: 133395 bytes
Desc: not available
URL: 

From brian.roach at YALE.EDU  Thu Mar 18 22:38:24 2010
From: brian.roach at YALE.EDU (Brian Roach)
Date: Thu, 18 Mar 2010 14:38:24 -0700
Subject: research jobs in San Francisco, CA
Message-ID: 

Dear fieldtrip users,

We are hiring for multiple positions in our San Francisco-based
schizophrenia brain-imaging EEG research lab.  Please visit the links
below for additional details:

http://jobs-ncire.icims.com/jobs/1504/job
http://jobs-ncire.icims.com/jobs/1505/job

Thank you,
Brian

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From p.toffanin at RUG.NL  Fri Mar 19 08:28:11 2010
From: p.toffanin at RUG.NL (Paolo Toffanin)
Date: Fri, 19 Mar 2010 08:28:11 +0100
Subject: impossible to call definetrials after preprocessing?
In-Reply-To: <4BA276F2.3060109@sussex.ac.uk>
Message-ID: 

Call 'define' trial first and then use 'redefinetrial'

HTH
Paolo
On Thursday 18 March 2010 07:54:42 pm you wrote:
> Dear list members,
>
> I have an EEG data set, for which I prepared the EOG channels for
> artifact rejection and referenced the EEG data to linked mastoids (as
> described here http://fieldtrip.fcdonders.nl/example/re-referencing).
>
> I thought I'd do this once at the beginning, save the dataset to disk,
> and then continue with definetrials. However, definetrials only seems to
> be able read raw data, not the matlab data set I created by the
> re-rereferencing procedure. Does that mean that I can only prepare EOG
> channels and  re-rereferencing after calling definetrials? (which would
> duplicate a lot of code...) Or is there also another of doing this that
> involves less duplication of code?
>
> Many thanks in advance,
>
> Henning

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From ElisabethSusanne.May at UNI-DUESSELDORF.DE  Fri Mar 19 10:01:16 2010
From: ElisabethSusanne.May at UNI-DUESSELDORF.DE (Elisabeth May)
Date: Fri, 19 Mar 2010 10:01:16 +0100
Subject: questions on ICA to remove EOG artifacts from MEG data
In-Reply-To: 
Message-ID: 

Dear Masaki, dear Laurence,

thank you a lot for your really quick and extensive replies to my long
list of questions!

Masaki, you are right with your first point: so far I am not completely
sure that my plotting scripts correctly sepparates the two gradiometer
types. I do get the same results with my plotting function and
ft_topoplotIC. However, I use my own layout files for horizontal and
vertical gradiometers in both functions so there might be something
wrong with the layout files. I'll check those again to be sure. I'll
also try to scale gradiometers and magnetometers and do ICA on all
sensors together.

Laurence, thank you for the plots, they will give me a better idea of
what to look for! I only want to use ICA to remove artifacts from my
data so I guess I might try the approach you suggested, too.

I'll let you know as soon as I make any progress with my data!

Thanks again and best wishes,
Elisabeth

> Dear Elisabeth,
>
> I'm not very experienced with using ICA nor with using fieldtrip, but
> I do have some experience of obtaining reliable eyeblink spatial
> topographies from Neuromag 306 data (using SPM), so I thought I'd chip
> in with some advice...
>
> On 18 Mar 2010, at 08:51, Elisabeth May wrote:
>
>> Dear Fieldtrip users,
>>
>> I am trying to use independent component analysis
>> (ft_componentanalysis) to remove eye artifacts from my MEG data. The
>> dataset was recorded with the Neuromag 306 system and contains two
>> conditions with 40 trials each (one where a painful laser stimulation
>> was applied to the subject's right hand and one where the same
>> stimulation was applied to the left hand). So far, I am trying to do
>> the ICA just for the gradiometers on preprocessed data (after removal
>> of bad channels) and then plotting the topographies of the components
>> to identify and then reject components representing the eye artifacts
>> (as suggested in the example script on the Fieldtrip webpage). I have
>> used different settings with the default option cfg.method = 'runica'
>> (no PCA before ICA, different numbers of principal components to be
>> retained (cfg.runica.pca), both conditions sepparately and
>> together...). However, I have never gotten component topographies
>> that I can clearly identify as components representing eye artifacts
>> (showing two sources right above the eyes), although there are almost
>> 200 eye artifacts in the 80 trials of this data set (i.e. there was
>> usually more than one EOG artifact in every single trial). So I am
>> still wondering about a few questions on the exact settings for the
>> ICA in my case and if I am missing something really obvious:
>>
>>   * Is it correct to do the ICA on both horizontal and vertical
>>     gradiometers together and then plot them sepparately to identify
>>     artifacts?
>
> Yes, this sounds sensible - there should be covariance across
> horizontal and vertical gradiometers during an eyeblink, which should
> help you in isolating a component, but of course they will have a very
> different spatial topography, which means you would want to plot them
> separately. I have attached a snapshot of an eyeblink component that I
> identified, in vertical and horizontal gradiometers (top left and top
> right), magnetometers (bottom left), and 60 EEG sensors (bottom
> right). Note that I didn't obtain this component with ICA, but with
> PCA of an 'average eyeblink' (see below).
>
>>   * Should I do the PCA before the ICA and if so, how many principal
>>     components should I retain?
>>   * Should I do the ICA on both conditions together or sepparately
>>     (since I expect different sources to be activated in both
>>     conditions, e.g. one of the two primary somatsensory cortices
>>     activated according to stimulation of the right or left hand)?
>>   * Is it accurate enough to use complete trials for the component
>>     analysis or do I have to extract and use just the parts containing
>>     EOG artifacts?
>
> In my (limited) experience, I have had good success identifying
> eyeblink components with a slightly simpler method than ICA. I epoch
> the data with respect to well-identified eyeblinks (detected using
> EOG), then create an 'average eyeblink' using these epochs, so that I
> know what the timecourse of an eyeblink should look on average look
> like. I then just run a simple PCA on this 'average eyeblink', and
> normally the eyeblink is well captured by the first (and sometimes
> second) spatial component of this PCA. I then use this PCA map just as
> you might use an ICA map, i.e. regress it out of the raw (original)
> data. As a sanity check, you can correlate the timecourse of this
> component against the EOG channel, and this should correlate quite
> nicely. You can also try recomputing the average eyeblink after you
> have regressed the component out of the data, in order to see that it
> has been effective in removing most of the artefact.
>
> I find this a bit simpler than ICA, and maybe comes with a few
> advantages. First, it doesn't use all the data to derive the
> components, only the data epoched around EOG-detected eyeblinks, so it
> is quite a bit faster on big datasets. Second, by creating an average
> eyeblink, it removes any variability in the data driven by other
> boring stuff (like the brain :) ), so it should pretty much always be
> the component which explains the most variance in the 'average'
> eyeblink (i.e. the first principal component). Finally, it is
> important to note that although the method requires you to detect
> /some/ eyeblinks using the EOG channel, it is still robust against you
> failing to detect /all/ eyeblinks, as the regression is done on the
> raw data, rather than just on the epochs where you have already
> detected the blinks.
>
> However, there are some caveats; the first being that you assume that
> all eyeblinks look similar (in my experience they do), and perhaps
> more importantly that the component doesn't change (spatially) during
> the course of the experiment - with Neuromag data, you might be able
> to get around this to some extent by using Maxfilter for movement
> compensation. I think these caveats both also apply to ICA, but I'd be
> interested to hear other people's thoughts (particularly those who
> have more experience with ICA). Finally, I guess if you are interested
> in isolating interesting (brain) signals as well as boring (noise)
> signals simultaneously, then ICA is the way to go. I use this method
> just to remove eyeblinks before I do subsequent processing.
>
>>   * And finally, are the component topographies usually sufficient to
>>     identify eye artifacts?
>>
>
> I find with this method they are very easy to identify, and I imagine
> they would be reasonably straightforward in ICA also? Again, perhaps
> someone with more ICA experience can comment...
>
>> Any help or advise on this would be greatly appreciated! Thanks in
>> advance,
>> Elisabeth
>>
>>
>
> Hope this helps,
> Laurence
>
>
> ===========================================
> Laurence Hunt, DPhil Student
>  Centre for Functional MRI of the Brain (FMRIB),
> University of Oxford
> lhunt at fmrib.ox.ac.uk 
> Phone: (+44)1865-(2)22738
> ===========================================
>
> ----------------------------------
>
> The aim of this list is to facilitate the discussion between users of
> the FieldTrip toolbox, to share experiences and to discuss new ideas
> for MEG and EEG analysis.
>
> http://listserv.surfnet.nl/archives/fieldtrip.html
>
> http://www.ru.nl/fcdonders/fieldtrip/
>


--
Dipl.-Psych. Elisabeth May

Universitätsklinikum Düsseldorf
Institut für Klinische Neurowissenschaften und Medizinische Psychologie
Universitätsstr. 1
40225 Düsseldorf

Tel: +49 211 81-18075

http://www.uniklinik-duesseldorf.de/med-psychologie

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From r.oostenveld at FCDONDERS.RU.NL  Fri Mar 19 11:21:02 2010
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Fri, 19 Mar 2010 11:21:02 +0100
Subject: Questions on High pass filter and Padding in Preprocessing
In-Reply-To: 
Message-ID: 

Dear Feng,

On 12 Mar 2010, at 11:07, gao zai wrote:
> I am now working on the MEG data in 4D format. Since it was
> collected in DC, so I want to first use a bandpass filter [0.1 80]
> to filter my data. However, I found that the latter part of averaged
> results drifted away relative to the  results when no filter or only
> a low-pass filter is used (see the attached Fig.1). I thought it may
> be related to the end effect, so I used cfg.padding=1, it didn't work.

the padding option in ft_preprocessing pads the data _to_ the
specified length, not _with_ the indicated length. In your case
according to the figure the trial was ~2.5 seconds long, i.e. already
longer than 1 second, so cfg.padding=1 did not have an efefct (whereas
cfg.padding=10 does).

> Latter I turned to use cfg.padding=10 (1/.1=10) it works and no
> obvious drift was found.
>
> However, when tried to only apply a high pass filter to the raw
> data, regardless of using cfg.padding=10, the results always showed
> a square wave (see Fig.2). And there is a warning:"Matrix is close
> to singular or badly scaled. Results may be inaccurate. RCOND =
> 6.669292e-17."I don't understand why this happened. Does anybody
> know what is the problem with it? How can I get a right result in
> this case? Thank you very much.

You specified cfg.hpfreq=0.1, i.e. that frequencies below 0.1 Hz
should be removed. These frequencies correspond to dripfts in the data
of about 10 seconds. The data segment you are working with is only 2.5
seconds, so removing the 10 second drift fails. You can increase the
cfg.hpfreq to around 1/2.5 = 0.4 Hz, which would be the lowest
frequency that can be estimated from the 2.5 second data segment.

Alternatively, you could use the following pipeline

cfg=[];
cfg.dataset ='c,rfDC';
cfg.continuous = 'yes';
cfg.hpfilter = 'yes';
cfg.hpfreq = 0.1;
datacnt = ft_preprocessing(cfg);

to read it into memory as one continuous segment, and apply the filter
on the complete data.

Then you can do

cfg=[];
cfg.dataset ='c,rfDC';
cfg.trialdef.eventtype  = 'TRIGGER';
cfg.trialdef.eventvalue =42;
cfg.trialdef.prestim    = 1;
cfg.trialdef.poststim   = 1.5;
cfg.trialdef.offset     = 1;
cfg.trialfun            = 'mytrialfun';
cfg = definetrial(cfg);

followed by

datatrl = ft_redefinetrial(cfg, datacnt);

Reading all data (also the inter-trial interval, the breaks, and the
instruction periods) into memory requires a lot of RAM. If it does not
fit all at once, you could do the above section for small groups of
channels

cfg.channel = 1:10;
% cfg.channel = 11:20;
% cfg.channel = 21:30;
% ...

and then call ft_appenddata([], datatrl_changroup1,
datatrl_changroup2, ...)

best,
Robert











----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From r.oostenveld at FCDONDERS.RU.NL  Fri Mar 19 11:26:40 2010
From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld)
Date: Fri, 19 Mar 2010 11:26:40 +0100
Subject: questions on ICA to remove EOG artifacts from MEG data
In-Reply-To: <4BA33D5C.1030503@uni-duesseldorf.de>
Message-ID: 

Dear Elisabeth,

please note that Saskia has just created a draft page on the wiki for  
using ICA to remove EOG artifacts from MEG data. Have a look here
http://fieldtrip.fcdonders.nl/example/use_independent_component_analysis_ica_to_remove_eog_artifacts 
. The example there is using 151 channel CTF data avaoalble from the  
ftp server.

Feel free to improve the documentation on that page. Since the  
plotting of the topographies is tricky for the mixed planar/ 
magnetometer data that you are working on, I can imagine that  
especially using the topographies for identifying the components  
requires a neuromag specific approach.

best,
Robert


On 19 Mar 2010, at 10:01, Elisabeth May wrote:

> Dear Masaki, dear Laurence,
>
> thank you a lot for your really quick and extensive replies to my  
> long list of questions!
>
> Masaki, you are right with your first point: so far I am not  
> completely sure that my plotting scripts correctly sepparates the  
> two gradiometer types. I do get the same results with my plotting  
> function and ft_topoplotIC. However, I use my own layout files for  
> horizontal and vertical gradiometers in both functions so there  
> might be something wrong with the layout files. I'll check those  
> again to be sure. I'll also try to scale gradiometers and  
> magnetometers and do ICA on all sensors together.
>
> Laurence, thank you for the plots, they will give me a better idea  
> of what to look for! I only want to use ICA to remove artifacts from  
> my data so I guess I might try the approach you suggested, too.
>
> I'll let you know as soon as I make any progress with my data!
>
> Thanks again and best wishes,
> Elisabeth
>
>> Dear Elisabeth,
>>
>> I'm not very experienced with using ICA nor with using fieldtrip,  
>> but I do have some experience of obtaining reliable eyeblink  
>> spatial topographies from Neuromag 306 data (using SPM), so I  
>> thought I'd chip in with some advice...
>>
>> On 18 Mar 2010, at 08:51, Elisabeth May wrote:
>>
>>> Dear Fieldtrip users,
>>>
>>> I am trying to use independent component analysis  
>>> (ft_componentanalysis) to remove eye artifacts from my MEG data.  
>>> The dataset was recorded with the Neuromag 306 system and contains  
>>> two conditions with 40 trials each (one where a painful laser  
>>> stimulation was applied to the subject's right hand and one where  
>>> the same stimulation was applied to the left hand). So far, I am  
>>> trying to do the ICA just for the gradiometers on preprocessed  
>>> data (after removal of bad channels) and then plotting the  
>>> topographies of the components to identify and then reject  
>>> components representing the eye artifacts (as suggested in the  
>>> example script on the Fieldtrip webpage). I have used different  
>>> settings with the default option cfg.method = 'runica' (no PCA  
>>> before ICA, different numbers of principal components to be  
>>> retained (cfg.runica.pca), both conditions sepparately and  
>>> together...). However, I have never gotten component topographies  
>>> that I can clearly identify as components representing eye  
>>> artifacts (showing two sources right above the eyes), although  
>>> there are almost 200 eye artifacts in the 80 trials of this data  
>>> set (i.e. there was usually more than one EOG artifact in every  
>>> single trial). So I am still wondering about a few questions on  
>>> the exact settings for the ICA in my case and if I am missing  
>>> something really obvious:
>>>
>>>  * Is it correct to do the ICA on both horizontal and vertical
>>>    gradiometers together and then plot them sepparately to identify
>>>    artifacts?
>>
>> Yes, this sounds sensible - there should be covariance across  
>> horizontal and vertical gradiometers during an eyeblink, which  
>> should help you in isolating a component, but of course they will  
>> have a very different spatial topography, which means you would  
>> want to plot them separately. I have attached a snapshot of an  
>> eyeblink component that I identified, in vertical and horizontal  
>> gradiometers (top left and top right), magnetometers (bottom left),  
>> and 60 EEG sensors (bottom right). Note that I didn't obtain this  
>> component with ICA, but with PCA of an 'average eyeblink' (see  
>> below).
>>
>>>  * Should I do the PCA before the ICA and if so, how many principal
>>>    components should I retain?
>>>  * Should I do the ICA on both conditions together or sepparately
>>>    (since I expect different sources to be activated in both
>>>    conditions, e.g. one of the two primary somatsensory cortices
>>>    activated according to stimulation of the right or left hand)?
>>>  * Is it accurate enough to use complete trials for the component
>>>    analysis or do I have to extract and use just the parts  
>>> containing
>>>    EOG artifacts?
>>
>> In my (limited) experience, I have had good success identifying  
>> eyeblink components with a slightly simpler method than ICA. I  
>> epoch the data with respect to well-identified eyeblinks (detected  
>> using EOG), then create an 'average eyeblink' using these epochs,  
>> so that I know what the timecourse of an eyeblink should look on  
>> average look like. I then just run a simple PCA on this 'average  
>> eyeblink', and normally the eyeblink is well captured by the first  
>> (and sometimes second) spatial component of this PCA. I then use  
>> this PCA map just as you might use an ICA map, i.e. regress it out  
>> of the raw (original) data. As a sanity check, you can correlate  
>> the timecourse of this component against the EOG channel, and this  
>> should correlate quite nicely. You can also try recomputing the  
>> average eyeblink after you have regressed the component out of the  
>> data, in order to see that it has been effective in removing most  
>> of the artefact.
>>
>> I find this a bit simpler than ICA, and maybe comes with a few  
>> advantages. First, it doesn't use all the data to derive the  
>> components, only the data epoched around EOG-detected eyeblinks, so  
>> it is quite a bit faster on big datasets. Second, by creating an  
>> average eyeblink, it removes any variability in the data driven by  
>> other boring stuff (like the brain :) ), so it should pretty much  
>> always be the component which explains the most variance in the  
>> 'average' eyeblink (i.e. the first principal component). Finally,  
>> it is important to note that although the method requires you to  
>> detect /some/ eyeblinks using the EOG channel, it is still robust  
>> against you failing to detect /all/ eyeblinks, as the regression is  
>> done on the raw data, rather than just on the epochs where you have  
>> already detected the blinks.
>>
>> However, there are some caveats; the first being that you assume  
>> that all eyeblinks look similar (in my experience they do), and  
>> perhaps more importantly that the component doesn't change  
>> (spatially) during the course of the experiment - with Neuromag  
>> data, you might be able to get around this to some extent by using  
>> Maxfilter for movement compensation. I think these caveats both  
>> also apply to ICA, but I'd be interested to hear other people's  
>> thoughts (particularly those who have more experience with ICA).  
>> Finally, I guess if you are interested in isolating interesting  
>> (brain) signals as well as boring (noise) signals simultaneously,  
>> then ICA is the way to go. I use this method just to remove  
>> eyeblinks before I do subsequent processing.
>>
>>>  * And finally, are the component topographies usually sufficient to
>>>    identify eye artifacts?
>>>
>>
>> I find with this method they are very easy to identify, and I  
>> imagine they would be reasonably straightforward in ICA also?  
>> Again, perhaps someone with more ICA experience can comment...
>>
>>> Any help or advise on this would be greatly appreciated! Thanks in  
>>> advance,
>>> Elisabeth
>>>
>>>
>>
>> Hope this helps,
>> Laurence
>>
>>
>> ===========================================
>> Laurence Hunt, DPhil Student
>> Centre for Functional MRI of the Brain (FMRIB), University of Oxford
>> lhunt at fmrib.ox.ac.uk 
>> Phone: (+44)1865-(2)22738
>> ===========================================
>>
>> ----------------------------------
>>
>> The aim of this list is to facilitate the discussion between users  
>> of the FieldTrip toolbox, to share experiences and to discuss new  
>> ideas for MEG and EEG analysis.
>>
>> http://listserv.surfnet.nl/archives/fieldtrip.html
>>
>> http://www.ru.nl/fcdonders/fieldtrip/
>>
>
>
> -- 
> Dipl.-Psych. Elisabeth May
>
> Universitätsklinikum Düsseldorf
> Institut für Klinische Neurowissenschaften und Medizinische  
> Psychologie
> Universitätsstr. 1
> 40225 Düsseldorf
>
> Tel: +49 211 81-18075
>
> http://www.uniklinik-duesseldorf.de/med-psychologie
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users  
> of the FieldTrip  toolbox, to share experiences and to discuss new  
> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html 
>  and http://www.ru.nl/neuroimaging/fieldtrip.
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From zaifengg at GMAIL.COM  Fri Mar 19 11:57:26 2010
From: zaifengg at GMAIL.COM (gao zai)
Date: Fri, 19 Mar 2010 12:57:26 +0200
Subject: Questions on High pass filter and Padding in Preprocessing
In-Reply-To: 
Message-ID: 

Dear Robert,

Thanks very much for your great answer. As you mentioned, I tried to read
the continuous data into memory, it was slow. I will try to read them in
group of channels.

BTW, what do you mean by "the padding option in ft_preprocessing pads the
data _to_ the specified length, not _with_ the indicated length. " I checked
the script about ft-preprocessing, it seems to me that if the padding length
is shorter than the specified length (in my case, 2.5s),  as you point it
out, it will not work. If the padding is longer than that, then fieldtrip
will read a longer epoch than the specified length, so if I use a
cfg.padding=10, it will input a 10s epoch (and the middle part of 2.5s is
the trial I am focused) into memory, am I right? If I am right, can I just
use the padding here (e.g., cfg.padding=10) instead of filtering the
continuous data, since it is equal to filtering a longer trial and then drop
the padding part after completion?

Millions of thanks.

Best,
Feng



On Fri, Mar 19, 2010 at 12:21 PM, Robert Oostenveld <
r.oostenveld at fcdonders.ru.nl> wrote:

> Dear Feng,
>
>
> On 12 Mar 2010, at 11:07, gao zai wrote:
>
>> I am now working on the MEG data in 4D format. Since it was collected in
>> DC, so I want to first use a bandpass filter [0.1 80] to filter my data.
>> However, I found that the latter part of averaged results drifted away
>> relative to the  results when no filter or only a low-pass filter is used
>> (see the attached Fig.1). I thought it may be related to the end effect, so
>> I used cfg.padding=1, it didn't work.
>>
>
> the padding option in ft_preprocessing pads the data _to_ the specified
> length, not _with_ the indicated length. In your case according to the
> figure the trial was ~2.5 seconds long, i.e. already longer than 1 second,
> so cfg.padding=1 did not have an efefct (whereas cfg.padding=10 does).
>
>
>  Latter I turned to use cfg.padding=10 (1/.1=10) it works and no obvious
>> drift was found.
>>
>> However, when tried to only apply a high pass filter to the raw data,
>> regardless of using cfg.padding=10, the results always showed a square wave
>> (see Fig.2). And there is a warning:"Matrix is close to singular or badly
>> scaled. Results may be inaccurate. RCOND = 6.669292e-17."I don't understand
>> why this happened. Does anybody know what is the problem with it? How can I
>> get a right result in this case? Thank you very much.
>>
>
> You specified cfg.hpfreq=0.1, i.e. that frequencies below 0.1 Hz should be
> removed. These frequencies correspond to dripfts in the data of about 10
> seconds. The data segment you are working with is only 2.5 seconds, so
> removing the 10 second drift fails. You can increase the cfg.hpfreq to
> around 1/2.5 = 0.4 Hz, which would be the lowest frequency that can be
> estimated from the 2.5 second data segment.
>
> Alternatively, you could use the following pipeline
>
>
> cfg=[];
> cfg.dataset ='c,rfDC';
> cfg.continuous = 'yes';
> cfg.hpfilter = 'yes';
> cfg.hpfreq = 0.1;
> datacnt = ft_preprocessing(cfg);
>
> to read it into memory as one continuous segment, and apply the filter on
> the complete data.
>
> Then you can do
>
>
> cfg=[];
> cfg.dataset ='c,rfDC';
> cfg.trialdef.eventtype  = 'TRIGGER';
> cfg.trialdef.eventvalue =42;
> cfg.trialdef.prestim    = 1;
> cfg.trialdef.poststim   = 1.5;
> cfg.trialdef.offset     = 1;
> cfg.trialfun            = 'mytrialfun';
> cfg = definetrial(cfg);
>
> followed by
>
> datatrl = ft_redefinetrial(cfg, datacnt);
>
> Reading all data (also the inter-trial interval, the breaks, and the
> instruction periods) into memory requires a lot of RAM. If it does not fit
> all at once, you could do the above section for small groups of channels
>
> cfg.channel = 1:10;
> % cfg.channel = 11:20;
> % cfg.channel = 21:30;
> % ...
>
> and then call ft_appenddata([], datatrl_changroup1, datatrl_changroup2,
> ...)
>
> best,
> Robert
>
>
>
>
>
>
>
>
>
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From Tim.Curran at COLORADO.EDU  Sat Mar 20 01:17:01 2010
From: Tim.Curran at COLORADO.EDU (Tim Curran)
Date: Fri, 19 Mar 2010 18:17:01 -0600
Subject: JOB OPENING
Message-ID: 

JOB OPENING:  
COGNITIVE/SYSTEMS NEUROSCIENTIST

Science Applications International Corporation (SAIC)

SAIC's Technology and Advanced Systems Business Unit has an opening for a Cognitive/Systems Neuroscientist to join a multidisciplinary team conducting research and building systems based on the translation of neuroscience and neuro-imaging (specifically, EEG) research. The individual will support one or more projects, providing expertise in developing protocols, conducting studies, analyzing data, and writing papers and proposals. Applications of interest include brain-computer interfaces and perception, memory, and attention as they relate to man-machine interactions.

Required Skills:

The candidate must have 6+ years of hands-on relevant research and demonstrated mathematical and computational expertise. Strong written and oral communication skills are a must.

Desired Skills:

Experience with EEG collection and processing is highly desired. Current knowledge of research literature with a history of publication in the field is also desired.

Education Requirements:

Ph.D Degree in Psychology, Neuroscience, or related field is required.

Location:   

Louisville/Boulder, Colorado

Contact:

Laurie Gibson, gibsonld at saic.com


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From h.holle at SUSSEX.AC.UK  Mon Mar 22 12:52:21 2010
From: h.holle at SUSSEX.AC.UK (Henning Holle)
Date: Mon, 22 Mar 2010 12:52:21 +0100
Subject: artifact rejection of continuous data in fieldtrip
Message-ID: 

Hi Matt,

thanks a lot sharing this information, much appreciated. I'll try retracing
your processing steps now.

I like your suggestion of turning this into a FT tutorial, once I am more
familiar with FT I might try to have a go at that.

Cheers,

Henning

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From Tim.Curran at COLORADO.EDU  Mon Mar 22 19:42:02 2010
From: Tim.Curran at COLORADO.EDU (Tim Curran)
Date: Mon, 22 Mar 2010 12:42:02 -0600
Subject: Fwd: [FIELDTRIP] JOB OPENING CLARIFICATION
Message-ID: 

Dear All,
I previously posted the following job ad, which I was forwarding for a colleague.  Please note, because this position requires the ability to obtain a US government
security clearance, it is open to US citizens only.    I was not aware of this originally, so sorry for posting it to lists with many non-US members.  Also, I have no official ties with this position, so please do not send application materials to me.  I was just passing it along as a favor to a colleague. 
regards,
Tim



Begin forwarded message:

> From: Tim Curran 
> Date: March 19, 2010 6:17:01 PM MDT
> To: FIELDTRIP at NIC.SURFNET.NL
> Subject: [FIELDTRIP] JOB OPENING
> Reply-To: FieldTrip discussion list 
> 
> JOB OPENING:  
> COGNITIVE/SYSTEMS NEUROSCIENTIST
> 
> Science Applications International Corporation (SAIC)
> 
> SAIC's Technology and Advanced Systems Business Unit has an opening for a Cognitive/Systems Neuroscientist to join a multidisciplinary team conducting research and building systems based on the translation of neuroscience and neuro-imaging (specifically, EEG) research. The individual will support one or more projects, providing expertise in developing protocols, conducting studies, analyzing data, and writing papers and proposals. Applications of interest include brain-computer interfaces and perception, memory, and attention as they relate to man-machine interactions.
> 
> Required Skills:
> 
> The candidate must have 6+ years of hands-on relevant research and demonstrated mathematical and computational expertise. Strong written and oral communication skills are a must.
> 
> Desired Skills:
> 
> Experience with EEG collection and processing is highly desired. Current knowledge of research literature with a history of publication in the field is also desired.
> 
> Education Requirements:
> 
> Ph.D Degree in Psychology, Neuroscience, or related field is required.
> 
> Location:   
> 
> Louisville/Boulder, Colorado
> 
> Contact:
> 
> Laurie Gibson, gibsonld at saic.com
> 
> ----------------------------------
> 
> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.
> 
> http://listserv.surfnet.nl/archives/fieldtrip.html
> 
> http://www.ru.nl/fcdonders/fieldtrip/
> 


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From ole.jensen at DONDERS.RU.NL  Tue Mar 23 11:56:51 2010
From: ole.jensen at DONDERS.RU.NL (Ole Jensen)
Date: Tue, 23 Mar 2010 11:56:51 +0100
Subject: PhD/postdoc jobs at the Donders
Message-ID: 

*PhD students/Post-docs, Donders Institute Nijmegen, Netherlands*

*Job description*

The Neuronal Oscillation group at the Donders Institute for Brain,
Cognition and Behaviour has funding available for PhD student and
post-doctoral positions in the context of a project focused on studying
how oscillatory activity controls the flow of information in the human
working brain. The human brain is composed of multiple regions that need
to be flexibly engaged and disengaged depending on the cognitive task
performed. A fundamental question in cognitive neuroscience is how the
functional architecture of the working brain is shaped. You will
investigate the role of oscillatory brain activity in determining the
functional architecture by studying cross-frequency interactions between
different regions in the context of cognitive experiments. You will do
so using magnetoencephalography (MEG), electroencephalography (EEG)
combined with TMS and functional magnetic resonance imaging (fMRI). You
will also use a brain-computer interface to interact with the working brain.
Requirements

Candidates for the PhD position should have a Master's degree (or
equivalent) in a field related to cognitive neuroscience or signal
processing (e.g. experimental/cognitive psychology, biology,
neuroscience, computer science, electrical engineering). Excellent
candidates from other scientific backgrounds will also be considered.
Good programming skills (Matlab) are highly desirable. Candidates for
the postdoctoral research position should have a PhD degree in a field
related to cognitive neuroscience, but candidates from other scientific
backgrounds can also apply. The record of published research familiarity
with neuroimaging techniques (fMRI, EEG-MEG, and/or TMS) and programming
skills (Matlab) will be taken into account in the selection criteria.
Proficiency in oral and written English is essential. You are expected
to work as part of a team, sharing technical know-how and ideas.
*
Organization*

The Donders Institute for Brain, Cognition and Behaviour consists of the
Centre for Cognition, the Centre for Cognitive Neuroimaging and the
Centre for Neuroscience. The mission of the Centre for Cognitive
Neuroimaging is to conduct cutting-edge fundamental research in
cognitive neuroscience. Much of the rapid progress in this field is
driven by the development of complex neuro-imaging techniques for
measuring activity in the human working brain - an area in which the
Centre plays a leading role. The research themes cover central cognitive
functions, such as perception, action, control, decision making,
attention, memory, language, learning and plasticity. The Centre also
aims to establish how the different brain areas coordinate their
activity with very high temporal precision to enable human and animal
cognition. This internationally renowned centre currently is home to
more than 100 PhD students and post-docs from more than 20 different
countries, offering a stimulating and multidisciplinary research
environment. The centre is equipped with three MRI scanners (7T, 3T,
1.5T), a 275 channels MEG system, a EEG-TMS laboratory, several
(MR-compatible) EEG systems, and high-performance computational
facilities. English is the lingua franca at the centre. You will work
within the Centre's Neuronal Oscillations group (
http://ojensen.ruhosting.nl/).

*Conditions of employment*

Employment: 1,0 fte
PhD student: The starting salary is EUR2,042 per month and will increase
to EUR2,612 per month in the fourth year.
Post-doc: Depending on experience, the gross salary will be between
EUR3,195 and EUR4,374.
Two annual 8% bonuses (holiday and end-of-year) will be added to the
monthly gross salaries.

Additional conditions of employment
Duration of the PhD student contract: 4 years.
Duration of the post-doc contract: 5 years maximum.
*
Other Information*
You should submit an application letter, a CV, and the names of two
persons who can provide references.

*Additional Information*
Dr. Ole Jensen
Telephone: +31 24 3610884
E-mail: ole.jensen at donders.ru.nl This e-mail address is being protected
from spambots. You need JavaScript enabled to view it
Application
You can apply for the job (mention the vacancy number 30.02.10) before
15 April 2010 by sending your application -preferably by email- to:

Radboud University Nijmegen, Dienst P&O
Postbus 7005, 6503 GM NIJMEGEN- NL
Telephone: + 31 24 3611173
E-mail: vacatures at dpo.ru.nl This e-mail address is being protected from
spambots. You need JavaScript enabled to view it

--
 Ole Jensen
 Principal Investigator
 Neuronal Oscillations Group
 Donders Institute for Brain, Cognition and Behaviour
 Centre for Cognitive Neuroimaging
 P.O. Box 9101
 NL-6500 HB Nijmegen
 The Netherlands

 Office  : +31 24 36 10884
 MEG lab : +31 24 36 10988

 Fax     : +31 24 36 10989

 e-mail : ole.jensen at donders.ru.nl
 URL    : http://ojensen.ruhosting.nl/



----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From p_trigkas at HOTMAIL.COM  Wed Mar 24 15:53:46 2010
From: p_trigkas at HOTMAIL.COM (PERI TRIGKAS)
Date: Wed, 24 Mar 2010 14:53:46 +0000
Subject: Invalid MEX file - Buffer
Message-ID: 


Dear list members

I have only recently started my Phd project.
I'm trying to work with some on-line MEG data. I have done
some research regarding any software that could do my job easier. I
have decided to use the FieldTrip Buffer in order to store the data
while I am doing the processing. 
Initially, I thought that it
would be good to have everything or at least the buffer on the
same machine with the acquisition system. The OS on the acquisition
system machine is a Linux distribution of Red Hat. The problem is that the OS version is too old. 

gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-59)
 
I
installed Matlab on top of that -7.2.0.294 (R2006a)- That was the
newest version that I managed to get it worked. It did not accept 7.4
or any other later version of Matlab.
When I tried to run some of
the examples that you provide in order to test the operation of the
buffer I got errors regarding the MEX file. I followed the instruction
and tried to compile the .c files. Despite the fact that everything
went well with the compilation, buffer.mexglx  was created, I got again
the same error.

??? Invalid MEX-file
'/home/peri/fieldtrip-20100314/fileio/private/buffer.mexglx':
/matlab/bin/glnx86/../../sys/os/glnx86/libgcc_s.so.1: version
`GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.5).

Error in ==> write_data at 189
        buffer('put_dat', packet, host, port);

Error in ==> rt_signalproxy at 116
    write_data(cfg.target.datafile, dat, 'header', hdr, 'dataformat', cfg.target.dataformat, 'append', false);
  
The
compatibility has been checked in a Virtual machine in order to keep
the MEG system clean as I am not the only person who uses it. 
I
have checked everything that I could and I even asked help from the
I.T. support but my problem has not been solved. I would like to ask if
the error I get, is a compatibility error since the program is looking
for another gcc version (version `GCC_4.2.0' not found)   . 

Could you
please suggest me what can be done in order to overcome such problems?  

Thanks in advance 

P. Trigkas


 		 	   		  
_________________________________________________________________
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
http://clk.atdmt.com/UKM/go/195013117/direct/01/
----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From gflandin at FIL.ION.UCL.AC.UK  Wed Mar 24 16:35:57 2010
From: gflandin at FIL.ION.UCL.AC.UK (Guillaume Flandin)
Date: Wed, 24 Mar 2010 15:35:57 +0000
Subject: Invalid MEX file - Buffer
In-Reply-To: 
Message-ID: 

Dear Peri,

if you follow the same instructions than there and recompile, it should
get you sorted:
http://en.wikibooks.org/wiki/SPM/Installation_on_64bit_Linux#Other_problems_with_lstdc.2B.2B
(basically, remove all reference to -lstdc++ in mexopts.sh).

Best regards,
Guillaume.


PERI TRIGKAS wrote:
> Dear list members
>
> I have only recently started my Phd project. I'm trying to work with
> some on-line MEG data. I have done some research regarding any software
> that could do my job easier. I have decided to use the FieldTrip Buffer
> in order to store the data while I am doing the processing.
> Initially, I thought that it would be good to have everything or at
> least the buffer on the same machine with the acquisition system. The OS
> on the acquisition system machine is a Linux distribution of Red Hat.
> The problem is that the OS version is too old.
>
> /gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-59)/
>
> I installed Matlab on top of that /-7.2.0.294 (R2006a)/- That was the
> newest version that I managed to get it worked. It did not accept 7.4 or
> any other later version of Matlab.
> When I tried to run some of the examples that you provide in order to
> test the operation of the buffer I got errors regarding the MEX file. I
> followed the instruction and tried to compile the .c files. Despite the
> fact that everything went well with the compilation, buffer.mexglx  was
> created, I got again the same error.
>
> ?/?? Invalid MEX-file
> '/home/peri/fieldtrip-20100314/fileio/private/buffer.mexglx':
> /matlab/bin/glnx86/../../sys/os/glnx86/libgcc_s.so.1: version
> `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.5).
>
> Error in ==> write_data at 189
>        buffer('put_dat', packet, host, port);
>
> Error in ==> rt_signalproxy at 116
>    write_data(cfg.target.datafile, dat, 'header', hdr, 'dataformat',
> cfg.target.dataformat, 'append', false);
> /
> The compatibility has been checked in a Virtual machine in order to keep
> the MEG system clean as I am not the only person who uses it.
> I have checked everything that I could and I even asked help from the
> I.T. support but my problem has not been solved. I would like to ask if
> the error I get, is a compatibility error since the program is looking
> for another gcc version (version `GCC_4.2.0' not found)   .
>
> Could you please suggest me what can be done in order to overcome such
> problems?
>
> Thanks in advance
>
> P. Trigkas

--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From njkillian at GATECH.EDU  Wed Mar 24 21:20:59 2010
From: njkillian at GATECH.EDU (Nathan Killian)
Date: Wed, 24 Mar 2010 16:20:59 -0400
Subject: freqdescriptives/statistics
In-Reply-To: 
Message-ID: 

Hi Fieldtrip Users,
I'm curious about the "bias correct" for coherence existing in past versions
of fieldtrip (old discussion thread below) but I couldn't locate in the FT
code (October 14 2009 version) what this is actually doing and what bias it
was addressing (e.g. bias from number of trials used in an average). Can
anyone explain what this was meant to do? Also is there any other sort of
bias correction done in the more recent versions of FT?
Thanks for any help!
Nathan

On Tue, Sep 1, 2009 at 6:40 PM, Dahlia Sharon  wrote:

> Thanks Jan-Mathijs for that useful reply.
>
> Regarding permutation analysis, we're running into some difficulty
> understanding what the code does. Could you clarify these points?
>
> 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate
> layout file (all channels). Does fieldtrip take into account which channels
> are gradiometers and which magnetometers when it calculates adjacency for
> clustering?
>
> 2. How does fieldtrip calculate adjacency for channels? (time and frequency
> are obvious...)
>
> 3. How is the clustering performed?
>
> We're getting a significant cluster but it doesn't look like a single blob
> in the time-frequency domain (averaging over sensors) but like two very
> distant blobs, which is very strange...
>
> On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen
>  wrote:
>
> >Dear Dahlia,
> >
> >Hemant Bokil indeed uses the jackknife to obtain variance estimates of
> >power (and coherence), see also for example his 2007 paper in
> >J.Neurosci.Methods. More specifically, if your data is 'well-behaved',
> >he has shown that by applying a specific correction to the power
> >estimate, in combination of the jackknife, generates a test-statistic
> >from a differential (i.e. contrast) power spectrum which has a
> >standard normal distribution (i.e. the jackknife estimate of the
> >variance is expected to be 1 and the estimate of the mean 0).
> >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to
> >use non-parametric techniques to do statistical inference.
> >Freqdescriptives in this respect still historically has the option of
> >computing a jackknife estimate of the SEM of the powerspectrum/
> >coherencespectrum, which can be used to compute a T-statistic across
> >two conditions for example. However, I you would choose this path, you
> >have to write some code which does this, because it is not in
> >fieldtrip. The biascorrect option has been taken out altogether as far
> >as I can see, (and had been designed only to correct the bias in the
> >coherence spectra, and not in the power spectra if I remember
> >correctly), and any reference in the documentation should be removed.
> >Unfortunately, we did not yet have time to considerably clean up
> >freqdescriptives, but this is quite high on the developer's to do list.
> >The bottom line is: ignore biascorrect, and if you use the jackknife
> >estimate of the SEM, you have to come up with some code of your own.
> >Alternatively, you could look into freqstatistics and use
> >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do
> >statistical inference.
> >
> >Best,
> >
> >Jan-Mathijs
> >
> >
> >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote:
> >
> >> Hi all,
> >>
> >> Is there a more detailed explanation of usage for the jackknife and
> >> biascorrect options for freqdescriptives than the one in the
> >> freqdescriptives reference
> page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)?
> >>
> >> More specifically, are these options related to Bokil et al NeuroIm
> >> 2007? How should they be employed to determine significance of
> >> difference between conditions? (Is there somewhere a tutorial for
> >> the use of these options analogous to the one about cluster-based
> >> permutation testing?)
> >>
> >> Also, for the permutation analysis of TFRs
> (http://fieldtrip.fcdonders.nl/tutorial/statistics?s
> >> []=freqstatistics), if I don't want to employ the planar gradient
> >> step (what exactly IS combineplanar? sorry I couldn't find it), can
> >> I simply skip it and calculate the TFRs of the raw sensor data?
> >>
> >> Many thanks!
> >> Dahlia.
> >> ----------------------------------
> >> The aim of this list is to facilitate the discussion between users
> >> of the FieldTrip toolbox, to share experiences and to discuss new
> >> ideas for MEG and EEG analysis.
> >> http://listserv.surfnet.nl/archives/fieldtrip.html
> >> http://www.ru.nl/fcdonders/fieldtrip/
> >
> >----------------------------------
> >
> >The aim of this list is to facilitate the discussion between users of
> >the FieldTrip toolbox, to share experiences and to discuss new ideas
> >for MEG and EEG analysis.
> >
> >http://listserv.surfnet.nl/archives/fieldtrip.html
> >
> >http://www.ru.nl/fcdonders/fieldtrip/
> >
> >
> >
> >
> >
> >----------------------------------
> >The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
> >
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From e.maris at DONDERS.RU.NL  Wed Mar 24 22:11:07 2010
From: e.maris at DONDERS.RU.NL (Eric Maris)
Date: Wed, 24 Mar 2010 22:11:07 +0100
Subject: freqdescriptives/statistics
In-Reply-To: 
Message-ID: 

Hi Nathan,

 

 

I have implemented the biascorrect option in one of the older versions of freqdescriptives.  With this option, the Jacknife was used to calculate a bias-corrected version of coherence. Actually, there is a very nice theorem about the fact that Jacknife-based bias correction effectively removes the first order bias. Surprisingly, the Jacknife is mainly used to calculate a proxy for the standard error, and for this application a similar theorem does not exist. I learned this from a nice chapter by John Tukey in a book called “(Exploratory) Data Analysis” (or something like that).

 

 

Best,

 

Eric

 

 

dr. Eric Maris
Donders Institute for Brain, Cognition and Behavior

Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging

Radboud University
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
T:+31 24 3612651
Mobile: 06 39584581

F:+31 24 3616066
E: e.  maris at donders.ru.nl

 

 

 

 

 

From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Nathan Killian
Sent: woensdag 24 maart 2010 21:21
To: FIELDTRIP at NIC.SURFNET.NL
Subject: Re: [FIELDTRIP] freqdescriptives/statistics

 

Hi Fieldtrip Users,

I'm curious about the "bias correct" for coherence existing in past versions of fieldtrip (old discussion thread below) but I couldn't locate in the FT code (October 14 2009 version) what this is actually doing and what bias it was addressing (e.g. bias from number of trials used in an average). Can anyone explain what this was meant to do? Also is there any other sort of bias correction done in the more recent versions of FT?

Thanks for any help!

Nathan

 

On Tue, Sep 1, 2009 at 6:40 PM, Dahlia Sharon  wrote:

Thanks Jan-Mathijs for that useful reply.

Regarding permutation analysis, we're running into some difficulty
understanding what the code does. Could you clarify these points?

1. We're using Neuromag (Vectorview 306) data, and giving the appropriate
layout file (all channels). Does fieldtrip take into account which channels
are gradiometers and which magnetometers when it calculates adjacency for
clustering?

2. How does fieldtrip calculate adjacency for channels? (time and frequency
are obvious...)

3. How is the clustering performed?

We're getting a significant cluster but it doesn't look like a single blob
in the time-frequency domain (averaging over sensors) but like two very
distant blobs, which is very strange...


On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen
 wrote:

>Dear Dahlia,
>
>Hemant Bokil indeed uses the jackknife to obtain variance estimates of
>power (and coherence), see also for example his 2007 paper in
>J.Neurosci.Methods. More specifically, if your data is 'well-behaved',
>he has shown that by applying a specific correction to the power
>estimate, in combination of the jackknife, generates a test-statistic
>from a differential (i.e. contrast) power spectrum which has a
>standard normal distribution (i.e. the jackknife estimate of the
>variance is expected to be 1 and the estimate of the mean 0).
>Unfortunately, MEG data is hardly ever well-behaved, so we prefer to
>use non-parametric techniques to do statistical inference.
>Freqdescriptives in this respect still historically has the option of
>computing a jackknife estimate of the SEM of the powerspectrum/
>coherencespectrum, which can be used to compute a T-statistic across
>two conditions for example. However, I you would choose this path, you
>have to write some code which does this, because it is not in
>fieldtrip. The biascorrect option has been taken out altogether as far
>as I can see, (and had been designed only to correct the bias in the
>coherence spectra, and not in the power spectra if I remember
>correctly), and any reference in the documentation should be removed.
>Unfortunately, we did not yet have time to considerably clean up
>freqdescriptives, but this is quite high on the developer's to do list.
>The bottom line is: ignore biascorrect, and if you use the jackknife
>estimate of the SEM, you have to come up with some code of your own.
>Alternatively, you could look into freqstatistics and use
>cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do
>statistical inference.
>
>Best,
>
>Jan-Mathijs
>
>
>On 28 Aug 2009, at 06:34, Dahlia Sharon wrote:
>
>> Hi all,
>>
>> Is there a more detailed explanation of usage for the jackknife and
>> biascorrect options for freqdescriptives than the one in the
>> freqdescriptives reference
page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)?
>>
>> More specifically, are these options related to Bokil et al NeuroIm
>> 2007? How should they be employed to determine significance of
>> difference between conditions? (Is there somewhere a tutorial for
>> the use of these options analogous to the one about cluster-based
>> permutation testing?)
>>
>> Also, for the permutation analysis of TFRs
(http://fieldtrip.fcdonders.nl/tutorial/statistics?s
>> []=freqstatistics), if I don't want to employ the planar gradient
>> step (what exactly IS combineplanar? sorry I couldn't find it), can
>> I simply skip it and calculate the TFRs of the raw sensor data?
>>
>> Many thanks!
>> Dahlia.
>> ----------------------------------
>> The aim of this list is to facilitate the discussion between users
>> of the FieldTrip toolbox, to share experiences and to discuss new
>> ideas for MEG and EEG analysis.
>> http://listserv.surfnet.nl/archives/fieldtrip.html
>> http://www.ru.nl/fcdonders/fieldtrip/
>
>----------------------------------
>
>The aim of this list is to facilitate the discussion between users of
>the FieldTrip toolbox, to share experiences and to discuss new ideas
>for MEG and EEG analysis.
>
>http://listserv.surfnet.nl/archives/fieldtrip.html
>
>http://www.ru.nl/fcdonders/fieldtrip/
>
>
>
>
>
>----------------------------------
>The aim of this list is to facilitate the discussion between users of the
FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG

and EEG analysis. See also
http://listserv.surfnet.nl/archives/fieldtrip.html and
http://www.ru.nl/neuroimaging/fieldtrip.
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.

 

----------------------------------

The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.

http://listserv.surfnet.nl/archives/fieldtrip.html

http://www.ru.nl/fcdonders/fieldtrip/


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From stojanoski at UTSC.UTORONTO.CA  Thu Mar 25 18:33:14 2010
From: stojanoski at UTSC.UTORONTO.CA (Bobby Stojanoski)
Date: Thu, 25 Mar 2010 13:33:14 -0400
Subject: Induced activity
Message-ID: 

Dear Fieldtrippers,



I am a relatively new user of fieldtrip and am very impressed!


I am interested in comparing differences at certain frequencies – induced
40-100 Hz – between 2 experimental conditions.  My understanding was that I
can calculate induced activity in the gamma range by calculating the power
for each trial (subject average -- freqanalysis) and then averaging across
subjects (grand average -- freqdescriptives/freqgrandaverage).


To my dismay, when I plotted the results of my grandaverage I found a band
of power at 55 - 65 Hz for the entire duration of my epoch. I should add
this was not the case when I plotted power across trials for each
participant.


Earlier discussions mention computing induced+evoked (using freqanalysis and
freqgrandaverage) and subtracting that from evoked (using
timelockanalysis+freqanalysis) to get extract induced only activity.
However, later posts suggest that this is not a valid approach.


1. Where have I made my mistake?


2. If ((induced+evoked)-evoked)) is not valid, what is the correct approach
to calculating induced activity at 40 - 100 Hz?


Any help would be greatly appreciated!


Thank you

Bobby Stojanoski

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From adrian.m.bartlett at GMAIL.COM  Thu Mar 25 18:51:51 2010
From: adrian.m.bartlett at GMAIL.COM (Adrian Bartlett)
Date: Thu, 25 Mar 2010 13:51:51 -0400
Subject: Induced activity
In-Reply-To: 
Message-ID: 

Hi Bobby,

This sounds like you may have a case of line noise contamination, which is
usually seen at 50/60Hz (depends on which continent you are on). While I am
not familiar with it's implementation in FIELDTRIP, there are notch
filtering solutions to eliminate this contamination. Using multitaper FFT
will usually result in the 0 power (post-notch-filtering) at ~60 Hz being
smoothed over by the narrowband frequency bias.

- A

On Thu, Mar 25, 2010 at 1:33 PM, Bobby Stojanoski <
stojanoski at utsc.utoronto.ca> wrote:

> Dear Fieldtrippers,
>
>
>
> I am a relatively new user of fieldtrip and am very impressed!
>
>
> I am interested in comparing differences at certain frequencies – induced
> 40-100 Hz – between 2 experimental conditions.  My understanding was that
> I can calculate induced activity in the gamma range by calculating the power
> for each trial (subject average -- freqanalysis) and then averaging across
> subjects (grand average -- freqdescriptives/freqgrandaverage).
>
>
> To my dismay, when I plotted the results of my grandaverage I found a band
> of power at 55 - 65 Hz for the entire duration of my epoch. I should add
> this was not the case when I plotted power across trials for each
> participant.
>
>
> Earlier discussions mention computing induced+evoked (using freqanalysis
> and freqgrandaverage) and subtracting that from evoked (using
> timelockanalysis+freqanalysis) to get extract induced only activity.
> However, later posts suggest that this is not a valid approach.
>
>
> 1. Where have I made my mistake?
>
>
> 2. If ((induced+evoked)-evoked)) is not valid, what is the correct approach
> to calculating induced activity at 40 - 100 Hz?
>
>
> Any help would be greatly appreciated!
>
>
> Thank you
>
> Bobby Stojanoski
>
>
>
> ----------------------------------
>
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and
> EEG analysis.
>
> http://listserv.surfnet.nl/archives/fieldtrip.html
>
> http://www.ru.nl/fcdonders/fieldtrip/
>

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From sweiss at AECOM.YU.EDU  Thu Mar 25 21:49:01 2010
From: sweiss at AECOM.YU.EDU (Shennan Weiss)
Date: Thu, 25 Mar 2010 16:49:01 -0400
Subject: old CTF format
Message-ID: 

Hi,

In order to input my CTF data in to fieldtrip I had to set cfg.dataformat
and cfg.headerformat to ctf_old. This worked. However, when I try to run
applications like megplanar even when I list my channels it does not work.
Perhaps this is because my MEG channels begin with 'M' and not 'MEG'?

Does anyone know a way to convert old CTF data to new CTF? or any other
fixes?

Thanks,
Shennan

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From sweiss at AECOM.YU.EDU  Thu Mar 25 23:48:43 2010
From: sweiss at AECOM.YU.EDU (Shennan Weiss)
Date: Thu, 25 Mar 2010 18:48:43 -0400
Subject: megplanar
Message-ID: 

Hi again,

I wanted to specify the error I am encountering with megplanar analyzing
CTF275 data. Note in preprocessing I had to set the read parameters to
ctf_old. The specific problem occurs in channelposition.m

at the following lines

used = any(abs(sens.tra)<0.5, 1);  % allow a little bit of rounding-off error
sens.pnt = sens.pnt(used,:);

the problem is that sens.tra that is equivalent to data.grad.tra and is a
273 x 574 array. While sens.pnt is a array of 543x3.

Any help would be greatly appreciated.

Thanks, Shennan

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From michael.wibral at WEB.DE  Fri Mar 26 18:29:10 2010
From: michael.wibral at WEB.DE (Michael Wibral)
Date: Fri, 26 Mar 2010 18:29:10 +0100
Subject: megplanar
In-Reply-To: <610ef88c5eff801021e76bccd135c364.squirrel@netmail.aecom.yu.edu>
Message-ID: 

Hi Shennan,

could you post the code to read in the data, and the specific error message you ge - that would be very helpful.
Here are some more questions:
Did you use the tools provided by ctf to read in the data? 
Did you read in only MEG channels (and not the refence ones etc.)?
Did you try to plot or statistically analyze your megplanar data *before* using combineplanar (only after using combineplanar plotting and statitistcs are possible to my knowledge)?

Michael






-----Ursprüngliche Nachricht-----
Von: Shennan Weiss 
Gesendet: Mar 25, 2010 11:48:43 PM
An: FIELDTRIP at NIC.SURFNET.NL
Betreff: [FIELDTRIP] megplanar

>Hi again,
>
>I wanted to specify the error I am encountering with megplanar analyzing
>CTF275 data. Note in preprocessing I had to set the read parameters to
>ctf_old. The specific problem occurs in channelposition.m
>
>at the following lines
>
>used = any(abs(sens.tra)<0.5, 1);  % allow a little bit of rounding-off error
>sens.pnt = sens.pnt(used,:);
>
>the problem is that sens.tra that is equivalent to data.grad.tra and is a
>273 x 574 array. While sens.pnt is a array of 543x3.
>
>Any help would be greatly appreciated.
>
>Thanks, Shennan
>
>----------------------------------
>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 628 bytes
Desc: not available
URL: 

From michael.wibral at WEB.DE  Fri Mar 26 19:24:51 2010
From: michael.wibral at WEB.DE (Michael Wibral)
Date: Fri, 26 Mar 2010 19:24:51 +0100
Subject: Induced activity
In-Reply-To: <7834c8d31003251051t6ebcf886jdbe595916a639638@mail.gmail.com>
Message-ID: 

An HTML attachment was scrubbed...
URL: 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 628 bytes
Desc: not available
URL: 

From sweiss at AECOM.YU.EDU  Sat Mar 27 01:24:21 2010
From: sweiss at AECOM.YU.EDU (Shennan Weiss)
Date: Fri, 26 Mar 2010 20:24:21 -0400
Subject: megplanar
In-Reply-To: <12290700.448458.1269624550752.JavaMail.fmail@mwmweb055>
Message-ID: 

Hi Michael and others,

Thank you for the help. When I try to load a ctf275 dataset using the
following commands (for example)

cfg = [];
cfg.dataset = 'trial1.ds';
data=preprocessing(cfg);

readCTFds: You are reading CTF data for use with a software-application
tool that is not manufactured by VSM MedTech Ltd. and has not received
marketing clearance for clinical applications.  If CTF MEG data are
processed by this tool, they should not be later employed for clinical
and/or diagnostic purposes.

??? Index exceeds matrix dimensions.

Error in ==> /fieldtrip-20100101/external/ctf/readCTFds.p>readHc at 599

Error in ==> /fieldtrip-20100101/external/ctf/readCTFds.p>readCTFds at 203

Error in ==> read_header at 404
    orig             = readCTFds(filename);

Error in ==> ft_preprocessing at 278
  hdr = read_header(cfg.headerfile, 'headerformat', cfg.headerformat);

Error in ==> preprocessing at 17
[varargout{1:nargout}] = funhandle(varargin{:});

However when I add

cfg.headerformat = 'ctf_old';
cfg.dataformat= 'ctf_old';

The complete file is loaded. Yet I have encountered numerous problems. For
example, when I try to run topoplot on the basis of the organization of
the data.grad structure it thinks the file has 151 channels....

Even when I open the ctf file in an updated version of dataeditor and
resave it after applying a filter for instance I still get the same error
message in Matlab.

-Shen

Any help would be wonderful. I really hope I can smoothly use the
fieldtrip package.

Thanks,
Shennan

> Hi Shennan,
>
> could you post the code to read in the data, and the specific error
> message you ge - that would be very helpful.
> Here are some more questions:
> Did you use the tools provided by ctf to read in the data?
> Did you read in only MEG channels (and not the refence ones etc.)?
> Did you try to plot or statistically analyze your megplanar data *before*
> using combineplanar (only after using combineplanar plotting and
> statitistcs are possible to my knowledge)?
>
> Michael
>
>
>
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Shennan Weiss
> Gesendet: Mar 25, 2010 11:48:43 PM
> An: FIELDTRIP at NIC.SURFNET.NL
> Betreff: [FIELDTRIP] megplanar
>
>>Hi again,
>>
>>I wanted to specify the error I am encountering with megplanar analyzing
>>CTF275 data. Note in preprocessing I had to set the read parameters to
>>ctf_old. The specific problem occurs in channelposition.m
>>
>>at the following lines
>>
>>used = any(abs(sens.tra)<0.5, 1);  % allow a little bit of rounding-off
>> error
>>sens.pnt = sens.pnt(used,:);
>>
>>the problem is that sens.tra that is equivalent to data.grad.tra and is a
>>273 x 574 array. While sens.pnt is a array of 543x3.
>>
>>Any help would be greatly appreciated.
>>
>>Thanks, Shennan
>>
>>----------------------------------
>>The aim of this list is to facilitate the discussion between users of the
>> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
>> and EEG analysis. See also
>> http://listserv.surfnet.nl/archives/fieldtrip.html and
>> http://www.ru.nl/neuroimaging/fieldtrip.
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> and EEG analysis. See also
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From nathanweisz at MAC.COM  Sat Mar 27 11:41:48 2010
From: nathanweisz at MAC.COM (Nathan Weisz)
Date: Sat, 27 Mar 2010 11:41:48 +0100
Subject: Induced activity
In-Reply-To: <26662339.467176.1269627891260.JavaMail.fmail@mwmweb055>
Message-ID: 

hi bobby,

i agree with michael that there is no method -at least that i'm aware of- to get rid of evoked parts, just due to the issues he mentions.

the solution of reporting the averaged single-trial TF response along with ITC would be ok if one could assume a strict sequence of evoked and induced responses (e.g. <300 ms evoked; >300 ms induced). in practice this however is not the case and induced and evoked processes overlap considerably. This will make problems when you are specifically interested in what is induced: the evoked parts will dominate the entire picture. overlaps may also be created due to the analysis method. e.g. a practical problem my group sometimes encounters is that pre-stimulus alpha desynchronizations are sometimes rendered almost "invisible" in time-frequency analysis due to post-stimulus increases at low frequencies (that largely compose the ERP), that "bleed" into the pre-stimulus period (also an issue regarding baseline correction of post-stimulus responses).
these issues will not be solved by reporting inter-trial coherence.

so depending on what you are interested in, i think that sometimes the best (not conceptually ideal) you can do is to remove the time-frequency representation of the ERP (of course before baseline correction; this would not increase computation time a lot and you could report both if needed). of course you need to be aware of the limitations michael mentioned and decide whether you want to forgo investigating something altogether due to a lack of 100% valid methods. in general however, one could pose a similar question for many things we do e.g. regarding source localization: even though we can not be 100% sure whether the "blobs" or dipole fits we see are valid we do it anyway (or at least many of us).

if anybody has a better idea rather than primitive ERP removal, for separating evoked and incuced activity when they overlap, then it would be great to share it with the community.

cheers,
nathan

On 26.03.2010, at 19:24, Michael Wibral wrote:

> Hi Bobby,
> 
>  
> for fundamental reasons there is (of yet?) no valid approach to get at "pure" induced activity. To see this, imagine a process that produces induced responses, but in a particular participant and day you get by chance mostly responses with relatively similar phases - such that you get a nonnegligible average (some would call it an ERP). Is it still induced? Did it convert to evoked (without the underlying process having changed) ?
> 
>  
> As at least three different mechanisms (additive evoked activity, phase rest of ongoing oscillations, asymmetric amplitude modulation of ongoing oscillations) have been shown to produce non-vanishing averages / ERPs I would also strictly advise against regressing out "evoked" activity from each trial to get induced activity.
> 
> I also do not see a need for analysis of "pure" induced activity. You can calculate power and inter-trial phase-coherence for each time-frequency bin. For the various peaks in your time-frequency representation you quote these two values and most people should be fine with this.
> 
>  
> Michael
> 
>  
>  
>  
>  
>  
> 
> 
> 
> 
> Von: Adrian Bartlett 
> Gesendet: Mar 25, 2010 6:51:51 PM
> An: FIELDTRIP at NIC.SURFNET.NL
> Betreff: Re: [FIELDTRIP] Induced activity
> 
> Hi Bobby,
> This sounds like you may have a case of line noise contamination, which is usually seen at 50/60Hz (depends on which continent you are on). While I am not familiar with it's implementation in FIELDTRIP, there are notch filtering solutions to eliminate this contamination. Using multitaper FFT will usually result in the 0 power (post-notch-filtering) at ~60 Hz being smoothed over by the narrowband frequency bias.
> - A
> 
> On Thu, Mar 25, 2010 at 1:33 PM, Bobby Stojanoski  wrote:
> Dear Fieldtrippers,  
>              
> I am a relatively new user of fieldtrip and am very impressed!
>  
> I am interested in comparing differences at certain frequencies – induced 40-100 Hz – between 2 experimental conditions.  My understanding was that I can calculate induced activity in the gamma range by calculating the power for each trial (subject average -- freqanalysis) and then averaging across subjects (grand average -- freqdescriptives/freqgrandaverage).
>  
> To my dismay, when I plotted the results of my grandaverage I found a band of power at 55 - 65 Hz for the entire duration of my epoch. I should add this was not the case when I plotted power across trials for each participant.   
>  
> Earlier discussions mention computing induced+evoked (using freqanalysis and freqgrandaverage) and subtracting that from evoked (using timelockanalysis+freqanalysis) to get extract induced only activity. However, later posts suggest that this is not a valid approach.
>  
>  
> 1. Where have I made my mistake?
>  
> 2. If ((induced+evoked)-evoked)) is not valid, what is the correct approach to calculating induced activity at 40 - 100 Hz?
>  
>  
> Any help would be greatly appreciated!
>  
>  
> Thank you
> Bobby Stojanoski
> 
> 
> 
> ----------------------------------
> 
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.
> 
> http://listserv.surfnet.nl/archives/fieldtrip.html
> 
> http://www.ru.nl/fcdonders/fieldtrip/
> 
> ----------------------------------
> 
> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.
> 
> http://listserv.surfnet.nl/archives/fieldtrip.html
> 
> http://www.ru.nl/fcdonders/fieldtrip/
> 
> ----------------------------------
> 
> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.
> 
> http://listserv.surfnet.nl/archives/fieldtrip.html
> 
> http://www.ru.nl/fcdonders/fieldtrip/
> 
> 


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From h.holle at SUSSEX.AC.UK  Sun Mar 28 17:02:40 2010
From: h.holle at SUSSEX.AC.UK (Henning Holle)
Date: Sun, 28 Mar 2010 17:02:40 +0200
Subject: channel selection in ft_preproccesing does not update elec field
Message-ID: 

Dear list members,

In a call to ft_precessing, I have selected a number of interesting channels
for further analysis

cfg = [];
cfg.channel     = {'Fz', 'Cz', 'Pz'};
data_eeg        = ft_preprocessing(cfg,data_tmp);

After this call, the data_eeg.label is updated, and now contains only these
three channels. However, data_eeg.elec does not seem to be updated, and is
still containing all original channels (which causes problems later on when
I try to plot the results). Shouldn't ft_preprocessing also update the
data_eeg.elec field?

Best wishes,

Henning

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From nathanweisz at MAC.COM  Mon Mar 29 10:18:55 2010
From: nathanweisz at MAC.COM (Nathan Weisz)
Date: Mon, 29 Mar 2010 10:18:55 +0200
Subject: channel selection in ft_preproccesing does not update elec
 field
In-Reply-To: 
Message-ID: 

> After this call, the data_eeg.label is updated, and now contains only these
> three channels. However, data_eeg.elec does not seem to be updated, and is
> still containing all original channels (which causes problems later on when
> I try to plot the results). Shouldn't ft_preprocessing also update the
> data_eeg.elec field?

no ... not as far as i know.
the elec-field contains all info no matter what you do. for plotting the main thing is that the electrodes in the label field should also appear somewhere in the elec.label field.

n

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From h.holle at SUSSEX.AC.UK  Mon Mar 29 14:23:03 2010
From: h.holle at SUSSEX.AC.UK (Henning Holle)
Date: Mon, 29 Mar 2010 14:23:03 +0200
Subject: channel selection in ft_preproccesing does not update elec
 field
Message-ID: 

Hello Nathan,

thank you for your response. I have created an average for three 3
electrodes of interest (Fz, Cz, Pz). When I try to plot it, like so

cfg = [];
cfg.showlabels = 'yes'; 
cfg.fontsize = 6; 
multiplotER(cfg, avg_STD); 

the electrodes are not in the layout I would have expected (see attachment).
What is causing this behavior?

This are my electrode positions, if this information helps:

>> avg_STD.elec.pnt(strmatch('Fz',avg_STD.elec.label),:)

ans =

         0    8.6070    5.8872

>> avg_STD.elec.pnt(strmatch('Cz',avg_STD.elec.label),:)

ans =

         0         0    8.5313

>> avg_STD.elec.pnt(strmatch('Pz',avg_STD.elec.label),:)

ans =

         0   -5.6243    7.1065

Best wishes

Henning

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output_multiplot.fig
Type: application/octet-stream
Size: 16503 bytes
Desc: not available
URL: 

From nathanweisz at MAC.COM  Tue Mar 30 00:42:28 2010
From: nathanweisz at MAC.COM (Nathan Weisz)
Date: Tue, 30 Mar 2010 00:42:28 +0200
Subject: channel selection in ft_preproccesing does not update elec
 field
In-Reply-To: 
Message-ID: 

Dear Henning,

I'm not sure why the data is plotted as it is (i.e. in a topographical sense, e.g. Cz in the upper left corner). but i don't think that with 3 electrodes a multiplot is really necessary anyway. why not use singleplot?

best,
n

On 29.03.2010, at 14:23, Henning Holle wrote:

> Hello Nathan,
>
> thank you for your response. I have created an average for three 3
> electrodes of interest (Fz, Cz, Pz). When I try to plot it, like so
>
> cfg = [];
> cfg.showlabels = 'yes';
> cfg.fontsize = 6;
> multiplotER(cfg, avg_STD);
>
> the electrodes are not in the layout I would have expected (see attachment).
> What is causing this behavior?
>
> This are my electrode positions, if this information helps:
>
>>> avg_STD.elec.pnt(strmatch('Fz',avg_STD.elec.label),:)
>
> ans =
>
>         0    8.6070    5.8872
>
>>> avg_STD.elec.pnt(strmatch('Cz',avg_STD.elec.label),:)
>
> ans =
>
>         0         0    8.5313
>
>>> avg_STD.elec.pnt(strmatch('Pz',avg_STD.elec.label),:)
>
> ans =
>
>         0   -5.6243    7.1065
>
> Best wishes
>
> Henning
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
> 

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From Erin.Oakman at NYUMC.ORG  Tue Mar 30 19:01:25 2010
From: Erin.Oakman at NYUMC.ORG (Oakman, Erin)
Date: Tue, 30 Mar 2010 13:01:25 -0400
Subject: Induced activity
In-Reply-To: 
Message-ID: 

Hello Bobby,

Thanks for raising a very relevant question about the difference between induced and evoked activity !  

A good discussion of this can be found here, or attached as text
https://listserv.surfnet.nl/scripts/wa.cgi?A3=ind0704&L=FIELDTRIP&E=quoted-printable&P=234745&B=--Apple-Mail-1--1050075873&T=text%2Fhtml;%20charset=WINDOWS-1252&XSS=3

There is not a definite way to separate the induced and evoked activity.  The reason is that the sum of the squares is not the same as the square of the sum.

In my very limited experience, I have noticed that researchers sometimes use the term "induced" or "event-related spectral perturbation" to refer to the average of the single-trials power, which has been base-line corrected .  At least that is the case in the "induced power" in this paper:   Krishnan, G. P., W.P. Hetrick, C.A. Brenner, A. Shekhar, A.N. Steffen and B.F. O'Donnell 2009. Steady state and induced auditory gamma deficits in schizophrenia. Neuroimage.


Erin



Hi 
>     A late follow-up to this topic. I have recentrly been musing over how to
> get a "clean" measure of the non-phase locked activity. I have tried
> subtracting the ERF out prior to time-frequency computation but this
> produces quite a bit of artifact...presumably since the single trial data
> will have considerable ;atency "jitter"

The ERF collapses two sources of "jitter"; in the latency of the transient activity (if it exists) and the phase of ongoing oscillatory activity.

>    The comments from Christian below make sense ( I think) why simply
> subtracting the two time-frequency power representaions is not valid. But I
> wonder would this subtractive approach be valid if one worked with the
> magnitude of the signal rather than power..omitting all the squaring operations?

Computing the magnitude is still a non-linear operation (square root of a sum of squares, rectification, whatever ... ). The problem for why this won't work either resides in averaging part: in the evoked case you have a linear average followed by a non-linear operation, and in the induced case you have an average of the non-linearly transformed quantity. The "catch phrase" here is: the sum of the squares is not the same as the square of the sum! (or the sum of the rectified data is not the same as the rectified sum)

Hope this helps,
Christian


>   If this right theoretically, how to achieve this in Fieldtrip?. Would
> setting cfg.output = 'fourier then abs'ing the output work. My suspicion is
> no since the summing is being done first here. Alternatively, does one need
> to hack the code to return the magnitude.
>
> Thanks for your help on this and sorry for waking old threads :)
>
>    - Suresh   
>
> On Fri, 23 Feb 2007 01:44:59 +0100, Christian Hesse
>  wrote:
>
>> One further comment (please see below):
>>
>>> Hi Thomas,
>>>> Following up on this conversation. It seems that the ‘induced  
>>>> activity’ contains both phase-locked and non-phase-locked  
>>>> activity, whereby the ‘evoked’ activity contains only phase-locked  
>>>> activity. Is it then kosher to separate these components by linear  
>>>> subtraction? For example, if we first compute the ‘induced’  
>>>> activity by averaging power over individual trials, and from that  
>>>> subtract the ‘evoked activity’ (calculated based on average  
>>>> response) to get the induced activity without any phase-locked  
>>>> activity?
>>>
>>> It is not correct to subtract because computing the induced and  
>>> evoked power spectra involves squaring signal amplitudes (a non- 
>>> linear operation), and hence, taking your terminology to refer to  
>>> the instantaneous amplitudes of the signal components (this applies  
>>> to any time-frequency tile)
>>>> Induced = Phase + Non-Phase
>>>>
>>>> And
>>>>
>>>> Evoked = Phase
>>>>
>>>> Then
>>>>
>>>> Non-Phase = Induced – Evoked
>>>>
>>>>
>>> what you actually get from spectral or time-frequency analysis is  
>>> the power of your MEASURED signal
>>>
>>> Induced^2 = (Phase + Non-Phase)^2 = Phase^2 + 2*Phase*Non-Phase +  
>>> Non-Phase^2
>>>
>>> Evoked^2 = Phase^2
>>>
>>> Then
>>>
>>> Induced^2 - Evoked^2 = 2*Phase*Non-Phase + Non-Phase^2  AND NOT Non- 
>>> Phase^2
>>>
>> Note that the other crucial thing to consider here is that you are in  
>> one case averaging power over trials over trials:
>>
>> E[ (Induced^2)  ] =  E[ (Phase + Non-Phase)^2 ] = E[ (Phase^2 +  
>> 2*Phase*Non-Phase + Non-Phase^2) ] = E[ (Phase^2) ] E[ (Non- 
>> Phase^2) ] + E[ 2*Phase*Non-Phase ]
>>
>> this is why taking the square root of sqrt(Induced^2) does not give  
>> (Phase + Non-Phase) but sqrt(E[ (Phase+Non-Phase)^2 ]).
>>
>> in the evoked case you are taking the power of the average amplitude
>>
>> Evoked^2 = E[ Phase ]^2  (---> note the ^2 on the outside of the sum)
>>
>> so in subtracting you are actually assuming that E[Phase]^2 = E 
>> [(Phase)^2] which is unlikely to be accurate the case in finite samples.
>>
>> Hope I have not confused others (or myself) here.
>> Christian
>>
>>


>
> This is indeed the approach that I have followed succesfully a couple of
> times (e.g. Bastiaansen et al., JOCN 2006), although the terminology that
> you are using is somewhat confusing. I (and I guess most people) would refer
> to induced activity as that part of the EEG that is non-phase-locked, so I
> would restate your equation to:
> induced = EEG - evoked.
>
> However, there is a drawback to this approach, since it assumes that the ERP
> is absolutely stationary over trials. This is not the case in reality (e.g.
> subjects' attentional level or other states may change from trial to trial,
> giving rise to variability in the single-trial ERPs). This means that by
> subtracting the average ERP, one may introduce frequency components in the
> residual EEG that were not present before. Klimesch, and Kalcher and
> Pfurtscheller, have come up with ways of scaling the average ERP so as to
> yield a best fit of the average with each single-trial ERP, but also that 
> approach may be sub-optimal.
> My latest way around the problem is to run a TF analysis on the untreated
> EEG (containing both evoked and induced activity), and comparing this to a
> TF analysis of the subject-averaged ERPs (the evoked activity alone).
> Qualitative differences between the two analyses can now only be attributed
> to induced activity.
>
> Marcel
>
> Thomas Thesen wrote:
>>
>> Hi FieldTrippers,
>>
>>
>>
>> Following up on this conversation. It seems that the ‘induced activity’
> contains both phase-locked and non-phase-locked activity, whereby the
> ‘evoked’ activity contains only phase-locked activity. Is it then kosher to
> separate these components by linear subtraction? For example, if we first
> compute the ‘induced’ activity by averaging power over individual trials,
> and from that subtract the ‘evoked activity’ (calculated based on average
> response) to get the induced activity without any phase-locked activity?
>>
>>
>>
>> So if
>>
>> Induced = Phase + Non-Phase
>>
>> And
>>
>> Evoked = Phase
>>
>> Then
>>
>> Non-Phase = Induced – Evoked
>>
>>
>>
>> Or does the fact that this is a linear operations on data that have been
> constructed through a non-linear process render this somehow invalid? It has
> certainly been done before. Your comments would be much appreciated.




________________________________________
From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Bobby Stojanoski [stojanoski at UTSC.UTORONTO.CA]
Sent: Thursday, March 25, 2010 1:33 PM
To: FIELDTRIP at NIC.SURFNET.NL
Subject: [FIELDTRIP] Induced activity

Dear Fieldtrippers,

I am a relatively new user of fieldtrip and am very impressed!

I am interested in comparing differences at certain frequencies – induced 40-100 Hz – between 2 experimental conditions.  My understanding was that I can calculate induced activity in the gamma range by calculating the power for each trial (subject average -- freqanalysis) and then averaging across subjects (grand average -- freqdescriptives/freqgrandaverage).

To my dismay, when I plotted the results of my grandaverage I found a band of power at 55 - 65 Hz for the entire duration of my epoch. I should add this was not the case when I plotted power across trials for each participant.

Earlier discussions mention computing induced+evoked (using freqanalysis and freqgrandaverage) and subtracting that from evoked (using timelockanalysis+freqanalysis) to get extract induced only activity. However, later posts suggest that this is not a valid approach.

1. Where have I made my mistake?

2. If ((induced+evoked)-evoked)) is not valid, what is the correct approach to calculating induced activity at 40 - 100 Hz?

Any help would be greatly appreciated!

Thank you
Bobby Stojanoski




----------------------------------

The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.

http://listserv.surfnet.nl/archives/fieldtrip.html

http://www.ru.nl/fcdonders/fieldtrip/

------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: induced v evoked
Type: application/octet-stream
Size: 7762 bytes
Desc: induced v evoked
URL: 

From twitzel at NMR.MGH.HARVARD.EDU  Tue Mar 30 19:24:16 2010
From: twitzel at NMR.MGH.HARVARD.EDU (Thomas Witzel)
Date: Tue, 30 Mar 2010 13:24:16 -0400
Subject: Induced activity
In-Reply-To: <0F47B6EFAC0110438AE026CEF86D445912EEEDA7B4@MSGWSDCPMB04.nyumc.org>
Message-ID: 

Hello all,

just my two cents late in this discussion, and I hope I'm not repeating
what someone else has just said. The way I and my code calculate induced
activity was that I would first average all trials to get an ERF, then
subtract the ERF from each individual trial, and then calculate the the
power. This can be done in complex domain (i.e. after some frequency
analysis as well) as long no non-linear operations have been applied.
I never really had any problems with this approach.
As for the point made by Bobby about the frequency band being strong
troughout the trial (even baseline), this makes sense as there is
presumably some variation during the baseline as well. To get the "nice"
picture, you need to represent the result relative to the baseline to show
change of power/magnitude relative to the baseline with whatever flavour
normalization you like....

Thomas

  On
Tue, 30 Mar 2010, Oakman, Erin wrote:

> Hello Bobby,
>
> Thanks for raising a very relevant question about the difference between induced and evoked activity !
>
> A good discussion of this can be found here, or attached as text
> https://listserv.surfnet.nl/scripts/wa.cgi?A3=ind0704&L=FIELDTRIP&E=quoted-printable&P=234745&B=--Apple-Mail-1--1050075873&T=text%2Fhtml;%20charset=WINDOWS-1252&XSS=3
>
> There is not a definite way to separate the induced and evoked activity.  The reason is that the sum of the squares is not the same as the square of the sum.
>
> In my very limited experience, I have noticed that researchers sometimes use the term "induced" or "event-related spectral perturbation" to refer to the average of the single-trials power, which has been base-line corrected .  At least that is the case in the "induced power" in this paper:   Krishnan, G. P., W.P. Hetrick, C.A. Brenner, A. Shekhar, A.N. Steffen and B.F. O'Donnell 2009. Steady state and induced auditory gamma deficits in schizophrenia. Neuroimage.
>
>
> Erin
>
>
>
> Hi
>>     A late follow-up to this topic. I have recentrly been musing over how to
>> get a "clean" measure of the non-phase locked activity. I have tried
>> subtracting the ERF out prior to time-frequency computation but this
>> produces quite a bit of artifact...presumably since the single trial data
>> will have considerable ;atency "jitter"
>
> The ERF collapses two sources of "jitter"; in the latency of the transient activity (if it exists) and the phase of ongoing oscillatory activity.
>
>>    The comments from Christian below make sense ( I think) why simply
>> subtracting the two time-frequency power representaions is not valid. But I
>> wonder would this subtractive approach be valid if one worked with the
>> magnitude of the signal rather than power..omitting all the squaring operations?
>
> Computing the magnitude is still a non-linear operation (square root of a sum of squares, rectification, whatever ... ). The problem for why this won't work either resides in averaging part: in the evoked case you have a linear average followed by a non-linear operation, and in the induced case you have an average of the non-linearly transformed quantity. The "catch phrase" here is: the sum of the squares is not the same as the square of the sum! (or the sum of the rectified data is not the same as the rectified sum)
>
> Hope this helps,
> Christian
>
>
>>   If this right theoretically, how to achieve this in Fieldtrip?. Would
>> setting cfg.output = 'fourier then abs'ing the output work. My suspicion is
>> no since the summing is being done first here. Alternatively, does one need
>> to hack the code to return the magnitude.
>>
>> Thanks for your help on this and sorry for waking old threads :)
>>
>>    - Suresh
>>
>> On Fri, 23 Feb 2007 01:44:59 +0100, Christian Hesse
>>  wrote:
>>
>>> One further comment (please see below):
>>>
>>>> Hi Thomas,
>>>>> Following up on this conversation. It seems that the ?induced
>>>>> activity? contains both phase-locked and non-phase-locked
>>>>> activity, whereby the ?evoked? activity contains only phase-locked
>>>>> activity. Is it then kosher to separate these components by linear
>>>>> subtraction? For example, if we first compute the ?induced?
>>>>> activity by averaging power over individual trials, and from that
>>>>> subtract the ?evoked activity? (calculated based on average
>>>>> response) to get the induced activity without any phase-locked
>>>>> activity?
>>>>
>>>> It is not correct to subtract because computing the induced and
>>>> evoked power spectra involves squaring signal amplitudes (a non-
>>>> linear operation), and hence, taking your terminology to refer to
>>>> the instantaneous amplitudes of the signal components (this applies
>>>> to any time-frequency tile)
>>>>> Induced = Phase + Non-Phase
>>>>>
>>>>> And
>>>>>
>>>>> Evoked = Phase
>>>>>
>>>>> Then
>>>>>
>>>>> Non-Phase = Induced ? Evoked
>>>>>
>>>>>
>>>> what you actually get from spectral or time-frequency analysis is
>>>> the power of your MEASURED signal
>>>>
>>>> Induced^2 = (Phase + Non-Phase)^2 = Phase^2 + 2*Phase*Non-Phase +
>>>> Non-Phase^2
>>>>
>>>> Evoked^2 = Phase^2
>>>>
>>>> Then
>>>>
>>>> Induced^2 - Evoked^2 = 2*Phase*Non-Phase + Non-Phase^2  AND NOT Non-
>>>> Phase^2
>>>>
>>> Note that the other crucial thing to consider here is that you are in
>>> one case averaging power over trials over trials:
>>>
>>> E[ (Induced^2)  ] =  E[ (Phase + Non-Phase)^2 ] = E[ (Phase^2 +
>>> 2*Phase*Non-Phase + Non-Phase^2) ] = E[ (Phase^2) ] E[ (Non-
>>> Phase^2) ] + E[ 2*Phase*Non-Phase ]
>>>
>>> this is why taking the square root of sqrt(Induced^2) does not give
>>> (Phase + Non-Phase) but sqrt(E[ (Phase+Non-Phase)^2 ]).
>>>
>>> in the evoked case you are taking the power of the average amplitude
>>>
>>> Evoked^2 = E[ Phase ]^2  (---> note the ^2 on the outside of the sum)
>>>
>>> so in subtracting you are actually assuming that E[Phase]^2 = E
>>> [(Phase)^2] which is unlikely to be accurate the case in finite samples.
>>>
>>> Hope I have not confused others (or myself) here.
>>> Christian
>>>
>>>
>
>
>>
>> This is indeed the approach that I have followed succesfully a couple of
>> times (e.g. Bastiaansen et al., JOCN 2006), although the terminology that
>> you are using is somewhat confusing. I (and I guess most people) would refer
>> to induced activity as that part of the EEG that is non-phase-locked, so I
>> would restate your equation to:
>> induced = EEG - evoked.
>>
>> However, there is a drawback to this approach, since it assumes that the ERP
>> is absolutely stationary over trials. This is not the case in reality (e.g.
>> subjects' attentional level or other states may change from trial to trial,
>> giving rise to variability in the single-trial ERPs). This means that by
>> subtracting the average ERP, one may introduce frequency components in the
>> residual EEG that were not present before. Klimesch, and Kalcher and
>> Pfurtscheller, have come up with ways of scaling the average ERP so as to
>> yield a best fit of the average with each single-trial ERP, but also that
>> approach may be sub-optimal.
>> My latest way around the problem is to run a TF analysis on the untreated
>> EEG (containing both evoked and induced activity), and comparing this to a
>> TF analysis of the subject-averaged ERPs (the evoked activity alone).
>> Qualitative differences between the two analyses can now only be attributed
>> to induced activity.
>>
>> Marcel
>>
>> Thomas Thesen wrote:
>>>
>>> Hi FieldTrippers,
>>>
>>>
>>>
>>> Following up on this conversation. It seems that the ?induced activity?
>> contains both phase-locked and non-phase-locked activity, whereby the
>> ?evoked? activity contains only phase-locked activity. Is it then kosher to
>> separate these components by linear subtraction? For example, if we first
>> compute the ?induced? activity by averaging power over individual trials,
>> and from that subtract the ?evoked activity? (calculated based on average
>> response) to get the induced activity without any phase-locked activity?
>>>
>>>
>>>
>>> So if
>>>
>>> Induced = Phase + Non-Phase
>>>
>>> And
>>>
>>> Evoked = Phase
>>>
>>> Then
>>>
>>> Non-Phase = Induced ? Evoked
>>>
>>>
>>>
>>> Or does the fact that this is a linear operations on data that have been
>> constructed through a non-linear process render this somehow invalid? It has
>> certainly been done before. Your comments would be much appreciated.
>
>
>
>
> ________________________________________
> From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Bobby Stojanoski [stojanoski at UTSC.UTORONTO.CA]
> Sent: Thursday, March 25, 2010 1:33 PM
> To: FIELDTRIP at NIC.SURFNET.NL
> Subject: [FIELDTRIP] Induced activity
>
> Dear Fieldtrippers,
>
> I am a relatively new user of fieldtrip and am very impressed!
>
> I am interested in comparing differences at certain frequencies ? induced 40-100 Hz ? between 2 experimental conditions.  My understanding was that I can calculate induced activity in the gamma range by calculating the power for each trial (subject average -- freqanalysis) and then averaging across subjects (grand average -- freqdescriptives/freqgrandaverage).
>
> To my dismay, when I plotted the results of my grandaverage I found a band of power at 55 - 65 Hz for the entire duration of my epoch. I should add this was not the case when I plotted power across trials for each participant.
>
> Earlier discussions mention computing induced+evoked (using freqanalysis and freqgrandaverage) and subtracting that from evoked (using timelockanalysis+freqanalysis) to get extract induced only activity. However, later posts suggest that this is not a valid approach.
>
> 1. Where have I made my mistake?
>
> 2. If ((induced+evoked)-evoked)) is not valid, what is the correct approach to calculating induced activity at 40 - 100 Hz?
>
> Any help would be greatly appreciated!
>
> Thank you
> Bobby Stojanoski
>
>
>
>
> ----------------------------------
>
> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.
>
> http://listserv.surfnet.nl/archives/fieldtrip.html
>
> http://www.ru.nl/fcdonders/fieldtrip/
>
> 
> > > ------------------------------------------------------------
> This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
> ================================= > > >
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
>


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From karl.doron at GMAIL.COM  Wed Mar 31 01:02:12 2010
From: karl.doron at GMAIL.COM (Karl Doron)
Date: Wed, 31 Mar 2010 01:02:12 +0200
Subject: ft_preprocessing for bandpass and hilbert
Message-ID: 

Hello,

I would be grateful for some advice on a couple of processing pipeline
questions.

1. I'm wondering if I need two calls to ft_preprocessing() --with one for
bandpass filtering and then another for a hilbert transform to get the
complex values.

2. Is the cfg.padding applied here separate from that specified during
artifact rejection, i.e., cfg.artfctdef.xxx.fltpadding?


Thanks,
karl doron

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.


From muthuraman10 at HOTMAIL.COM  Wed Mar 31 16:03:07 2010
From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman)
Date: Wed, 31 Mar 2010 14:03:07 +0000
Subject: DICS on Frequency bands!
Message-ID: 


Hello Fieldtrippers,

 

In order to do the source analysis DICS on a band of frequencies. For example the beta band (15-30 Hz), the source analysis need to repeated for each frequency and grandaverage need to be done for all these frequencies. Or is there a way to do for the whole frequency band?

 

Thanking you 

 

With regards,

M.Muthuraman.
 		 	   		  
_________________________________________________________________
Fight for the top Test spot
http://sports.in.msn.com/cricket/ 
----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From michael.wibral at WEB.DE  Wed Mar 31 22:49:18 2010
From: michael.wibral at WEB.DE (Michael Wibral)
Date: Wed, 31 Mar 2010 22:49:18 +0200
Subject: DICS on Frequency bands!
In-Reply-To: 
Message-ID: 

An HTML attachment was scrubbed...
URL: 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Michael Wibral.vcf
Type: text/x-vcard
Size: 628 bytes
Desc: not available
URL: