From lwn_07 at YAHOO.COM.CN Tue Sep 2 10:16:30 2008 From: lwn_07 at YAHOO.COM.CN (=?gb2312?q?=C0=EE=CE=C0=C4=C8?=) Date: Tue, 2 Sep 2008 16:16:30 +0800 Subject: Question about Preprocessing Message-ID: Hi, I have a problem in "preprocessing". It seems that the option "cfg.removemcg" has no effect in removing mcg. As descriped in the function "preprocessing": if strcmp(cfg.removemcg, 'yes') cfg = template_mcg(cfg); mcgchannel = channelselection(cfg.artfctdef.mcg.channel, hdr.label); mcgindx = match_str(cfg.channel, mcgchannel); for i=1:length(mcgchannel) fprintf('removing mcg on channel %s\n', mcgchannel{i}); end end But there is no such "template_mcg" in the toolbox. Do you have any suggestion on removing the ECG artifacts? Thanks! Lee --------------------------------- 雅虎邮箱,您的终生邮箱! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Sep 2 10:36:42 2008 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 2 Sep 2008 10:36:42 +0200 Subject: Question about Preprocessing In-Reply-To: <706952.97354.qm@web15601.mail.cnb.yahoo.com> Message-ID: Dear Lee, I don’t know about the cfg.removemcg, it is an undocumented option, so it might be that this option which is not supported fully in the external FieldTrip version. What you can do is use independent component analysis to remove ecg artifacts. See the FieldTrip wiki internet page (http://www2.ru.nl/fcdonders/fieldtrip) under “example matlab scripts” go to “Use independent component analysis (ICA) to remove ECG artifacts” Good luck, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of ??? Sent: Tuesday, September 02, 2008 10:17 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Question about Preprocessing Hi, I have a problem in "preprocessing". It seems that the option "cfg.removemcg" has no effect in removing mcg. As descriped in the function "preprocessing": if strcmp(cfg.removemcg, 'yes') cfg = template_mcg(cfg); mcgchannel = channelselection(cfg.artfctdef.mcg.channel, hdr.label); mcgindx = match_str(cfg.channel, mcgchannel); for i=1:length(mcgchannel) fprintf('removing mcg on channel %s\n', mcgchannel{i}); end end But there is no such "template_mcg" in the toolbox. Do you have any suggestion on removing the ECG artifacts? Thanks! Lee _____ 雅虎邮箱,您的终生邮箱! ---------------------------------- The aim of this list 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bleichner.martin at GMAIL.COM Wed Sep 3 10:48:13 2008 From: bleichner.martin at GMAIL.COM (Martin Bleichner) Date: Wed, 3 Sep 2008 10:48:13 +0200 Subject: redefinetrial() probelm Message-ID: Hi, I am trying to do a 'Permutation tests for time-frequency representations: Within trial experiments' as described in the tutorial. However, I run into problems using the command redefinetrial(). When I apply it to my preprocessed data I get the error message �??? Error using ==> redefine trial at 112 the trial definition is inconsistent with the data.� This might be connected to the warning I get when I am using freqanalysis(): �could not locate the trial definition �trl� in the data structure�, however in this case the analysis runs through without further problems. I am using data that was preprocessed (re-referencing and epoching) in eeglab and than imported into fieldtrip using eeglab2fieldtrip(), and my data struct does not contain the �trl� field. What could I do? I could also do my preprocessing and epoching in fieldtrip, but I could not figure out how to import my micromed (.trc) files into fieldtrip, so I always took the route via eeglab. Thanks for you help Martin ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From nathanweisz at MAC.COM Wed Sep 3 11:20:33 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 3 Sep 2008 11:20:33 +0200 Subject: redefinetrial() probelm In-Reply-To: Message-ID: hi martin, in that case the best is to add the trl field (under yourdata.cfg.trl) by hand. 'trl' is a simple matrix containing as many roys as epochs and 3 columns: the first your event onset, the second the pre-event period and the third your post event period. everything in sampling points. read the help info of definetrial.m. if you don't have the absolute starting points of your events, then it will probably work if you "fool" fieldtrip by adding some random numer in the first column. once you have done your redefinetrial, then some sanity check using e.g. timelockanalysis yould be good just to see if your trl was correct. good luck, nathan On 03.09.2008, at 10:48, Martin Bleichner wrote: > Hi, > I am trying to do a 'Permutation tests for time-frequency > representations: > Within trial experiments' as described in the tutorial. > > However, I run into problems using the command redefinetrial(). > When I apply it to my preprocessed data I get the error message > ‘??? Error using ==> redefine trial at 112 > the trial definition is inconsistent with the data.’ > > This might be connected to the warning I get when I am using > freqanalysis(): > ‘could not locate the trial definition ‘trl’ in the data structure’, > however in this > case the analysis runs through without further problems. > > I am using data that was preprocessed (re-referencing and epoching) > in eeglab > and than imported into fieldtrip using eeglab2fieldtrip(), and my > data struct > does not contain the ‘trl’ field. > > What could I do? I could also do my preprocessing and epoching in > fieldtrip, but > I could not figure out how to import my micromed (.trc) files into > fieldtrip, so I > always took the route via eeglab. > > Thanks for you help > > Martin > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/fcdonders/fieldtrip. -------------------------------------------- Attention: New Contact Details -------------------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wibral at BIC.UNI-FRANKFURT.DE Mon Sep 15 18:47:33 2008 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Mon, 15 Sep 2008 18:47:33 +0200 Subject: reuse of beamformer filters Message-ID: Dear Listusers, I'd like to reuse filters computed for an average covariance matrix from two conditions for the subsequent source images of each condition, so that statistics will later on not be influenced by differences in SNR that change the filter computation. Does anybody know how to do this efficiently in sourceanalysis? I thought there was an option like cfg.hasfilters='yes'or so but obviously I was wrong :-). I also looked for something similar in source descriptives, but couldn't find anything. Any help appreciated, Michael Wibral ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From susannah.murphy at PSYCH.OX.AC.UK Mon Sep 15 18:47:40 2008 From: susannah.murphy at PSYCH.OX.AC.UK (Susannah Murphy) Date: Mon, 15 Sep 2008 17:47:40 +0100 Subject: reuse of beamformer filters In-Reply-To: <779386856@web.de> Message-ID: Thanks for your message. I am away until Monday 22nd September. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Mon Sep 15 19:49:20 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Mon, 15 Sep 2008 18:49:20 +0100 Subject: reuse of beamformer filters In-Reply-To: Message-ID: Hi Michael, Look in the beamforming tutorial at: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:beamformer in the Appendix. The option you need is cfg.keepfilter. I think what is done there is more or less what you need. Best, Vladimir On Mon, Sep 15, 2008 at 5:47 PM, Michael Wibral wrote: > Dear Listusers, > > I'd like to reuse filters computed for an average covariance matrix from two conditions for the subsequent source images of each condition, so that statistics will later on not be influenced by differences in SNR that change the filter computation. Does anybody know how to do this efficiently in sourceanalysis? > I thought there was an option like cfg.hasfilters='yes'or so but obviously I was wrong :-). I also looked for something similar in source descriptives, but couldn't find anything. > > > > > Any help appreciated, > Michael Wibral > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/fcdonders/fieldtrip. From michael.wibral at WEB.DE Tue Sep 16 15:03:19 2008 From: michael.wibral at WEB.DE (Michael Wibral) Date: Tue, 16 Sep 2008 15:03:19 +0200 Subject: reuse of beamformer filters Message-ID: Dear Vladimir, thanks for directing me to the appendix of the beamformer tutorial. My problem is indeed related but not quite the same. What I would like to do with these data later is to compare between two groups. I suspect some differences in their baselines. Hence, I would not like to work with source statistics (or relative power change values for that matter) but with raw power differences (i.e. task-baseline). Then I'd like to compare these raw power differences between the two groups. If I compare the two groups statistically using second level stats on t-values or relative changes, differences could be due to baseline differences, instead of task related absolute changes. Therefore I would like to compute the filters and keep them, but do not want to perform sourcestatististics in in each single subject, just source analysis. But maybe this is simply a bit exotic. I will also look a bit into the possibilities of sourcestatistics; whether I can actually get my desired difference output w/o stats (there should be a raweffect with each subject after sourcestats, shouldn't it. I could then use this raweffect as an input to the secondlevel sourcestats by copying it over to the correct field...). Best Regards, Michael > -----Ursprüngliche Nachricht----- > Von: "Vladimir Litvak" > Gesendet: 15.09.08 20:12:40 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] reuse of beamformer filters > Hi Michael, > > Look in the beamforming tutorial at: > http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:beamformer > in the Appendix. The option you need is cfg.keepfilter. I think what > is done there is more or less what you need. > > Best, > > Vladimir > > > On Mon, Sep 15, 2008 at 5:47 PM, Michael Wibral > wrote: > > Dear Listusers, > > > > I'd like to reuse filters computed for an average covariance matrix from two conditions for the subsequent source images of each condition, so that statistics will later on not be influenced by differences in SNR that change the filter computation. Does anybody know how to do this efficiently in sourceanalysis? > > I thought there was an option like cfg.hasfilters='yes'or so but obviously I was wrong :-). I also looked for something similar in source descriptives, but couldn't find anything. > > > > > > > > > > Any help appreciated, > > Michael Wibral > > > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From v.litvak at ION.UCL.AC.UK Tue Sep 16 15:56:11 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Tue, 16 Sep 2008 14:56:11 +0100 Subject: reuse of beamformer filters In-Reply-To: <780232753@web.de> Message-ID: Hi, I don't use sourcestatistics myself so I can't get to the bottom of your problem, perhaps Robert or JM should try. The point is just that you can compute filters from any data and then use them on any other data. I don't know at what stage the baseline correction is done in your case. I usually just get the raw output and then process in in any way I like. Best, Vladimir On Tue, Sep 16, 2008 at 2:03 PM, Michael Wibral wrote: > Dear Vladimir, > > thanks for directing me to the appendix of the beamformer tutorial. My problem is indeed related but not quite the same. What I would like to do with these data later is to compare between two groups. I suspect some differences in their baselines. Hence, I would not like to work with source statistics (or relative power change values for that matter) but with raw power differences (i.e. task-baseline). Then I'd like to compare these raw power differences between the two groups. If I compare the two groups statistically using second level stats on t-values or relative changes, differences could be due to baseline differences, instead of task related absolute changes. Therefore I would like to compute the filters and keep them, but do not want to perform sourcestatististics in in each single subject, just source analysis. > > But maybe this is simply a bit exotic. I will also look a bit into the possibilities of sourcestatistics; whether I can actually get my desired difference output w/o stats (there should be a raweffect with each subject after sourcestats, shouldn't it. I could then use this raweffect as an input to the secondlevel sourcestats by copying it over to the correct field...). > > Best Regards, > Michael > > >> -----Ursprüngliche Nachricht----- >> Von: "Vladimir Litvak" >> Gesendet: 15.09.08 20:12:40 >> An: FIELDTRIP at NIC.SURFNET.NL >> Betreff: Re: [FIELDTRIP] reuse of beamformer filters > > >> Hi Michael, >> >> Look in the beamforming tutorial at: >> http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:beamformer >> in the Appendix. The option you need is cfg.keepfilter. I think what >> is done there is more or less what you need. >> >> Best, >> >> Vladimir >> >> >> On Mon, Sep 15, 2008 at 5:47 PM, Michael Wibral >> wrote: >> > Dear Listusers, >> > >> > I'd like to reuse filters computed for an average covariance matrix from two conditions for the subsequent source images of each condition, so that statistics will later on not be influenced by differences in SNR that change the filter computation. Does anybody know how to do this efficiently in sourceanalysis? >> > I thought there was an option like cfg.hasfilters='yes'or so but obviously I was wrong :-). I also looked for something similar in source descriptives, but couldn't find anything. >> > >> > >> > >> > >> > Any help appreciated, >> > Michael Wibral >> > >> > >> > ---------------------------------- >> > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/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/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/fcdonders/fieldtrip. From shehsu at INDIANA.EDU Tue Sep 16 17:06:51 2008 From: shehsu at INDIANA.EDU (Hsu, Shen-Mou) Date: Tue, 16 Sep 2008 11:06:51 -0400 Subject: cluster analysis and EEG channel information Message-ID: Dear Users, I preprocessed my EEG data using EEGLAB and then converted the data into the fieldtrip format using eeglab2fieldtrip. However, I noticed that in cfg.channel, there are only labels without any information about electrode locations. I was wondering if this is OK to run cluster analysis. Besides, I also wondered how to specify the configuration-"cfg.channel" in this case. Many thanks in advance, Shen-Mou ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From shehsu at INDIANA.EDU Tue Sep 16 17:56:03 2008 From: shehsu at INDIANA.EDU (Hsu, Shen-Mou) Date: Tue, 16 Sep 2008 11:56:03 -0400 Subject: cluster analysis and EEG channel information In-Reply-To: <7F00B6A0D4D0674E80A6C1D6DA873B5701CC652B51@iu-mssg-mbx05.ads.iu.edu> Message-ID: Just to clarify my query a bit more. I am trying to perform permutation tests on ERP data. The configuration was as below and the following error message was returned. ??? Undefined function or method 'conndef' for input arguments of type 'double'. Error in ==> clusterstat at 181 posclusobs = bwlabeln(tmp, conndef(length(cfg.dim),'min')); Error in ==> statistics_montecarlo at 394 [stat, cfg] = clusterstat(cfg, statrand, statobs); Error in ==> statistics_wrapper at 362 [stat, cfg] = statmethod(cfg, dat, cfg.design); Error in ==> timelockstatistics at 107 [stat] = statistics_wrapper(cfg, varargin{:}); load GA_F; load GA_N cfg = []; cfg.channel = {'all'}; cfg.latency = [0 0.5]; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 100; subj = 15; design=zeros(2,2*subj); for i = 1:subj design(1,i) = i; end for i = 1:subj design(1,subj+i) = i; end design(2,1:subj) = 1; design(2,subj+1:2*subj) = 2; cfg.design = design; cfg.uvar = 1; cfg.ivar = 2; [stat_FvsN_HV] = timelockstatistics(cfg, GA_F, GA_N); ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Hsu, Shen-Mou [shehsu at indiana.edu] Sent: Tuesday, September 16, 2008 11:06 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] cluster analysis and EEG channel information Dear Users, I preprocessed my EEG data using EEGLAB and then converted the data into the fieldtrip format using eeglab2fieldtrip. However, I noticed that in cfg.channel, there are only labels without any information about electrode locations. I was wondering if this is OK to run cluster analysis. Besides, I also wondered how to specify the configuration-"cfg.channel" in this case. Many thanks in advance, Shen-Mou ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Tue Sep 16 22:15:38 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Tue, 16 Sep 2008 22:15:38 +0200 Subject: cluster analysis and EEG channel information In-Reply-To: <7F00B6A0D4D0674E80A6C1D6DA873B5701CC652B51@iu-mssg-mbx05.ads.iu.edu> Message-ID: dear shen-mou, actually - if i remember correctly (long time ago) - after running eeglab2fieldtrip there should be a field in your exported data structure called elec. this should have the electrode info. otherwise you could read the electrode info using read_fcdc_elec. then add the field by hand. for clustering electrodes you need to specify a neighbourhood- structure. take a look at statistics_montecarlo and the comments on cfg.neighbours. look also at the function neigbourselection. basically you could also create that structure by hand. good luck, nathan On 16.09.2008, at 17:06, Hsu, Shen-Mou wrote: > Dear Users, > > > I preprocessed my EEG data using EEGLAB and then converted the data > into the fieldtrip format using eeglab2fieldtrip. However, I noticed > that in cfg.channel, there are only labels without any information > about electrode locations. I was wondering if this is OK to run > cluster analysis. Besides, I also wondered how to specify the > configuration-"cfg.channel" in this case. > > Many thanks in advance, > > Shen-Mou > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/fcdonders/fieldtrip. -------------------------------------------- Attention: New Contact Details -------------------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at MAC.COM Tue Sep 16 22:16:08 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Tue, 16 Sep 2008 22:16:08 +0200 Subject: cluster analysis and EEG channel information In-Reply-To: <7F00B6A0D4D0674E80A6C1D6DA873B5701CC652B52@iu-mssg-mbx05.ads.iu.edu> Message-ID: your problem is that you do not have the image processing toolbox ... you'll need it to use the clustering functions. On 16.09.2008, at 17:56, Hsu, Shen-Mou wrote: > Just to clarify my query a bit more. I am trying to perform > permutation tests on ERP data. The configuration was as below and > the following error message was returned. > > ??? Undefined function or method 'conndef' for input > arguments of type 'double'. > > Error in ==> clusterstat at 181 > posclusobs = bwlabeln(tmp, > conndef(length(cfg.dim),'min')); > > Error in ==> statistics_montecarlo at 394 > [stat, cfg] = clusterstat(cfg, statrand, statobs); > > Error in ==> statistics_wrapper at 362 > [stat, cfg] = statmethod(cfg, dat, cfg.design); > > Error in ==> timelockstatistics at 107 > [stat] = statistics_wrapper(cfg, varargin{:}); > > > > > load GA_F; load GA_N > > cfg = []; > cfg.channel = {'all'}; > cfg.latency = [0 0.5]; > > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 100; > > subj = 15; > design=zeros(2,2*subj); > for i = 1:subj > design(1,i) = i; > end > for i = 1:subj > design(1,subj+i) = i; > end > design(2,1:subj) = 1; > design(2,subj+1:2*subj) = 2; > > cfg.design = design; > cfg.uvar = 1; > cfg.ivar = 2; > > > [stat_FvsN_HV] = timelockstatistics(cfg, GA_F, GA_N); > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Hsu, Shen-Mou [shehsu at indiana.edu] > Sent: Tuesday, September 16, 2008 11:06 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] cluster analysis and EEG channel information > > Dear Users, > > > I preprocessed my EEG data using EEGLAB and then converted the data > into the fieldtrip format using eeglab2fieldtrip. However, I noticed > that in cfg.channel, there are only labels without any information > about electrode locations. I was wondering if this is OK to run > cluster analysis. Besides, I also wondered how to specify the > configuration-"cfg.channel" in this case. > > Many thanks in advance, > > Shen-Mou > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and 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/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/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Wed Sep 17 15:35:36 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 17 Sep 2008 15:35:36 +0200 Subject: reuse of beamformer filters In-Reply-To: Message-ID: Dear Michael, If I recall correctly what you would like to do, I would suggest one of the following two paths: first possibility: -perform sourceanalysis with cfg.keepfilter = 'yes' and with an averaged covariance as input -append source.avg.filter to cfg.grid for a second round of sourcenalysis, but now with the condition-specific covariances as input. you might want to check it in the code, but I am quite sure that if the configuration already contains filters, it will use these on the input covariance -this will give you two source-structures, one for the baseline and one for the task condition. second possibility: -use sourcestatistics and create a 'first-level' stat for each subject, using as cfg.statistic = 'diff'. This will just take the difference between task and baseline. Hopefully this helps, Best, JM On Sep 16, 2008, at 3:56 PM, Vladimir Litvak wrote: > Hi, > > I don't use sourcestatistics myself so I can't get to the bottom of > your problem, perhaps Robert or JM should try. The point is just that > you can compute filters from any data and then use them on any other > data. I don't know at what stage the baseline correction is done in > your case. I usually just get the raw output and then process in in > any way I like. > > Best, > > Vladimir > > On Tue, Sep 16, 2008 at 2:03 PM, Michael Wibral > wrote: >> Dear Vladimir, >> >> thanks for directing me to the appendix of the beamformer >> tutorial. My problem is indeed related but not quite the same. >> What I would like to do with these data later is to compare >> between two groups. I suspect some differences in their baselines. >> Hence, I would not like to work with source statistics (or >> relative power change values for that matter) but with raw power >> differences (i.e. task-baseline). Then I'd like to compare these >> raw power differences between the two groups. If I compare the two >> groups statistically using second level stats on t-values or >> relative changes, differences could be due to baseline >> differences, instead of task related absolute changes. Therefore I >> would like to compute the filters and keep them, but do not want >> to perform sourcestatististics in in each single subject, just >> source analysis. >> >> But maybe this is simply a bit exotic. I will also look a bit into >> the possibilities of sourcestatistics; whether I can actually get >> my desired difference output w/o stats (there should be a >> raweffect with each subject after sourcestats, shouldn't it. I >> could then use this raweffect as an input to the secondlevel >> sourcestats by copying it over to the correct field...). >> >> Best Regards, >> Michael >> >> >>> -----Ursprüngliche Nachricht----- >>> Von: "Vladimir Litvak" >>> Gesendet: 15.09.08 20:12:40 >>> An: FIELDTRIP at NIC.SURFNET.NL >>> Betreff: Re: [FIELDTRIP] reuse of beamformer filters >> >> >>> Hi Michael, >>> >>> Look in the beamforming tutorial at: >>> http://www2.ru.nl/fcdonders/fieldtrip/doku.php? >>> id=fieldtrip:documentation:tutorial:beamformer >>> in the Appendix. The option you need is cfg.keepfilter. I think what >>> is done there is more or less what you need. >>> >>> Best, >>> >>> Vladimir >>> >>> >>> On Mon, Sep 15, 2008 at 5:47 PM, Michael Wibral >>> wrote: >>>> Dear Listusers, >>>> >>>> I'd like to reuse filters computed for an average covariance >>>> matrix from two conditions for the subsequent source images of >>>> each condition, so that statistics will later on not be >>>> influenced by differences in SNR that change the filter >>>> computation. Does anybody know how to do this efficiently in >>>> sourceanalysis? >>>> I thought there was an option like cfg.hasfilters='yes'or so >>>> but obviously I was wrong :-). I also looked for something >>>> similar in source descriptives, but couldn't find anything. >>>> >>>> >>>> >>>> >>>> Any help appreciated, >>>> Michael Wibral >>>> >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between >>>> users of the FieldTrip toolbox, to share experiences and to >>>> discuss new ideas for MEG and EEG analysis. See also http:// >>>> listserv.surfnet.nl/archives/fieldtrip.html and 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/ >>> 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/ >> 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/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/fcdonders/fieldtrip. From michael.wibral at WEB.DE Wed Sep 17 17:08:34 2008 From: michael.wibral at WEB.DE (Michael Wibral) Date: Wed, 17 Sep 2008 17:08:34 +0200 Subject: reuse of beamformer filters Message-ID: Dear Jan-Mathijs, dear Vladimir, many thanks for your help. Option 1 (cf. below) with running sourceanalysis twice works fine now. Just took us a while to figure out were to put the precomputed filters and to get the info, that they would be really used (there is some output of beamformer_lcmv that says so, we just found out later). Maybe this cfg-possibility could be put into the comments of sourceanalysis and beamformer_lcmv somewhere? Michael > -----Ursprüngliche Nachricht----- > Von: "jan-mathijs schoffelen" > Gesendet: 17.09.08 15:53:19 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] reuse of beamformer filters > Dear Michael, > > If I recall correctly what you would like to do, I would suggest one > of the following two paths: > > first possibility: > -perform sourceanalysis with cfg.keepfilter = 'yes' and with an > averaged covariance as input > -append source.avg.filter to cfg.grid for a second round of > sourcenalysis, but now with the condition-specific covariances as input. > you might want to check it in the code, but I am quite sure that if > the configuration already contains filters, it will use these on the > input > covariance > -this will give you two source-structures, one for the baseline and > one for the task condition. > > second possibility: > -use sourcestatistics and create a 'first-level' stat for each > subject, using as cfg.statistic = 'diff'. This will just take the > difference between > task and baseline. > > Hopefully this helps, > > Best, > JM > > On Sep 16, 2008, at 3:56 PM, Vladimir Litvak wrote: > > > Hi, > > > > I don't use sourcestatistics myself so I can't get to the bottom of > > your problem, perhaps Robert or JM should try. The point is just that > > you can compute filters from any data and then use them on any other > > data. I don't know at what stage the baseline correction is done in > > your case. I usually just get the raw output and then process in in > > any way I like. > > > > Best, > > > > Vladimir > > > > On Tue, Sep 16, 2008 at 2:03 PM, Michael Wibral > > wrote: > >> Dear Vladimir, > >> > >> thanks for directing me to the appendix of the beamformer > >> tutorial. My problem is indeed related but not quite the same. > >> What I would like to do with these data later is to compare > >> between two groups. I suspect some differences in their baselines. > >> Hence, I would not like to work with source statistics (or > >> relative power change values for that matter) but with raw power > >> differences (i.e. task-baseline). Then I'd like to compare these > >> raw power differences between the two groups. If I compare the two > >> groups statistically using second level stats on t-values or > >> relative changes, differences could be due to baseline > >> differences, instead of task related absolute changes. Therefore I > >> would like to compute the filters and keep them, but do not want > >> to perform sourcestatististics in in each single subject, just > >> source analysis. > >> > >> But maybe this is simply a bit exotic. I will also look a bit into > >> the possibilities of sourcestatistics; whether I can actually get > >> my desired difference output w/o stats (there should be a > >> raweffect with each subject after sourcestats, shouldn't it. I > >> could then use this raweffect as an input to the secondlevel > >> sourcestats by copying it over to the correct field...). > >> > >> Best Regards, > >> Michael > >> > >> > >>> -----Ursprüngliche Nachricht----- > >>> Von: "Vladimir Litvak" > >>> Gesendet: 15.09.08 20:12:40 > >>> An: FIELDTRIP at NIC.SURFNET.NL > >>> Betreff: Re: [FIELDTRIP] reuse of beamformer filters > >> > >> > >>> Hi Michael, > >>> > >>> Look in the beamforming tutorial at: > >>> http://www2.ru.nl/fcdonders/fieldtrip/doku.php? > >>> id=fieldtrip:documentation:tutorial:beamformer > >>> in the Appendix. The option you need is cfg.keepfilter. I think what > >>> is done there is more or less what you need. > >>> > >>> Best, > >>> > >>> Vladimir > >>> > >>> > >>> On Mon, Sep 15, 2008 at 5:47 PM, Michael Wibral > >>> wrote: > >>>> Dear Listusers, > >>>> > >>>> I'd like to reuse filters computed for an average covariance > >>>> matrix from two conditions for the subsequent source images of > >>>> each condition, so that statistics will later on not be > >>>> influenced by differences in SNR that change the filter > >>>> computation. Does anybody know how to do this efficiently in > >>>> sourceanalysis? > >>>> I thought there was an option like cfg.hasfilters='yes'or so > >>>> but obviously I was wrong :-). I also looked for something > >>>> similar in source descriptives, but couldn't find anything. > >>>> > >>>> > >>>> > >>>> > >>>> Any help appreciated, > >>>> Michael Wibral > >>>> > >>>> > >>>> ---------------------------------- > >>>> The aim of this list is to facilitate the discussion between > >>>> users of the FieldTrip toolbox, to share experiences and to > >>>> discuss new ideas for MEG and EEG analysis. See also http:// > >>>> listserv.surfnet.nl/archives/fieldtrip.html and 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/ > >>> 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/ > >> 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/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/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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From bmewang at YAHOO.COM Thu Sep 18 05:48:35 2008 From: bmewang at YAHOO.COM (Wei Wang) Date: Thu, 18 Sep 2008 05:48:35 +0200 Subject: Lost gray matter during segmentation Message-ID: Hi everyone, I'm trying to work with my own MRI data, and after I did the segmentation with volumesegment.m , when I examine the gray matter with sourceplot, it seems that fraction of the gray matter was not marked as gray matter. They were left out for some reason. For example, part of the visual cortex are not included in my gray matter. Since the segmentation is done using SPM2, I read the SPM manual a little bit, and, in the manual, it says, "5.2.5 Clean up any partitions This uses a crude routine for extracting the brain from segmentedimages. It begins by taking the white matter, and eroding it acouple of times to get rid of any odd voxels. The algorithm continues on to do conditional dilations for several iterations,where the condition is based upon gray or white matter being present. This identified region is then used to clean up the grey and white matter partitions, and has a slight in uences on the CSF partition. If you find pieces of brain being chopped out in your data, then you may wish to disable or tone down the cleanup procedure." So, I went into the volumesegment.m code, and set: defaults.segment.write.cleanup = 0; When I run volumesegment again, it seems to improve the results a little bit, but still, I'm loosing some gray matters. I'm wondering if you have any suggestions? Thank you very much for the help! Wei Wang Department of Physical Medicine and Rehabilitation University of Pittsburgh ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Sep 24 17:53:03 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 24 Sep 2008 17:53:03 +0200 Subject: change in directory structure Message-ID: Dear fieldtrip users, yesterday and today I have made some changes to teh directory structure. You might not have noticed (as I hope), since I have tried my best to keep everything backward compatible without any changes on your side. However, the change in directory structure is rather large, and involved moving a lot of files around. More details can be found here: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:development:directorylayout There still migth be some problems with the inhouse/FCDC version of fieldtrip, or with the external version that you got of the ftp server. The most likely problems that you may see are "missing function" problems, which are easy to solve by setting the path correctly. I would expect all problems to be easily identifyable, i.e. not that the results of computations are be wrong, but rather that Matlab just gives a plain error. The fieldtrip path is now set automatically using the fieldtripdefs.m script, where you could have look into if you think that the path is a problem on your Matlab/ fieldtrip installation. If you see problems that should be solved in the release version of fieldtrip, please let us know. best regards, Robert ----------------------------------------------------------- Robert Oostenveld Senior Researcher Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Sep 24 18:29:02 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 24 Sep 2008 18:29:02 +0200 Subject: changed default reading functions for CTF Message-ID: Dear CTF fieldtrip users, I have changed the default reading functions for CTF data. The read_header and read_data functions used to call low-level functions that originated from the FCDC. The new default is to use p-files (i.e. precompiled matlab files) that have been contributed to fieldtrip/ fileio by CTF. These new functions are not open source, but can be freely distributed. The advantage of the new functions is that they allow the use of synthetic gradients. See denoise_synthetic and the email exchange on this topic some time back. best regards, Robert ----------------------------------------------------------- Robert Oostenveld Senior Researcher Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From j.poort at NIN.KNAW.NL Mon Sep 29 09:54:50 2008 From: j.poort at NIN.KNAW.NL (Jasper Poort) Date: Mon, 29 Sep 2008 09:54:50 +0200 Subject: cross-spectrum to cross-correlogram Message-ID: Dear all, I'd like to convert the cross-spectrum to a cross-correlogram. My first approach would be simply to ifft the output of freqanalysis with output option 'complex'. However, I have difficulty understanding the result of this procedure and in particular how I can get output comparable to the matlab function xcorr using FieldTrip. Below I inserted a small test script. Best, Jasper % using the fake data from the FieldTrip tutorial 'Fourier analysis of % oscillatory power and coherence' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %get many repetitions of two signals with somewhat consistent phase difference clear all close all frq = 10; % Hz len = 1; % seconds smpfrq = 100; % Hz numrpt = 1000; phsspreadfac = 0.5; circulran = mod(randn(2.*numrpt,2).*phsspreadfac + pi, 2.* pi) - pi; ranphs = circulran ./ (2 .* pi); phsdif = 45 ./ 360; noifac = 1./50; for rptlop = 1:numrpt wav(:,rptlop,1) = sin(((0:(len.*smpfrq-1))./(len.*smpfrq).*(frq.*2.*pi))+(ranphs(rptlop,1).*2. *pi)) + ... randn(1,len.*smpfrq).*noifac; wav(:,rptlop,2) = sin(((0:(len.*smpfrq-1))./(len.*smpfrq).*(frq.*2.*pi))+((ranphs(rptlop,2)+ph sdif).*2.*pi)) + ... randn(1,len.*smpfrq).*noifac; end % get the FFT of the waves for rptlop = 1:numrpt fftwav(:,rptlop,1) = fft(wav(:,rptlop,1)); fftwav(:,rptlop,2) = fft(wav(:,rptlop,2)); end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % make FieldTrip structure dum.label = {'1','2'}; dum.fsample = smpfrq; for i=1:size(wav,2), % for every trial dum.trial{i}=squeeze(wav(:,i,:))'; dum.time{i} =[0:(len.*smpfrq-1)]./smpfrq; end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %fft: cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.taper = 'hanning'; cfg.tapsmofrq = 1; [freq] = freqanalysis(cfg, dum) % cross-spectrum CS=freq.fourierspctrm(:,1,:).*conj(freq.fourierspctrm(:,2,:)); y = real((squeeze(mean(CS)))); figure;plot(y) % inverse fft of cross-spectrum y = real(ifft(squeeze(mean(CS)))); figure;plot(y) % compare to cross-correlation function [c,lags] = xcorr(mean(squeeze(wav(:,:,1)),2),mean(squeeze(wav(:,:,2)),2)); figure;plot(lags,c) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Mon Sep 29 14:10:38 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 29 Sep 2008 14:10:38 +0200 Subject: Lost gray matter during segmentation In-Reply-To: Message-ID: Hi Wei Wang, I don't know about the underlying SPM2 methods to help you further. I suggest that you ask on the SPM mailing list. Note that the SPM2 toolbox on which these fieldtrip functions wqere built is already old (SPM version 2 is from 2002, version 5 is from 2005 and later this year SPM8 will be released). These particular functions in spm5 turned out to be not backward compatible. Since sofar there seemed no reason to update the fieldtrip functions to use spm5 (or spm8) instead of spm2, we have never upgraded to a later spm version. It might be that your problem would be solved by later spm versions. If that is the case, I would like to hear that, since that would provide a good motivation for upgrading the fieldtrip code to use the later spm versions instead of the old spm2. best regards, Robert On 18 Sep 2008, at 5:48, Wei Wang wrote: > Hi everyone, > > I'm trying to work with my own MRI data, and after I did the > segmentation > with volumesegment.m , when I examine the gray matter with > sourceplot, it > seems that fraction of the gray matter was not marked as gray > matter. They > were left out for some reason. For example, part of the visual > cortex are not > included in my gray matter. Since the segmentation is done using > SPM2, I > read the SPM manual a little bit, and, in the manual, it says, > "5.2.5 Clean up any partitions > This uses a crude routine for extracting the brain from > segmentedimages. It > begins by taking the white matter, and eroding it acouple of times > to get rid of > any odd voxels. The algorithm continues on to do conditional > dilations for > several iterations,where the condition is based upon gray or white > matter > being present. This identified region is then used to clean up the > grey and > white matter partitions, and has a slight in uences on the CSF > partition. > If you find pieces of brain being chopped out in your data, then you > may wish > to disable or tone down the cleanup procedure." > > So, I went into the volumesegment.m code, and set: > defaults.segment.write.cleanup = 0; > > When I run volumesegment again, it seems to improve the results a > little bit, > but still, I'm loosing some gray matters. > > I'm wondering if you have any suggestions? Thank you very much for > the help! > > Wei Wang > Department of Physical Medicine and Rehabilitation > University of Pittsburgh > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and 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/fcdonders/fieldtrip. From s.debener at UKE.UNI-HAMBURG.DE Tue Sep 30 14:14:57 2008 From: s.debener at UKE.UNI-HAMBURG.DE (Stefan Debener) Date: Tue, 30 Sep 2008 13:14:57 +0100 Subject: Neuromag 306ch import Message-ID: Dear all, Does anybody import continuous, raw 306ch Neuromag fif data into FT? I am aware of Kimmo Uutela's MEG-PD toolbox, but this does not support 64bit ML, neither on Windows nor on Linux - and even the Windows 32bit import seems not working: >>??? Invalid MEX-file 'D:\ft\fieldtrip-20080928\private\meg_pd_1.2\rawdata.dll': The specified module could not be found. Any hints greatly appreciated. Thanks, Stefan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Tue Sep 30 14:31:48 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Tue, 30 Sep 2008 13:31:48 +0100 Subject: Neuromag 306ch import In-Reply-To: <48E21841.7010105@uke.uni-hamburg.de> Message-ID: Dear Stefan, I had similar problems on a 32bit machine. I could not get Kimmo's code working on matlab7. Using matlab6, and installing the proper version of Kimmo's toolbox, fieldtrip can work with the reading routines. However, this situation is not ideal, and you run into some problems related to backward compatibility of the fieldtrip-code. If I remember correctly you have to specify cfg.precision explicitly before running preprocessing, but I do not remember to what value ;o). It was still on my todo list to look into Matti Hamalainen's code for reading in fif-files. I did not yet find time to play around with it, but perhaps the following link is useful. So far my workaround worked (i.e. preprocessing and saving the data in matlab6 and taking it from there in matlab7) http://nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php Yours, Jan-Mathijs On Sep 30, 2008, at 1:14 PM, Stefan Debener wrote: > Dear all, > > Does anybody import continuous, raw 306ch Neuromag fif data into > FT? I am aware of Kimmo Uutela's MEG-PD toolbox, but this does not > support 64bit ML, neither on Windows nor on Linux - and even the > Windows 32bit import seems not working: > > >>??? Invalid MEX-file 'D:\ft\fieldtrip-20080928\private\meg_pd_1.2 > \rawdata.dll': The specified module could not be found. > > Any hints greatly appreciated. > > Thanks, > Stefan > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and 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/fcdonders/fieldtrip. From tomh at KURAGE.NIMH.NIH.GOV Tue Sep 30 23:09:06 2008 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Tue, 30 Sep 2008 17:09:06 -0400 Subject: changed default reading functions for CTF In-Reply-To: Message-ID: On Wed, 2008-09-24 at 18:29 +0200, Robert Oostenveld wrote: > The new default is to use p-files (i.e. precompiled matlab files) > that have been contributed to fieldtrip/fileio by CTF. These new > functions are not open source, but can be > freely distributed. The advantage of the new functions is that they > allow the use of synthetic gradients. See denoise_synthetic and the > email exchange on this topic some time back. Robert, Two questions. 1) We record data with 3rd gradient turned on by default. That is, the MEG channels have already had the background noise subtracted. So our datasets contain only balanced data. No further processing is required. Does your code take care of this case? 2) Why is the code closed source? -- Elephants can paint. http://www.elephantart.com/catalog/thailand.php ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From lwn_07 at YAHOO.COM.CN Tue Sep 2 10:16:30 2008 From: lwn_07 at YAHOO.COM.CN (=?gb2312?q?=C0=EE=CE=C0=C4=C8?=) Date: Tue, 2 Sep 2008 16:16:30 +0800 Subject: Question about Preprocessing Message-ID: Hi, I have a problem in "preprocessing". It seems that the option "cfg.removemcg" has no effect in removing mcg. As descriped in the function "preprocessing": if strcmp(cfg.removemcg, 'yes') cfg = template_mcg(cfg); mcgchannel = channelselection(cfg.artfctdef.mcg.channel, hdr.label); mcgindx = match_str(cfg.channel, mcgchannel); for i=1:length(mcgchannel) fprintf('removing mcg on channel %s\n', mcgchannel{i}); end end But there is no such "template_mcg" in the toolbox. Do you have any suggestion on removing the ECG artifacts? Thanks! Lee --------------------------------- 雅虎邮箱,您的终生邮箱! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Sep 2 10:36:42 2008 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 2 Sep 2008 10:36:42 +0200 Subject: Question about Preprocessing In-Reply-To: <706952.97354.qm@web15601.mail.cnb.yahoo.com> Message-ID: Dear Lee, I don’t know about the cfg.removemcg, it is an undocumented option, so it might be that this option which is not supported fully in the external FieldTrip version. What you can do is use independent component analysis to remove ecg artifacts. See the FieldTrip wiki internet page (http://www2.ru.nl/fcdonders/fieldtrip) under “example matlab scripts” go to “Use independent component analysis (ICA) to remove ECG artifacts” Good luck, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of ??? Sent: Tuesday, September 02, 2008 10:17 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Question about Preprocessing Hi, I have a problem in "preprocessing". It seems that the option "cfg.removemcg" has no effect in removing mcg. As descriped in the function "preprocessing": if strcmp(cfg.removemcg, 'yes') cfg = template_mcg(cfg); mcgchannel = channelselection(cfg.artfctdef.mcg.channel, hdr.label); mcgindx = match_str(cfg.channel, mcgchannel); for i=1:length(mcgchannel) fprintf('removing mcg on channel %s\n', mcgchannel{i}); end end But there is no such "template_mcg" in the toolbox. Do you have any suggestion on removing the ECG artifacts? Thanks! Lee _____ 雅虎邮箱,您的终生邮箱! ---------------------------------- The aim of this list 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bleichner.martin at GMAIL.COM Wed Sep 3 10:48:13 2008 From: bleichner.martin at GMAIL.COM (Martin Bleichner) Date: Wed, 3 Sep 2008 10:48:13 +0200 Subject: redefinetrial() probelm Message-ID: Hi, I am trying to do a 'Permutation tests for time-frequency representations: Within trial experiments' as described in the tutorial. However, I run into problems using the command redefinetrial(). When I apply it to my preprocessed data I get the error message �??? Error using ==> redefine trial at 112 the trial definition is inconsistent with the data.� This might be connected to the warning I get when I am using freqanalysis(): �could not locate the trial definition �trl� in the data structure�, however in this case the analysis runs through without further problems. I am using data that was preprocessed (re-referencing and epoching) in eeglab and than imported into fieldtrip using eeglab2fieldtrip(), and my data struct does not contain the �trl� field. What could I do? I could also do my preprocessing and epoching in fieldtrip, but I could not figure out how to import my micromed (.trc) files into fieldtrip, so I always took the route via eeglab. Thanks for you help Martin ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From nathanweisz at MAC.COM Wed Sep 3 11:20:33 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 3 Sep 2008 11:20:33 +0200 Subject: redefinetrial() probelm In-Reply-To: Message-ID: hi martin, in that case the best is to add the trl field (under yourdata.cfg.trl) by hand. 'trl' is a simple matrix containing as many roys as epochs and 3 columns: the first your event onset, the second the pre-event period and the third your post event period. everything in sampling points. read the help info of definetrial.m. if you don't have the absolute starting points of your events, then it will probably work if you "fool" fieldtrip by adding some random numer in the first column. once you have done your redefinetrial, then some sanity check using e.g. timelockanalysis yould be good just to see if your trl was correct. good luck, nathan On 03.09.2008, at 10:48, Martin Bleichner wrote: > Hi, > I am trying to do a 'Permutation tests for time-frequency > representations: > Within trial experiments' as described in the tutorial. > > However, I run into problems using the command redefinetrial(). > When I apply it to my preprocessed data I get the error message > ‘??? Error using ==> redefine trial at 112 > the trial definition is inconsistent with the data.’ > > This might be connected to the warning I get when I am using > freqanalysis(): > ‘could not locate the trial definition ‘trl’ in the data structure’, > however in this > case the analysis runs through without further problems. > > I am using data that was preprocessed (re-referencing and epoching) > in eeglab > and than imported into fieldtrip using eeglab2fieldtrip(), and my > data struct > does not contain the ‘trl’ field. > > What could I do? I could also do my preprocessing and epoching in > fieldtrip, but > I could not figure out how to import my micromed (.trc) files into > fieldtrip, so I > always took the route via eeglab. > > Thanks for you help > > Martin > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/fcdonders/fieldtrip. -------------------------------------------- Attention: New Contact Details -------------------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wibral at BIC.UNI-FRANKFURT.DE Mon Sep 15 18:47:33 2008 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Mon, 15 Sep 2008 18:47:33 +0200 Subject: reuse of beamformer filters Message-ID: Dear Listusers, I'd like to reuse filters computed for an average covariance matrix from two conditions for the subsequent source images of each condition, so that statistics will later on not be influenced by differences in SNR that change the filter computation. Does anybody know how to do this efficiently in sourceanalysis? I thought there was an option like cfg.hasfilters='yes'or so but obviously I was wrong :-). I also looked for something similar in source descriptives, but couldn't find anything. Any help appreciated, Michael Wibral ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From susannah.murphy at PSYCH.OX.AC.UK Mon Sep 15 18:47:40 2008 From: susannah.murphy at PSYCH.OX.AC.UK (Susannah Murphy) Date: Mon, 15 Sep 2008 17:47:40 +0100 Subject: reuse of beamformer filters In-Reply-To: <779386856@web.de> Message-ID: Thanks for your message. I am away until Monday 22nd September. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Mon Sep 15 19:49:20 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Mon, 15 Sep 2008 18:49:20 +0100 Subject: reuse of beamformer filters In-Reply-To: Message-ID: Hi Michael, Look in the beamforming tutorial at: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:beamformer in the Appendix. The option you need is cfg.keepfilter. I think what is done there is more or less what you need. Best, Vladimir On Mon, Sep 15, 2008 at 5:47 PM, Michael Wibral wrote: > Dear Listusers, > > I'd like to reuse filters computed for an average covariance matrix from two conditions for the subsequent source images of each condition, so that statistics will later on not be influenced by differences in SNR that change the filter computation. Does anybody know how to do this efficiently in sourceanalysis? > I thought there was an option like cfg.hasfilters='yes'or so but obviously I was wrong :-). I also looked for something similar in source descriptives, but couldn't find anything. > > > > > Any help appreciated, > Michael Wibral > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/fcdonders/fieldtrip. From michael.wibral at WEB.DE Tue Sep 16 15:03:19 2008 From: michael.wibral at WEB.DE (Michael Wibral) Date: Tue, 16 Sep 2008 15:03:19 +0200 Subject: reuse of beamformer filters Message-ID: Dear Vladimir, thanks for directing me to the appendix of the beamformer tutorial. My problem is indeed related but not quite the same. What I would like to do with these data later is to compare between two groups. I suspect some differences in their baselines. Hence, I would not like to work with source statistics (or relative power change values for that matter) but with raw power differences (i.e. task-baseline). Then I'd like to compare these raw power differences between the two groups. If I compare the two groups statistically using second level stats on t-values or relative changes, differences could be due to baseline differences, instead of task related absolute changes. Therefore I would like to compute the filters and keep them, but do not want to perform sourcestatististics in in each single subject, just source analysis. But maybe this is simply a bit exotic. I will also look a bit into the possibilities of sourcestatistics; whether I can actually get my desired difference output w/o stats (there should be a raweffect with each subject after sourcestats, shouldn't it. I could then use this raweffect as an input to the secondlevel sourcestats by copying it over to the correct field...). Best Regards, Michael > -----Ursprüngliche Nachricht----- > Von: "Vladimir Litvak" > Gesendet: 15.09.08 20:12:40 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] reuse of beamformer filters > Hi Michael, > > Look in the beamforming tutorial at: > http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:beamformer > in the Appendix. The option you need is cfg.keepfilter. I think what > is done there is more or less what you need. > > Best, > > Vladimir > > > On Mon, Sep 15, 2008 at 5:47 PM, Michael Wibral > wrote: > > Dear Listusers, > > > > I'd like to reuse filters computed for an average covariance matrix from two conditions for the subsequent source images of each condition, so that statistics will later on not be influenced by differences in SNR that change the filter computation. Does anybody know how to do this efficiently in sourceanalysis? > > I thought there was an option like cfg.hasfilters='yes'or so but obviously I was wrong :-). I also looked for something similar in source descriptives, but couldn't find anything. > > > > > > > > > > Any help appreciated, > > Michael Wibral > > > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From v.litvak at ION.UCL.AC.UK Tue Sep 16 15:56:11 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Tue, 16 Sep 2008 14:56:11 +0100 Subject: reuse of beamformer filters In-Reply-To: <780232753@web.de> Message-ID: Hi, I don't use sourcestatistics myself so I can't get to the bottom of your problem, perhaps Robert or JM should try. The point is just that you can compute filters from any data and then use them on any other data. I don't know at what stage the baseline correction is done in your case. I usually just get the raw output and then process in in any way I like. Best, Vladimir On Tue, Sep 16, 2008 at 2:03 PM, Michael Wibral wrote: > Dear Vladimir, > > thanks for directing me to the appendix of the beamformer tutorial. My problem is indeed related but not quite the same. What I would like to do with these data later is to compare between two groups. I suspect some differences in their baselines. Hence, I would not like to work with source statistics (or relative power change values for that matter) but with raw power differences (i.e. task-baseline). Then I'd like to compare these raw power differences between the two groups. If I compare the two groups statistically using second level stats on t-values or relative changes, differences could be due to baseline differences, instead of task related absolute changes. Therefore I would like to compute the filters and keep them, but do not want to perform sourcestatististics in in each single subject, just source analysis. > > But maybe this is simply a bit exotic. I will also look a bit into the possibilities of sourcestatistics; whether I can actually get my desired difference output w/o stats (there should be a raweffect with each subject after sourcestats, shouldn't it. I could then use this raweffect as an input to the secondlevel sourcestats by copying it over to the correct field...). > > Best Regards, > Michael > > >> -----Ursprüngliche Nachricht----- >> Von: "Vladimir Litvak" >> Gesendet: 15.09.08 20:12:40 >> An: FIELDTRIP at NIC.SURFNET.NL >> Betreff: Re: [FIELDTRIP] reuse of beamformer filters > > >> Hi Michael, >> >> Look in the beamforming tutorial at: >> http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:beamformer >> in the Appendix. The option you need is cfg.keepfilter. I think what >> is done there is more or less what you need. >> >> Best, >> >> Vladimir >> >> >> On Mon, Sep 15, 2008 at 5:47 PM, Michael Wibral >> wrote: >> > Dear Listusers, >> > >> > I'd like to reuse filters computed for an average covariance matrix from two conditions for the subsequent source images of each condition, so that statistics will later on not be influenced by differences in SNR that change the filter computation. Does anybody know how to do this efficiently in sourceanalysis? >> > I thought there was an option like cfg.hasfilters='yes'or so but obviously I was wrong :-). I also looked for something similar in source descriptives, but couldn't find anything. >> > >> > >> > >> > >> > Any help appreciated, >> > Michael Wibral >> > >> > >> > ---------------------------------- >> > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/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/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/fcdonders/fieldtrip. From shehsu at INDIANA.EDU Tue Sep 16 17:06:51 2008 From: shehsu at INDIANA.EDU (Hsu, Shen-Mou) Date: Tue, 16 Sep 2008 11:06:51 -0400 Subject: cluster analysis and EEG channel information Message-ID: Dear Users, I preprocessed my EEG data using EEGLAB and then converted the data into the fieldtrip format using eeglab2fieldtrip. However, I noticed that in cfg.channel, there are only labels without any information about electrode locations. I was wondering if this is OK to run cluster analysis. Besides, I also wondered how to specify the configuration-"cfg.channel" in this case. Many thanks in advance, Shen-Mou ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From shehsu at INDIANA.EDU Tue Sep 16 17:56:03 2008 From: shehsu at INDIANA.EDU (Hsu, Shen-Mou) Date: Tue, 16 Sep 2008 11:56:03 -0400 Subject: cluster analysis and EEG channel information In-Reply-To: <7F00B6A0D4D0674E80A6C1D6DA873B5701CC652B51@iu-mssg-mbx05.ads.iu.edu> Message-ID: Just to clarify my query a bit more. I am trying to perform permutation tests on ERP data. The configuration was as below and the following error message was returned. ??? Undefined function or method 'conndef' for input arguments of type 'double'. Error in ==> clusterstat at 181 posclusobs = bwlabeln(tmp, conndef(length(cfg.dim),'min')); Error in ==> statistics_montecarlo at 394 [stat, cfg] = clusterstat(cfg, statrand, statobs); Error in ==> statistics_wrapper at 362 [stat, cfg] = statmethod(cfg, dat, cfg.design); Error in ==> timelockstatistics at 107 [stat] = statistics_wrapper(cfg, varargin{:}); load GA_F; load GA_N cfg = []; cfg.channel = {'all'}; cfg.latency = [0 0.5]; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 100; subj = 15; design=zeros(2,2*subj); for i = 1:subj design(1,i) = i; end for i = 1:subj design(1,subj+i) = i; end design(2,1:subj) = 1; design(2,subj+1:2*subj) = 2; cfg.design = design; cfg.uvar = 1; cfg.ivar = 2; [stat_FvsN_HV] = timelockstatistics(cfg, GA_F, GA_N); ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Hsu, Shen-Mou [shehsu at indiana.edu] Sent: Tuesday, September 16, 2008 11:06 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] cluster analysis and EEG channel information Dear Users, I preprocessed my EEG data using EEGLAB and then converted the data into the fieldtrip format using eeglab2fieldtrip. However, I noticed that in cfg.channel, there are only labels without any information about electrode locations. I was wondering if this is OK to run cluster analysis. Besides, I also wondered how to specify the configuration-"cfg.channel" in this case. Many thanks in advance, Shen-Mou ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Tue Sep 16 22:15:38 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Tue, 16 Sep 2008 22:15:38 +0200 Subject: cluster analysis and EEG channel information In-Reply-To: <7F00B6A0D4D0674E80A6C1D6DA873B5701CC652B51@iu-mssg-mbx05.ads.iu.edu> Message-ID: dear shen-mou, actually - if i remember correctly (long time ago) - after running eeglab2fieldtrip there should be a field in your exported data structure called elec. this should have the electrode info. otherwise you could read the electrode info using read_fcdc_elec. then add the field by hand. for clustering electrodes you need to specify a neighbourhood- structure. take a look at statistics_montecarlo and the comments on cfg.neighbours. look also at the function neigbourselection. basically you could also create that structure by hand. good luck, nathan On 16.09.2008, at 17:06, Hsu, Shen-Mou wrote: > Dear Users, > > > I preprocessed my EEG data using EEGLAB and then converted the data > into the fieldtrip format using eeglab2fieldtrip. However, I noticed > that in cfg.channel, there are only labels without any information > about electrode locations. I was wondering if this is OK to run > cluster analysis. Besides, I also wondered how to specify the > configuration-"cfg.channel" in this case. > > Many thanks in advance, > > Shen-Mou > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/fcdonders/fieldtrip. -------------------------------------------- Attention: New Contact Details -------------------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at MAC.COM Tue Sep 16 22:16:08 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Tue, 16 Sep 2008 22:16:08 +0200 Subject: cluster analysis and EEG channel information In-Reply-To: <7F00B6A0D4D0674E80A6C1D6DA873B5701CC652B52@iu-mssg-mbx05.ads.iu.edu> Message-ID: your problem is that you do not have the image processing toolbox ... you'll need it to use the clustering functions. On 16.09.2008, at 17:56, Hsu, Shen-Mou wrote: > Just to clarify my query a bit more. I am trying to perform > permutation tests on ERP data. The configuration was as below and > the following error message was returned. > > ??? Undefined function or method 'conndef' for input > arguments of type 'double'. > > Error in ==> clusterstat at 181 > posclusobs = bwlabeln(tmp, > conndef(length(cfg.dim),'min')); > > Error in ==> statistics_montecarlo at 394 > [stat, cfg] = clusterstat(cfg, statrand, statobs); > > Error in ==> statistics_wrapper at 362 > [stat, cfg] = statmethod(cfg, dat, cfg.design); > > Error in ==> timelockstatistics at 107 > [stat] = statistics_wrapper(cfg, varargin{:}); > > > > > load GA_F; load GA_N > > cfg = []; > cfg.channel = {'all'}; > cfg.latency = [0 0.5]; > > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 100; > > subj = 15; > design=zeros(2,2*subj); > for i = 1:subj > design(1,i) = i; > end > for i = 1:subj > design(1,subj+i) = i; > end > design(2,1:subj) = 1; > design(2,subj+1:2*subj) = 2; > > cfg.design = design; > cfg.uvar = 1; > cfg.ivar = 2; > > > [stat_FvsN_HV] = timelockstatistics(cfg, GA_F, GA_N); > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Hsu, Shen-Mou [shehsu at indiana.edu] > Sent: Tuesday, September 16, 2008 11:06 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] cluster analysis and EEG channel information > > Dear Users, > > > I preprocessed my EEG data using EEGLAB and then converted the data > into the fieldtrip format using eeglab2fieldtrip. However, I noticed > that in cfg.channel, there are only labels without any information > about electrode locations. I was wondering if this is OK to run > cluster analysis. Besides, I also wondered how to specify the > configuration-"cfg.channel" in this case. > > Many thanks in advance, > > Shen-Mou > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and 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/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/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Wed Sep 17 15:35:36 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 17 Sep 2008 15:35:36 +0200 Subject: reuse of beamformer filters In-Reply-To: Message-ID: Dear Michael, If I recall correctly what you would like to do, I would suggest one of the following two paths: first possibility: -perform sourceanalysis with cfg.keepfilter = 'yes' and with an averaged covariance as input -append source.avg.filter to cfg.grid for a second round of sourcenalysis, but now with the condition-specific covariances as input. you might want to check it in the code, but I am quite sure that if the configuration already contains filters, it will use these on the input covariance -this will give you two source-structures, one for the baseline and one for the task condition. second possibility: -use sourcestatistics and create a 'first-level' stat for each subject, using as cfg.statistic = 'diff'. This will just take the difference between task and baseline. Hopefully this helps, Best, JM On Sep 16, 2008, at 3:56 PM, Vladimir Litvak wrote: > Hi, > > I don't use sourcestatistics myself so I can't get to the bottom of > your problem, perhaps Robert or JM should try. The point is just that > you can compute filters from any data and then use them on any other > data. I don't know at what stage the baseline correction is done in > your case. I usually just get the raw output and then process in in > any way I like. > > Best, > > Vladimir > > On Tue, Sep 16, 2008 at 2:03 PM, Michael Wibral > wrote: >> Dear Vladimir, >> >> thanks for directing me to the appendix of the beamformer >> tutorial. My problem is indeed related but not quite the same. >> What I would like to do with these data later is to compare >> between two groups. I suspect some differences in their baselines. >> Hence, I would not like to work with source statistics (or >> relative power change values for that matter) but with raw power >> differences (i.e. task-baseline). Then I'd like to compare these >> raw power differences between the two groups. If I compare the two >> groups statistically using second level stats on t-values or >> relative changes, differences could be due to baseline >> differences, instead of task related absolute changes. Therefore I >> would like to compute the filters and keep them, but do not want >> to perform sourcestatististics in in each single subject, just >> source analysis. >> >> But maybe this is simply a bit exotic. I will also look a bit into >> the possibilities of sourcestatistics; whether I can actually get >> my desired difference output w/o stats (there should be a >> raweffect with each subject after sourcestats, shouldn't it. I >> could then use this raweffect as an input to the secondlevel >> sourcestats by copying it over to the correct field...). >> >> Best Regards, >> Michael >> >> >>> -----Ursprüngliche Nachricht----- >>> Von: "Vladimir Litvak" >>> Gesendet: 15.09.08 20:12:40 >>> An: FIELDTRIP at NIC.SURFNET.NL >>> Betreff: Re: [FIELDTRIP] reuse of beamformer filters >> >> >>> Hi Michael, >>> >>> Look in the beamforming tutorial at: >>> http://www2.ru.nl/fcdonders/fieldtrip/doku.php? >>> id=fieldtrip:documentation:tutorial:beamformer >>> in the Appendix. The option you need is cfg.keepfilter. I think what >>> is done there is more or less what you need. >>> >>> Best, >>> >>> Vladimir >>> >>> >>> On Mon, Sep 15, 2008 at 5:47 PM, Michael Wibral >>> wrote: >>>> Dear Listusers, >>>> >>>> I'd like to reuse filters computed for an average covariance >>>> matrix from two conditions for the subsequent source images of >>>> each condition, so that statistics will later on not be >>>> influenced by differences in SNR that change the filter >>>> computation. Does anybody know how to do this efficiently in >>>> sourceanalysis? >>>> I thought there was an option like cfg.hasfilters='yes'or so >>>> but obviously I was wrong :-). I also looked for something >>>> similar in source descriptives, but couldn't find anything. >>>> >>>> >>>> >>>> >>>> Any help appreciated, >>>> Michael Wibral >>>> >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between >>>> users of the FieldTrip toolbox, to share experiences and to >>>> discuss new ideas for MEG and EEG analysis. See also http:// >>>> listserv.surfnet.nl/archives/fieldtrip.html and 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/ >>> 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/ >> 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/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/fcdonders/fieldtrip. From michael.wibral at WEB.DE Wed Sep 17 17:08:34 2008 From: michael.wibral at WEB.DE (Michael Wibral) Date: Wed, 17 Sep 2008 17:08:34 +0200 Subject: reuse of beamformer filters Message-ID: Dear Jan-Mathijs, dear Vladimir, many thanks for your help. Option 1 (cf. below) with running sourceanalysis twice works fine now. Just took us a while to figure out were to put the precomputed filters and to get the info, that they would be really used (there is some output of beamformer_lcmv that says so, we just found out later). Maybe this cfg-possibility could be put into the comments of sourceanalysis and beamformer_lcmv somewhere? Michael > -----Ursprüngliche Nachricht----- > Von: "jan-mathijs schoffelen" > Gesendet: 17.09.08 15:53:19 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] reuse of beamformer filters > Dear Michael, > > If I recall correctly what you would like to do, I would suggest one > of the following two paths: > > first possibility: > -perform sourceanalysis with cfg.keepfilter = 'yes' and with an > averaged covariance as input > -append source.avg.filter to cfg.grid for a second round of > sourcenalysis, but now with the condition-specific covariances as input. > you might want to check it in the code, but I am quite sure that if > the configuration already contains filters, it will use these on the > input > covariance > -this will give you two source-structures, one for the baseline and > one for the task condition. > > second possibility: > -use sourcestatistics and create a 'first-level' stat for each > subject, using as cfg.statistic = 'diff'. This will just take the > difference between > task and baseline. > > Hopefully this helps, > > Best, > JM > > On Sep 16, 2008, at 3:56 PM, Vladimir Litvak wrote: > > > Hi, > > > > I don't use sourcestatistics myself so I can't get to the bottom of > > your problem, perhaps Robert or JM should try. The point is just that > > you can compute filters from any data and then use them on any other > > data. I don't know at what stage the baseline correction is done in > > your case. I usually just get the raw output and then process in in > > any way I like. > > > > Best, > > > > Vladimir > > > > On Tue, Sep 16, 2008 at 2:03 PM, Michael Wibral > > wrote: > >> Dear Vladimir, > >> > >> thanks for directing me to the appendix of the beamformer > >> tutorial. My problem is indeed related but not quite the same. > >> What I would like to do with these data later is to compare > >> between two groups. I suspect some differences in their baselines. > >> Hence, I would not like to work with source statistics (or > >> relative power change values for that matter) but with raw power > >> differences (i.e. task-baseline). Then I'd like to compare these > >> raw power differences between the two groups. If I compare the two > >> groups statistically using second level stats on t-values or > >> relative changes, differences could be due to baseline > >> differences, instead of task related absolute changes. Therefore I > >> would like to compute the filters and keep them, but do not want > >> to perform sourcestatististics in in each single subject, just > >> source analysis. > >> > >> But maybe this is simply a bit exotic. I will also look a bit into > >> the possibilities of sourcestatistics; whether I can actually get > >> my desired difference output w/o stats (there should be a > >> raweffect with each subject after sourcestats, shouldn't it. I > >> could then use this raweffect as an input to the secondlevel > >> sourcestats by copying it over to the correct field...). > >> > >> Best Regards, > >> Michael > >> > >> > >>> -----Ursprüngliche Nachricht----- > >>> Von: "Vladimir Litvak" > >>> Gesendet: 15.09.08 20:12:40 > >>> An: FIELDTRIP at NIC.SURFNET.NL > >>> Betreff: Re: [FIELDTRIP] reuse of beamformer filters > >> > >> > >>> Hi Michael, > >>> > >>> Look in the beamforming tutorial at: > >>> http://www2.ru.nl/fcdonders/fieldtrip/doku.php? > >>> id=fieldtrip:documentation:tutorial:beamformer > >>> in the Appendix. The option you need is cfg.keepfilter. I think what > >>> is done there is more or less what you need. > >>> > >>> Best, > >>> > >>> Vladimir > >>> > >>> > >>> On Mon, Sep 15, 2008 at 5:47 PM, Michael Wibral > >>> wrote: > >>>> Dear Listusers, > >>>> > >>>> I'd like to reuse filters computed for an average covariance > >>>> matrix from two conditions for the subsequent source images of > >>>> each condition, so that statistics will later on not be > >>>> influenced by differences in SNR that change the filter > >>>> computation. Does anybody know how to do this efficiently in > >>>> sourceanalysis? > >>>> I thought there was an option like cfg.hasfilters='yes'or so > >>>> but obviously I was wrong :-). I also looked for something > >>>> similar in source descriptives, but couldn't find anything. > >>>> > >>>> > >>>> > >>>> > >>>> Any help appreciated, > >>>> Michael Wibral > >>>> > >>>> > >>>> ---------------------------------- > >>>> The aim of this list is to facilitate the discussion between > >>>> users of the FieldTrip toolbox, to share experiences and to > >>>> discuss new ideas for MEG and EEG analysis. See also http:// > >>>> listserv.surfnet.nl/archives/fieldtrip.html and 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/ > >>> 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/ > >> 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/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/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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From bmewang at YAHOO.COM Thu Sep 18 05:48:35 2008 From: bmewang at YAHOO.COM (Wei Wang) Date: Thu, 18 Sep 2008 05:48:35 +0200 Subject: Lost gray matter during segmentation Message-ID: Hi everyone, I'm trying to work with my own MRI data, and after I did the segmentation with volumesegment.m , when I examine the gray matter with sourceplot, it seems that fraction of the gray matter was not marked as gray matter. They were left out for some reason. For example, part of the visual cortex are not included in my gray matter. Since the segmentation is done using SPM2, I read the SPM manual a little bit, and, in the manual, it says, "5.2.5 Clean up any partitions This uses a crude routine for extracting the brain from segmentedimages. It begins by taking the white matter, and eroding it acouple of times to get rid of any odd voxels. The algorithm continues on to do conditional dilations for several iterations,where the condition is based upon gray or white matter being present. This identified region is then used to clean up the grey and white matter partitions, and has a slight in uences on the CSF partition. If you find pieces of brain being chopped out in your data, then you may wish to disable or tone down the cleanup procedure." So, I went into the volumesegment.m code, and set: defaults.segment.write.cleanup = 0; When I run volumesegment again, it seems to improve the results a little bit, but still, I'm loosing some gray matters. I'm wondering if you have any suggestions? Thank you very much for the help! Wei Wang Department of Physical Medicine and Rehabilitation University of Pittsburgh ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Sep 24 17:53:03 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 24 Sep 2008 17:53:03 +0200 Subject: change in directory structure Message-ID: Dear fieldtrip users, yesterday and today I have made some changes to teh directory structure. You might not have noticed (as I hope), since I have tried my best to keep everything backward compatible without any changes on your side. However, the change in directory structure is rather large, and involved moving a lot of files around. More details can be found here: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:development:directorylayout There still migth be some problems with the inhouse/FCDC version of fieldtrip, or with the external version that you got of the ftp server. The most likely problems that you may see are "missing function" problems, which are easy to solve by setting the path correctly. I would expect all problems to be easily identifyable, i.e. not that the results of computations are be wrong, but rather that Matlab just gives a plain error. The fieldtrip path is now set automatically using the fieldtripdefs.m script, where you could have look into if you think that the path is a problem on your Matlab/ fieldtrip installation. If you see problems that should be solved in the release version of fieldtrip, please let us know. best regards, Robert ----------------------------------------------------------- Robert Oostenveld Senior Researcher Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Sep 24 18:29:02 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 24 Sep 2008 18:29:02 +0200 Subject: changed default reading functions for CTF Message-ID: Dear CTF fieldtrip users, I have changed the default reading functions for CTF data. The read_header and read_data functions used to call low-level functions that originated from the FCDC. The new default is to use p-files (i.e. precompiled matlab files) that have been contributed to fieldtrip/ fileio by CTF. These new functions are not open source, but can be freely distributed. The advantage of the new functions is that they allow the use of synthetic gradients. See denoise_synthetic and the email exchange on this topic some time back. best regards, Robert ----------------------------------------------------------- Robert Oostenveld Senior Researcher Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From j.poort at NIN.KNAW.NL Mon Sep 29 09:54:50 2008 From: j.poort at NIN.KNAW.NL (Jasper Poort) Date: Mon, 29 Sep 2008 09:54:50 +0200 Subject: cross-spectrum to cross-correlogram Message-ID: Dear all, I'd like to convert the cross-spectrum to a cross-correlogram. My first approach would be simply to ifft the output of freqanalysis with output option 'complex'. However, I have difficulty understanding the result of this procedure and in particular how I can get output comparable to the matlab function xcorr using FieldTrip. Below I inserted a small test script. Best, Jasper % using the fake data from the FieldTrip tutorial 'Fourier analysis of % oscillatory power and coherence' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %get many repetitions of two signals with somewhat consistent phase difference clear all close all frq = 10; % Hz len = 1; % seconds smpfrq = 100; % Hz numrpt = 1000; phsspreadfac = 0.5; circulran = mod(randn(2.*numrpt,2).*phsspreadfac + pi, 2.* pi) - pi; ranphs = circulran ./ (2 .* pi); phsdif = 45 ./ 360; noifac = 1./50; for rptlop = 1:numrpt wav(:,rptlop,1) = sin(((0:(len.*smpfrq-1))./(len.*smpfrq).*(frq.*2.*pi))+(ranphs(rptlop,1).*2. *pi)) + ... randn(1,len.*smpfrq).*noifac; wav(:,rptlop,2) = sin(((0:(len.*smpfrq-1))./(len.*smpfrq).*(frq.*2.*pi))+((ranphs(rptlop,2)+ph sdif).*2.*pi)) + ... randn(1,len.*smpfrq).*noifac; end % get the FFT of the waves for rptlop = 1:numrpt fftwav(:,rptlop,1) = fft(wav(:,rptlop,1)); fftwav(:,rptlop,2) = fft(wav(:,rptlop,2)); end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % make FieldTrip structure dum.label = {'1','2'}; dum.fsample = smpfrq; for i=1:size(wav,2), % for every trial dum.trial{i}=squeeze(wav(:,i,:))'; dum.time{i} =[0:(len.*smpfrq-1)]./smpfrq; end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %fft: cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.taper = 'hanning'; cfg.tapsmofrq = 1; [freq] = freqanalysis(cfg, dum) % cross-spectrum CS=freq.fourierspctrm(:,1,:).*conj(freq.fourierspctrm(:,2,:)); y = real((squeeze(mean(CS)))); figure;plot(y) % inverse fft of cross-spectrum y = real(ifft(squeeze(mean(CS)))); figure;plot(y) % compare to cross-correlation function [c,lags] = xcorr(mean(squeeze(wav(:,:,1)),2),mean(squeeze(wav(:,:,2)),2)); figure;plot(lags,c) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Mon Sep 29 14:10:38 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 29 Sep 2008 14:10:38 +0200 Subject: Lost gray matter during segmentation In-Reply-To: Message-ID: Hi Wei Wang, I don't know about the underlying SPM2 methods to help you further. I suggest that you ask on the SPM mailing list. Note that the SPM2 toolbox on which these fieldtrip functions wqere built is already old (SPM version 2 is from 2002, version 5 is from 2005 and later this year SPM8 will be released). These particular functions in spm5 turned out to be not backward compatible. Since sofar there seemed no reason to update the fieldtrip functions to use spm5 (or spm8) instead of spm2, we have never upgraded to a later spm version. It might be that your problem would be solved by later spm versions. If that is the case, I would like to hear that, since that would provide a good motivation for upgrading the fieldtrip code to use the later spm versions instead of the old spm2. best regards, Robert On 18 Sep 2008, at 5:48, Wei Wang wrote: > Hi everyone, > > I'm trying to work with my own MRI data, and after I did the > segmentation > with volumesegment.m , when I examine the gray matter with > sourceplot, it > seems that fraction of the gray matter was not marked as gray > matter. They > were left out for some reason. For example, part of the visual > cortex are not > included in my gray matter. Since the segmentation is done using > SPM2, I > read the SPM manual a little bit, and, in the manual, it says, > "5.2.5 Clean up any partitions > This uses a crude routine for extracting the brain from > segmentedimages. It > begins by taking the white matter, and eroding it acouple of times > to get rid of > any odd voxels. The algorithm continues on to do conditional > dilations for > several iterations,where the condition is based upon gray or white > matter > being present. This identified region is then used to clean up the > grey and > white matter partitions, and has a slight in uences on the CSF > partition. > If you find pieces of brain being chopped out in your data, then you > may wish > to disable or tone down the cleanup procedure." > > So, I went into the volumesegment.m code, and set: > defaults.segment.write.cleanup = 0; > > When I run volumesegment again, it seems to improve the results a > little bit, > but still, I'm loosing some gray matters. > > I'm wondering if you have any suggestions? Thank you very much for > the help! > > Wei Wang > Department of Physical Medicine and Rehabilitation > University of Pittsburgh > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and 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/fcdonders/fieldtrip. From s.debener at UKE.UNI-HAMBURG.DE Tue Sep 30 14:14:57 2008 From: s.debener at UKE.UNI-HAMBURG.DE (Stefan Debener) Date: Tue, 30 Sep 2008 13:14:57 +0100 Subject: Neuromag 306ch import Message-ID: Dear all, Does anybody import continuous, raw 306ch Neuromag fif data into FT? I am aware of Kimmo Uutela's MEG-PD toolbox, but this does not support 64bit ML, neither on Windows nor on Linux - and even the Windows 32bit import seems not working: >>??? Invalid MEX-file 'D:\ft\fieldtrip-20080928\private\meg_pd_1.2\rawdata.dll': The specified module could not be found. Any hints greatly appreciated. Thanks, Stefan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Tue Sep 30 14:31:48 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Tue, 30 Sep 2008 13:31:48 +0100 Subject: Neuromag 306ch import In-Reply-To: <48E21841.7010105@uke.uni-hamburg.de> Message-ID: Dear Stefan, I had similar problems on a 32bit machine. I could not get Kimmo's code working on matlab7. Using matlab6, and installing the proper version of Kimmo's toolbox, fieldtrip can work with the reading routines. However, this situation is not ideal, and you run into some problems related to backward compatibility of the fieldtrip-code. If I remember correctly you have to specify cfg.precision explicitly before running preprocessing, but I do not remember to what value ;o). It was still on my todo list to look into Matti Hamalainen's code for reading in fif-files. I did not yet find time to play around with it, but perhaps the following link is useful. So far my workaround worked (i.e. preprocessing and saving the data in matlab6 and taking it from there in matlab7) http://nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php Yours, Jan-Mathijs On Sep 30, 2008, at 1:14 PM, Stefan Debener wrote: > Dear all, > > Does anybody import continuous, raw 306ch Neuromag fif data into > FT? I am aware of Kimmo Uutela's MEG-PD toolbox, but this does not > support 64bit ML, neither on Windows nor on Linux - and even the > Windows 32bit import seems not working: > > >>??? Invalid MEX-file 'D:\ft\fieldtrip-20080928\private\meg_pd_1.2 > \rawdata.dll': The specified module could not be found. > > Any hints greatly appreciated. > > Thanks, > Stefan > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and 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/fcdonders/fieldtrip. From tomh at KURAGE.NIMH.NIH.GOV Tue Sep 30 23:09:06 2008 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Tue, 30 Sep 2008 17:09:06 -0400 Subject: changed default reading functions for CTF In-Reply-To: Message-ID: On Wed, 2008-09-24 at 18:29 +0200, Robert Oostenveld wrote: > The new default is to use p-files (i.e. precompiled matlab files) > that have been contributed to fieldtrip/fileio by CTF. These new > functions are not open source, but can be > freely distributed. The advantage of the new functions is that they > allow the use of synthetic gradients. See denoise_synthetic and the > email exchange on this topic some time back. Robert, Two questions. 1) We record data with 3rd gradient turned on by default. That is, the MEG channels have already had the background noise subtracted. So our datasets contain only balanced data. No further processing is required. Does your code take care of this case? 2) Why is the code closed source? -- Elephants can paint. http://www.elephantart.com/catalog/thailand.php ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From lwn_07 at YAHOO.COM.CN Tue Sep 2 10:16:30 2008 From: lwn_07 at YAHOO.COM.CN (=?gb2312?q?=C0=EE=CE=C0=C4=C8?=) Date: Tue, 2 Sep 2008 16:16:30 +0800 Subject: Question about Preprocessing Message-ID: Hi, I have a problem in "preprocessing". It seems that the option "cfg.removemcg" has no effect in removing mcg. As descriped in the function "preprocessing": if strcmp(cfg.removemcg, 'yes') cfg = template_mcg(cfg); mcgchannel = channelselection(cfg.artfctdef.mcg.channel, hdr.label); mcgindx = match_str(cfg.channel, mcgchannel); for i=1:length(mcgchannel) fprintf('removing mcg on channel %s\n', mcgchannel{i}); end end But there is no such "template_mcg" in the toolbox. Do you have any suggestion on removing the ECG artifacts? Thanks! Lee --------------------------------- 雅虎邮箱,您的终生邮箱! ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Sep 2 10:36:42 2008 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 2 Sep 2008 10:36:42 +0200 Subject: Question about Preprocessing In-Reply-To: <706952.97354.qm@web15601.mail.cnb.yahoo.com> Message-ID: Dear Lee, I don’t know about the cfg.removemcg, it is an undocumented option, so it might be that this option which is not supported fully in the external FieldTrip version. What you can do is use independent component analysis to remove ecg artifacts. See the FieldTrip wiki internet page (http://www2.ru.nl/fcdonders/fieldtrip) under “example matlab scripts” go to “Use independent component analysis (ICA) to remove ECG artifacts” Good luck, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of ??? Sent: Tuesday, September 02, 2008 10:17 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Question about Preprocessing Hi, I have a problem in "preprocessing". It seems that the option "cfg.removemcg" has no effect in removing mcg. As descriped in the function "preprocessing": if strcmp(cfg.removemcg, 'yes') cfg = template_mcg(cfg); mcgchannel = channelselection(cfg.artfctdef.mcg.channel, hdr.label); mcgindx = match_str(cfg.channel, mcgchannel); for i=1:length(mcgchannel) fprintf('removing mcg on channel %s\n', mcgchannel{i}); end end But there is no such "template_mcg" in the toolbox. Do you have any suggestion on removing the ECG artifacts? Thanks! Lee _____ 雅虎邮箱,您的终生邮箱! ---------------------------------- The aim of this list 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bleichner.martin at GMAIL.COM Wed Sep 3 10:48:13 2008 From: bleichner.martin at GMAIL.COM (Martin Bleichner) Date: Wed, 3 Sep 2008 10:48:13 +0200 Subject: redefinetrial() probelm Message-ID: Hi, I am trying to do a 'Permutation tests for time-frequency representations: Within trial experiments' as described in the tutorial. However, I run into problems using the command redefinetrial(). When I apply it to my preprocessed data I get the error message �??? Error using ==> redefine trial at 112 the trial definition is inconsistent with the data.� This might be connected to the warning I get when I am using freqanalysis(): �could not locate the trial definition �trl� in the data structure�, however in this case the analysis runs through without further problems. I am using data that was preprocessed (re-referencing and epoching) in eeglab and than imported into fieldtrip using eeglab2fieldtrip(), and my data struct does not contain the �trl� field. What could I do? I could also do my preprocessing and epoching in fieldtrip, but I could not figure out how to import my micromed (.trc) files into fieldtrip, so I always took the route via eeglab. Thanks for you help Martin ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From nathanweisz at MAC.COM Wed Sep 3 11:20:33 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 3 Sep 2008 11:20:33 +0200 Subject: redefinetrial() probelm In-Reply-To: Message-ID: hi martin, in that case the best is to add the trl field (under yourdata.cfg.trl) by hand. 'trl' is a simple matrix containing as many roys as epochs and 3 columns: the first your event onset, the second the pre-event period and the third your post event period. everything in sampling points. read the help info of definetrial.m. if you don't have the absolute starting points of your events, then it will probably work if you "fool" fieldtrip by adding some random numer in the first column. once you have done your redefinetrial, then some sanity check using e.g. timelockanalysis yould be good just to see if your trl was correct. good luck, nathan On 03.09.2008, at 10:48, Martin Bleichner wrote: > Hi, > I am trying to do a 'Permutation tests for time-frequency > representations: > Within trial experiments' as described in the tutorial. > > However, I run into problems using the command redefinetrial(). > When I apply it to my preprocessed data I get the error message > ‘??? Error using ==> redefine trial at 112 > the trial definition is inconsistent with the data.’ > > This might be connected to the warning I get when I am using > freqanalysis(): > ‘could not locate the trial definition ‘trl’ in the data structure’, > however in this > case the analysis runs through without further problems. > > I am using data that was preprocessed (re-referencing and epoching) > in eeglab > and than imported into fieldtrip using eeglab2fieldtrip(), and my > data struct > does not contain the ‘trl’ field. > > What could I do? I could also do my preprocessing and epoching in > fieldtrip, but > I could not figure out how to import my micromed (.trc) files into > fieldtrip, so I > always took the route via eeglab. > > Thanks for you help > > Martin > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/fcdonders/fieldtrip. -------------------------------------------- Attention: New Contact Details -------------------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wibral at BIC.UNI-FRANKFURT.DE Mon Sep 15 18:47:33 2008 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Mon, 15 Sep 2008 18:47:33 +0200 Subject: reuse of beamformer filters Message-ID: Dear Listusers, I'd like to reuse filters computed for an average covariance matrix from two conditions for the subsequent source images of each condition, so that statistics will later on not be influenced by differences in SNR that change the filter computation. Does anybody know how to do this efficiently in sourceanalysis? I thought there was an option like cfg.hasfilters='yes'or so but obviously I was wrong :-). I also looked for something similar in source descriptives, but couldn't find anything. Any help appreciated, Michael Wibral ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From susannah.murphy at PSYCH.OX.AC.UK Mon Sep 15 18:47:40 2008 From: susannah.murphy at PSYCH.OX.AC.UK (Susannah Murphy) Date: Mon, 15 Sep 2008 17:47:40 +0100 Subject: reuse of beamformer filters In-Reply-To: <779386856@web.de> Message-ID: Thanks for your message. I am away until Monday 22nd September. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From v.litvak at ION.UCL.AC.UK Mon Sep 15 19:49:20 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Mon, 15 Sep 2008 18:49:20 +0100 Subject: reuse of beamformer filters In-Reply-To: Message-ID: Hi Michael, Look in the beamforming tutorial at: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:beamformer in the Appendix. The option you need is cfg.keepfilter. I think what is done there is more or less what you need. Best, Vladimir On Mon, Sep 15, 2008 at 5:47 PM, Michael Wibral wrote: > Dear Listusers, > > I'd like to reuse filters computed for an average covariance matrix from two conditions for the subsequent source images of each condition, so that statistics will later on not be influenced by differences in SNR that change the filter computation. Does anybody know how to do this efficiently in sourceanalysis? > I thought there was an option like cfg.hasfilters='yes'or so but obviously I was wrong :-). I also looked for something similar in source descriptives, but couldn't find anything. > > > > > Any help appreciated, > Michael Wibral > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/fcdonders/fieldtrip. From michael.wibral at WEB.DE Tue Sep 16 15:03:19 2008 From: michael.wibral at WEB.DE (Michael Wibral) Date: Tue, 16 Sep 2008 15:03:19 +0200 Subject: reuse of beamformer filters Message-ID: Dear Vladimir, thanks for directing me to the appendix of the beamformer tutorial. My problem is indeed related but not quite the same. What I would like to do with these data later is to compare between two groups. I suspect some differences in their baselines. Hence, I would not like to work with source statistics (or relative power change values for that matter) but with raw power differences (i.e. task-baseline). Then I'd like to compare these raw power differences between the two groups. If I compare the two groups statistically using second level stats on t-values or relative changes, differences could be due to baseline differences, instead of task related absolute changes. Therefore I would like to compute the filters and keep them, but do not want to perform sourcestatististics in in each single subject, just source analysis. But maybe this is simply a bit exotic. I will also look a bit into the possibilities of sourcestatistics; whether I can actually get my desired difference output w/o stats (there should be a raweffect with each subject after sourcestats, shouldn't it. I could then use this raweffect as an input to the secondlevel sourcestats by copying it over to the correct field...). Best Regards, Michael > -----Ursprüngliche Nachricht----- > Von: "Vladimir Litvak" > Gesendet: 15.09.08 20:12:40 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] reuse of beamformer filters > Hi Michael, > > Look in the beamforming tutorial at: > http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:beamformer > in the Appendix. The option you need is cfg.keepfilter. I think what > is done there is more or less what you need. > > Best, > > Vladimir > > > On Mon, Sep 15, 2008 at 5:47 PM, Michael Wibral > wrote: > > Dear Listusers, > > > > I'd like to reuse filters computed for an average covariance matrix from two conditions for the subsequent source images of each condition, so that statistics will later on not be influenced by differences in SNR that change the filter computation. Does anybody know how to do this efficiently in sourceanalysis? > > I thought there was an option like cfg.hasfilters='yes'or so but obviously I was wrong :-). I also looked for something similar in source descriptives, but couldn't find anything. > > > > > > > > > > Any help appreciated, > > Michael Wibral > > > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From v.litvak at ION.UCL.AC.UK Tue Sep 16 15:56:11 2008 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Tue, 16 Sep 2008 14:56:11 +0100 Subject: reuse of beamformer filters In-Reply-To: <780232753@web.de> Message-ID: Hi, I don't use sourcestatistics myself so I can't get to the bottom of your problem, perhaps Robert or JM should try. The point is just that you can compute filters from any data and then use them on any other data. I don't know at what stage the baseline correction is done in your case. I usually just get the raw output and then process in in any way I like. Best, Vladimir On Tue, Sep 16, 2008 at 2:03 PM, Michael Wibral wrote: > Dear Vladimir, > > thanks for directing me to the appendix of the beamformer tutorial. My problem is indeed related but not quite the same. What I would like to do with these data later is to compare between two groups. I suspect some differences in their baselines. Hence, I would not like to work with source statistics (or relative power change values for that matter) but with raw power differences (i.e. task-baseline). Then I'd like to compare these raw power differences between the two groups. If I compare the two groups statistically using second level stats on t-values or relative changes, differences could be due to baseline differences, instead of task related absolute changes. Therefore I would like to compute the filters and keep them, but do not want to perform sourcestatististics in in each single subject, just source analysis. > > But maybe this is simply a bit exotic. I will also look a bit into the possibilities of sourcestatistics; whether I can actually get my desired difference output w/o stats (there should be a raweffect with each subject after sourcestats, shouldn't it. I could then use this raweffect as an input to the secondlevel sourcestats by copying it over to the correct field...). > > Best Regards, > Michael > > >> -----Ursprüngliche Nachricht----- >> Von: "Vladimir Litvak" >> Gesendet: 15.09.08 20:12:40 >> An: FIELDTRIP at NIC.SURFNET.NL >> Betreff: Re: [FIELDTRIP] reuse of beamformer filters > > >> Hi Michael, >> >> Look in the beamforming tutorial at: >> http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:beamformer >> in the Appendix. The option you need is cfg.keepfilter. I think what >> is done there is more or less what you need. >> >> Best, >> >> Vladimir >> >> >> On Mon, Sep 15, 2008 at 5:47 PM, Michael Wibral >> wrote: >> > Dear Listusers, >> > >> > I'd like to reuse filters computed for an average covariance matrix from two conditions for the subsequent source images of each condition, so that statistics will later on not be influenced by differences in SNR that change the filter computation. Does anybody know how to do this efficiently in sourceanalysis? >> > I thought there was an option like cfg.hasfilters='yes'or so but obviously I was wrong :-). I also looked for something similar in source descriptives, but couldn't find anything. >> > >> > >> > >> > >> > Any help appreciated, >> > Michael Wibral >> > >> > >> > ---------------------------------- >> > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/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/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/fcdonders/fieldtrip. From shehsu at INDIANA.EDU Tue Sep 16 17:06:51 2008 From: shehsu at INDIANA.EDU (Hsu, Shen-Mou) Date: Tue, 16 Sep 2008 11:06:51 -0400 Subject: cluster analysis and EEG channel information Message-ID: Dear Users, I preprocessed my EEG data using EEGLAB and then converted the data into the fieldtrip format using eeglab2fieldtrip. However, I noticed that in cfg.channel, there are only labels without any information about electrode locations. I was wondering if this is OK to run cluster analysis. Besides, I also wondered how to specify the configuration-"cfg.channel" in this case. Many thanks in advance, Shen-Mou ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From shehsu at INDIANA.EDU Tue Sep 16 17:56:03 2008 From: shehsu at INDIANA.EDU (Hsu, Shen-Mou) Date: Tue, 16 Sep 2008 11:56:03 -0400 Subject: cluster analysis and EEG channel information In-Reply-To: <7F00B6A0D4D0674E80A6C1D6DA873B5701CC652B51@iu-mssg-mbx05.ads.iu.edu> Message-ID: Just to clarify my query a bit more. I am trying to perform permutation tests on ERP data. The configuration was as below and the following error message was returned. ??? Undefined function or method 'conndef' for input arguments of type 'double'. Error in ==> clusterstat at 181 posclusobs = bwlabeln(tmp, conndef(length(cfg.dim),'min')); Error in ==> statistics_montecarlo at 394 [stat, cfg] = clusterstat(cfg, statrand, statobs); Error in ==> statistics_wrapper at 362 [stat, cfg] = statmethod(cfg, dat, cfg.design); Error in ==> timelockstatistics at 107 [stat] = statistics_wrapper(cfg, varargin{:}); load GA_F; load GA_N cfg = []; cfg.channel = {'all'}; cfg.latency = [0 0.5]; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 100; subj = 15; design=zeros(2,2*subj); for i = 1:subj design(1,i) = i; end for i = 1:subj design(1,subj+i) = i; end design(2,1:subj) = 1; design(2,subj+1:2*subj) = 2; cfg.design = design; cfg.uvar = 1; cfg.ivar = 2; [stat_FvsN_HV] = timelockstatistics(cfg, GA_F, GA_N); ________________________________________ From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Hsu, Shen-Mou [shehsu at indiana.edu] Sent: Tuesday, September 16, 2008 11:06 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] cluster analysis and EEG channel information Dear Users, I preprocessed my EEG data using EEGLAB and then converted the data into the fieldtrip format using eeglab2fieldtrip. However, I noticed that in cfg.channel, there are only labels without any information about electrode locations. I was wondering if this is OK to run cluster analysis. Besides, I also wondered how to specify the configuration-"cfg.channel" in this case. Many thanks in advance, Shen-Mou ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and 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/fcdonders/fieldtrip. From nathanweisz at MAC.COM Tue Sep 16 22:15:38 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Tue, 16 Sep 2008 22:15:38 +0200 Subject: cluster analysis and EEG channel information In-Reply-To: <7F00B6A0D4D0674E80A6C1D6DA873B5701CC652B51@iu-mssg-mbx05.ads.iu.edu> Message-ID: dear shen-mou, actually - if i remember correctly (long time ago) - after running eeglab2fieldtrip there should be a field in your exported data structure called elec. this should have the electrode info. otherwise you could read the electrode info using read_fcdc_elec. then add the field by hand. for clustering electrodes you need to specify a neighbourhood- structure. take a look at statistics_montecarlo and the comments on cfg.neighbours. look also at the function neigbourselection. basically you could also create that structure by hand. good luck, nathan On 16.09.2008, at 17:06, Hsu, Shen-Mou wrote: > Dear Users, > > > I preprocessed my EEG data using EEGLAB and then converted the data > into the fieldtrip format using eeglab2fieldtrip. However, I noticed > that in cfg.channel, there are only labels without any information > about electrode locations. I was wondering if this is OK to run > cluster analysis. Besides, I also wondered how to specify the > configuration-"cfg.channel" in this case. > > Many thanks in advance, > > Shen-Mou > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/fcdonders/fieldtrip. -------------------------------------------- Attention: New Contact Details -------------------------------------------- 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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at MAC.COM Tue Sep 16 22:16:08 2008 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Tue, 16 Sep 2008 22:16:08 +0200 Subject: cluster analysis and EEG channel information In-Reply-To: <7F00B6A0D4D0674E80A6C1D6DA873B5701CC652B52@iu-mssg-mbx05.ads.iu.edu> Message-ID: your problem is that you do not have the image processing toolbox ... you'll need it to use the clustering functions. On 16.09.2008, at 17:56, Hsu, Shen-Mou wrote: > Just to clarify my query a bit more. I am trying to perform > permutation tests on ERP data. The configuration was as below and > the following error message was returned. > > ??? Undefined function or method 'conndef' for input > arguments of type 'double'. > > Error in ==> clusterstat at 181 > posclusobs = bwlabeln(tmp, > conndef(length(cfg.dim),'min')); > > Error in ==> statistics_montecarlo at 394 > [stat, cfg] = clusterstat(cfg, statrand, statobs); > > Error in ==> statistics_wrapper at 362 > [stat, cfg] = statmethod(cfg, dat, cfg.design); > > Error in ==> timelockstatistics at 107 > [stat] = statistics_wrapper(cfg, varargin{:}); > > > > > load GA_F; load GA_N > > cfg = []; > cfg.channel = {'all'}; > cfg.latency = [0 0.5]; > > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 100; > > subj = 15; > design=zeros(2,2*subj); > for i = 1:subj > design(1,i) = i; > end > for i = 1:subj > design(1,subj+i) = i; > end > design(2,1:subj) = 1; > design(2,subj+1:2*subj) = 2; > > cfg.design = design; > cfg.uvar = 1; > cfg.ivar = 2; > > > [stat_FvsN_HV] = timelockstatistics(cfg, GA_F, GA_N); > ________________________________________ > From: FieldTrip discussion list [FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Hsu, Shen-Mou [shehsu at indiana.edu] > Sent: Tuesday, September 16, 2008 11:06 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] cluster analysis and EEG channel information > > Dear Users, > > > I preprocessed my EEG data using EEGLAB and then converted the data > into the fieldtrip format using eeglab2fieldtrip. However, I noticed > that in cfg.channel, there are only labels without any information > about electrode locations. I was wondering if this is OK to run > cluster analysis. Besides, I also wondered how to specify the > configuration-"cfg.channel" in this case. > > Many thanks in advance, > > Shen-Mou > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and 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/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/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Wed Sep 17 15:35:36 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 17 Sep 2008 15:35:36 +0200 Subject: reuse of beamformer filters In-Reply-To: Message-ID: Dear Michael, If I recall correctly what you would like to do, I would suggest one of the following two paths: first possibility: -perform sourceanalysis with cfg.keepfilter = 'yes' and with an averaged covariance as input -append source.avg.filter to cfg.grid for a second round of sourcenalysis, but now with the condition-specific covariances as input. you might want to check it in the code, but I am quite sure that if the configuration already contains filters, it will use these on the input covariance -this will give you two source-structures, one for the baseline and one for the task condition. second possibility: -use sourcestatistics and create a 'first-level' stat for each subject, using as cfg.statistic = 'diff'. This will just take the difference between task and baseline. Hopefully this helps, Best, JM On Sep 16, 2008, at 3:56 PM, Vladimir Litvak wrote: > Hi, > > I don't use sourcestatistics myself so I can't get to the bottom of > your problem, perhaps Robert or JM should try. The point is just that > you can compute filters from any data and then use them on any other > data. I don't know at what stage the baseline correction is done in > your case. I usually just get the raw output and then process in in > any way I like. > > Best, > > Vladimir > > On Tue, Sep 16, 2008 at 2:03 PM, Michael Wibral > wrote: >> Dear Vladimir, >> >> thanks for directing me to the appendix of the beamformer >> tutorial. My problem is indeed related but not quite the same. >> What I would like to do with these data later is to compare >> between two groups. I suspect some differences in their baselines. >> Hence, I would not like to work with source statistics (or >> relative power change values for that matter) but with raw power >> differences (i.e. task-baseline). Then I'd like to compare these >> raw power differences between the two groups. If I compare the two >> groups statistically using second level stats on t-values or >> relative changes, differences could be due to baseline >> differences, instead of task related absolute changes. Therefore I >> would like to compute the filters and keep them, but do not want >> to perform sourcestatististics in in each single subject, just >> source analysis. >> >> But maybe this is simply a bit exotic. I will also look a bit into >> the possibilities of sourcestatistics; whether I can actually get >> my desired difference output w/o stats (there should be a >> raweffect with each subject after sourcestats, shouldn't it. I >> could then use this raweffect as an input to the secondlevel >> sourcestats by copying it over to the correct field...). >> >> Best Regards, >> Michael >> >> >>> -----Ursprüngliche Nachricht----- >>> Von: "Vladimir Litvak" >>> Gesendet: 15.09.08 20:12:40 >>> An: FIELDTRIP at NIC.SURFNET.NL >>> Betreff: Re: [FIELDTRIP] reuse of beamformer filters >> >> >>> Hi Michael, >>> >>> Look in the beamforming tutorial at: >>> http://www2.ru.nl/fcdonders/fieldtrip/doku.php? >>> id=fieldtrip:documentation:tutorial:beamformer >>> in the Appendix. The option you need is cfg.keepfilter. I think what >>> is done there is more or less what you need. >>> >>> Best, >>> >>> Vladimir >>> >>> >>> On Mon, Sep 15, 2008 at 5:47 PM, Michael Wibral >>> wrote: >>>> Dear Listusers, >>>> >>>> I'd like to reuse filters computed for an average covariance >>>> matrix from two conditions for the subsequent source images of >>>> each condition, so that statistics will later on not be >>>> influenced by differences in SNR that change the filter >>>> computation. Does anybody know how to do this efficiently in >>>> sourceanalysis? >>>> I thought there was an option like cfg.hasfilters='yes'or so >>>> but obviously I was wrong :-). I also looked for something >>>> similar in source descriptives, but couldn't find anything. >>>> >>>> >>>> >>>> >>>> Any help appreciated, >>>> Michael Wibral >>>> >>>> >>>> ---------------------------------- >>>> The aim of this list is to facilitate the discussion between >>>> users of the FieldTrip toolbox, to share experiences and to >>>> discuss new ideas for MEG and EEG analysis. See also http:// >>>> listserv.surfnet.nl/archives/fieldtrip.html and 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/ >>> 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/ >> 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/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/fcdonders/fieldtrip. From michael.wibral at WEB.DE Wed Sep 17 17:08:34 2008 From: michael.wibral at WEB.DE (Michael Wibral) Date: Wed, 17 Sep 2008 17:08:34 +0200 Subject: reuse of beamformer filters Message-ID: Dear Jan-Mathijs, dear Vladimir, many thanks for your help. Option 1 (cf. below) with running sourceanalysis twice works fine now. Just took us a while to figure out were to put the precomputed filters and to get the info, that they would be really used (there is some output of beamformer_lcmv that says so, we just found out later). Maybe this cfg-possibility could be put into the comments of sourceanalysis and beamformer_lcmv somewhere? Michael > -----Ursprüngliche Nachricht----- > Von: "jan-mathijs schoffelen" > Gesendet: 17.09.08 15:53:19 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] reuse of beamformer filters > Dear Michael, > > If I recall correctly what you would like to do, I would suggest one > of the following two paths: > > first possibility: > -perform sourceanalysis with cfg.keepfilter = 'yes' and with an > averaged covariance as input > -append source.avg.filter to cfg.grid for a second round of > sourcenalysis, but now with the condition-specific covariances as input. > you might want to check it in the code, but I am quite sure that if > the configuration already contains filters, it will use these on the > input > covariance > -this will give you two source-structures, one for the baseline and > one for the task condition. > > second possibility: > -use sourcestatistics and create a 'first-level' stat for each > subject, using as cfg.statistic = 'diff'. This will just take the > difference between > task and baseline. > > Hopefully this helps, > > Best, > JM > > On Sep 16, 2008, at 3:56 PM, Vladimir Litvak wrote: > > > Hi, > > > > I don't use sourcestatistics myself so I can't get to the bottom of > > your problem, perhaps Robert or JM should try. The point is just that > > you can compute filters from any data and then use them on any other > > data. I don't know at what stage the baseline correction is done in > > your case. I usually just get the raw output and then process in in > > any way I like. > > > > Best, > > > > Vladimir > > > > On Tue, Sep 16, 2008 at 2:03 PM, Michael Wibral > > wrote: > >> Dear Vladimir, > >> > >> thanks for directing me to the appendix of the beamformer > >> tutorial. My problem is indeed related but not quite the same. > >> What I would like to do with these data later is to compare > >> between two groups. I suspect some differences in their baselines. > >> Hence, I would not like to work with source statistics (or > >> relative power change values for that matter) but with raw power > >> differences (i.e. task-baseline). Then I'd like to compare these > >> raw power differences between the two groups. If I compare the two > >> groups statistically using second level stats on t-values or > >> relative changes, differences could be due to baseline > >> differences, instead of task related absolute changes. Therefore I > >> would like to compute the filters and keep them, but do not want > >> to perform sourcestatististics in in each single subject, just > >> source analysis. > >> > >> But maybe this is simply a bit exotic. I will also look a bit into > >> the possibilities of sourcestatistics; whether I can actually get > >> my desired difference output w/o stats (there should be a > >> raweffect with each subject after sourcestats, shouldn't it. I > >> could then use this raweffect as an input to the secondlevel > >> sourcestats by copying it over to the correct field...). > >> > >> Best Regards, > >> Michael > >> > >> > >>> -----Ursprüngliche Nachricht----- > >>> Von: "Vladimir Litvak" > >>> Gesendet: 15.09.08 20:12:40 > >>> An: FIELDTRIP at NIC.SURFNET.NL > >>> Betreff: Re: [FIELDTRIP] reuse of beamformer filters > >> > >> > >>> Hi Michael, > >>> > >>> Look in the beamforming tutorial at: > >>> http://www2.ru.nl/fcdonders/fieldtrip/doku.php? > >>> id=fieldtrip:documentation:tutorial:beamformer > >>> in the Appendix. The option you need is cfg.keepfilter. I think what > >>> is done there is more or less what you need. > >>> > >>> Best, > >>> > >>> Vladimir > >>> > >>> > >>> On Mon, Sep 15, 2008 at 5:47 PM, Michael Wibral > >>> wrote: > >>>> Dear Listusers, > >>>> > >>>> I'd like to reuse filters computed for an average covariance > >>>> matrix from two conditions for the subsequent source images of > >>>> each condition, so that statistics will later on not be > >>>> influenced by differences in SNR that change the filter > >>>> computation. Does anybody know how to do this efficiently in > >>>> sourceanalysis? > >>>> I thought there was an option like cfg.hasfilters='yes'or so > >>>> but obviously I was wrong :-). I also looked for something > >>>> similar in source descriptives, but couldn't find anything. > >>>> > >>>> > >>>> > >>>> > >>>> Any help appreciated, > >>>> Michael Wibral > >>>> > >>>> > >>>> ---------------------------------- > >>>> The aim of this list is to facilitate the discussion between > >>>> users of the FieldTrip toolbox, to share experiences and to > >>>> discuss new ideas for MEG and EEG analysis. See also http:// > >>>> listserv.surfnet.nl/archives/fieldtrip.html and 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/ > >>> 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/ > >> 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/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/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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 443 bytes Desc: not available URL: From bmewang at YAHOO.COM Thu Sep 18 05:48:35 2008 From: bmewang at YAHOO.COM (Wei Wang) Date: Thu, 18 Sep 2008 05:48:35 +0200 Subject: Lost gray matter during segmentation Message-ID: Hi everyone, I'm trying to work with my own MRI data, and after I did the segmentation with volumesegment.m , when I examine the gray matter with sourceplot, it seems that fraction of the gray matter was not marked as gray matter. They were left out for some reason. For example, part of the visual cortex are not included in my gray matter. Since the segmentation is done using SPM2, I read the SPM manual a little bit, and, in the manual, it says, "5.2.5 Clean up any partitions This uses a crude routine for extracting the brain from segmentedimages. It begins by taking the white matter, and eroding it acouple of times to get rid of any odd voxels. The algorithm continues on to do conditional dilations for several iterations,where the condition is based upon gray or white matter being present. This identified region is then used to clean up the grey and white matter partitions, and has a slight in uences on the CSF partition. If you find pieces of brain being chopped out in your data, then you may wish to disable or tone down the cleanup procedure." So, I went into the volumesegment.m code, and set: defaults.segment.write.cleanup = 0; When I run volumesegment again, it seems to improve the results a little bit, but still, I'm loosing some gray matters. I'm wondering if you have any suggestions? Thank you very much for the help! Wei Wang Department of Physical Medicine and Rehabilitation University of Pittsburgh ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Sep 24 17:53:03 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 24 Sep 2008 17:53:03 +0200 Subject: change in directory structure Message-ID: Dear fieldtrip users, yesterday and today I have made some changes to teh directory structure. You might not have noticed (as I hope), since I have tried my best to keep everything backward compatible without any changes on your side. However, the change in directory structure is rather large, and involved moving a lot of files around. More details can be found here: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:development:directorylayout There still migth be some problems with the inhouse/FCDC version of fieldtrip, or with the external version that you got of the ftp server. The most likely problems that you may see are "missing function" problems, which are easy to solve by setting the path correctly. I would expect all problems to be easily identifyable, i.e. not that the results of computations are be wrong, but rather that Matlab just gives a plain error. The fieldtrip path is now set automatically using the fieldtripdefs.m script, where you could have look into if you think that the path is a problem on your Matlab/ fieldtrip installation. If you see problems that should be solved in the release version of fieldtrip, please let us know. best regards, Robert ----------------------------------------------------------- Robert Oostenveld Senior Researcher Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Sep 24 18:29:02 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 24 Sep 2008 18:29:02 +0200 Subject: changed default reading functions for CTF Message-ID: Dear CTF fieldtrip users, I have changed the default reading functions for CTF data. The read_header and read_data functions used to call low-level functions that originated from the FCDC. The new default is to use p-files (i.e. precompiled matlab files) that have been contributed to fieldtrip/ fileio by CTF. These new functions are not open source, but can be freely distributed. The advantage of the new functions is that they allow the use of synthetic gradients. See denoise_synthetic and the email exchange on this topic some time back. best regards, Robert ----------------------------------------------------------- Robert Oostenveld Senior Researcher Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen tel.: +31 (0)24 3619695 e-mail: r.oostenveld at donders.ru.nl web: http://www.ru.nl/neuroimaging ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From j.poort at NIN.KNAW.NL Mon Sep 29 09:54:50 2008 From: j.poort at NIN.KNAW.NL (Jasper Poort) Date: Mon, 29 Sep 2008 09:54:50 +0200 Subject: cross-spectrum to cross-correlogram Message-ID: Dear all, I'd like to convert the cross-spectrum to a cross-correlogram. My first approach would be simply to ifft the output of freqanalysis with output option 'complex'. However, I have difficulty understanding the result of this procedure and in particular how I can get output comparable to the matlab function xcorr using FieldTrip. Below I inserted a small test script. Best, Jasper % using the fake data from the FieldTrip tutorial 'Fourier analysis of % oscillatory power and coherence' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %get many repetitions of two signals with somewhat consistent phase difference clear all close all frq = 10; % Hz len = 1; % seconds smpfrq = 100; % Hz numrpt = 1000; phsspreadfac = 0.5; circulran = mod(randn(2.*numrpt,2).*phsspreadfac + pi, 2.* pi) - pi; ranphs = circulran ./ (2 .* pi); phsdif = 45 ./ 360; noifac = 1./50; for rptlop = 1:numrpt wav(:,rptlop,1) = sin(((0:(len.*smpfrq-1))./(len.*smpfrq).*(frq.*2.*pi))+(ranphs(rptlop,1).*2. *pi)) + ... randn(1,len.*smpfrq).*noifac; wav(:,rptlop,2) = sin(((0:(len.*smpfrq-1))./(len.*smpfrq).*(frq.*2.*pi))+((ranphs(rptlop,2)+ph sdif).*2.*pi)) + ... randn(1,len.*smpfrq).*noifac; end % get the FFT of the waves for rptlop = 1:numrpt fftwav(:,rptlop,1) = fft(wav(:,rptlop,1)); fftwav(:,rptlop,2) = fft(wav(:,rptlop,2)); end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % make FieldTrip structure dum.label = {'1','2'}; dum.fsample = smpfrq; for i=1:size(wav,2), % for every trial dum.trial{i}=squeeze(wav(:,i,:))'; dum.time{i} =[0:(len.*smpfrq-1)]./smpfrq; end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %fft: cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.taper = 'hanning'; cfg.tapsmofrq = 1; [freq] = freqanalysis(cfg, dum) % cross-spectrum CS=freq.fourierspctrm(:,1,:).*conj(freq.fourierspctrm(:,2,:)); y = real((squeeze(mean(CS)))); figure;plot(y) % inverse fft of cross-spectrum y = real(ifft(squeeze(mean(CS)))); figure;plot(y) % compare to cross-correlation function [c,lags] = xcorr(mean(squeeze(wav(:,:,1)),2),mean(squeeze(wav(:,:,2)),2)); figure;plot(lags,c) ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Mon Sep 29 14:10:38 2008 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 29 Sep 2008 14:10:38 +0200 Subject: Lost gray matter during segmentation In-Reply-To: Message-ID: Hi Wei Wang, I don't know about the underlying SPM2 methods to help you further. I suggest that you ask on the SPM mailing list. Note that the SPM2 toolbox on which these fieldtrip functions wqere built is already old (SPM version 2 is from 2002, version 5 is from 2005 and later this year SPM8 will be released). These particular functions in spm5 turned out to be not backward compatible. Since sofar there seemed no reason to update the fieldtrip functions to use spm5 (or spm8) instead of spm2, we have never upgraded to a later spm version. It might be that your problem would be solved by later spm versions. If that is the case, I would like to hear that, since that would provide a good motivation for upgrading the fieldtrip code to use the later spm versions instead of the old spm2. best regards, Robert On 18 Sep 2008, at 5:48, Wei Wang wrote: > Hi everyone, > > I'm trying to work with my own MRI data, and after I did the > segmentation > with volumesegment.m , when I examine the gray matter with > sourceplot, it > seems that fraction of the gray matter was not marked as gray > matter. They > were left out for some reason. For example, part of the visual > cortex are not > included in my gray matter. Since the segmentation is done using > SPM2, I > read the SPM manual a little bit, and, in the manual, it says, > "5.2.5 Clean up any partitions > This uses a crude routine for extracting the brain from > segmentedimages. It > begins by taking the white matter, and eroding it acouple of times > to get rid of > any odd voxels. The algorithm continues on to do conditional > dilations for > several iterations,where the condition is based upon gray or white > matter > being present. This identified region is then used to clean up the > grey and > white matter partitions, and has a slight in uences on the CSF > partition. > If you find pieces of brain being chopped out in your data, then you > may wish > to disable or tone down the cleanup procedure." > > So, I went into the volumesegment.m code, and set: > defaults.segment.write.cleanup = 0; > > When I run volumesegment again, it seems to improve the results a > little bit, > but still, I'm loosing some gray matters. > > I'm wondering if you have any suggestions? Thank you very much for > the help! > > Wei Wang > Department of Physical Medicine and Rehabilitation > University of Pittsburgh > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and 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/fcdonders/fieldtrip. From s.debener at UKE.UNI-HAMBURG.DE Tue Sep 30 14:14:57 2008 From: s.debener at UKE.UNI-HAMBURG.DE (Stefan Debener) Date: Tue, 30 Sep 2008 13:14:57 +0100 Subject: Neuromag 306ch import Message-ID: Dear all, Does anybody import continuous, raw 306ch Neuromag fif data into FT? I am aware of Kimmo Uutela's MEG-PD toolbox, but this does not support 64bit ML, neither on Windows nor on Linux - and even the Windows 32bit import seems not working: >>??? Invalid MEX-file 'D:\ft\fieldtrip-20080928\private\meg_pd_1.2\rawdata.dll': The specified module could not be found. Any hints greatly appreciated. Thanks, Stefan ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From j.schoffelen at PSY.GLA.AC.UK Tue Sep 30 14:31:48 2008 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Tue, 30 Sep 2008 13:31:48 +0100 Subject: Neuromag 306ch import In-Reply-To: <48E21841.7010105@uke.uni-hamburg.de> Message-ID: Dear Stefan, I had similar problems on a 32bit machine. I could not get Kimmo's code working on matlab7. Using matlab6, and installing the proper version of Kimmo's toolbox, fieldtrip can work with the reading routines. However, this situation is not ideal, and you run into some problems related to backward compatibility of the fieldtrip-code. If I remember correctly you have to specify cfg.precision explicitly before running preprocessing, but I do not remember to what value ;o). It was still on my todo list to look into Matti Hamalainen's code for reading in fif-files. I did not yet find time to play around with it, but perhaps the following link is useful. So far my workaround worked (i.e. preprocessing and saving the data in matlab6 and taking it from there in matlab7) http://nmr.mgh.harvard.edu/martinos/userInfo/data/sofMNE.php Yours, Jan-Mathijs On Sep 30, 2008, at 1:14 PM, Stefan Debener wrote: > Dear all, > > Does anybody import continuous, raw 306ch Neuromag fif data into > FT? I am aware of Kimmo Uutela's MEG-PD toolbox, but this does not > support 64bit ML, neither on Windows nor on Linux - and even the > Windows 32bit import seems not working: > > >>??? Invalid MEX-file 'D:\ft\fieldtrip-20080928\private\meg_pd_1.2 > \rawdata.dll': The specified module could not be found. > > Any hints greatly appreciated. > > Thanks, > Stefan > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and 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/fcdonders/fieldtrip. From tomh at KURAGE.NIMH.NIH.GOV Tue Sep 30 23:09:06 2008 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Tue, 30 Sep 2008 17:09:06 -0400 Subject: changed default reading functions for CTF In-Reply-To: Message-ID: On Wed, 2008-09-24 at 18:29 +0200, Robert Oostenveld wrote: > The new default is to use p-files (i.e. precompiled matlab files) > that have been contributed to fieldtrip/fileio by CTF. These new > functions are not open source, but can be > freely distributed. The advantage of the new functions is that they > allow the use of synthetic gradients. See denoise_synthetic and the > email exchange on this topic some time back. Robert, Two questions. 1) We record data with 3rd gradient turned on by default. That is, the MEG channels have already had the background noise subtracted. So our datasets contain only balanced data. No further processing is required. Does your code take care of this case? 2) Why is the code closed source? -- Elephants can paint. http://www.elephantart.com/catalog/thailand.php ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip.