From j.poort at NIN.KNAW.NL Tue Sep 4 10:30:15 2007 From: j.poort at NIN.KNAW.NL (Jasper Poort) Date: Tue, 4 Sep 2007 10:30:15 +0200 Subject: coherence and phase spectrum Message-ID: Hi all, I have a few questions: first, in order to look at induced power rather than evoked power, one can subtract the power spectrum of the evoked potential (average over trials) from the power spectrum (average of power in single trials). Is this not the same as first subtracting the average over trials from every trial and then doing a single freqanalysis? If not, would it then mean you have to do a procedure like: do 1) freqanalysis on preprocessed data 2) timelockanalysis on preprocessed data, then freqanalysis 3) take (result of 1)-(result of 2)? second, does a similar approach also exist for coherence? For example, in case of presenting a flash to a subject, different sensors will get common input that is time and phase locked, resulting in high coherence values, however for this no coupling between the sensors needs to exist. Is it possible to correct for this to get an "induced" coherence? third, in principle the phase spectrum can give information additional to the power spectrum: in the case of a power spectrum, it can give the latency of the response if one fits a linear function to the phase spectrum. How can this be done in FieldTrip? My first approach would be: cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; % complex spectrum cfg.tapsmofrq = 4; [freq]=freqanalysis(cfg,data) % data is preprocessed data the power spectrum is then: powspctrm=squeeze(mean(freq.fourierspctrm.*conj(freq.fourierspctrm))); the phase spectrum is then simply unwrapping the angle of the complex spectrum and trying to fit a line on this?: phsspctrm = squeeze(mean(unwrap(angle(freq.fourierspctrm)))); Besides practical advice I'd much appreciate references to any standard papers on this procedure. related to this, how could one use the phase of the cross-spectrum to get an idea of the latency of covariance at some frequency? Many thanks, best, Jasper ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 hauck at UKE.DE Tue Sep 4 13:46:58 2007 From: hauck at UKE.DE (Michael Hauck) Date: Tue, 4 Sep 2007 13:46:58 +0200 Subject: freqstatistics Message-ID: Hello there, I found a bug in freqstatistic in version fieldtrip-20070603 when using it with coherence. If you use cfg.parameter = 'cohspctrm' freqstatistic still uses the powspectrm due to line 89 to 93 89 if isfield(cfg, 'parameter') && strcmp(cfg, 'powspctrm') 90 % use the power spectrum, this is the default 91 elseif isfield(cfg, 'parameter') && strcmp(cfg, 'csdspctrm') 92 % use the cross spectrum, this might work as well (but has not been tested) 93 elseif isfield(cfg, 'parameter') && strcmp(cfg, 'cohspctrm') I think that it should be ... && strcmp(cfg.PARAMETER, 'powspctrm') and so on ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 Jan.Schoffelen at FCDONDERS.RU.NL Tue Sep 4 14:11:11 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Tue, 4 Sep 2007 14:11:11 +0200 Subject: freqstatistics In-Reply-To: Message-ID: Dear Michael, I am pretty sure that this bug has been fixed in the newer releases of fieldtrip. Thanks for noticing though. Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Michael Hauck Sent: Tuesday, September 04, 2007 1:47 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] freqstatistics Hello there, I found a bug in freqstatistic in version fieldtrip-20070603 when using it with coherence. If you use cfg.parameter = 'cohspctrm' freqstatistic still uses the powspectrm due to line 89 to 93 89 if isfield(cfg, 'parameter') && strcmp(cfg, 'powspctrm') 90 % use the power spectrum, this is the default 91 elseif isfield(cfg, 'parameter') && strcmp(cfg, 'csdspctrm') 92 % use the cross spectrum, this might work as well (but has not been tested) 93 elseif isfield(cfg, 'parameter') && strcmp(cfg, 'cohspctrm') I think that it should be ... && strcmp(cfg.PARAMETER, 'powspctrm') and so on ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 sameer at ANDREW.CMU.EDU Tue Sep 4 19:13:59 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 4 Sep 2007 13:13:59 -0400 Subject: indicating reference channel in coherence topoplots Message-ID: Hello, How does one get topoplotER to mark the reference channel (say with a cross) when plotting coherence values? Will the same thing work for marking reference channels while plotting results of clusterandanalysis for coherence change? thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Sep 4 19:30:27 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 4 Sep 2007 19:30:27 +0200 Subject: indicating reference channel in coherence topoplots In-Reply-To: Message-ID: Hi Sameer, You can use the cfg.highlight = channelnumber and cfg.hlmarker = '+' (see help topoplot.m for details). As long as you use topoplotER or topoplotTFR (they both call the lower level function topoplot.m that does the actual plotting) it will work. Bests, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Tuesday, September 04, 2007 7:14 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] indicating reference channel in coherence topoplots Hello, How does one get topoplotER to mark the reference channel (say with a cross) when plotting coherence values? Will the same thing work for marking reference channels while plotting results of clusterandanalysis for coherence change? thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 sameer at ANDREW.CMU.EDU Thu Sep 6 23:52:39 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 6 Sep 2007 17:52:39 -0400 Subject: sensor numbers on topoplot Message-ID: Hello, While using topoplot, if one uses cfg.electrodes = 'numbers'; you get a plot with the sensor number written over each of the sensor positions. What do these numbers correspond to? If I look at NM306 layout diagram and locate sensor 2121 (on the midline at the very bottom of the occipital lobe), this corresponds to a sensor number 289 on the topoplot. Yet if I do cfg = []; cfg.layout = 'NM306all.lay'; lay = prepare_layout(cfg) reading layout from file NM306all.lay lay = pos: [308x2 double] width: [308x1 double] height: [308x1 double] label: {308x1 cell} >> lay.label(289) ans = '2533' >> find(strcmp(lay.label,'2121')) ans = 240 Can someone help me understand this? This is necessary to understand how to assign cfg.highlights. Thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 Jan.Schoffelen at FCDONDERS.RU.NL Fri Sep 7 10:08:35 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Fri, 7 Sep 2007 10:08:35 +0200 Subject: sensor numbers on topoplot In-Reply-To: Message-ID: Sameer, I used to have a latin teacher who always told us: reading is half the understanding (but then in latin of course). Since you are probably not so much interested in my latin teacher, I'll point to you where you can find the answer yourself (of course by reading). Many problems often solve themselves when looking into the code, because there is no oomopa loompahs in your computer that randomly assign numbers to electrode positions each time you call topoplotER. However, I know of some obscure operating systems which actually have oompa loompahs inside them, but that's beside the scope of this e-mail. So, let's have a look at topoplot.m which is, as Ingrid already pointed out several times, the low level function which generates topoplot-related figures. If you search the code for 'electrodes' you hit some relevant code from line 597 onwards. for i=1:size(labels,1) text(y(i), x(i), int2str(i) etc..... end Apparently, the number i converted to a string and plotted on the location (x and y represent the coordinates as specified by lay.pos(:,1), and lay.pos(:,2)). The number i runs from 1 to the number of sensors in your layout. But so far I guess you already found out. If I repeat your little procedure my bottom midline occipital sensor is number 240, and not 289. So I cannot reproduce your finding. Did you already look into the text file NM306all.lay, and check the 240th line? Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Thursday, September 06, 2007 11:53 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] sensor numbers on topoplot Hello, While using topoplot, if one uses cfg.electrodes = 'numbers'; you get a plot with the sensor number written over each of the sensor positions. What do these numbers correspond to? If I look at NM306 layout diagram and locate sensor 2121 (on the midline at the very bottom of the occipital lobe), this corresponds to a sensor number 289 on the topoplot. Yet if I do cfg = []; cfg.layout = 'NM306all.lay'; lay = prepare_layout(cfg) reading layout from file NM306all.lay lay = pos: [308x2 double] width: [308x1 double] height: [308x1 double] label: {308x1 cell} >> lay.label(289) ans = '2533' >> find(strcmp(lay.label,'2121')) ans = 240 Can someone help me understand this? This is necessary to understand how to assign cfg.highlights. Thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 andrew.smart at NYU.EDU Fri Sep 7 21:19:26 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Fri, 7 Sep 2007 15:19:26 -0400 Subject: cfg.highlight using topoplot to show samples in sig clusters In-Reply-To: <01d701c7eb09$b8f05660$642dae83@fcdonders.nl> Message-ID: Hi Ingrid, Thank you very much for the help with topoplot, I really appreciate it. The plotting finally did work using very specific time windows for example: m=[0.18:0.02:0.28]; j=[114:4:171]; (although I am a little unsure if this is ok not starting from sample 1, but it worked) The cluster-based permutation test did reveal an M170 effect in our data that was not coming out significant using more traditional statistical tests. I have two more questions if you have time: 1)Is it possible to compare two groups of subjects of different sizes using the permutation test? Ie a clinical group and a control group where the clinical group has say 9 subj and the control group has 10 subj? 2)Is it possible to do an anova or manova test using the cluster-based permutation test? Or for example to test for interaction effects between group*condition without doing a full anova? Would this require a lot of custom coding or can these be specified in cfg.design? Thank you! andy ----- Original Message ----- From: Ingrid Nieuwenhuis Date: Thursday, August 30, 2007 9:29 am Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to show samples in sig clusters To: FIELDTRIP at NIC.SURFNET.NL > Hi Andrew, > > - where does this size come from if my sample rate is 600?: > The size 267x301 means 267 channels x 301 samples. You have 301 samples > because your latency in timelockanalysis was cfg.latency = [0.0 0.5]; > so > that's 301 samples with sample rate 600 > > Plotting the output from the randomization can be quite tricky, > because you > have 301 moments in time where you can have a cluster. In the tutorial > a > trick was used. There they also had 301 time points, but a sample rate > of > 300 -> spanning one second. If you exactly want to know where the clusters > are you would have to plot all the 301 time points. Because that doesn't > make sense they average over 50 millisecond time windows. If for instance > k=10 -> pos_int = mean(pos(:,m(k):m(k+1))')' -> an average is made over > samples 136-151 time is 0.45-0.5s giving the 10th plot in the figure. > Only > those sensors that are part of the cluster for this whole time window > (all > 15 time points) give out a mean of 1 or -1 and are plotted. In the tutorial > data the cluster was present over a long time window in many sensors, > therefore there were many sensors with 1 or -1. > > For your data this doesn't work, but you do have significant clusters. > > > "I can find the elements of pos and neg that = 1 and = -1 > respectively. > elements =1 are spread out between roughly pos(59:168,149:172) and =-1 > > between neg(152:240,242:270)" > > For instance this means that the positive clusters are in channel > 59:168 at > time points 149:172, with a sample rate of 600 this means from 0.248 to > 0.287 seconds. You should adjust the loop in such a way that you put the > settings that they fit your data. So for instance make the time resolution > higher (by adjusting j and m) since you have clusters that are short lived > in time, and to have not to many plots, plot around the time where you > know > your clusters are. > > Hope this solves your stuck-ness, > Good luck again. > Ingrid > > > > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Andrew Smart > Sent: Wednesday, August 29, 2007 8:02 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to show > samples in sig clusters > > Hi Ingrid again, > Inspecting the variables more I find that the output of the > timelockstatistics on > my data gives: > 28 pos clusters and 36 neg clusters (1 significant pos cluster and 1 > sig neg > > cluster) > > and posclusterslabelmat and negclusterslabelmet as 267x301 (where does > this > size come from if my sample rate is 600?) > > then using > pos = stat.posclusterslabelmat==1; > neg = (stat.negclusterslabelmat==1)*(-1); > > pos and neg are obviously 267x301, > and I can find the elements of pos and neg that = 1 and = -1 > respectively. > elements =1 are spread out between roughly pos(59:168,149:172) and =-1 > > between neg(152:240,242:270). > > however, using > > pos_int = mean(pos(:,m(k):m(k+1))')'; > neg_int = mean(neg(:,m(k):m(k+1))')'; > > in the for loop, gives pos_int as 267x1 but all the elements are zeros. > > and in neg_int some elements are values like -0.1667 for example. > > so for the highlight to work do the values in pos_int and neg_int have > to be > > either 1 or -1? > > i have tried various parameters in m and but nothing i have tried > seems to > work. i am stuck! > > thanks! > andy > > > > > ----- Original Message ----- > From: Ingrid Nieuwenhuis > Date: Wednesday, August 29, 2007 5:12 am > Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to > show > samples in sig clusters > To: FIELDTRIP at NIC.SURFNET.NL > > > Hi Andrew, > > > > You can find the option cfg.highlight in the function topoplot.m, this > > function is called by topoplotER (also by topoplotTFR by the way). > It > > should > > contain the channel numbers which you want to highlight. > > > > Why your plot doesn't give any highlighted sensors is hard to say without > > knowing your data (what did you give in to timelockstatistics with which > > cfg). > > - It could be that the time you plot (0:0.05:0.5) does not contain the > > clusters > > - It could be the specification of m [1:15:301], this is exactly > > copied from > > the tutorial, but it is based on the sample frequency of the data used > > there. In the tutorial a second of data is used, cut up in 21 pieces > from > > 0:0.05:1 and that data has a sample frequency of 301 also cut up in > 21 > > pieces 1:15:301. You should adjust m to you own time settings and sample > > frequency. > > - cfg.highlight = find(pos_int==1|neg_int==-1), what is the outcome > of > > this? > > For the highlighting to work it should contain the sensor numbers to > be > > highlighted. If your m is not specified correctly I would guess that > pos_int > > and neg_int are not specified correctly and cfg.highlight turnes up > empty > > and therefore no highlights are plotted. > > > > Hope this give you some ideas to find out what's wrong. > > > > Good luck, > > Ingrid > > > > > > -----Original Message----- > > From: FieldTrip discussion list [ > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the > FieldTrip toolbox, to share experiences 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://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 andrew.smart at NYU.EDU Fri Sep 7 21:22:06 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Fri, 7 Sep 2007 15:22:06 -0400 Subject: problem w/ cfg.highlight using topoplot to show samples in sig clusters In-Reply-To: <01d701c7eb09$b8f05660$642dae83@fcdonders.nl> Message-ID: i meant to write j=[0.18:0.02:0.28]; m=[114:4:171]; i had those switched ----- Original Message ----- From: Ingrid Nieuwenhuis Date: Thursday, August 30, 2007 9:29 am Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to show samples in sig clusters To: FIELDTRIP at NIC.SURFNET.NL > Hi Andrew, > > - where does this size come from if my sample rate is 600?: > The size 267x301 means 267 channels x 301 samples. You have 301 samples > because your latency in timelockanalysis was cfg.latency = [0.0 0.5]; > so > that's 301 samples with sample rate 600 > > Plotting the output from the randomization can be quite tricky, > because you > have 301 moments in time where you can have a cluster. In the tutorial > a > trick was used. There they also had 301 time points, but a sample rate > of > 300 -> spanning one second. If you exactly want to know where the clusters > are you would have to plot all the 301 time points. Because that doesn't > make sense they average over 50 millisecond time windows. If for instance > k=10 -> pos_int = mean(pos(:,m(k):m(k+1))')' -> an average is made over > samples 136-151 time is 0.45-0.5s giving the 10th plot in the figure. > Only > those sensors that are part of the cluster for this whole time window > (all > 15 time points) give out a mean of 1 or -1 and are plotted. In the tutorial > data the cluster was present over a long time window in many sensors, > therefore there were many sensors with 1 or -1. > > For your data this doesn't work, but you do have significant clusters. > > > "I can find the elements of pos and neg that = 1 and = -1 > respectively. > elements =1 are spread out between roughly pos(59:168,149:172) and =-1 > > between neg(152:240,242:270)" > > For instance this means that the positive clusters are in channel > 59:168 at > time points 149:172, with a sample rate of 600 this means from 0.248 to > 0.287 seconds. You should adjust the loop in such a way that you put the > settings that they fit your data. So for instance make the time resolution > higher (by adjusting j and m) since you have clusters that are short lived > in time, and to have not to many plots, plot around the time where you > know > your clusters are. > > Hope this solves your stuck-ness, > Good luck again. > Ingrid > > > > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Andrew Smart > Sent: Wednesday, August 29, 2007 8:02 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to show > samples in sig clusters > > Hi Ingrid again, > Inspecting the variables more I find that the output of the > timelockstatistics on > my data gives: > 28 pos clusters and 36 neg clusters (1 significant pos cluster and 1 > sig neg > > cluster) > > and posclusterslabelmat and negclusterslabelmet as 267x301 (where does > this > size come from if my sample rate is 600?) > > then using > pos = stat.posclusterslabelmat==1; > neg = (stat.negclusterslabelmat==1)*(-1); > > pos and neg are obviously 267x301, > and I can find the elements of pos and neg that = 1 and = -1 > respectively. > elements =1 are spread out between roughly pos(59:168,149:172) and =-1 > > between neg(152:240,242:270). > > however, using > > pos_int = mean(pos(:,m(k):m(k+1))')'; > neg_int = mean(neg(:,m(k):m(k+1))')'; > > in the for loop, gives pos_int as 267x1 but all the elements are zeros. > > and in neg_int some elements are values like -0.1667 for example. > > so for the highlight to work do the values in pos_int and neg_int have > to be > > either 1 or -1? > > i have tried various parameters in m and but nothing i have tried > seems to > work. i am stuck! > > thanks! > andy > > > > > ----- Original Message ----- > From: Ingrid Nieuwenhuis > Date: Wednesday, August 29, 2007 5:12 am > Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to > show > samples in sig clusters > To: FIELDTRIP at NIC.SURFNET.NL > > > Hi Andrew, > > > > You can find the option cfg.highlight in the function topoplot.m, this > > function is called by topoplotER (also by topoplotTFR by the way). > It > > should > > contain the channel numbers which you want to highlight. > > > > Why your plot doesn't give any highlighted sensors is hard to say without > > knowing your data (what did you give in to timelockstatistics with which > > cfg). > > - It could be that the time you plot (0:0.05:0.5) does not contain the > > clusters > > - It could be the specification of m [1:15:301], this is exactly > > copied from > > the tutorial, but it is based on the sample frequency of the data used > > there. In the tutorial a second of data is used, cut up in 21 pieces > from > > 0:0.05:1 and that data has a sample frequency of 301 also cut up in > 21 > > pieces 1:15:301. You should adjust m to you own time settings and sample > > frequency. > > - cfg.highlight = find(pos_int==1|neg_int==-1), what is the outcome > of > > this? > > For the highlighting to work it should contain the sensor numbers to > be > > highlighted. If your m is not specified correctly I would guess that > pos_int > > and neg_int are not specified correctly and cfg.highlight turnes up > empty > > and therefore no highlights are plotted. > > > > Hope this give you some ideas to find out what's wrong. > > > > Good luck, > > Ingrid > > > > > > -----Original Message----- > > From: FieldTrip discussion list [ > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the > FieldTrip toolbox, to share experiences 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://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 Jan.Schoffelen at FCDONDERS.RU.NL Mon Sep 10 14:43:40 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 10 Sep 2007 14:43:40 +0200 Subject: sensor numbers on topoplot Message-ID: Dear Sameer, Let's again have a look at the code together. In topoplotER it states % Draw topoplot: if ~isfield(cfg, 'layout') tmpcfg = cfg; else tmpcfg = rmfield(cfg,'layout'); end topoplot(tmpcfg,chanX,chanY,datavector,chanLabels); (lines 365 onwards) This means the function topoplot is called, and it receives 5 input arguments. Additionally, a potential layout-field in the tmpcfg-structure is removed. This means that the only information topoplot gets regarding the channels, and the data are the ordered vectors chanX, chanY and datavector, and the cell-array chanLabels. When you look a bit back in the code, you'll find out that these variables represent the following things: -chanX = the x-coordinate for the topographical projection -chanY = the y-coordinate for the topographical projection -datavector = the value to be plotted -chanLabels = the name of the corresponding channel. Note that the physical order of the entries within these arrays is not relevant, and as long as you randomly shuffle them all in the same way the resulting topographic representation will not be affected. BUT the actual order in which the channels are ordered does affect the (arbitrary) numbers topoplot connects to these sensors when you specify cfg.electrodes = 'numbers'. As I said in a previous mail, within topoplot there is just a stupid for-loop, which assigns to each electrode a number, using int2str. This procedure is actually blind for the order in which the channel names are specified in the layout-file (and thus the corresponding numbers in the said layout-file), and only reflects the order in which the channels are represented in the data you give as an input to the plotting function. Therefore, it does not make sense to compare the numbers on the topoplot with lay.label, but you should compare them with the label-array in your data. Yours, Jan-Mathijs -----Original Message----- From: Sameer Walawalkar [mailto:sameer at andrew.cmu.edu] Sent: Friday, September 07, 2007 3:46 PM To: Jan Mathijs Schoffelen Subject: Re: [FIELDTRIP] sensor numbers on topoplot Dear Jan-Mathijs, Unfortunately, it seems I was not very clear in my earlier email about my question. The 240th line in NM306all.lay ** is ** 2121, and that is reflected in (as noted in my earlier email) >> find(strcmp(lay.label,'2121')) ans = 240 However the sensor number corresponding to sensor position 2121 on the topoplot generated using topoplot.m ** is not ** 240, it is 289. To clarify my question I have made available a jpeg of the topoplot at issue at the following link http://www.cnbc.cmu.edu/~sameer/Jan_Mathijs/Sensor_Numbers.jpg Please note the sensor number of the bottom midline sensor, it is 289 and not 240 as one would expect from your clarification. 240 is somewhere off to the left temporal area. In fact I picked up the bottom midline as an example. None of the numbers displayed here seem to match up with the line numbers in NM306all.lay. Best, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 Jan.Schoffelen at FCDONDERS.RU.NL Tue Sep 11 14:22:29 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Tue, 11 Sep 2007 14:22:29 +0200 Subject: new implementation of routine to read ctf-data Message-ID: Dear all, As of tomorrow, the release version of fieldtrip will contain a new implementation of read_ctf_meg4, which is the low level function to read ctf-data. The old version did not always correctly handle very big datasets (> 4GB), or even crashed when specific favourable criteria were met. As far as I can see, all works fine (reading in data goes actually faster than before), but please keep your eyes and ears open. Yours, Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 marie at PSY.GLA.AC.UK Thu Sep 13 19:22:43 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Thu, 13 Sep 2007 18:22:43 +0100 Subject: volumewrite Message-ID: Hi, I am trying to output the results of sourceinterpolate to analyze format to read in afni / spm2. The volumewrite function does seem to do this but the orientation of the output mri is not correct when viewed in spm2 / afni (coronal is axial and rotated 90degrees, sagittal is coronal also rotated and axial is sagittal also rotated). I have checked and it seems to display correctly in sourceplot (in that it matches the images shown in the tutorial documentation for beamforming). I am selecting cfg.coordinates = 'cfg' and cfg.filetype = spm in volumewrite and leaving the rest to the defaults. Could there be an orientation error coming in from somewhere and how can I fix it ? Also on a related point, i also tried cfg.filetype = 'analyze' and got quite a different output when viewed in spm. The slices seemed to have been rotated in some way in addition to errors in the orientation. Any advice would be appreciated, Marie ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 Jan.Schoffelen at FCDONDERS.RU.NL Thu Sep 13 22:27:03 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Thu, 13 Sep 2007 22:27:03 +0200 Subject: volumewrite In-Reply-To: Message-ID: Dear Marie, Handling of volume-data is a tricky business, and in particular when different coordinate systems are used. As far as I can see, I'd advice you to use the following configuration, although I am not used to using the volumewrite function (because who would want to visualize the data otherwise than using sourceplot?). cfg.coordinates = 'ctf' (true?): this means that the x-axis runs from back-to-front, the y-axis from right-to-left, and the z-axis from bottom-to-top. On the other hand, an 'spm' coordinate system has it x-axis running from left to right, and the y-axis from back-to-front. This means that at least the first two dimensions of the data-matrix should be swapped, in combination with a subsequent affine-transformation (I suspect some info about transformation-matrices in on the fieldtrip website). This is done when you specify cfg.filetype = 'analyze' instead of 'spm' (relevant code is on the lines beyond line 282 in volumewrite.m. Why this swapping is not applied when specifying cfg.filetype='spm' is a mystery to m, but I guess there's a good reason for it. Summarizing: cfg.coordinates = 'ctf', and cfg.filetype = 'analyze' might help. On the other hand you could stick to sourceplot, which I guess is lacking some functionality, and which is the reason for you to convert it back to analyze (does it by any chance has to do with matching voxels with brain regions ;-)?). Let's implement this soon then. Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Marie Smith Sent: Thursday, September 13, 2007 7:23 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] volumewrite Hi, I am trying to output the results of sourceinterpolate to analyze format to read in afni / spm2. The volumewrite function does seem to do this but the orientation of the output mri is not correct when viewed in spm2 / afni (coronal is axial and rotated 90degrees, sagittal is coronal also rotated and axial is sagittal also rotated). I have checked and it seems to display correctly in sourceplot (in that it matches the images shown in the tutorial documentation for beamforming). I am selecting cfg.coordinates = 'cfg' and cfg.filetype = spm in volumewrite and leaving the rest to the defaults. Could there be an orientation error coming in from somewhere and how can I fix it ? Also on a related point, i also tried cfg.filetype = 'analyze' and got quite a different output when viewed in spm. The slices seemed to have been rotated in some way in addition to errors in the orientation. Any advice would be appreciated, Marie ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 marie at PSY.GLA.AC.UK Fri Sep 14 12:35:13 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Fri, 14 Sep 2007 11:35:13 +0100 Subject: volumewrite, volumenormalize and mri orientations In-Reply-To: <000b01c7f644$720381f0$902dae83@fcdonders.nl> Message-ID: Dear Jan-Mathijs, Thanks for your response. The reason for trying to export the data somewhere else is two-fold. Firstly as you mention to aid localisation to brain regions and secondly as I want to normalise the results of several subjects to a template brain. I've tried both 'analyze' and 'spm' filetype options with quite varying results (see attached pdf, method spm is first). But as you can see neither matches the default spm orientation found in T1.mnc (third). I also had problems using volumenormalise inside fieldtrip and got some very strange results again I think due to a mis-match in orientation between my mri + functional and the T1 template. As I said yesterday, when I use sourceplot the 3 slices seem to match the fieldtrip norm (as depicted in the beamformer tutorial), but checking the .anatomy field of my sourinterpolated data has x running from right to left, y from front to back and z from top to bottom which does not match the ctf system co-ordinates. I am not doing anything to the mri file except loading it in during sourceinterpolate and I am pretty sure it was created correctly in MRIViewer. If you have any further suggestions it would be great, Thanks, Marie P.s. Implementing the brain region matching into sourceplot would be really handy, i tried it out with an older version of the soureplot code but it failed in reading the afni TTaltas file. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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: Various_Vol_write.pdf Type: application/pdf Size: 97396 bytes Desc: not available URL: -------------- next part -------------- On 13 Sep 2007, at 21:27, Jan Mathijs Schoffelen wrote: > Dear Marie, > > Handling of volume-data is a tricky business, and in particular when > different coordinate systems are used. As far as I can see, I'd > advice you > to use the following configuration, although I am not used to using > the > volumewrite function (because who would want to visualize the data > otherwise > than using sourceplot?). > cfg.coordinates = 'ctf' (true?): this means that the x-axis runs from > back-to-front, the y-axis from right-to-left, and the z-axis from > bottom-to-top. > On the other hand, an 'spm' coordinate system has it x-axis running > from > left to right, and the y-axis from back-to-front. This means that > at least > the first two dimensions of the data-matrix should be swapped, in > combination with a subsequent affine-transformation (I suspect some > info > about transformation-matrices in on the fieldtrip website). > This is done when you specify cfg.filetype = 'analyze' instead of > 'spm' > (relevant code is on the lines beyond line 282 in volumewrite.m. > Why this > swapping is not applied when specifying cfg.filetype='spm' is a > mystery to > m, but I guess there's a good reason for it. > Summarizing: cfg.coordinates = 'ctf', and cfg.filetype = 'analyze' > might > help. On the other hand you could stick to sourceplot, which I > guess is > lacking some functionality, and which is the reason for you to > convert it > back to analyze (does it by any chance has to do with matching > voxels with > brain regions ;-)?). Let's implement this soon then. > > Yours, > > Jan-Mathijs > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] > On Behalf > Of Marie Smith > Sent: Thursday, September 13, 2007 7:23 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] volumewrite > > Hi, > > I am trying to output the results of sourceinterpolate to analyze > format to read in afni / spm2. The volumewrite function does seem to > do this but the orientation of the output mri is not correct when > viewed in spm2 / afni (coronal is axial and rotated 90degrees, > sagittal is coronal also rotated and axial is sagittal also rotated). > I have checked and it seems to display correctly in sourceplot (in > that it matches the images shown in the tutorial documentation for > beamforming). > > I am selecting cfg.coordinates = 'cfg' and cfg.filetype = spm in > volumewrite and leaving the rest to the defaults. > Could there be an orientation error coming in from somewhere and how > can I fix it ? > > Also on a related point, i also tried cfg.filetype = 'analyze' and > got quite a different output when viewed in spm. The slices seemed to > have been rotated in some way in addition to errors in the > orientation. > > Any advice would be appreciated, > > Marie > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the > FieldTrip toolbox, to share experiences 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 tomh at KURAGE.NIMH.NIH.GOV Fri Sep 14 19:51:47 2007 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Fri, 14 Sep 2007 13:51:47 -0400 Subject: volumewrite, volumenormalize and mri orientations In-Reply-To: Message-ID: On Fri, 2007-09-14 at 11:35 +0100, Marie Smith wrote: > Dear Jan-Mathijs, > > Thanks for your response. The reason for trying to export the data > somewhere else is two-fold. Firstly as you mention to aid > localisation to brain regions and secondly as I want to normalise the > results of several subjects to a template brain. > One way to do that is to use AFNI. AFNI is free, and you can import matlab volumes. http://afni.nimh.nih.gov/afni/ http://afni.nimh.nih.gov/afni/matlab/ AFNI can warp brains to Talairach space (now automated!) and match to a template, do stats, etc. I'm attaching a thing that writes a source volume from Fieldtrip out as an AFNI BRIK using the matlab tools found on the links above. Dr. Tom -- For in one's heart one loves only one's child and one's work; and where there is great love to oneself, then is it the sign of pregnancy: so have I found it. Thus spoke Zarathustra. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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: writesourcebrik.m Type: text/x-objcsrc Size: 1238 bytes Desc: not available URL: From Jan.Schoffelen at FCDONDERS.RU.NL Mon Sep 17 14:19:56 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 17 Sep 2007 14:19:56 +0200 Subject: volumewrite, volumenormalize and mri orientations In-Reply-To: Message-ID: Dear Marie, I hope that Tom's comments have been helpful. On the other hand, you mention that you have problems with volumenormalise, and since the normalization is one of your goals (and a prerequisite for labeling the cortical areas) I think it would be nice to debug your problem and enable you to stay within fieldtrip. > I've tried both 'analyze' and 'spm' filetype options with quite >varying results (see attached pdf, method spm is first). But as you >can see neither matches the default spm orientation found in T1.mnc >(third). Regarding the results you sent along, it makes a big difference whether the visualization tool just stupidly plots the block of data on the screen, or takes the coordinate system into account. The coordinate system is defined by an affine transformation matrix, and tells you how to toggle between voxel-coordinates and head-coordinates. An original analyze-file does not have an affine matrix attached, so any visualization tool will stupidly plot the block of data on the screen. Spm-based analyze files have the matrix hidden somewhere in the header. Anyway, in order to be able to compare the different outputs, it is crucial that the volumes are defined in the same coordinate-system, thus being spm, rather than ctf based (because this will prohibit comparison with the template). The plotting tool you used apparently takes the affine-matrix into account (if present, so the second one is just the dumb plotting of the block of data), but in addition assumes the analyze xyz-convention which I mentioned last time. Since the ctf affine matrix allows you (or the plotting software) to interpret the voxels in terms of head coordinates according to ctf's convention, this gives you the volume to be rotated by 90 degrees along the z-axis. >I also had problems using volumenormalise inside fieldtrip and got >some very strange results again I think due to a mis-match in >orientation between my mri + functional and the T1 template. As I >said yesterday, when I use sourceplot the 3 slices seem to match the >fieldtrip norm (as depicted in the beamformer tutorial), but checking >the .anatomy field of my sourinterpolated data has x running from >right to left, y from front to back and z from top to bottom which >does not match the ctf system co-ordinates. I am not doing anything >to the mri file except loading it in during sourceinterpolate and I >am pretty sure it was created correctly in MRIViewer. Importantly, there is a difference between the 'x', 'y' and 'z' axes in the sourceplots, since this function 'stupidly' plot the block of data, and is thus voxel-coordinate based, rather than head-coordinate based. So if the anatomies look like those in the fieldtrip tutorial I would be curious to see where your normalization fails. Did you try volumenormalise with cfg.nonlinear = 'no'? This will cause the normalisation to be only a linear one, and makes it run faster, and works typically good enough. Yours, Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 tillmann at MPIH-FRANKFURT.MPG.DE Mon Sep 17 15:49:21 2007 From: tillmann at MPIH-FRANKFURT.MPG.DE (Christine Tillmann) Date: Mon, 17 Sep 2007 15:49:21 +0200 Subject: beamforming & ctf mri files Message-ID: Hey all, I got a question regarding beamforming, specifically reading mri-files. I use ctf_mri files, version 4.1, but it seems that this filetype is not recognized by the read_fcdc_mri/filetype functions. I already tried changing the version number that is required by filetype_check_header. Does anyone know which approach to use best when doing beamforming with ctf mri files? Thanks, Christine ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 tillmann at MPIH-FRANKFURT.MPG.DE Tue Sep 18 17:03:59 2007 From: tillmann at MPIH-FRANKFURT.MPG.DE (Christine Tillmann) Date: Tue, 18 Sep 2007 17:03:59 +0200 Subject: Makefile for Linux 64 Message-ID: Hi, we are trying to get the fieldtrip beamforming on our linux 64 bit systems going. As we understand it, there is currently no way around using spm2. Spm2's mex files however are not compiled for linux 64 bit and the makefile that's available on the web suffers from the tab/space delimiter problem. Does anyone have a makefile for spm2 that works on linux 64 bit? Or, else is there a way around spm2? E.g. by using the output of mriviewer and the localspheres command directly? Or by beamforming in CTF and feeding its output to sourcestatistics? And one last thing: does anyone use the mri files from trhe CTF-MRIviewer that came with version 5.4.0 yet? Thanks, Christine ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 andrew.smart at NYU.EDU Tue Sep 18 22:54:47 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Tue, 18 Sep 2007 22:54:47 +0200 Subject: NuAmps 40 Channel Quik-Cap Message-ID: Does anyone happen to have a layout.lay file for a Neuroscan NuAmps 40 Channel Quik-Cap? Thanks, andy ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 rsalazar at NERVANA.MONTANA.EDU Thu Sep 20 17:56:19 2007 From: rsalazar at NERVANA.MONTANA.EDU (Rodrigo F. Salazar) Date: Thu, 20 Sep 2007 09:56:19 -0600 Subject: clusterrandanalysis input format Message-ID: Hi, I am new to fieldtrip and I am working with intracortical data. I have never used any function of fieldtrip and I would like to use clusterrandanalysis.m using my own data format. I cannot find a clear description of the input needed for that function. Can someone quickly describe the input format or even send me an example of input data? Thanks, Rodrigo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 p.cornelissen at PSYCH.YORK.AC.UK Thu Sep 20 18:14:21 2007 From: p.cornelissen at PSYCH.YORK.AC.UK (Piers Cornelissen) Date: Thu, 20 Sep 2007 18:14:21 +0200 Subject: Extracting data from singleplot TFR Message-ID: Dear all, I would like to get access to the values produced by singleplotTFR that go into the contour plots. Normally, I understand that a sequence like this: h = plot(y,x) hgsave(h,'plot_fig.fig') a = load('plot_fig.fig','-mat') should allow one to access the datastructure in a plot. However, when I tried hgsave with singleplotTFR I got the following error message: ??? Error using ==> hgsave Invalid handle Please can you advise how I get to the data. Thanks Piers 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. From maris at NICI.RU.NL Thu Sep 20 21:16:49 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 20 Sep 2007 21:16:49 +0200 Subject: clusterrandanalysis input format In-Reply-To: Message-ID: Hi Rodrigo, I am new to fieldtrip and I am working with intracortical data. I have never used any function of fieldtrip and I would like to use clusterrandanalysis.m using my own data format. I cannot find a clear description of the input needed for that function. Can someone quickly describe the input format or even send me an example of input data? I'm afraid that this is not possible. You first have to run preprocessing.m on your raw data (as produced by your acquisition system) and then timelockanalysis.m or freqanalysis.m (depending on whether you want to test evoked responses or induced oscillatory activity). Clusterrandanalysis is the last step. (For an analysis over subjects, you also have to run timelockgrandaverage.m or freqgrandaverage.m.) My advice is to only use Fieldtrip if you want to invest some time in it. The reward is an extremely versatile set of data analysis tools. Have look at our tutorials. Good luck, Eric Maris Thanks, Rodrigo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list 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 vvw at CALTECH.EDU Fri Sep 21 03:06:18 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Thu, 20 Sep 2007 18:06:18 -0700 Subject: layout and topoplotTFR Message-ID: Hi all anyone could help me out on this? I have tripled-check all structure that may contain the labels and other parameters related to the layout of the channels and they are all (seemingly?) identical (same # of channels, same labels, etc..) including stat.cfg.version.id... Yet, when it comes to plotting using topoplotTFR (which I have used without problems in the past for very similar to identical set of data!) I get the following: reverting to 151 channel CTF default ??? Error using ==> topoplotER at 303 labels in data and labels in layout do not match Error in ==> topoplotTFR at 85 topoplotER(cfg, varargin{:}); Now, these are EEG (BESA) data so CTF is obviously not appropriate :) What am I missing? Thanks in advance! Virginie Virginie van Wassenhove, PhD ::::::::::::::::::::::::::::::::::::::::::::::::: Caltech - Division of Biology 1200 E. California Blvd M/C 139-74 Pasadena CA 91125 USA ::::::::::::::::::::::::::::::::::::::::::::::::: vvw at caltech.edu Virginie.van.Wassenhove at gmail.com W: 626.395.8959 http://www.its.caltech.edu/~vvw ::::::::::::::::::::::::::::::::::::::::::::::::: ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 c.hesse at FCDONDERS.RU.NL Fri Sep 21 09:03:38 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 21 Sep 2007 09:03:38 +0200 Subject: layout and topoplotTFR In-Reply-To: <20070921010618.A26A513B67@wood-ox.its.caltech.edu> Message-ID: Hi Virginie, are you using an appropriate layout file to generate the layout? Christian On 21 Sep 2007, at 03:06, Virginie van Wassenhove wrote: > Hi all > > anyone could help me out on this? > > I have tripled-check all structure that may contain the labels and > other parameters related to the layout of the channels and they are > all (seemingly?) identical (same # of channels, same labels, etc..) > including stat.cfg.version.id... > Yet, when it comes to plotting using topoplotTFR (which I have used > without problems in the past for very similar to identical set of > data!) I get the following: > > reverting to 151 channel CTF default > ??? Error using ==> topoplotER at 303 > labels in data and labels in layout do not match > Error in ==> topoplotTFR at 85 > topoplotER(cfg, varargin{:}); > > > Now, these are EEG (BESA) data so CTF is obviously not appropriate :) > What am I missing? > > Thanks in advance! > Virginie > > > > Virginie van Wassenhove, PhD > ::::::::::::::::::::::::::::::::::::::::::::::::: > Caltech - Division of Biology > 1200 E. California Blvd M/C 139-74 > Pasadena CA 91125 USA > ::::::::::::::::::::::::::::::::::::::::::::::::: > vvw at caltech.edu > Virginie.van.Wassenhove at gmail.com > W: 626.395.8959 > http://www.its.caltech.edu/~vvw > ::::::::::::::::::::::::::::::::::::::::::::::::: > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences 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. > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri Sep 21 10:03:46 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 21 Sep 2007 10:03:46 +0200 Subject: Extracting data from singleplot TFR In-Reply-To: Message-ID: Dear Piers singleplotTFR uses imagesc to do the plotting. Before that it selects the appropriate 2D (time-frequency) tile from the data. I'm not familiar with hgsave, but singleplotTFR is not a complicated function, so I'd advise you to look into the code and you can probably easily get access to the values by debugging. More info on the FieldTrip plotting functions can be found on documentation > tutorial > plotting: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu torial:plotting Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Piers Cornelissen Sent: Thursday, September 20, 2007 6:14 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Extracting data from singleplot TFR Dear all, I would like to get access to the values produced by singleplotTFR that go into the contour plots. Normally, I understand that a sequence like this: h = plot(y,x) hgsave(h,'plot_fig.fig') a = load('plot_fig.fig','-mat') should allow one to access the datastructure in a plot. However, when I tried hgsave with singleplotTFR I got the following error message: ??? Error using ==> hgsave Invalid handle Please can you advise how I get to the data. Thanks Piers 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. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 mahdi.mahmoudzadeh at FCDONDERS.RU.NL Fri Sep 21 13:26:39 2007 From: mahdi.mahmoudzadeh at FCDONDERS.RU.NL (Mahdi Mahmoudzadeh) Date: Fri, 21 Sep 2007 13:26:39 +0200 Subject: tutorial_beamformer Message-ID: Hi, I am working on Fieldtrip tutorial. In the section localizing oscillatory sourse using beamformer techniques(forward model and lead field matrix), when I exceute this code: mri = read_fcdc_mri('Subject01.mri'); cfg = []; cfg.name = 'segment'; cfg.write = 'yes'; cfg.coordinates = 'ctf'; [segmentedmri] = volumesegment(cfg, mri); there is an error : ??? Error using ==> spm_platform>init_platform GLNXA64 not supported architecture for SPM Error in ==> spm_platform at 64 if isempty(SPM_PLATFORM), init_platform, end Error in ==> spm_vol_minc at 80 if ~spm_platform('bigend') & datatype~=2 & datatype~=2+128, datatype = datatype*256; end; Error in ==> spm_vol>subfunc at 99 if isempty(n), V=spm_vol_minc(p); Error in ==> spm_vol>subfunc1 at 62 v = subfunc(P(i,:)); Error in ==> spm_vol>subfunc2 at 51 V = subfunc1(P); Error in ==> spm_vol at 37 V = subfunc2(P); Error in ==> spm_segment>init_sp at 566 SP.VB = spm_vol(flags.priors); Error in ==> spm_segment at 91 SP = init_sp(flags.estimate,VF,PG); Error in ==> volumesegment at 246 spm_segment(Va,cfg.template,flags); How can I solve this problem? Thank you very much in advance. Mahdi ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 rsalazar at NERVANA.MONTANA.EDU Fri Sep 21 19:15:36 2007 From: rsalazar at NERVANA.MONTANA.EDU (Rodrigo F. Salazar) Date: Fri, 21 Sep 2007 11:15:36 -0600 Subject: clusterrandanalysis input format In-Reply-To: Message-ID: Hi Eric, Thanks for your quick reply. I scanned the tutorials and I could not find one that is using clusterrandanalysis.m. I only found a matlab script named: "Apply clusterrandanalysis on TFRs of power that were computed with BESA" but as it is only a script I cannot access the data. So far I was capable to run freqanalysis.m by adapting my data to the format described in the documentation. However, when I run clusterranalaysis.m with the output of freqanalysis.m being 'freq' [clusrand] = clusterrandanalysis(cfg2,freq,freq); % I am using twice 'freq' as a test run with cfg2.statistic: 'indepsamplesZcoh' , I keep on getting errors such as : ??? Reference to non-existent field 'dof'. Error in ==> fieldtrip-lite-20070920/private/clusterrandstatistics at 680 dofc1=reshape(sum(data.dof(replselc1,:,:),1), 1,nfreq,ntime); And if I had the option: cfg.calcdof = 'yes' to get the degree of freedom, I get this other error: ??? Undefined function or variable "cumtapcnt". Error in ==> freqanalysis_mtmfft at 389 if calcdof && ~exist(cumtapcnt) Could you please tell if I am using a wrong configuration variable or if there is a problem in the code? Thanks, Rodrigo. On Sep 20, 2007, at 9:56 AM, Rodrigo F. Salazar wrote: > Hi, > > I am new to fieldtrip and I am working with intracortical data. I > have never used any function of fieldtrip and I would like to use > clusterrandanalysis.m using my own data format. I cannot find a > clear description of the input needed for that function. Can > someone quickly describe the input format or even send me an > example of input data? > > Thanks, > > Rodrigo. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Rodrigo F. Salazar, Ph.D > Post-doctoral Fellow > Lewis Hall 1, > Center for Computational Biology > Montana State University > Bozeman, 59717 MT, USA > Phone: ++1 (406) 994 71 90, > Fax: ++1 (406) 994 74 38 > email: rsalazar at nervana.montana.edu > http://cns.montana.edu/~rsalazar/ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > ---------------------------------- > > The aim of this list 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/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 vvw at CALTECH.EDU Fri Sep 21 22:36:35 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Fri, 21 Sep 2007 13:36:35 -0700 Subject: layout and topoplotTFR In-Reply-To: Message-ID: Hi Christian, yes I was using the correct layout file etc... Just solved the issue now, which was a misspelling of a couple variables that must have created random errors. Next time I watch my keyboard when typing ;-) Thanks /vv At 12:03 AM 9/21/2007, Christian Hesse wrote: >Hi Virginie, > >are you using an appropriate layout file to generate the layout? > >Christian > > > >On 21 Sep 2007, at 03:06, Virginie van Wassenhove wrote: > >>Hi all >> >>anyone could help me out on this? >> >>I have tripled-check all structure that may contain the labels and >>other parameters related to the layout of the channels and they are >>all (seemingly?) identical (same # of channels, same labels, etc..) >>including stat.cfg.version.id... >>Yet, when it comes to plotting using topoplotTFR (which I have used >>without problems in the past for very similar to identical set of >>data!) I get the following: >> >>reverting to 151 channel CTF default >>??? Error using ==> topoplotER at 303 >>labels in data and labels in layout do not match >>Error in ==> topoplotTFR at 85 >>topoplotER(cfg, varargin{:}); >> >> >>Now, these are EEG (BESA) data so CTF is obviously not appropriate :) >>What am I missing? >> >>Thanks in advance! >>Virginie >> >> >> >>Virginie van Wassenhove, PhD >>::::::::::::::::::::::::::::::::::::::::::::::::: >>Caltech - Division of Biology >>1200 E. California Blvd M/C 139-74 >>Pasadena CA 91125 USA >>::::::::::::::::::::::::::::::::::::::::::::::::: >>vvw at caltech.edu >>Virginie.van.Wassenhove at gmail.com >>W: 626.395.8959 >>http://www.its.caltech.edu/~vvw >>::::::::::::::::::::::::::::::::::::::::::::::::: >> >>---------------------------------- >>The aim of this list is to facilitate the discussion between users >>of the FieldTrip toolbox, to share experiences 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. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD ::::::::::::::::::::::::::::::::::::::::::::::::: Caltech - Division of Biology 1200 E. California Blvd M/C 139-74 Pasadena CA 91125 USA ::::::::::::::::::::::::::::::::::::::::::::::::: vvw at caltech.edu Virginie.van.Wassenhove at gmail.com W: 626.395.8959 http://www.its.caltech.edu/~vvw ::::::::::::::::::::::::::::::::::::::::::::::::: ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 sameer at ANDREW.CMU.EDU Fri Sep 21 22:53:41 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 21 Sep 2007 16:53:41 -0400 Subject: clusterrandanalysis input format In-Reply-To: Message-ID: Hi Rodrigo, Maybe this will help. http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:clusterrandanalysis best, sameer On Fri, 21 Sep 2007, Rodrigo F. Salazar wrote: > Hi Eric, > > Thanks for your quick reply. I scanned the tutorials and I could not find one > that is using clusterrandanalysis.m. I only found a matlab script named: > > "Apply clusterrandanalysis on TFRs of power that were computed with BESA" > > but as it is only a script I cannot access the data. > > So far I was capable to run freqanalysis.m by adapting my data to the format > described in the documentation. However, when I run clusterranalaysis.m with > the output of freqanalysis.m being 'freq' > > [clusrand] = clusterrandanalysis(cfg2,freq,freq); % I am using twice 'freq' > as a test run with cfg2.statistic: 'indepsamplesZcoh' > > , I keep on getting errors such as : > > ??? Reference to non-existent field 'dof'. > > Error in ==> fieldtrip-lite-20070920/private/clusterrandstatistics at 680 > dofc1=reshape(sum(data.dof(replselc1,:,:),1),1,nfreq,ntime); > > And if I had the option: > > cfg.calcdof = 'yes' > > to get the degree of freedom, I get this other error: > > ??? Undefined function or variable "cumtapcnt". > > Error in ==> freqanalysis_mtmfft at 389 > if calcdof && ~exist(cumtapcnt) > > Could you please tell if I am using a wrong configuration variable or if > there is a problem in the code? > > Thanks, > > Rodrigo. > > > On Sep 20, 2007, at 9:56 AM, Rodrigo F. Salazar wrote: > >> Hi, >> >> I am new to fieldtrip and I am working with intracortical data. I have >> never used any function of fieldtrip and I would like to use >> clusterrandanalysis.m using my own data format. I cannot find a clear >> description of the input needed for that function. Can someone quickly >> describe the input format or even send me an example of input data? >> >> Thanks, >> >> Rodrigo. >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> Rodrigo F. Salazar, Ph.D >> Post-doctoral Fellow >> Lewis Hall 1, >> Center for Computational Biology >> Montana State University >> Bozeman, 59717 MT, USA >> Phone: ++1 (406) 994 71 90, >> Fax: ++1 (406) 994 74 38 >> email: rsalazar at nervana.montana.edu >> http://cns.montana.edu/~rsalazar/ >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> >> >> >> >> >> ---------------------------------- >> >> The aim of this list 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/ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Rodrigo F. Salazar, Ph.D > Post-doctoral Fellow > Lewis Hall 1, > Center for Computational Biology > Montana State University > Bozeman, 59717 MT, USA > Phone: ++1 (406) 994 71 90, > Fax: ++1 (406) 994 74 38 > email: rsalazar at nervana.montana.edu > http://cns.montana.edu/~rsalazar/ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences 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 c.hesse at FCDONDERS.RU.NL Sat Sep 22 10:46:43 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Sat, 22 Sep 2007 10:46:43 +0200 Subject: layout and topoplotTFR In-Reply-To: <20070921203635.5D799135E0@wood-ox.its.caltech.edu> Message-ID: Glad it's sorted :-) Christian On 21 Sep 2007, at 22:36, Virginie van Wassenhove wrote: > Hi Christian, > yes I was using the correct layout file etc... Just solved the > issue now, which was a misspelling of a couple variables that must > have created random errors. Next time I watch my keyboard when > typing ;-) > Thanks /vv > > At 12:03 AM 9/21/2007, Christian Hesse wrote: >> Hi Virginie, >> >> are you using an appropriate layout file to generate the layout? >> >> Christian >> >> >> >> On 21 Sep 2007, at 03:06, Virginie van Wassenhove wrote: >> >>> Hi all >>> >>> anyone could help me out on this? >>> >>> I have tripled-check all structure that may contain the labels >>> and other parameters related to the layout of the channels and >>> they are all (seemingly?) identical (same # of channels, same >>> labels, etc..) including stat.cfg.version.id... >>> Yet, when it comes to plotting using topoplotTFR (which I have >>> used without problems in the past for very similar to identical >>> set of data!) I get the following: >>> >>> reverting to 151 channel CTF default >>> ??? Error using ==> topoplotER at 303 >>> labels in data and labels in layout do not match >>> Error in ==> topoplotTFR at 85 >>> topoplotER(cfg, varargin{:}); >>> >>> >>> Now, these are EEG (BESA) data so CTF is obviously not >>> appropriate :) >>> What am I missing? >>> >>> Thanks in advance! >>> Virginie >>> >>> >>> >>> Virginie van Wassenhove, PhD >>> ::::::::::::::::::::::::::::::::::::::::::::::::: >>> Caltech - Division of Biology >>> 1200 E. California Blvd M/C 139-74 >>> Pasadena CA 91125 USA >>> ::::::::::::::::::::::::::::::::::::::::::::::::: >>> vvw at caltech.edu >>> Virginie.van.Wassenhove at gm >>> ail.com >>> W: 626.395.8959 >>> http://www.its.caltech.edu/~vvw >>> ::::::::::::::::::::::::::::::::::::::::::::::::: >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between >>> users of the FieldTrip toolbox, to share experiences and to >>> discuss new ideas for MEG and EEG analysis. See also >> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>> listserv.surfnet.nl/archives/fieldtrip.html and >> fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ > > Virginie van Wassenhove, PhD > ::::::::::::::::::::::::::::::::::::::::::::::::: > Caltech - Division of Biology > 1200 E. California Blvd M/C 139-74 > Pasadena CA 91125 USA > ::::::::::::::::::::::::::::::::::::::::::::::::: > vvw at caltech.edu > Virginie.van.Wassenhove at gmail.com > W: 626.395.8959 > http://www.its.caltech.edu/~vvw > ::::::::::::::::::::::::::::::::::::::::::::::::: > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences 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. > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maris at NICI.RU.NL Sun Sep 23 16:31:20 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Sun, 23 Sep 2007 16:31:20 +0200 Subject: clusterrandanalysis input format In-Reply-To: Message-ID: Dear Rodrigo Salazar and Sameer Walawalkar, You are both involved in similar analyses, and therefore I address you both. 1. There was a bug in the latest version of freqanalysis_mtmfft, which caused the error message in Rodrigo's analysis. Sameer used an older version of freqanalysis_mtmfft, in which this bug was not yet present. I have corrected the bug and within a couple of days you can download the new m-file from the FT homepage. 2. There were a few bugs in the private function clusterrandstatistics.m related to the postprocessing of the results of a onesided statistical test. I have corrected these bugs. I now obtain identical p-values for the elements of posclusters in (1) a twosided analysis with cfg.alphathresh=0.05 and (2) a onesided analysis (cfg.onetwo=onesided_1<2) with cfg.alphathresh=0.025, as it should be. Similarly, I now obtain identical p-values for the elements of negclusters in (1) a twosided analysis with cfg.alphathresh=0.05 and (2) a onesided analysis (cfg.onetwo=onesided_2<1) with cfg.alphathresh=0.025, again as it should be. 3. Sameer has selected channel combinations by specifying cfg.channelcmb={refchan 'MEG'}. This only gives you the channel pairs in which your reference channel is in the first position. As a result, you will not select the channel pairs in which the reference channel is in the second position. I must admit that I was not aware of this problem. I advise you to use the labelcmb-field in the output of freqanalysis. From this field, you can easily select those channel pairs in which the reference channel is in either the first or the second position, and pass this selection via the cfg.channelcmb-field. Good luck, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience : www.ru.nl/master/cns/ _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Rodrigo F. Salazar Sent: Friday, September 21, 2007 7:16 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandanalysis input format Hi Eric, Thanks for your quick reply. I scanned the tutorials and I could not find one that is using clusterrandanalysis.m. I only found a matlab script named: "Apply clusterrandanalysis on TFRs of power that were computed with BESA" but as it is only a script I cannot access the data. So far I was capable to run freqanalysis.m by adapting my data to the format described in the documentation. However, when I run clusterranalaysis.m with the output of freqanalysis.m being 'freq' [clusrand] = clusterrandanalysis(cfg2,freq,freq); % I am using twice 'freq' as a test run with cfg2.statistic: 'indepsamplesZcoh' , I keep on getting errors such as : ??? Reference to non-existent field 'dof'. Error in ==> fieldtrip-lite-20070920/private/clusterrandstatistics at 680 dofc1=reshape(sum(data.dof(replselc1,:,:),1),1,nfreq,ntime); And if I had the option: cfg.calcdof = 'yes' to get the degree of freedom, I get this other error: ??? Undefined function or variable "cumtapcnt". Error in ==> freqanalysis_mtmfft at 389 if calcdof && ~exist(cumtapcnt) Could you please tell if I am using a wrong configuration variable or if there is a problem in the code? Thanks, Rodrigo. On Sep 20, 2007, at 9:56 AM, Rodrigo F. Salazar wrote: Hi, I am new to fieldtrip and I am working with intracortical data. I have never used any function of fieldtrip and I would like to use clusterrandanalysis.m using my own data format. I cannot find a clear description of the input needed for that function. Can someone quickly describe the input format or even send me an example of input data? Thanks, Rodrigo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list 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/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list 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 wibral at MPIH-FRANKFURT.MPG.DE Mon Sep 24 09:51:04 2007 From: wibral at MPIH-FRANKFURT.MPG.DE (Michael Wibral) Date: Mon, 24 Sep 2007 09:51:04 +0200 Subject: No subject Message-ID: Hi Mahdi, the error message means that you are trying to use spm2 (via fieldtrip) on a 64bit linux system. The mex functions in spm2 are not supported on this platform, meaning you have to recompile them. Here is a link on how to do this, if you are familiar with compiling c-code: http://en.wikibooks.org/wiki/SPM/Installation_on_64bit_Linux beware that the Makefile and the platform-file listed on that page can not be simply copied and pasted as several staements in a make file have to start with a tab (the lines that are indendented to the right, these are actually called 'rules'). If you copy and paste tab get converted to multiple spaces, which doesn't work then. Maybe you can ask John Ashburner acopy of their current makefile. As a workaround, run that part of the tutorial on a 32bit (windows or linux) machine. Good luck and let me know if it works, Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Mon Sep 24 20:39:14 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 24 Sep 2007 14:39:14 -0400 Subject: clusterrandanalysis input format In-Reply-To: <043b01c7fdee$691d7350$bb2dae83@fcdonders.nl> Message-ID: Dear Eric, Following your suggestion I used labelcmb field from the output of freqanalysis to choose combinations with the refchannel in both first and second position. cfg.channelcmb was a 305x2 cell array. Yet, after clusterandanalysis, posclusterslabelmat: [205x13 double] negclusterslabelmat: [205x13 double] (and not with dimensions [306xnumber of freqs]). It reflects the fact (I think) that the first 205 combinations in cfg.channelcmb have the refchannel in the first position and the rest of the 100 combinations have it in the second position. This size of posclusterslabelmat and negclusterslabelmat (205x13) is what I get from using cfg.channelcmb = {refchannel MEG} So I am not sure your suggestion is the solution. (Also, from your email, I dont think this requires a newer corrected version of clusterandanalysis.m). Best, sameer On Sun, 23 Sep 2007, Eric Maris wrote: > Dear Rodrigo Salazar and Sameer Walawalkar, > > > > > > You are both involved in similar analyses, and therefore I address you both. > > > > 1. There was a bug in the latest version of freqanalysis_mtmfft, which > caused the error message in Rodrigo's analysis. Sameer used an older version > of freqanalysis_mtmfft, in which this bug was not yet present. I have > corrected the bug and within a couple of days you can download the new > m-file from the FT homepage. > 2. There were a few bugs in the private function > clusterrandstatistics.m related to the postprocessing of the results of a > onesided statistical test. I have corrected these bugs. I now obtain > identical p-values for the elements of posclusters in (1) a twosided > analysis with cfg.alphathresh=0.05 and (2) a onesided analysis > (cfg.onetwo=onesided_1<2) with cfg.alphathresh=0.025, as it should be. > Similarly, I now obtain identical p-values for the elements of negclusters > in (1) a twosided analysis with cfg.alphathresh=0.05 and (2) a onesided > analysis (cfg.onetwo=onesided_2<1) with cfg.alphathresh=0.025, again as it > should be. > 3. Sameer has selected channel combinations by specifying > cfg.channelcmb={refchan 'MEG'}. This only gives you the channel pairs in > which your reference channel is in the first position. As a result, you will > not select the channel pairs in which the reference channel is in the second > position. I must admit that I was not aware of this problem. I advise you to > use the labelcmb-field in the output of freqanalysis. From this field, you > can easily select those channel pairs in which the reference channel is in > either the first or the second position, and pass this selection via the > cfg.channelcmb-field. > > > > > > Good luck, > > > > Eric Maris > > > > dr. Eric Maris > > NICI/Biological Psychology and > > F.C. Donders Center for Cognitive NeuroImaging > > University of Nijmegen > > P.O. Box 9104 > > 6500 HE Nijmegen > > The Netherlands > > T:+31 24 3612651 (NICI) > > T:+31 24 3610754 (FCDC) > > F:+31 24 3616066 (NICI) > > E: maris at nici.ru.nl > > MSc Cognitive Neuroscience : > www.ru.nl/master/cns/ > > > > > > > > > > _____ > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Rodrigo F. Salazar > Sent: Friday, September 21, 2007 7:16 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] clusterrandanalysis input format > > > > Hi Eric, > > > > Thanks for your quick reply. I scanned the tutorials and I could not find > one that is using clusterrandanalysis.m. I only found a matlab script named: > > > > "Apply clusterrandanalysis on TFRs of power that were computed with BESA" > > > > but as it is only a script I cannot access the data. > > > > So far I was capable to run freqanalysis.m by adapting my data to the format > described in the documentation. However, when I run clusterranalaysis.m with > the output of freqanalysis.m being 'freq' > > > > [clusrand] = clusterrandanalysis(cfg2,freq,freq); % I am using twice 'freq' > as a test run with cfg2.statistic: 'indepsamplesZcoh' > > > > , I keep on getting errors such as : > > > > ??? Reference to non-existent field 'dof'. > > > > Error in ==> fieldtrip-lite-20070920/private/clusterrandstatistics at 680 > > dofc1=reshape(sum(data.dof(replselc1,:,:),1),1,nfreq,ntime); > > > > And if I had the option: > > > > cfg.calcdof = 'yes' > > > > to get the degree of freedom, I get this other error: > > > > ??? Undefined function or variable "cumtapcnt". > > > > Error in ==> freqanalysis_mtmfft at 389 > > if calcdof && ~exist(cumtapcnt) > > > > Could you please tell if I am using a wrong configuration variable or if > there is a problem in the code? > > > > Thanks, > > > > Rodrigo. > > > > > > On Sep 20, 2007, at 9:56 AM, Rodrigo F. Salazar wrote: > > > > > > Hi, > > > > I am new to fieldtrip and I am working with intracortical data. I have never > used any function of fieldtrip and I would like to use clusterrandanalysis.m > using my own data format. I cannot find a clear description of the input > needed for that function. Can someone quickly describe the input format or > even send me an example of input data? > > > > Thanks, > > > > Rodrigo. > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Rodrigo F. Salazar, Ph.D > > Post-doctoral Fellow > > Lewis Hall 1, > > Center for Computational Biology > > Montana State University > > Bozeman, 59717 MT, USA > > Phone: ++1 (406) 994 71 90, > > Fax: ++1 (406) 994 74 38 > > email: rsalazar at nervana.montana.edu > > http://cns.montana.edu/~rsalazar/ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > > > > > > > > > > ---------------------------------- > > The aim of this list 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/ > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Rodrigo F. Salazar, Ph.D > > Post-doctoral Fellow > > Lewis Hall 1, > > Center for Computational Biology > > Montana State University > > Bozeman, 59717 MT, USA > > Phone: ++1 (406) 994 71 90, > > Fax: ++1 (406) 994 74 38 > > email: rsalazar at nervana.montana.edu > > http://cns.montana.edu/~rsalazar/ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > > > > > > > > > > ---------------------------------- > > The aim of this list 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. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 andrew.smart at NYU.EDU Mon Sep 24 23:45:16 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Mon, 24 Sep 2007 23:45:16 +0200 Subject: permutation test for more than 2 conditions Message-ID: Hi, I would like to test for a main effect using the cluster-based permutation test (a one-way ANOVA?) I have set up the design matrix as follows: subj=16; design=zeros(2,3*subj); for i=1:subj design(1,i)=i; end for i=1:subj design(1,subj+i)=i; end for i=1:subj design(1,subj*2+i)=i; end design(2,1:subj)=1; design(2,subj+1:2*subj)=2; design(2,subj*2+1:3*subj)=3; cfg.design = design; cfg.uvar=1; cfg.ivar=2; and the cfg has cfg.statistic = 'depsamplesF'; cfg.tail=1; cfg.alpha = 0.05; cfg.numrandomization = 500; The following error comes up in statfun_depsamplesF: Undefined function or method 'finv' for input arguments of type 'double'. from these lines: if cfg.tail==1 s.critval = ((nunits-1).*ncontrasts./(nunits-ncontrasts)).*finv(1-cfg.alpha,s.dfnum,s.dfdenom); end; And then it crashes because it cannot determine the parametric critical value for clustering. What is "finv"? Thank you for any help, andy ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 jgross at UNI-DUESSELDORF.DE Tue Sep 25 12:55:06 2007 From: jgross at UNI-DUESSELDORF.DE (Joachim Gross) Date: Tue, 25 Sep 2007 12:55:06 +0200 Subject: MEG Position in Glasgow Message-ID: UNIVERSITY of GLASGOW DEPARTMENT OF PSYCHOLOGY Centre for Cognitive Neuroimaging (CCNi) POSTDOCTORAL RESEARCH ASSISTANT �22,774 - �25,633 or �25,889 - �31,840 per annum REF: 13696/DPO/A3 A strategic priority of the University is the current creation within the Department of Psychology of a Centre for Cognitive Neuroimaging (CCNi), a major initiative to install an in-house platform of complementary, state-of-the-art brain imaging facilities dedicated to Cognitive Neuroscience research. Equipment will include a 3T fMRI scanner, a MEG system, a TMS system, and several EEG systems – including fMRI compatible systems. Applications are invited for a Postdoctoral Research Assistant to work in the Magnetoencephalography (MEG) group in the newly established CCNi. The successful candidate will receive specialist training from 4D Neuroimaging company and will be responsible for the first-line maintenance of the MEG system. Further responsibilities include the integration and testing of additional stimulation and recording hardware and optimization of analysis procedures. You will have the opportunity to: contribute to the setup and handling of a state of the art MEG system; be involved in data acquisition; play a leading role in research collaborations with 4D Neuroimaging company. You will be qualified, with a PhD, or equivalent, in Electrical Engineering, Neuroinformatics, Physics, Psychology, Neuroscience or a related discipline. Expertise in handling technical equipment and advanced programming skills (preferably with MATLAB) are essential. Experience with MEG/EEG equipment is highly desirable. This post is available from 1 December 2007 and funding is available for 36 months initially. Salary scale will depend on experience (level 6: �22,774 - �25,633 or level 7: �25,889 - �31,840). Informal enquiries may be made to Professor J Gross, (+44 (0) 141 330 3947; or email j.gross at psy.gla.ac.uk. For further details about the post and how to apply: See our website at http://www.psy.gla.ac.uk/jobs.php or contact Clare Alexander, Department of Psychology, University of Glasgow, G12 8QQ (+44 (0) 141 330 5090, email: c.alexander at psy.gla.ac.uk . For an application pack, please see our website at www.gla.ac.uk. Applications comprising applicant information form, cv, covering letter, list of publications and names and contact details of two referees should be sent to: Clare Alexander at the above address. Closing date: 17 October 2007. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 andrew.smart at NYU.EDU Tue Sep 25 21:33:03 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Tue, 25 Sep 2007 15:33:03 -0400 Subject: permutation test for more than 2 conditions In-Reply-To: Message-ID: Hi, I found finv.m in the statistics toolbox and the test seems to work, but any advice is greatly appreciated! thanks andy ----- Original Message ----- From: Andrew Smart Date: Monday, September 24, 2007 5:45 pm Subject: [FIELDTRIP] permutation test for more than 2 conditions To: FIELDTRIP at NIC.SURFNET.NL > Hi, > I would like to test for a main effect using the cluster-based > permutation test (a one-way ANOVA?) > > I have set up the design matrix as follows: > > subj=16; > design=zeros(2,3*subj); > for i=1:subj > design(1,i)=i; > end > for i=1:subj > design(1,subj+i)=i; > end > for i=1:subj > design(1,subj*2+i)=i; > end > design(2,1:subj)=1; > design(2,subj+1:2*subj)=2; > design(2,subj*2+1:3*subj)=3; > > cfg.design = design; > cfg.uvar=1; > cfg.ivar=2; > > > and the cfg has > > cfg.statistic = 'depsamplesF'; > cfg.tail=1; > cfg.alpha = 0.05; > cfg.numrandomization = 500; > > The following error comes up in statfun_depsamplesF: > Undefined function or method 'finv' for input arguments of type 'double'. > from these lines: > if cfg.tail==1 > s.critval = ((nunits-1).*ncontrasts./(nunits-ncontrasts)).*finv(1- cfg.alpha,s.dfnum,s.dfdenom); > end; > > And then it crashes because it cannot determine the parametric > critical value for clustering. What > is "finv"? > > Thank you for any help, > andy > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 rsalazar at NERVANA.MONTANA.EDU Wed Sep 26 00:32:24 2007 From: rsalazar at NERVANA.MONTANA.EDU (Rodrigo F. Salazar) Date: Tue, 25 Sep 2007 16:32:24 -0600 Subject: clusterrandanalysis input format In-Reply-To: Message-ID: Dear Eric and Sameer, Thanks for correcting the bug and about the tutorial on clusterandanalysis. I can now run freqanalysis_mtmfft but when I use the output to run clusterandanalysis, I have one error due to an empty 'stats' variable. I am now using the tutorial data to run clusterandanalysis to avoid problems due my data format. Even though I have noticed that in clusterrandstatistics.m, the variables 'crspctrc1' and 'crspctrc2' (line 678 and 679) are empty. I think that this is produced by a wrong input format. I selected the two first channels of FICpreproc FCpreproc and instead of running timelockanalysis, I ran freqanalysis using cfg = method: 'mtmfft' tapsmofrq: 4 calcdof: 'yes' keeptapers: 'no' keeptrials: 'yes' pad: 0.5000 taper: 'dpss' foilim: [0 100] output: 'powandcsd' channelcmb: {'MLC11' 'MLC12'} channel: {2x1 cell} That gave me: FICfreq = label: {2x1 cell} dimord: 'rpt_chan_freq' freq: [1x51 double] powspctrm: [85x2x51 double] labelcmb: {'MLC11' 'MLC12'} crsspctrm: [85x1x51 double] cumsumcnt: [85x1 double] cumtapcnt: [85x1 double] dof: [85x51 double] grad: [1x1 struct] cfg: [1x1 struct] and FCfreq = label: {2x1 cell} dimord: 'rpt_chan_freq' freq: [1x51 double] powspctrm: [84x2x51 double] labelcmb: {'MLC11' 'MLC12'} crsspctrm: [84x1x51 double] cumsumcnt: [84x1 double] cumtapcnt: [84x1 double] dof: [84x51 double] grad: [1x1 struct] cfg: [1x1 struct] and then I ran clusterandanalysis using cfg2 = statistic: 'indepsamplesZcoh' elec: [1x1 struct] chancmbgeom: 'free' alphathresh: 0.0500 alpha: 0.0500 makeclusters: 'no' As following [clusrand] = clusterrandanalysis(cfg2, FCfreq, FICfreq) And if I use cfg2.makeclusters = 'yes', I get an empty 'clusrand' variable. Do you have an idea where I am misusing the code? Basically I simply would like to test the difference in coherence between the FIC and FC condition for the two first channels. Thanks, Rodrigo. On Sep 23, 2007, at 8:31 AM, Eric Maris wrote: Dear Rodrigo Salazar and Sameer Walawalkar, You are both involved in similar analyses, and therefore I address you both. There was a bug in the latest version of freqanalysis_mtmfft, which caused the error message in Rodrigo’s analysis. Sameer used an older version of freqanalysis_mtmfft, in which this bug was not yet present. I have corrected the bug and within a couple of days you can download the new m-file from the FT homepage. There were a few bugs in the private function clusterrandstatistics.m related to the postprocessing of the results of a onesided statistical test. I have corrected these bugs. I now obtain identical p-values for the elements of posclusters in (1) a twosided analysis with cfg.alphathresh=0.05 and (2) a onesided analysis (cfg.onetwo=onesided_1<2) with cfg.alphathresh=0.025, as it should be. Similarly, I now obtain identical p-values for the elements of negclusters in (1) a twosided analysis with cfg.alphathresh=0.05 and (2) a onesided analysis (cfg.onetwo=onesided_2<1) with cfg.alphathresh=0.025, again as it should be. Sameer has selected channel combinations by specifying cfg.channelcmb= {refchan ‘MEG’}. This only gives you the channel pairs in which your reference channel is in the first position. As a result, you will not select the channel pairs in which the reference channel is in the second position. I must admit that I was not aware of this problem. I advise you to use the labelcmb-field in the output of freqanalysis. From this field, you can easily select those channel pairs in which the reference channel is in either the first or the second position, and pass this selection via the cfg.channelcmb-field. Good luck, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Rodrigo F. Salazar Sent: Friday, September 21, 2007 7:16 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandanalysis input format Hi Eric, Thanks for your quick reply. I scanned the tutorials and I could not find one that is using clusterrandanalysis.m. I only found a matlab script named: "Apply clusterrandanalysis on TFRs of power that were computed with BESA" but as it is only a script I cannot access the data. So far I was capable to run freqanalysis.m by adapting my data to the format described in the documentation. However, when I run clusterranalaysis.m with the output of freqanalysis.m being 'freq' [clusrand] = clusterrandanalysis(cfg2,freq,freq); % I am using twice 'freq' as a test run with cfg2.statistic: 'indepsamplesZcoh' , I keep on getting errors such as : ??? Reference to non-existent field 'dof'. Error in ==> fieldtrip-lite-20070920/private/clusterrandstatistics at 680 dofc1=reshape(sum(data.dof(replselc1,:,:),1),1,nfreq,ntime); And if I had the option: cfg.calcdof = 'yes' to get the degree of freedom, I get this other error: ??? Undefined function or variable "cumtapcnt". Error in ==> freqanalysis_mtmfft at 389 if calcdof && ~exist(cumtapcnt) Could you please tell if I am using a wrong configuration variable or if there is a problem in the code? Thanks, Rodrigo. On Sep 20, 2007, at 9:56 AM, Rodrigo F. Salazar wrote: Hi, I am new to fieldtrip and I am working with intracortical data. I have never used any function of fieldtrip and I would like to use clusterrandanalysis.m using my own data format. I cannot find a clear description of the input needed for that function. Can someone quickly describe the input format or even send me an example of input data? Thanks, Rodrigo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list 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/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On Sep 20, 2007, at 9:56 AM, Rodrigo F. Salazar wrote: > Hi, > > I am new to fieldtrip and I am working with intracortical data. I > have never used any function of fieldtrip and I would like to use > clusterrandanalysis.m using my own data format. I cannot find a > clear description of the input needed for that function. Can > someone quickly describe the input format or even send me an > example of input data? > > Thanks, > > Rodrigo. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Rodrigo F. Salazar, Ph.D > Post-doctoral Fellow > Lewis Hall 1, > Center for Computational Biology > Montana State University > Bozeman, 59717 MT, USA > Phone: ++1 (406) 994 71 90, > Fax: ++1 (406) 994 74 38 > email: rsalazar at nervana.montana.edu > http://cns.montana.edu/~rsalazar/ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > ---------------------------------- > > The aim of this list 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/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 MPIH-FRANKFURT.MPG.DE Wed Sep 26 09:39:47 2007 From: wibral at MPIH-FRANKFURT.MPG.DE (Michael Wibral) Date: Wed, 26 Sep 2007 09:39:47 +0200 Subject: Using SPM Analyze MRIs for beamforming and head model creation Message-ID: Dear all, I have a quick question on how the coregistration works if I use dicom or SPM Analyze MRIs of my subjects for head model creation. The background of my question is that ctf mri's are now version 4.1 and I am not sure what has changed since the last version that fieldtrip used to read properly. When I use ctf's MRIs with included fiducials I can see how fieldtrip is able to align MRI and the grads. How is this done for for SPM MRIs? Transforming to the template (with known fiducial locations??) and then backtransforming the fiducial locations? (Staying in the transformed/normalized space doesn't seem to be corrcet because the transformation is nonlinear and the field-equations do not transform the same way...) 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. From v.litvak at ION.UCL.AC.UK Wed Sep 26 16:52:41 2007 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 26 Sep 2007 15:52:41 +0100 Subject: Small problem with multiplotER In-Reply-To: <07092609394752_2800013E@mpih-frankfurt.mpg.de> Message-ID: Dear all, There is a small problem I found using multiplotER. In general it likes rotating the electrodes by 90 deg CCW which might justify changing the defaults. But even when I specify cfg.rotate=0, it affects the multiplot, but not the topoplots that are generated from it in the interactive mode. Please fix. Vladimir ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 Tue Sep 4 10:30:15 2007 From: j.poort at NIN.KNAW.NL (Jasper Poort) Date: Tue, 4 Sep 2007 10:30:15 +0200 Subject: coherence and phase spectrum Message-ID: Hi all, I have a few questions: first, in order to look at induced power rather than evoked power, one can subtract the power spectrum of the evoked potential (average over trials) from the power spectrum (average of power in single trials). Is this not the same as first subtracting the average over trials from every trial and then doing a single freqanalysis? If not, would it then mean you have to do a procedure like: do 1) freqanalysis on preprocessed data 2) timelockanalysis on preprocessed data, then freqanalysis 3) take (result of 1)-(result of 2)? second, does a similar approach also exist for coherence? For example, in case of presenting a flash to a subject, different sensors will get common input that is time and phase locked, resulting in high coherence values, however for this no coupling between the sensors needs to exist. Is it possible to correct for this to get an "induced" coherence? third, in principle the phase spectrum can give information additional to the power spectrum: in the case of a power spectrum, it can give the latency of the response if one fits a linear function to the phase spectrum. How can this be done in FieldTrip? My first approach would be: cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; % complex spectrum cfg.tapsmofrq = 4; [freq]=freqanalysis(cfg,data) % data is preprocessed data the power spectrum is then: powspctrm=squeeze(mean(freq.fourierspctrm.*conj(freq.fourierspctrm))); the phase spectrum is then simply unwrapping the angle of the complex spectrum and trying to fit a line on this?: phsspctrm = squeeze(mean(unwrap(angle(freq.fourierspctrm)))); Besides practical advice I'd much appreciate references to any standard papers on this procedure. related to this, how could one use the phase of the cross-spectrum to get an idea of the latency of covariance at some frequency? Many thanks, best, Jasper ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 hauck at UKE.DE Tue Sep 4 13:46:58 2007 From: hauck at UKE.DE (Michael Hauck) Date: Tue, 4 Sep 2007 13:46:58 +0200 Subject: freqstatistics Message-ID: Hello there, I found a bug in freqstatistic in version fieldtrip-20070603 when using it with coherence. If you use cfg.parameter = 'cohspctrm' freqstatistic still uses the powspectrm due to line 89 to 93 89 if isfield(cfg, 'parameter') && strcmp(cfg, 'powspctrm') 90 % use the power spectrum, this is the default 91 elseif isfield(cfg, 'parameter') && strcmp(cfg, 'csdspctrm') 92 % use the cross spectrum, this might work as well (but has not been tested) 93 elseif isfield(cfg, 'parameter') && strcmp(cfg, 'cohspctrm') I think that it should be ... && strcmp(cfg.PARAMETER, 'powspctrm') and so on ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 Jan.Schoffelen at FCDONDERS.RU.NL Tue Sep 4 14:11:11 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Tue, 4 Sep 2007 14:11:11 +0200 Subject: freqstatistics In-Reply-To: Message-ID: Dear Michael, I am pretty sure that this bug has been fixed in the newer releases of fieldtrip. Thanks for noticing though. Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Michael Hauck Sent: Tuesday, September 04, 2007 1:47 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] freqstatistics Hello there, I found a bug in freqstatistic in version fieldtrip-20070603 when using it with coherence. If you use cfg.parameter = 'cohspctrm' freqstatistic still uses the powspectrm due to line 89 to 93 89 if isfield(cfg, 'parameter') && strcmp(cfg, 'powspctrm') 90 % use the power spectrum, this is the default 91 elseif isfield(cfg, 'parameter') && strcmp(cfg, 'csdspctrm') 92 % use the cross spectrum, this might work as well (but has not been tested) 93 elseif isfield(cfg, 'parameter') && strcmp(cfg, 'cohspctrm') I think that it should be ... && strcmp(cfg.PARAMETER, 'powspctrm') and so on ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 sameer at ANDREW.CMU.EDU Tue Sep 4 19:13:59 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 4 Sep 2007 13:13:59 -0400 Subject: indicating reference channel in coherence topoplots Message-ID: Hello, How does one get topoplotER to mark the reference channel (say with a cross) when plotting coherence values? Will the same thing work for marking reference channels while plotting results of clusterandanalysis for coherence change? thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Sep 4 19:30:27 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 4 Sep 2007 19:30:27 +0200 Subject: indicating reference channel in coherence topoplots In-Reply-To: Message-ID: Hi Sameer, You can use the cfg.highlight = channelnumber and cfg.hlmarker = '+' (see help topoplot.m for details). As long as you use topoplotER or topoplotTFR (they both call the lower level function topoplot.m that does the actual plotting) it will work. Bests, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Tuesday, September 04, 2007 7:14 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] indicating reference channel in coherence topoplots Hello, How does one get topoplotER to mark the reference channel (say with a cross) when plotting coherence values? Will the same thing work for marking reference channels while plotting results of clusterandanalysis for coherence change? thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 sameer at ANDREW.CMU.EDU Thu Sep 6 23:52:39 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 6 Sep 2007 17:52:39 -0400 Subject: sensor numbers on topoplot Message-ID: Hello, While using topoplot, if one uses cfg.electrodes = 'numbers'; you get a plot with the sensor number written over each of the sensor positions. What do these numbers correspond to? If I look at NM306 layout diagram and locate sensor 2121 (on the midline at the very bottom of the occipital lobe), this corresponds to a sensor number 289 on the topoplot. Yet if I do cfg = []; cfg.layout = 'NM306all.lay'; lay = prepare_layout(cfg) reading layout from file NM306all.lay lay = pos: [308x2 double] width: [308x1 double] height: [308x1 double] label: {308x1 cell} >> lay.label(289) ans = '2533' >> find(strcmp(lay.label,'2121')) ans = 240 Can someone help me understand this? This is necessary to understand how to assign cfg.highlights. Thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 Jan.Schoffelen at FCDONDERS.RU.NL Fri Sep 7 10:08:35 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Fri, 7 Sep 2007 10:08:35 +0200 Subject: sensor numbers on topoplot In-Reply-To: Message-ID: Sameer, I used to have a latin teacher who always told us: reading is half the understanding (but then in latin of course). Since you are probably not so much interested in my latin teacher, I'll point to you where you can find the answer yourself (of course by reading). Many problems often solve themselves when looking into the code, because there is no oomopa loompahs in your computer that randomly assign numbers to electrode positions each time you call topoplotER. However, I know of some obscure operating systems which actually have oompa loompahs inside them, but that's beside the scope of this e-mail. So, let's have a look at topoplot.m which is, as Ingrid already pointed out several times, the low level function which generates topoplot-related figures. If you search the code for 'electrodes' you hit some relevant code from line 597 onwards. for i=1:size(labels,1) text(y(i), x(i), int2str(i) etc..... end Apparently, the number i converted to a string and plotted on the location (x and y represent the coordinates as specified by lay.pos(:,1), and lay.pos(:,2)). The number i runs from 1 to the number of sensors in your layout. But so far I guess you already found out. If I repeat your little procedure my bottom midline occipital sensor is number 240, and not 289. So I cannot reproduce your finding. Did you already look into the text file NM306all.lay, and check the 240th line? Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Thursday, September 06, 2007 11:53 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] sensor numbers on topoplot Hello, While using topoplot, if one uses cfg.electrodes = 'numbers'; you get a plot with the sensor number written over each of the sensor positions. What do these numbers correspond to? If I look at NM306 layout diagram and locate sensor 2121 (on the midline at the very bottom of the occipital lobe), this corresponds to a sensor number 289 on the topoplot. Yet if I do cfg = []; cfg.layout = 'NM306all.lay'; lay = prepare_layout(cfg) reading layout from file NM306all.lay lay = pos: [308x2 double] width: [308x1 double] height: [308x1 double] label: {308x1 cell} >> lay.label(289) ans = '2533' >> find(strcmp(lay.label,'2121')) ans = 240 Can someone help me understand this? This is necessary to understand how to assign cfg.highlights. Thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 andrew.smart at NYU.EDU Fri Sep 7 21:19:26 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Fri, 7 Sep 2007 15:19:26 -0400 Subject: cfg.highlight using topoplot to show samples in sig clusters In-Reply-To: <01d701c7eb09$b8f05660$642dae83@fcdonders.nl> Message-ID: Hi Ingrid, Thank you very much for the help with topoplot, I really appreciate it. The plotting finally did work using very specific time windows for example: m=[0.18:0.02:0.28]; j=[114:4:171]; (although I am a little unsure if this is ok not starting from sample 1, but it worked) The cluster-based permutation test did reveal an M170 effect in our data that was not coming out significant using more traditional statistical tests. I have two more questions if you have time: 1)Is it possible to compare two groups of subjects of different sizes using the permutation test? Ie a clinical group and a control group where the clinical group has say 9 subj and the control group has 10 subj? 2)Is it possible to do an anova or manova test using the cluster-based permutation test? Or for example to test for interaction effects between group*condition without doing a full anova? Would this require a lot of custom coding or can these be specified in cfg.design? Thank you! andy ----- Original Message ----- From: Ingrid Nieuwenhuis Date: Thursday, August 30, 2007 9:29 am Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to show samples in sig clusters To: FIELDTRIP at NIC.SURFNET.NL > Hi Andrew, > > - where does this size come from if my sample rate is 600?: > The size 267x301 means 267 channels x 301 samples. You have 301 samples > because your latency in timelockanalysis was cfg.latency = [0.0 0.5]; > so > that's 301 samples with sample rate 600 > > Plotting the output from the randomization can be quite tricky, > because you > have 301 moments in time where you can have a cluster. In the tutorial > a > trick was used. There they also had 301 time points, but a sample rate > of > 300 -> spanning one second. If you exactly want to know where the clusters > are you would have to plot all the 301 time points. Because that doesn't > make sense they average over 50 millisecond time windows. If for instance > k=10 -> pos_int = mean(pos(:,m(k):m(k+1))')' -> an average is made over > samples 136-151 time is 0.45-0.5s giving the 10th plot in the figure. > Only > those sensors that are part of the cluster for this whole time window > (all > 15 time points) give out a mean of 1 or -1 and are plotted. In the tutorial > data the cluster was present over a long time window in many sensors, > therefore there were many sensors with 1 or -1. > > For your data this doesn't work, but you do have significant clusters. > > > "I can find the elements of pos and neg that = 1 and = -1 > respectively. > elements =1 are spread out between roughly pos(59:168,149:172) and =-1 > > between neg(152:240,242:270)" > > For instance this means that the positive clusters are in channel > 59:168 at > time points 149:172, with a sample rate of 600 this means from 0.248 to > 0.287 seconds. You should adjust the loop in such a way that you put the > settings that they fit your data. So for instance make the time resolution > higher (by adjusting j and m) since you have clusters that are short lived > in time, and to have not to many plots, plot around the time where you > know > your clusters are. > > Hope this solves your stuck-ness, > Good luck again. > Ingrid > > > > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Andrew Smart > Sent: Wednesday, August 29, 2007 8:02 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to show > samples in sig clusters > > Hi Ingrid again, > Inspecting the variables more I find that the output of the > timelockstatistics on > my data gives: > 28 pos clusters and 36 neg clusters (1 significant pos cluster and 1 > sig neg > > cluster) > > and posclusterslabelmat and negclusterslabelmet as 267x301 (where does > this > size come from if my sample rate is 600?) > > then using > pos = stat.posclusterslabelmat==1; > neg = (stat.negclusterslabelmat==1)*(-1); > > pos and neg are obviously 267x301, > and I can find the elements of pos and neg that = 1 and = -1 > respectively. > elements =1 are spread out between roughly pos(59:168,149:172) and =-1 > > between neg(152:240,242:270). > > however, using > > pos_int = mean(pos(:,m(k):m(k+1))')'; > neg_int = mean(neg(:,m(k):m(k+1))')'; > > in the for loop, gives pos_int as 267x1 but all the elements are zeros. > > and in neg_int some elements are values like -0.1667 for example. > > so for the highlight to work do the values in pos_int and neg_int have > to be > > either 1 or -1? > > i have tried various parameters in m and but nothing i have tried > seems to > work. i am stuck! > > thanks! > andy > > > > > ----- Original Message ----- > From: Ingrid Nieuwenhuis > Date: Wednesday, August 29, 2007 5:12 am > Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to > show > samples in sig clusters > To: FIELDTRIP at NIC.SURFNET.NL > > > Hi Andrew, > > > > You can find the option cfg.highlight in the function topoplot.m, this > > function is called by topoplotER (also by topoplotTFR by the way). > It > > should > > contain the channel numbers which you want to highlight. > > > > Why your plot doesn't give any highlighted sensors is hard to say without > > knowing your data (what did you give in to timelockstatistics with which > > cfg). > > - It could be that the time you plot (0:0.05:0.5) does not contain the > > clusters > > - It could be the specification of m [1:15:301], this is exactly > > copied from > > the tutorial, but it is based on the sample frequency of the data used > > there. In the tutorial a second of data is used, cut up in 21 pieces > from > > 0:0.05:1 and that data has a sample frequency of 301 also cut up in > 21 > > pieces 1:15:301. You should adjust m to you own time settings and sample > > frequency. > > - cfg.highlight = find(pos_int==1|neg_int==-1), what is the outcome > of > > this? > > For the highlighting to work it should contain the sensor numbers to > be > > highlighted. If your m is not specified correctly I would guess that > pos_int > > and neg_int are not specified correctly and cfg.highlight turnes up > empty > > and therefore no highlights are plotted. > > > > Hope this give you some ideas to find out what's wrong. > > > > Good luck, > > Ingrid > > > > > > -----Original Message----- > > From: FieldTrip discussion list [ > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the > FieldTrip toolbox, to share experiences 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://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 andrew.smart at NYU.EDU Fri Sep 7 21:22:06 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Fri, 7 Sep 2007 15:22:06 -0400 Subject: problem w/ cfg.highlight using topoplot to show samples in sig clusters In-Reply-To: <01d701c7eb09$b8f05660$642dae83@fcdonders.nl> Message-ID: i meant to write j=[0.18:0.02:0.28]; m=[114:4:171]; i had those switched ----- Original Message ----- From: Ingrid Nieuwenhuis Date: Thursday, August 30, 2007 9:29 am Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to show samples in sig clusters To: FIELDTRIP at NIC.SURFNET.NL > Hi Andrew, > > - where does this size come from if my sample rate is 600?: > The size 267x301 means 267 channels x 301 samples. You have 301 samples > because your latency in timelockanalysis was cfg.latency = [0.0 0.5]; > so > that's 301 samples with sample rate 600 > > Plotting the output from the randomization can be quite tricky, > because you > have 301 moments in time where you can have a cluster. In the tutorial > a > trick was used. There they also had 301 time points, but a sample rate > of > 300 -> spanning one second. If you exactly want to know where the clusters > are you would have to plot all the 301 time points. Because that doesn't > make sense they average over 50 millisecond time windows. If for instance > k=10 -> pos_int = mean(pos(:,m(k):m(k+1))')' -> an average is made over > samples 136-151 time is 0.45-0.5s giving the 10th plot in the figure. > Only > those sensors that are part of the cluster for this whole time window > (all > 15 time points) give out a mean of 1 or -1 and are plotted. In the tutorial > data the cluster was present over a long time window in many sensors, > therefore there were many sensors with 1 or -1. > > For your data this doesn't work, but you do have significant clusters. > > > "I can find the elements of pos and neg that = 1 and = -1 > respectively. > elements =1 are spread out between roughly pos(59:168,149:172) and =-1 > > between neg(152:240,242:270)" > > For instance this means that the positive clusters are in channel > 59:168 at > time points 149:172, with a sample rate of 600 this means from 0.248 to > 0.287 seconds. You should adjust the loop in such a way that you put the > settings that they fit your data. So for instance make the time resolution > higher (by adjusting j and m) since you have clusters that are short lived > in time, and to have not to many plots, plot around the time where you > know > your clusters are. > > Hope this solves your stuck-ness, > Good luck again. > Ingrid > > > > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Andrew Smart > Sent: Wednesday, August 29, 2007 8:02 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to show > samples in sig clusters > > Hi Ingrid again, > Inspecting the variables more I find that the output of the > timelockstatistics on > my data gives: > 28 pos clusters and 36 neg clusters (1 significant pos cluster and 1 > sig neg > > cluster) > > and posclusterslabelmat and negclusterslabelmet as 267x301 (where does > this > size come from if my sample rate is 600?) > > then using > pos = stat.posclusterslabelmat==1; > neg = (stat.negclusterslabelmat==1)*(-1); > > pos and neg are obviously 267x301, > and I can find the elements of pos and neg that = 1 and = -1 > respectively. > elements =1 are spread out between roughly pos(59:168,149:172) and =-1 > > between neg(152:240,242:270). > > however, using > > pos_int = mean(pos(:,m(k):m(k+1))')'; > neg_int = mean(neg(:,m(k):m(k+1))')'; > > in the for loop, gives pos_int as 267x1 but all the elements are zeros. > > and in neg_int some elements are values like -0.1667 for example. > > so for the highlight to work do the values in pos_int and neg_int have > to be > > either 1 or -1? > > i have tried various parameters in m and but nothing i have tried > seems to > work. i am stuck! > > thanks! > andy > > > > > ----- Original Message ----- > From: Ingrid Nieuwenhuis > Date: Wednesday, August 29, 2007 5:12 am > Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to > show > samples in sig clusters > To: FIELDTRIP at NIC.SURFNET.NL > > > Hi Andrew, > > > > You can find the option cfg.highlight in the function topoplot.m, this > > function is called by topoplotER (also by topoplotTFR by the way). > It > > should > > contain the channel numbers which you want to highlight. > > > > Why your plot doesn't give any highlighted sensors is hard to say without > > knowing your data (what did you give in to timelockstatistics with which > > cfg). > > - It could be that the time you plot (0:0.05:0.5) does not contain the > > clusters > > - It could be the specification of m [1:15:301], this is exactly > > copied from > > the tutorial, but it is based on the sample frequency of the data used > > there. In the tutorial a second of data is used, cut up in 21 pieces > from > > 0:0.05:1 and that data has a sample frequency of 301 also cut up in > 21 > > pieces 1:15:301. You should adjust m to you own time settings and sample > > frequency. > > - cfg.highlight = find(pos_int==1|neg_int==-1), what is the outcome > of > > this? > > For the highlighting to work it should contain the sensor numbers to > be > > highlighted. If your m is not specified correctly I would guess that > pos_int > > and neg_int are not specified correctly and cfg.highlight turnes up > empty > > and therefore no highlights are plotted. > > > > Hope this give you some ideas to find out what's wrong. > > > > Good luck, > > Ingrid > > > > > > -----Original Message----- > > From: FieldTrip discussion list [ > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the > FieldTrip toolbox, to share experiences 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://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 Jan.Schoffelen at FCDONDERS.RU.NL Mon Sep 10 14:43:40 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 10 Sep 2007 14:43:40 +0200 Subject: sensor numbers on topoplot Message-ID: Dear Sameer, Let's again have a look at the code together. In topoplotER it states % Draw topoplot: if ~isfield(cfg, 'layout') tmpcfg = cfg; else tmpcfg = rmfield(cfg,'layout'); end topoplot(tmpcfg,chanX,chanY,datavector,chanLabels); (lines 365 onwards) This means the function topoplot is called, and it receives 5 input arguments. Additionally, a potential layout-field in the tmpcfg-structure is removed. This means that the only information topoplot gets regarding the channels, and the data are the ordered vectors chanX, chanY and datavector, and the cell-array chanLabels. When you look a bit back in the code, you'll find out that these variables represent the following things: -chanX = the x-coordinate for the topographical projection -chanY = the y-coordinate for the topographical projection -datavector = the value to be plotted -chanLabels = the name of the corresponding channel. Note that the physical order of the entries within these arrays is not relevant, and as long as you randomly shuffle them all in the same way the resulting topographic representation will not be affected. BUT the actual order in which the channels are ordered does affect the (arbitrary) numbers topoplot connects to these sensors when you specify cfg.electrodes = 'numbers'. As I said in a previous mail, within topoplot there is just a stupid for-loop, which assigns to each electrode a number, using int2str. This procedure is actually blind for the order in which the channel names are specified in the layout-file (and thus the corresponding numbers in the said layout-file), and only reflects the order in which the channels are represented in the data you give as an input to the plotting function. Therefore, it does not make sense to compare the numbers on the topoplot with lay.label, but you should compare them with the label-array in your data. Yours, Jan-Mathijs -----Original Message----- From: Sameer Walawalkar [mailto:sameer at andrew.cmu.edu] Sent: Friday, September 07, 2007 3:46 PM To: Jan Mathijs Schoffelen Subject: Re: [FIELDTRIP] sensor numbers on topoplot Dear Jan-Mathijs, Unfortunately, it seems I was not very clear in my earlier email about my question. The 240th line in NM306all.lay ** is ** 2121, and that is reflected in (as noted in my earlier email) >> find(strcmp(lay.label,'2121')) ans = 240 However the sensor number corresponding to sensor position 2121 on the topoplot generated using topoplot.m ** is not ** 240, it is 289. To clarify my question I have made available a jpeg of the topoplot at issue at the following link http://www.cnbc.cmu.edu/~sameer/Jan_Mathijs/Sensor_Numbers.jpg Please note the sensor number of the bottom midline sensor, it is 289 and not 240 as one would expect from your clarification. 240 is somewhere off to the left temporal area. In fact I picked up the bottom midline as an example. None of the numbers displayed here seem to match up with the line numbers in NM306all.lay. Best, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 Jan.Schoffelen at FCDONDERS.RU.NL Tue Sep 11 14:22:29 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Tue, 11 Sep 2007 14:22:29 +0200 Subject: new implementation of routine to read ctf-data Message-ID: Dear all, As of tomorrow, the release version of fieldtrip will contain a new implementation of read_ctf_meg4, which is the low level function to read ctf-data. The old version did not always correctly handle very big datasets (> 4GB), or even crashed when specific favourable criteria were met. As far as I can see, all works fine (reading in data goes actually faster than before), but please keep your eyes and ears open. Yours, Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 marie at PSY.GLA.AC.UK Thu Sep 13 19:22:43 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Thu, 13 Sep 2007 18:22:43 +0100 Subject: volumewrite Message-ID: Hi, I am trying to output the results of sourceinterpolate to analyze format to read in afni / spm2. The volumewrite function does seem to do this but the orientation of the output mri is not correct when viewed in spm2 / afni (coronal is axial and rotated 90degrees, sagittal is coronal also rotated and axial is sagittal also rotated). I have checked and it seems to display correctly in sourceplot (in that it matches the images shown in the tutorial documentation for beamforming). I am selecting cfg.coordinates = 'cfg' and cfg.filetype = spm in volumewrite and leaving the rest to the defaults. Could there be an orientation error coming in from somewhere and how can I fix it ? Also on a related point, i also tried cfg.filetype = 'analyze' and got quite a different output when viewed in spm. The slices seemed to have been rotated in some way in addition to errors in the orientation. Any advice would be appreciated, Marie ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 Jan.Schoffelen at FCDONDERS.RU.NL Thu Sep 13 22:27:03 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Thu, 13 Sep 2007 22:27:03 +0200 Subject: volumewrite In-Reply-To: Message-ID: Dear Marie, Handling of volume-data is a tricky business, and in particular when different coordinate systems are used. As far as I can see, I'd advice you to use the following configuration, although I am not used to using the volumewrite function (because who would want to visualize the data otherwise than using sourceplot?). cfg.coordinates = 'ctf' (true?): this means that the x-axis runs from back-to-front, the y-axis from right-to-left, and the z-axis from bottom-to-top. On the other hand, an 'spm' coordinate system has it x-axis running from left to right, and the y-axis from back-to-front. This means that at least the first two dimensions of the data-matrix should be swapped, in combination with a subsequent affine-transformation (I suspect some info about transformation-matrices in on the fieldtrip website). This is done when you specify cfg.filetype = 'analyze' instead of 'spm' (relevant code is on the lines beyond line 282 in volumewrite.m. Why this swapping is not applied when specifying cfg.filetype='spm' is a mystery to m, but I guess there's a good reason for it. Summarizing: cfg.coordinates = 'ctf', and cfg.filetype = 'analyze' might help. On the other hand you could stick to sourceplot, which I guess is lacking some functionality, and which is the reason for you to convert it back to analyze (does it by any chance has to do with matching voxels with brain regions ;-)?). Let's implement this soon then. Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Marie Smith Sent: Thursday, September 13, 2007 7:23 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] volumewrite Hi, I am trying to output the results of sourceinterpolate to analyze format to read in afni / spm2. The volumewrite function does seem to do this but the orientation of the output mri is not correct when viewed in spm2 / afni (coronal is axial and rotated 90degrees, sagittal is coronal also rotated and axial is sagittal also rotated). I have checked and it seems to display correctly in sourceplot (in that it matches the images shown in the tutorial documentation for beamforming). I am selecting cfg.coordinates = 'cfg' and cfg.filetype = spm in volumewrite and leaving the rest to the defaults. Could there be an orientation error coming in from somewhere and how can I fix it ? Also on a related point, i also tried cfg.filetype = 'analyze' and got quite a different output when viewed in spm. The slices seemed to have been rotated in some way in addition to errors in the orientation. Any advice would be appreciated, Marie ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 marie at PSY.GLA.AC.UK Fri Sep 14 12:35:13 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Fri, 14 Sep 2007 11:35:13 +0100 Subject: volumewrite, volumenormalize and mri orientations In-Reply-To: <000b01c7f644$720381f0$902dae83@fcdonders.nl> Message-ID: Dear Jan-Mathijs, Thanks for your response. The reason for trying to export the data somewhere else is two-fold. Firstly as you mention to aid localisation to brain regions and secondly as I want to normalise the results of several subjects to a template brain. I've tried both 'analyze' and 'spm' filetype options with quite varying results (see attached pdf, method spm is first). But as you can see neither matches the default spm orientation found in T1.mnc (third). I also had problems using volumenormalise inside fieldtrip and got some very strange results again I think due to a mis-match in orientation between my mri + functional and the T1 template. As I said yesterday, when I use sourceplot the 3 slices seem to match the fieldtrip norm (as depicted in the beamformer tutorial), but checking the .anatomy field of my sourinterpolated data has x running from right to left, y from front to back and z from top to bottom which does not match the ctf system co-ordinates. I am not doing anything to the mri file except loading it in during sourceinterpolate and I am pretty sure it was created correctly in MRIViewer. If you have any further suggestions it would be great, Thanks, Marie P.s. Implementing the brain region matching into sourceplot would be really handy, i tried it out with an older version of the soureplot code but it failed in reading the afni TTaltas file. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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: Various_Vol_write.pdf Type: application/pdf Size: 97396 bytes Desc: not available URL: -------------- next part -------------- On 13 Sep 2007, at 21:27, Jan Mathijs Schoffelen wrote: > Dear Marie, > > Handling of volume-data is a tricky business, and in particular when > different coordinate systems are used. As far as I can see, I'd > advice you > to use the following configuration, although I am not used to using > the > volumewrite function (because who would want to visualize the data > otherwise > than using sourceplot?). > cfg.coordinates = 'ctf' (true?): this means that the x-axis runs from > back-to-front, the y-axis from right-to-left, and the z-axis from > bottom-to-top. > On the other hand, an 'spm' coordinate system has it x-axis running > from > left to right, and the y-axis from back-to-front. This means that > at least > the first two dimensions of the data-matrix should be swapped, in > combination with a subsequent affine-transformation (I suspect some > info > about transformation-matrices in on the fieldtrip website). > This is done when you specify cfg.filetype = 'analyze' instead of > 'spm' > (relevant code is on the lines beyond line 282 in volumewrite.m. > Why this > swapping is not applied when specifying cfg.filetype='spm' is a > mystery to > m, but I guess there's a good reason for it. > Summarizing: cfg.coordinates = 'ctf', and cfg.filetype = 'analyze' > might > help. On the other hand you could stick to sourceplot, which I > guess is > lacking some functionality, and which is the reason for you to > convert it > back to analyze (does it by any chance has to do with matching > voxels with > brain regions ;-)?). Let's implement this soon then. > > Yours, > > Jan-Mathijs > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] > On Behalf > Of Marie Smith > Sent: Thursday, September 13, 2007 7:23 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] volumewrite > > Hi, > > I am trying to output the results of sourceinterpolate to analyze > format to read in afni / spm2. The volumewrite function does seem to > do this but the orientation of the output mri is not correct when > viewed in spm2 / afni (coronal is axial and rotated 90degrees, > sagittal is coronal also rotated and axial is sagittal also rotated). > I have checked and it seems to display correctly in sourceplot (in > that it matches the images shown in the tutorial documentation for > beamforming). > > I am selecting cfg.coordinates = 'cfg' and cfg.filetype = spm in > volumewrite and leaving the rest to the defaults. > Could there be an orientation error coming in from somewhere and how > can I fix it ? > > Also on a related point, i also tried cfg.filetype = 'analyze' and > got quite a different output when viewed in spm. The slices seemed to > have been rotated in some way in addition to errors in the > orientation. > > Any advice would be appreciated, > > Marie > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the > FieldTrip toolbox, to share experiences 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 tomh at KURAGE.NIMH.NIH.GOV Fri Sep 14 19:51:47 2007 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Fri, 14 Sep 2007 13:51:47 -0400 Subject: volumewrite, volumenormalize and mri orientations In-Reply-To: Message-ID: On Fri, 2007-09-14 at 11:35 +0100, Marie Smith wrote: > Dear Jan-Mathijs, > > Thanks for your response. The reason for trying to export the data > somewhere else is two-fold. Firstly as you mention to aid > localisation to brain regions and secondly as I want to normalise the > results of several subjects to a template brain. > One way to do that is to use AFNI. AFNI is free, and you can import matlab volumes. http://afni.nimh.nih.gov/afni/ http://afni.nimh.nih.gov/afni/matlab/ AFNI can warp brains to Talairach space (now automated!) and match to a template, do stats, etc. I'm attaching a thing that writes a source volume from Fieldtrip out as an AFNI BRIK using the matlab tools found on the links above. Dr. Tom -- For in one's heart one loves only one's child and one's work; and where there is great love to oneself, then is it the sign of pregnancy: so have I found it. Thus spoke Zarathustra. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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: writesourcebrik.m Type: text/x-objcsrc Size: 1238 bytes Desc: not available URL: From Jan.Schoffelen at FCDONDERS.RU.NL Mon Sep 17 14:19:56 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 17 Sep 2007 14:19:56 +0200 Subject: volumewrite, volumenormalize and mri orientations In-Reply-To: Message-ID: Dear Marie, I hope that Tom's comments have been helpful. On the other hand, you mention that you have problems with volumenormalise, and since the normalization is one of your goals (and a prerequisite for labeling the cortical areas) I think it would be nice to debug your problem and enable you to stay within fieldtrip. > I've tried both 'analyze' and 'spm' filetype options with quite >varying results (see attached pdf, method spm is first). But as you >can see neither matches the default spm orientation found in T1.mnc >(third). Regarding the results you sent along, it makes a big difference whether the visualization tool just stupidly plots the block of data on the screen, or takes the coordinate system into account. The coordinate system is defined by an affine transformation matrix, and tells you how to toggle between voxel-coordinates and head-coordinates. An original analyze-file does not have an affine matrix attached, so any visualization tool will stupidly plot the block of data on the screen. Spm-based analyze files have the matrix hidden somewhere in the header. Anyway, in order to be able to compare the different outputs, it is crucial that the volumes are defined in the same coordinate-system, thus being spm, rather than ctf based (because this will prohibit comparison with the template). The plotting tool you used apparently takes the affine-matrix into account (if present, so the second one is just the dumb plotting of the block of data), but in addition assumes the analyze xyz-convention which I mentioned last time. Since the ctf affine matrix allows you (or the plotting software) to interpret the voxels in terms of head coordinates according to ctf's convention, this gives you the volume to be rotated by 90 degrees along the z-axis. >I also had problems using volumenormalise inside fieldtrip and got >some very strange results again I think due to a mis-match in >orientation between my mri + functional and the T1 template. As I >said yesterday, when I use sourceplot the 3 slices seem to match the >fieldtrip norm (as depicted in the beamformer tutorial), but checking >the .anatomy field of my sourinterpolated data has x running from >right to left, y from front to back and z from top to bottom which >does not match the ctf system co-ordinates. I am not doing anything >to the mri file except loading it in during sourceinterpolate and I >am pretty sure it was created correctly in MRIViewer. Importantly, there is a difference between the 'x', 'y' and 'z' axes in the sourceplots, since this function 'stupidly' plot the block of data, and is thus voxel-coordinate based, rather than head-coordinate based. So if the anatomies look like those in the fieldtrip tutorial I would be curious to see where your normalization fails. Did you try volumenormalise with cfg.nonlinear = 'no'? This will cause the normalisation to be only a linear one, and makes it run faster, and works typically good enough. Yours, Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 tillmann at MPIH-FRANKFURT.MPG.DE Mon Sep 17 15:49:21 2007 From: tillmann at MPIH-FRANKFURT.MPG.DE (Christine Tillmann) Date: Mon, 17 Sep 2007 15:49:21 +0200 Subject: beamforming & ctf mri files Message-ID: Hey all, I got a question regarding beamforming, specifically reading mri-files. I use ctf_mri files, version 4.1, but it seems that this filetype is not recognized by the read_fcdc_mri/filetype functions. I already tried changing the version number that is required by filetype_check_header. Does anyone know which approach to use best when doing beamforming with ctf mri files? Thanks, Christine ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 tillmann at MPIH-FRANKFURT.MPG.DE Tue Sep 18 17:03:59 2007 From: tillmann at MPIH-FRANKFURT.MPG.DE (Christine Tillmann) Date: Tue, 18 Sep 2007 17:03:59 +0200 Subject: Makefile for Linux 64 Message-ID: Hi, we are trying to get the fieldtrip beamforming on our linux 64 bit systems going. As we understand it, there is currently no way around using spm2. Spm2's mex files however are not compiled for linux 64 bit and the makefile that's available on the web suffers from the tab/space delimiter problem. Does anyone have a makefile for spm2 that works on linux 64 bit? Or, else is there a way around spm2? E.g. by using the output of mriviewer and the localspheres command directly? Or by beamforming in CTF and feeding its output to sourcestatistics? And one last thing: does anyone use the mri files from trhe CTF-MRIviewer that came with version 5.4.0 yet? Thanks, Christine ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 andrew.smart at NYU.EDU Tue Sep 18 22:54:47 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Tue, 18 Sep 2007 22:54:47 +0200 Subject: NuAmps 40 Channel Quik-Cap Message-ID: Does anyone happen to have a layout.lay file for a Neuroscan NuAmps 40 Channel Quik-Cap? Thanks, andy ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 rsalazar at NERVANA.MONTANA.EDU Thu Sep 20 17:56:19 2007 From: rsalazar at NERVANA.MONTANA.EDU (Rodrigo F. Salazar) Date: Thu, 20 Sep 2007 09:56:19 -0600 Subject: clusterrandanalysis input format Message-ID: Hi, I am new to fieldtrip and I am working with intracortical data. I have never used any function of fieldtrip and I would like to use clusterrandanalysis.m using my own data format. I cannot find a clear description of the input needed for that function. Can someone quickly describe the input format or even send me an example of input data? Thanks, Rodrigo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 p.cornelissen at PSYCH.YORK.AC.UK Thu Sep 20 18:14:21 2007 From: p.cornelissen at PSYCH.YORK.AC.UK (Piers Cornelissen) Date: Thu, 20 Sep 2007 18:14:21 +0200 Subject: Extracting data from singleplot TFR Message-ID: Dear all, I would like to get access to the values produced by singleplotTFR that go into the contour plots. Normally, I understand that a sequence like this: h = plot(y,x) hgsave(h,'plot_fig.fig') a = load('plot_fig.fig','-mat') should allow one to access the datastructure in a plot. However, when I tried hgsave with singleplotTFR I got the following error message: ??? Error using ==> hgsave Invalid handle Please can you advise how I get to the data. Thanks Piers 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. From maris at NICI.RU.NL Thu Sep 20 21:16:49 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 20 Sep 2007 21:16:49 +0200 Subject: clusterrandanalysis input format In-Reply-To: Message-ID: Hi Rodrigo, I am new to fieldtrip and I am working with intracortical data. I have never used any function of fieldtrip and I would like to use clusterrandanalysis.m using my own data format. I cannot find a clear description of the input needed for that function. Can someone quickly describe the input format or even send me an example of input data? I'm afraid that this is not possible. You first have to run preprocessing.m on your raw data (as produced by your acquisition system) and then timelockanalysis.m or freqanalysis.m (depending on whether you want to test evoked responses or induced oscillatory activity). Clusterrandanalysis is the last step. (For an analysis over subjects, you also have to run timelockgrandaverage.m or freqgrandaverage.m.) My advice is to only use Fieldtrip if you want to invest some time in it. The reward is an extremely versatile set of data analysis tools. Have look at our tutorials. Good luck, Eric Maris Thanks, Rodrigo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list 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 vvw at CALTECH.EDU Fri Sep 21 03:06:18 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Thu, 20 Sep 2007 18:06:18 -0700 Subject: layout and topoplotTFR Message-ID: Hi all anyone could help me out on this? I have tripled-check all structure that may contain the labels and other parameters related to the layout of the channels and they are all (seemingly?) identical (same # of channels, same labels, etc..) including stat.cfg.version.id... Yet, when it comes to plotting using topoplotTFR (which I have used without problems in the past for very similar to identical set of data!) I get the following: reverting to 151 channel CTF default ??? Error using ==> topoplotER at 303 labels in data and labels in layout do not match Error in ==> topoplotTFR at 85 topoplotER(cfg, varargin{:}); Now, these are EEG (BESA) data so CTF is obviously not appropriate :) What am I missing? Thanks in advance! Virginie Virginie van Wassenhove, PhD ::::::::::::::::::::::::::::::::::::::::::::::::: Caltech - Division of Biology 1200 E. California Blvd M/C 139-74 Pasadena CA 91125 USA ::::::::::::::::::::::::::::::::::::::::::::::::: vvw at caltech.edu Virginie.van.Wassenhove at gmail.com W: 626.395.8959 http://www.its.caltech.edu/~vvw ::::::::::::::::::::::::::::::::::::::::::::::::: ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 c.hesse at FCDONDERS.RU.NL Fri Sep 21 09:03:38 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 21 Sep 2007 09:03:38 +0200 Subject: layout and topoplotTFR In-Reply-To: <20070921010618.A26A513B67@wood-ox.its.caltech.edu> Message-ID: Hi Virginie, are you using an appropriate layout file to generate the layout? Christian On 21 Sep 2007, at 03:06, Virginie van Wassenhove wrote: > Hi all > > anyone could help me out on this? > > I have tripled-check all structure that may contain the labels and > other parameters related to the layout of the channels and they are > all (seemingly?) identical (same # of channels, same labels, etc..) > including stat.cfg.version.id... > Yet, when it comes to plotting using topoplotTFR (which I have used > without problems in the past for very similar to identical set of > data!) I get the following: > > reverting to 151 channel CTF default > ??? Error using ==> topoplotER at 303 > labels in data and labels in layout do not match > Error in ==> topoplotTFR at 85 > topoplotER(cfg, varargin{:}); > > > Now, these are EEG (BESA) data so CTF is obviously not appropriate :) > What am I missing? > > Thanks in advance! > Virginie > > > > Virginie van Wassenhove, PhD > ::::::::::::::::::::::::::::::::::::::::::::::::: > Caltech - Division of Biology > 1200 E. California Blvd M/C 139-74 > Pasadena CA 91125 USA > ::::::::::::::::::::::::::::::::::::::::::::::::: > vvw at caltech.edu > Virginie.van.Wassenhove at gmail.com > W: 626.395.8959 > http://www.its.caltech.edu/~vvw > ::::::::::::::::::::::::::::::::::::::::::::::::: > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences 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. > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri Sep 21 10:03:46 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 21 Sep 2007 10:03:46 +0200 Subject: Extracting data from singleplot TFR In-Reply-To: Message-ID: Dear Piers singleplotTFR uses imagesc to do the plotting. Before that it selects the appropriate 2D (time-frequency) tile from the data. I'm not familiar with hgsave, but singleplotTFR is not a complicated function, so I'd advise you to look into the code and you can probably easily get access to the values by debugging. More info on the FieldTrip plotting functions can be found on documentation > tutorial > plotting: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu torial:plotting Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Piers Cornelissen Sent: Thursday, September 20, 2007 6:14 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Extracting data from singleplot TFR Dear all, I would like to get access to the values produced by singleplotTFR that go into the contour plots. Normally, I understand that a sequence like this: h = plot(y,x) hgsave(h,'plot_fig.fig') a = load('plot_fig.fig','-mat') should allow one to access the datastructure in a plot. However, when I tried hgsave with singleplotTFR I got the following error message: ??? Error using ==> hgsave Invalid handle Please can you advise how I get to the data. Thanks Piers 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. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 mahdi.mahmoudzadeh at FCDONDERS.RU.NL Fri Sep 21 13:26:39 2007 From: mahdi.mahmoudzadeh at FCDONDERS.RU.NL (Mahdi Mahmoudzadeh) Date: Fri, 21 Sep 2007 13:26:39 +0200 Subject: tutorial_beamformer Message-ID: Hi, I am working on Fieldtrip tutorial. In the section localizing oscillatory sourse using beamformer techniques(forward model and lead field matrix), when I exceute this code: mri = read_fcdc_mri('Subject01.mri'); cfg = []; cfg.name = 'segment'; cfg.write = 'yes'; cfg.coordinates = 'ctf'; [segmentedmri] = volumesegment(cfg, mri); there is an error : ??? Error using ==> spm_platform>init_platform GLNXA64 not supported architecture for SPM Error in ==> spm_platform at 64 if isempty(SPM_PLATFORM), init_platform, end Error in ==> spm_vol_minc at 80 if ~spm_platform('bigend') & datatype~=2 & datatype~=2+128, datatype = datatype*256; end; Error in ==> spm_vol>subfunc at 99 if isempty(n), V=spm_vol_minc(p); Error in ==> spm_vol>subfunc1 at 62 v = subfunc(P(i,:)); Error in ==> spm_vol>subfunc2 at 51 V = subfunc1(P); Error in ==> spm_vol at 37 V = subfunc2(P); Error in ==> spm_segment>init_sp at 566 SP.VB = spm_vol(flags.priors); Error in ==> spm_segment at 91 SP = init_sp(flags.estimate,VF,PG); Error in ==> volumesegment at 246 spm_segment(Va,cfg.template,flags); How can I solve this problem? Thank you very much in advance. Mahdi ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 rsalazar at NERVANA.MONTANA.EDU Fri Sep 21 19:15:36 2007 From: rsalazar at NERVANA.MONTANA.EDU (Rodrigo F. Salazar) Date: Fri, 21 Sep 2007 11:15:36 -0600 Subject: clusterrandanalysis input format In-Reply-To: Message-ID: Hi Eric, Thanks for your quick reply. I scanned the tutorials and I could not find one that is using clusterrandanalysis.m. I only found a matlab script named: "Apply clusterrandanalysis on TFRs of power that were computed with BESA" but as it is only a script I cannot access the data. So far I was capable to run freqanalysis.m by adapting my data to the format described in the documentation. However, when I run clusterranalaysis.m with the output of freqanalysis.m being 'freq' [clusrand] = clusterrandanalysis(cfg2,freq,freq); % I am using twice 'freq' as a test run with cfg2.statistic: 'indepsamplesZcoh' , I keep on getting errors such as : ??? Reference to non-existent field 'dof'. Error in ==> fieldtrip-lite-20070920/private/clusterrandstatistics at 680 dofc1=reshape(sum(data.dof(replselc1,:,:),1), 1,nfreq,ntime); And if I had the option: cfg.calcdof = 'yes' to get the degree of freedom, I get this other error: ??? Undefined function or variable "cumtapcnt". Error in ==> freqanalysis_mtmfft at 389 if calcdof && ~exist(cumtapcnt) Could you please tell if I am using a wrong configuration variable or if there is a problem in the code? Thanks, Rodrigo. On Sep 20, 2007, at 9:56 AM, Rodrigo F. Salazar wrote: > Hi, > > I am new to fieldtrip and I am working with intracortical data. I > have never used any function of fieldtrip and I would like to use > clusterrandanalysis.m using my own data format. I cannot find a > clear description of the input needed for that function. Can > someone quickly describe the input format or even send me an > example of input data? > > Thanks, > > Rodrigo. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Rodrigo F. Salazar, Ph.D > Post-doctoral Fellow > Lewis Hall 1, > Center for Computational Biology > Montana State University > Bozeman, 59717 MT, USA > Phone: ++1 (406) 994 71 90, > Fax: ++1 (406) 994 74 38 > email: rsalazar at nervana.montana.edu > http://cns.montana.edu/~rsalazar/ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > ---------------------------------- > > The aim of this list 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/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 vvw at CALTECH.EDU Fri Sep 21 22:36:35 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Fri, 21 Sep 2007 13:36:35 -0700 Subject: layout and topoplotTFR In-Reply-To: Message-ID: Hi Christian, yes I was using the correct layout file etc... Just solved the issue now, which was a misspelling of a couple variables that must have created random errors. Next time I watch my keyboard when typing ;-) Thanks /vv At 12:03 AM 9/21/2007, Christian Hesse wrote: >Hi Virginie, > >are you using an appropriate layout file to generate the layout? > >Christian > > > >On 21 Sep 2007, at 03:06, Virginie van Wassenhove wrote: > >>Hi all >> >>anyone could help me out on this? >> >>I have tripled-check all structure that may contain the labels and >>other parameters related to the layout of the channels and they are >>all (seemingly?) identical (same # of channels, same labels, etc..) >>including stat.cfg.version.id... >>Yet, when it comes to plotting using topoplotTFR (which I have used >>without problems in the past for very similar to identical set of >>data!) I get the following: >> >>reverting to 151 channel CTF default >>??? Error using ==> topoplotER at 303 >>labels in data and labels in layout do not match >>Error in ==> topoplotTFR at 85 >>topoplotER(cfg, varargin{:}); >> >> >>Now, these are EEG (BESA) data so CTF is obviously not appropriate :) >>What am I missing? >> >>Thanks in advance! >>Virginie >> >> >> >>Virginie van Wassenhove, PhD >>::::::::::::::::::::::::::::::::::::::::::::::::: >>Caltech - Division of Biology >>1200 E. California Blvd M/C 139-74 >>Pasadena CA 91125 USA >>::::::::::::::::::::::::::::::::::::::::::::::::: >>vvw at caltech.edu >>Virginie.van.Wassenhove at gmail.com >>W: 626.395.8959 >>http://www.its.caltech.edu/~vvw >>::::::::::::::::::::::::::::::::::::::::::::::::: >> >>---------------------------------- >>The aim of this list is to facilitate the discussion between users >>of the FieldTrip toolbox, to share experiences 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. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD ::::::::::::::::::::::::::::::::::::::::::::::::: Caltech - Division of Biology 1200 E. California Blvd M/C 139-74 Pasadena CA 91125 USA ::::::::::::::::::::::::::::::::::::::::::::::::: vvw at caltech.edu Virginie.van.Wassenhove at gmail.com W: 626.395.8959 http://www.its.caltech.edu/~vvw ::::::::::::::::::::::::::::::::::::::::::::::::: ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 sameer at ANDREW.CMU.EDU Fri Sep 21 22:53:41 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 21 Sep 2007 16:53:41 -0400 Subject: clusterrandanalysis input format In-Reply-To: Message-ID: Hi Rodrigo, Maybe this will help. http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:clusterrandanalysis best, sameer On Fri, 21 Sep 2007, Rodrigo F. Salazar wrote: > Hi Eric, > > Thanks for your quick reply. I scanned the tutorials and I could not find one > that is using clusterrandanalysis.m. I only found a matlab script named: > > "Apply clusterrandanalysis on TFRs of power that were computed with BESA" > > but as it is only a script I cannot access the data. > > So far I was capable to run freqanalysis.m by adapting my data to the format > described in the documentation. However, when I run clusterranalaysis.m with > the output of freqanalysis.m being 'freq' > > [clusrand] = clusterrandanalysis(cfg2,freq,freq); % I am using twice 'freq' > as a test run with cfg2.statistic: 'indepsamplesZcoh' > > , I keep on getting errors such as : > > ??? Reference to non-existent field 'dof'. > > Error in ==> fieldtrip-lite-20070920/private/clusterrandstatistics at 680 > dofc1=reshape(sum(data.dof(replselc1,:,:),1),1,nfreq,ntime); > > And if I had the option: > > cfg.calcdof = 'yes' > > to get the degree of freedom, I get this other error: > > ??? Undefined function or variable "cumtapcnt". > > Error in ==> freqanalysis_mtmfft at 389 > if calcdof && ~exist(cumtapcnt) > > Could you please tell if I am using a wrong configuration variable or if > there is a problem in the code? > > Thanks, > > Rodrigo. > > > On Sep 20, 2007, at 9:56 AM, Rodrigo F. Salazar wrote: > >> Hi, >> >> I am new to fieldtrip and I am working with intracortical data. I have >> never used any function of fieldtrip and I would like to use >> clusterrandanalysis.m using my own data format. I cannot find a clear >> description of the input needed for that function. Can someone quickly >> describe the input format or even send me an example of input data? >> >> Thanks, >> >> Rodrigo. >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> Rodrigo F. Salazar, Ph.D >> Post-doctoral Fellow >> Lewis Hall 1, >> Center for Computational Biology >> Montana State University >> Bozeman, 59717 MT, USA >> Phone: ++1 (406) 994 71 90, >> Fax: ++1 (406) 994 74 38 >> email: rsalazar at nervana.montana.edu >> http://cns.montana.edu/~rsalazar/ >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> >> >> >> >> >> ---------------------------------- >> >> The aim of this list 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/ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Rodrigo F. Salazar, Ph.D > Post-doctoral Fellow > Lewis Hall 1, > Center for Computational Biology > Montana State University > Bozeman, 59717 MT, USA > Phone: ++1 (406) 994 71 90, > Fax: ++1 (406) 994 74 38 > email: rsalazar at nervana.montana.edu > http://cns.montana.edu/~rsalazar/ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences 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 c.hesse at FCDONDERS.RU.NL Sat Sep 22 10:46:43 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Sat, 22 Sep 2007 10:46:43 +0200 Subject: layout and topoplotTFR In-Reply-To: <20070921203635.5D799135E0@wood-ox.its.caltech.edu> Message-ID: Glad it's sorted :-) Christian On 21 Sep 2007, at 22:36, Virginie van Wassenhove wrote: > Hi Christian, > yes I was using the correct layout file etc... Just solved the > issue now, which was a misspelling of a couple variables that must > have created random errors. Next time I watch my keyboard when > typing ;-) > Thanks /vv > > At 12:03 AM 9/21/2007, Christian Hesse wrote: >> Hi Virginie, >> >> are you using an appropriate layout file to generate the layout? >> >> Christian >> >> >> >> On 21 Sep 2007, at 03:06, Virginie van Wassenhove wrote: >> >>> Hi all >>> >>> anyone could help me out on this? >>> >>> I have tripled-check all structure that may contain the labels >>> and other parameters related to the layout of the channels and >>> they are all (seemingly?) identical (same # of channels, same >>> labels, etc..) including stat.cfg.version.id... >>> Yet, when it comes to plotting using topoplotTFR (which I have >>> used without problems in the past for very similar to identical >>> set of data!) I get the following: >>> >>> reverting to 151 channel CTF default >>> ??? Error using ==> topoplotER at 303 >>> labels in data and labels in layout do not match >>> Error in ==> topoplotTFR at 85 >>> topoplotER(cfg, varargin{:}); >>> >>> >>> Now, these are EEG (BESA) data so CTF is obviously not >>> appropriate :) >>> What am I missing? >>> >>> Thanks in advance! >>> Virginie >>> >>> >>> >>> Virginie van Wassenhove, PhD >>> ::::::::::::::::::::::::::::::::::::::::::::::::: >>> Caltech - Division of Biology >>> 1200 E. California Blvd M/C 139-74 >>> Pasadena CA 91125 USA >>> ::::::::::::::::::::::::::::::::::::::::::::::::: >>> vvw at caltech.edu >>> Virginie.van.Wassenhove at gm >>> ail.com >>> W: 626.395.8959 >>> http://www.its.caltech.edu/~vvw >>> ::::::::::::::::::::::::::::::::::::::::::::::::: >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between >>> users of the FieldTrip toolbox, to share experiences and to >>> discuss new ideas for MEG and EEG analysis. See also >> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>> listserv.surfnet.nl/archives/fieldtrip.html and >> fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ > > Virginie van Wassenhove, PhD > ::::::::::::::::::::::::::::::::::::::::::::::::: > Caltech - Division of Biology > 1200 E. California Blvd M/C 139-74 > Pasadena CA 91125 USA > ::::::::::::::::::::::::::::::::::::::::::::::::: > vvw at caltech.edu > Virginie.van.Wassenhove at gmail.com > W: 626.395.8959 > http://www.its.caltech.edu/~vvw > ::::::::::::::::::::::::::::::::::::::::::::::::: > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences 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. > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maris at NICI.RU.NL Sun Sep 23 16:31:20 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Sun, 23 Sep 2007 16:31:20 +0200 Subject: clusterrandanalysis input format In-Reply-To: Message-ID: Dear Rodrigo Salazar and Sameer Walawalkar, You are both involved in similar analyses, and therefore I address you both. 1. There was a bug in the latest version of freqanalysis_mtmfft, which caused the error message in Rodrigo's analysis. Sameer used an older version of freqanalysis_mtmfft, in which this bug was not yet present. I have corrected the bug and within a couple of days you can download the new m-file from the FT homepage. 2. There were a few bugs in the private function clusterrandstatistics.m related to the postprocessing of the results of a onesided statistical test. I have corrected these bugs. I now obtain identical p-values for the elements of posclusters in (1) a twosided analysis with cfg.alphathresh=0.05 and (2) a onesided analysis (cfg.onetwo=onesided_1<2) with cfg.alphathresh=0.025, as it should be. Similarly, I now obtain identical p-values for the elements of negclusters in (1) a twosided analysis with cfg.alphathresh=0.05 and (2) a onesided analysis (cfg.onetwo=onesided_2<1) with cfg.alphathresh=0.025, again as it should be. 3. Sameer has selected channel combinations by specifying cfg.channelcmb={refchan 'MEG'}. This only gives you the channel pairs in which your reference channel is in the first position. As a result, you will not select the channel pairs in which the reference channel is in the second position. I must admit that I was not aware of this problem. I advise you to use the labelcmb-field in the output of freqanalysis. From this field, you can easily select those channel pairs in which the reference channel is in either the first or the second position, and pass this selection via the cfg.channelcmb-field. Good luck, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience : www.ru.nl/master/cns/ _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Rodrigo F. Salazar Sent: Friday, September 21, 2007 7:16 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandanalysis input format Hi Eric, Thanks for your quick reply. I scanned the tutorials and I could not find one that is using clusterrandanalysis.m. I only found a matlab script named: "Apply clusterrandanalysis on TFRs of power that were computed with BESA" but as it is only a script I cannot access the data. So far I was capable to run freqanalysis.m by adapting my data to the format described in the documentation. However, when I run clusterranalaysis.m with the output of freqanalysis.m being 'freq' [clusrand] = clusterrandanalysis(cfg2,freq,freq); % I am using twice 'freq' as a test run with cfg2.statistic: 'indepsamplesZcoh' , I keep on getting errors such as : ??? Reference to non-existent field 'dof'. Error in ==> fieldtrip-lite-20070920/private/clusterrandstatistics at 680 dofc1=reshape(sum(data.dof(replselc1,:,:),1),1,nfreq,ntime); And if I had the option: cfg.calcdof = 'yes' to get the degree of freedom, I get this other error: ??? Undefined function or variable "cumtapcnt". Error in ==> freqanalysis_mtmfft at 389 if calcdof && ~exist(cumtapcnt) Could you please tell if I am using a wrong configuration variable or if there is a problem in the code? Thanks, Rodrigo. On Sep 20, 2007, at 9:56 AM, Rodrigo F. Salazar wrote: Hi, I am new to fieldtrip and I am working with intracortical data. I have never used any function of fieldtrip and I would like to use clusterrandanalysis.m using my own data format. I cannot find a clear description of the input needed for that function. Can someone quickly describe the input format or even send me an example of input data? Thanks, Rodrigo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list 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/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list 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 wibral at MPIH-FRANKFURT.MPG.DE Mon Sep 24 09:51:04 2007 From: wibral at MPIH-FRANKFURT.MPG.DE (Michael Wibral) Date: Mon, 24 Sep 2007 09:51:04 +0200 Subject: No subject Message-ID: Hi Mahdi, the error message means that you are trying to use spm2 (via fieldtrip) on a 64bit linux system. The mex functions in spm2 are not supported on this platform, meaning you have to recompile them. Here is a link on how to do this, if you are familiar with compiling c-code: http://en.wikibooks.org/wiki/SPM/Installation_on_64bit_Linux beware that the Makefile and the platform-file listed on that page can not be simply copied and pasted as several staements in a make file have to start with a tab (the lines that are indendented to the right, these are actually called 'rules'). If you copy and paste tab get converted to multiple spaces, which doesn't work then. Maybe you can ask John Ashburner acopy of their current makefile. As a workaround, run that part of the tutorial on a 32bit (windows or linux) machine. Good luck and let me know if it works, Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Mon Sep 24 20:39:14 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 24 Sep 2007 14:39:14 -0400 Subject: clusterrandanalysis input format In-Reply-To: <043b01c7fdee$691d7350$bb2dae83@fcdonders.nl> Message-ID: Dear Eric, Following your suggestion I used labelcmb field from the output of freqanalysis to choose combinations with the refchannel in both first and second position. cfg.channelcmb was a 305x2 cell array. Yet, after clusterandanalysis, posclusterslabelmat: [205x13 double] negclusterslabelmat: [205x13 double] (and not with dimensions [306xnumber of freqs]). It reflects the fact (I think) that the first 205 combinations in cfg.channelcmb have the refchannel in the first position and the rest of the 100 combinations have it in the second position. This size of posclusterslabelmat and negclusterslabelmat (205x13) is what I get from using cfg.channelcmb = {refchannel MEG} So I am not sure your suggestion is the solution. (Also, from your email, I dont think this requires a newer corrected version of clusterandanalysis.m). Best, sameer On Sun, 23 Sep 2007, Eric Maris wrote: > Dear Rodrigo Salazar and Sameer Walawalkar, > > > > > > You are both involved in similar analyses, and therefore I address you both. > > > > 1. There was a bug in the latest version of freqanalysis_mtmfft, which > caused the error message in Rodrigo's analysis. Sameer used an older version > of freqanalysis_mtmfft, in which this bug was not yet present. I have > corrected the bug and within a couple of days you can download the new > m-file from the FT homepage. > 2. There were a few bugs in the private function > clusterrandstatistics.m related to the postprocessing of the results of a > onesided statistical test. I have corrected these bugs. I now obtain > identical p-values for the elements of posclusters in (1) a twosided > analysis with cfg.alphathresh=0.05 and (2) a onesided analysis > (cfg.onetwo=onesided_1<2) with cfg.alphathresh=0.025, as it should be. > Similarly, I now obtain identical p-values for the elements of negclusters > in (1) a twosided analysis with cfg.alphathresh=0.05 and (2) a onesided > analysis (cfg.onetwo=onesided_2<1) with cfg.alphathresh=0.025, again as it > should be. > 3. Sameer has selected channel combinations by specifying > cfg.channelcmb={refchan 'MEG'}. This only gives you the channel pairs in > which your reference channel is in the first position. As a result, you will > not select the channel pairs in which the reference channel is in the second > position. I must admit that I was not aware of this problem. I advise you to > use the labelcmb-field in the output of freqanalysis. From this field, you > can easily select those channel pairs in which the reference channel is in > either the first or the second position, and pass this selection via the > cfg.channelcmb-field. > > > > > > Good luck, > > > > Eric Maris > > > > dr. Eric Maris > > NICI/Biological Psychology and > > F.C. Donders Center for Cognitive NeuroImaging > > University of Nijmegen > > P.O. Box 9104 > > 6500 HE Nijmegen > > The Netherlands > > T:+31 24 3612651 (NICI) > > T:+31 24 3610754 (FCDC) > > F:+31 24 3616066 (NICI) > > E: maris at nici.ru.nl > > MSc Cognitive Neuroscience : > www.ru.nl/master/cns/ > > > > > > > > > > _____ > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Rodrigo F. Salazar > Sent: Friday, September 21, 2007 7:16 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] clusterrandanalysis input format > > > > Hi Eric, > > > > Thanks for your quick reply. I scanned the tutorials and I could not find > one that is using clusterrandanalysis.m. I only found a matlab script named: > > > > "Apply clusterrandanalysis on TFRs of power that were computed with BESA" > > > > but as it is only a script I cannot access the data. > > > > So far I was capable to run freqanalysis.m by adapting my data to the format > described in the documentation. However, when I run clusterranalaysis.m with > the output of freqanalysis.m being 'freq' > > > > [clusrand] = clusterrandanalysis(cfg2,freq,freq); % I am using twice 'freq' > as a test run with cfg2.statistic: 'indepsamplesZcoh' > > > > , I keep on getting errors such as : > > > > ??? Reference to non-existent field 'dof'. > > > > Error in ==> fieldtrip-lite-20070920/private/clusterrandstatistics at 680 > > dofc1=reshape(sum(data.dof(replselc1,:,:),1),1,nfreq,ntime); > > > > And if I had the option: > > > > cfg.calcdof = 'yes' > > > > to get the degree of freedom, I get this other error: > > > > ??? Undefined function or variable "cumtapcnt". > > > > Error in ==> freqanalysis_mtmfft at 389 > > if calcdof && ~exist(cumtapcnt) > > > > Could you please tell if I am using a wrong configuration variable or if > there is a problem in the code? > > > > Thanks, > > > > Rodrigo. > > > > > > On Sep 20, 2007, at 9:56 AM, Rodrigo F. Salazar wrote: > > > > > > Hi, > > > > I am new to fieldtrip and I am working with intracortical data. I have never > used any function of fieldtrip and I would like to use clusterrandanalysis.m > using my own data format. I cannot find a clear description of the input > needed for that function. Can someone quickly describe the input format or > even send me an example of input data? > > > > Thanks, > > > > Rodrigo. > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Rodrigo F. Salazar, Ph.D > > Post-doctoral Fellow > > Lewis Hall 1, > > Center for Computational Biology > > Montana State University > > Bozeman, 59717 MT, USA > > Phone: ++1 (406) 994 71 90, > > Fax: ++1 (406) 994 74 38 > > email: rsalazar at nervana.montana.edu > > http://cns.montana.edu/~rsalazar/ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > > > > > > > > > > ---------------------------------- > > The aim of this list 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/ > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Rodrigo F. Salazar, Ph.D > > Post-doctoral Fellow > > Lewis Hall 1, > > Center for Computational Biology > > Montana State University > > Bozeman, 59717 MT, USA > > Phone: ++1 (406) 994 71 90, > > Fax: ++1 (406) 994 74 38 > > email: rsalazar at nervana.montana.edu > > http://cns.montana.edu/~rsalazar/ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > > > > > > > > > > ---------------------------------- > > The aim of this list 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. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 andrew.smart at NYU.EDU Mon Sep 24 23:45:16 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Mon, 24 Sep 2007 23:45:16 +0200 Subject: permutation test for more than 2 conditions Message-ID: Hi, I would like to test for a main effect using the cluster-based permutation test (a one-way ANOVA?) I have set up the design matrix as follows: subj=16; design=zeros(2,3*subj); for i=1:subj design(1,i)=i; end for i=1:subj design(1,subj+i)=i; end for i=1:subj design(1,subj*2+i)=i; end design(2,1:subj)=1; design(2,subj+1:2*subj)=2; design(2,subj*2+1:3*subj)=3; cfg.design = design; cfg.uvar=1; cfg.ivar=2; and the cfg has cfg.statistic = 'depsamplesF'; cfg.tail=1; cfg.alpha = 0.05; cfg.numrandomization = 500; The following error comes up in statfun_depsamplesF: Undefined function or method 'finv' for input arguments of type 'double'. from these lines: if cfg.tail==1 s.critval = ((nunits-1).*ncontrasts./(nunits-ncontrasts)).*finv(1-cfg.alpha,s.dfnum,s.dfdenom); end; And then it crashes because it cannot determine the parametric critical value for clustering. What is "finv"? Thank you for any help, andy ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 jgross at UNI-DUESSELDORF.DE Tue Sep 25 12:55:06 2007 From: jgross at UNI-DUESSELDORF.DE (Joachim Gross) Date: Tue, 25 Sep 2007 12:55:06 +0200 Subject: MEG Position in Glasgow Message-ID: UNIVERSITY of GLASGOW DEPARTMENT OF PSYCHOLOGY Centre for Cognitive Neuroimaging (CCNi) POSTDOCTORAL RESEARCH ASSISTANT �22,774 - �25,633 or �25,889 - �31,840 per annum REF: 13696/DPO/A3 A strategic priority of the University is the current creation within the Department of Psychology of a Centre for Cognitive Neuroimaging (CCNi), a major initiative to install an in-house platform of complementary, state-of-the-art brain imaging facilities dedicated to Cognitive Neuroscience research. Equipment will include a 3T fMRI scanner, a MEG system, a TMS system, and several EEG systems – including fMRI compatible systems. Applications are invited for a Postdoctoral Research Assistant to work in the Magnetoencephalography (MEG) group in the newly established CCNi. The successful candidate will receive specialist training from 4D Neuroimaging company and will be responsible for the first-line maintenance of the MEG system. Further responsibilities include the integration and testing of additional stimulation and recording hardware and optimization of analysis procedures. You will have the opportunity to: contribute to the setup and handling of a state of the art MEG system; be involved in data acquisition; play a leading role in research collaborations with 4D Neuroimaging company. You will be qualified, with a PhD, or equivalent, in Electrical Engineering, Neuroinformatics, Physics, Psychology, Neuroscience or a related discipline. Expertise in handling technical equipment and advanced programming skills (preferably with MATLAB) are essential. Experience with MEG/EEG equipment is highly desirable. This post is available from 1 December 2007 and funding is available for 36 months initially. Salary scale will depend on experience (level 6: �22,774 - �25,633 or level 7: �25,889 - �31,840). Informal enquiries may be made to Professor J Gross, (+44 (0) 141 330 3947; or email j.gross at psy.gla.ac.uk. For further details about the post and how to apply: See our website at http://www.psy.gla.ac.uk/jobs.php or contact Clare Alexander, Department of Psychology, University of Glasgow, G12 8QQ (+44 (0) 141 330 5090, email: c.alexander at psy.gla.ac.uk . For an application pack, please see our website at www.gla.ac.uk. Applications comprising applicant information form, cv, covering letter, list of publications and names and contact details of two referees should be sent to: Clare Alexander at the above address. Closing date: 17 October 2007. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 andrew.smart at NYU.EDU Tue Sep 25 21:33:03 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Tue, 25 Sep 2007 15:33:03 -0400 Subject: permutation test for more than 2 conditions In-Reply-To: Message-ID: Hi, I found finv.m in the statistics toolbox and the test seems to work, but any advice is greatly appreciated! thanks andy ----- Original Message ----- From: Andrew Smart Date: Monday, September 24, 2007 5:45 pm Subject: [FIELDTRIP] permutation test for more than 2 conditions To: FIELDTRIP at NIC.SURFNET.NL > Hi, > I would like to test for a main effect using the cluster-based > permutation test (a one-way ANOVA?) > > I have set up the design matrix as follows: > > subj=16; > design=zeros(2,3*subj); > for i=1:subj > design(1,i)=i; > end > for i=1:subj > design(1,subj+i)=i; > end > for i=1:subj > design(1,subj*2+i)=i; > end > design(2,1:subj)=1; > design(2,subj+1:2*subj)=2; > design(2,subj*2+1:3*subj)=3; > > cfg.design = design; > cfg.uvar=1; > cfg.ivar=2; > > > and the cfg has > > cfg.statistic = 'depsamplesF'; > cfg.tail=1; > cfg.alpha = 0.05; > cfg.numrandomization = 500; > > The following error comes up in statfun_depsamplesF: > Undefined function or method 'finv' for input arguments of type 'double'. > from these lines: > if cfg.tail==1 > s.critval = ((nunits-1).*ncontrasts./(nunits-ncontrasts)).*finv(1- cfg.alpha,s.dfnum,s.dfdenom); > end; > > And then it crashes because it cannot determine the parametric > critical value for clustering. What > is "finv"? > > Thank you for any help, > andy > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 rsalazar at NERVANA.MONTANA.EDU Wed Sep 26 00:32:24 2007 From: rsalazar at NERVANA.MONTANA.EDU (Rodrigo F. Salazar) Date: Tue, 25 Sep 2007 16:32:24 -0600 Subject: clusterrandanalysis input format In-Reply-To: Message-ID: Dear Eric and Sameer, Thanks for correcting the bug and about the tutorial on clusterandanalysis. I can now run freqanalysis_mtmfft but when I use the output to run clusterandanalysis, I have one error due to an empty 'stats' variable. I am now using the tutorial data to run clusterandanalysis to avoid problems due my data format. Even though I have noticed that in clusterrandstatistics.m, the variables 'crspctrc1' and 'crspctrc2' (line 678 and 679) are empty. I think that this is produced by a wrong input format. I selected the two first channels of FICpreproc FCpreproc and instead of running timelockanalysis, I ran freqanalysis using cfg = method: 'mtmfft' tapsmofrq: 4 calcdof: 'yes' keeptapers: 'no' keeptrials: 'yes' pad: 0.5000 taper: 'dpss' foilim: [0 100] output: 'powandcsd' channelcmb: {'MLC11' 'MLC12'} channel: {2x1 cell} That gave me: FICfreq = label: {2x1 cell} dimord: 'rpt_chan_freq' freq: [1x51 double] powspctrm: [85x2x51 double] labelcmb: {'MLC11' 'MLC12'} crsspctrm: [85x1x51 double] cumsumcnt: [85x1 double] cumtapcnt: [85x1 double] dof: [85x51 double] grad: [1x1 struct] cfg: [1x1 struct] and FCfreq = label: {2x1 cell} dimord: 'rpt_chan_freq' freq: [1x51 double] powspctrm: [84x2x51 double] labelcmb: {'MLC11' 'MLC12'} crsspctrm: [84x1x51 double] cumsumcnt: [84x1 double] cumtapcnt: [84x1 double] dof: [84x51 double] grad: [1x1 struct] cfg: [1x1 struct] and then I ran clusterandanalysis using cfg2 = statistic: 'indepsamplesZcoh' elec: [1x1 struct] chancmbgeom: 'free' alphathresh: 0.0500 alpha: 0.0500 makeclusters: 'no' As following [clusrand] = clusterrandanalysis(cfg2, FCfreq, FICfreq) And if I use cfg2.makeclusters = 'yes', I get an empty 'clusrand' variable. Do you have an idea where I am misusing the code? Basically I simply would like to test the difference in coherence between the FIC and FC condition for the two first channels. Thanks, Rodrigo. On Sep 23, 2007, at 8:31 AM, Eric Maris wrote: Dear Rodrigo Salazar and Sameer Walawalkar, You are both involved in similar analyses, and therefore I address you both. There was a bug in the latest version of freqanalysis_mtmfft, which caused the error message in Rodrigo’s analysis. Sameer used an older version of freqanalysis_mtmfft, in which this bug was not yet present. I have corrected the bug and within a couple of days you can download the new m-file from the FT homepage. There were a few bugs in the private function clusterrandstatistics.m related to the postprocessing of the results of a onesided statistical test. I have corrected these bugs. I now obtain identical p-values for the elements of posclusters in (1) a twosided analysis with cfg.alphathresh=0.05 and (2) a onesided analysis (cfg.onetwo=onesided_1<2) with cfg.alphathresh=0.025, as it should be. Similarly, I now obtain identical p-values for the elements of negclusters in (1) a twosided analysis with cfg.alphathresh=0.05 and (2) a onesided analysis (cfg.onetwo=onesided_2<1) with cfg.alphathresh=0.025, again as it should be. Sameer has selected channel combinations by specifying cfg.channelcmb= {refchan ‘MEG’}. This only gives you the channel pairs in which your reference channel is in the first position. As a result, you will not select the channel pairs in which the reference channel is in the second position. I must admit that I was not aware of this problem. I advise you to use the labelcmb-field in the output of freqanalysis. From this field, you can easily select those channel pairs in which the reference channel is in either the first or the second position, and pass this selection via the cfg.channelcmb-field. Good luck, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Rodrigo F. Salazar Sent: Friday, September 21, 2007 7:16 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandanalysis input format Hi Eric, Thanks for your quick reply. I scanned the tutorials and I could not find one that is using clusterrandanalysis.m. I only found a matlab script named: "Apply clusterrandanalysis on TFRs of power that were computed with BESA" but as it is only a script I cannot access the data. So far I was capable to run freqanalysis.m by adapting my data to the format described in the documentation. However, when I run clusterranalaysis.m with the output of freqanalysis.m being 'freq' [clusrand] = clusterrandanalysis(cfg2,freq,freq); % I am using twice 'freq' as a test run with cfg2.statistic: 'indepsamplesZcoh' , I keep on getting errors such as : ??? Reference to non-existent field 'dof'. Error in ==> fieldtrip-lite-20070920/private/clusterrandstatistics at 680 dofc1=reshape(sum(data.dof(replselc1,:,:),1),1,nfreq,ntime); And if I had the option: cfg.calcdof = 'yes' to get the degree of freedom, I get this other error: ??? Undefined function or variable "cumtapcnt". Error in ==> freqanalysis_mtmfft at 389 if calcdof && ~exist(cumtapcnt) Could you please tell if I am using a wrong configuration variable or if there is a problem in the code? Thanks, Rodrigo. On Sep 20, 2007, at 9:56 AM, Rodrigo F. Salazar wrote: Hi, I am new to fieldtrip and I am working with intracortical data. I have never used any function of fieldtrip and I would like to use clusterrandanalysis.m using my own data format. I cannot find a clear description of the input needed for that function. Can someone quickly describe the input format or even send me an example of input data? Thanks, Rodrigo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list 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/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On Sep 20, 2007, at 9:56 AM, Rodrigo F. Salazar wrote: > Hi, > > I am new to fieldtrip and I am working with intracortical data. I > have never used any function of fieldtrip and I would like to use > clusterrandanalysis.m using my own data format. I cannot find a > clear description of the input needed for that function. Can > someone quickly describe the input format or even send me an > example of input data? > > Thanks, > > Rodrigo. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Rodrigo F. Salazar, Ph.D > Post-doctoral Fellow > Lewis Hall 1, > Center for Computational Biology > Montana State University > Bozeman, 59717 MT, USA > Phone: ++1 (406) 994 71 90, > Fax: ++1 (406) 994 74 38 > email: rsalazar at nervana.montana.edu > http://cns.montana.edu/~rsalazar/ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > ---------------------------------- > > The aim of this list 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/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 MPIH-FRANKFURT.MPG.DE Wed Sep 26 09:39:47 2007 From: wibral at MPIH-FRANKFURT.MPG.DE (Michael Wibral) Date: Wed, 26 Sep 2007 09:39:47 +0200 Subject: Using SPM Analyze MRIs for beamforming and head model creation Message-ID: Dear all, I have a quick question on how the coregistration works if I use dicom or SPM Analyze MRIs of my subjects for head model creation. The background of my question is that ctf mri's are now version 4.1 and I am not sure what has changed since the last version that fieldtrip used to read properly. When I use ctf's MRIs with included fiducials I can see how fieldtrip is able to align MRI and the grads. How is this done for for SPM MRIs? Transforming to the template (with known fiducial locations??) and then backtransforming the fiducial locations? (Staying in the transformed/normalized space doesn't seem to be corrcet because the transformation is nonlinear and the field-equations do not transform the same way...) 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. From v.litvak at ION.UCL.AC.UK Wed Sep 26 16:52:41 2007 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 26 Sep 2007 15:52:41 +0100 Subject: Small problem with multiplotER In-Reply-To: <07092609394752_2800013E@mpih-frankfurt.mpg.de> Message-ID: Dear all, There is a small problem I found using multiplotER. In general it likes rotating the electrodes by 90 deg CCW which might justify changing the defaults. But even when I specify cfg.rotate=0, it affects the multiplot, but not the topoplots that are generated from it in the interactive mode. Please fix. Vladimir ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 Tue Sep 4 10:30:15 2007 From: j.poort at NIN.KNAW.NL (Jasper Poort) Date: Tue, 4 Sep 2007 10:30:15 +0200 Subject: coherence and phase spectrum Message-ID: Hi all, I have a few questions: first, in order to look at induced power rather than evoked power, one can subtract the power spectrum of the evoked potential (average over trials) from the power spectrum (average of power in single trials). Is this not the same as first subtracting the average over trials from every trial and then doing a single freqanalysis? If not, would it then mean you have to do a procedure like: do 1) freqanalysis on preprocessed data 2) timelockanalysis on preprocessed data, then freqanalysis 3) take (result of 1)-(result of 2)? second, does a similar approach also exist for coherence? For example, in case of presenting a flash to a subject, different sensors will get common input that is time and phase locked, resulting in high coherence values, however for this no coupling between the sensors needs to exist. Is it possible to correct for this to get an "induced" coherence? third, in principle the phase spectrum can give information additional to the power spectrum: in the case of a power spectrum, it can give the latency of the response if one fits a linear function to the phase spectrum. How can this be done in FieldTrip? My first approach would be: cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; % complex spectrum cfg.tapsmofrq = 4; [freq]=freqanalysis(cfg,data) % data is preprocessed data the power spectrum is then: powspctrm=squeeze(mean(freq.fourierspctrm.*conj(freq.fourierspctrm))); the phase spectrum is then simply unwrapping the angle of the complex spectrum and trying to fit a line on this?: phsspctrm = squeeze(mean(unwrap(angle(freq.fourierspctrm)))); Besides practical advice I'd much appreciate references to any standard papers on this procedure. related to this, how could one use the phase of the cross-spectrum to get an idea of the latency of covariance at some frequency? Many thanks, best, Jasper ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 hauck at UKE.DE Tue Sep 4 13:46:58 2007 From: hauck at UKE.DE (Michael Hauck) Date: Tue, 4 Sep 2007 13:46:58 +0200 Subject: freqstatistics Message-ID: Hello there, I found a bug in freqstatistic in version fieldtrip-20070603 when using it with coherence. If you use cfg.parameter = 'cohspctrm' freqstatistic still uses the powspectrm due to line 89 to 93 89 if isfield(cfg, 'parameter') && strcmp(cfg, 'powspctrm') 90 % use the power spectrum, this is the default 91 elseif isfield(cfg, 'parameter') && strcmp(cfg, 'csdspctrm') 92 % use the cross spectrum, this might work as well (but has not been tested) 93 elseif isfield(cfg, 'parameter') && strcmp(cfg, 'cohspctrm') I think that it should be ... && strcmp(cfg.PARAMETER, 'powspctrm') and so on ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 Jan.Schoffelen at FCDONDERS.RU.NL Tue Sep 4 14:11:11 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Tue, 4 Sep 2007 14:11:11 +0200 Subject: freqstatistics In-Reply-To: Message-ID: Dear Michael, I am pretty sure that this bug has been fixed in the newer releases of fieldtrip. Thanks for noticing though. Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Michael Hauck Sent: Tuesday, September 04, 2007 1:47 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] freqstatistics Hello there, I found a bug in freqstatistic in version fieldtrip-20070603 when using it with coherence. If you use cfg.parameter = 'cohspctrm' freqstatistic still uses the powspectrm due to line 89 to 93 89 if isfield(cfg, 'parameter') && strcmp(cfg, 'powspctrm') 90 % use the power spectrum, this is the default 91 elseif isfield(cfg, 'parameter') && strcmp(cfg, 'csdspctrm') 92 % use the cross spectrum, this might work as well (but has not been tested) 93 elseif isfield(cfg, 'parameter') && strcmp(cfg, 'cohspctrm') I think that it should be ... && strcmp(cfg.PARAMETER, 'powspctrm') and so on ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 sameer at ANDREW.CMU.EDU Tue Sep 4 19:13:59 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 4 Sep 2007 13:13:59 -0400 Subject: indicating reference channel in coherence topoplots Message-ID: Hello, How does one get topoplotER to mark the reference channel (say with a cross) when plotting coherence values? Will the same thing work for marking reference channels while plotting results of clusterandanalysis for coherence change? thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Sep 4 19:30:27 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 4 Sep 2007 19:30:27 +0200 Subject: indicating reference channel in coherence topoplots In-Reply-To: Message-ID: Hi Sameer, You can use the cfg.highlight = channelnumber and cfg.hlmarker = '+' (see help topoplot.m for details). As long as you use topoplotER or topoplotTFR (they both call the lower level function topoplot.m that does the actual plotting) it will work. Bests, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Tuesday, September 04, 2007 7:14 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] indicating reference channel in coherence topoplots Hello, How does one get topoplotER to mark the reference channel (say with a cross) when plotting coherence values? Will the same thing work for marking reference channels while plotting results of clusterandanalysis for coherence change? thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 sameer at ANDREW.CMU.EDU Thu Sep 6 23:52:39 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 6 Sep 2007 17:52:39 -0400 Subject: sensor numbers on topoplot Message-ID: Hello, While using topoplot, if one uses cfg.electrodes = 'numbers'; you get a plot with the sensor number written over each of the sensor positions. What do these numbers correspond to? If I look at NM306 layout diagram and locate sensor 2121 (on the midline at the very bottom of the occipital lobe), this corresponds to a sensor number 289 on the topoplot. Yet if I do cfg = []; cfg.layout = 'NM306all.lay'; lay = prepare_layout(cfg) reading layout from file NM306all.lay lay = pos: [308x2 double] width: [308x1 double] height: [308x1 double] label: {308x1 cell} >> lay.label(289) ans = '2533' >> find(strcmp(lay.label,'2121')) ans = 240 Can someone help me understand this? This is necessary to understand how to assign cfg.highlights. Thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 Jan.Schoffelen at FCDONDERS.RU.NL Fri Sep 7 10:08:35 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Fri, 7 Sep 2007 10:08:35 +0200 Subject: sensor numbers on topoplot In-Reply-To: Message-ID: Sameer, I used to have a latin teacher who always told us: reading is half the understanding (but then in latin of course). Since you are probably not so much interested in my latin teacher, I'll point to you where you can find the answer yourself (of course by reading). Many problems often solve themselves when looking into the code, because there is no oomopa loompahs in your computer that randomly assign numbers to electrode positions each time you call topoplotER. However, I know of some obscure operating systems which actually have oompa loompahs inside them, but that's beside the scope of this e-mail. So, let's have a look at topoplot.m which is, as Ingrid already pointed out several times, the low level function which generates topoplot-related figures. If you search the code for 'electrodes' you hit some relevant code from line 597 onwards. for i=1:size(labels,1) text(y(i), x(i), int2str(i) etc..... end Apparently, the number i converted to a string and plotted on the location (x and y represent the coordinates as specified by lay.pos(:,1), and lay.pos(:,2)). The number i runs from 1 to the number of sensors in your layout. But so far I guess you already found out. If I repeat your little procedure my bottom midline occipital sensor is number 240, and not 289. So I cannot reproduce your finding. Did you already look into the text file NM306all.lay, and check the 240th line? Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Thursday, September 06, 2007 11:53 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] sensor numbers on topoplot Hello, While using topoplot, if one uses cfg.electrodes = 'numbers'; you get a plot with the sensor number written over each of the sensor positions. What do these numbers correspond to? If I look at NM306 layout diagram and locate sensor 2121 (on the midline at the very bottom of the occipital lobe), this corresponds to a sensor number 289 on the topoplot. Yet if I do cfg = []; cfg.layout = 'NM306all.lay'; lay = prepare_layout(cfg) reading layout from file NM306all.lay lay = pos: [308x2 double] width: [308x1 double] height: [308x1 double] label: {308x1 cell} >> lay.label(289) ans = '2533' >> find(strcmp(lay.label,'2121')) ans = 240 Can someone help me understand this? This is necessary to understand how to assign cfg.highlights. Thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 andrew.smart at NYU.EDU Fri Sep 7 21:19:26 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Fri, 7 Sep 2007 15:19:26 -0400 Subject: cfg.highlight using topoplot to show samples in sig clusters In-Reply-To: <01d701c7eb09$b8f05660$642dae83@fcdonders.nl> Message-ID: Hi Ingrid, Thank you very much for the help with topoplot, I really appreciate it. The plotting finally did work using very specific time windows for example: m=[0.18:0.02:0.28]; j=[114:4:171]; (although I am a little unsure if this is ok not starting from sample 1, but it worked) The cluster-based permutation test did reveal an M170 effect in our data that was not coming out significant using more traditional statistical tests. I have two more questions if you have time: 1)Is it possible to compare two groups of subjects of different sizes using the permutation test? Ie a clinical group and a control group where the clinical group has say 9 subj and the control group has 10 subj? 2)Is it possible to do an anova or manova test using the cluster-based permutation test? Or for example to test for interaction effects between group*condition without doing a full anova? Would this require a lot of custom coding or can these be specified in cfg.design? Thank you! andy ----- Original Message ----- From: Ingrid Nieuwenhuis Date: Thursday, August 30, 2007 9:29 am Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to show samples in sig clusters To: FIELDTRIP at NIC.SURFNET.NL > Hi Andrew, > > - where does this size come from if my sample rate is 600?: > The size 267x301 means 267 channels x 301 samples. You have 301 samples > because your latency in timelockanalysis was cfg.latency = [0.0 0.5]; > so > that's 301 samples with sample rate 600 > > Plotting the output from the randomization can be quite tricky, > because you > have 301 moments in time where you can have a cluster. In the tutorial > a > trick was used. There they also had 301 time points, but a sample rate > of > 300 -> spanning one second. If you exactly want to know where the clusters > are you would have to plot all the 301 time points. Because that doesn't > make sense they average over 50 millisecond time windows. If for instance > k=10 -> pos_int = mean(pos(:,m(k):m(k+1))')' -> an average is made over > samples 136-151 time is 0.45-0.5s giving the 10th plot in the figure. > Only > those sensors that are part of the cluster for this whole time window > (all > 15 time points) give out a mean of 1 or -1 and are plotted. In the tutorial > data the cluster was present over a long time window in many sensors, > therefore there were many sensors with 1 or -1. > > For your data this doesn't work, but you do have significant clusters. > > > "I can find the elements of pos and neg that = 1 and = -1 > respectively. > elements =1 are spread out between roughly pos(59:168,149:172) and =-1 > > between neg(152:240,242:270)" > > For instance this means that the positive clusters are in channel > 59:168 at > time points 149:172, with a sample rate of 600 this means from 0.248 to > 0.287 seconds. You should adjust the loop in such a way that you put the > settings that they fit your data. So for instance make the time resolution > higher (by adjusting j and m) since you have clusters that are short lived > in time, and to have not to many plots, plot around the time where you > know > your clusters are. > > Hope this solves your stuck-ness, > Good luck again. > Ingrid > > > > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Andrew Smart > Sent: Wednesday, August 29, 2007 8:02 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to show > samples in sig clusters > > Hi Ingrid again, > Inspecting the variables more I find that the output of the > timelockstatistics on > my data gives: > 28 pos clusters and 36 neg clusters (1 significant pos cluster and 1 > sig neg > > cluster) > > and posclusterslabelmat and negclusterslabelmet as 267x301 (where does > this > size come from if my sample rate is 600?) > > then using > pos = stat.posclusterslabelmat==1; > neg = (stat.negclusterslabelmat==1)*(-1); > > pos and neg are obviously 267x301, > and I can find the elements of pos and neg that = 1 and = -1 > respectively. > elements =1 are spread out between roughly pos(59:168,149:172) and =-1 > > between neg(152:240,242:270). > > however, using > > pos_int = mean(pos(:,m(k):m(k+1))')'; > neg_int = mean(neg(:,m(k):m(k+1))')'; > > in the for loop, gives pos_int as 267x1 but all the elements are zeros. > > and in neg_int some elements are values like -0.1667 for example. > > so for the highlight to work do the values in pos_int and neg_int have > to be > > either 1 or -1? > > i have tried various parameters in m and but nothing i have tried > seems to > work. i am stuck! > > thanks! > andy > > > > > ----- Original Message ----- > From: Ingrid Nieuwenhuis > Date: Wednesday, August 29, 2007 5:12 am > Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to > show > samples in sig clusters > To: FIELDTRIP at NIC.SURFNET.NL > > > Hi Andrew, > > > > You can find the option cfg.highlight in the function topoplot.m, this > > function is called by topoplotER (also by topoplotTFR by the way). > It > > should > > contain the channel numbers which you want to highlight. > > > > Why your plot doesn't give any highlighted sensors is hard to say without > > knowing your data (what did you give in to timelockstatistics with which > > cfg). > > - It could be that the time you plot (0:0.05:0.5) does not contain the > > clusters > > - It could be the specification of m [1:15:301], this is exactly > > copied from > > the tutorial, but it is based on the sample frequency of the data used > > there. In the tutorial a second of data is used, cut up in 21 pieces > from > > 0:0.05:1 and that data has a sample frequency of 301 also cut up in > 21 > > pieces 1:15:301. You should adjust m to you own time settings and sample > > frequency. > > - cfg.highlight = find(pos_int==1|neg_int==-1), what is the outcome > of > > this? > > For the highlighting to work it should contain the sensor numbers to > be > > highlighted. If your m is not specified correctly I would guess that > pos_int > > and neg_int are not specified correctly and cfg.highlight turnes up > empty > > and therefore no highlights are plotted. > > > > Hope this give you some ideas to find out what's wrong. > > > > Good luck, > > Ingrid > > > > > > -----Original Message----- > > From: FieldTrip discussion list [ > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the > FieldTrip toolbox, to share experiences 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://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 andrew.smart at NYU.EDU Fri Sep 7 21:22:06 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Fri, 7 Sep 2007 15:22:06 -0400 Subject: problem w/ cfg.highlight using topoplot to show samples in sig clusters In-Reply-To: <01d701c7eb09$b8f05660$642dae83@fcdonders.nl> Message-ID: i meant to write j=[0.18:0.02:0.28]; m=[114:4:171]; i had those switched ----- Original Message ----- From: Ingrid Nieuwenhuis Date: Thursday, August 30, 2007 9:29 am Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to show samples in sig clusters To: FIELDTRIP at NIC.SURFNET.NL > Hi Andrew, > > - where does this size come from if my sample rate is 600?: > The size 267x301 means 267 channels x 301 samples. You have 301 samples > because your latency in timelockanalysis was cfg.latency = [0.0 0.5]; > so > that's 301 samples with sample rate 600 > > Plotting the output from the randomization can be quite tricky, > because you > have 301 moments in time where you can have a cluster. In the tutorial > a > trick was used. There they also had 301 time points, but a sample rate > of > 300 -> spanning one second. If you exactly want to know where the clusters > are you would have to plot all the 301 time points. Because that doesn't > make sense they average over 50 millisecond time windows. If for instance > k=10 -> pos_int = mean(pos(:,m(k):m(k+1))')' -> an average is made over > samples 136-151 time is 0.45-0.5s giving the 10th plot in the figure. > Only > those sensors that are part of the cluster for this whole time window > (all > 15 time points) give out a mean of 1 or -1 and are plotted. In the tutorial > data the cluster was present over a long time window in many sensors, > therefore there were many sensors with 1 or -1. > > For your data this doesn't work, but you do have significant clusters. > > > "I can find the elements of pos and neg that = 1 and = -1 > respectively. > elements =1 are spread out between roughly pos(59:168,149:172) and =-1 > > between neg(152:240,242:270)" > > For instance this means that the positive clusters are in channel > 59:168 at > time points 149:172, with a sample rate of 600 this means from 0.248 to > 0.287 seconds. You should adjust the loop in such a way that you put the > settings that they fit your data. So for instance make the time resolution > higher (by adjusting j and m) since you have clusters that are short lived > in time, and to have not to many plots, plot around the time where you > know > your clusters are. > > Hope this solves your stuck-ness, > Good luck again. > Ingrid > > > > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Andrew Smart > Sent: Wednesday, August 29, 2007 8:02 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to show > samples in sig clusters > > Hi Ingrid again, > Inspecting the variables more I find that the output of the > timelockstatistics on > my data gives: > 28 pos clusters and 36 neg clusters (1 significant pos cluster and 1 > sig neg > > cluster) > > and posclusterslabelmat and negclusterslabelmet as 267x301 (where does > this > size come from if my sample rate is 600?) > > then using > pos = stat.posclusterslabelmat==1; > neg = (stat.negclusterslabelmat==1)*(-1); > > pos and neg are obviously 267x301, > and I can find the elements of pos and neg that = 1 and = -1 > respectively. > elements =1 are spread out between roughly pos(59:168,149:172) and =-1 > > between neg(152:240,242:270). > > however, using > > pos_int = mean(pos(:,m(k):m(k+1))')'; > neg_int = mean(neg(:,m(k):m(k+1))')'; > > in the for loop, gives pos_int as 267x1 but all the elements are zeros. > > and in neg_int some elements are values like -0.1667 for example. > > so for the highlight to work do the values in pos_int and neg_int have > to be > > either 1 or -1? > > i have tried various parameters in m and but nothing i have tried > seems to > work. i am stuck! > > thanks! > andy > > > > > ----- Original Message ----- > From: Ingrid Nieuwenhuis > Date: Wednesday, August 29, 2007 5:12 am > Subject: Re: [FIELDTRIP] problem w/ cfg.highlight using topoplot to > show > samples in sig clusters > To: FIELDTRIP at NIC.SURFNET.NL > > > Hi Andrew, > > > > You can find the option cfg.highlight in the function topoplot.m, this > > function is called by topoplotER (also by topoplotTFR by the way). > It > > should > > contain the channel numbers which you want to highlight. > > > > Why your plot doesn't give any highlighted sensors is hard to say without > > knowing your data (what did you give in to timelockstatistics with which > > cfg). > > - It could be that the time you plot (0:0.05:0.5) does not contain the > > clusters > > - It could be the specification of m [1:15:301], this is exactly > > copied from > > the tutorial, but it is based on the sample frequency of the data used > > there. In the tutorial a second of data is used, cut up in 21 pieces > from > > 0:0.05:1 and that data has a sample frequency of 301 also cut up in > 21 > > pieces 1:15:301. You should adjust m to you own time settings and sample > > frequency. > > - cfg.highlight = find(pos_int==1|neg_int==-1), what is the outcome > of > > this? > > For the highlighting to work it should contain the sensor numbers to > be > > highlighted. If your m is not specified correctly I would guess that > pos_int > > and neg_int are not specified correctly and cfg.highlight turnes up > empty > > and therefore no highlights are plotted. > > > > Hope this give you some ideas to find out what's wrong. > > > > Good luck, > > Ingrid > > > > > > -----Original Message----- > > From: FieldTrip discussion list [ > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the > FieldTrip toolbox, to share experiences 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://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 Jan.Schoffelen at FCDONDERS.RU.NL Mon Sep 10 14:43:40 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 10 Sep 2007 14:43:40 +0200 Subject: sensor numbers on topoplot Message-ID: Dear Sameer, Let's again have a look at the code together. In topoplotER it states % Draw topoplot: if ~isfield(cfg, 'layout') tmpcfg = cfg; else tmpcfg = rmfield(cfg,'layout'); end topoplot(tmpcfg,chanX,chanY,datavector,chanLabels); (lines 365 onwards) This means the function topoplot is called, and it receives 5 input arguments. Additionally, a potential layout-field in the tmpcfg-structure is removed. This means that the only information topoplot gets regarding the channels, and the data are the ordered vectors chanX, chanY and datavector, and the cell-array chanLabels. When you look a bit back in the code, you'll find out that these variables represent the following things: -chanX = the x-coordinate for the topographical projection -chanY = the y-coordinate for the topographical projection -datavector = the value to be plotted -chanLabels = the name of the corresponding channel. Note that the physical order of the entries within these arrays is not relevant, and as long as you randomly shuffle them all in the same way the resulting topographic representation will not be affected. BUT the actual order in which the channels are ordered does affect the (arbitrary) numbers topoplot connects to these sensors when you specify cfg.electrodes = 'numbers'. As I said in a previous mail, within topoplot there is just a stupid for-loop, which assigns to each electrode a number, using int2str. This procedure is actually blind for the order in which the channel names are specified in the layout-file (and thus the corresponding numbers in the said layout-file), and only reflects the order in which the channels are represented in the data you give as an input to the plotting function. Therefore, it does not make sense to compare the numbers on the topoplot with lay.label, but you should compare them with the label-array in your data. Yours, Jan-Mathijs -----Original Message----- From: Sameer Walawalkar [mailto:sameer at andrew.cmu.edu] Sent: Friday, September 07, 2007 3:46 PM To: Jan Mathijs Schoffelen Subject: Re: [FIELDTRIP] sensor numbers on topoplot Dear Jan-Mathijs, Unfortunately, it seems I was not very clear in my earlier email about my question. The 240th line in NM306all.lay ** is ** 2121, and that is reflected in (as noted in my earlier email) >> find(strcmp(lay.label,'2121')) ans = 240 However the sensor number corresponding to sensor position 2121 on the topoplot generated using topoplot.m ** is not ** 240, it is 289. To clarify my question I have made available a jpeg of the topoplot at issue at the following link http://www.cnbc.cmu.edu/~sameer/Jan_Mathijs/Sensor_Numbers.jpg Please note the sensor number of the bottom midline sensor, it is 289 and not 240 as one would expect from your clarification. 240 is somewhere off to the left temporal area. In fact I picked up the bottom midline as an example. None of the numbers displayed here seem to match up with the line numbers in NM306all.lay. Best, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 Jan.Schoffelen at FCDONDERS.RU.NL Tue Sep 11 14:22:29 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Tue, 11 Sep 2007 14:22:29 +0200 Subject: new implementation of routine to read ctf-data Message-ID: Dear all, As of tomorrow, the release version of fieldtrip will contain a new implementation of read_ctf_meg4, which is the low level function to read ctf-data. The old version did not always correctly handle very big datasets (> 4GB), or even crashed when specific favourable criteria were met. As far as I can see, all works fine (reading in data goes actually faster than before), but please keep your eyes and ears open. Yours, Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 marie at PSY.GLA.AC.UK Thu Sep 13 19:22:43 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Thu, 13 Sep 2007 18:22:43 +0100 Subject: volumewrite Message-ID: Hi, I am trying to output the results of sourceinterpolate to analyze format to read in afni / spm2. The volumewrite function does seem to do this but the orientation of the output mri is not correct when viewed in spm2 / afni (coronal is axial and rotated 90degrees, sagittal is coronal also rotated and axial is sagittal also rotated). I have checked and it seems to display correctly in sourceplot (in that it matches the images shown in the tutorial documentation for beamforming). I am selecting cfg.coordinates = 'cfg' and cfg.filetype = spm in volumewrite and leaving the rest to the defaults. Could there be an orientation error coming in from somewhere and how can I fix it ? Also on a related point, i also tried cfg.filetype = 'analyze' and got quite a different output when viewed in spm. The slices seemed to have been rotated in some way in addition to errors in the orientation. Any advice would be appreciated, Marie ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 Jan.Schoffelen at FCDONDERS.RU.NL Thu Sep 13 22:27:03 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Thu, 13 Sep 2007 22:27:03 +0200 Subject: volumewrite In-Reply-To: Message-ID: Dear Marie, Handling of volume-data is a tricky business, and in particular when different coordinate systems are used. As far as I can see, I'd advice you to use the following configuration, although I am not used to using the volumewrite function (because who would want to visualize the data otherwise than using sourceplot?). cfg.coordinates = 'ctf' (true?): this means that the x-axis runs from back-to-front, the y-axis from right-to-left, and the z-axis from bottom-to-top. On the other hand, an 'spm' coordinate system has it x-axis running from left to right, and the y-axis from back-to-front. This means that at least the first two dimensions of the data-matrix should be swapped, in combination with a subsequent affine-transformation (I suspect some info about transformation-matrices in on the fieldtrip website). This is done when you specify cfg.filetype = 'analyze' instead of 'spm' (relevant code is on the lines beyond line 282 in volumewrite.m. Why this swapping is not applied when specifying cfg.filetype='spm' is a mystery to m, but I guess there's a good reason for it. Summarizing: cfg.coordinates = 'ctf', and cfg.filetype = 'analyze' might help. On the other hand you could stick to sourceplot, which I guess is lacking some functionality, and which is the reason for you to convert it back to analyze (does it by any chance has to do with matching voxels with brain regions ;-)?). Let's implement this soon then. Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Marie Smith Sent: Thursday, September 13, 2007 7:23 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] volumewrite Hi, I am trying to output the results of sourceinterpolate to analyze format to read in afni / spm2. The volumewrite function does seem to do this but the orientation of the output mri is not correct when viewed in spm2 / afni (coronal is axial and rotated 90degrees, sagittal is coronal also rotated and axial is sagittal also rotated). I have checked and it seems to display correctly in sourceplot (in that it matches the images shown in the tutorial documentation for beamforming). I am selecting cfg.coordinates = 'cfg' and cfg.filetype = spm in volumewrite and leaving the rest to the defaults. Could there be an orientation error coming in from somewhere and how can I fix it ? Also on a related point, i also tried cfg.filetype = 'analyze' and got quite a different output when viewed in spm. The slices seemed to have been rotated in some way in addition to errors in the orientation. Any advice would be appreciated, Marie ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 marie at PSY.GLA.AC.UK Fri Sep 14 12:35:13 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Fri, 14 Sep 2007 11:35:13 +0100 Subject: volumewrite, volumenormalize and mri orientations In-Reply-To: <000b01c7f644$720381f0$902dae83@fcdonders.nl> Message-ID: Dear Jan-Mathijs, Thanks for your response. The reason for trying to export the data somewhere else is two-fold. Firstly as you mention to aid localisation to brain regions and secondly as I want to normalise the results of several subjects to a template brain. I've tried both 'analyze' and 'spm' filetype options with quite varying results (see attached pdf, method spm is first). But as you can see neither matches the default spm orientation found in T1.mnc (third). I also had problems using volumenormalise inside fieldtrip and got some very strange results again I think due to a mis-match in orientation between my mri + functional and the T1 template. As I said yesterday, when I use sourceplot the 3 slices seem to match the fieldtrip norm (as depicted in the beamformer tutorial), but checking the .anatomy field of my sourinterpolated data has x running from right to left, y from front to back and z from top to bottom which does not match the ctf system co-ordinates. I am not doing anything to the mri file except loading it in during sourceinterpolate and I am pretty sure it was created correctly in MRIViewer. If you have any further suggestions it would be great, Thanks, Marie P.s. Implementing the brain region matching into sourceplot would be really handy, i tried it out with an older version of the soureplot code but it failed in reading the afni TTaltas file. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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: Various_Vol_write.pdf Type: application/pdf Size: 97396 bytes Desc: not available URL: -------------- next part -------------- On 13 Sep 2007, at 21:27, Jan Mathijs Schoffelen wrote: > Dear Marie, > > Handling of volume-data is a tricky business, and in particular when > different coordinate systems are used. As far as I can see, I'd > advice you > to use the following configuration, although I am not used to using > the > volumewrite function (because who would want to visualize the data > otherwise > than using sourceplot?). > cfg.coordinates = 'ctf' (true?): this means that the x-axis runs from > back-to-front, the y-axis from right-to-left, and the z-axis from > bottom-to-top. > On the other hand, an 'spm' coordinate system has it x-axis running > from > left to right, and the y-axis from back-to-front. This means that > at least > the first two dimensions of the data-matrix should be swapped, in > combination with a subsequent affine-transformation (I suspect some > info > about transformation-matrices in on the fieldtrip website). > This is done when you specify cfg.filetype = 'analyze' instead of > 'spm' > (relevant code is on the lines beyond line 282 in volumewrite.m. > Why this > swapping is not applied when specifying cfg.filetype='spm' is a > mystery to > m, but I guess there's a good reason for it. > Summarizing: cfg.coordinates = 'ctf', and cfg.filetype = 'analyze' > might > help. On the other hand you could stick to sourceplot, which I > guess is > lacking some functionality, and which is the reason for you to > convert it > back to analyze (does it by any chance has to do with matching > voxels with > brain regions ;-)?). Let's implement this soon then. > > Yours, > > Jan-Mathijs > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] > On Behalf > Of Marie Smith > Sent: Thursday, September 13, 2007 7:23 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] volumewrite > > Hi, > > I am trying to output the results of sourceinterpolate to analyze > format to read in afni / spm2. The volumewrite function does seem to > do this but the orientation of the output mri is not correct when > viewed in spm2 / afni (coronal is axial and rotated 90degrees, > sagittal is coronal also rotated and axial is sagittal also rotated). > I have checked and it seems to display correctly in sourceplot (in > that it matches the images shown in the tutorial documentation for > beamforming). > > I am selecting cfg.coordinates = 'cfg' and cfg.filetype = spm in > volumewrite and leaving the rest to the defaults. > Could there be an orientation error coming in from somewhere and how > can I fix it ? > > Also on a related point, i also tried cfg.filetype = 'analyze' and > got quite a different output when viewed in spm. The slices seemed to > have been rotated in some way in addition to errors in the > orientation. > > Any advice would be appreciated, > > Marie > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the > FieldTrip toolbox, to share experiences 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 tomh at KURAGE.NIMH.NIH.GOV Fri Sep 14 19:51:47 2007 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Fri, 14 Sep 2007 13:51:47 -0400 Subject: volumewrite, volumenormalize and mri orientations In-Reply-To: Message-ID: On Fri, 2007-09-14 at 11:35 +0100, Marie Smith wrote: > Dear Jan-Mathijs, > > Thanks for your response. The reason for trying to export the data > somewhere else is two-fold. Firstly as you mention to aid > localisation to brain regions and secondly as I want to normalise the > results of several subjects to a template brain. > One way to do that is to use AFNI. AFNI is free, and you can import matlab volumes. http://afni.nimh.nih.gov/afni/ http://afni.nimh.nih.gov/afni/matlab/ AFNI can warp brains to Talairach space (now automated!) and match to a template, do stats, etc. I'm attaching a thing that writes a source volume from Fieldtrip out as an AFNI BRIK using the matlab tools found on the links above. Dr. Tom -- For in one's heart one loves only one's child and one's work; and where there is great love to oneself, then is it the sign of pregnancy: so have I found it. Thus spoke Zarathustra. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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: writesourcebrik.m Type: text/x-objcsrc Size: 1238 bytes Desc: not available URL: From Jan.Schoffelen at FCDONDERS.RU.NL Mon Sep 17 14:19:56 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 17 Sep 2007 14:19:56 +0200 Subject: volumewrite, volumenormalize and mri orientations In-Reply-To: Message-ID: Dear Marie, I hope that Tom's comments have been helpful. On the other hand, you mention that you have problems with volumenormalise, and since the normalization is one of your goals (and a prerequisite for labeling the cortical areas) I think it would be nice to debug your problem and enable you to stay within fieldtrip. > I've tried both 'analyze' and 'spm' filetype options with quite >varying results (see attached pdf, method spm is first). But as you >can see neither matches the default spm orientation found in T1.mnc >(third). Regarding the results you sent along, it makes a big difference whether the visualization tool just stupidly plots the block of data on the screen, or takes the coordinate system into account. The coordinate system is defined by an affine transformation matrix, and tells you how to toggle between voxel-coordinates and head-coordinates. An original analyze-file does not have an affine matrix attached, so any visualization tool will stupidly plot the block of data on the screen. Spm-based analyze files have the matrix hidden somewhere in the header. Anyway, in order to be able to compare the different outputs, it is crucial that the volumes are defined in the same coordinate-system, thus being spm, rather than ctf based (because this will prohibit comparison with the template). The plotting tool you used apparently takes the affine-matrix into account (if present, so the second one is just the dumb plotting of the block of data), but in addition assumes the analyze xyz-convention which I mentioned last time. Since the ctf affine matrix allows you (or the plotting software) to interpret the voxels in terms of head coordinates according to ctf's convention, this gives you the volume to be rotated by 90 degrees along the z-axis. >I also had problems using volumenormalise inside fieldtrip and got >some very strange results again I think due to a mis-match in >orientation between my mri + functional and the T1 template. As I >said yesterday, when I use sourceplot the 3 slices seem to match the >fieldtrip norm (as depicted in the beamformer tutorial), but checking >the .anatomy field of my sourinterpolated data has x running from >right to left, y from front to back and z from top to bottom which >does not match the ctf system co-ordinates. I am not doing anything >to the mri file except loading it in during sourceinterpolate and I >am pretty sure it was created correctly in MRIViewer. Importantly, there is a difference between the 'x', 'y' and 'z' axes in the sourceplots, since this function 'stupidly' plot the block of data, and is thus voxel-coordinate based, rather than head-coordinate based. So if the anatomies look like those in the fieldtrip tutorial I would be curious to see where your normalization fails. Did you try volumenormalise with cfg.nonlinear = 'no'? This will cause the normalisation to be only a linear one, and makes it run faster, and works typically good enough. Yours, Jan-Mathijs ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 tillmann at MPIH-FRANKFURT.MPG.DE Mon Sep 17 15:49:21 2007 From: tillmann at MPIH-FRANKFURT.MPG.DE (Christine Tillmann) Date: Mon, 17 Sep 2007 15:49:21 +0200 Subject: beamforming & ctf mri files Message-ID: Hey all, I got a question regarding beamforming, specifically reading mri-files. I use ctf_mri files, version 4.1, but it seems that this filetype is not recognized by the read_fcdc_mri/filetype functions. I already tried changing the version number that is required by filetype_check_header. Does anyone know which approach to use best when doing beamforming with ctf mri files? Thanks, Christine ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 tillmann at MPIH-FRANKFURT.MPG.DE Tue Sep 18 17:03:59 2007 From: tillmann at MPIH-FRANKFURT.MPG.DE (Christine Tillmann) Date: Tue, 18 Sep 2007 17:03:59 +0200 Subject: Makefile for Linux 64 Message-ID: Hi, we are trying to get the fieldtrip beamforming on our linux 64 bit systems going. As we understand it, there is currently no way around using spm2. Spm2's mex files however are not compiled for linux 64 bit and the makefile that's available on the web suffers from the tab/space delimiter problem. Does anyone have a makefile for spm2 that works on linux 64 bit? Or, else is there a way around spm2? E.g. by using the output of mriviewer and the localspheres command directly? Or by beamforming in CTF and feeding its output to sourcestatistics? And one last thing: does anyone use the mri files from trhe CTF-MRIviewer that came with version 5.4.0 yet? Thanks, Christine ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 andrew.smart at NYU.EDU Tue Sep 18 22:54:47 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Tue, 18 Sep 2007 22:54:47 +0200 Subject: NuAmps 40 Channel Quik-Cap Message-ID: Does anyone happen to have a layout.lay file for a Neuroscan NuAmps 40 Channel Quik-Cap? Thanks, andy ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 rsalazar at NERVANA.MONTANA.EDU Thu Sep 20 17:56:19 2007 From: rsalazar at NERVANA.MONTANA.EDU (Rodrigo F. Salazar) Date: Thu, 20 Sep 2007 09:56:19 -0600 Subject: clusterrandanalysis input format Message-ID: Hi, I am new to fieldtrip and I am working with intracortical data. I have never used any function of fieldtrip and I would like to use clusterrandanalysis.m using my own data format. I cannot find a clear description of the input needed for that function. Can someone quickly describe the input format or even send me an example of input data? Thanks, Rodrigo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 p.cornelissen at PSYCH.YORK.AC.UK Thu Sep 20 18:14:21 2007 From: p.cornelissen at PSYCH.YORK.AC.UK (Piers Cornelissen) Date: Thu, 20 Sep 2007 18:14:21 +0200 Subject: Extracting data from singleplot TFR Message-ID: Dear all, I would like to get access to the values produced by singleplotTFR that go into the contour plots. Normally, I understand that a sequence like this: h = plot(y,x) hgsave(h,'plot_fig.fig') a = load('plot_fig.fig','-mat') should allow one to access the datastructure in a plot. However, when I tried hgsave with singleplotTFR I got the following error message: ??? Error using ==> hgsave Invalid handle Please can you advise how I get to the data. Thanks Piers 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. From maris at NICI.RU.NL Thu Sep 20 21:16:49 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 20 Sep 2007 21:16:49 +0200 Subject: clusterrandanalysis input format In-Reply-To: Message-ID: Hi Rodrigo, I am new to fieldtrip and I am working with intracortical data. I have never used any function of fieldtrip and I would like to use clusterrandanalysis.m using my own data format. I cannot find a clear description of the input needed for that function. Can someone quickly describe the input format or even send me an example of input data? I'm afraid that this is not possible. You first have to run preprocessing.m on your raw data (as produced by your acquisition system) and then timelockanalysis.m or freqanalysis.m (depending on whether you want to test evoked responses or induced oscillatory activity). Clusterrandanalysis is the last step. (For an analysis over subjects, you also have to run timelockgrandaverage.m or freqgrandaverage.m.) My advice is to only use Fieldtrip if you want to invest some time in it. The reward is an extremely versatile set of data analysis tools. Have look at our tutorials. Good luck, Eric Maris Thanks, Rodrigo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list 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 vvw at CALTECH.EDU Fri Sep 21 03:06:18 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Thu, 20 Sep 2007 18:06:18 -0700 Subject: layout and topoplotTFR Message-ID: Hi all anyone could help me out on this? I have tripled-check all structure that may contain the labels and other parameters related to the layout of the channels and they are all (seemingly?) identical (same # of channels, same labels, etc..) including stat.cfg.version.id... Yet, when it comes to plotting using topoplotTFR (which I have used without problems in the past for very similar to identical set of data!) I get the following: reverting to 151 channel CTF default ??? Error using ==> topoplotER at 303 labels in data and labels in layout do not match Error in ==> topoplotTFR at 85 topoplotER(cfg, varargin{:}); Now, these are EEG (BESA) data so CTF is obviously not appropriate :) What am I missing? Thanks in advance! Virginie Virginie van Wassenhove, PhD ::::::::::::::::::::::::::::::::::::::::::::::::: Caltech - Division of Biology 1200 E. California Blvd M/C 139-74 Pasadena CA 91125 USA ::::::::::::::::::::::::::::::::::::::::::::::::: vvw at caltech.edu Virginie.van.Wassenhove at gmail.com W: 626.395.8959 http://www.its.caltech.edu/~vvw ::::::::::::::::::::::::::::::::::::::::::::::::: ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 c.hesse at FCDONDERS.RU.NL Fri Sep 21 09:03:38 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 21 Sep 2007 09:03:38 +0200 Subject: layout and topoplotTFR In-Reply-To: <20070921010618.A26A513B67@wood-ox.its.caltech.edu> Message-ID: Hi Virginie, are you using an appropriate layout file to generate the layout? Christian On 21 Sep 2007, at 03:06, Virginie van Wassenhove wrote: > Hi all > > anyone could help me out on this? > > I have tripled-check all structure that may contain the labels and > other parameters related to the layout of the channels and they are > all (seemingly?) identical (same # of channels, same labels, etc..) > including stat.cfg.version.id... > Yet, when it comes to plotting using topoplotTFR (which I have used > without problems in the past for very similar to identical set of > data!) I get the following: > > reverting to 151 channel CTF default > ??? Error using ==> topoplotER at 303 > labels in data and labels in layout do not match > Error in ==> topoplotTFR at 85 > topoplotER(cfg, varargin{:}); > > > Now, these are EEG (BESA) data so CTF is obviously not appropriate :) > What am I missing? > > Thanks in advance! > Virginie > > > > Virginie van Wassenhove, PhD > ::::::::::::::::::::::::::::::::::::::::::::::::: > Caltech - Division of Biology > 1200 E. California Blvd M/C 139-74 > Pasadena CA 91125 USA > ::::::::::::::::::::::::::::::::::::::::::::::::: > vvw at caltech.edu > Virginie.van.Wassenhove at gmail.com > W: 626.395.8959 > http://www.its.caltech.edu/~vvw > ::::::::::::::::::::::::::::::::::::::::::::::::: > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences 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. > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri Sep 21 10:03:46 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 21 Sep 2007 10:03:46 +0200 Subject: Extracting data from singleplot TFR In-Reply-To: Message-ID: Dear Piers singleplotTFR uses imagesc to do the plotting. Before that it selects the appropriate 2D (time-frequency) tile from the data. I'm not familiar with hgsave, but singleplotTFR is not a complicated function, so I'd advise you to look into the code and you can probably easily get access to the values by debugging. More info on the FieldTrip plotting functions can be found on documentation > tutorial > plotting: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu torial:plotting Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Piers Cornelissen Sent: Thursday, September 20, 2007 6:14 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Extracting data from singleplot TFR Dear all, I would like to get access to the values produced by singleplotTFR that go into the contour plots. Normally, I understand that a sequence like this: h = plot(y,x) hgsave(h,'plot_fig.fig') a = load('plot_fig.fig','-mat') should allow one to access the datastructure in a plot. However, when I tried hgsave with singleplotTFR I got the following error message: ??? Error using ==> hgsave Invalid handle Please can you advise how I get to the data. Thanks Piers 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. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 mahdi.mahmoudzadeh at FCDONDERS.RU.NL Fri Sep 21 13:26:39 2007 From: mahdi.mahmoudzadeh at FCDONDERS.RU.NL (Mahdi Mahmoudzadeh) Date: Fri, 21 Sep 2007 13:26:39 +0200 Subject: tutorial_beamformer Message-ID: Hi, I am working on Fieldtrip tutorial. In the section localizing oscillatory sourse using beamformer techniques(forward model and lead field matrix), when I exceute this code: mri = read_fcdc_mri('Subject01.mri'); cfg = []; cfg.name = 'segment'; cfg.write = 'yes'; cfg.coordinates = 'ctf'; [segmentedmri] = volumesegment(cfg, mri); there is an error : ??? Error using ==> spm_platform>init_platform GLNXA64 not supported architecture for SPM Error in ==> spm_platform at 64 if isempty(SPM_PLATFORM), init_platform, end Error in ==> spm_vol_minc at 80 if ~spm_platform('bigend') & datatype~=2 & datatype~=2+128, datatype = datatype*256; end; Error in ==> spm_vol>subfunc at 99 if isempty(n), V=spm_vol_minc(p); Error in ==> spm_vol>subfunc1 at 62 v = subfunc(P(i,:)); Error in ==> spm_vol>subfunc2 at 51 V = subfunc1(P); Error in ==> spm_vol at 37 V = subfunc2(P); Error in ==> spm_segment>init_sp at 566 SP.VB = spm_vol(flags.priors); Error in ==> spm_segment at 91 SP = init_sp(flags.estimate,VF,PG); Error in ==> volumesegment at 246 spm_segment(Va,cfg.template,flags); How can I solve this problem? Thank you very much in advance. Mahdi ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 rsalazar at NERVANA.MONTANA.EDU Fri Sep 21 19:15:36 2007 From: rsalazar at NERVANA.MONTANA.EDU (Rodrigo F. Salazar) Date: Fri, 21 Sep 2007 11:15:36 -0600 Subject: clusterrandanalysis input format In-Reply-To: Message-ID: Hi Eric, Thanks for your quick reply. I scanned the tutorials and I could not find one that is using clusterrandanalysis.m. I only found a matlab script named: "Apply clusterrandanalysis on TFRs of power that were computed with BESA" but as it is only a script I cannot access the data. So far I was capable to run freqanalysis.m by adapting my data to the format described in the documentation. However, when I run clusterranalaysis.m with the output of freqanalysis.m being 'freq' [clusrand] = clusterrandanalysis(cfg2,freq,freq); % I am using twice 'freq' as a test run with cfg2.statistic: 'indepsamplesZcoh' , I keep on getting errors such as : ??? Reference to non-existent field 'dof'. Error in ==> fieldtrip-lite-20070920/private/clusterrandstatistics at 680 dofc1=reshape(sum(data.dof(replselc1,:,:),1), 1,nfreq,ntime); And if I had the option: cfg.calcdof = 'yes' to get the degree of freedom, I get this other error: ??? Undefined function or variable "cumtapcnt". Error in ==> freqanalysis_mtmfft at 389 if calcdof && ~exist(cumtapcnt) Could you please tell if I am using a wrong configuration variable or if there is a problem in the code? Thanks, Rodrigo. On Sep 20, 2007, at 9:56 AM, Rodrigo F. Salazar wrote: > Hi, > > I am new to fieldtrip and I am working with intracortical data. I > have never used any function of fieldtrip and I would like to use > clusterrandanalysis.m using my own data format. I cannot find a > clear description of the input needed for that function. Can > someone quickly describe the input format or even send me an > example of input data? > > Thanks, > > Rodrigo. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Rodrigo F. Salazar, Ph.D > Post-doctoral Fellow > Lewis Hall 1, > Center for Computational Biology > Montana State University > Bozeman, 59717 MT, USA > Phone: ++1 (406) 994 71 90, > Fax: ++1 (406) 994 74 38 > email: rsalazar at nervana.montana.edu > http://cns.montana.edu/~rsalazar/ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > ---------------------------------- > > The aim of this list 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/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 vvw at CALTECH.EDU Fri Sep 21 22:36:35 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Fri, 21 Sep 2007 13:36:35 -0700 Subject: layout and topoplotTFR In-Reply-To: Message-ID: Hi Christian, yes I was using the correct layout file etc... Just solved the issue now, which was a misspelling of a couple variables that must have created random errors. Next time I watch my keyboard when typing ;-) Thanks /vv At 12:03 AM 9/21/2007, Christian Hesse wrote: >Hi Virginie, > >are you using an appropriate layout file to generate the layout? > >Christian > > > >On 21 Sep 2007, at 03:06, Virginie van Wassenhove wrote: > >>Hi all >> >>anyone could help me out on this? >> >>I have tripled-check all structure that may contain the labels and >>other parameters related to the layout of the channels and they are >>all (seemingly?) identical (same # of channels, same labels, etc..) >>including stat.cfg.version.id... >>Yet, when it comes to plotting using topoplotTFR (which I have used >>without problems in the past for very similar to identical set of >>data!) I get the following: >> >>reverting to 151 channel CTF default >>??? Error using ==> topoplotER at 303 >>labels in data and labels in layout do not match >>Error in ==> topoplotTFR at 85 >>topoplotER(cfg, varargin{:}); >> >> >>Now, these are EEG (BESA) data so CTF is obviously not appropriate :) >>What am I missing? >> >>Thanks in advance! >>Virginie >> >> >> >>Virginie van Wassenhove, PhD >>::::::::::::::::::::::::::::::::::::::::::::::::: >>Caltech - Division of Biology >>1200 E. California Blvd M/C 139-74 >>Pasadena CA 91125 USA >>::::::::::::::::::::::::::::::::::::::::::::::::: >>vvw at caltech.edu >>Virginie.van.Wassenhove at gmail.com >>W: 626.395.8959 >>http://www.its.caltech.edu/~vvw >>::::::::::::::::::::::::::::::::::::::::::::::::: >> >>---------------------------------- >>The aim of this list is to facilitate the discussion between users >>of the FieldTrip toolbox, to share experiences 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. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD ::::::::::::::::::::::::::::::::::::::::::::::::: Caltech - Division of Biology 1200 E. California Blvd M/C 139-74 Pasadena CA 91125 USA ::::::::::::::::::::::::::::::::::::::::::::::::: vvw at caltech.edu Virginie.van.Wassenhove at gmail.com W: 626.395.8959 http://www.its.caltech.edu/~vvw ::::::::::::::::::::::::::::::::::::::::::::::::: ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 sameer at ANDREW.CMU.EDU Fri Sep 21 22:53:41 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 21 Sep 2007 16:53:41 -0400 Subject: clusterrandanalysis input format In-Reply-To: Message-ID: Hi Rodrigo, Maybe this will help. http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:clusterrandanalysis best, sameer On Fri, 21 Sep 2007, Rodrigo F. Salazar wrote: > Hi Eric, > > Thanks for your quick reply. I scanned the tutorials and I could not find one > that is using clusterrandanalysis.m. I only found a matlab script named: > > "Apply clusterrandanalysis on TFRs of power that were computed with BESA" > > but as it is only a script I cannot access the data. > > So far I was capable to run freqanalysis.m by adapting my data to the format > described in the documentation. However, when I run clusterranalaysis.m with > the output of freqanalysis.m being 'freq' > > [clusrand] = clusterrandanalysis(cfg2,freq,freq); % I am using twice 'freq' > as a test run with cfg2.statistic: 'indepsamplesZcoh' > > , I keep on getting errors such as : > > ??? Reference to non-existent field 'dof'. > > Error in ==> fieldtrip-lite-20070920/private/clusterrandstatistics at 680 > dofc1=reshape(sum(data.dof(replselc1,:,:),1),1,nfreq,ntime); > > And if I had the option: > > cfg.calcdof = 'yes' > > to get the degree of freedom, I get this other error: > > ??? Undefined function or variable "cumtapcnt". > > Error in ==> freqanalysis_mtmfft at 389 > if calcdof && ~exist(cumtapcnt) > > Could you please tell if I am using a wrong configuration variable or if > there is a problem in the code? > > Thanks, > > Rodrigo. > > > On Sep 20, 2007, at 9:56 AM, Rodrigo F. Salazar wrote: > >> Hi, >> >> I am new to fieldtrip and I am working with intracortical data. I have >> never used any function of fieldtrip and I would like to use >> clusterrandanalysis.m using my own data format. I cannot find a clear >> description of the input needed for that function. Can someone quickly >> describe the input format or even send me an example of input data? >> >> Thanks, >> >> Rodrigo. >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> Rodrigo F. Salazar, Ph.D >> Post-doctoral Fellow >> Lewis Hall 1, >> Center for Computational Biology >> Montana State University >> Bozeman, 59717 MT, USA >> Phone: ++1 (406) 994 71 90, >> Fax: ++1 (406) 994 74 38 >> email: rsalazar at nervana.montana.edu >> http://cns.montana.edu/~rsalazar/ >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> >> >> >> >> >> ---------------------------------- >> >> The aim of this list 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/ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Rodrigo F. Salazar, Ph.D > Post-doctoral Fellow > Lewis Hall 1, > Center for Computational Biology > Montana State University > Bozeman, 59717 MT, USA > Phone: ++1 (406) 994 71 90, > Fax: ++1 (406) 994 74 38 > email: rsalazar at nervana.montana.edu > http://cns.montana.edu/~rsalazar/ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences 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 c.hesse at FCDONDERS.RU.NL Sat Sep 22 10:46:43 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Sat, 22 Sep 2007 10:46:43 +0200 Subject: layout and topoplotTFR In-Reply-To: <20070921203635.5D799135E0@wood-ox.its.caltech.edu> Message-ID: Glad it's sorted :-) Christian On 21 Sep 2007, at 22:36, Virginie van Wassenhove wrote: > Hi Christian, > yes I was using the correct layout file etc... Just solved the > issue now, which was a misspelling of a couple variables that must > have created random errors. Next time I watch my keyboard when > typing ;-) > Thanks /vv > > At 12:03 AM 9/21/2007, Christian Hesse wrote: >> Hi Virginie, >> >> are you using an appropriate layout file to generate the layout? >> >> Christian >> >> >> >> On 21 Sep 2007, at 03:06, Virginie van Wassenhove wrote: >> >>> Hi all >>> >>> anyone could help me out on this? >>> >>> I have tripled-check all structure that may contain the labels >>> and other parameters related to the layout of the channels and >>> they are all (seemingly?) identical (same # of channels, same >>> labels, etc..) including stat.cfg.version.id... >>> Yet, when it comes to plotting using topoplotTFR (which I have >>> used without problems in the past for very similar to identical >>> set of data!) I get the following: >>> >>> reverting to 151 channel CTF default >>> ??? Error using ==> topoplotER at 303 >>> labels in data and labels in layout do not match >>> Error in ==> topoplotTFR at 85 >>> topoplotER(cfg, varargin{:}); >>> >>> >>> Now, these are EEG (BESA) data so CTF is obviously not >>> appropriate :) >>> What am I missing? >>> >>> Thanks in advance! >>> Virginie >>> >>> >>> >>> Virginie van Wassenhove, PhD >>> ::::::::::::::::::::::::::::::::::::::::::::::::: >>> Caltech - Division of Biology >>> 1200 E. California Blvd M/C 139-74 >>> Pasadena CA 91125 USA >>> ::::::::::::::::::::::::::::::::::::::::::::::::: >>> vvw at caltech.edu >>> Virginie.van.Wassenhove at gm >>> ail.com >>> W: 626.395.8959 >>> http://www.its.caltech.edu/~vvw >>> ::::::::::::::::::::::::::::::::::::::::::::::::: >>> >>> ---------------------------------- >>> The aim of this list is to facilitate the discussion between >>> users of the FieldTrip toolbox, to share experiences and to >>> discuss new ideas for MEG and EEG analysis. See also >> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>> listserv.surfnet.nl/archives/fieldtrip.html and >> fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ > > Virginie van Wassenhove, PhD > ::::::::::::::::::::::::::::::::::::::::::::::::: > Caltech - Division of Biology > 1200 E. California Blvd M/C 139-74 > Pasadena CA 91125 USA > ::::::::::::::::::::::::::::::::::::::::::::::::: > vvw at caltech.edu > Virginie.van.Wassenhove at gmail.com > W: 626.395.8959 > http://www.its.caltech.edu/~vvw > ::::::::::::::::::::::::::::::::::::::::::::::::: > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences 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. > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maris at NICI.RU.NL Sun Sep 23 16:31:20 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Sun, 23 Sep 2007 16:31:20 +0200 Subject: clusterrandanalysis input format In-Reply-To: Message-ID: Dear Rodrigo Salazar and Sameer Walawalkar, You are both involved in similar analyses, and therefore I address you both. 1. There was a bug in the latest version of freqanalysis_mtmfft, which caused the error message in Rodrigo's analysis. Sameer used an older version of freqanalysis_mtmfft, in which this bug was not yet present. I have corrected the bug and within a couple of days you can download the new m-file from the FT homepage. 2. There were a few bugs in the private function clusterrandstatistics.m related to the postprocessing of the results of a onesided statistical test. I have corrected these bugs. I now obtain identical p-values for the elements of posclusters in (1) a twosided analysis with cfg.alphathresh=0.05 and (2) a onesided analysis (cfg.onetwo=onesided_1<2) with cfg.alphathresh=0.025, as it should be. Similarly, I now obtain identical p-values for the elements of negclusters in (1) a twosided analysis with cfg.alphathresh=0.05 and (2) a onesided analysis (cfg.onetwo=onesided_2<1) with cfg.alphathresh=0.025, again as it should be. 3. Sameer has selected channel combinations by specifying cfg.channelcmb={refchan 'MEG'}. This only gives you the channel pairs in which your reference channel is in the first position. As a result, you will not select the channel pairs in which the reference channel is in the second position. I must admit that I was not aware of this problem. I advise you to use the labelcmb-field in the output of freqanalysis. From this field, you can easily select those channel pairs in which the reference channel is in either the first or the second position, and pass this selection via the cfg.channelcmb-field. Good luck, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience : www.ru.nl/master/cns/ _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Rodrigo F. Salazar Sent: Friday, September 21, 2007 7:16 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandanalysis input format Hi Eric, Thanks for your quick reply. I scanned the tutorials and I could not find one that is using clusterrandanalysis.m. I only found a matlab script named: "Apply clusterrandanalysis on TFRs of power that were computed with BESA" but as it is only a script I cannot access the data. So far I was capable to run freqanalysis.m by adapting my data to the format described in the documentation. However, when I run clusterranalaysis.m with the output of freqanalysis.m being 'freq' [clusrand] = clusterrandanalysis(cfg2,freq,freq); % I am using twice 'freq' as a test run with cfg2.statistic: 'indepsamplesZcoh' , I keep on getting errors such as : ??? Reference to non-existent field 'dof'. Error in ==> fieldtrip-lite-20070920/private/clusterrandstatistics at 680 dofc1=reshape(sum(data.dof(replselc1,:,:),1),1,nfreq,ntime); And if I had the option: cfg.calcdof = 'yes' to get the degree of freedom, I get this other error: ??? Undefined function or variable "cumtapcnt". Error in ==> freqanalysis_mtmfft at 389 if calcdof && ~exist(cumtapcnt) Could you please tell if I am using a wrong configuration variable or if there is a problem in the code? Thanks, Rodrigo. On Sep 20, 2007, at 9:56 AM, Rodrigo F. Salazar wrote: Hi, I am new to fieldtrip and I am working with intracortical data. I have never used any function of fieldtrip and I would like to use clusterrandanalysis.m using my own data format. I cannot find a clear description of the input needed for that function. Can someone quickly describe the input format or even send me an example of input data? Thanks, Rodrigo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list 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/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list 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 wibral at MPIH-FRANKFURT.MPG.DE Mon Sep 24 09:51:04 2007 From: wibral at MPIH-FRANKFURT.MPG.DE (Michael Wibral) Date: Mon, 24 Sep 2007 09:51:04 +0200 Subject: No subject Message-ID: Hi Mahdi, the error message means that you are trying to use spm2 (via fieldtrip) on a 64bit linux system. The mex functions in spm2 are not supported on this platform, meaning you have to recompile them. Here is a link on how to do this, if you are familiar with compiling c-code: http://en.wikibooks.org/wiki/SPM/Installation_on_64bit_Linux beware that the Makefile and the platform-file listed on that page can not be simply copied and pasted as several staements in a make file have to start with a tab (the lines that are indendented to the right, these are actually called 'rules'). If you copy and paste tab get converted to multiple spaces, which doesn't work then. Maybe you can ask John Ashburner acopy of their current makefile. As a workaround, run that part of the tutorial on a 32bit (windows or linux) machine. Good luck and let me know if it works, Michael ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Mon Sep 24 20:39:14 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 24 Sep 2007 14:39:14 -0400 Subject: clusterrandanalysis input format In-Reply-To: <043b01c7fdee$691d7350$bb2dae83@fcdonders.nl> Message-ID: Dear Eric, Following your suggestion I used labelcmb field from the output of freqanalysis to choose combinations with the refchannel in both first and second position. cfg.channelcmb was a 305x2 cell array. Yet, after clusterandanalysis, posclusterslabelmat: [205x13 double] negclusterslabelmat: [205x13 double] (and not with dimensions [306xnumber of freqs]). It reflects the fact (I think) that the first 205 combinations in cfg.channelcmb have the refchannel in the first position and the rest of the 100 combinations have it in the second position. This size of posclusterslabelmat and negclusterslabelmat (205x13) is what I get from using cfg.channelcmb = {refchannel MEG} So I am not sure your suggestion is the solution. (Also, from your email, I dont think this requires a newer corrected version of clusterandanalysis.m). Best, sameer On Sun, 23 Sep 2007, Eric Maris wrote: > Dear Rodrigo Salazar and Sameer Walawalkar, > > > > > > You are both involved in similar analyses, and therefore I address you both. > > > > 1. There was a bug in the latest version of freqanalysis_mtmfft, which > caused the error message in Rodrigo's analysis. Sameer used an older version > of freqanalysis_mtmfft, in which this bug was not yet present. I have > corrected the bug and within a couple of days you can download the new > m-file from the FT homepage. > 2. There were a few bugs in the private function > clusterrandstatistics.m related to the postprocessing of the results of a > onesided statistical test. I have corrected these bugs. I now obtain > identical p-values for the elements of posclusters in (1) a twosided > analysis with cfg.alphathresh=0.05 and (2) a onesided analysis > (cfg.onetwo=onesided_1<2) with cfg.alphathresh=0.025, as it should be. > Similarly, I now obtain identical p-values for the elements of negclusters > in (1) a twosided analysis with cfg.alphathresh=0.05 and (2) a onesided > analysis (cfg.onetwo=onesided_2<1) with cfg.alphathresh=0.025, again as it > should be. > 3. Sameer has selected channel combinations by specifying > cfg.channelcmb={refchan 'MEG'}. This only gives you the channel pairs in > which your reference channel is in the first position. As a result, you will > not select the channel pairs in which the reference channel is in the second > position. I must admit that I was not aware of this problem. I advise you to > use the labelcmb-field in the output of freqanalysis. From this field, you > can easily select those channel pairs in which the reference channel is in > either the first or the second position, and pass this selection via the > cfg.channelcmb-field. > > > > > > Good luck, > > > > Eric Maris > > > > dr. Eric Maris > > NICI/Biological Psychology and > > F.C. Donders Center for Cognitive NeuroImaging > > University of Nijmegen > > P.O. Box 9104 > > 6500 HE Nijmegen > > The Netherlands > > T:+31 24 3612651 (NICI) > > T:+31 24 3610754 (FCDC) > > F:+31 24 3616066 (NICI) > > E: maris at nici.ru.nl > > MSc Cognitive Neuroscience : > www.ru.nl/master/cns/ > > > > > > > > > > _____ > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Rodrigo F. Salazar > Sent: Friday, September 21, 2007 7:16 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] clusterrandanalysis input format > > > > Hi Eric, > > > > Thanks for your quick reply. I scanned the tutorials and I could not find > one that is using clusterrandanalysis.m. I only found a matlab script named: > > > > "Apply clusterrandanalysis on TFRs of power that were computed with BESA" > > > > but as it is only a script I cannot access the data. > > > > So far I was capable to run freqanalysis.m by adapting my data to the format > described in the documentation. However, when I run clusterranalaysis.m with > the output of freqanalysis.m being 'freq' > > > > [clusrand] = clusterrandanalysis(cfg2,freq,freq); % I am using twice 'freq' > as a test run with cfg2.statistic: 'indepsamplesZcoh' > > > > , I keep on getting errors such as : > > > > ??? Reference to non-existent field 'dof'. > > > > Error in ==> fieldtrip-lite-20070920/private/clusterrandstatistics at 680 > > dofc1=reshape(sum(data.dof(replselc1,:,:),1),1,nfreq,ntime); > > > > And if I had the option: > > > > cfg.calcdof = 'yes' > > > > to get the degree of freedom, I get this other error: > > > > ??? Undefined function or variable "cumtapcnt". > > > > Error in ==> freqanalysis_mtmfft at 389 > > if calcdof && ~exist(cumtapcnt) > > > > Could you please tell if I am using a wrong configuration variable or if > there is a problem in the code? > > > > Thanks, > > > > Rodrigo. > > > > > > On Sep 20, 2007, at 9:56 AM, Rodrigo F. Salazar wrote: > > > > > > Hi, > > > > I am new to fieldtrip and I am working with intracortical data. I have never > used any function of fieldtrip and I would like to use clusterrandanalysis.m > using my own data format. I cannot find a clear description of the input > needed for that function. Can someone quickly describe the input format or > even send me an example of input data? > > > > Thanks, > > > > Rodrigo. > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Rodrigo F. Salazar, Ph.D > > Post-doctoral Fellow > > Lewis Hall 1, > > Center for Computational Biology > > Montana State University > > Bozeman, 59717 MT, USA > > Phone: ++1 (406) 994 71 90, > > Fax: ++1 (406) 994 74 38 > > email: rsalazar at nervana.montana.edu > > http://cns.montana.edu/~rsalazar/ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > > > > > > > > > > ---------------------------------- > > The aim of this list 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/ > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Rodrigo F. Salazar, Ph.D > > Post-doctoral Fellow > > Lewis Hall 1, > > Center for Computational Biology > > Montana State University > > Bozeman, 59717 MT, USA > > Phone: ++1 (406) 994 71 90, > > Fax: ++1 (406) 994 74 38 > > email: rsalazar at nervana.montana.edu > > http://cns.montana.edu/~rsalazar/ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > > > > > > > > > > ---------------------------------- > > The aim of this list 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. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 andrew.smart at NYU.EDU Mon Sep 24 23:45:16 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Mon, 24 Sep 2007 23:45:16 +0200 Subject: permutation test for more than 2 conditions Message-ID: Hi, I would like to test for a main effect using the cluster-based permutation test (a one-way ANOVA?) I have set up the design matrix as follows: subj=16; design=zeros(2,3*subj); for i=1:subj design(1,i)=i; end for i=1:subj design(1,subj+i)=i; end for i=1:subj design(1,subj*2+i)=i; end design(2,1:subj)=1; design(2,subj+1:2*subj)=2; design(2,subj*2+1:3*subj)=3; cfg.design = design; cfg.uvar=1; cfg.ivar=2; and the cfg has cfg.statistic = 'depsamplesF'; cfg.tail=1; cfg.alpha = 0.05; cfg.numrandomization = 500; The following error comes up in statfun_depsamplesF: Undefined function or method 'finv' for input arguments of type 'double'. from these lines: if cfg.tail==1 s.critval = ((nunits-1).*ncontrasts./(nunits-ncontrasts)).*finv(1-cfg.alpha,s.dfnum,s.dfdenom); end; And then it crashes because it cannot determine the parametric critical value for clustering. What is "finv"? Thank you for any help, andy ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 jgross at UNI-DUESSELDORF.DE Tue Sep 25 12:55:06 2007 From: jgross at UNI-DUESSELDORF.DE (Joachim Gross) Date: Tue, 25 Sep 2007 12:55:06 +0200 Subject: MEG Position in Glasgow Message-ID: UNIVERSITY of GLASGOW DEPARTMENT OF PSYCHOLOGY Centre for Cognitive Neuroimaging (CCNi) POSTDOCTORAL RESEARCH ASSISTANT �22,774 - �25,633 or �25,889 - �31,840 per annum REF: 13696/DPO/A3 A strategic priority of the University is the current creation within the Department of Psychology of a Centre for Cognitive Neuroimaging (CCNi), a major initiative to install an in-house platform of complementary, state-of-the-art brain imaging facilities dedicated to Cognitive Neuroscience research. Equipment will include a 3T fMRI scanner, a MEG system, a TMS system, and several EEG systems – including fMRI compatible systems. Applications are invited for a Postdoctoral Research Assistant to work in the Magnetoencephalography (MEG) group in the newly established CCNi. The successful candidate will receive specialist training from 4D Neuroimaging company and will be responsible for the first-line maintenance of the MEG system. Further responsibilities include the integration and testing of additional stimulation and recording hardware and optimization of analysis procedures. You will have the opportunity to: contribute to the setup and handling of a state of the art MEG system; be involved in data acquisition; play a leading role in research collaborations with 4D Neuroimaging company. You will be qualified, with a PhD, or equivalent, in Electrical Engineering, Neuroinformatics, Physics, Psychology, Neuroscience or a related discipline. Expertise in handling technical equipment and advanced programming skills (preferably with MATLAB) are essential. Experience with MEG/EEG equipment is highly desirable. This post is available from 1 December 2007 and funding is available for 36 months initially. Salary scale will depend on experience (level 6: �22,774 - �25,633 or level 7: �25,889 - �31,840). Informal enquiries may be made to Professor J Gross, (+44 (0) 141 330 3947; or email j.gross at psy.gla.ac.uk. For further details about the post and how to apply: See our website at http://www.psy.gla.ac.uk/jobs.php or contact Clare Alexander, Department of Psychology, University of Glasgow, G12 8QQ (+44 (0) 141 330 5090, email: c.alexander at psy.gla.ac.uk . For an application pack, please see our website at www.gla.ac.uk. Applications comprising applicant information form, cv, covering letter, list of publications and names and contact details of two referees should be sent to: Clare Alexander at the above address. Closing date: 17 October 2007. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 andrew.smart at NYU.EDU Tue Sep 25 21:33:03 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Tue, 25 Sep 2007 15:33:03 -0400 Subject: permutation test for more than 2 conditions In-Reply-To: Message-ID: Hi, I found finv.m in the statistics toolbox and the test seems to work, but any advice is greatly appreciated! thanks andy ----- Original Message ----- From: Andrew Smart Date: Monday, September 24, 2007 5:45 pm Subject: [FIELDTRIP] permutation test for more than 2 conditions To: FIELDTRIP at NIC.SURFNET.NL > Hi, > I would like to test for a main effect using the cluster-based > permutation test (a one-way ANOVA?) > > I have set up the design matrix as follows: > > subj=16; > design=zeros(2,3*subj); > for i=1:subj > design(1,i)=i; > end > for i=1:subj > design(1,subj+i)=i; > end > for i=1:subj > design(1,subj*2+i)=i; > end > design(2,1:subj)=1; > design(2,subj+1:2*subj)=2; > design(2,subj*2+1:3*subj)=3; > > cfg.design = design; > cfg.uvar=1; > cfg.ivar=2; > > > and the cfg has > > cfg.statistic = 'depsamplesF'; > cfg.tail=1; > cfg.alpha = 0.05; > cfg.numrandomization = 500; > > The following error comes up in statfun_depsamplesF: > Undefined function or method 'finv' for input arguments of type 'double'. > from these lines: > if cfg.tail==1 > s.critval = ((nunits-1).*ncontrasts./(nunits-ncontrasts)).*finv(1- cfg.alpha,s.dfnum,s.dfdenom); > end; > > And then it crashes because it cannot determine the parametric > critical value for clustering. What > is "finv"? > > Thank you for any help, > andy > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of > the FieldTrip toolbox, to share experiences and to discuss new ideas > for MEG and EEG analysis. See also ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 rsalazar at NERVANA.MONTANA.EDU Wed Sep 26 00:32:24 2007 From: rsalazar at NERVANA.MONTANA.EDU (Rodrigo F. Salazar) Date: Tue, 25 Sep 2007 16:32:24 -0600 Subject: clusterrandanalysis input format In-Reply-To: Message-ID: Dear Eric and Sameer, Thanks for correcting the bug and about the tutorial on clusterandanalysis. I can now run freqanalysis_mtmfft but when I use the output to run clusterandanalysis, I have one error due to an empty 'stats' variable. I am now using the tutorial data to run clusterandanalysis to avoid problems due my data format. Even though I have noticed that in clusterrandstatistics.m, the variables 'crspctrc1' and 'crspctrc2' (line 678 and 679) are empty. I think that this is produced by a wrong input format. I selected the two first channels of FICpreproc FCpreproc and instead of running timelockanalysis, I ran freqanalysis using cfg = method: 'mtmfft' tapsmofrq: 4 calcdof: 'yes' keeptapers: 'no' keeptrials: 'yes' pad: 0.5000 taper: 'dpss' foilim: [0 100] output: 'powandcsd' channelcmb: {'MLC11' 'MLC12'} channel: {2x1 cell} That gave me: FICfreq = label: {2x1 cell} dimord: 'rpt_chan_freq' freq: [1x51 double] powspctrm: [85x2x51 double] labelcmb: {'MLC11' 'MLC12'} crsspctrm: [85x1x51 double] cumsumcnt: [85x1 double] cumtapcnt: [85x1 double] dof: [85x51 double] grad: [1x1 struct] cfg: [1x1 struct] and FCfreq = label: {2x1 cell} dimord: 'rpt_chan_freq' freq: [1x51 double] powspctrm: [84x2x51 double] labelcmb: {'MLC11' 'MLC12'} crsspctrm: [84x1x51 double] cumsumcnt: [84x1 double] cumtapcnt: [84x1 double] dof: [84x51 double] grad: [1x1 struct] cfg: [1x1 struct] and then I ran clusterandanalysis using cfg2 = statistic: 'indepsamplesZcoh' elec: [1x1 struct] chancmbgeom: 'free' alphathresh: 0.0500 alpha: 0.0500 makeclusters: 'no' As following [clusrand] = clusterrandanalysis(cfg2, FCfreq, FICfreq) And if I use cfg2.makeclusters = 'yes', I get an empty 'clusrand' variable. Do you have an idea where I am misusing the code? Basically I simply would like to test the difference in coherence between the FIC and FC condition for the two first channels. Thanks, Rodrigo. On Sep 23, 2007, at 8:31 AM, Eric Maris wrote: Dear Rodrigo Salazar and Sameer Walawalkar, You are both involved in similar analyses, and therefore I address you both. There was a bug in the latest version of freqanalysis_mtmfft, which caused the error message in Rodrigo’s analysis. Sameer used an older version of freqanalysis_mtmfft, in which this bug was not yet present. I have corrected the bug and within a couple of days you can download the new m-file from the FT homepage. There were a few bugs in the private function clusterrandstatistics.m related to the postprocessing of the results of a onesided statistical test. I have corrected these bugs. I now obtain identical p-values for the elements of posclusters in (1) a twosided analysis with cfg.alphathresh=0.05 and (2) a onesided analysis (cfg.onetwo=onesided_1<2) with cfg.alphathresh=0.025, as it should be. Similarly, I now obtain identical p-values for the elements of negclusters in (1) a twosided analysis with cfg.alphathresh=0.05 and (2) a onesided analysis (cfg.onetwo=onesided_2<1) with cfg.alphathresh=0.025, again as it should be. Sameer has selected channel combinations by specifying cfg.channelcmb= {refchan ‘MEG’}. This only gives you the channel pairs in which your reference channel is in the first position. As a result, you will not select the channel pairs in which the reference channel is in the second position. I must admit that I was not aware of this problem. I advise you to use the labelcmb-field in the output of freqanalysis. From this field, you can easily select those channel pairs in which the reference channel is in either the first or the second position, and pass this selection via the cfg.channelcmb-field. Good luck, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Rodrigo F. Salazar Sent: Friday, September 21, 2007 7:16 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandanalysis input format Hi Eric, Thanks for your quick reply. I scanned the tutorials and I could not find one that is using clusterrandanalysis.m. I only found a matlab script named: "Apply clusterrandanalysis on TFRs of power that were computed with BESA" but as it is only a script I cannot access the data. So far I was capable to run freqanalysis.m by adapting my data to the format described in the documentation. However, when I run clusterranalaysis.m with the output of freqanalysis.m being 'freq' [clusrand] = clusterrandanalysis(cfg2,freq,freq); % I am using twice 'freq' as a test run with cfg2.statistic: 'indepsamplesZcoh' , I keep on getting errors such as : ??? Reference to non-existent field 'dof'. Error in ==> fieldtrip-lite-20070920/private/clusterrandstatistics at 680 dofc1=reshape(sum(data.dof(replselc1,:,:),1),1,nfreq,ntime); And if I had the option: cfg.calcdof = 'yes' to get the degree of freedom, I get this other error: ??? Undefined function or variable "cumtapcnt". Error in ==> freqanalysis_mtmfft at 389 if calcdof && ~exist(cumtapcnt) Could you please tell if I am using a wrong configuration variable or if there is a problem in the code? Thanks, Rodrigo. On Sep 20, 2007, at 9:56 AM, Rodrigo F. Salazar wrote: Hi, I am new to fieldtrip and I am working with intracortical data. I have never used any function of fieldtrip and I would like to use clusterrandanalysis.m using my own data format. I cannot find a clear description of the input needed for that function. Can someone quickly describe the input format or even send me an example of input data? Thanks, Rodrigo. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list 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/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On Sep 20, 2007, at 9:56 AM, Rodrigo F. Salazar wrote: > Hi, > > I am new to fieldtrip and I am working with intracortical data. I > have never used any function of fieldtrip and I would like to use > clusterrandanalysis.m using my own data format. I cannot find a > clear description of the input needed for that function. Can > someone quickly describe the input format or even send me an > example of input data? > > Thanks, > > Rodrigo. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Rodrigo F. Salazar, Ph.D > Post-doctoral Fellow > Lewis Hall 1, > Center for Computational Biology > Montana State University > Bozeman, 59717 MT, USA > Phone: ++1 (406) 994 71 90, > Fax: ++1 (406) 994 74 38 > email: rsalazar at nervana.montana.edu > http://cns.montana.edu/~rsalazar/ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > ---------------------------------- > > The aim of this list 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/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rodrigo F. Salazar, Ph.D Post-doctoral Fellow Lewis Hall 1, Center for Computational Biology Montana State University Bozeman, 59717 MT, USA Phone: ++1 (406) 994 71 90, Fax: ++1 (406) 994 74 38 email: rsalazar at nervana.montana.edu http://cns.montana.edu/~rsalazar/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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 MPIH-FRANKFURT.MPG.DE Wed Sep 26 09:39:47 2007 From: wibral at MPIH-FRANKFURT.MPG.DE (Michael Wibral) Date: Wed, 26 Sep 2007 09:39:47 +0200 Subject: Using SPM Analyze MRIs for beamforming and head model creation Message-ID: Dear all, I have a quick question on how the coregistration works if I use dicom or SPM Analyze MRIs of my subjects for head model creation. The background of my question is that ctf mri's are now version 4.1 and I am not sure what has changed since the last version that fieldtrip used to read properly. When I use ctf's MRIs with included fiducials I can see how fieldtrip is able to align MRI and the grads. How is this done for for SPM MRIs? Transforming to the template (with known fiducial locations??) and then backtransforming the fiducial locations? (Staying in the transformed/normalized space doesn't seem to be corrcet because the transformation is nonlinear and the field-equations do not transform the same way...) 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. From v.litvak at ION.UCL.AC.UK Wed Sep 26 16:52:41 2007 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Wed, 26 Sep 2007 15:52:41 +0100 Subject: Small problem with multiplotER In-Reply-To: <07092609394752_2800013E@mpih-frankfurt.mpg.de> Message-ID: Dear all, There is a small problem I found using multiplotER. In general it likes rotating the electrodes by 90 deg CCW which might justify changing the defaults. But even when I specify cfg.rotate=0, it affects the multiplot, but not the topoplots that are generated from it in the interactive mode. Please fix. Vladimir ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences 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.