From johnston at KIN.UCALGARY.CA Sat May 2 22:07:36 2009 From: johnston at KIN.UCALGARY.CA (Jamie Johnston) Date: Sat, 2 May 2009 14:07:36 -0600 Subject: Questions concerning permutation tests on coherence data Message-ID: Hi All - I have a couple questions. My data set consists of 10 subjects, each performed 5 trials under 3 different conditions. I am trying to follow Maris et al. 2007, computing the difference between the coherence measures (i.e. using indepsamplesZcoh)for each pair of conditions (i.e., 3 different comparisons) and running the permutation test (montecarlo) on this data. My questions are: 1) All the examples I have come across only compare two conditions...if, as in my data, we have 3 conditions and would like to test for differences between the three, can I simply run 3 tests comparing all the combinations? Is this statistically sound (sorry I am unfamiliar with nonparametric stats). 2) For 8 of my subjects I have 5 separate channels of data, unfortunately for two of my subjects, I have only 4 channels (and they are missing different channels). I would like to include them in the coherence averages (and statistical tests), but I'm not sure how to do this. Any help would be greatly appreciated. Jamie _______________ Jamie Johnston, Ph.D. Assistant Professor Faculty of Kinesiology University of Calgary 2500 University Dr. NW Calgary, AB T2N 1N4 Phone: +1 (403) 220-3649 Fax: +1 (403) 284-3553 email: johnston at kin.ucalgary.ca website: http://www.kin.ucalgary.ca/wcm/knes/johnston.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From johnston at KIN.UCALGARY.CA Sun May 3 20:00:19 2009 From: johnston at KIN.UCALGARY.CA (Jamie Johnston) Date: Sun, 3 May 2009 12:00:19 -0600 Subject: independsamplesZcoh Message-ID: Hi all - I am trying to run a monte carlo - indepsamplesZcoh - cluster on my data using freqstatistics. I input two data files into freqstatistics with the cohspctrm having dimensions 2 (subjects) x 10 (channels, # of coherence spectra) x 52 (frequencies). I run into a dimension mismatch in the function clusterstat. If I run any other statistic (i.e., indepsamplesT) it runs fine. When running the indepsamplesT, clusterstat receives two inputs: statobs (520x1) and statrnd (520x100). These dimensions make sense to me. However, when running indepsamplesZcoh these two variables have dimensions 2340x1 and 2340x100, respectively. This happens around lines 104-108 in indepsamplesZcoh.m with computation of the variables "chancmbsel" and "nnewsamples." I'm not understanding what these variables do, but my guess is that I need to setup my data files differently in the beginning. My understanding of what this analysis protocol does is compute the z-statistic on each channel of coherence data (10 for each data file) and then find the difference between the z-statistic for each channel across the data files. Once this is complete it runs the permutations to determine the significance. Please verify that what I have done is correct and any help with the error I am getting would be greatly appreciated. Thanks, Jamie _______________ Jamie Johnston, Ph.D. Assistant Professor Faculty of Kinesiology University of Calgary 2500 University Dr. NW Calgary, AB T2N 1N4 Phone: +1 (403) 220-3649 Fax: +1 (403) 284-3553 email: johnston at kin.ucalgary.ca website: http://www.kin.ucalgary.ca/wcm/knes/johnston.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.schoffelen at PSY.GLA.AC.UK Sun May 3 21:33:43 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Sun, 3 May 2009 20:33:43 +0100 Subject: independsamplesZcoh In-Reply-To: Message-ID: Dear Jamie, For me it is not exactly clear what you want to do. In an earlier message you referred to our paper using a permutation test to test for a significant difference in coherence between conditions (Maris et al 2007). Essentially, as described, this is a test which is performed within each subject allowing you to do statistical inference about the potential difference between two conditions. As such this is the type of test indepsamplesZcoh can perform, if properly used (see below). Yet, you describe using two subjects as an input. This to me sounds rather that you would like to do statistics across subjects (although 2 subjects of course is a rather low number). This is NOT something indepsamplesZcoh can do for you. In general it is possible to test for a significant difference between two conditions across a population of subjects, but this would require a different approach. Rather than shuffling single observations across conditions PRIOR TO COMPUTING THE COHERENCE DIFFERENCE (sorry about the capitals but this is essential for what is to follow below), one would swap the sign of the Z-transformed coherence difference for a random subset of subjects prior to averaging. It seems as if you computed coherence spectra between all unique pairs of channels (4x5)/2 and used this as an input to freqstatistics. Yet, for single subject statistics this does not make sense, because indepsamplesZcoh expects fourier-spectra in the input. Within the function Z-transformed coherence difference will be computed between all pairs of input channels (in your case this would be (9x10)/2 (even though the function does not know you provide it with the wrong input), and multiplying this number with 52 would give your 'magical' 2340). So, indeed you should either format your data in a different way using single subject fourier spectra in two conditions as an input to freqstatistics, or using a different statistical test to test for differences across subjects. Yours, Jan-Mathijs On May 3, 2009, at 7:00 PM, Jamie Johnston wrote: > Hi all – > > I am trying to run a monte carlo – indepsamplesZcoh – cluster on my > data using freqstatistics. I input two data files into > freqstatistics with the cohspctrm having dimensions 2 (subjects) x > 10 (channels, # of coherence spectra) x 52 (frequencies). I run > into a dimension mismatch in the function clusterstat. If I run > any other statistic (i.e., indepsamplesT) it runs fine. When > running the indepsamplesT, clusterstat receives two inputs: statobs > (520x1) and statrnd (520x100). These dimensions make sense to me. > However, when running indepsamplesZcohthese two variables have > dimensions 2340x1 and 2340x100, respectively. This happens around > lines 104-108 in indepsamplesZcoh.m with computation of the > variables “chancmbsel” and “nnewsamples.” I’m not understanding > what these variables do, but my guess is that I need to setup my > data files differently in the beginning. My understanding of what > this analysis protocol does is compute the z-statistic on each > channel of coherence data (10 for each data file) and then find the > difference between the z-statistic for each channel across the data > files. Once this is complete it runs the permutations to determine > the significance. > > Please verify that what I have done is correct and any help with > the error I am getting would be greatly appreciated. > > Thanks, > > Jamie > > _______________ > Jamie Johnston, Ph.D. > Assistant Professor > Faculty of Kinesiology > University of Calgary > 2500 University Dr. NW > Calgary, AB > T2N 1N4 > Phone: +1 (403) 220-3649 > Fax: +1 (403) 284-3553 > email: johnston at kin.ucalgary.ca > website: http://www.kin.ucalgary.ca/wcm/knes/johnston.html > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From johnston at KIN.UCALGARY.CA Sun May 3 22:12:32 2009 From: johnston at KIN.UCALGARY.CA (Jamie Johnston) Date: Sun, 3 May 2009 14:12:32 -0600 Subject: independsamplesZcoh In-Reply-To: A<1A0B0C5E-11ED-4EAF-A0E9-788E566A0414@psy.gla.ac.uk> Message-ID: Thanks for your response. Let me clarify....I have 8 subjects (with 5 channels of data, 2 with 4 channels which I'm not using at this point)...I used only 2 subjects to test the code (for faster debugging). I do want to do a within subject statistical test between my conditions (of which I have 3, but I am only inputting 2 into freqstatistics as I was unclear whether I could run comparisons across 3 conditions). As you correctly point out, I did compute coherence across my 5 channels first, resulting in 10 spectra...this is what I inputted into freqstatistics, which is clearly incorrect. This is what I thought, however I didn't know exactly what the data input should look like. So, just to clarify, I'm running freqanalysis - inputting raw data, returning "powandcsd' freqdescriptives - inputting data from freqanalysis, returning 'coh' freqgrandaverage (keep individual 'yes') - inputting data from freqdescriptives, returning a grandaverage freqstatistics - inputting two grandaverages (for 2 conditions), using the following parameters: %Compute Permutation Test cfg = []; cfg.parameter = 'cohspctrm'; cfg.method = 'montecarlo'; cfg.frequency = [0 50]; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 100; cfg.computestat = 'yes'; subj = length(Subjects); design=zeros(2,2*subj); for i = 1:subj design(1,i) = i; end for i = 1:subj design(1,subj+i) = i; end design(2,1:subj) = 1; design(2,subj+1:2*subj) = 2; cfg.design = design; cfg.uvar = 1; cfg.ivar = 2; [stat] = freqstatistics(cfg, grandavg{1}, grandavg{2}); Are you saying, I should use the output from freqanalysis (skipping freqdescriptives) as input to freqgrandaverage? Also, should my "cfg.parameter" for the freqstatistics function still be 'cohspctrm' or 'powspctrm'? Thanks again, Jamie From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of jan-mathijs schoffelen Sent: May 3, 2009 1:34 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] independsamplesZcoh Dear Jamie, For me it is not exactly clear what you want to do. In an earlier message you referred to our paper using a permutation test to test for a significant difference in coherence between conditions (Maris et al 2007). Essentially, as described, this is a test which is performed within each subject allowing you to do statistical inference about the potential difference between two conditions. As such this is the type of test indepsamplesZcoh can perform, if properly used (see below). Yet, you describe using two subjects as an input. This to me sounds rather that you would like to do statistics across subjects (although 2 subjects of course is a rather low number). This is NOT something indepsamplesZcoh can do for you. In general it is possible to test for a significant difference between two conditions across a population of subjects, but this would require a different approach. Rather than shuffling single observations across conditions PRIOR TO COMPUTING THE COHERENCE DIFFERENCE (sorry about the capitals but this is essential for what is to follow below), one would swap the sign of the Z-transformed coherence difference for a random subset of subjects prior to averaging. It seems as if you computed coherence spectra between all unique pairs of channels (4x5)/2 and used this as an input to freqstatistics. Yet, for single subject statistics this does not make sense, because indepsamplesZcoh expects fourier-spectra in the input. Within the function Z-transformed coherence difference will be computed between all pairs of input channels (in your case this would be (9x10)/2 (even though the function does not know you provide it with the wrong input), and multiplying this number with 52 would give your 'magical' 2340). So, indeed you should either format your data in a different way using single subject fourier spectra in two conditions as an input to freqstatistics, or using a different statistical test to test for differences across subjects. Yours, Jan-Mathijs On May 3, 2009, at 7:00 PM, Jamie Johnston wrote: Hi all - I am trying to run a monte carlo - indepsamplesZcoh - cluster on my data using freqstatistics. I input two data files into freqstatistics with the cohspctrm having dimensions 2 (subjects) x 10 (channels, # of coherence spectra) x 52 (frequencies). I run into a dimension mismatch in the function clusterstat. If I run any other statistic (i.e., indepsamplesT) it runs fine. When running the indepsamplesT, clusterstat receives two inputs: statobs (520x1) and statrnd (520x100). These dimensions make sense to me. However, when running indepsamplesZcohthese two variables have dimensions 2340x1 and 2340x100, respectively. This happens around lines 104-108 in indepsamplesZcoh.m with computation of the variables "chancmbsel" and "nnewsamples." I'm not understanding what these variables do, but my guess is that I need to setup my data files differently in the beginning. My understanding of what this analysis protocol does is compute the z-statistic on each channel of coherence data (10 for each data file) and then find the difference between the z-statistic for each channel across the data files. Once this is complete it runs the permutations to determine the significance. Please verify that what I have done is correct and any help with the error I am getting would be greatly appreciated. Thanks, Jamie _______________ Jamie Johnston, Ph.D. Assistant Professor Faculty of Kinesiology University of Calgary 2500 University Dr. NW Calgary, AB T2N 1N4 Phone: +1 (403) 220-3649 Fax: +1 (403) 284-3553 email: johnston at kin.ucalgary.ca website: http://www.kin.ucalgary.ca/wcm/knes/johnston.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From manish.saggar at GMAIL.COM Tue May 5 01:10:11 2009 From: manish.saggar at GMAIL.COM (Manish Saggar) Date: Mon, 4 May 2009 18:10:11 -0500 Subject: Independence of trials in non-parametric testing Message-ID: All, I have a question regarding independence of trials in non-parametric testing. The experimental design that I have is as follows, there are three conditions C1, C2 and C3. Each condition is of 1 min duration (e.g. rest with eyes open for 1 min). Now I am planing on dividing each condition into sixty 1sec fake trials and then compare Time-Freq representation of C2-C1 and C3-C1 etc. for significance. But I am not sure whether this style is statistically correct, since the trials are fake and I am not sure if I can call them independent of each other. I can theoretically count them uncorrelated (?) if I separate these fake trials by say 300msec or something. Just want to make sure I am going in right direction. Please let me know. Regards, Manish ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Tue May 5 13:43:40 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Tue, 5 May 2009 13:43:40 +0200 Subject: Independence of trials in non-parametric testing In-Reply-To: Message-ID: Hi Manish, > I have a question regarding independence of trials in non-parametric > testing. > > The experimental design that I have is as follows, there are three > conditions C1, C2 and C3. Each condition is of 1 min duration (e.g. > rest with eyes open for 1 min). > > Now I am planing on dividing each condition into sixty 1sec fake > trials and then compare Time-Freq representation of C2-C1 and C3-C1 > etc. for significance. > But I am not sure whether this style is statistically correct, since > the trials are fake and I am not sure if I can call them independent > of each other. I can theoretically count them uncorrelated (?) if I > separate these fake trials by say 300msec or something. > > Just want to make sure I am going in right direction. Please let me > know. Your intuition is correct. However, time-freq representations do not make sense here. You will have to go for freq representations (i.e., averaging spectral energy over time). Proving that the fake trials are uncorrelated will not be possible. You will have settle for plausibility. However, the same holds to some extent for an experiment with real trials. So, chopping long trials in pieces is in principle OK from the perspective of permutation inference. Good luck, dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 F:+31 24 3616066 E: e.maris at donders.ru.nl MSc Cognitive Neuroscience: www.ru.nl/master/cns/ > > Regards, > Manish > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Tue May 5 17:41:33 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 5 May 2009 17:41:33 +0200 Subject: MNE Matlab toolbox version 2.6.1 Message-ID: Dear neuromag users Please note the announcement below. The Neuromag MNE matlab tools have been improved, resulting in much faster reading. Probably that will be of interest to you. Please download MNE and put the matlab files in fieldtrip/external/mne, so that fieldtrip can find the low-level reading functions. best regards, Robert Begin forwarded message: > From: Matti Hamalainen > Date: 28 April 2009 13:06:59 GMT+02:00 > To: mne_analysis at nmr.mgh.harvard.edu > Subject: [Mne_analysis] MNE Matlab toolbox version 2.6.1 > > > Hello all, > > Thanks to François Tadel from USC and John Mosher from Cleveland > Clinic, one major and a few minor bottlenecks were identified in the > MNE Matlab Toolbox. I modified the code on the basis of their > findings and, as a result, the fif file I/O is now much faster. I > packaged the improved version as MNE Matlab 2.6.1 and this new > version is now available on the download web site. > > This new package is highly recommended for those of you who use the > MNE Matlab tools. > > The Martinos Center public MNE installation has been updated. > > Other users need to: > > 1. Download MNE-dist-matlab-2.6.1-090428065405.tar.gz from the MNE > download web site. > > 2. Goto the directory *containing* $MNE_ROOT, i.e., $MNE_ROOT/.. > > 3. Say > > tar zxvf /MNE-dist- > matlab-2.6.1-090428065405.tar.gz > > is the path to the directory where you > downloaded the software. > > Best, > Matti > > > --------- > > Matti Hamalainen, Ph.D. > Athinoula A. Martinos Center for Biomedical Imaging > Massachusetts General Hospital > > msh at nmr.mgh.harvard.edu > > > > > > > _______________________________________________ > Mne_analysis mailing list > Mne_analysis at nmr.mgh.harvard.edu > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Tue May 5 17:45:55 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 5 May 2009 17:45:55 +0200 Subject: color bar In-Reply-To: Message-ID: Hi Jim I suspect the problem to be due to the rendering of Matlab. Occasionally (esp when working on a remote linux maxhine through a VNC connection) I also have problematic figures. Please look at >> help opengl It explains how you can change the renderer. Some fieldtrip plotting functions have this as a configurable option, including singleplotTFR and multiplotTFR. You can specify cfg.renderer= 'painters', 'zbuffer' or 'opengl'. Please try zbuffer. best regards, Robert On 30 Apr 2009, at 21:21, Jim Li wrote: > Dear FTer: > > I wonder if anybody can tell me how to get the full color bar when > plotting > w/ "singleplotTFR" or "multiplotTFR". > > I ran the following commands: > -------- > figure > cfg = []; > cfg.layout = '4D248.lay'; > cfg.ylim = [5 30] > cfg.interactive = 'yes'; > cfg.showlabels = 'yes'; > cfg.colorbar = 'yes'; cfg.channel='A2' > singleplotTFR(cfg,TF) > ----------- > > > But what I get on the right side of the figure is a colorbar w/ only > half of the > color (usually the cold colors like blue or green), and the numbers > on the right > side of the colorbar seem to be wrongly placed (see attachment). How > can I > get all the colors (both hot and cold) displayed in the colorbar? > > FYI, I controled the values of TF.powspctrm so that, for the channel > displayed > (A2), all values before time 0 is 3e-25, and all values after time 0 > is 1e-25. > But the color bar is telling me that the blue should be 2e-25, which > is totally > wrong! It's as if something happened that moved the whole colorbar > up by half > of the data range, then cut off the top of it (i.e. the hot colors). > > In fact, I think Fig 3 of the online tutorial > (http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis) > probably suffered > from the same problem. > > > Thanks, > > Jim > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Wed May 6 17:04:24 2009 From: megjim1 at GMAIL.COM (Jim Li) Date: Wed, 6 May 2009 17:04:24 +0200 Subject: color bar Message-ID: Yes, Robert, Changing to "cfg.renderer= 'zbuffer'; " did make the whole colorbar show up correctly. Although I also got a bunch of blue for the low frequency part of the wavelet singleplotTFR, which used to be just white area since there's no data calculated for those time-frequency bins due to wavelet's boundary effect. But that's fine. Thank you very much, :) Jim FYI, I'm using a 64bit WinXP. I saw the problem that you helped me solved by either working directly before the PC or Remote-Desktop to it. On Tue, 5 May 2009 17:45:55 +0200, Robert Oostenveld wrote: >Hi Jim > >I suspect the problem to be due to the rendering of Matlab. >Occasionally (esp when working on a remote linux maxhine through a VNC >connection) I also have problematic figures. > >Please look at > >> help opengl >It explains how you can change the renderer. > >Some fieldtrip plotting functions have this as a configurable option, >including singleplotTFR and multiplotTFR. You can specify >cfg.renderer= 'painters', 'zbuffer' or 'opengl'. Please try zbuffer. > >best regards, >Robert > > >On 30 Apr 2009, at 21:21, Jim Li wrote: > >> Dear FTer: >> >> I wonder if anybody can tell me how to get the full color bar when >> plotting >> w/ "singleplotTFR" or "multiplotTFR". >> >> I ran the following commands: >> -------- >> figure >> cfg = []; >> cfg.layout = '4D248.lay'; >> cfg.ylim = [5 30] >> cfg.interactive = 'yes'; >> cfg.showlabels = 'yes'; >> cfg.colorbar = 'yes'; cfg.channel='A2' >> singleplotTFR(cfg,TF) >> ----------- >> >> >> But what I get on the right side of the figure is a colorbar w/ only >> half of the >> color (usually the cold colors like blue or green), and the numbers >> on the right >> side of the colorbar seem to be wrongly placed (see attachment). How >> can I >> get all the colors (both hot and cold) displayed in the colorbar? >> >> FYI, I controled the values of TF.powspctrm so that, for the channel >> displayed >> (A2), all values before time 0 is 3e-25, and all values after time 0 >> is 1e-25. >> But the color bar is telling me that the blue should be 2e-25, which >> is totally >> wrong! It's as if something happened that moved the whole colorbar >> up by half >> of the data range, then cut off the top of it (i.e. the hot colors). >> >> In fact, I think Fig 3 of the online tutorial >> (http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis) >> probably suffered >> from the same problem. >> >> >> Thanks, >> >> Jim >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From ingrid.nieuwenhuis at DONDERS.RU.NL Wed May 6 17:15:37 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 6 May 2009 17:15:37 +0200 Subject: color bar In-Reply-To: Message-ID: Hi Jim, The reason that you see the blue for the low freq part where there's no data is because NaNs are plotted with the lowest color of the scale by Matlab. Earlier the NaN's where masked out automatically, but with the "cfg.renderer= 'zbuffer'; " opacity masking is not supported. So I'm afraid there is no way to both get the colorbar right and the NaN's masked out. But you could of course make two plots and combine in Photoshop ;) Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Jim Li > Sent: Wednesday, May 06, 2009 5:04 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] color bar > > Yes, Robert, > > Changing to "cfg.renderer= 'zbuffer'; " did make the whole colorbar show > up > correctly. Although I also got a bunch of blue for the low frequency part > of > the wavelet singleplotTFR, which used to be just white area since there's > no > data calculated for those time-frequency bins due to wavelet's boundary > effect. But that's fine. > > Thank you very much, :) > > Jim > > > FYI, I'm using a 64bit WinXP. I saw the problem that you helped me solved > by > either working directly before the PC or Remote-Desktop to it. > > > > On Tue, 5 May 2009 17:45:55 +0200, Robert Oostenveld > wrote: > > >Hi Jim > > > >I suspect the problem to be due to the rendering of Matlab. > >Occasionally (esp when working on a remote linux maxhine through a VNC > >connection) I also have problematic figures. > > > >Please look at > > >> help opengl > >It explains how you can change the renderer. > > > >Some fieldtrip plotting functions have this as a configurable option, > >including singleplotTFR and multiplotTFR. You can specify > >cfg.renderer= 'painters', 'zbuffer' or 'opengl'. Please try zbuffer. > > > >best regards, > >Robert > > > > > >On 30 Apr 2009, at 21:21, Jim Li wrote: > > > >> Dear FTer: > >> > >> I wonder if anybody can tell me how to get the full color bar when > >> plotting > >> w/ "singleplotTFR" or "multiplotTFR". > >> > >> I ran the following commands: > >> -------- > >> figure > >> cfg = []; > >> cfg.layout = '4D248.lay'; > >> cfg.ylim = [5 30] > >> cfg.interactive = 'yes'; > >> cfg.showlabels = 'yes'; > >> cfg.colorbar = 'yes'; cfg.channel='A2' > >> singleplotTFR(cfg,TF) > >> ----------- > >> > >> > >> But what I get on the right side of the figure is a colorbar w/ only > >> half of the > >> color (usually the cold colors like blue or green), and the numbers > >> on the right > >> side of the colorbar seem to be wrongly placed (see attachment). How > >> can I > >> get all the colors (both hot and cold) displayed in the colorbar? > >> > >> FYI, I controled the values of TF.powspctrm so that, for the channel > >> displayed > >> (A2), all values before time 0 is 3e-25, and all values after time 0 > >> is 1e-25. > >> But the color bar is telling me that the blue should be 2e-25, which > >> is totally > >> wrong! It's as if something happened that moved the whole colorbar > >> up by half > >> of the data range, then cut off the top of it (i.e. the hot colors). > >> > >> In fact, I think Fig 3 of the online tutorial > >> (http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis) > >> probably suffered > >> from the same problem. > >> > >> > >> Thanks, > >> > >> Jim > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > >> of the FieldTrip toolbox, to share experiences and to discuss new > >> ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html > >> and http://www.ru.nl/neuroimaging/fieldtrip. > >> > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and > EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Wed May 6 17:37:17 2009 From: megjim1 at GMAIL.COM (Jim Li) Date: Wed, 6 May 2009 17:37:17 +0200 Subject: color bar Message-ID: Hi Ingrid, That's a nice suggestion. Thanks a lot for your help, :) Jim On Wed, 6 May 2009 17:15:37 +0200, Ingrid Nieuwenhuis wrote: >Hi Jim, > >The reason that you see the blue for the low freq part where there's no data >is because NaNs are plotted with the lowest color of the scale by Matlab. >Earlier the NaN's where masked out automatically, but with the >"cfg.renderer= 'zbuffer'; " opacity masking is not supported. So I'm afraid >there is no way to both get the colorbar right and the NaN's masked out. But >you could of course make two plots and combine in Photoshop ;) > >Best Ingrid > >> -----Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >> Behalf Of Jim Li >> Sent: Wednesday, May 06, 2009 5:04 PM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] color bar >> >> Yes, Robert, >> >> Changing to "cfg.renderer= 'zbuffer'; " did make the whole colorbar show >> up >> correctly. Although I also got a bunch of blue for the low frequency part >> of >> the wavelet singleplotTFR, which used to be just white area since there's >> no >> data calculated for those time-frequency bins due to wavelet's boundary >> effect. But that's fine. >> >> Thank you very much, :) >> >> Jim >> >> >> FYI, I'm using a 64bit WinXP. I saw the problem that you helped me solved >> by >> either working directly before the PC or Remote-Desktop to it. >> >> >> >> On Tue, 5 May 2009 17:45:55 +0200, Robert Oostenveld >> wrote: >> >> >Hi Jim >> > >> >I suspect the problem to be due to the rendering of Matlab. >> >Occasionally (esp when working on a remote linux maxhine through a VNC >> >connection) I also have problematic figures. >> > >> >Please look at >> > >> help opengl >> >It explains how you can change the renderer. >> > >> >Some fieldtrip plotting functions have this as a configurable option, >> >including singleplotTFR and multiplotTFR. You can specify >> >cfg.renderer= 'painters', 'zbuffer' or 'opengl'. Please try zbuffer. >> > >> >best regards, >> >Robert >> > >> > >> >On 30 Apr 2009, at 21:21, Jim Li wrote: >> > >> >> Dear FTer: >> >> >> >> I wonder if anybody can tell me how to get the full color bar when >> >> plotting >> >> w/ "singleplotTFR" or "multiplotTFR". >> >> >> >> I ran the following commands: >> >> -------- >> >> figure >> >> cfg = []; >> >> cfg.layout = '4D248.lay'; >> >> cfg.ylim = [5 30] >> >> cfg.interactive = 'yes'; >> >> cfg.showlabels = 'yes'; >> >> cfg.colorbar = 'yes'; cfg.channel='A2' >> >> singleplotTFR(cfg,TF) >> >> ----------- >> >> >> >> >> >> But what I get on the right side of the figure is a colorbar w/ only >> >> half of the >> >> color (usually the cold colors like blue or green), and the numbers >> >> on the right >> >> side of the colorbar seem to be wrongly placed (see attachment). How >> >> can I >> >> get all the colors (both hot and cold) displayed in the colorbar? >> >> >> >> FYI, I controled the values of TF.powspctrm so that, for the channel >> >> displayed >> >> (A2), all values before time 0 is 3e-25, and all values after time 0 >> >> is 1e-25. >> >> But the color bar is telling me that the blue should be 2e-25, which >> >> is totally >> >> wrong! It's as if something happened that moved the whole colorbar >> >> up by half >> >> of the data range, then cut off the top of it (i.e. the hot colors). >> >> >> >> In fact, I think Fig 3 of the online tutorial >> >> (http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis) >> >> probably suffered >> >> from the same problem. >> >> >> >> >> >> Thanks, >> >> >> >> Jim >> >> >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> >> of the FieldTrip toolbox, to share experiences and to discuss new >> >> ideas for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> and http://www.ru.nl/neuroimaging/fieldtrip. >> >> >> > >> >---------------------------------- >> >The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and >> EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and >> http://www.ru.nl/neuroimaging/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From johnston at KIN.UCALGARY.CA Wed May 6 20:51:03 2009 From: johnston at KIN.UCALGARY.CA (Jamie Johnston) Date: Wed, 6 May 2009 12:51:03 -0600 Subject: independsamplesZcoh Message-ID: I have fixed the issues in my posting below and seem to be getting closer to having my code run. However, I still run into a dimension mismatch in clusterstat...I'm trying to understand the following code, where I think this mismatch occurs. % determine whether the input represents N-D volumetric data or channel-freq-time data and provide the appropriate details % TODO this detection should be more robust if isfield(cfg, 'neighbours') && ~isempty(cfg.neighbours) channeighbstructmat = makechanneighbstructmat(cfg); issource = 0; else issource = 1; % cfg contains dim and inside that are needed for reshaping the data to a volume, and inside should behave as a index vector cfg = fixinside(cfg, 'index'); end The dimension of the data (statobs) that is passed to clusterstat is 520 X 1 (10 channels of coherence differences x 52 frequencies concatenated; note: this use to be 5 channels of powspctrm) which makes sense. I am trying to cluster by frequency (not channel)...the output of "fixinside" function returns cfg.index of dimension (1 X 260), causing a dimension mismatch at line 188 in clusterstat. The reason this happens, I think, is in line 37 of fixinside where elseif isfield(source, 'dim') source.inside = 1:prod(source.dim); source.outside = []; end for some reason source.dim still has the dimension 5 X 52 X 1, ie, the dimensions prior to computing the coherence differences. I'm not sure whether/where I should change the cfg.dim, which I assume should reflect the dimensions of the newly computed data matrix. Thanks, Jamie ________________________________ From: FieldTrip discussion list on behalf of Jamie Johnston Sent: Sun 5/3/2009 2:12 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] independsamplesZcoh Thanks for your response. Let me clarify....I have 8 subjects (with 5 channels of data, 2 with 4 channels which I'm not using at this point)...I used only 2 subjects to test the code (for faster debugging). I do want to do a within subject statistical test between my conditions (of which I have 3, but I am only inputting 2 into freqstatistics as I was unclear whether I could run comparisons across 3 conditions). As you correctly point out, I did compute coherence across my 5 channels first, resulting in 10 spectra...this is what I inputted into freqstatistics, which is clearly incorrect. This is what I thought, however I didn't know exactly what the data input should look like. So, just to clarify, I'm running freqanalysis - inputting raw data, returning "powandcsd' freqdescriptives - inputting data from freqanalysis, returning 'coh' freqgrandaverage (keep individual 'yes') - inputting data from freqdescriptives, returning a grandaverage freqstatistics - inputting two grandaverages (for 2 conditions), using the following parameters: %Compute Permutation Test cfg = []; cfg.parameter = 'cohspctrm'; cfg.method = 'montecarlo'; cfg.frequency = [0 50]; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 100; cfg.computestat = 'yes'; subj = length(Subjects); design=zeros(2,2*subj); for i = 1:subj design(1,i) = i; end for i = 1:subj design(1,subj+i) = i; end design(2,1:subj) = 1; design(2,subj+1:2*subj) = 2; cfg.design = design; cfg.uvar = 1; cfg.ivar = 2; [stat] = freqstatistics(cfg, grandavg{1}, grandavg{2}); Are you saying, I should use the output from freqanalysis (skipping freqdescriptives) as input to freqgrandaverage? Also, should my "cfg.parameter" for the freqstatistics function still be 'cohspctrm' or 'powspctrm'? Thanks again, Jamie From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of jan-mathijs schoffelen Sent: May 3, 2009 1:34 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] independsamplesZcoh Dear Jamie, For me it is not exactly clear what you want to do. In an earlier message you referred to our paper using a permutation test to test for a significant difference in coherence between conditions (Maris et al 2007). Essentially, as described, this is a test which is performed within each subject allowing you to do statistical inference about the potential difference between two conditions. As such this is the type of test indepsamplesZcoh can perform, if properly used (see below). Yet, you describe using two subjects as an input. This to me sounds rather that you would like to do statistics across subjects (although 2 subjects of course is a rather low number). This is NOT something indepsamplesZcoh can do for you. In general it is possible to test for a significant difference between two conditions across a population of subjects, but this would require a different approach. Rather than shuffling single observations across conditions PRIOR TO COMPUTING THE COHERENCE DIFFERENCE (sorry about the capitals but this is essential for what is to follow below), one would swap the sign of the Z-transformed coherence difference for a random subset of subjects prior to averaging. It seems as if you computed coherence spectra between all unique pairs of channels (4x5)/2 and used this as an input to freqstatistics. Yet, for single subject statistics this does not make sense, because indepsamplesZcoh expects fourier-spectra in the input. Within the function Z-transformed coherence difference will be computed between all pairs of input channels (in your case this would be (9x10)/2 (even though the function does not know you provide it with the wrong input), and multiplying this number with 52 would give your 'magical' 2340). So, indeed you should either format your data in a different way using single subject fourier spectra in two conditions as an input to freqstatistics, or using a different statistical test to test for differences across subjects. Yours, Jan-Mathijs On May 3, 2009, at 7:00 PM, Jamie Johnston wrote: Hi all - I am trying to run a monte carlo - indepsamplesZcoh - cluster on my data using freqstatistics. I input two data files into freqstatistics with the cohspctrm having dimensions 2 (subjects) x 10 (channels, # of coherence spectra) x 52 (frequencies). I run into a dimension mismatch in the function clusterstat. If I run any other statistic (i.e., indepsamplesT) it runs fine. When running the indepsamplesT, clusterstat receives two inputs: statobs (520x1) and statrnd (520x100). These dimensions make sense to me. However, when running indepsamplesZcohthese two variables have dimensions 2340x1 and 2340x100, respectively. This happens around lines 104-108 in indepsamplesZcoh.m with computation of the variables "chancmbsel" and "nnewsamples." I'm not understanding what these variables do, but my guess is that I need to setup my data files differently in the beginning. My understanding of what this analysis protocol does is compute the z-statistic on each channel of coherence data (10 for each data file) and then find the difference between the z-statistic for each channel across the data files. Once this is complete it runs the permutations to determine the significance. Please verify that what I have done is correct and any help with the error I am getting would be greatly appreciated. Thanks, Jamie _______________ Jamie Johnston, Ph.D. Assistant Professor Faculty of Kinesiology University of Calgary 2500 University Dr. NW Calgary, AB T2N 1N4 Phone: +1 (403) 220-3649 Fax: +1 (403) 284-3553 email: johnston at kin.ucalgary.ca website: http://www.kin.ucalgary.ca/wcm/knes/johnston.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Thu May 7 02:08:47 2009 From: megjim1 at GMAIL.COM (Jim Li) Date: Thu, 7 May 2009 02:08:47 +0200 Subject: preparing leadfield for Phantom Message-ID: Dear FTer: I'm trying to test a localization algorithm with some epoch data collected on our phantom. Can anyone suggest a way to prepare the lead field using the single shell modeling? I'm using 4D's system right now. While playing with "prepare_singleshell" and "prepare_leadfield", I encountered two questions: 1) How can I get my headshape points in head coordinate system? I can run -------- hdr = read_fcdc_header(FileName); cfg.headshape = hdr.grad.pnt; [vol] = prepare_singleshell(cfg); ------- but that doesn't seem to give me headshape points in head coordinate system and it'll crash "prepare_leadfield" later on. 2) Do I need to define "cfg.vol.r = 7.5; cfg.vol.o = [0,0,0];" before running "prepare_leadfield"? If not, I'll get weird stuff like "1 dipoles inside, 26 dipoles outside brain". I'd appreciate it if anyone can show me your complete script of preparing lead field from beginning to end. Cheers, Jim ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Fri May 8 01:43:51 2009 From: megjim1 at GMAIL.COM (Jim Li) Date: Fri, 8 May 2009 01:43:51 +0200 Subject: preparing leadfield for Phantom Message-ID: Hi all, Actually I just observed something: "hdr.grad.pnt" doesn't contain the coordinates of digitization points, but instead seems to be sensor coil-related. My question regarding how to prepare the lead field using the single shell modeling still remains. Any suggestion will be greatly appreciated! Thanks, Jim On Thu, 7 May 2009 02:08:47 +0200, Jim Li wrote: >Dear FTer: > >I'm trying to test a localization algorithm with some epoch data collected on >our phantom. Can anyone suggest a way to prepare the lead field using the >single shell modeling? I'm using 4D's system right now. > >While playing with "prepare_singleshell" and "prepare_leadfield", I encountered >two questions: > >1) How can I get my headshape points in head coordinate system? > >I can run >-------- >hdr = read_fcdc_header(FileName); >cfg.headshape = hdr.grad.pnt; >[vol] = prepare_singleshell(cfg); >------- >but that doesn't seem to give me headshape points in head coordinate system >and it'll crash "prepare_leadfield" later on. > >2) Do I need to define "cfg.vol.r = 7.5; cfg.vol.o = [0,0,0];" before >running "prepare_leadfield"? If not, I'll get weird stuff like "1 dipoles inside, 26 >dipoles outside brain". > >I'd appreciate it if anyone can show me your complete script of preparing lead >field from beginning to end. > >Cheers, > >Jim > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From v.litvak at ION.UCL.AC.UK Fri May 8 07:37:20 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Fri, 8 May 2009 06:37:20 +0100 Subject: preparing leadfield for Phantom In-Reply-To: Message-ID: Dear Jim, The example scripts: http://fieldtrip.fcdonders.nl/example/make_leadfields_using_different_headmodels and http://fieldtrip.fcdonders.nl/example/shift_electrode_positions_into_the_same_coordinate_system_as_the_corresponding_mri_for_using_individual_headmodels contain some ideas that you can use to do what you want. However, the trickiest part is coregistration. In the CTF system this problem is solved by the CTF software. Also for an expert it is easy to do with just a few lines of code. This is why there is no easy-to-use generic solution for it in Fieldtrip as far as I know. I would recommend you looking at SPM8 (http://www.fil.ion.ucl.ac.uk/spm/software/spm8/) which is another free Matlab toolbox. In SPM8 you can go through all the steps for leadfield computation using GUI (see the manual, imaging source reconstruction chapter). It support BTi data and is tightly integrated with Fieldtrip so you can later get the coregistered vol and grad from SPM and use them in your Fieldtrip script. See: https://www.jiscmail.ac.uk/cgi-bin/wa.exe?A2=ind0905&L=SPM&P=R8906 Also SPM saves leadfields for its 'canonical cortical mesh' in a mat-file and you can just use those. Best, Vladimir On Fri, May 8, 2009 at 12:43 AM, Jim Li wrote: > Hi all, > > Actually I just observed something: "hdr.grad.pnt" doesn't contain the > coordinates of digitization points, but instead seems to be sensor coil-related. > > My question regarding how to prepare the lead field using the > single shell modeling still remains. Any suggestion will be greatly appreciated! > > Thanks, > > Jim > > On Thu, 7 May 2009 02:08:47 +0200, Jim Li wrote: > >>Dear FTer: >> >>I'm trying to test a localization algorithm with some epoch data collected on >>our phantom. Can anyone suggest a way to prepare the lead field using the >>single shell modeling? I'm using 4D's system right now. >> >>While playing with "prepare_singleshell" and  "prepare_leadfield", I > encountered >>two questions: >> >>1) How can I get my headshape points in head coordinate system? >> >>I can run >>-------- >>hdr = read_fcdc_header(FileName); >>cfg.headshape = hdr.grad.pnt; >>[vol] = prepare_singleshell(cfg); >>------- >>but that doesn't seem to give me headshape points in head coordinate > system >>and it'll crash "prepare_leadfield" later on. >> >>2) Do I need to define "cfg.vol.r = 7.5; cfg.vol.o = [0,0,0];" before >>running "prepare_leadfield"? If not, I'll get weird stuff like "1 dipoles inside, 26 >>dipoles outside brain". >> >>I'd appreciate it if anyone can show me your complete script of preparing > lead >>field from beginning to end. >> >>Cheers, >> >>Jim >> >>---------------------------------- >>The aim of this list is to facilitate the discussion between users of the > FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From akiko at NYU.EDU Fri May 8 20:17:06 2009 From: akiko at NYU.EDU (Akiko Ikkai) Date: Fri, 8 May 2009 14:17:06 -0400 Subject: .sqd to FieldTrip steps Message-ID: Hello, I just started learning to do MEG experiments, and am very new to FieldTrip. I have a simple continuous recording (120s, 1000Hz) of MEG to test noise level, therefore no event type. My goal with this data is to look at frequency power distribution to check for any irregular spikes. We collect data in .sqd format. It appears that sqd format is not supported, so I simply renamed the data to .raw, which I could read into matLab using "read_fcdc_header" and "read_fcdc_data" (returns 192 x120000 matrix). However, since my data has no events, I'm not sure what inputs need to be fed into "definetrial". When I tried cfg = []; cfg.dataset = 'Out.raw'; cfg = definetrial(cfg); I got this message ??? Error using ==> definetrial at 151 no trialfunction specified, see DEFINETRIAL for help If you could give me some advise about how I should proceed (e.g. what parameters I need to have, and how I could create/retrieve them), it'll be very helpful. Also, if there are any specific notes about "using sqd and FieldTrip", please let me know as well. Thanks in advance! Akiko Ikkai ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From charles.cook at ULETH.CA Fri May 8 21:40:44 2009 From: charles.cook at ULETH.CA (Charles Cook) Date: Fri, 8 May 2009 21:40:44 +0200 Subject: electrode load and clusterrandanalysis Message-ID: Hi all, I'm having some trouble running the clusterrandanalysis on my time-frequency data collected using BESA. I've been trying to follow the example script ('Apply clusterrandanalysis on TFRs of power that were computed with BESA'), but am still coming up short. Specifically, I'm a little confused about loading electrodes % load a set of electrodes (these are on a unit sphere) % note, this will be different for your own data load('elec128.mat'); % scale the electrodes to a realistic head size (in cm) elec.pnt = 10*elec.pnt; Any suggestions would be much appreciated. Cheers, Charles Cook Canadian Centre for Behavioural Neuroscience University of Lethbridge ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From ole.jensen at DONDERS.RU.NL Sun May 10 22:26:29 2009 From: ole.jensen at DONDERS.RU.NL (Ole Jensen) Date: Sun, 10 May 2009 22:26:29 +0200 Subject: HBM lunch for MEG researcher at HBM/June 19 Message-ID: Dear MEG researcher, We would like to invite you to a lunch meeting Friday June 19, 12:30 at HBM2009/San Francisco. We hope to explore ways to strengthen the MEG community. We find it particularly important given that the increase of MEG groups warrants more initiatives for improving the communication between groups. Points to discuss: - Practical initiatives for strengthening communication between MEG groups * mailing lists/websites * satellite meetings in connection with conferences (e.g. HBM, FENS,...) - Improve education on MEG analysis (summer schools, boot camps, student exchanges,..) - How to promote a stronger presence in high impact journals and international meetings? The room will be posted later. Best regards, Ole Jensen, Joachim Gross and Srikantan Nagarajan P.S. Please bring your own lunch P.P.S. Please forward this message to other MEG researchers (we do not have a complete list). -- Ole Jensen Principal Investigator Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at donders.ru.nl URL : http://ojensen.ruhosting.nl/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From manish.saggar at GMAIL.COM Tue May 12 10:16:39 2009 From: manish.saggar at GMAIL.COM (Manish Saggar) Date: Tue, 12 May 2009 03:16:39 -0500 Subject: Clusterplot not highlighting clusters & average layout file Message-ID: All, I have a question regarding clusterplot function. I am doing a within-subject analysis. The experimental design that I have is as follows, there are three conditions C1, C2 and C3. Each condition is of 1 min duration (e.g. rest with eyes open for 1 min). Now I am comparing grandaverage of freq representation of a set of subjects for C2 with C1 etc. FreqStatistics is running just fine creating significant (<0.025 alpha, for 2-tailed test) clusters (positive). Now the problem is that when I try to plot the location of this cluster using clusterplot it doesn't show any highlighted channels. Any ideas why that is happening? Another question is that since I am using grandaverages of freq representation, what should I use for layout file (using BESA sfp file here). I have individual subject layout files. Currently I am just giving any file from one of the subjects. Since, I noticed that FreqStatistics finds a common minimum set of channels and then apply statistics on it. So do I need to average layout files for the subject group or is there any other way? Any help is much appreciated. Regards, Manish ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Tue May 12 23:26:03 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Tue, 12 May 2009 23:26:03 +0200 Subject: electrode load and clusterrandanalysis Message-ID: Hi Charles, i never actually tried doing the time-freq transform in BESA and then the stats in FT but I did so for ERP data and from what you write it is not clear what goes wrong. Could you please post the Fieldtrip version you use, the full error message you get and the full script code ? If your problems are related to electrode positions, you could try loading the BESA electrode (.elp) files directly if i am not mistaken. Michael > -----Ursprüngliche Nachricht----- > Von: "Charles Cook" > Gesendet: 08.05.09 21:51:46 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] electrode load and clusterrandanalysis > Hi all, > > I'm having some trouble running the clusterrandanalysis on my time-frequency > data collected using BESA. I've been trying to follow the example script > ('Apply clusterrandanalysis on TFRs of power that were computed with BESA'), > but am still coming up short. Specifically, I'm a little confused about > loading electrodes > > % load a set of electrodes (these are on a unit sphere) > % note, this will be different for your own data > load('elec128.mat'); > % scale the electrodes to a realistic head size (in cm) > elec.pnt = 10*elec.pnt; > > Any suggestions would be much appreciated. > > Cheers, > > Charles Cook > Canadian Centre for Behavioural Neuroscience > University of Lethbridge > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From susannah.murphy at PSYCH.OX.AC.UK Tue May 12 23:26:11 2009 From: susannah.murphy at PSYCH.OX.AC.UK (Susannah Murphy) Date: Tue, 12 May 2009 22:26:11 +0100 Subject: electrode load and clusterrandanalysis In-Reply-To: <966361168@web.de> Message-ID: Thanks for your message. I am out of the office until Thursday 21st May 2009. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From ingrid.nieuwenhuis at DONDERS.RU.NL Wed May 13 09:10:49 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 13 May 2009 09:10:49 +0200 Subject: Clusterplot not highlighting clusters & average layout file In-Reply-To: Message-ID: Dear Manish, You give a bit too few information to be able to figure out what could be the problem with clusterplot. After calling clusterplot, clusterplot gives information on which clusters it finds. Does the function find any clusters? Does the .mask field of the structure that comes out of freqstatistics contain any ones? Is everything else plotted normally? Do you get any errors or warnings? I'm not familiar with BESA layout files, but assuming that all layout files are similar over subjects, I think it is fine to just use an individual subject's layout file. Hope this helps, Best Ingrid > ---Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Manish Saggar > Sent: Tuesday, May 12, 2009 10:17 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] Clusterplot not highlighting clusters & average > layout file > > All, > > I have a question regarding clusterplot function. I am doing a > within-subject analysis. > The experimental design that I have is as follows, there are three > conditions C1, C2 and C3. Each condition is of 1 min duration (e.g. > rest with eyes open for 1 min). > > Now I am comparing grandaverage of freq representation of a set of > subjects for C2 with C1 etc. FreqStatistics is running just fine > creating significant (<0.025 alpha, for 2-tailed test) clusters > (positive). Now the problem is that when I try to plot the location of > this cluster using clusterplot it doesn't show any highlighted > channels. Any ideas why that is happening? > > Another question is that since I am using grandaverages of freq > representation, what should I use for layout file (using BESA sfp file > here). I have individual subject layout files. Currently I am just > giving any file from one of the subjects. Since, I noticed that > FreqStatistics finds a common minimum set of channels and then apply > statistics on it. So do I need to average layout files for the subject > group or is there any other way? > > Any help is much appreciated. > > Regards, > Manish > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK Wed May 13 18:47:01 2009 From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith) Date: Wed, 13 May 2009 17:47:01 +0100 Subject: baseline correction on cross-spectral densities Message-ID: Dear Field Trip users I'm currently trying to obtain source coherence networks from some MEG data using the DICS beamformer method. I am calculating the necessary cross-spectral densities (CSDs) using the freqanalysis function. I was wondering is it necessary (or wise) to do baseline correction on the CSD data? I have already applied baseline correction to the data in time domain but I understand that the same correction still needs to be applied in the frequency domain. The function freqbaseline does this but it only allows you to correct non-complex power values. Is it appropriate to manually apply baseline correction on the complex CSDs? Or would it be more appropriate to calculate the CSDs and source coherence for the pre- and post- stimulus data separately, and then apply baseline correction to the coherence data? Any advice would be greatly appreciated. Thanks Mark -- Mark Drakesmith PhD Student Neuroscience and Aphasia Research Unit (NARU) University of Manchester ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From dsenkows at UKE.UNI-HAMBURG.DE Wed May 13 19:03:20 2009 From: dsenkows at UKE.UNI-HAMBURG.DE (vervang dit voor je naam of door ANONYMOUS) Date: Wed, 13 May 2009 19:03:20 +0200 Subject: ROI definition Message-ID: Dear all, I was wondering whether it is possible to use *.wrl files to assign ROIs in source space. Specifically, I am looking for a localization/probability file to define the sensorimotor hand area (*.hdr / *.img). Thank you for help and regards, Daniel Senkowski -- Pflichtangaben gem�� Gesetz �ber elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universit�tsklinikum Hamburg-Eppendorf K�rperschaft des �ffentlichen Rechts Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. J�rg F. Debatin (Vorsitzender) Dr. Alexander Kirstein Ricarda Klein Prof. Dr. Dr. Uwe Koch-Gromus ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jrkerlin at UCDAVIS.EDU Wed May 13 22:37:46 2009 From: jrkerlin at UCDAVIS.EDU (Jess R. Kerlin) Date: Wed, 13 May 2009 13:37:46 -0700 Subject: Source filtering Message-ID: Dear FTrippers, I created a standard 2-dipole model in BESA from a 128-electrode EEG array, and I would like to apply this as a filter on separate single trial data, to reduce each trial from 128 channels to 2 source waveforms. The external function readBESAbsa appears to load in the dipole locations and orientations correctly, however, I am unaware of a function which uses this information to filter the data as described above. Any input is appreciated. Thanks, Jess ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From nathanweisz at MAC.COM Thu May 14 07:55:49 2009 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Thu, 14 May 2009 07:55:49 +0200 Subject: Source filtering In-Reply-To: <4A0B2F9A.6050709@ucdavis.edu> Message-ID: hi jess, in the source analysis module of BESA you can create / save a source montage (e.g. based on ERP peak /peaks). then you can apply this montage to the raw data within BESA (haven't done it for a long time; look at the BESA-help). After that export the source projected data and read in matlab via besa2fieldtrip (that gives you a fieldtrip preprocessing structure). i.e. no need to do the single trial source projection in fieldtrip. also i can't remember it was possible to export leadfields out of BESA, but i may be wrong. good luck, nathan On 13.05.2009, at 22:37, Jess R. Kerlin wrote: > Dear FTrippers, > > I created a standard 2-dipole model in BESA from a 128-electrode EEG > array, and I would like to apply this as a filter on separate single > trial data, to reduce each trial from 128 channels to 2 source > waveforms. The external function readBESAbsa appears to load in the > dipole locations and orientations correctly, however, I am unaware > of a function which uses this information to filter the data as > described above. Any input is appreciated. > > Thanks, > Jess > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From tinar at IDAC.TOHOKU.AC.JP Thu May 14 10:28:03 2009 From: tinar at IDAC.TOHOKU.AC.JP (Tina Rasmussen) Date: Thu, 14 May 2009 17:28:03 +0900 Subject: ROI definition In-Reply-To: <4AA828C7-A2AE-48CD-BBD7-D9E2276DA6BE@UKE.UNI-HAMBURG.DE> Message-ID: Dear Daniel, I have not yet any experience with FieldTrip, so I cannot reply on the *.wrl issue. But with respect to masks for the hand area, here is a tip: The Jerne database (http://neuro.imm.dtu.dk/services/jerne/ninf/voi/hand_area.html) contains such localization masks. One important point is, that those masks have a smooth transition between voxels inside the region (one) and voxels outside the region (zero). If you need sharp transitions, you may have to generate them yourself (apply a threshold on the voxel values), or search somewhere else. Best regards, Tina Rasmussen. wrote: > Dear all, > > I was wondering whether it is possible to use *.wrl files to assign > ROIs in source space. > > Specifically, I am looking for a localization/probability file to > define the sensorimotor hand area (*.hdr / *.img). > > Thank you for help and regards, > > > Daniel Senkowski > > > > > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: tinar.vcf Type: text/x-vcard Size: 382 bytes Desc: not available URL: From moratti at MED.UCM.ES Thu May 14 15:39:48 2009 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Thu, 14 May 2009 15:39:48 +0200 Subject: Sourcefiltering In-Reply-To: Message-ID: Dear Jess, You could define a montage with your two sources in BESA and project the whole data set on the two sources. Then you export the projected data as for example simple binary that you can read in with fieldtrip. Thus, you would have the single trials already projected on the two sources. I am not sure if that is exactly what you want. I hope I could help, Best, Stephan -- *Stephan Moratti, PhD/ /**/see also: http://web.me.com/smoratti/ /*Centro de Tecnología Biomédica CBT, Universidad Politécnica de Madrid, en la actualidad (currently at) en el Centro de Magnetoencefalografía Dr. Perez Modrego, Universidad Complutense de Madrid, Faculdad de Medicina, Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain, email: moratti at gbt.tfo.upm.es moratti at med.ucm.es Tel.: +34 91 394 2292 Fax.: +34 91 394 2294 */ /* ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From charles.cook at ULETH.CA Thu May 14 15:41:21 2009 From: charles.cook at ULETH.CA (Charles Cook) Date: Thu, 14 May 2009 15:41:21 +0200 Subject: electrode load and clusterrandanalysis Message-ID: Hi Michael, Here's the basics of the code. As I mentioned I modified the code from Peter Praamstra's data where the TF power was computed in BESA. The full analysis will have both between group (males vs. females) and within group (location vs. feature identity) aspects. At this point in the code, I'm just trying to get the between group analysis going on one of the tasks. I'm not certain what precise version I'm with, I believe it's from fall 2008. For brevity, I've not included the BESA datafile lists for my different conditions. ------------------------------------------------------------------ % collect all single subject data in a convenient cell-array for i=1:nsubj femfeat{i} = besa2fieldtrip(filename_femfeat{i}); femloc{i} = besa2fieldtrip(filename_femloc{i}); malefeat{i} = besa2fieldtrip(filename_malefeat{i}); maleloc{i} = besa2fieldtrip(filename_maleloc{i}); end % this is needed for the channel labels in the data from Peter Praamstra % Matlab is case sensitive and so the channel and electrode names should match for i=1:nsubj for j=1:length(maleloc{i}.label) if maleloc{i}.label{j}(end)=='H' maleloc{i}.label{j}(end)='h'; end end for j=1:length(femloc{i}.label) if femloc{i}.label{j}(end)=='H' femloc{i}.label{j}(end)='h'; end end % load a set of electrodes (these are on a unit sphere) % note, this will be different for your own data load ('elec'); <------------------------------------------where it breaks down %scale the electrodes to a realistic head size (in cm) elec.pnt = 10*elec.pnt; %prepare layout read_fcdc_elec('HGSN_129_NoFids.sfp'); cfg = []; cfg.rotate = 0; cfg.elecfile = 'HGSN_129_NoFids.sfp'; mylay = prepare_layout(cfg); %cfg.layout = 'HGSN_129_NoFids.sfp'; %mylay = prepare_layout(cfg); % compute the grand average for both conditions cfg = []; cfg.keepindividuals = 'yes'; femfeat_avg = freqgrandaverage(cfg, femfeat{:}); femloc_avg = freqgrandaverage(cfg, femloc{:}); malefeat_avg = freqgrandaverage(cfg, malefeat{:}); maleloc_avg = freqgrandaverage(cfg, maleloc{:}); % Create difference waves % Female Location and feature fem_diff_feat_loc = femfeat_avg; %creates a dummy array male_diff_loc_feat = maleloc_avg; male_diff_loc_feat.powspctrm = maleloc_avg.powspctrm - femloc_avg.powspctrm; fem_diff_feat_loc.powspctrm = femfeat_avg.powspctrm - malefeat_avg.powspctrm; cfg = []; cfg.layout = mylay; cfg.showlabels = 'yes'; % recompute the average, except do _not_ average but keepindividual % this collects all identical time/frequency/channel samples over all % subjects into a single data structure cfg = []; cfg.keepindividual = 'yes'; maleloc_all = freqgrandaverage(cfg, maleloc{:}); femloc_all = freqgrandaverage(cfg, femloc{:}); % % perform the statistical test using randomization and a clustering approach % using the OLD clusterrandanalysis function cfg = []; cfg.elecfile = mylay; %cfg.geomfile = mylay; cfg.neighbourdist = 4; cfg.latency = 'all'; cfg.frequency = 'all'; cfg.channel = 'all'; % see CHANNELSELECTION cfg.avgovertime = 'no'; cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'indepsamplesT'; cfg.nranddraws = 200; stat = clusterrandanalysis (cfg.elecfile, maleloc_all, femloc_all); % perform the statistical test using randomization and a clustering approach % using the NEW freqstatistics function cfg = []; cfg.elecfile = mylay; cfg.neighbourdist = 4; cfg.latency = 'all'; cfg.frequency = 'all'; cfg.channel = 'all'; % see CHANNELSELECTION cfg.avgovertime = 'no'; cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'indepsamplesT'; cfg.numrandomization = 200; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.design = [ 1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 10 11 % subject number 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2]; % condition number cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable stat = freqstatistics(cfg, maleloc_avg, femloc_avg); ----------------------------------------------------------------------- The error I get is as follows: ??? Error using ==> load Unable to read file elec: No such file or directory. Error in ==> CMCWM2_clust at 108 load ('elec'); Any help would be greatly appreciated. Cheers, Charles ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jrkerlin at UCDAVIS.EDU Thu May 14 17:39:05 2009 From: jrkerlin at UCDAVIS.EDU (Jess R. Kerlin) Date: Thu, 14 May 2009 08:39:05 -0700 Subject: Sourcefiltering In-Reply-To: <4A0C1F24.8080600@med.ucm.es> Message-ID: Many thanks to Stephan and Nathan for the advice. I was hoping to avoid this option, as all of my other analysis steps are scripted in Matlab, but I suppose its worth the leg work. -Jess Stephan Moratti wrote: > Dear Jess, > > You could define a montage with your two sources in BESA and project > the whole data set on the two sources. Then you export the projected > data as for example simple binary that you can read in with fieldtrip. > Thus, you would have the single trials already projected on the two > sources. I am not sure if that is exactly what you want. > > I hope I could help, > > Best, > > Stephan > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Thu May 14 19:13:43 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Thu, 14 May 2009 19:13:43 +0200 Subject: electrode load and clusterrandanalysis Message-ID: Hi Charles, if your code literally contains: load ('elec'); that will not work, for sure. The reason is, that you are trying to read a file (via MATLAB's load command) named "elec" in the current directory, which almost certainly does not exist. Try something like: elec = read_fcdc_elec('HGSN_129_NoFids.sfp'); and then add this as a field to the relevant data structures, like this femfeat{i}.elec=elec ... ... This way you'll be doing an electrode name based averaging over subjects. It may be better - since you have all the individual digitized electrode positions as .sfp files (do you?) - to export everything into a virtual BESA standard montage (81 ch in average reference is the most popular option) and then to fieldtrip, as this will take into account the different electrode positions in the different subjects (but we can leave that for later, let's first get the above running :-)...). Michael > -----Ursprüngliche Nachricht----- > Von: "Charles Cook" > Gesendet: 14.05.09 15:42:41 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] electrode load and clusterrandanalysis > Hi Michael, > > Here's the basics of the code. As I mentioned I modified the code from Peter > Praamstra's data where the TF power was computed in BESA. The full analysis > will have both between group (males vs. females) and within group (location > vs. feature identity) aspects. At this point in the code, I'm just trying to > get the between group analysis going on one of the tasks. I'm not certain > what precise version I'm with, I believe it's from fall 2008.femfeat{i} > > For brevity, I've not included the BESA datafile lists for my different > conditions. > > ------------------------------------------------------------------ > > % collect all single subject data in a convenient cell-array > for i=1:nsubj > femfeat{i} = besa2fieldtrip(filename_femfeat{i}); > femloc{i} = besa2fieldtrip(filename_femloc{i}); > malefeat{i} = besa2fieldtrip(filename_malefeat{i}); > maleloc{i} = besa2fieldtrip(filename_maleloc{i}); > end > > % this is needed for the channel labels in the data from Peter Praamstra > % Matlab is case sensitive and so the channel and electrode names should match > > for i=1:nsubj > for j=1:length(maleloc{i}.label) > if maleloc{i}.label{j}(end)=='H' > maleloc{i}.label{j}(end)='h'; > end > end > for j=1:length(femloc{i}.label) > if femloc{i}.label{j}(end)=='H' > femloc{i}.label{j}(end)='h'; > end > end > > > > % load a set of electrodes (these are on a unit sphere) > % note, this will be different for your own data > load ('elec'); <------------------------------------------where it breaks down > %scale the electrodes to a realistic head size (in cm) > elec.pnt = 10*elec.pnt; > > %prepare layout > read_fcdc_elec('HGSN_129_NoFids.sfp'); > cfg = []; > cfg.rotate = 0; > cfg.elecfile = 'HGSN_129_NoFids.sfp';read_fcdc_elec('HGSN_129_NoFids.sfp'); > mylay = prepare_layout(cfg); > %cfg.layout = 'HGSN_129_NoFids.sfp'; > %mylay = prepare_layout(cfg); > > % compute the grand average for both conditions > cfg = []; > cfg.keepindividuals = 'yes'; > femfeat_avg = freqgrandaverage(cfg, femfeat{:}); > femloc_avg = freqgrandaverage(cfg, femloc{:}); > malefeat_avg = freqgrandaverage(cfg, malefeat{:}); > maleloc_avg = freqgrandaverage(cfg, maleloc{:}); > > % Create difference waves > % Female Location and feature > fem_diff_feat_loc = femfeat_avg; %creates a dummy array > male_diff_loc_feat = maleloc_avg; > male_diff_loc_feat.powspctrm = maleloc_avg.powspctrm - femloc_avg.powspctrm; > fem_diff_feat_loc.powspctrm = femfeat_avg.powspctrm - malefeat_avg.powspctrm; > > cfg = []; > cfg.layout = mylay; > cfg.showlabels = 'yes'; > > % recompute the average, except do _not_ average but keepindividual > % this collects all identical time/frequency/channel samples over all > % subjects into a single data structure > cfg = []; > cfg.keepindividual = 'yes'; > maleloc_all = freqgrandaverage(cfg, maleloc{:}); > femloc_all = freqgrandaverage(cfg, femloc{:}); > > % > % perform the statistical test using randomization and a clustering approach > % using the OLD clusterrandanalysis function > cfg = []; > cfg.elecfile = mylay; > %cfg.geomfile = mylay; > cfg.neighbourdist = 4; > cfg.latency = 'all'; > cfg.frequency = 'all'; > cfg.channel = 'all'; % see CHANNELSELECTION > cfg.avgovertime = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgoverchan = 'no'; > cfg.statistic = 'indepsamplesT'; > cfg.nranddraws = 200; > stat = clusterrandanalysis (cfg.elecfile, maleloc_all, femloc_all); > > > % perform the statistical test using randomization and a clustering approach > % using the NEW freqstatistics function > cfg = []; > cfg.elecfile = mylay; > cfg.neighbourdist = 4; > cfg.latency = 'all'; > cfg.frequency = 'all'; > cfg.channel = 'all'; % see CHANNELSELECTION > cfg.avgovertime = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgoverchan = 'no'; > cfg.statistic = 'indepsamplesT'; > cfg.numrandomization = 200; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.design = [ > 1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 10 11 % subject number > 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2]; % condition number > cfg.uvar = 1; % "subject" is unit of > observation > cfg.ivar = 2; % "condition" is the > independent variable > stat = freqstatistics(cfg, maleloc_avg, femloc_avg); > ----------------------------------------------------------------------- > The error I get is as follows: > > ??? Error using ==> load > Unable to read file elec: No such file or directory. > > Error in ==> CMCWM2_clust at 108 > load ('elec'); > > Any help would be greatly appreciated. > > Cheers, > > Charles > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From manish.saggar at GMAIL.COM Fri May 15 08:25:47 2009 From: manish.saggar at GMAIL.COM (Manish Saggar) Date: Fri, 15 May 2009 01:25:47 -0500 Subject: Clusterplot not highlighting clusters & average layout file In-Reply-To: <01c901c9d399$f31b00e0$642dae83@fcdonders.nl> Message-ID: Ingrid, thanks for replying back. Apologies for lack of information. Clusterplot is plotting clusters fine most of the times, but in some cases it doesn't choose to highlight markers. I have attached two such images with this email. I do not get any errors or warnings. In fact the command window in matlab says, cluster found (with some prob and highlighter sign) and then the plot doesn't contain any highlighting. Initially I thought that my layout file might be messing it up or something, or may be I need to take an average layout file for group analysis (since cap size and electrode digitization varies for each subject). Then I put debug points in the code and found out that at line 235 the list cell (used to denote highlighted points) is empty. I am a novice so please forgive if what I am suggesting is dumb here, but I think when cluster plot is searching for significant clusters it is only looking into first column (which could correspond to first frequency in band) if one cluster is found by freqstats. It might be that in the code you guys are sorting columns and I might have missed it. But I thought I should clear this with you. In another thread you have mentioned to someone that their time limits might not be precise enough to get the clusers highlighted (https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0709&L=FIELDTRIP&P=R680 ). But they were doing time-freq analysis and I am just doing freq- representations. So should I use freqstats on each freq separately ? On a side note, when I run freqstats on my data (with 88 channels) command line says '89 neighbors per channel found'. I am a little confused with this. First since I only have less than 88 channels in the data and second since it should only consider a lower number for neighbor distance, right? and how can I change it? Thanks a ton in advance, Manish On May 13, 2009, at 2:10 AM, Ingrid Nieuwenhuis wrote: > Dear Manish, > > You give a bit too few information to be able to figure out what > could be > the problem with clusterplot. After calling clusterplot, clusterplot > gives > information on which clusters it finds. Does the function find any > clusters? > Does the .mask field of the structure that comes out of freqstatistics > contain any ones? Is everything else plotted normally? Do you get > any errors > or warnings? > > I'm not familiar with BESA layout files, but assuming that all > layout files > are similar over subjects, I think it is fine to just use an > individual > subject's layout file. > > Hope this helps, > Best Ingrid > > >> ---Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >> Behalf Of Manish Saggar >> Sent: Tuesday, May 12, 2009 10:17 AM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: [FIELDTRIP] Clusterplot not highlighting clusters & average >> layout file >> >> All, >> >> I have a question regarding clusterplot function. I am doing a >> within-subject analysis. >> The experimental design that I have is as follows, there are three >> conditions C1, C2 and C3. Each condition is of 1 min duration (e.g. >> rest with eyes open for 1 min). >> >> Now I am comparing grandaverage of freq representation of a set of >> subjects for C2 with C1 etc. FreqStatistics is running just fine >> creating significant (<0.025 alpha, for 2-tailed test) clusters >> (positive). Now the problem is that when I try to plot the location >> of >> this cluster using clusterplot it doesn't show any highlighted >> channels. Any ideas why that is happening? >> >> Another question is that since I am using grandaverages of freq >> representation, what should I use for layout file (using BESA sfp >> file >> here). I have individual subject layout files. Currently I am just >> giving any file from one of the subjects. Since, I noticed that >> FreqStatistics finds a common minimum set of channels and then apply >> statistics on it. So do I need to average layout files for the >> subject >> group or is there any other way? >> >> Any help is much appreciated. >> >> Regards, >> Manish >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the >> FieldTrip toolbox, to share experiences and to discuss new ideas >> for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From dionyssios.theofilou at GMAIL.COM Fri May 15 18:10:41 2009 From: dionyssios.theofilou at GMAIL.COM (Dionyssios Theofilou) Date: Fri, 15 May 2009 09:10:41 -0700 Subject: trialfun_neuromag.m is missing ? Message-ID: Hello, I am new to fieldtrip and I have just started trying to import a neuromag '.fif' file. I wanted to ask: Is the 'trialfun_neuromag.m' missing from the latest distribution ? I have expanded the: fieldtrip-20090509.zip The error message that I receive is: evaluating trialfunction 'trialfun_neuromag' ??? Error using ==> feval Undefined function or method 'trialfun_neuromag' for input arguments of type 'struct'. Error in ==> definetrial at 200 trl = feval(cfg.trialfun, cfg); Error in ==> filename.m at 7 cfg = definetria(cfg); Also, I don't see any Neuromag-like directory in the subdirectories of the distribution. My Best, Dionyssios Theofilou. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From charles.cook at ULETH.CA Fri May 15 19:01:57 2009 From: charles.cook at ULETH.CA (Charles Cook) Date: Fri, 15 May 2009 19:01:57 +0200 Subject: electrode load and clusterrandanalysis Message-ID: Hi Michael, I do have all the sfp files, and agree that standardizing might be the best option to address the problem. Is there a version of the 'HGSN_129_NoFids.sfp' for the std-81 montage? Cheers, Charles ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Nina.Kahlbrock at UNI-DUESSELDORF.DE Sat May 16 17:05:42 2009 From: Nina.Kahlbrock at UNI-DUESSELDORF.DE (Nina Kahlbrock) Date: Sat, 16 May 2009 17:05:42 +0200 Subject: significant coherence Message-ID: Dear Fieldtrip users, I have a question concerning significant coherence. I saw that a similar question was asked before on the mailing list. As I am new to coherence, I did not quite understand the answer. So here is my question: I have computed coherence between different MEG sensors and a photodiode. Now, I would like to compute significance levels for these coherence values at different frequencies. Is there a function in fieldtrip that I can use to solve this task? I have found the function 'statfun_indepsamplesZcoh'. However, I am not sure whether this is the right one to use. I would greatly appreciate your help! Thanks in advance. Nina ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.schoffelen at PSY.GLA.AC.UK Mon May 18 22:13:05 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Mon, 18 May 2009 21:13:05 +0100 Subject: significant coherence In-Reply-To: <000001c9d637$c817ad30$cd136386@vmed.ukd> Message-ID: Dear Nina, There is no fieldtrip function in the release allowing for the testing of significant coherence, if I understand correctly what you want. This would be to infer whether a given estimate of coherence is significantly different from zero. This means that you are not testing two conditions against each other (which is what stafun_indepsamplesZcoh is doing; on top of this: it does it for all combinations of channels, and not just for all channels versus a given external reference signal). There are two ways in which you can assess the 'significance'. First would be something like a 'shift predictor'. In short, one could shuffle the order of the replications for the reference channel and recompute coherence between the reference and the rest. Provided the reference is not the same signal in each trial, doing this many times would give you an estimate of the 'bias' in coherence. Any observed coherence values in the upper 5% tail then would count as significant (this by the way only works for an external reference channel, and not when you use one of the MEG channels as a reference). This shift predictor is perhaps something of an overkill, and you could use a parametric test instead. One way to do this, is to 'Z- transform' the coherence. I am used to using a particular formula which is described in one of our papers (Schoffelen, Science 2005 (supplementary material)); the appropriate references can also be found therein. I hope this helps, Cheers, Jan-Mathijs On May 16, 2009, at 4:05 PM, Nina Kahlbrock wrote: > Dear Fieldtrip users, > > I have a question concerning significant coherence. I saw that a > similar question was asked before on the mailing list. As I am new > to coherence, I did not quite understand the answer. > So here is my question: I have computed coherence between different > MEG sensors and a photodiode. Now, I would like to compute > significance levels for these coherence values at different > frequencies. Is there a function in fieldtrip that I can use to > solve this task? I have found the function > ‘statfun_indepsamplesZcoh’. However, I am not sure whether this is > the right one to use. > > I would greatly appreciate your help! > > Thanks in advance. > Nina > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From moratti at MED.UCM.ES Tue May 19 14:28:37 2009 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Tue, 19 May 2009 14:28:37 +0200 Subject: megplanar for magnetometers In-Reply-To: Message-ID: Hi all, I would like to transform my magnetometer maps to a planargradiometer representation (with BESA I can do that, but it would be nice to have it in fieldtrip). I guess, simply using megplanar and combineplanar as it is, would be incorrect, as this functions assume axial gradiameters. So, I tried to change some code of megplanar (lines 281-287, method 'orig') simply assuming that X2 Y2 and Z2 are equal to X,Y,Z in the case of magnetometers: % get the positions of bottom and top coil X = grad.pnt(:, 1); Y = grad.pnt(:, 2); Z = grad.pnt(:, 3); X2 = grad.pnt(:, 1);% + grad.ori(:,1); Y2 = grad.pnt(:, 2);% + grad.ori(:,2); Z2 = grad.pnt(:, 3);% + grad.ori(:,3); Well, probably this is quite naive. Attached please find my results (testplanar.tiff). testmagneto.tiff contains the original magnetic flux map (magentometers). Can anybody figure out if this makes sense? Thanks for any comments and help, Stephan -- *Stephan Moratti, PhD/ /**/see also: http://web.me.com/smoratti/ /*Centro de Tecnología Biomédica CBT, Universidad Politécnica de Madrid, en la actualidad (currently at) en el Centro de Magnetoencefalografía Dr. Perez Modrego, Universidad Complutense de Madrid, Faculdad de Medicina, Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain, email: moratti at gbt.tfo.upm.es moratti at med.ucm.es Tel.: +34 91 394 2292 Fax.: +34 91 394 2294 */ /* ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: testplanar.tif Type: image/tiff Size: 197102 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: testmagneto.tif Type: image/tiff Size: 193370 bytes Desc: not available URL: From j.schoffelen at PSY.GLA.AC.UK Tue May 19 23:28:17 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Tue, 19 May 2009 22:28:17 +0100 Subject: megplanar for magnetometers In-Reply-To: <4A12A5F5.6080704@med.ucm.es> Message-ID: Dear Stephan, I would advice you to use cfg.method = 'sincos'. As a matter of fact, the 'orig' method has been conceived indeed for axial gradient data, but I believe the info about the top coil is only used to temporarily generate a local z-axis throught the gradiometer, to define the local X and Y coordinate frame for the planar gradient. Using the sincos- method the XY coordinate frame is different, but apart from that, the planar gradient field interpolation works with the same logic, estimating a gradient in an X and Y direction based on an interpolation of the gradients between the magnetic field (magnetometers) or axial gradient (gradiometers) at a given sensor and its neighbours. Yours, Jan-Mathijs On May 19, 2009, at 1:28 PM, Stephan Moratti wrote: > Hi all, > > I would like to transform my magnetometer maps to a > planargradiometer representation (with BESA I can do that, but it > would be nice to have it in fieldtrip). I guess, simply using > megplanar and combineplanar as it is, would be incorrect, as this > functions assume axial gradiameters. So, I tried to change some > code of megplanar (lines 281-287, method 'orig') simply assuming > that X2 Y2 and Z2 are equal to X,Y,Z in the case of magnetometers: > > % get the positions of bottom and top coil > X = grad.pnt(:, 1); > Y = grad.pnt(:, 2); > Z = grad.pnt(:, 3); > X2 = grad.pnt(:, 1);% + grad.ori(:,1); > Y2 = grad.pnt(:, 2);% + grad.ori(:,2); > Z2 = grad.pnt(:, 3);% + grad.ori(:,3); > > Well, probably this is quite naive. Attached please find my results > (testplanar.tiff). testmagneto.tiff contains the original magnetic > flux map (magentometers). Can anybody figure out if this makes sense? > > Thanks for any comments and help, > > Stephan > > > -- > *Stephan Moratti, PhD/ > /**/see also: http://web.me.com/smoratti/ > /*Centro de Tecnología Biomédica CBT, > Universidad Politécnica de Madrid, > > en la actualidad (currently at) en el > Centro de Magnetoencefalografía Dr. Perez Modrego, > Universidad Complutense de Madrid, > Faculdad de Medicina, > Pabellón 8, > Avda. Complutense, s/n, > 28040 Madrid, > Spain, > > email: moratti at gbt.tfo.upm.es > moratti at med.ucm.es > Tel.: +34 91 394 2292 > Fax.: +34 91 394 2294 > */ > /* > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/neuroimaging/ > fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From moratti at MED.UCM.ES Wed May 20 10:05:36 2009 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Wed, 20 May 2009 10:05:36 +0200 Subject: megplanar for magentometers In-Reply-To: Message-ID: Dear Jan-Mathijs, Thanks for your comments, I will check this out. By the way I am still behind the table weights ;-) .... Best, Stephan -- *Stephan Moratti, PhD/ /**/see also: http://web.me.com/smoratti/ /*Centro de Tecnología Biomédica CBT, Universidad Politécnica de Madrid, en la actualidad (currently at) en el Centro de Magnetoencefalografía Dr. Perez Modrego, Universidad Complutense de Madrid, Faculdad de Medicina, Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain, email: moratti at gbt.tfo.upm.es moratti at med.ucm.es Tel.: +34 91 394 2292 Fax.: +34 91 394 2294 */ /* ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From dahliash at STANFORD.EDU Thu May 21 22:24:59 2009 From: dahliash at STANFORD.EDU (Dahlia Sharon) Date: Thu, 21 May 2009 13:24:59 -0700 Subject: multiplotTFR not redrawing In-Reply-To: <1015851759.4956171242937368734.JavaMail.root@zm09.stanford.edu> Message-ID: Hi, I'm new to fieldtrip and am using the multiplotTFR to view results from freqanalysis. After I initially view a figure that contains a multiplot, if I then view another figure that has a multiplot, I cannot get matlab to redraw the first figure, and then the second figure also becomes blank, and I need to restart matlab (i.e. just closing the figures and repeating the multiplot command doesn't work). Any idea how I can resolve this issue? I'm viewing the Linux environment through X-Win32 on Windows XP; this is Neuromag data opened with Matti's MNE suite. Thanks!! Dahlia. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at DONDERS.RU.NL Fri May 22 16:47:42 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 22 May 2009 16:47:42 +0200 Subject: Clusterplot not highlighting clusters & average layout file Message-ID: Dear Manish, If I understand correctly you have multiple frequencies over which you cluster. Is that correct? (so cfg.avgoverfreq = 'no' when you called freqstatistics?) In that case you should not call clusterplot because for different frequencies there can be different channels part of the cluster. Instead you can call multiplotER or multiplotTFR and use cfg.maskparameter = 'mask' to plot the significant cluster. Hope this helps, Ingrid > -----Original Message----- > From: Manish Saggar [mailto:manish.saggar at gmail.com] > Sent: Friday, May 15, 2009 8:26 AM > To: ingrid.nieuwenhuis at donders.ru.nl > Cc: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] Clusterplot not highlighting clusters & average > layout file > > Ingrid, thanks for replying back. > > Apologies for lack of information. > > Clusterplot is plotting clusters fine most of the times, but in some > cases it doesn't choose to highlight markers. I have attached two such > images with this email. > > I do not get any errors or warnings. In fact the command window in > matlab says, cluster found (with some prob and highlighter sign) and > then the plot doesn't contain any highlighting. > Initially I thought that my layout file might be messing it up or > something, or may be I need to take an average layout file for group > analysis (since cap size and electrode digitization varies for each > subject). > > Then I put debug points in the code and found out that at line 235 the > list cell (used to denote highlighted points) is empty. I am a novice > so please forgive if what I am suggesting is dumb here, but I think > when cluster plot is searching for significant clusters it is only > looking into first column (which could correspond to first frequency > in band) if one cluster is found by freqstats. It might be that in the > code you guys are sorting columns and I might have missed it. But I > thought I should clear this with you. > > In another thread you have mentioned to someone that their time limits > might not be precise enough to get the clusers highlighted > (https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0709&L=FIELDTRIP&P=R680 > ). But they were doing time-freq analysis and I am just doing freq- > representations. So should I use freqstats on each freq separately ? > > On a side note, when I run freqstats on my data (with 88 channels) > command line says '89 neighbors per channel found'. I am a little > confused with this. First since I only have less than 88 channels in > the data and second since it should only consider a lower number for > neighbor distance, right? and how can I change it? > > Thanks a ton in advance, > Manish > > On May 13, 2009, at 2:10 AM, Ingrid Nieuwenhuis wrote: > > > Dear Manish, > > > > You give a bit too few information to be able to figure out what > > could be > > the problem with clusterplot. After calling clusterplot, clusterplot > > gives > > information on which clusters it finds. Does the function find any > > clusters? > > Does the .mask field of the structure that comes out of freqstatistics > > contain any ones? Is everything else plotted normally? Do you get > > any errors > > or warnings? > > > > I'm not familiar with BESA layout files, but assuming that all > > layout files > > are similar over subjects, I think it is fine to just use an > > individual > > subject's layout file. > > > > Hope this helps, > > Best Ingrid > > > > > >> ---Original Message----- > >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > >> Behalf Of Manish Saggar > >> Sent: Tuesday, May 12, 2009 10:17 AM > >> To: FIELDTRIP at NIC.SURFNET.NL > >> Subject: [FIELDTRIP] Clusterplot not highlighting clusters & average > >> layout file > >> > >> All, > >> > >> I have a question regarding clusterplot function. I am doing a > >> within-subject analysis. > >> The experimental design that I have is as follows, there are three > >> conditions C1, C2 and C3. Each condition is of 1 min duration (e.g. > >> rest with eyes open for 1 min). > >> > >> Now I am comparing grandaverage of freq representation of a set of > >> subjects for C2 with C1 etc. FreqStatistics is running just fine > >> creating significant (<0.025 alpha, for 2-tailed test) clusters > >> (positive). Now the problem is that when I try to plot the location > >> of > >> this cluster using clusterplot it doesn't show any highlighted > >> channels. Any ideas why that is happening? > >> > >> Another question is that since I am using grandaverages of freq > >> representation, what should I use for layout file (using BESA sfp > >> file > >> here). I have individual subject layout files. Currently I am just > >> giving any file from one of the subjects. Since, I noticed that > >> FreqStatistics finds a common minimum set of channels and then apply > >> statistics on it. So do I need to average layout files for the > >> subject > >> group or is there any other way? > >> > >> Any help is much appreciated. > >> > >> Regards, > >> Manish > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > >> of the > >> FieldTrip toolbox, to share experiences and to discuss new ideas > >> for MEG > >> and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > > of the FieldTrip toolbox, to share experiences and to discuss new > > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html > > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From amano at BRAIN.K.U-TOKYO.AC.JP Mon May 25 10:26:14 2009 From: amano at BRAIN.K.U-TOKYO.AC.JP (Kaoru Amano) Date: Mon, 25 May 2009 17:26:14 +0900 Subject: independsamplesZcoh In-Reply-To: Message-ID: Dear all I have a very similar problem about the freqstatistics with 'independsamplesZcoh', as Jamie asked below. As jan-mathijs suggested, within 'independsamplesZcoh' Z-transformed coherence difference is computed between all pairs of input channels, but the 'clusterstat' seems to expect the first dimension of input to be the number of channels not the number of the combination of channels, which create an error in 'clusterstat' at 195. It would be great if some of you could tell me how we can solve this problem. Best, Kaoru -- Kaoru Amano email: amano at brain.k.u-tokyo.ac.jp URL: http://www.brain.k.u-tokyo.ac.jp/~amano/ > I have fixed the issues in my posting below and seem to be getting closer to having my code run. However, I still run into a dimension mismatch in clusterstat...I'm trying to understand the following code, where I think this mismatch occurs. > % determine whether the input represents N-D volumetric data or channel-freq-time data and provide the appropriate details > % TODO this detection should be more robust > if isfield(cfg, 'neighbours') && ~isempty(cfg.neighbours) > channeighbstructmat = makechanneighbstructmat(cfg); > issource = 0; > else > issource = 1; > % cfg contains dim and inside that are needed for reshaping the data to a volume, and inside should behave as a index vector > cfg = fixinside(cfg, 'index'); > end > The dimension of the data (statobs) that is passed to clusterstat is 520 X 1 (10 channels of coherence differences x 52 frequencies concatenated; note: this use to be 5 channels of powspctrm) which makes sense. I am trying to cluster by frequency (not channel)...the output of "fixinside" function returns cfg.index of dimension (1 X 260), causing a dimension mismatch at line 188 in clusterstat. The reason this happens, I think, is in line 37 of fixinside where > elseif isfield(source, 'dim') > source.inside = 1:prod(source.dim); > source.outside = []; > end > for some reason source.dim still has the dimension 5 X 52 X 1, ie, the dimensions prior to computing the coherence differences. I'm not sure whether/where I should change the cfg.dim, which I assume should reflect the dimensions of the newly computed data matrix. > Thanks, > Jamie > > ________________________________ > > From: FieldTrip discussion list on behalf of Jamie Johnston > Sent: Sun 5/3/2009 2:12 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] independsamplesZcoh > > > Thanks for your response. > > Let me clarify....I have 8 subjects (with 5 channels of data, 2 with 4 channels which I'm not using at this point)...I used only 2 subjects to test the code (for faster debugging). I do want to do a within subject statistical test between my conditions (of which I have 3, but I am only inputting 2 into freqstatistics as I was unclear whether I could run comparisons across 3 conditions). > > As you correctly point out, I did compute coherence across my 5 channels first, resulting in 10 spectra...this is what I inputted into freqstatistics, which is clearly incorrect. This is what I thought, however I didn't know exactly what the data input should look like. > > So, just to clarify, I'm running > > freqanalysis - inputting raw data, returning "powandcsd' > freqdescriptives - inputting data from freqanalysis, returning 'coh' > freqgrandaverage (keep individual 'yes') - inputting data from freqdescriptives, returning a grandaverage > freqstatistics - inputting two grandaverages (for 2 conditions), using the following parameters: > > %Compute Permutation Test > cfg = []; > cfg.parameter = 'cohspctrm'; > cfg.method = 'montecarlo'; > cfg.frequency = [0 50]; > cfg.statistic = 'indepsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 100; > cfg.computestat = 'yes'; > > > subj = length(Subjects); > design=zeros(2,2*subj); > for i = 1:subj > design(1,i) = i; > end > for i = 1:subj > design(1,subj+i) = i; > end > design(2,1:subj) = 1; > design(2,subj+1:2*subj) = 2; > > cfg.design = design; > cfg.uvar = 1; > cfg.ivar = 2; > > [stat] = freqstatistics(cfg, grandavg{1}, grandavg{2}); > > > Are you saying, I should use the output from freqanalysis (skipping freqdescriptives) as input to freqgrandaverage? Also, should my "cfg.parameter" for the freqstatistics function still be 'cohspctrm' or 'powspctrm'? > > Thanks again, > > Jamie > > > > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of jan-mathijs schoffelen > Sent: May 3, 2009 1:34 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] independsamplesZcoh > > Dear Jamie, > > For me it is not exactly clear what you want to do. In an earlier message you referred to our paper using a permutation test to test for a significant difference in coherence between conditions (Maris et al 2007). Essentially, as described, this is a test which is performed within each subject allowing you to do statistical inference about the potential difference between two conditions. As such this is the type of test indepsamplesZcoh can perform, if properly used (see below). Yet, you describe using two subjects as an input. This to me sounds rather that you would like to do statistics across subjects (although 2 subjects of course is a rather low number). This is NOT something indepsamplesZcoh can do for you. In general it is possible to test for a significant difference between two conditions across a population of subjects, but this would require a different approach. Rather than shuffling single observations across conditions PRIOR TO COMPUTING THE COHERENCE DIFFER ENCE (sorry about the capitals but this is essential for what is to follow below), one would swap the sign of the Z-transformed coherence difference for a random subset of subjects prior to averaging. > It seems as if you computed coherence spectra between all unique pairs of channels (4x5)/2 and used this as an input to freqstatistics. Yet, for single subject statistics this does not make sense, because indepsamplesZcoh expects fourier-spectra in the input. Within the function Z-transformed coherence difference will be computed between all pairs of input channels (in your case this would be (9x10)/2 (even though the function does not know you provide it with the wrong input), and multiplying this number with 52 would give your 'magical' 2340). > So, indeed you should either format your data in a different way using single subject fourier spectra in two conditions as an input to freqstatistics, or using a different statistical test to test for differences across subjects. > > Yours, > > Jan-Mathijs > > > > On May 3, 2009, at 7:00 PM, Jamie Johnston wrote: > > > > Hi all - > > I am trying to run a monte carlo - indepsamplesZcoh - cluster on my data using freqstatistics. I input two data files into freqstatistics with the cohspctrm having dimensions 2 (subjects) x 10 (channels, # of coherence spectra) x 52 (frequencies). I run into a dimension mismatch in the function clusterstat. If I run any other statistic (i.e., indepsamplesT) it runs fine. When running the indepsamplesT, clusterstat receives two inputs: statobs (520x1) and statrnd (520x100). These dimensions make sense to me. However, when running indepsamplesZcohthese two variables have dimensions 2340x1 and 2340x100, respectively. This happens around lines 104-108 in indepsamplesZcoh.m with computation of the variables "chancmbsel" and "nnewsamples." I'm not understanding what these variables do, but my guess is that I need to setup my data files differently in the beginning. My understanding of what this analysis protocol does is compute the z-statistic on each channel of coherenc e data (10 for each data file) and then find the difference between the z-statistic for each channel across the data files. Once this is complete it runs the permutations to determine the significance. > > Please verify that what I have done is correct and any help with the error I am getting would be greatly appreciated. > > Thanks, > > Jamie > > _______________ > Jamie Johnston, Ph.D. > Assistant Professor > Faculty of Kinesiology > University of Calgary > 2500 University Dr. NW > Calgary, AB > T2N 1N4 > Phone: +1 (403) 220-3649 > Fax: +1 (403) 284-3553 > email: johnston at kin.ucalgary.ca > website: http://www.kin.ucalgary.ca/wcm/knes/johnston.html > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From muthuraman10 at HOTMAIL.COM Mon May 25 16:54:20 2009 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 25 May 2009 14:54:20 +0000 Subject: Source plot! Message-ID: Hello Fieldtrip Users, I have attached a orthoplot with this mail. This source plot i plotted with the method 'ortho', but i would like get the plot in the correct direction in all the 3 slices. As i looked in the tutorial documentation need to use the volumenormalisation to get it in the correct direction. Then the next question where i can get the template with MNI coordinates which is showed in the tutorial documentation. Thanking you With regards, M.Muthuraman. _________________________________________________________________ Planning the weekend ? Here’s what is happening in your town. http://msn.asklaila.com/events/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: orthoplot.jpg Type: image/jpeg Size: 44484 bytes Desc: not available URL: From r.oostenveld at FCDONDERS.RU.NL Mon May 25 22:13:22 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 25 May 2009 22:13:22 +0200 Subject: multiplotTFR not redrawing In-Reply-To: <1588054045.4956801242937499868.JavaMail.root@zm09.stanford.edu> Message-ID: Dear Dahlia, On 21 May 2009, at 22:24, Dahlia Sharon wrote: > Any idea how I can resolve this issue? Please try the cfg.renderer option. The default (opengl) might cause problems with your X11 connection. best regards, Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From julian.keil at GMAIL.COM Tue May 26 09:51:37 2009 From: julian.keil at GMAIL.COM (Julian Keil) Date: Tue, 26 May 2009 09:51:37 +0200 Subject: TFR plot uneven y-axis spacing Message-ID: Hi everyone, I performed a TFR-analysis with unevenly spaced frequency steps (cfg.foi=[10.^(log10(2):((log10(100)-log10(2))/35):log10(100))];) Now, when I try to plot the results with multiplotTFR, I get the warning, that (one of the axis) is/are not evenly spaced. Nonetheless, the multiplotTFR works fine. The Probem arises, when I try to select single (or a number) of sensors to be plotted. I then get the following error message: ??? Attempted to access c(22,1); index out of bounds because size(c)=[21,101]. Error in ==> uimage at 128 ce(j,i) = c(indi(end), indj(end)); Error in ==> uimagesc at 50 hh = uimage(varargin{:},'CDataMapping','scaled'); Error in ==> singleplotTFR at 282 h = uimagesc(data.(cfg.xparam)(xidc), data.(cfg.yparam)(yidc), TFR, [zmin,zmax]); Error in ==> plotSelection at 343 singleplotTFR(new_cfg, userData.data); ??? Error while evaluating figure WindowButtonUpFcn Is there any way to work around this (I already tried defining the y- axis with cfg.ylim)? Thanks a lot Julian Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: julian.keil at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 194 bytes Desc: Signierter Teil der Nachricht URL: From ingrid.nieuwenhuis at DONDERS.RU.NL Tue May 26 15:23:53 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 26 May 2009 15:23:53 +0200 Subject: TFR plot uneven y-axis spacing In-Reply-To: <35A3B14D-C8E5-4B3A-AAC2-2558B43C0FB1@gmail.com> Message-ID: Hi Julian, Yes indeed plotting with unevenly spaced axis is problematic in Matlab. The problem lies in the image (and imagesc) Matlab functions that singleplotTFR and multiplotTFR call. These functions assume evenly spaced axis, and they just interpolate linearly between lowest and highest value. Therefore you cannot trust the values next to the axis when you look at the blobs, because they can be totally wrong (which you will see if you change the ylims, then the blobs shift). To get around this we used uimage and uimagesc in fieldtrip, which works around this problem by making new axis before calling image and imagesc. This was hard to implement in the current version of multiplotTFR, so there we only give a warning (we're working on restructuring the plotting functions, so in the future hopefully this will be also implemented in the multiplot functions). So although everything seems to be going fine in multiplot, you can not trust the axis there, because they are linearly interpolated! So for the error in the singleplot function, there something is not going right when making the new axis. We got the uimage and uimagesc functions as free functions from the matlabcentral fileexchange (see url in the code). You could try to debug, and see why the new axis making doesn't work. I hope this helps to solve the problem, if not let me know, I could try to help then. Best Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Julian Keil Sent: Tuesday, May 26, 2009 9:52 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] TFR plot uneven y-axis spacing Hi everyone, I performed a TFR-analysis with unevenly spaced frequency steps (cfg.foi=[10.^(log10(2):((log10(100)-log10(2))/35):log10(100))];) Now, when I try to plot the results with multiplotTFR, I get the warning, that (one of the axis) is/are not evenly spaced. Nonetheless, the multiplotTFR works fine. The Probem arises, when I try to select single (or a number) of sensors to be plotted. I then get the following error message: ??? Attempted to access c(22,1); index out of bounds because size(c)=[21,101]. Error in ==> uimage at 128 ce(j,i) = c(indi(end), indj(end)); Error in ==> uimagesc at 50 hh = uimage(varargin{:},'CDataMapping','scaled'); Error in ==> singleplotTFR at 282 h = uimagesc(data.(cfg.xparam)(xidc), data.(cfg.yparam)(yidc), TFR, [zmin,zmax]); Error in ==> plotSelection at 343 singleplotTFR(new_cfg, userData.data); ??? Error while evaluating figure WindowButtonUpFcn Is there any way to work around this (I already tried defining the y-axis with cfg.ylim)? Thanks a lot Julian Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: julian.keil at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From charles.cook at ULETH.CA Tue May 26 16:36:08 2009 From: charles.cook at ULETH.CA (Charles Cook) Date: Tue, 26 May 2009 16:36:08 +0200 Subject: electrode load and clusterrandanalysis Message-ID: Hi Michael, Still working on the problem. I have all my data in a standard 81 montage in average reference. When I'm preparing the electrode layout now, is there an sfp I need to call for, like the HGSN_129_NoFids.sfp file when analyzing 128 channels? Cheers, Charles On Thu, 14 May 2009 19:13:43 +0200, Michael Wibral wrote: >Hi Charles, >It may be better - since you have all the individual digitized electrode positions as .sfp files (do you?) - to export everything into a virtual BESA standard montage (81 ch in average reference is the most popular option) and then to fieldtrip, as this will take into account the different electrode positions in the different subjects (but we can leave that for later, let's first get the above running :-)...). > >Michael > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From khoechstetter at BESA.DE Tue May 26 17:53:51 2009 From: khoechstetter at BESA.DE (Karsten Hoechstetter) Date: Tue, 26 May 2009 17:53:51 +0200 Subject: Job offer: EEG/MEG scientist for support and development In-Reply-To: Message-ID: Dear Fieldtrip mailing list members, MEGIS Software GmbH (Munich, Germany) is looking for an EEG/MEG scientist to join our support and development team. The main tasks will be to: - provide support to our customers (predominantly email) - teach the use of our software at customer workshops - represent our products and software at neuroimaging conferences - participate in joint research projects with our customers - contribute to the development of new analysis techniques and program features The applicant should have profound experience in EEG/MEG measurement and data analysis, preferably with BESA and/or MATLAB. We expect the applicant to have experience with all steps of ERP analysis (paradigm design, digital processing, topographic mapping, averaging, source analysis). Fluency in written and spoken English are a prerequisite for the announced position. MEGIS is one of the leading developers of EEG/MEG analysis software. Our BESA program is a widely used research software the analysis of EEG and MEG data (see www.besa.de). As a free enterprise in the field of science and research we can offer job positions combining the advantages of both fields: Stay in touch with current front-end research work while enjoying the advantages of a permanent position with adequate salary. Applications should include a current CV, a letter indicating motivation and skills, and a list of publications. Electronic applications preferred. Please send your application to: Theodor Scherg (tscherg at besa.de) or to: MEGIS Software GmbH Freihamer Str. 18 82166 Graefelfing Germany We’re looking forward to hearing from you! -------------------------------------- Dr. Karsten Hoechstetter MEGIS Software GmbH Gräfelfing, Germany HRB München 109956 CEO Dr. Michael Scherg -------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jean-michel.badier at UNIVMED.FR Wed May 27 21:16:12 2009 From: jean-michel.badier at UNIVMED.FR (Jean-Michel Badier) Date: Wed, 27 May 2009 21:16:12 +0200 Subject: Problem with freqstatistics Message-ID: Dear Fieldtrip mailing list members, I am a quite new user of fieldtrip (version 10090331). I have been trying to use it for analyzing distribution of frequencies on MEG signal between two events of a task. The last command using freqstatistics result of an error message. I decided to run the tutorial "Cluster-based permutation tests on time-frequency data" in order to compare the organization my data set compared with the one in the data set. In fact I got the same bug with the tutorial data set that is for the tutorial data set: selected 149 channels selected 61 time bins selected 1 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip-20090331/private/prepare_timefreq_data at 314 In fieldtrip-20090331/private/statistics_wrapper at 315 In freqstatistics at 137 Using the gradiometer configuration from the dataset. there are on average 4.7 neighbours per channel using "statistics_montecarlo" for the statistical testing using "statfun_indepsamplesT" for the single-sample statistics constructing randomized design total number of measurements = 149 total number of variables = 1 number of independent variables = 1 number of unit variables = 0 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach computing a parmetric threshold for clustering Warning: Not all replications are used for the computation of the statistic. > In statfun_indepsamplesT at 90 In statistics_montecarlo at 275 In fieldtrip-20090331/private/statistics_wrapper at 381 In freqstatistics at 137 Undefined function or method 'tinv' for input arguments of type 'double'. ??? Error using ==> statistics_montecarlo at 278 could not determine the parametric critical value for clustering Error in ==> statistics_wrapper at 381 [stat, cfg] = statmethod(cfg, dat, cfg.design); Error in ==> freqstatistics at 137 [stat] = statistics_wrapper(cfg, varargin{:}); >> Any idea or suggestion about that problem? Thanks. Jean-Michel -- Jean-Michel Badier Laboratoire de MagnétoEncéphaloGraphie INSERM U751. Aix Marseille Université 33 (0)4 91 38 55 62 _jean-michel.badier at univmed.fr_ Service de Neurophysiologie Clinique. CHU Timone 264 Rue Saint-Pierre, 13005 Marseille-France ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From R.Oostenveld at FCDONDERS.RU.NL Fri May 29 14:28:24 2009 From: R.Oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 29 May 2009 14:28:24 +0200 Subject: research and engineering positions available at NeuroSpin MEG centre Message-ID: NeuroSpin MEG at CEA Paris, France is recruiting TWO engineers RESEARCH/DEVELOPMENT ENGINEER & ELECTRONICS ENGINEER Work Environment The Magnetoencephalography (MEG) center is a recent addition to NeuroSpin, a neuroimaging platform located 20 km south of Paris in the Centre d'Energie Atomique (CEA). The CEA is an international scientific center that offers state-of-the-art equipment and opportunities for career growth. Two groups, the Cognitive Neuroimaging Unit (INSERM U562) and theNanomagnetism group closely collaborate on different aspects of the MEG technique: the Cognitive Neuroimaging Unit, part of the Life Sciences department, investigates human cognition at large (including consciousness, language, mathematics and perception research); the Nanomagnetism group, part of the Physics department, investigates new sensors for novel biomedical imaging devices. Positions Statement RESEARCH & DEVELOPMENT ENGINEER: the ideal candidate is a technically oriented researcher who will insure the daily technical maintenance (hardware and software) of the MEG and electroencephalography (EEG) equipment. He/she will be encouraged to develop autonomy in doing so, and use his/her organizational skills to develop a set of control quality assessments for these systems. This part of the work will be done in close association with the electronics engineer. The position also involves interacting with an international team of researchers and clinical staff for the implementation of experimental work in both patients and healthy individuals. The research engineer will be encouraged to invest part of his/her time into research both at the technical (for instance, in developing innovative analysis techniques) and/or at a scientific level (e.g. cognitive neurosciences and/or clinical). The research engineer will mostly work with the Cognitive Neuroimaging Unit and interact closely with the electronics engineer. Required Skills § PhD education (physics, neurosciences, engineering …). § Mastering of fundamentals in MEG and EEG techniques § Good programming skills (e.g. Matlab, C ++, shell…) § English and French proficiency (opportunities to learn either available) § Mastering of signal processing and associated tools (e.g. EEGlab, Fieldtrip, MNE, SPM, NutMeg …) a plus! Type of Position This Ingénieur de Recherche (IR) is a category A position in the French public services. Selection is competitive and the start date is 01/01/2010. The deadline to download the application package is July 7th 2009. The deadline for submission of your application package is July 9th 2009. Application packages can be downloaded from the INSERM Human Resources website (www.rh.inserm.fr). Applicants selected by the search committee will be contacted personally for the open competition. Prior to application, interested applicants are encouraged to contact the search committee (emails listed at the end of this flyer). ELECTRONICS ENGINEER: the ideal candidate is an expert in electronics who will work at the interface of physics research and medical applications. He/she will be in charge of developing interfaces for analog/digital electronics associated with new low field magnetic sensors and necessary signal processing and computing tools. Specifically, the complex multiple sensor arrays being designed will require sophisticated interfacing, prototyping at various stages of the project and validation for diverse type of applications (including magnetocardiography, combined low field MRI and MEG, in adults and children). The chosen candidate will interface between the cognitive neuroimaging unit and the nanomagnetism group on a regular basis while working more closely with the nanomagnetism group. His/her autonomy and initiative taking will be encouraged. Required Skills § PhD education (physics, electronics, engineering …). § Expertise in electronics, general knowledge of mathematics and physics § English and French proficiency (opportunities to learn either available) Type de Position Fixed-term contract from 10/01/2009 to 12/31/2010. Salaries depend on the experience of the candidate and will be based on the INSERM rate (yearly gross income from 27 K€ with no experience to 32 K€). Application packages MUST be received by July 9th 2009. For further information on these two positions, please contact: Claude.Fermon AT cea.fr, Myriam.Pannetier AT cea.fr, Stanislas.Dehaene AT cea.fr, Virginie.van-Wassenhove AT cea.fr ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From ingrid.nieuwenhuis at DONDERS.RU.NL Fri May 29 14:31:44 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 29 May 2009 14:31:44 +0200 Subject: Source plot! In-Reply-To: Message-ID: Dear M.Muthuraman, You can find it in fieldtrip/templates/ Best ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Monday, May 25, 2009 4:54 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Source plot! Hello Fieldtrip Users, I have attached a orthoplot with this mail. This source plot i plotted with the method 'ortho', but i would like get the plot in the correct direction in all the 3 slices. As i looked in the tutorial documentation need to use the volumenormalisation to get it in the correct direction. Then the next question where i can get the template with MNI coordinates which is showed in the tutorial documentation. Thanking you With regards, M.Muthuraman. _____ MSN Battles We pitch one stalwart against the other and give you the power. Who will you vote for? Share photos while you chat with Windows Live Messenger. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From johnston at KIN.UCALGARY.CA Sat May 2 22:07:36 2009 From: johnston at KIN.UCALGARY.CA (Jamie Johnston) Date: Sat, 2 May 2009 14:07:36 -0600 Subject: Questions concerning permutation tests on coherence data Message-ID: Hi All - I have a couple questions. My data set consists of 10 subjects, each performed 5 trials under 3 different conditions. I am trying to follow Maris et al. 2007, computing the difference between the coherence measures (i.e. using indepsamplesZcoh)for each pair of conditions (i.e., 3 different comparisons) and running the permutation test (montecarlo) on this data. My questions are: 1) All the examples I have come across only compare two conditions...if, as in my data, we have 3 conditions and would like to test for differences between the three, can I simply run 3 tests comparing all the combinations? Is this statistically sound (sorry I am unfamiliar with nonparametric stats). 2) For 8 of my subjects I have 5 separate channels of data, unfortunately for two of my subjects, I have only 4 channels (and they are missing different channels). I would like to include them in the coherence averages (and statistical tests), but I'm not sure how to do this. Any help would be greatly appreciated. Jamie _______________ Jamie Johnston, Ph.D. Assistant Professor Faculty of Kinesiology University of Calgary 2500 University Dr. NW Calgary, AB T2N 1N4 Phone: +1 (403) 220-3649 Fax: +1 (403) 284-3553 email: johnston at kin.ucalgary.ca website: http://www.kin.ucalgary.ca/wcm/knes/johnston.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From johnston at KIN.UCALGARY.CA Sun May 3 20:00:19 2009 From: johnston at KIN.UCALGARY.CA (Jamie Johnston) Date: Sun, 3 May 2009 12:00:19 -0600 Subject: independsamplesZcoh Message-ID: Hi all - I am trying to run a monte carlo - indepsamplesZcoh - cluster on my data using freqstatistics. I input two data files into freqstatistics with the cohspctrm having dimensions 2 (subjects) x 10 (channels, # of coherence spectra) x 52 (frequencies). I run into a dimension mismatch in the function clusterstat. If I run any other statistic (i.e., indepsamplesT) it runs fine. When running the indepsamplesT, clusterstat receives two inputs: statobs (520x1) and statrnd (520x100). These dimensions make sense to me. However, when running indepsamplesZcoh these two variables have dimensions 2340x1 and 2340x100, respectively. This happens around lines 104-108 in indepsamplesZcoh.m with computation of the variables "chancmbsel" and "nnewsamples." I'm not understanding what these variables do, but my guess is that I need to setup my data files differently in the beginning. My understanding of what this analysis protocol does is compute the z-statistic on each channel of coherence data (10 for each data file) and then find the difference between the z-statistic for each channel across the data files. Once this is complete it runs the permutations to determine the significance. Please verify that what I have done is correct and any help with the error I am getting would be greatly appreciated. Thanks, Jamie _______________ Jamie Johnston, Ph.D. Assistant Professor Faculty of Kinesiology University of Calgary 2500 University Dr. NW Calgary, AB T2N 1N4 Phone: +1 (403) 220-3649 Fax: +1 (403) 284-3553 email: johnston at kin.ucalgary.ca website: http://www.kin.ucalgary.ca/wcm/knes/johnston.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.schoffelen at PSY.GLA.AC.UK Sun May 3 21:33:43 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Sun, 3 May 2009 20:33:43 +0100 Subject: independsamplesZcoh In-Reply-To: Message-ID: Dear Jamie, For me it is not exactly clear what you want to do. In an earlier message you referred to our paper using a permutation test to test for a significant difference in coherence between conditions (Maris et al 2007). Essentially, as described, this is a test which is performed within each subject allowing you to do statistical inference about the potential difference between two conditions. As such this is the type of test indepsamplesZcoh can perform, if properly used (see below). Yet, you describe using two subjects as an input. This to me sounds rather that you would like to do statistics across subjects (although 2 subjects of course is a rather low number). This is NOT something indepsamplesZcoh can do for you. In general it is possible to test for a significant difference between two conditions across a population of subjects, but this would require a different approach. Rather than shuffling single observations across conditions PRIOR TO COMPUTING THE COHERENCE DIFFERENCE (sorry about the capitals but this is essential for what is to follow below), one would swap the sign of the Z-transformed coherence difference for a random subset of subjects prior to averaging. It seems as if you computed coherence spectra between all unique pairs of channels (4x5)/2 and used this as an input to freqstatistics. Yet, for single subject statistics this does not make sense, because indepsamplesZcoh expects fourier-spectra in the input. Within the function Z-transformed coherence difference will be computed between all pairs of input channels (in your case this would be (9x10)/2 (even though the function does not know you provide it with the wrong input), and multiplying this number with 52 would give your 'magical' 2340). So, indeed you should either format your data in a different way using single subject fourier spectra in two conditions as an input to freqstatistics, or using a different statistical test to test for differences across subjects. Yours, Jan-Mathijs On May 3, 2009, at 7:00 PM, Jamie Johnston wrote: > Hi all – > > I am trying to run a monte carlo – indepsamplesZcoh – cluster on my > data using freqstatistics. I input two data files into > freqstatistics with the cohspctrm having dimensions 2 (subjects) x > 10 (channels, # of coherence spectra) x 52 (frequencies). I run > into a dimension mismatch in the function clusterstat. If I run > any other statistic (i.e., indepsamplesT) it runs fine. When > running the indepsamplesT, clusterstat receives two inputs: statobs > (520x1) and statrnd (520x100). These dimensions make sense to me. > However, when running indepsamplesZcohthese two variables have > dimensions 2340x1 and 2340x100, respectively. This happens around > lines 104-108 in indepsamplesZcoh.m with computation of the > variables “chancmbsel” and “nnewsamples.” I’m not understanding > what these variables do, but my guess is that I need to setup my > data files differently in the beginning. My understanding of what > this analysis protocol does is compute the z-statistic on each > channel of coherence data (10 for each data file) and then find the > difference between the z-statistic for each channel across the data > files. Once this is complete it runs the permutations to determine > the significance. > > Please verify that what I have done is correct and any help with > the error I am getting would be greatly appreciated. > > Thanks, > > Jamie > > _______________ > Jamie Johnston, Ph.D. > Assistant Professor > Faculty of Kinesiology > University of Calgary > 2500 University Dr. NW > Calgary, AB > T2N 1N4 > Phone: +1 (403) 220-3649 > Fax: +1 (403) 284-3553 > email: johnston at kin.ucalgary.ca > website: http://www.kin.ucalgary.ca/wcm/knes/johnston.html > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From johnston at KIN.UCALGARY.CA Sun May 3 22:12:32 2009 From: johnston at KIN.UCALGARY.CA (Jamie Johnston) Date: Sun, 3 May 2009 14:12:32 -0600 Subject: independsamplesZcoh In-Reply-To: A<1A0B0C5E-11ED-4EAF-A0E9-788E566A0414@psy.gla.ac.uk> Message-ID: Thanks for your response. Let me clarify....I have 8 subjects (with 5 channels of data, 2 with 4 channels which I'm not using at this point)...I used only 2 subjects to test the code (for faster debugging). I do want to do a within subject statistical test between my conditions (of which I have 3, but I am only inputting 2 into freqstatistics as I was unclear whether I could run comparisons across 3 conditions). As you correctly point out, I did compute coherence across my 5 channels first, resulting in 10 spectra...this is what I inputted into freqstatistics, which is clearly incorrect. This is what I thought, however I didn't know exactly what the data input should look like. So, just to clarify, I'm running freqanalysis - inputting raw data, returning "powandcsd' freqdescriptives - inputting data from freqanalysis, returning 'coh' freqgrandaverage (keep individual 'yes') - inputting data from freqdescriptives, returning a grandaverage freqstatistics - inputting two grandaverages (for 2 conditions), using the following parameters: %Compute Permutation Test cfg = []; cfg.parameter = 'cohspctrm'; cfg.method = 'montecarlo'; cfg.frequency = [0 50]; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 100; cfg.computestat = 'yes'; subj = length(Subjects); design=zeros(2,2*subj); for i = 1:subj design(1,i) = i; end for i = 1:subj design(1,subj+i) = i; end design(2,1:subj) = 1; design(2,subj+1:2*subj) = 2; cfg.design = design; cfg.uvar = 1; cfg.ivar = 2; [stat] = freqstatistics(cfg, grandavg{1}, grandavg{2}); Are you saying, I should use the output from freqanalysis (skipping freqdescriptives) as input to freqgrandaverage? Also, should my "cfg.parameter" for the freqstatistics function still be 'cohspctrm' or 'powspctrm'? Thanks again, Jamie From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of jan-mathijs schoffelen Sent: May 3, 2009 1:34 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] independsamplesZcoh Dear Jamie, For me it is not exactly clear what you want to do. In an earlier message you referred to our paper using a permutation test to test for a significant difference in coherence between conditions (Maris et al 2007). Essentially, as described, this is a test which is performed within each subject allowing you to do statistical inference about the potential difference between two conditions. As such this is the type of test indepsamplesZcoh can perform, if properly used (see below). Yet, you describe using two subjects as an input. This to me sounds rather that you would like to do statistics across subjects (although 2 subjects of course is a rather low number). This is NOT something indepsamplesZcoh can do for you. In general it is possible to test for a significant difference between two conditions across a population of subjects, but this would require a different approach. Rather than shuffling single observations across conditions PRIOR TO COMPUTING THE COHERENCE DIFFERENCE (sorry about the capitals but this is essential for what is to follow below), one would swap the sign of the Z-transformed coherence difference for a random subset of subjects prior to averaging. It seems as if you computed coherence spectra between all unique pairs of channels (4x5)/2 and used this as an input to freqstatistics. Yet, for single subject statistics this does not make sense, because indepsamplesZcoh expects fourier-spectra in the input. Within the function Z-transformed coherence difference will be computed between all pairs of input channels (in your case this would be (9x10)/2 (even though the function does not know you provide it with the wrong input), and multiplying this number with 52 would give your 'magical' 2340). So, indeed you should either format your data in a different way using single subject fourier spectra in two conditions as an input to freqstatistics, or using a different statistical test to test for differences across subjects. Yours, Jan-Mathijs On May 3, 2009, at 7:00 PM, Jamie Johnston wrote: Hi all - I am trying to run a monte carlo - indepsamplesZcoh - cluster on my data using freqstatistics. I input two data files into freqstatistics with the cohspctrm having dimensions 2 (subjects) x 10 (channels, # of coherence spectra) x 52 (frequencies). I run into a dimension mismatch in the function clusterstat. If I run any other statistic (i.e., indepsamplesT) it runs fine. When running the indepsamplesT, clusterstat receives two inputs: statobs (520x1) and statrnd (520x100). These dimensions make sense to me. However, when running indepsamplesZcohthese two variables have dimensions 2340x1 and 2340x100, respectively. This happens around lines 104-108 in indepsamplesZcoh.m with computation of the variables "chancmbsel" and "nnewsamples." I'm not understanding what these variables do, but my guess is that I need to setup my data files differently in the beginning. My understanding of what this analysis protocol does is compute the z-statistic on each channel of coherence data (10 for each data file) and then find the difference between the z-statistic for each channel across the data files. Once this is complete it runs the permutations to determine the significance. Please verify that what I have done is correct and any help with the error I am getting would be greatly appreciated. Thanks, Jamie _______________ Jamie Johnston, Ph.D. Assistant Professor Faculty of Kinesiology University of Calgary 2500 University Dr. NW Calgary, AB T2N 1N4 Phone: +1 (403) 220-3649 Fax: +1 (403) 284-3553 email: johnston at kin.ucalgary.ca website: http://www.kin.ucalgary.ca/wcm/knes/johnston.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From manish.saggar at GMAIL.COM Tue May 5 01:10:11 2009 From: manish.saggar at GMAIL.COM (Manish Saggar) Date: Mon, 4 May 2009 18:10:11 -0500 Subject: Independence of trials in non-parametric testing Message-ID: All, I have a question regarding independence of trials in non-parametric testing. The experimental design that I have is as follows, there are three conditions C1, C2 and C3. Each condition is of 1 min duration (e.g. rest with eyes open for 1 min). Now I am planing on dividing each condition into sixty 1sec fake trials and then compare Time-Freq representation of C2-C1 and C3-C1 etc. for significance. But I am not sure whether this style is statistically correct, since the trials are fake and I am not sure if I can call them independent of each other. I can theoretically count them uncorrelated (?) if I separate these fake trials by say 300msec or something. Just want to make sure I am going in right direction. Please let me know. Regards, Manish ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Tue May 5 13:43:40 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Tue, 5 May 2009 13:43:40 +0200 Subject: Independence of trials in non-parametric testing In-Reply-To: Message-ID: Hi Manish, > I have a question regarding independence of trials in non-parametric > testing. > > The experimental design that I have is as follows, there are three > conditions C1, C2 and C3. Each condition is of 1 min duration (e.g. > rest with eyes open for 1 min). > > Now I am planing on dividing each condition into sixty 1sec fake > trials and then compare Time-Freq representation of C2-C1 and C3-C1 > etc. for significance. > But I am not sure whether this style is statistically correct, since > the trials are fake and I am not sure if I can call them independent > of each other. I can theoretically count them uncorrelated (?) if I > separate these fake trials by say 300msec or something. > > Just want to make sure I am going in right direction. Please let me > know. Your intuition is correct. However, time-freq representations do not make sense here. You will have to go for freq representations (i.e., averaging spectral energy over time). Proving that the fake trials are uncorrelated will not be possible. You will have settle for plausibility. However, the same holds to some extent for an experiment with real trials. So, chopping long trials in pieces is in principle OK from the perspective of permutation inference. Good luck, dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 F:+31 24 3616066 E: e.maris at donders.ru.nl MSc Cognitive Neuroscience: www.ru.nl/master/cns/ > > Regards, > Manish > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Tue May 5 17:41:33 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 5 May 2009 17:41:33 +0200 Subject: MNE Matlab toolbox version 2.6.1 Message-ID: Dear neuromag users Please note the announcement below. The Neuromag MNE matlab tools have been improved, resulting in much faster reading. Probably that will be of interest to you. Please download MNE and put the matlab files in fieldtrip/external/mne, so that fieldtrip can find the low-level reading functions. best regards, Robert Begin forwarded message: > From: Matti Hamalainen > Date: 28 April 2009 13:06:59 GMT+02:00 > To: mne_analysis at nmr.mgh.harvard.edu > Subject: [Mne_analysis] MNE Matlab toolbox version 2.6.1 > > > Hello all, > > Thanks to François Tadel from USC and John Mosher from Cleveland > Clinic, one major and a few minor bottlenecks were identified in the > MNE Matlab Toolbox. I modified the code on the basis of their > findings and, as a result, the fif file I/O is now much faster. I > packaged the improved version as MNE Matlab 2.6.1 and this new > version is now available on the download web site. > > This new package is highly recommended for those of you who use the > MNE Matlab tools. > > The Martinos Center public MNE installation has been updated. > > Other users need to: > > 1. Download MNE-dist-matlab-2.6.1-090428065405.tar.gz from the MNE > download web site. > > 2. Goto the directory *containing* $MNE_ROOT, i.e., $MNE_ROOT/.. > > 3. Say > > tar zxvf /MNE-dist- > matlab-2.6.1-090428065405.tar.gz > > is the path to the directory where you > downloaded the software. > > Best, > Matti > > > --------- > > Matti Hamalainen, Ph.D. > Athinoula A. Martinos Center for Biomedical Imaging > Massachusetts General Hospital > > msh at nmr.mgh.harvard.edu > > > > > > > _______________________________________________ > Mne_analysis mailing list > Mne_analysis at nmr.mgh.harvard.edu > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Tue May 5 17:45:55 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 5 May 2009 17:45:55 +0200 Subject: color bar In-Reply-To: Message-ID: Hi Jim I suspect the problem to be due to the rendering of Matlab. Occasionally (esp when working on a remote linux maxhine through a VNC connection) I also have problematic figures. Please look at >> help opengl It explains how you can change the renderer. Some fieldtrip plotting functions have this as a configurable option, including singleplotTFR and multiplotTFR. You can specify cfg.renderer= 'painters', 'zbuffer' or 'opengl'. Please try zbuffer. best regards, Robert On 30 Apr 2009, at 21:21, Jim Li wrote: > Dear FTer: > > I wonder if anybody can tell me how to get the full color bar when > plotting > w/ "singleplotTFR" or "multiplotTFR". > > I ran the following commands: > -------- > figure > cfg = []; > cfg.layout = '4D248.lay'; > cfg.ylim = [5 30] > cfg.interactive = 'yes'; > cfg.showlabels = 'yes'; > cfg.colorbar = 'yes'; cfg.channel='A2' > singleplotTFR(cfg,TF) > ----------- > > > But what I get on the right side of the figure is a colorbar w/ only > half of the > color (usually the cold colors like blue or green), and the numbers > on the right > side of the colorbar seem to be wrongly placed (see attachment). How > can I > get all the colors (both hot and cold) displayed in the colorbar? > > FYI, I controled the values of TF.powspctrm so that, for the channel > displayed > (A2), all values before time 0 is 3e-25, and all values after time 0 > is 1e-25. > But the color bar is telling me that the blue should be 2e-25, which > is totally > wrong! It's as if something happened that moved the whole colorbar > up by half > of the data range, then cut off the top of it (i.e. the hot colors). > > In fact, I think Fig 3 of the online tutorial > (http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis) > probably suffered > from the same problem. > > > Thanks, > > Jim > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Wed May 6 17:04:24 2009 From: megjim1 at GMAIL.COM (Jim Li) Date: Wed, 6 May 2009 17:04:24 +0200 Subject: color bar Message-ID: Yes, Robert, Changing to "cfg.renderer= 'zbuffer'; " did make the whole colorbar show up correctly. Although I also got a bunch of blue for the low frequency part of the wavelet singleplotTFR, which used to be just white area since there's no data calculated for those time-frequency bins due to wavelet's boundary effect. But that's fine. Thank you very much, :) Jim FYI, I'm using a 64bit WinXP. I saw the problem that you helped me solved by either working directly before the PC or Remote-Desktop to it. On Tue, 5 May 2009 17:45:55 +0200, Robert Oostenveld wrote: >Hi Jim > >I suspect the problem to be due to the rendering of Matlab. >Occasionally (esp when working on a remote linux maxhine through a VNC >connection) I also have problematic figures. > >Please look at > >> help opengl >It explains how you can change the renderer. > >Some fieldtrip plotting functions have this as a configurable option, >including singleplotTFR and multiplotTFR. You can specify >cfg.renderer= 'painters', 'zbuffer' or 'opengl'. Please try zbuffer. > >best regards, >Robert > > >On 30 Apr 2009, at 21:21, Jim Li wrote: > >> Dear FTer: >> >> I wonder if anybody can tell me how to get the full color bar when >> plotting >> w/ "singleplotTFR" or "multiplotTFR". >> >> I ran the following commands: >> -------- >> figure >> cfg = []; >> cfg.layout = '4D248.lay'; >> cfg.ylim = [5 30] >> cfg.interactive = 'yes'; >> cfg.showlabels = 'yes'; >> cfg.colorbar = 'yes'; cfg.channel='A2' >> singleplotTFR(cfg,TF) >> ----------- >> >> >> But what I get on the right side of the figure is a colorbar w/ only >> half of the >> color (usually the cold colors like blue or green), and the numbers >> on the right >> side of the colorbar seem to be wrongly placed (see attachment). How >> can I >> get all the colors (both hot and cold) displayed in the colorbar? >> >> FYI, I controled the values of TF.powspctrm so that, for the channel >> displayed >> (A2), all values before time 0 is 3e-25, and all values after time 0 >> is 1e-25. >> But the color bar is telling me that the blue should be 2e-25, which >> is totally >> wrong! It's as if something happened that moved the whole colorbar >> up by half >> of the data range, then cut off the top of it (i.e. the hot colors). >> >> In fact, I think Fig 3 of the online tutorial >> (http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis) >> probably suffered >> from the same problem. >> >> >> Thanks, >> >> Jim >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From ingrid.nieuwenhuis at DONDERS.RU.NL Wed May 6 17:15:37 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 6 May 2009 17:15:37 +0200 Subject: color bar In-Reply-To: Message-ID: Hi Jim, The reason that you see the blue for the low freq part where there's no data is because NaNs are plotted with the lowest color of the scale by Matlab. Earlier the NaN's where masked out automatically, but with the "cfg.renderer= 'zbuffer'; " opacity masking is not supported. So I'm afraid there is no way to both get the colorbar right and the NaN's masked out. But you could of course make two plots and combine in Photoshop ;) Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Jim Li > Sent: Wednesday, May 06, 2009 5:04 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] color bar > > Yes, Robert, > > Changing to "cfg.renderer= 'zbuffer'; " did make the whole colorbar show > up > correctly. Although I also got a bunch of blue for the low frequency part > of > the wavelet singleplotTFR, which used to be just white area since there's > no > data calculated for those time-frequency bins due to wavelet's boundary > effect. But that's fine. > > Thank you very much, :) > > Jim > > > FYI, I'm using a 64bit WinXP. I saw the problem that you helped me solved > by > either working directly before the PC or Remote-Desktop to it. > > > > On Tue, 5 May 2009 17:45:55 +0200, Robert Oostenveld > wrote: > > >Hi Jim > > > >I suspect the problem to be due to the rendering of Matlab. > >Occasionally (esp when working on a remote linux maxhine through a VNC > >connection) I also have problematic figures. > > > >Please look at > > >> help opengl > >It explains how you can change the renderer. > > > >Some fieldtrip plotting functions have this as a configurable option, > >including singleplotTFR and multiplotTFR. You can specify > >cfg.renderer= 'painters', 'zbuffer' or 'opengl'. Please try zbuffer. > > > >best regards, > >Robert > > > > > >On 30 Apr 2009, at 21:21, Jim Li wrote: > > > >> Dear FTer: > >> > >> I wonder if anybody can tell me how to get the full color bar when > >> plotting > >> w/ "singleplotTFR" or "multiplotTFR". > >> > >> I ran the following commands: > >> -------- > >> figure > >> cfg = []; > >> cfg.layout = '4D248.lay'; > >> cfg.ylim = [5 30] > >> cfg.interactive = 'yes'; > >> cfg.showlabels = 'yes'; > >> cfg.colorbar = 'yes'; cfg.channel='A2' > >> singleplotTFR(cfg,TF) > >> ----------- > >> > >> > >> But what I get on the right side of the figure is a colorbar w/ only > >> half of the > >> color (usually the cold colors like blue or green), and the numbers > >> on the right > >> side of the colorbar seem to be wrongly placed (see attachment). How > >> can I > >> get all the colors (both hot and cold) displayed in the colorbar? > >> > >> FYI, I controled the values of TF.powspctrm so that, for the channel > >> displayed > >> (A2), all values before time 0 is 3e-25, and all values after time 0 > >> is 1e-25. > >> But the color bar is telling me that the blue should be 2e-25, which > >> is totally > >> wrong! It's as if something happened that moved the whole colorbar > >> up by half > >> of the data range, then cut off the top of it (i.e. the hot colors). > >> > >> In fact, I think Fig 3 of the online tutorial > >> (http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis) > >> probably suffered > >> from the same problem. > >> > >> > >> Thanks, > >> > >> Jim > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > >> of the FieldTrip toolbox, to share experiences and to discuss new > >> ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html > >> and http://www.ru.nl/neuroimaging/fieldtrip. > >> > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and > EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Wed May 6 17:37:17 2009 From: megjim1 at GMAIL.COM (Jim Li) Date: Wed, 6 May 2009 17:37:17 +0200 Subject: color bar Message-ID: Hi Ingrid, That's a nice suggestion. Thanks a lot for your help, :) Jim On Wed, 6 May 2009 17:15:37 +0200, Ingrid Nieuwenhuis wrote: >Hi Jim, > >The reason that you see the blue for the low freq part where there's no data >is because NaNs are plotted with the lowest color of the scale by Matlab. >Earlier the NaN's where masked out automatically, but with the >"cfg.renderer= 'zbuffer'; " opacity masking is not supported. So I'm afraid >there is no way to both get the colorbar right and the NaN's masked out. But >you could of course make two plots and combine in Photoshop ;) > >Best Ingrid > >> -----Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >> Behalf Of Jim Li >> Sent: Wednesday, May 06, 2009 5:04 PM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] color bar >> >> Yes, Robert, >> >> Changing to "cfg.renderer= 'zbuffer'; " did make the whole colorbar show >> up >> correctly. Although I also got a bunch of blue for the low frequency part >> of >> the wavelet singleplotTFR, which used to be just white area since there's >> no >> data calculated for those time-frequency bins due to wavelet's boundary >> effect. But that's fine. >> >> Thank you very much, :) >> >> Jim >> >> >> FYI, I'm using a 64bit WinXP. I saw the problem that you helped me solved >> by >> either working directly before the PC or Remote-Desktop to it. >> >> >> >> On Tue, 5 May 2009 17:45:55 +0200, Robert Oostenveld >> wrote: >> >> >Hi Jim >> > >> >I suspect the problem to be due to the rendering of Matlab. >> >Occasionally (esp when working on a remote linux maxhine through a VNC >> >connection) I also have problematic figures. >> > >> >Please look at >> > >> help opengl >> >It explains how you can change the renderer. >> > >> >Some fieldtrip plotting functions have this as a configurable option, >> >including singleplotTFR and multiplotTFR. You can specify >> >cfg.renderer= 'painters', 'zbuffer' or 'opengl'. Please try zbuffer. >> > >> >best regards, >> >Robert >> > >> > >> >On 30 Apr 2009, at 21:21, Jim Li wrote: >> > >> >> Dear FTer: >> >> >> >> I wonder if anybody can tell me how to get the full color bar when >> >> plotting >> >> w/ "singleplotTFR" or "multiplotTFR". >> >> >> >> I ran the following commands: >> >> -------- >> >> figure >> >> cfg = []; >> >> cfg.layout = '4D248.lay'; >> >> cfg.ylim = [5 30] >> >> cfg.interactive = 'yes'; >> >> cfg.showlabels = 'yes'; >> >> cfg.colorbar = 'yes'; cfg.channel='A2' >> >> singleplotTFR(cfg,TF) >> >> ----------- >> >> >> >> >> >> But what I get on the right side of the figure is a colorbar w/ only >> >> half of the >> >> color (usually the cold colors like blue or green), and the numbers >> >> on the right >> >> side of the colorbar seem to be wrongly placed (see attachment). How >> >> can I >> >> get all the colors (both hot and cold) displayed in the colorbar? >> >> >> >> FYI, I controled the values of TF.powspctrm so that, for the channel >> >> displayed >> >> (A2), all values before time 0 is 3e-25, and all values after time 0 >> >> is 1e-25. >> >> But the color bar is telling me that the blue should be 2e-25, which >> >> is totally >> >> wrong! It's as if something happened that moved the whole colorbar >> >> up by half >> >> of the data range, then cut off the top of it (i.e. the hot colors). >> >> >> >> In fact, I think Fig 3 of the online tutorial >> >> (http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis) >> >> probably suffered >> >> from the same problem. >> >> >> >> >> >> Thanks, >> >> >> >> Jim >> >> >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> >> of the FieldTrip toolbox, to share experiences and to discuss new >> >> ideas for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> and http://www.ru.nl/neuroimaging/fieldtrip. >> >> >> > >> >---------------------------------- >> >The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and >> EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and >> http://www.ru.nl/neuroimaging/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From johnston at KIN.UCALGARY.CA Wed May 6 20:51:03 2009 From: johnston at KIN.UCALGARY.CA (Jamie Johnston) Date: Wed, 6 May 2009 12:51:03 -0600 Subject: independsamplesZcoh Message-ID: I have fixed the issues in my posting below and seem to be getting closer to having my code run. However, I still run into a dimension mismatch in clusterstat...I'm trying to understand the following code, where I think this mismatch occurs. % determine whether the input represents N-D volumetric data or channel-freq-time data and provide the appropriate details % TODO this detection should be more robust if isfield(cfg, 'neighbours') && ~isempty(cfg.neighbours) channeighbstructmat = makechanneighbstructmat(cfg); issource = 0; else issource = 1; % cfg contains dim and inside that are needed for reshaping the data to a volume, and inside should behave as a index vector cfg = fixinside(cfg, 'index'); end The dimension of the data (statobs) that is passed to clusterstat is 520 X 1 (10 channels of coherence differences x 52 frequencies concatenated; note: this use to be 5 channels of powspctrm) which makes sense. I am trying to cluster by frequency (not channel)...the output of "fixinside" function returns cfg.index of dimension (1 X 260), causing a dimension mismatch at line 188 in clusterstat. The reason this happens, I think, is in line 37 of fixinside where elseif isfield(source, 'dim') source.inside = 1:prod(source.dim); source.outside = []; end for some reason source.dim still has the dimension 5 X 52 X 1, ie, the dimensions prior to computing the coherence differences. I'm not sure whether/where I should change the cfg.dim, which I assume should reflect the dimensions of the newly computed data matrix. Thanks, Jamie ________________________________ From: FieldTrip discussion list on behalf of Jamie Johnston Sent: Sun 5/3/2009 2:12 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] independsamplesZcoh Thanks for your response. Let me clarify....I have 8 subjects (with 5 channels of data, 2 with 4 channels which I'm not using at this point)...I used only 2 subjects to test the code (for faster debugging). I do want to do a within subject statistical test between my conditions (of which I have 3, but I am only inputting 2 into freqstatistics as I was unclear whether I could run comparisons across 3 conditions). As you correctly point out, I did compute coherence across my 5 channels first, resulting in 10 spectra...this is what I inputted into freqstatistics, which is clearly incorrect. This is what I thought, however I didn't know exactly what the data input should look like. So, just to clarify, I'm running freqanalysis - inputting raw data, returning "powandcsd' freqdescriptives - inputting data from freqanalysis, returning 'coh' freqgrandaverage (keep individual 'yes') - inputting data from freqdescriptives, returning a grandaverage freqstatistics - inputting two grandaverages (for 2 conditions), using the following parameters: %Compute Permutation Test cfg = []; cfg.parameter = 'cohspctrm'; cfg.method = 'montecarlo'; cfg.frequency = [0 50]; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 100; cfg.computestat = 'yes'; subj = length(Subjects); design=zeros(2,2*subj); for i = 1:subj design(1,i) = i; end for i = 1:subj design(1,subj+i) = i; end design(2,1:subj) = 1; design(2,subj+1:2*subj) = 2; cfg.design = design; cfg.uvar = 1; cfg.ivar = 2; [stat] = freqstatistics(cfg, grandavg{1}, grandavg{2}); Are you saying, I should use the output from freqanalysis (skipping freqdescriptives) as input to freqgrandaverage? Also, should my "cfg.parameter" for the freqstatistics function still be 'cohspctrm' or 'powspctrm'? Thanks again, Jamie From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of jan-mathijs schoffelen Sent: May 3, 2009 1:34 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] independsamplesZcoh Dear Jamie, For me it is not exactly clear what you want to do. In an earlier message you referred to our paper using a permutation test to test for a significant difference in coherence between conditions (Maris et al 2007). Essentially, as described, this is a test which is performed within each subject allowing you to do statistical inference about the potential difference between two conditions. As such this is the type of test indepsamplesZcoh can perform, if properly used (see below). Yet, you describe using two subjects as an input. This to me sounds rather that you would like to do statistics across subjects (although 2 subjects of course is a rather low number). This is NOT something indepsamplesZcoh can do for you. In general it is possible to test for a significant difference between two conditions across a population of subjects, but this would require a different approach. Rather than shuffling single observations across conditions PRIOR TO COMPUTING THE COHERENCE DIFFERENCE (sorry about the capitals but this is essential for what is to follow below), one would swap the sign of the Z-transformed coherence difference for a random subset of subjects prior to averaging. It seems as if you computed coherence spectra between all unique pairs of channels (4x5)/2 and used this as an input to freqstatistics. Yet, for single subject statistics this does not make sense, because indepsamplesZcoh expects fourier-spectra in the input. Within the function Z-transformed coherence difference will be computed between all pairs of input channels (in your case this would be (9x10)/2 (even though the function does not know you provide it with the wrong input), and multiplying this number with 52 would give your 'magical' 2340). So, indeed you should either format your data in a different way using single subject fourier spectra in two conditions as an input to freqstatistics, or using a different statistical test to test for differences across subjects. Yours, Jan-Mathijs On May 3, 2009, at 7:00 PM, Jamie Johnston wrote: Hi all - I am trying to run a monte carlo - indepsamplesZcoh - cluster on my data using freqstatistics. I input two data files into freqstatistics with the cohspctrm having dimensions 2 (subjects) x 10 (channels, # of coherence spectra) x 52 (frequencies). I run into a dimension mismatch in the function clusterstat. If I run any other statistic (i.e., indepsamplesT) it runs fine. When running the indepsamplesT, clusterstat receives two inputs: statobs (520x1) and statrnd (520x100). These dimensions make sense to me. However, when running indepsamplesZcohthese two variables have dimensions 2340x1 and 2340x100, respectively. This happens around lines 104-108 in indepsamplesZcoh.m with computation of the variables "chancmbsel" and "nnewsamples." I'm not understanding what these variables do, but my guess is that I need to setup my data files differently in the beginning. My understanding of what this analysis protocol does is compute the z-statistic on each channel of coherence data (10 for each data file) and then find the difference between the z-statistic for each channel across the data files. Once this is complete it runs the permutations to determine the significance. Please verify that what I have done is correct and any help with the error I am getting would be greatly appreciated. Thanks, Jamie _______________ Jamie Johnston, Ph.D. Assistant Professor Faculty of Kinesiology University of Calgary 2500 University Dr. NW Calgary, AB T2N 1N4 Phone: +1 (403) 220-3649 Fax: +1 (403) 284-3553 email: johnston at kin.ucalgary.ca website: http://www.kin.ucalgary.ca/wcm/knes/johnston.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Thu May 7 02:08:47 2009 From: megjim1 at GMAIL.COM (Jim Li) Date: Thu, 7 May 2009 02:08:47 +0200 Subject: preparing leadfield for Phantom Message-ID: Dear FTer: I'm trying to test a localization algorithm with some epoch data collected on our phantom. Can anyone suggest a way to prepare the lead field using the single shell modeling? I'm using 4D's system right now. While playing with "prepare_singleshell" and "prepare_leadfield", I encountered two questions: 1) How can I get my headshape points in head coordinate system? I can run -------- hdr = read_fcdc_header(FileName); cfg.headshape = hdr.grad.pnt; [vol] = prepare_singleshell(cfg); ------- but that doesn't seem to give me headshape points in head coordinate system and it'll crash "prepare_leadfield" later on. 2) Do I need to define "cfg.vol.r = 7.5; cfg.vol.o = [0,0,0];" before running "prepare_leadfield"? If not, I'll get weird stuff like "1 dipoles inside, 26 dipoles outside brain". I'd appreciate it if anyone can show me your complete script of preparing lead field from beginning to end. Cheers, Jim ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Fri May 8 01:43:51 2009 From: megjim1 at GMAIL.COM (Jim Li) Date: Fri, 8 May 2009 01:43:51 +0200 Subject: preparing leadfield for Phantom Message-ID: Hi all, Actually I just observed something: "hdr.grad.pnt" doesn't contain the coordinates of digitization points, but instead seems to be sensor coil-related. My question regarding how to prepare the lead field using the single shell modeling still remains. Any suggestion will be greatly appreciated! Thanks, Jim On Thu, 7 May 2009 02:08:47 +0200, Jim Li wrote: >Dear FTer: > >I'm trying to test a localization algorithm with some epoch data collected on >our phantom. Can anyone suggest a way to prepare the lead field using the >single shell modeling? I'm using 4D's system right now. > >While playing with "prepare_singleshell" and "prepare_leadfield", I encountered >two questions: > >1) How can I get my headshape points in head coordinate system? > >I can run >-------- >hdr = read_fcdc_header(FileName); >cfg.headshape = hdr.grad.pnt; >[vol] = prepare_singleshell(cfg); >------- >but that doesn't seem to give me headshape points in head coordinate system >and it'll crash "prepare_leadfield" later on. > >2) Do I need to define "cfg.vol.r = 7.5; cfg.vol.o = [0,0,0];" before >running "prepare_leadfield"? If not, I'll get weird stuff like "1 dipoles inside, 26 >dipoles outside brain". > >I'd appreciate it if anyone can show me your complete script of preparing lead >field from beginning to end. > >Cheers, > >Jim > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From v.litvak at ION.UCL.AC.UK Fri May 8 07:37:20 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Fri, 8 May 2009 06:37:20 +0100 Subject: preparing leadfield for Phantom In-Reply-To: Message-ID: Dear Jim, The example scripts: http://fieldtrip.fcdonders.nl/example/make_leadfields_using_different_headmodels and http://fieldtrip.fcdonders.nl/example/shift_electrode_positions_into_the_same_coordinate_system_as_the_corresponding_mri_for_using_individual_headmodels contain some ideas that you can use to do what you want. However, the trickiest part is coregistration. In the CTF system this problem is solved by the CTF software. Also for an expert it is easy to do with just a few lines of code. This is why there is no easy-to-use generic solution for it in Fieldtrip as far as I know. I would recommend you looking at SPM8 (http://www.fil.ion.ucl.ac.uk/spm/software/spm8/) which is another free Matlab toolbox. In SPM8 you can go through all the steps for leadfield computation using GUI (see the manual, imaging source reconstruction chapter). It support BTi data and is tightly integrated with Fieldtrip so you can later get the coregistered vol and grad from SPM and use them in your Fieldtrip script. See: https://www.jiscmail.ac.uk/cgi-bin/wa.exe?A2=ind0905&L=SPM&P=R8906 Also SPM saves leadfields for its 'canonical cortical mesh' in a mat-file and you can just use those. Best, Vladimir On Fri, May 8, 2009 at 12:43 AM, Jim Li wrote: > Hi all, > > Actually I just observed something: "hdr.grad.pnt" doesn't contain the > coordinates of digitization points, but instead seems to be sensor coil-related. > > My question regarding how to prepare the lead field using the > single shell modeling still remains. Any suggestion will be greatly appreciated! > > Thanks, > > Jim > > On Thu, 7 May 2009 02:08:47 +0200, Jim Li wrote: > >>Dear FTer: >> >>I'm trying to test a localization algorithm with some epoch data collected on >>our phantom. Can anyone suggest a way to prepare the lead field using the >>single shell modeling? I'm using 4D's system right now. >> >>While playing with "prepare_singleshell" and  "prepare_leadfield", I > encountered >>two questions: >> >>1) How can I get my headshape points in head coordinate system? >> >>I can run >>-------- >>hdr = read_fcdc_header(FileName); >>cfg.headshape = hdr.grad.pnt; >>[vol] = prepare_singleshell(cfg); >>------- >>but that doesn't seem to give me headshape points in head coordinate > system >>and it'll crash "prepare_leadfield" later on. >> >>2) Do I need to define "cfg.vol.r = 7.5; cfg.vol.o = [0,0,0];" before >>running "prepare_leadfield"? If not, I'll get weird stuff like "1 dipoles inside, 26 >>dipoles outside brain". >> >>I'd appreciate it if anyone can show me your complete script of preparing > lead >>field from beginning to end. >> >>Cheers, >> >>Jim >> >>---------------------------------- >>The aim of this list is to facilitate the discussion between users of the > FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From akiko at NYU.EDU Fri May 8 20:17:06 2009 From: akiko at NYU.EDU (Akiko Ikkai) Date: Fri, 8 May 2009 14:17:06 -0400 Subject: .sqd to FieldTrip steps Message-ID: Hello, I just started learning to do MEG experiments, and am very new to FieldTrip. I have a simple continuous recording (120s, 1000Hz) of MEG to test noise level, therefore no event type. My goal with this data is to look at frequency power distribution to check for any irregular spikes. We collect data in .sqd format. It appears that sqd format is not supported, so I simply renamed the data to .raw, which I could read into matLab using "read_fcdc_header" and "read_fcdc_data" (returns 192 x120000 matrix). However, since my data has no events, I'm not sure what inputs need to be fed into "definetrial". When I tried cfg = []; cfg.dataset = 'Out.raw'; cfg = definetrial(cfg); I got this message ??? Error using ==> definetrial at 151 no trialfunction specified, see DEFINETRIAL for help If you could give me some advise about how I should proceed (e.g. what parameters I need to have, and how I could create/retrieve them), it'll be very helpful. Also, if there are any specific notes about "using sqd and FieldTrip", please let me know as well. Thanks in advance! Akiko Ikkai ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From charles.cook at ULETH.CA Fri May 8 21:40:44 2009 From: charles.cook at ULETH.CA (Charles Cook) Date: Fri, 8 May 2009 21:40:44 +0200 Subject: electrode load and clusterrandanalysis Message-ID: Hi all, I'm having some trouble running the clusterrandanalysis on my time-frequency data collected using BESA. I've been trying to follow the example script ('Apply clusterrandanalysis on TFRs of power that were computed with BESA'), but am still coming up short. Specifically, I'm a little confused about loading electrodes % load a set of electrodes (these are on a unit sphere) % note, this will be different for your own data load('elec128.mat'); % scale the electrodes to a realistic head size (in cm) elec.pnt = 10*elec.pnt; Any suggestions would be much appreciated. Cheers, Charles Cook Canadian Centre for Behavioural Neuroscience University of Lethbridge ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From ole.jensen at DONDERS.RU.NL Sun May 10 22:26:29 2009 From: ole.jensen at DONDERS.RU.NL (Ole Jensen) Date: Sun, 10 May 2009 22:26:29 +0200 Subject: HBM lunch for MEG researcher at HBM/June 19 Message-ID: Dear MEG researcher, We would like to invite you to a lunch meeting Friday June 19, 12:30 at HBM2009/San Francisco. We hope to explore ways to strengthen the MEG community. We find it particularly important given that the increase of MEG groups warrants more initiatives for improving the communication between groups. Points to discuss: - Practical initiatives for strengthening communication between MEG groups * mailing lists/websites * satellite meetings in connection with conferences (e.g. HBM, FENS,...) - Improve education on MEG analysis (summer schools, boot camps, student exchanges,..) - How to promote a stronger presence in high impact journals and international meetings? The room will be posted later. Best regards, Ole Jensen, Joachim Gross and Srikantan Nagarajan P.S. Please bring your own lunch P.P.S. Please forward this message to other MEG researchers (we do not have a complete list). -- Ole Jensen Principal Investigator Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at donders.ru.nl URL : http://ojensen.ruhosting.nl/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From manish.saggar at GMAIL.COM Tue May 12 10:16:39 2009 From: manish.saggar at GMAIL.COM (Manish Saggar) Date: Tue, 12 May 2009 03:16:39 -0500 Subject: Clusterplot not highlighting clusters & average layout file Message-ID: All, I have a question regarding clusterplot function. I am doing a within-subject analysis. The experimental design that I have is as follows, there are three conditions C1, C2 and C3. Each condition is of 1 min duration (e.g. rest with eyes open for 1 min). Now I am comparing grandaverage of freq representation of a set of subjects for C2 with C1 etc. FreqStatistics is running just fine creating significant (<0.025 alpha, for 2-tailed test) clusters (positive). Now the problem is that when I try to plot the location of this cluster using clusterplot it doesn't show any highlighted channels. Any ideas why that is happening? Another question is that since I am using grandaverages of freq representation, what should I use for layout file (using BESA sfp file here). I have individual subject layout files. Currently I am just giving any file from one of the subjects. Since, I noticed that FreqStatistics finds a common minimum set of channels and then apply statistics on it. So do I need to average layout files for the subject group or is there any other way? Any help is much appreciated. Regards, Manish ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Tue May 12 23:26:03 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Tue, 12 May 2009 23:26:03 +0200 Subject: electrode load and clusterrandanalysis Message-ID: Hi Charles, i never actually tried doing the time-freq transform in BESA and then the stats in FT but I did so for ERP data and from what you write it is not clear what goes wrong. Could you please post the Fieldtrip version you use, the full error message you get and the full script code ? If your problems are related to electrode positions, you could try loading the BESA electrode (.elp) files directly if i am not mistaken. Michael > -----Ursprüngliche Nachricht----- > Von: "Charles Cook" > Gesendet: 08.05.09 21:51:46 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] electrode load and clusterrandanalysis > Hi all, > > I'm having some trouble running the clusterrandanalysis on my time-frequency > data collected using BESA. I've been trying to follow the example script > ('Apply clusterrandanalysis on TFRs of power that were computed with BESA'), > but am still coming up short. Specifically, I'm a little confused about > loading electrodes > > % load a set of electrodes (these are on a unit sphere) > % note, this will be different for your own data > load('elec128.mat'); > % scale the electrodes to a realistic head size (in cm) > elec.pnt = 10*elec.pnt; > > Any suggestions would be much appreciated. > > Cheers, > > Charles Cook > Canadian Centre for Behavioural Neuroscience > University of Lethbridge > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From susannah.murphy at PSYCH.OX.AC.UK Tue May 12 23:26:11 2009 From: susannah.murphy at PSYCH.OX.AC.UK (Susannah Murphy) Date: Tue, 12 May 2009 22:26:11 +0100 Subject: electrode load and clusterrandanalysis In-Reply-To: <966361168@web.de> Message-ID: Thanks for your message. I am out of the office until Thursday 21st May 2009. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From ingrid.nieuwenhuis at DONDERS.RU.NL Wed May 13 09:10:49 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 13 May 2009 09:10:49 +0200 Subject: Clusterplot not highlighting clusters & average layout file In-Reply-To: Message-ID: Dear Manish, You give a bit too few information to be able to figure out what could be the problem with clusterplot. After calling clusterplot, clusterplot gives information on which clusters it finds. Does the function find any clusters? Does the .mask field of the structure that comes out of freqstatistics contain any ones? Is everything else plotted normally? Do you get any errors or warnings? I'm not familiar with BESA layout files, but assuming that all layout files are similar over subjects, I think it is fine to just use an individual subject's layout file. Hope this helps, Best Ingrid > ---Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Manish Saggar > Sent: Tuesday, May 12, 2009 10:17 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] Clusterplot not highlighting clusters & average > layout file > > All, > > I have a question regarding clusterplot function. I am doing a > within-subject analysis. > The experimental design that I have is as follows, there are three > conditions C1, C2 and C3. Each condition is of 1 min duration (e.g. > rest with eyes open for 1 min). > > Now I am comparing grandaverage of freq representation of a set of > subjects for C2 with C1 etc. FreqStatistics is running just fine > creating significant (<0.025 alpha, for 2-tailed test) clusters > (positive). Now the problem is that when I try to plot the location of > this cluster using clusterplot it doesn't show any highlighted > channels. Any ideas why that is happening? > > Another question is that since I am using grandaverages of freq > representation, what should I use for layout file (using BESA sfp file > here). I have individual subject layout files. Currently I am just > giving any file from one of the subjects. Since, I noticed that > FreqStatistics finds a common minimum set of channels and then apply > statistics on it. So do I need to average layout files for the subject > group or is there any other way? > > Any help is much appreciated. > > Regards, > Manish > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK Wed May 13 18:47:01 2009 From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith) Date: Wed, 13 May 2009 17:47:01 +0100 Subject: baseline correction on cross-spectral densities Message-ID: Dear Field Trip users I'm currently trying to obtain source coherence networks from some MEG data using the DICS beamformer method. I am calculating the necessary cross-spectral densities (CSDs) using the freqanalysis function. I was wondering is it necessary (or wise) to do baseline correction on the CSD data? I have already applied baseline correction to the data in time domain but I understand that the same correction still needs to be applied in the frequency domain. The function freqbaseline does this but it only allows you to correct non-complex power values. Is it appropriate to manually apply baseline correction on the complex CSDs? Or would it be more appropriate to calculate the CSDs and source coherence for the pre- and post- stimulus data separately, and then apply baseline correction to the coherence data? Any advice would be greatly appreciated. Thanks Mark -- Mark Drakesmith PhD Student Neuroscience and Aphasia Research Unit (NARU) University of Manchester ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From dsenkows at UKE.UNI-HAMBURG.DE Wed May 13 19:03:20 2009 From: dsenkows at UKE.UNI-HAMBURG.DE (vervang dit voor je naam of door ANONYMOUS) Date: Wed, 13 May 2009 19:03:20 +0200 Subject: ROI definition Message-ID: Dear all, I was wondering whether it is possible to use *.wrl files to assign ROIs in source space. Specifically, I am looking for a localization/probability file to define the sensorimotor hand area (*.hdr / *.img). Thank you for help and regards, Daniel Senkowski -- Pflichtangaben gem�� Gesetz �ber elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universit�tsklinikum Hamburg-Eppendorf K�rperschaft des �ffentlichen Rechts Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. J�rg F. Debatin (Vorsitzender) Dr. Alexander Kirstein Ricarda Klein Prof. Dr. Dr. Uwe Koch-Gromus ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jrkerlin at UCDAVIS.EDU Wed May 13 22:37:46 2009 From: jrkerlin at UCDAVIS.EDU (Jess R. Kerlin) Date: Wed, 13 May 2009 13:37:46 -0700 Subject: Source filtering Message-ID: Dear FTrippers, I created a standard 2-dipole model in BESA from a 128-electrode EEG array, and I would like to apply this as a filter on separate single trial data, to reduce each trial from 128 channels to 2 source waveforms. The external function readBESAbsa appears to load in the dipole locations and orientations correctly, however, I am unaware of a function which uses this information to filter the data as described above. Any input is appreciated. Thanks, Jess ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From nathanweisz at MAC.COM Thu May 14 07:55:49 2009 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Thu, 14 May 2009 07:55:49 +0200 Subject: Source filtering In-Reply-To: <4A0B2F9A.6050709@ucdavis.edu> Message-ID: hi jess, in the source analysis module of BESA you can create / save a source montage (e.g. based on ERP peak /peaks). then you can apply this montage to the raw data within BESA (haven't done it for a long time; look at the BESA-help). After that export the source projected data and read in matlab via besa2fieldtrip (that gives you a fieldtrip preprocessing structure). i.e. no need to do the single trial source projection in fieldtrip. also i can't remember it was possible to export leadfields out of BESA, but i may be wrong. good luck, nathan On 13.05.2009, at 22:37, Jess R. Kerlin wrote: > Dear FTrippers, > > I created a standard 2-dipole model in BESA from a 128-electrode EEG > array, and I would like to apply this as a filter on separate single > trial data, to reduce each trial from 128 channels to 2 source > waveforms. The external function readBESAbsa appears to load in the > dipole locations and orientations correctly, however, I am unaware > of a function which uses this information to filter the data as > described above. Any input is appreciated. > > Thanks, > Jess > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From tinar at IDAC.TOHOKU.AC.JP Thu May 14 10:28:03 2009 From: tinar at IDAC.TOHOKU.AC.JP (Tina Rasmussen) Date: Thu, 14 May 2009 17:28:03 +0900 Subject: ROI definition In-Reply-To: <4AA828C7-A2AE-48CD-BBD7-D9E2276DA6BE@UKE.UNI-HAMBURG.DE> Message-ID: Dear Daniel, I have not yet any experience with FieldTrip, so I cannot reply on the *.wrl issue. But with respect to masks for the hand area, here is a tip: The Jerne database (http://neuro.imm.dtu.dk/services/jerne/ninf/voi/hand_area.html) contains such localization masks. One important point is, that those masks have a smooth transition between voxels inside the region (one) and voxels outside the region (zero). If you need sharp transitions, you may have to generate them yourself (apply a threshold on the voxel values), or search somewhere else. Best regards, Tina Rasmussen. wrote: > Dear all, > > I was wondering whether it is possible to use *.wrl files to assign > ROIs in source space. > > Specifically, I am looking for a localization/probability file to > define the sensorimotor hand area (*.hdr / *.img). > > Thank you for help and regards, > > > Daniel Senkowski > > > > > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: tinar.vcf Type: text/x-vcard Size: 382 bytes Desc: not available URL: From moratti at MED.UCM.ES Thu May 14 15:39:48 2009 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Thu, 14 May 2009 15:39:48 +0200 Subject: Sourcefiltering In-Reply-To: Message-ID: Dear Jess, You could define a montage with your two sources in BESA and project the whole data set on the two sources. Then you export the projected data as for example simple binary that you can read in with fieldtrip. Thus, you would have the single trials already projected on the two sources. I am not sure if that is exactly what you want. I hope I could help, Best, Stephan -- *Stephan Moratti, PhD/ /**/see also: http://web.me.com/smoratti/ /*Centro de Tecnología Biomédica CBT, Universidad Politécnica de Madrid, en la actualidad (currently at) en el Centro de Magnetoencefalografía Dr. Perez Modrego, Universidad Complutense de Madrid, Faculdad de Medicina, Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain, email: moratti at gbt.tfo.upm.es moratti at med.ucm.es Tel.: +34 91 394 2292 Fax.: +34 91 394 2294 */ /* ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From charles.cook at ULETH.CA Thu May 14 15:41:21 2009 From: charles.cook at ULETH.CA (Charles Cook) Date: Thu, 14 May 2009 15:41:21 +0200 Subject: electrode load and clusterrandanalysis Message-ID: Hi Michael, Here's the basics of the code. As I mentioned I modified the code from Peter Praamstra's data where the TF power was computed in BESA. The full analysis will have both between group (males vs. females) and within group (location vs. feature identity) aspects. At this point in the code, I'm just trying to get the between group analysis going on one of the tasks. I'm not certain what precise version I'm with, I believe it's from fall 2008. For brevity, I've not included the BESA datafile lists for my different conditions. ------------------------------------------------------------------ % collect all single subject data in a convenient cell-array for i=1:nsubj femfeat{i} = besa2fieldtrip(filename_femfeat{i}); femloc{i} = besa2fieldtrip(filename_femloc{i}); malefeat{i} = besa2fieldtrip(filename_malefeat{i}); maleloc{i} = besa2fieldtrip(filename_maleloc{i}); end % this is needed for the channel labels in the data from Peter Praamstra % Matlab is case sensitive and so the channel and electrode names should match for i=1:nsubj for j=1:length(maleloc{i}.label) if maleloc{i}.label{j}(end)=='H' maleloc{i}.label{j}(end)='h'; end end for j=1:length(femloc{i}.label) if femloc{i}.label{j}(end)=='H' femloc{i}.label{j}(end)='h'; end end % load a set of electrodes (these are on a unit sphere) % note, this will be different for your own data load ('elec'); <------------------------------------------where it breaks down %scale the electrodes to a realistic head size (in cm) elec.pnt = 10*elec.pnt; %prepare layout read_fcdc_elec('HGSN_129_NoFids.sfp'); cfg = []; cfg.rotate = 0; cfg.elecfile = 'HGSN_129_NoFids.sfp'; mylay = prepare_layout(cfg); %cfg.layout = 'HGSN_129_NoFids.sfp'; %mylay = prepare_layout(cfg); % compute the grand average for both conditions cfg = []; cfg.keepindividuals = 'yes'; femfeat_avg = freqgrandaverage(cfg, femfeat{:}); femloc_avg = freqgrandaverage(cfg, femloc{:}); malefeat_avg = freqgrandaverage(cfg, malefeat{:}); maleloc_avg = freqgrandaverage(cfg, maleloc{:}); % Create difference waves % Female Location and feature fem_diff_feat_loc = femfeat_avg; %creates a dummy array male_diff_loc_feat = maleloc_avg; male_diff_loc_feat.powspctrm = maleloc_avg.powspctrm - femloc_avg.powspctrm; fem_diff_feat_loc.powspctrm = femfeat_avg.powspctrm - malefeat_avg.powspctrm; cfg = []; cfg.layout = mylay; cfg.showlabels = 'yes'; % recompute the average, except do _not_ average but keepindividual % this collects all identical time/frequency/channel samples over all % subjects into a single data structure cfg = []; cfg.keepindividual = 'yes'; maleloc_all = freqgrandaverage(cfg, maleloc{:}); femloc_all = freqgrandaverage(cfg, femloc{:}); % % perform the statistical test using randomization and a clustering approach % using the OLD clusterrandanalysis function cfg = []; cfg.elecfile = mylay; %cfg.geomfile = mylay; cfg.neighbourdist = 4; cfg.latency = 'all'; cfg.frequency = 'all'; cfg.channel = 'all'; % see CHANNELSELECTION cfg.avgovertime = 'no'; cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'indepsamplesT'; cfg.nranddraws = 200; stat = clusterrandanalysis (cfg.elecfile, maleloc_all, femloc_all); % perform the statistical test using randomization and a clustering approach % using the NEW freqstatistics function cfg = []; cfg.elecfile = mylay; cfg.neighbourdist = 4; cfg.latency = 'all'; cfg.frequency = 'all'; cfg.channel = 'all'; % see CHANNELSELECTION cfg.avgovertime = 'no'; cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'indepsamplesT'; cfg.numrandomization = 200; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.design = [ 1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 10 11 % subject number 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2]; % condition number cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable stat = freqstatistics(cfg, maleloc_avg, femloc_avg); ----------------------------------------------------------------------- The error I get is as follows: ??? Error using ==> load Unable to read file elec: No such file or directory. Error in ==> CMCWM2_clust at 108 load ('elec'); Any help would be greatly appreciated. Cheers, Charles ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jrkerlin at UCDAVIS.EDU Thu May 14 17:39:05 2009 From: jrkerlin at UCDAVIS.EDU (Jess R. Kerlin) Date: Thu, 14 May 2009 08:39:05 -0700 Subject: Sourcefiltering In-Reply-To: <4A0C1F24.8080600@med.ucm.es> Message-ID: Many thanks to Stephan and Nathan for the advice. I was hoping to avoid this option, as all of my other analysis steps are scripted in Matlab, but I suppose its worth the leg work. -Jess Stephan Moratti wrote: > Dear Jess, > > You could define a montage with your two sources in BESA and project > the whole data set on the two sources. Then you export the projected > data as for example simple binary that you can read in with fieldtrip. > Thus, you would have the single trials already projected on the two > sources. I am not sure if that is exactly what you want. > > I hope I could help, > > Best, > > Stephan > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Thu May 14 19:13:43 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Thu, 14 May 2009 19:13:43 +0200 Subject: electrode load and clusterrandanalysis Message-ID: Hi Charles, if your code literally contains: load ('elec'); that will not work, for sure. The reason is, that you are trying to read a file (via MATLAB's load command) named "elec" in the current directory, which almost certainly does not exist. Try something like: elec = read_fcdc_elec('HGSN_129_NoFids.sfp'); and then add this as a field to the relevant data structures, like this femfeat{i}.elec=elec ... ... This way you'll be doing an electrode name based averaging over subjects. It may be better - since you have all the individual digitized electrode positions as .sfp files (do you?) - to export everything into a virtual BESA standard montage (81 ch in average reference is the most popular option) and then to fieldtrip, as this will take into account the different electrode positions in the different subjects (but we can leave that for later, let's first get the above running :-)...). Michael > -----Ursprüngliche Nachricht----- > Von: "Charles Cook" > Gesendet: 14.05.09 15:42:41 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] electrode load and clusterrandanalysis > Hi Michael, > > Here's the basics of the code. As I mentioned I modified the code from Peter > Praamstra's data where the TF power was computed in BESA. The full analysis > will have both between group (males vs. females) and within group (location > vs. feature identity) aspects. At this point in the code, I'm just trying to > get the between group analysis going on one of the tasks. I'm not certain > what precise version I'm with, I believe it's from fall 2008.femfeat{i} > > For brevity, I've not included the BESA datafile lists for my different > conditions. > > ------------------------------------------------------------------ > > % collect all single subject data in a convenient cell-array > for i=1:nsubj > femfeat{i} = besa2fieldtrip(filename_femfeat{i}); > femloc{i} = besa2fieldtrip(filename_femloc{i}); > malefeat{i} = besa2fieldtrip(filename_malefeat{i}); > maleloc{i} = besa2fieldtrip(filename_maleloc{i}); > end > > % this is needed for the channel labels in the data from Peter Praamstra > % Matlab is case sensitive and so the channel and electrode names should match > > for i=1:nsubj > for j=1:length(maleloc{i}.label) > if maleloc{i}.label{j}(end)=='H' > maleloc{i}.label{j}(end)='h'; > end > end > for j=1:length(femloc{i}.label) > if femloc{i}.label{j}(end)=='H' > femloc{i}.label{j}(end)='h'; > end > end > > > > % load a set of electrodes (these are on a unit sphere) > % note, this will be different for your own data > load ('elec'); <------------------------------------------where it breaks down > %scale the electrodes to a realistic head size (in cm) > elec.pnt = 10*elec.pnt; > > %prepare layout > read_fcdc_elec('HGSN_129_NoFids.sfp'); > cfg = []; > cfg.rotate = 0; > cfg.elecfile = 'HGSN_129_NoFids.sfp';read_fcdc_elec('HGSN_129_NoFids.sfp'); > mylay = prepare_layout(cfg); > %cfg.layout = 'HGSN_129_NoFids.sfp'; > %mylay = prepare_layout(cfg); > > % compute the grand average for both conditions > cfg = []; > cfg.keepindividuals = 'yes'; > femfeat_avg = freqgrandaverage(cfg, femfeat{:}); > femloc_avg = freqgrandaverage(cfg, femloc{:}); > malefeat_avg = freqgrandaverage(cfg, malefeat{:}); > maleloc_avg = freqgrandaverage(cfg, maleloc{:}); > > % Create difference waves > % Female Location and feature > fem_diff_feat_loc = femfeat_avg; %creates a dummy array > male_diff_loc_feat = maleloc_avg; > male_diff_loc_feat.powspctrm = maleloc_avg.powspctrm - femloc_avg.powspctrm; > fem_diff_feat_loc.powspctrm = femfeat_avg.powspctrm - malefeat_avg.powspctrm; > > cfg = []; > cfg.layout = mylay; > cfg.showlabels = 'yes'; > > % recompute the average, except do _not_ average but keepindividual > % this collects all identical time/frequency/channel samples over all > % subjects into a single data structure > cfg = []; > cfg.keepindividual = 'yes'; > maleloc_all = freqgrandaverage(cfg, maleloc{:}); > femloc_all = freqgrandaverage(cfg, femloc{:}); > > % > % perform the statistical test using randomization and a clustering approach > % using the OLD clusterrandanalysis function > cfg = []; > cfg.elecfile = mylay; > %cfg.geomfile = mylay; > cfg.neighbourdist = 4; > cfg.latency = 'all'; > cfg.frequency = 'all'; > cfg.channel = 'all'; % see CHANNELSELECTION > cfg.avgovertime = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgoverchan = 'no'; > cfg.statistic = 'indepsamplesT'; > cfg.nranddraws = 200; > stat = clusterrandanalysis (cfg.elecfile, maleloc_all, femloc_all); > > > % perform the statistical test using randomization and a clustering approach > % using the NEW freqstatistics function > cfg = []; > cfg.elecfile = mylay; > cfg.neighbourdist = 4; > cfg.latency = 'all'; > cfg.frequency = 'all'; > cfg.channel = 'all'; % see CHANNELSELECTION > cfg.avgovertime = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgoverchan = 'no'; > cfg.statistic = 'indepsamplesT'; > cfg.numrandomization = 200; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.design = [ > 1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 10 11 % subject number > 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2]; % condition number > cfg.uvar = 1; % "subject" is unit of > observation > cfg.ivar = 2; % "condition" is the > independent variable > stat = freqstatistics(cfg, maleloc_avg, femloc_avg); > ----------------------------------------------------------------------- > The error I get is as follows: > > ??? Error using ==> load > Unable to read file elec: No such file or directory. > > Error in ==> CMCWM2_clust at 108 > load ('elec'); > > Any help would be greatly appreciated. > > Cheers, > > Charles > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From manish.saggar at GMAIL.COM Fri May 15 08:25:47 2009 From: manish.saggar at GMAIL.COM (Manish Saggar) Date: Fri, 15 May 2009 01:25:47 -0500 Subject: Clusterplot not highlighting clusters & average layout file In-Reply-To: <01c901c9d399$f31b00e0$642dae83@fcdonders.nl> Message-ID: Ingrid, thanks for replying back. Apologies for lack of information. Clusterplot is plotting clusters fine most of the times, but in some cases it doesn't choose to highlight markers. I have attached two such images with this email. I do not get any errors or warnings. In fact the command window in matlab says, cluster found (with some prob and highlighter sign) and then the plot doesn't contain any highlighting. Initially I thought that my layout file might be messing it up or something, or may be I need to take an average layout file for group analysis (since cap size and electrode digitization varies for each subject). Then I put debug points in the code and found out that at line 235 the list cell (used to denote highlighted points) is empty. I am a novice so please forgive if what I am suggesting is dumb here, but I think when cluster plot is searching for significant clusters it is only looking into first column (which could correspond to first frequency in band) if one cluster is found by freqstats. It might be that in the code you guys are sorting columns and I might have missed it. But I thought I should clear this with you. In another thread you have mentioned to someone that their time limits might not be precise enough to get the clusers highlighted (https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0709&L=FIELDTRIP&P=R680 ). But they were doing time-freq analysis and I am just doing freq- representations. So should I use freqstats on each freq separately ? On a side note, when I run freqstats on my data (with 88 channels) command line says '89 neighbors per channel found'. I am a little confused with this. First since I only have less than 88 channels in the data and second since it should only consider a lower number for neighbor distance, right? and how can I change it? Thanks a ton in advance, Manish On May 13, 2009, at 2:10 AM, Ingrid Nieuwenhuis wrote: > Dear Manish, > > You give a bit too few information to be able to figure out what > could be > the problem with clusterplot. After calling clusterplot, clusterplot > gives > information on which clusters it finds. Does the function find any > clusters? > Does the .mask field of the structure that comes out of freqstatistics > contain any ones? Is everything else plotted normally? Do you get > any errors > or warnings? > > I'm not familiar with BESA layout files, but assuming that all > layout files > are similar over subjects, I think it is fine to just use an > individual > subject's layout file. > > Hope this helps, > Best Ingrid > > >> ---Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >> Behalf Of Manish Saggar >> Sent: Tuesday, May 12, 2009 10:17 AM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: [FIELDTRIP] Clusterplot not highlighting clusters & average >> layout file >> >> All, >> >> I have a question regarding clusterplot function. I am doing a >> within-subject analysis. >> The experimental design that I have is as follows, there are three >> conditions C1, C2 and C3. Each condition is of 1 min duration (e.g. >> rest with eyes open for 1 min). >> >> Now I am comparing grandaverage of freq representation of a set of >> subjects for C2 with C1 etc. FreqStatistics is running just fine >> creating significant (<0.025 alpha, for 2-tailed test) clusters >> (positive). Now the problem is that when I try to plot the location >> of >> this cluster using clusterplot it doesn't show any highlighted >> channels. Any ideas why that is happening? >> >> Another question is that since I am using grandaverages of freq >> representation, what should I use for layout file (using BESA sfp >> file >> here). I have individual subject layout files. Currently I am just >> giving any file from one of the subjects. Since, I noticed that >> FreqStatistics finds a common minimum set of channels and then apply >> statistics on it. So do I need to average layout files for the >> subject >> group or is there any other way? >> >> Any help is much appreciated. >> >> Regards, >> Manish >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the >> FieldTrip toolbox, to share experiences and to discuss new ideas >> for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From dionyssios.theofilou at GMAIL.COM Fri May 15 18:10:41 2009 From: dionyssios.theofilou at GMAIL.COM (Dionyssios Theofilou) Date: Fri, 15 May 2009 09:10:41 -0700 Subject: trialfun_neuromag.m is missing ? Message-ID: Hello, I am new to fieldtrip and I have just started trying to import a neuromag '.fif' file. I wanted to ask: Is the 'trialfun_neuromag.m' missing from the latest distribution ? I have expanded the: fieldtrip-20090509.zip The error message that I receive is: evaluating trialfunction 'trialfun_neuromag' ??? Error using ==> feval Undefined function or method 'trialfun_neuromag' for input arguments of type 'struct'. Error in ==> definetrial at 200 trl = feval(cfg.trialfun, cfg); Error in ==> filename.m at 7 cfg = definetria(cfg); Also, I don't see any Neuromag-like directory in the subdirectories of the distribution. My Best, Dionyssios Theofilou. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From charles.cook at ULETH.CA Fri May 15 19:01:57 2009 From: charles.cook at ULETH.CA (Charles Cook) Date: Fri, 15 May 2009 19:01:57 +0200 Subject: electrode load and clusterrandanalysis Message-ID: Hi Michael, I do have all the sfp files, and agree that standardizing might be the best option to address the problem. Is there a version of the 'HGSN_129_NoFids.sfp' for the std-81 montage? Cheers, Charles ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Nina.Kahlbrock at UNI-DUESSELDORF.DE Sat May 16 17:05:42 2009 From: Nina.Kahlbrock at UNI-DUESSELDORF.DE (Nina Kahlbrock) Date: Sat, 16 May 2009 17:05:42 +0200 Subject: significant coherence Message-ID: Dear Fieldtrip users, I have a question concerning significant coherence. I saw that a similar question was asked before on the mailing list. As I am new to coherence, I did not quite understand the answer. So here is my question: I have computed coherence between different MEG sensors and a photodiode. Now, I would like to compute significance levels for these coherence values at different frequencies. Is there a function in fieldtrip that I can use to solve this task? I have found the function 'statfun_indepsamplesZcoh'. However, I am not sure whether this is the right one to use. I would greatly appreciate your help! Thanks in advance. Nina ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.schoffelen at PSY.GLA.AC.UK Mon May 18 22:13:05 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Mon, 18 May 2009 21:13:05 +0100 Subject: significant coherence In-Reply-To: <000001c9d637$c817ad30$cd136386@vmed.ukd> Message-ID: Dear Nina, There is no fieldtrip function in the release allowing for the testing of significant coherence, if I understand correctly what you want. This would be to infer whether a given estimate of coherence is significantly different from zero. This means that you are not testing two conditions against each other (which is what stafun_indepsamplesZcoh is doing; on top of this: it does it for all combinations of channels, and not just for all channels versus a given external reference signal). There are two ways in which you can assess the 'significance'. First would be something like a 'shift predictor'. In short, one could shuffle the order of the replications for the reference channel and recompute coherence between the reference and the rest. Provided the reference is not the same signal in each trial, doing this many times would give you an estimate of the 'bias' in coherence. Any observed coherence values in the upper 5% tail then would count as significant (this by the way only works for an external reference channel, and not when you use one of the MEG channels as a reference). This shift predictor is perhaps something of an overkill, and you could use a parametric test instead. One way to do this, is to 'Z- transform' the coherence. I am used to using a particular formula which is described in one of our papers (Schoffelen, Science 2005 (supplementary material)); the appropriate references can also be found therein. I hope this helps, Cheers, Jan-Mathijs On May 16, 2009, at 4:05 PM, Nina Kahlbrock wrote: > Dear Fieldtrip users, > > I have a question concerning significant coherence. I saw that a > similar question was asked before on the mailing list. As I am new > to coherence, I did not quite understand the answer. > So here is my question: I have computed coherence between different > MEG sensors and a photodiode. Now, I would like to compute > significance levels for these coherence values at different > frequencies. Is there a function in fieldtrip that I can use to > solve this task? I have found the function > ‘statfun_indepsamplesZcoh’. However, I am not sure whether this is > the right one to use. > > I would greatly appreciate your help! > > Thanks in advance. > Nina > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From moratti at MED.UCM.ES Tue May 19 14:28:37 2009 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Tue, 19 May 2009 14:28:37 +0200 Subject: megplanar for magnetometers In-Reply-To: Message-ID: Hi all, I would like to transform my magnetometer maps to a planargradiometer representation (with BESA I can do that, but it would be nice to have it in fieldtrip). I guess, simply using megplanar and combineplanar as it is, would be incorrect, as this functions assume axial gradiameters. So, I tried to change some code of megplanar (lines 281-287, method 'orig') simply assuming that X2 Y2 and Z2 are equal to X,Y,Z in the case of magnetometers: % get the positions of bottom and top coil X = grad.pnt(:, 1); Y = grad.pnt(:, 2); Z = grad.pnt(:, 3); X2 = grad.pnt(:, 1);% + grad.ori(:,1); Y2 = grad.pnt(:, 2);% + grad.ori(:,2); Z2 = grad.pnt(:, 3);% + grad.ori(:,3); Well, probably this is quite naive. Attached please find my results (testplanar.tiff). testmagneto.tiff contains the original magnetic flux map (magentometers). Can anybody figure out if this makes sense? Thanks for any comments and help, Stephan -- *Stephan Moratti, PhD/ /**/see also: http://web.me.com/smoratti/ /*Centro de Tecnología Biomédica CBT, Universidad Politécnica de Madrid, en la actualidad (currently at) en el Centro de Magnetoencefalografía Dr. Perez Modrego, Universidad Complutense de Madrid, Faculdad de Medicina, Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain, email: moratti at gbt.tfo.upm.es moratti at med.ucm.es Tel.: +34 91 394 2292 Fax.: +34 91 394 2294 */ /* ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: testplanar.tif Type: image/tiff Size: 197102 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: testmagneto.tif Type: image/tiff Size: 193370 bytes Desc: not available URL: From j.schoffelen at PSY.GLA.AC.UK Tue May 19 23:28:17 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Tue, 19 May 2009 22:28:17 +0100 Subject: megplanar for magnetometers In-Reply-To: <4A12A5F5.6080704@med.ucm.es> Message-ID: Dear Stephan, I would advice you to use cfg.method = 'sincos'. As a matter of fact, the 'orig' method has been conceived indeed for axial gradient data, but I believe the info about the top coil is only used to temporarily generate a local z-axis throught the gradiometer, to define the local X and Y coordinate frame for the planar gradient. Using the sincos- method the XY coordinate frame is different, but apart from that, the planar gradient field interpolation works with the same logic, estimating a gradient in an X and Y direction based on an interpolation of the gradients between the magnetic field (magnetometers) or axial gradient (gradiometers) at a given sensor and its neighbours. Yours, Jan-Mathijs On May 19, 2009, at 1:28 PM, Stephan Moratti wrote: > Hi all, > > I would like to transform my magnetometer maps to a > planargradiometer representation (with BESA I can do that, but it > would be nice to have it in fieldtrip). I guess, simply using > megplanar and combineplanar as it is, would be incorrect, as this > functions assume axial gradiameters. So, I tried to change some > code of megplanar (lines 281-287, method 'orig') simply assuming > that X2 Y2 and Z2 are equal to X,Y,Z in the case of magnetometers: > > % get the positions of bottom and top coil > X = grad.pnt(:, 1); > Y = grad.pnt(:, 2); > Z = grad.pnt(:, 3); > X2 = grad.pnt(:, 1);% + grad.ori(:,1); > Y2 = grad.pnt(:, 2);% + grad.ori(:,2); > Z2 = grad.pnt(:, 3);% + grad.ori(:,3); > > Well, probably this is quite naive. Attached please find my results > (testplanar.tiff). testmagneto.tiff contains the original magnetic > flux map (magentometers). Can anybody figure out if this makes sense? > > Thanks for any comments and help, > > Stephan > > > -- > *Stephan Moratti, PhD/ > /**/see also: http://web.me.com/smoratti/ > /*Centro de Tecnología Biomédica CBT, > Universidad Politécnica de Madrid, > > en la actualidad (currently at) en el > Centro de Magnetoencefalografía Dr. Perez Modrego, > Universidad Complutense de Madrid, > Faculdad de Medicina, > Pabellón 8, > Avda. Complutense, s/n, > 28040 Madrid, > Spain, > > email: moratti at gbt.tfo.upm.es > moratti at med.ucm.es > Tel.: +34 91 394 2292 > Fax.: +34 91 394 2294 > */ > /* > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/neuroimaging/ > fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From moratti at MED.UCM.ES Wed May 20 10:05:36 2009 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Wed, 20 May 2009 10:05:36 +0200 Subject: megplanar for magentometers In-Reply-To: Message-ID: Dear Jan-Mathijs, Thanks for your comments, I will check this out. By the way I am still behind the table weights ;-) .... Best, Stephan -- *Stephan Moratti, PhD/ /**/see also: http://web.me.com/smoratti/ /*Centro de Tecnología Biomédica CBT, Universidad Politécnica de Madrid, en la actualidad (currently at) en el Centro de Magnetoencefalografía Dr. Perez Modrego, Universidad Complutense de Madrid, Faculdad de Medicina, Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain, email: moratti at gbt.tfo.upm.es moratti at med.ucm.es Tel.: +34 91 394 2292 Fax.: +34 91 394 2294 */ /* ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From dahliash at STANFORD.EDU Thu May 21 22:24:59 2009 From: dahliash at STANFORD.EDU (Dahlia Sharon) Date: Thu, 21 May 2009 13:24:59 -0700 Subject: multiplotTFR not redrawing In-Reply-To: <1015851759.4956171242937368734.JavaMail.root@zm09.stanford.edu> Message-ID: Hi, I'm new to fieldtrip and am using the multiplotTFR to view results from freqanalysis. After I initially view a figure that contains a multiplot, if I then view another figure that has a multiplot, I cannot get matlab to redraw the first figure, and then the second figure also becomes blank, and I need to restart matlab (i.e. just closing the figures and repeating the multiplot command doesn't work). Any idea how I can resolve this issue? I'm viewing the Linux environment through X-Win32 on Windows XP; this is Neuromag data opened with Matti's MNE suite. Thanks!! Dahlia. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at DONDERS.RU.NL Fri May 22 16:47:42 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 22 May 2009 16:47:42 +0200 Subject: Clusterplot not highlighting clusters & average layout file Message-ID: Dear Manish, If I understand correctly you have multiple frequencies over which you cluster. Is that correct? (so cfg.avgoverfreq = 'no' when you called freqstatistics?) In that case you should not call clusterplot because for different frequencies there can be different channels part of the cluster. Instead you can call multiplotER or multiplotTFR and use cfg.maskparameter = 'mask' to plot the significant cluster. Hope this helps, Ingrid > -----Original Message----- > From: Manish Saggar [mailto:manish.saggar at gmail.com] > Sent: Friday, May 15, 2009 8:26 AM > To: ingrid.nieuwenhuis at donders.ru.nl > Cc: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] Clusterplot not highlighting clusters & average > layout file > > Ingrid, thanks for replying back. > > Apologies for lack of information. > > Clusterplot is plotting clusters fine most of the times, but in some > cases it doesn't choose to highlight markers. I have attached two such > images with this email. > > I do not get any errors or warnings. In fact the command window in > matlab says, cluster found (with some prob and highlighter sign) and > then the plot doesn't contain any highlighting. > Initially I thought that my layout file might be messing it up or > something, or may be I need to take an average layout file for group > analysis (since cap size and electrode digitization varies for each > subject). > > Then I put debug points in the code and found out that at line 235 the > list cell (used to denote highlighted points) is empty. I am a novice > so please forgive if what I am suggesting is dumb here, but I think > when cluster plot is searching for significant clusters it is only > looking into first column (which could correspond to first frequency > in band) if one cluster is found by freqstats. It might be that in the > code you guys are sorting columns and I might have missed it. But I > thought I should clear this with you. > > In another thread you have mentioned to someone that their time limits > might not be precise enough to get the clusers highlighted > (https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0709&L=FIELDTRIP&P=R680 > ). But they were doing time-freq analysis and I am just doing freq- > representations. So should I use freqstats on each freq separately ? > > On a side note, when I run freqstats on my data (with 88 channels) > command line says '89 neighbors per channel found'. I am a little > confused with this. First since I only have less than 88 channels in > the data and second since it should only consider a lower number for > neighbor distance, right? and how can I change it? > > Thanks a ton in advance, > Manish > > On May 13, 2009, at 2:10 AM, Ingrid Nieuwenhuis wrote: > > > Dear Manish, > > > > You give a bit too few information to be able to figure out what > > could be > > the problem with clusterplot. After calling clusterplot, clusterplot > > gives > > information on which clusters it finds. Does the function find any > > clusters? > > Does the .mask field of the structure that comes out of freqstatistics > > contain any ones? Is everything else plotted normally? Do you get > > any errors > > or warnings? > > > > I'm not familiar with BESA layout files, but assuming that all > > layout files > > are similar over subjects, I think it is fine to just use an > > individual > > subject's layout file. > > > > Hope this helps, > > Best Ingrid > > > > > >> ---Original Message----- > >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > >> Behalf Of Manish Saggar > >> Sent: Tuesday, May 12, 2009 10:17 AM > >> To: FIELDTRIP at NIC.SURFNET.NL > >> Subject: [FIELDTRIP] Clusterplot not highlighting clusters & average > >> layout file > >> > >> All, > >> > >> I have a question regarding clusterplot function. I am doing a > >> within-subject analysis. > >> The experimental design that I have is as follows, there are three > >> conditions C1, C2 and C3. Each condition is of 1 min duration (e.g. > >> rest with eyes open for 1 min). > >> > >> Now I am comparing grandaverage of freq representation of a set of > >> subjects for C2 with C1 etc. FreqStatistics is running just fine > >> creating significant (<0.025 alpha, for 2-tailed test) clusters > >> (positive). Now the problem is that when I try to plot the location > >> of > >> this cluster using clusterplot it doesn't show any highlighted > >> channels. Any ideas why that is happening? > >> > >> Another question is that since I am using grandaverages of freq > >> representation, what should I use for layout file (using BESA sfp > >> file > >> here). I have individual subject layout files. Currently I am just > >> giving any file from one of the subjects. Since, I noticed that > >> FreqStatistics finds a common minimum set of channels and then apply > >> statistics on it. So do I need to average layout files for the > >> subject > >> group or is there any other way? > >> > >> Any help is much appreciated. > >> > >> Regards, > >> Manish > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > >> of the > >> FieldTrip toolbox, to share experiences and to discuss new ideas > >> for MEG > >> and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > > of the FieldTrip toolbox, to share experiences and to discuss new > > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html > > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From amano at BRAIN.K.U-TOKYO.AC.JP Mon May 25 10:26:14 2009 From: amano at BRAIN.K.U-TOKYO.AC.JP (Kaoru Amano) Date: Mon, 25 May 2009 17:26:14 +0900 Subject: independsamplesZcoh In-Reply-To: Message-ID: Dear all I have a very similar problem about the freqstatistics with 'independsamplesZcoh', as Jamie asked below. As jan-mathijs suggested, within 'independsamplesZcoh' Z-transformed coherence difference is computed between all pairs of input channels, but the 'clusterstat' seems to expect the first dimension of input to be the number of channels not the number of the combination of channels, which create an error in 'clusterstat' at 195. It would be great if some of you could tell me how we can solve this problem. Best, Kaoru -- Kaoru Amano email: amano at brain.k.u-tokyo.ac.jp URL: http://www.brain.k.u-tokyo.ac.jp/~amano/ > I have fixed the issues in my posting below and seem to be getting closer to having my code run. However, I still run into a dimension mismatch in clusterstat...I'm trying to understand the following code, where I think this mismatch occurs. > % determine whether the input represents N-D volumetric data or channel-freq-time data and provide the appropriate details > % TODO this detection should be more robust > if isfield(cfg, 'neighbours') && ~isempty(cfg.neighbours) > channeighbstructmat = makechanneighbstructmat(cfg); > issource = 0; > else > issource = 1; > % cfg contains dim and inside that are needed for reshaping the data to a volume, and inside should behave as a index vector > cfg = fixinside(cfg, 'index'); > end > The dimension of the data (statobs) that is passed to clusterstat is 520 X 1 (10 channels of coherence differences x 52 frequencies concatenated; note: this use to be 5 channels of powspctrm) which makes sense. I am trying to cluster by frequency (not channel)...the output of "fixinside" function returns cfg.index of dimension (1 X 260), causing a dimension mismatch at line 188 in clusterstat. The reason this happens, I think, is in line 37 of fixinside where > elseif isfield(source, 'dim') > source.inside = 1:prod(source.dim); > source.outside = []; > end > for some reason source.dim still has the dimension 5 X 52 X 1, ie, the dimensions prior to computing the coherence differences. I'm not sure whether/where I should change the cfg.dim, which I assume should reflect the dimensions of the newly computed data matrix. > Thanks, > Jamie > > ________________________________ > > From: FieldTrip discussion list on behalf of Jamie Johnston > Sent: Sun 5/3/2009 2:12 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] independsamplesZcoh > > > Thanks for your response. > > Let me clarify....I have 8 subjects (with 5 channels of data, 2 with 4 channels which I'm not using at this point)...I used only 2 subjects to test the code (for faster debugging). I do want to do a within subject statistical test between my conditions (of which I have 3, but I am only inputting 2 into freqstatistics as I was unclear whether I could run comparisons across 3 conditions). > > As you correctly point out, I did compute coherence across my 5 channels first, resulting in 10 spectra...this is what I inputted into freqstatistics, which is clearly incorrect. This is what I thought, however I didn't know exactly what the data input should look like. > > So, just to clarify, I'm running > > freqanalysis - inputting raw data, returning "powandcsd' > freqdescriptives - inputting data from freqanalysis, returning 'coh' > freqgrandaverage (keep individual 'yes') - inputting data from freqdescriptives, returning a grandaverage > freqstatistics - inputting two grandaverages (for 2 conditions), using the following parameters: > > %Compute Permutation Test > cfg = []; > cfg.parameter = 'cohspctrm'; > cfg.method = 'montecarlo'; > cfg.frequency = [0 50]; > cfg.statistic = 'indepsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 100; > cfg.computestat = 'yes'; > > > subj = length(Subjects); > design=zeros(2,2*subj); > for i = 1:subj > design(1,i) = i; > end > for i = 1:subj > design(1,subj+i) = i; > end > design(2,1:subj) = 1; > design(2,subj+1:2*subj) = 2; > > cfg.design = design; > cfg.uvar = 1; > cfg.ivar = 2; > > [stat] = freqstatistics(cfg, grandavg{1}, grandavg{2}); > > > Are you saying, I should use the output from freqanalysis (skipping freqdescriptives) as input to freqgrandaverage? Also, should my "cfg.parameter" for the freqstatistics function still be 'cohspctrm' or 'powspctrm'? > > Thanks again, > > Jamie > > > > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of jan-mathijs schoffelen > Sent: May 3, 2009 1:34 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] independsamplesZcoh > > Dear Jamie, > > For me it is not exactly clear what you want to do. In an earlier message you referred to our paper using a permutation test to test for a significant difference in coherence between conditions (Maris et al 2007). Essentially, as described, this is a test which is performed within each subject allowing you to do statistical inference about the potential difference between two conditions. As such this is the type of test indepsamplesZcoh can perform, if properly used (see below). Yet, you describe using two subjects as an input. This to me sounds rather that you would like to do statistics across subjects (although 2 subjects of course is a rather low number). This is NOT something indepsamplesZcoh can do for you. In general it is possible to test for a significant difference between two conditions across a population of subjects, but this would require a different approach. Rather than shuffling single observations across conditions PRIOR TO COMPUTING THE COHERENCE DIFFER ENCE (sorry about the capitals but this is essential for what is to follow below), one would swap the sign of the Z-transformed coherence difference for a random subset of subjects prior to averaging. > It seems as if you computed coherence spectra between all unique pairs of channels (4x5)/2 and used this as an input to freqstatistics. Yet, for single subject statistics this does not make sense, because indepsamplesZcoh expects fourier-spectra in the input. Within the function Z-transformed coherence difference will be computed between all pairs of input channels (in your case this would be (9x10)/2 (even though the function does not know you provide it with the wrong input), and multiplying this number with 52 would give your 'magical' 2340). > So, indeed you should either format your data in a different way using single subject fourier spectra in two conditions as an input to freqstatistics, or using a different statistical test to test for differences across subjects. > > Yours, > > Jan-Mathijs > > > > On May 3, 2009, at 7:00 PM, Jamie Johnston wrote: > > > > Hi all - > > I am trying to run a monte carlo - indepsamplesZcoh - cluster on my data using freqstatistics. I input two data files into freqstatistics with the cohspctrm having dimensions 2 (subjects) x 10 (channels, # of coherence spectra) x 52 (frequencies). I run into a dimension mismatch in the function clusterstat. If I run any other statistic (i.e., indepsamplesT) it runs fine. When running the indepsamplesT, clusterstat receives two inputs: statobs (520x1) and statrnd (520x100). These dimensions make sense to me. However, when running indepsamplesZcohthese two variables have dimensions 2340x1 and 2340x100, respectively. This happens around lines 104-108 in indepsamplesZcoh.m with computation of the variables "chancmbsel" and "nnewsamples." I'm not understanding what these variables do, but my guess is that I need to setup my data files differently in the beginning. My understanding of what this analysis protocol does is compute the z-statistic on each channel of coherenc e data (10 for each data file) and then find the difference between the z-statistic for each channel across the data files. Once this is complete it runs the permutations to determine the significance. > > Please verify that what I have done is correct and any help with the error I am getting would be greatly appreciated. > > Thanks, > > Jamie > > _______________ > Jamie Johnston, Ph.D. > Assistant Professor > Faculty of Kinesiology > University of Calgary > 2500 University Dr. NW > Calgary, AB > T2N 1N4 > Phone: +1 (403) 220-3649 > Fax: +1 (403) 284-3553 > email: johnston at kin.ucalgary.ca > website: http://www.kin.ucalgary.ca/wcm/knes/johnston.html > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From muthuraman10 at HOTMAIL.COM Mon May 25 16:54:20 2009 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 25 May 2009 14:54:20 +0000 Subject: Source plot! Message-ID: Hello Fieldtrip Users, I have attached a orthoplot with this mail. This source plot i plotted with the method 'ortho', but i would like get the plot in the correct direction in all the 3 slices. As i looked in the tutorial documentation need to use the volumenormalisation to get it in the correct direction. Then the next question where i can get the template with MNI coordinates which is showed in the tutorial documentation. Thanking you With regards, M.Muthuraman. _________________________________________________________________ Planning the weekend ? Here’s what is happening in your town. http://msn.asklaila.com/events/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: orthoplot.jpg Type: image/jpeg Size: 44484 bytes Desc: not available URL: From r.oostenveld at FCDONDERS.RU.NL Mon May 25 22:13:22 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 25 May 2009 22:13:22 +0200 Subject: multiplotTFR not redrawing In-Reply-To: <1588054045.4956801242937499868.JavaMail.root@zm09.stanford.edu> Message-ID: Dear Dahlia, On 21 May 2009, at 22:24, Dahlia Sharon wrote: > Any idea how I can resolve this issue? Please try the cfg.renderer option. The default (opengl) might cause problems with your X11 connection. best regards, Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From julian.keil at GMAIL.COM Tue May 26 09:51:37 2009 From: julian.keil at GMAIL.COM (Julian Keil) Date: Tue, 26 May 2009 09:51:37 +0200 Subject: TFR plot uneven y-axis spacing Message-ID: Hi everyone, I performed a TFR-analysis with unevenly spaced frequency steps (cfg.foi=[10.^(log10(2):((log10(100)-log10(2))/35):log10(100))];) Now, when I try to plot the results with multiplotTFR, I get the warning, that (one of the axis) is/are not evenly spaced. Nonetheless, the multiplotTFR works fine. The Probem arises, when I try to select single (or a number) of sensors to be plotted. I then get the following error message: ??? Attempted to access c(22,1); index out of bounds because size(c)=[21,101]. Error in ==> uimage at 128 ce(j,i) = c(indi(end), indj(end)); Error in ==> uimagesc at 50 hh = uimage(varargin{:},'CDataMapping','scaled'); Error in ==> singleplotTFR at 282 h = uimagesc(data.(cfg.xparam)(xidc), data.(cfg.yparam)(yidc), TFR, [zmin,zmax]); Error in ==> plotSelection at 343 singleplotTFR(new_cfg, userData.data); ??? Error while evaluating figure WindowButtonUpFcn Is there any way to work around this (I already tried defining the y- axis with cfg.ylim)? Thanks a lot Julian Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: julian.keil at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 194 bytes Desc: Signierter Teil der Nachricht URL: From ingrid.nieuwenhuis at DONDERS.RU.NL Tue May 26 15:23:53 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 26 May 2009 15:23:53 +0200 Subject: TFR plot uneven y-axis spacing In-Reply-To: <35A3B14D-C8E5-4B3A-AAC2-2558B43C0FB1@gmail.com> Message-ID: Hi Julian, Yes indeed plotting with unevenly spaced axis is problematic in Matlab. The problem lies in the image (and imagesc) Matlab functions that singleplotTFR and multiplotTFR call. These functions assume evenly spaced axis, and they just interpolate linearly between lowest and highest value. Therefore you cannot trust the values next to the axis when you look at the blobs, because they can be totally wrong (which you will see if you change the ylims, then the blobs shift). To get around this we used uimage and uimagesc in fieldtrip, which works around this problem by making new axis before calling image and imagesc. This was hard to implement in the current version of multiplotTFR, so there we only give a warning (we're working on restructuring the plotting functions, so in the future hopefully this will be also implemented in the multiplot functions). So although everything seems to be going fine in multiplot, you can not trust the axis there, because they are linearly interpolated! So for the error in the singleplot function, there something is not going right when making the new axis. We got the uimage and uimagesc functions as free functions from the matlabcentral fileexchange (see url in the code). You could try to debug, and see why the new axis making doesn't work. I hope this helps to solve the problem, if not let me know, I could try to help then. Best Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Julian Keil Sent: Tuesday, May 26, 2009 9:52 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] TFR plot uneven y-axis spacing Hi everyone, I performed a TFR-analysis with unevenly spaced frequency steps (cfg.foi=[10.^(log10(2):((log10(100)-log10(2))/35):log10(100))];) Now, when I try to plot the results with multiplotTFR, I get the warning, that (one of the axis) is/are not evenly spaced. Nonetheless, the multiplotTFR works fine. The Probem arises, when I try to select single (or a number) of sensors to be plotted. I then get the following error message: ??? Attempted to access c(22,1); index out of bounds because size(c)=[21,101]. Error in ==> uimage at 128 ce(j,i) = c(indi(end), indj(end)); Error in ==> uimagesc at 50 hh = uimage(varargin{:},'CDataMapping','scaled'); Error in ==> singleplotTFR at 282 h = uimagesc(data.(cfg.xparam)(xidc), data.(cfg.yparam)(yidc), TFR, [zmin,zmax]); Error in ==> plotSelection at 343 singleplotTFR(new_cfg, userData.data); ??? Error while evaluating figure WindowButtonUpFcn Is there any way to work around this (I already tried defining the y-axis with cfg.ylim)? Thanks a lot Julian Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: julian.keil at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From charles.cook at ULETH.CA Tue May 26 16:36:08 2009 From: charles.cook at ULETH.CA (Charles Cook) Date: Tue, 26 May 2009 16:36:08 +0200 Subject: electrode load and clusterrandanalysis Message-ID: Hi Michael, Still working on the problem. I have all my data in a standard 81 montage in average reference. When I'm preparing the electrode layout now, is there an sfp I need to call for, like the HGSN_129_NoFids.sfp file when analyzing 128 channels? Cheers, Charles On Thu, 14 May 2009 19:13:43 +0200, Michael Wibral wrote: >Hi Charles, >It may be better - since you have all the individual digitized electrode positions as .sfp files (do you?) - to export everything into a virtual BESA standard montage (81 ch in average reference is the most popular option) and then to fieldtrip, as this will take into account the different electrode positions in the different subjects (but we can leave that for later, let's first get the above running :-)...). > >Michael > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From khoechstetter at BESA.DE Tue May 26 17:53:51 2009 From: khoechstetter at BESA.DE (Karsten Hoechstetter) Date: Tue, 26 May 2009 17:53:51 +0200 Subject: Job offer: EEG/MEG scientist for support and development In-Reply-To: Message-ID: Dear Fieldtrip mailing list members, MEGIS Software GmbH (Munich, Germany) is looking for an EEG/MEG scientist to join our support and development team. The main tasks will be to: - provide support to our customers (predominantly email) - teach the use of our software at customer workshops - represent our products and software at neuroimaging conferences - participate in joint research projects with our customers - contribute to the development of new analysis techniques and program features The applicant should have profound experience in EEG/MEG measurement and data analysis, preferably with BESA and/or MATLAB. We expect the applicant to have experience with all steps of ERP analysis (paradigm design, digital processing, topographic mapping, averaging, source analysis). Fluency in written and spoken English are a prerequisite for the announced position. MEGIS is one of the leading developers of EEG/MEG analysis software. Our BESA program is a widely used research software the analysis of EEG and MEG data (see www.besa.de). As a free enterprise in the field of science and research we can offer job positions combining the advantages of both fields: Stay in touch with current front-end research work while enjoying the advantages of a permanent position with adequate salary. Applications should include a current CV, a letter indicating motivation and skills, and a list of publications. Electronic applications preferred. Please send your application to: Theodor Scherg (tscherg at besa.de) or to: MEGIS Software GmbH Freihamer Str. 18 82166 Graefelfing Germany We’re looking forward to hearing from you! -------------------------------------- Dr. Karsten Hoechstetter MEGIS Software GmbH Gräfelfing, Germany HRB München 109956 CEO Dr. Michael Scherg -------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jean-michel.badier at UNIVMED.FR Wed May 27 21:16:12 2009 From: jean-michel.badier at UNIVMED.FR (Jean-Michel Badier) Date: Wed, 27 May 2009 21:16:12 +0200 Subject: Problem with freqstatistics Message-ID: Dear Fieldtrip mailing list members, I am a quite new user of fieldtrip (version 10090331). I have been trying to use it for analyzing distribution of frequencies on MEG signal between two events of a task. The last command using freqstatistics result of an error message. I decided to run the tutorial "Cluster-based permutation tests on time-frequency data" in order to compare the organization my data set compared with the one in the data set. In fact I got the same bug with the tutorial data set that is for the tutorial data set: selected 149 channels selected 61 time bins selected 1 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip-20090331/private/prepare_timefreq_data at 314 In fieldtrip-20090331/private/statistics_wrapper at 315 In freqstatistics at 137 Using the gradiometer configuration from the dataset. there are on average 4.7 neighbours per channel using "statistics_montecarlo" for the statistical testing using "statfun_indepsamplesT" for the single-sample statistics constructing randomized design total number of measurements = 149 total number of variables = 1 number of independent variables = 1 number of unit variables = 0 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach computing a parmetric threshold for clustering Warning: Not all replications are used for the computation of the statistic. > In statfun_indepsamplesT at 90 In statistics_montecarlo at 275 In fieldtrip-20090331/private/statistics_wrapper at 381 In freqstatistics at 137 Undefined function or method 'tinv' for input arguments of type 'double'. ??? Error using ==> statistics_montecarlo at 278 could not determine the parametric critical value for clustering Error in ==> statistics_wrapper at 381 [stat, cfg] = statmethod(cfg, dat, cfg.design); Error in ==> freqstatistics at 137 [stat] = statistics_wrapper(cfg, varargin{:}); >> Any idea or suggestion about that problem? Thanks. Jean-Michel -- Jean-Michel Badier Laboratoire de MagnétoEncéphaloGraphie INSERM U751. Aix Marseille Université 33 (0)4 91 38 55 62 _jean-michel.badier at univmed.fr_ Service de Neurophysiologie Clinique. CHU Timone 264 Rue Saint-Pierre, 13005 Marseille-France ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From R.Oostenveld at FCDONDERS.RU.NL Fri May 29 14:28:24 2009 From: R.Oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 29 May 2009 14:28:24 +0200 Subject: research and engineering positions available at NeuroSpin MEG centre Message-ID: NeuroSpin MEG at CEA Paris, France is recruiting TWO engineers RESEARCH/DEVELOPMENT ENGINEER & ELECTRONICS ENGINEER Work Environment The Magnetoencephalography (MEG) center is a recent addition to NeuroSpin, a neuroimaging platform located 20 km south of Paris in the Centre d'Energie Atomique (CEA). The CEA is an international scientific center that offers state-of-the-art equipment and opportunities for career growth. Two groups, the Cognitive Neuroimaging Unit (INSERM U562) and theNanomagnetism group closely collaborate on different aspects of the MEG technique: the Cognitive Neuroimaging Unit, part of the Life Sciences department, investigates human cognition at large (including consciousness, language, mathematics and perception research); the Nanomagnetism group, part of the Physics department, investigates new sensors for novel biomedical imaging devices. Positions Statement RESEARCH & DEVELOPMENT ENGINEER: the ideal candidate is a technically oriented researcher who will insure the daily technical maintenance (hardware and software) of the MEG and electroencephalography (EEG) equipment. He/she will be encouraged to develop autonomy in doing so, and use his/her organizational skills to develop a set of control quality assessments for these systems. This part of the work will be done in close association with the electronics engineer. The position also involves interacting with an international team of researchers and clinical staff for the implementation of experimental work in both patients and healthy individuals. The research engineer will be encouraged to invest part of his/her time into research both at the technical (for instance, in developing innovative analysis techniques) and/or at a scientific level (e.g. cognitive neurosciences and/or clinical). The research engineer will mostly work with the Cognitive Neuroimaging Unit and interact closely with the electronics engineer. Required Skills § PhD education (physics, neurosciences, engineering …). § Mastering of fundamentals in MEG and EEG techniques § Good programming skills (e.g. Matlab, C ++, shell…) § English and French proficiency (opportunities to learn either available) § Mastering of signal processing and associated tools (e.g. EEGlab, Fieldtrip, MNE, SPM, NutMeg …) a plus! Type of Position This Ingénieur de Recherche (IR) is a category A position in the French public services. Selection is competitive and the start date is 01/01/2010. The deadline to download the application package is July 7th 2009. The deadline for submission of your application package is July 9th 2009. Application packages can be downloaded from the INSERM Human Resources website (www.rh.inserm.fr). Applicants selected by the search committee will be contacted personally for the open competition. Prior to application, interested applicants are encouraged to contact the search committee (emails listed at the end of this flyer). ELECTRONICS ENGINEER: the ideal candidate is an expert in electronics who will work at the interface of physics research and medical applications. He/she will be in charge of developing interfaces for analog/digital electronics associated with new low field magnetic sensors and necessary signal processing and computing tools. Specifically, the complex multiple sensor arrays being designed will require sophisticated interfacing, prototyping at various stages of the project and validation for diverse type of applications (including magnetocardiography, combined low field MRI and MEG, in adults and children). The chosen candidate will interface between the cognitive neuroimaging unit and the nanomagnetism group on a regular basis while working more closely with the nanomagnetism group. His/her autonomy and initiative taking will be encouraged. Required Skills § PhD education (physics, electronics, engineering …). § Expertise in electronics, general knowledge of mathematics and physics § English and French proficiency (opportunities to learn either available) Type de Position Fixed-term contract from 10/01/2009 to 12/31/2010. Salaries depend on the experience of the candidate and will be based on the INSERM rate (yearly gross income from 27 K€ with no experience to 32 K€). Application packages MUST be received by July 9th 2009. For further information on these two positions, please contact: Claude.Fermon AT cea.fr, Myriam.Pannetier AT cea.fr, Stanislas.Dehaene AT cea.fr, Virginie.van-Wassenhove AT cea.fr ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From ingrid.nieuwenhuis at DONDERS.RU.NL Fri May 29 14:31:44 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 29 May 2009 14:31:44 +0200 Subject: Source plot! In-Reply-To: Message-ID: Dear M.Muthuraman, You can find it in fieldtrip/templates/ Best ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Monday, May 25, 2009 4:54 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Source plot! Hello Fieldtrip Users, I have attached a orthoplot with this mail. This source plot i plotted with the method 'ortho', but i would like get the plot in the correct direction in all the 3 slices. As i looked in the tutorial documentation need to use the volumenormalisation to get it in the correct direction. Then the next question where i can get the template with MNI coordinates which is showed in the tutorial documentation. Thanking you With regards, M.Muthuraman. _____ MSN Battles We pitch one stalwart against the other and give you the power. Who will you vote for? Share photos while you chat with Windows Live Messenger. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From johnston at KIN.UCALGARY.CA Sat May 2 22:07:36 2009 From: johnston at KIN.UCALGARY.CA (Jamie Johnston) Date: Sat, 2 May 2009 14:07:36 -0600 Subject: Questions concerning permutation tests on coherence data Message-ID: Hi All - I have a couple questions. My data set consists of 10 subjects, each performed 5 trials under 3 different conditions. I am trying to follow Maris et al. 2007, computing the difference between the coherence measures (i.e. using indepsamplesZcoh)for each pair of conditions (i.e., 3 different comparisons) and running the permutation test (montecarlo) on this data. My questions are: 1) All the examples I have come across only compare two conditions...if, as in my data, we have 3 conditions and would like to test for differences between the three, can I simply run 3 tests comparing all the combinations? Is this statistically sound (sorry I am unfamiliar with nonparametric stats). 2) For 8 of my subjects I have 5 separate channels of data, unfortunately for two of my subjects, I have only 4 channels (and they are missing different channels). I would like to include them in the coherence averages (and statistical tests), but I'm not sure how to do this. Any help would be greatly appreciated. Jamie _______________ Jamie Johnston, Ph.D. Assistant Professor Faculty of Kinesiology University of Calgary 2500 University Dr. NW Calgary, AB T2N 1N4 Phone: +1 (403) 220-3649 Fax: +1 (403) 284-3553 email: johnston at kin.ucalgary.ca website: http://www.kin.ucalgary.ca/wcm/knes/johnston.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From johnston at KIN.UCALGARY.CA Sun May 3 20:00:19 2009 From: johnston at KIN.UCALGARY.CA (Jamie Johnston) Date: Sun, 3 May 2009 12:00:19 -0600 Subject: independsamplesZcoh Message-ID: Hi all - I am trying to run a monte carlo - indepsamplesZcoh - cluster on my data using freqstatistics. I input two data files into freqstatistics with the cohspctrm having dimensions 2 (subjects) x 10 (channels, # of coherence spectra) x 52 (frequencies). I run into a dimension mismatch in the function clusterstat. If I run any other statistic (i.e., indepsamplesT) it runs fine. When running the indepsamplesT, clusterstat receives two inputs: statobs (520x1) and statrnd (520x100). These dimensions make sense to me. However, when running indepsamplesZcoh these two variables have dimensions 2340x1 and 2340x100, respectively. This happens around lines 104-108 in indepsamplesZcoh.m with computation of the variables "chancmbsel" and "nnewsamples." I'm not understanding what these variables do, but my guess is that I need to setup my data files differently in the beginning. My understanding of what this analysis protocol does is compute the z-statistic on each channel of coherence data (10 for each data file) and then find the difference between the z-statistic for each channel across the data files. Once this is complete it runs the permutations to determine the significance. Please verify that what I have done is correct and any help with the error I am getting would be greatly appreciated. Thanks, Jamie _______________ Jamie Johnston, Ph.D. Assistant Professor Faculty of Kinesiology University of Calgary 2500 University Dr. NW Calgary, AB T2N 1N4 Phone: +1 (403) 220-3649 Fax: +1 (403) 284-3553 email: johnston at kin.ucalgary.ca website: http://www.kin.ucalgary.ca/wcm/knes/johnston.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.schoffelen at PSY.GLA.AC.UK Sun May 3 21:33:43 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Sun, 3 May 2009 20:33:43 +0100 Subject: independsamplesZcoh In-Reply-To: Message-ID: Dear Jamie, For me it is not exactly clear what you want to do. In an earlier message you referred to our paper using a permutation test to test for a significant difference in coherence between conditions (Maris et al 2007). Essentially, as described, this is a test which is performed within each subject allowing you to do statistical inference about the potential difference between two conditions. As such this is the type of test indepsamplesZcoh can perform, if properly used (see below). Yet, you describe using two subjects as an input. This to me sounds rather that you would like to do statistics across subjects (although 2 subjects of course is a rather low number). This is NOT something indepsamplesZcoh can do for you. In general it is possible to test for a significant difference between two conditions across a population of subjects, but this would require a different approach. Rather than shuffling single observations across conditions PRIOR TO COMPUTING THE COHERENCE DIFFERENCE (sorry about the capitals but this is essential for what is to follow below), one would swap the sign of the Z-transformed coherence difference for a random subset of subjects prior to averaging. It seems as if you computed coherence spectra between all unique pairs of channels (4x5)/2 and used this as an input to freqstatistics. Yet, for single subject statistics this does not make sense, because indepsamplesZcoh expects fourier-spectra in the input. Within the function Z-transformed coherence difference will be computed between all pairs of input channels (in your case this would be (9x10)/2 (even though the function does not know you provide it with the wrong input), and multiplying this number with 52 would give your 'magical' 2340). So, indeed you should either format your data in a different way using single subject fourier spectra in two conditions as an input to freqstatistics, or using a different statistical test to test for differences across subjects. Yours, Jan-Mathijs On May 3, 2009, at 7:00 PM, Jamie Johnston wrote: > Hi all – > > I am trying to run a monte carlo – indepsamplesZcoh – cluster on my > data using freqstatistics. I input two data files into > freqstatistics with the cohspctrm having dimensions 2 (subjects) x > 10 (channels, # of coherence spectra) x 52 (frequencies). I run > into a dimension mismatch in the function clusterstat. If I run > any other statistic (i.e., indepsamplesT) it runs fine. When > running the indepsamplesT, clusterstat receives two inputs: statobs > (520x1) and statrnd (520x100). These dimensions make sense to me. > However, when running indepsamplesZcohthese two variables have > dimensions 2340x1 and 2340x100, respectively. This happens around > lines 104-108 in indepsamplesZcoh.m with computation of the > variables “chancmbsel” and “nnewsamples.” I’m not understanding > what these variables do, but my guess is that I need to setup my > data files differently in the beginning. My understanding of what > this analysis protocol does is compute the z-statistic on each > channel of coherence data (10 for each data file) and then find the > difference between the z-statistic for each channel across the data > files. Once this is complete it runs the permutations to determine > the significance. > > Please verify that what I have done is correct and any help with > the error I am getting would be greatly appreciated. > > Thanks, > > Jamie > > _______________ > Jamie Johnston, Ph.D. > Assistant Professor > Faculty of Kinesiology > University of Calgary > 2500 University Dr. NW > Calgary, AB > T2N 1N4 > Phone: +1 (403) 220-3649 > Fax: +1 (403) 284-3553 > email: johnston at kin.ucalgary.ca > website: http://www.kin.ucalgary.ca/wcm/knes/johnston.html > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From johnston at KIN.UCALGARY.CA Sun May 3 22:12:32 2009 From: johnston at KIN.UCALGARY.CA (Jamie Johnston) Date: Sun, 3 May 2009 14:12:32 -0600 Subject: independsamplesZcoh In-Reply-To: A<1A0B0C5E-11ED-4EAF-A0E9-788E566A0414@psy.gla.ac.uk> Message-ID: Thanks for your response. Let me clarify....I have 8 subjects (with 5 channels of data, 2 with 4 channels which I'm not using at this point)...I used only 2 subjects to test the code (for faster debugging). I do want to do a within subject statistical test between my conditions (of which I have 3, but I am only inputting 2 into freqstatistics as I was unclear whether I could run comparisons across 3 conditions). As you correctly point out, I did compute coherence across my 5 channels first, resulting in 10 spectra...this is what I inputted into freqstatistics, which is clearly incorrect. This is what I thought, however I didn't know exactly what the data input should look like. So, just to clarify, I'm running freqanalysis - inputting raw data, returning "powandcsd' freqdescriptives - inputting data from freqanalysis, returning 'coh' freqgrandaverage (keep individual 'yes') - inputting data from freqdescriptives, returning a grandaverage freqstatistics - inputting two grandaverages (for 2 conditions), using the following parameters: %Compute Permutation Test cfg = []; cfg.parameter = 'cohspctrm'; cfg.method = 'montecarlo'; cfg.frequency = [0 50]; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 100; cfg.computestat = 'yes'; subj = length(Subjects); design=zeros(2,2*subj); for i = 1:subj design(1,i) = i; end for i = 1:subj design(1,subj+i) = i; end design(2,1:subj) = 1; design(2,subj+1:2*subj) = 2; cfg.design = design; cfg.uvar = 1; cfg.ivar = 2; [stat] = freqstatistics(cfg, grandavg{1}, grandavg{2}); Are you saying, I should use the output from freqanalysis (skipping freqdescriptives) as input to freqgrandaverage? Also, should my "cfg.parameter" for the freqstatistics function still be 'cohspctrm' or 'powspctrm'? Thanks again, Jamie From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of jan-mathijs schoffelen Sent: May 3, 2009 1:34 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] independsamplesZcoh Dear Jamie, For me it is not exactly clear what you want to do. In an earlier message you referred to our paper using a permutation test to test for a significant difference in coherence between conditions (Maris et al 2007). Essentially, as described, this is a test which is performed within each subject allowing you to do statistical inference about the potential difference between two conditions. As such this is the type of test indepsamplesZcoh can perform, if properly used (see below). Yet, you describe using two subjects as an input. This to me sounds rather that you would like to do statistics across subjects (although 2 subjects of course is a rather low number). This is NOT something indepsamplesZcoh can do for you. In general it is possible to test for a significant difference between two conditions across a population of subjects, but this would require a different approach. Rather than shuffling single observations across conditions PRIOR TO COMPUTING THE COHERENCE DIFFERENCE (sorry about the capitals but this is essential for what is to follow below), one would swap the sign of the Z-transformed coherence difference for a random subset of subjects prior to averaging. It seems as if you computed coherence spectra between all unique pairs of channels (4x5)/2 and used this as an input to freqstatistics. Yet, for single subject statistics this does not make sense, because indepsamplesZcoh expects fourier-spectra in the input. Within the function Z-transformed coherence difference will be computed between all pairs of input channels (in your case this would be (9x10)/2 (even though the function does not know you provide it with the wrong input), and multiplying this number with 52 would give your 'magical' 2340). So, indeed you should either format your data in a different way using single subject fourier spectra in two conditions as an input to freqstatistics, or using a different statistical test to test for differences across subjects. Yours, Jan-Mathijs On May 3, 2009, at 7:00 PM, Jamie Johnston wrote: Hi all - I am trying to run a monte carlo - indepsamplesZcoh - cluster on my data using freqstatistics. I input two data files into freqstatistics with the cohspctrm having dimensions 2 (subjects) x 10 (channels, # of coherence spectra) x 52 (frequencies). I run into a dimension mismatch in the function clusterstat. If I run any other statistic (i.e., indepsamplesT) it runs fine. When running the indepsamplesT, clusterstat receives two inputs: statobs (520x1) and statrnd (520x100). These dimensions make sense to me. However, when running indepsamplesZcohthese two variables have dimensions 2340x1 and 2340x100, respectively. This happens around lines 104-108 in indepsamplesZcoh.m with computation of the variables "chancmbsel" and "nnewsamples." I'm not understanding what these variables do, but my guess is that I need to setup my data files differently in the beginning. My understanding of what this analysis protocol does is compute the z-statistic on each channel of coherence data (10 for each data file) and then find the difference between the z-statistic for each channel across the data files. Once this is complete it runs the permutations to determine the significance. Please verify that what I have done is correct and any help with the error I am getting would be greatly appreciated. Thanks, Jamie _______________ Jamie Johnston, Ph.D. Assistant Professor Faculty of Kinesiology University of Calgary 2500 University Dr. NW Calgary, AB T2N 1N4 Phone: +1 (403) 220-3649 Fax: +1 (403) 284-3553 email: johnston at kin.ucalgary.ca website: http://www.kin.ucalgary.ca/wcm/knes/johnston.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From manish.saggar at GMAIL.COM Tue May 5 01:10:11 2009 From: manish.saggar at GMAIL.COM (Manish Saggar) Date: Mon, 4 May 2009 18:10:11 -0500 Subject: Independence of trials in non-parametric testing Message-ID: All, I have a question regarding independence of trials in non-parametric testing. The experimental design that I have is as follows, there are three conditions C1, C2 and C3. Each condition is of 1 min duration (e.g. rest with eyes open for 1 min). Now I am planing on dividing each condition into sixty 1sec fake trials and then compare Time-Freq representation of C2-C1 and C3-C1 etc. for significance. But I am not sure whether this style is statistically correct, since the trials are fake and I am not sure if I can call them independent of each other. I can theoretically count them uncorrelated (?) if I separate these fake trials by say 300msec or something. Just want to make sure I am going in right direction. Please let me know. Regards, Manish ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From e.maris at DONDERS.RU.NL Tue May 5 13:43:40 2009 From: e.maris at DONDERS.RU.NL (Eric Maris) Date: Tue, 5 May 2009 13:43:40 +0200 Subject: Independence of trials in non-parametric testing In-Reply-To: Message-ID: Hi Manish, > I have a question regarding independence of trials in non-parametric > testing. > > The experimental design that I have is as follows, there are three > conditions C1, C2 and C3. Each condition is of 1 min duration (e.g. > rest with eyes open for 1 min). > > Now I am planing on dividing each condition into sixty 1sec fake > trials and then compare Time-Freq representation of C2-C1 and C3-C1 > etc. for significance. > But I am not sure whether this style is statistically correct, since > the trials are fake and I am not sure if I can call them independent > of each other. I can theoretically count them uncorrelated (?) if I > separate these fake trials by say 300msec or something. > > Just want to make sure I am going in right direction. Please let me > know. Your intuition is correct. However, time-freq representations do not make sense here. You will have to go for freq representations (i.e., averaging spectral energy over time). Proving that the fake trials are uncorrelated will not be possible. You will have settle for plausibility. However, the same holds to some extent for an experiment with real trials. So, chopping long trials in pieces is in principle OK from the perspective of permutation inference. Good luck, dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 F:+31 24 3616066 E: e.maris at donders.ru.nl MSc Cognitive Neuroscience: www.ru.nl/master/cns/ > > Regards, > Manish > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Tue May 5 17:41:33 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 5 May 2009 17:41:33 +0200 Subject: MNE Matlab toolbox version 2.6.1 Message-ID: Dear neuromag users Please note the announcement below. The Neuromag MNE matlab tools have been improved, resulting in much faster reading. Probably that will be of interest to you. Please download MNE and put the matlab files in fieldtrip/external/mne, so that fieldtrip can find the low-level reading functions. best regards, Robert Begin forwarded message: > From: Matti Hamalainen > Date: 28 April 2009 13:06:59 GMT+02:00 > To: mne_analysis at nmr.mgh.harvard.edu > Subject: [Mne_analysis] MNE Matlab toolbox version 2.6.1 > > > Hello all, > > Thanks to François Tadel from USC and John Mosher from Cleveland > Clinic, one major and a few minor bottlenecks were identified in the > MNE Matlab Toolbox. I modified the code on the basis of their > findings and, as a result, the fif file I/O is now much faster. I > packaged the improved version as MNE Matlab 2.6.1 and this new > version is now available on the download web site. > > This new package is highly recommended for those of you who use the > MNE Matlab tools. > > The Martinos Center public MNE installation has been updated. > > Other users need to: > > 1. Download MNE-dist-matlab-2.6.1-090428065405.tar.gz from the MNE > download web site. > > 2. Goto the directory *containing* $MNE_ROOT, i.e., $MNE_ROOT/.. > > 3. Say > > tar zxvf /MNE-dist- > matlab-2.6.1-090428065405.tar.gz > > is the path to the directory where you > downloaded the software. > > Best, > Matti > > > --------- > > Matti Hamalainen, Ph.D. > Athinoula A. Martinos Center for Biomedical Imaging > Massachusetts General Hospital > > msh at nmr.mgh.harvard.edu > > > > > > > _______________________________________________ > Mne_analysis mailing list > Mne_analysis at nmr.mgh.harvard.edu > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Tue May 5 17:45:55 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 5 May 2009 17:45:55 +0200 Subject: color bar In-Reply-To: Message-ID: Hi Jim I suspect the problem to be due to the rendering of Matlab. Occasionally (esp when working on a remote linux maxhine through a VNC connection) I also have problematic figures. Please look at >> help opengl It explains how you can change the renderer. Some fieldtrip plotting functions have this as a configurable option, including singleplotTFR and multiplotTFR. You can specify cfg.renderer= 'painters', 'zbuffer' or 'opengl'. Please try zbuffer. best regards, Robert On 30 Apr 2009, at 21:21, Jim Li wrote: > Dear FTer: > > I wonder if anybody can tell me how to get the full color bar when > plotting > w/ "singleplotTFR" or "multiplotTFR". > > I ran the following commands: > -------- > figure > cfg = []; > cfg.layout = '4D248.lay'; > cfg.ylim = [5 30] > cfg.interactive = 'yes'; > cfg.showlabels = 'yes'; > cfg.colorbar = 'yes'; cfg.channel='A2' > singleplotTFR(cfg,TF) > ----------- > > > But what I get on the right side of the figure is a colorbar w/ only > half of the > color (usually the cold colors like blue or green), and the numbers > on the right > side of the colorbar seem to be wrongly placed (see attachment). How > can I > get all the colors (both hot and cold) displayed in the colorbar? > > FYI, I controled the values of TF.powspctrm so that, for the channel > displayed > (A2), all values before time 0 is 3e-25, and all values after time 0 > is 1e-25. > But the color bar is telling me that the blue should be 2e-25, which > is totally > wrong! It's as if something happened that moved the whole colorbar > up by half > of the data range, then cut off the top of it (i.e. the hot colors). > > In fact, I think Fig 3 of the online tutorial > (http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis) > probably suffered > from the same problem. > > > Thanks, > > Jim > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Wed May 6 17:04:24 2009 From: megjim1 at GMAIL.COM (Jim Li) Date: Wed, 6 May 2009 17:04:24 +0200 Subject: color bar Message-ID: Yes, Robert, Changing to "cfg.renderer= 'zbuffer'; " did make the whole colorbar show up correctly. Although I also got a bunch of blue for the low frequency part of the wavelet singleplotTFR, which used to be just white area since there's no data calculated for those time-frequency bins due to wavelet's boundary effect. But that's fine. Thank you very much, :) Jim FYI, I'm using a 64bit WinXP. I saw the problem that you helped me solved by either working directly before the PC or Remote-Desktop to it. On Tue, 5 May 2009 17:45:55 +0200, Robert Oostenveld wrote: >Hi Jim > >I suspect the problem to be due to the rendering of Matlab. >Occasionally (esp when working on a remote linux maxhine through a VNC >connection) I also have problematic figures. > >Please look at > >> help opengl >It explains how you can change the renderer. > >Some fieldtrip plotting functions have this as a configurable option, >including singleplotTFR and multiplotTFR. You can specify >cfg.renderer= 'painters', 'zbuffer' or 'opengl'. Please try zbuffer. > >best regards, >Robert > > >On 30 Apr 2009, at 21:21, Jim Li wrote: > >> Dear FTer: >> >> I wonder if anybody can tell me how to get the full color bar when >> plotting >> w/ "singleplotTFR" or "multiplotTFR". >> >> I ran the following commands: >> -------- >> figure >> cfg = []; >> cfg.layout = '4D248.lay'; >> cfg.ylim = [5 30] >> cfg.interactive = 'yes'; >> cfg.showlabels = 'yes'; >> cfg.colorbar = 'yes'; cfg.channel='A2' >> singleplotTFR(cfg,TF) >> ----------- >> >> >> But what I get on the right side of the figure is a colorbar w/ only >> half of the >> color (usually the cold colors like blue or green), and the numbers >> on the right >> side of the colorbar seem to be wrongly placed (see attachment). How >> can I >> get all the colors (both hot and cold) displayed in the colorbar? >> >> FYI, I controled the values of TF.powspctrm so that, for the channel >> displayed >> (A2), all values before time 0 is 3e-25, and all values after time 0 >> is 1e-25. >> But the color bar is telling me that the blue should be 2e-25, which >> is totally >> wrong! It's as if something happened that moved the whole colorbar >> up by half >> of the data range, then cut off the top of it (i.e. the hot colors). >> >> In fact, I think Fig 3 of the online tutorial >> (http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis) >> probably suffered >> from the same problem. >> >> >> Thanks, >> >> Jim >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and http://www.ru.nl/neuroimaging/fieldtrip. >> > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From ingrid.nieuwenhuis at DONDERS.RU.NL Wed May 6 17:15:37 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 6 May 2009 17:15:37 +0200 Subject: color bar In-Reply-To: Message-ID: Hi Jim, The reason that you see the blue for the low freq part where there's no data is because NaNs are plotted with the lowest color of the scale by Matlab. Earlier the NaN's where masked out automatically, but with the "cfg.renderer= 'zbuffer'; " opacity masking is not supported. So I'm afraid there is no way to both get the colorbar right and the NaN's masked out. But you could of course make two plots and combine in Photoshop ;) Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Jim Li > Sent: Wednesday, May 06, 2009 5:04 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] color bar > > Yes, Robert, > > Changing to "cfg.renderer= 'zbuffer'; " did make the whole colorbar show > up > correctly. Although I also got a bunch of blue for the low frequency part > of > the wavelet singleplotTFR, which used to be just white area since there's > no > data calculated for those time-frequency bins due to wavelet's boundary > effect. But that's fine. > > Thank you very much, :) > > Jim > > > FYI, I'm using a 64bit WinXP. I saw the problem that you helped me solved > by > either working directly before the PC or Remote-Desktop to it. > > > > On Tue, 5 May 2009 17:45:55 +0200, Robert Oostenveld > wrote: > > >Hi Jim > > > >I suspect the problem to be due to the rendering of Matlab. > >Occasionally (esp when working on a remote linux maxhine through a VNC > >connection) I also have problematic figures. > > > >Please look at > > >> help opengl > >It explains how you can change the renderer. > > > >Some fieldtrip plotting functions have this as a configurable option, > >including singleplotTFR and multiplotTFR. You can specify > >cfg.renderer= 'painters', 'zbuffer' or 'opengl'. Please try zbuffer. > > > >best regards, > >Robert > > > > > >On 30 Apr 2009, at 21:21, Jim Li wrote: > > > >> Dear FTer: > >> > >> I wonder if anybody can tell me how to get the full color bar when > >> plotting > >> w/ "singleplotTFR" or "multiplotTFR". > >> > >> I ran the following commands: > >> -------- > >> figure > >> cfg = []; > >> cfg.layout = '4D248.lay'; > >> cfg.ylim = [5 30] > >> cfg.interactive = 'yes'; > >> cfg.showlabels = 'yes'; > >> cfg.colorbar = 'yes'; cfg.channel='A2' > >> singleplotTFR(cfg,TF) > >> ----------- > >> > >> > >> But what I get on the right side of the figure is a colorbar w/ only > >> half of the > >> color (usually the cold colors like blue or green), and the numbers > >> on the right > >> side of the colorbar seem to be wrongly placed (see attachment). How > >> can I > >> get all the colors (both hot and cold) displayed in the colorbar? > >> > >> FYI, I controled the values of TF.powspctrm so that, for the channel > >> displayed > >> (A2), all values before time 0 is 3e-25, and all values after time 0 > >> is 1e-25. > >> But the color bar is telling me that the blue should be 2e-25, which > >> is totally > >> wrong! It's as if something happened that moved the whole colorbar > >> up by half > >> of the data range, then cut off the top of it (i.e. the hot colors). > >> > >> In fact, I think Fig 3 of the online tutorial > >> (http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis) > >> probably suffered > >> from the same problem. > >> > >> > >> Thanks, > >> > >> Jim > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > >> of the FieldTrip toolbox, to share experiences and to discuss new > >> ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html > >> and http://www.ru.nl/neuroimaging/fieldtrip. > >> > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and > EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Wed May 6 17:37:17 2009 From: megjim1 at GMAIL.COM (Jim Li) Date: Wed, 6 May 2009 17:37:17 +0200 Subject: color bar Message-ID: Hi Ingrid, That's a nice suggestion. Thanks a lot for your help, :) Jim On Wed, 6 May 2009 17:15:37 +0200, Ingrid Nieuwenhuis wrote: >Hi Jim, > >The reason that you see the blue for the low freq part where there's no data >is because NaNs are plotted with the lowest color of the scale by Matlab. >Earlier the NaN's where masked out automatically, but with the >"cfg.renderer= 'zbuffer'; " opacity masking is not supported. So I'm afraid >there is no way to both get the colorbar right and the NaN's masked out. But >you could of course make two plots and combine in Photoshop ;) > >Best Ingrid > >> -----Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >> Behalf Of Jim Li >> Sent: Wednesday, May 06, 2009 5:04 PM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] color bar >> >> Yes, Robert, >> >> Changing to "cfg.renderer= 'zbuffer'; " did make the whole colorbar show >> up >> correctly. Although I also got a bunch of blue for the low frequency part >> of >> the wavelet singleplotTFR, which used to be just white area since there's >> no >> data calculated for those time-frequency bins due to wavelet's boundary >> effect. But that's fine. >> >> Thank you very much, :) >> >> Jim >> >> >> FYI, I'm using a 64bit WinXP. I saw the problem that you helped me solved >> by >> either working directly before the PC or Remote-Desktop to it. >> >> >> >> On Tue, 5 May 2009 17:45:55 +0200, Robert Oostenveld >> wrote: >> >> >Hi Jim >> > >> >I suspect the problem to be due to the rendering of Matlab. >> >Occasionally (esp when working on a remote linux maxhine through a VNC >> >connection) I also have problematic figures. >> > >> >Please look at >> > >> help opengl >> >It explains how you can change the renderer. >> > >> >Some fieldtrip plotting functions have this as a configurable option, >> >including singleplotTFR and multiplotTFR. You can specify >> >cfg.renderer= 'painters', 'zbuffer' or 'opengl'. Please try zbuffer. >> > >> >best regards, >> >Robert >> > >> > >> >On 30 Apr 2009, at 21:21, Jim Li wrote: >> > >> >> Dear FTer: >> >> >> >> I wonder if anybody can tell me how to get the full color bar when >> >> plotting >> >> w/ "singleplotTFR" or "multiplotTFR". >> >> >> >> I ran the following commands: >> >> -------- >> >> figure >> >> cfg = []; >> >> cfg.layout = '4D248.lay'; >> >> cfg.ylim = [5 30] >> >> cfg.interactive = 'yes'; >> >> cfg.showlabels = 'yes'; >> >> cfg.colorbar = 'yes'; cfg.channel='A2' >> >> singleplotTFR(cfg,TF) >> >> ----------- >> >> >> >> >> >> But what I get on the right side of the figure is a colorbar w/ only >> >> half of the >> >> color (usually the cold colors like blue or green), and the numbers >> >> on the right >> >> side of the colorbar seem to be wrongly placed (see attachment). How >> >> can I >> >> get all the colors (both hot and cold) displayed in the colorbar? >> >> >> >> FYI, I controled the values of TF.powspctrm so that, for the channel >> >> displayed >> >> (A2), all values before time 0 is 3e-25, and all values after time 0 >> >> is 1e-25. >> >> But the color bar is telling me that the blue should be 2e-25, which >> >> is totally >> >> wrong! It's as if something happened that moved the whole colorbar >> >> up by half >> >> of the data range, then cut off the top of it (i.e. the hot colors). >> >> >> >> In fact, I think Fig 3 of the online tutorial >> >> (http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis) >> >> probably suffered >> >> from the same problem. >> >> >> >> >> >> Thanks, >> >> >> >> Jim >> >> >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> >> of the FieldTrip toolbox, to share experiences and to discuss new >> >> ideas for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> and http://www.ru.nl/neuroimaging/fieldtrip. >> >> >> > >> >---------------------------------- >> >The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and >> EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html >> and >> http://www.ru.nl/neuroimaging/fieldtrip. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From johnston at KIN.UCALGARY.CA Wed May 6 20:51:03 2009 From: johnston at KIN.UCALGARY.CA (Jamie Johnston) Date: Wed, 6 May 2009 12:51:03 -0600 Subject: independsamplesZcoh Message-ID: I have fixed the issues in my posting below and seem to be getting closer to having my code run. However, I still run into a dimension mismatch in clusterstat...I'm trying to understand the following code, where I think this mismatch occurs. % determine whether the input represents N-D volumetric data or channel-freq-time data and provide the appropriate details % TODO this detection should be more robust if isfield(cfg, 'neighbours') && ~isempty(cfg.neighbours) channeighbstructmat = makechanneighbstructmat(cfg); issource = 0; else issource = 1; % cfg contains dim and inside that are needed for reshaping the data to a volume, and inside should behave as a index vector cfg = fixinside(cfg, 'index'); end The dimension of the data (statobs) that is passed to clusterstat is 520 X 1 (10 channels of coherence differences x 52 frequencies concatenated; note: this use to be 5 channels of powspctrm) which makes sense. I am trying to cluster by frequency (not channel)...the output of "fixinside" function returns cfg.index of dimension (1 X 260), causing a dimension mismatch at line 188 in clusterstat. The reason this happens, I think, is in line 37 of fixinside where elseif isfield(source, 'dim') source.inside = 1:prod(source.dim); source.outside = []; end for some reason source.dim still has the dimension 5 X 52 X 1, ie, the dimensions prior to computing the coherence differences. I'm not sure whether/where I should change the cfg.dim, which I assume should reflect the dimensions of the newly computed data matrix. Thanks, Jamie ________________________________ From: FieldTrip discussion list on behalf of Jamie Johnston Sent: Sun 5/3/2009 2:12 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] independsamplesZcoh Thanks for your response. Let me clarify....I have 8 subjects (with 5 channels of data, 2 with 4 channels which I'm not using at this point)...I used only 2 subjects to test the code (for faster debugging). I do want to do a within subject statistical test between my conditions (of which I have 3, but I am only inputting 2 into freqstatistics as I was unclear whether I could run comparisons across 3 conditions). As you correctly point out, I did compute coherence across my 5 channels first, resulting in 10 spectra...this is what I inputted into freqstatistics, which is clearly incorrect. This is what I thought, however I didn't know exactly what the data input should look like. So, just to clarify, I'm running freqanalysis - inputting raw data, returning "powandcsd' freqdescriptives - inputting data from freqanalysis, returning 'coh' freqgrandaverage (keep individual 'yes') - inputting data from freqdescriptives, returning a grandaverage freqstatistics - inputting two grandaverages (for 2 conditions), using the following parameters: %Compute Permutation Test cfg = []; cfg.parameter = 'cohspctrm'; cfg.method = 'montecarlo'; cfg.frequency = [0 50]; cfg.statistic = 'indepsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 100; cfg.computestat = 'yes'; subj = length(Subjects); design=zeros(2,2*subj); for i = 1:subj design(1,i) = i; end for i = 1:subj design(1,subj+i) = i; end design(2,1:subj) = 1; design(2,subj+1:2*subj) = 2; cfg.design = design; cfg.uvar = 1; cfg.ivar = 2; [stat] = freqstatistics(cfg, grandavg{1}, grandavg{2}); Are you saying, I should use the output from freqanalysis (skipping freqdescriptives) as input to freqgrandaverage? Also, should my "cfg.parameter" for the freqstatistics function still be 'cohspctrm' or 'powspctrm'? Thanks again, Jamie From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of jan-mathijs schoffelen Sent: May 3, 2009 1:34 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] independsamplesZcoh Dear Jamie, For me it is not exactly clear what you want to do. In an earlier message you referred to our paper using a permutation test to test for a significant difference in coherence between conditions (Maris et al 2007). Essentially, as described, this is a test which is performed within each subject allowing you to do statistical inference about the potential difference between two conditions. As such this is the type of test indepsamplesZcoh can perform, if properly used (see below). Yet, you describe using two subjects as an input. This to me sounds rather that you would like to do statistics across subjects (although 2 subjects of course is a rather low number). This is NOT something indepsamplesZcoh can do for you. In general it is possible to test for a significant difference between two conditions across a population of subjects, but this would require a different approach. Rather than shuffling single observations across conditions PRIOR TO COMPUTING THE COHERENCE DIFFERENCE (sorry about the capitals but this is essential for what is to follow below), one would swap the sign of the Z-transformed coherence difference for a random subset of subjects prior to averaging. It seems as if you computed coherence spectra between all unique pairs of channels (4x5)/2 and used this as an input to freqstatistics. Yet, for single subject statistics this does not make sense, because indepsamplesZcoh expects fourier-spectra in the input. Within the function Z-transformed coherence difference will be computed between all pairs of input channels (in your case this would be (9x10)/2 (even though the function does not know you provide it with the wrong input), and multiplying this number with 52 would give your 'magical' 2340). So, indeed you should either format your data in a different way using single subject fourier spectra in two conditions as an input to freqstatistics, or using a different statistical test to test for differences across subjects. Yours, Jan-Mathijs On May 3, 2009, at 7:00 PM, Jamie Johnston wrote: Hi all - I am trying to run a monte carlo - indepsamplesZcoh - cluster on my data using freqstatistics. I input two data files into freqstatistics with the cohspctrm having dimensions 2 (subjects) x 10 (channels, # of coherence spectra) x 52 (frequencies). I run into a dimension mismatch in the function clusterstat. If I run any other statistic (i.e., indepsamplesT) it runs fine. When running the indepsamplesT, clusterstat receives two inputs: statobs (520x1) and statrnd (520x100). These dimensions make sense to me. However, when running indepsamplesZcohthese two variables have dimensions 2340x1 and 2340x100, respectively. This happens around lines 104-108 in indepsamplesZcoh.m with computation of the variables "chancmbsel" and "nnewsamples." I'm not understanding what these variables do, but my guess is that I need to setup my data files differently in the beginning. My understanding of what this analysis protocol does is compute the z-statistic on each channel of coherence data (10 for each data file) and then find the difference between the z-statistic for each channel across the data files. Once this is complete it runs the permutations to determine the significance. Please verify that what I have done is correct and any help with the error I am getting would be greatly appreciated. Thanks, Jamie _______________ Jamie Johnston, Ph.D. Assistant Professor Faculty of Kinesiology University of Calgary 2500 University Dr. NW Calgary, AB T2N 1N4 Phone: +1 (403) 220-3649 Fax: +1 (403) 284-3553 email: johnston at kin.ucalgary.ca website: http://www.kin.ucalgary.ca/wcm/knes/johnston.html ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Thu May 7 02:08:47 2009 From: megjim1 at GMAIL.COM (Jim Li) Date: Thu, 7 May 2009 02:08:47 +0200 Subject: preparing leadfield for Phantom Message-ID: Dear FTer: I'm trying to test a localization algorithm with some epoch data collected on our phantom. Can anyone suggest a way to prepare the lead field using the single shell modeling? I'm using 4D's system right now. While playing with "prepare_singleshell" and "prepare_leadfield", I encountered two questions: 1) How can I get my headshape points in head coordinate system? I can run -------- hdr = read_fcdc_header(FileName); cfg.headshape = hdr.grad.pnt; [vol] = prepare_singleshell(cfg); ------- but that doesn't seem to give me headshape points in head coordinate system and it'll crash "prepare_leadfield" later on. 2) Do I need to define "cfg.vol.r = 7.5; cfg.vol.o = [0,0,0];" before running "prepare_leadfield"? If not, I'll get weird stuff like "1 dipoles inside, 26 dipoles outside brain". I'd appreciate it if anyone can show me your complete script of preparing lead field from beginning to end. Cheers, Jim ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From megjim1 at GMAIL.COM Fri May 8 01:43:51 2009 From: megjim1 at GMAIL.COM (Jim Li) Date: Fri, 8 May 2009 01:43:51 +0200 Subject: preparing leadfield for Phantom Message-ID: Hi all, Actually I just observed something: "hdr.grad.pnt" doesn't contain the coordinates of digitization points, but instead seems to be sensor coil-related. My question regarding how to prepare the lead field using the single shell modeling still remains. Any suggestion will be greatly appreciated! Thanks, Jim On Thu, 7 May 2009 02:08:47 +0200, Jim Li wrote: >Dear FTer: > >I'm trying to test a localization algorithm with some epoch data collected on >our phantom. Can anyone suggest a way to prepare the lead field using the >single shell modeling? I'm using 4D's system right now. > >While playing with "prepare_singleshell" and "prepare_leadfield", I encountered >two questions: > >1) How can I get my headshape points in head coordinate system? > >I can run >-------- >hdr = read_fcdc_header(FileName); >cfg.headshape = hdr.grad.pnt; >[vol] = prepare_singleshell(cfg); >------- >but that doesn't seem to give me headshape points in head coordinate system >and it'll crash "prepare_leadfield" later on. > >2) Do I need to define "cfg.vol.r = 7.5; cfg.vol.o = [0,0,0];" before >running "prepare_leadfield"? If not, I'll get weird stuff like "1 dipoles inside, 26 >dipoles outside brain". > >I'd appreciate it if anyone can show me your complete script of preparing lead >field from beginning to end. > >Cheers, > >Jim > >---------------------------------- >The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From v.litvak at ION.UCL.AC.UK Fri May 8 07:37:20 2009 From: v.litvak at ION.UCL.AC.UK (Vladimir Litvak) Date: Fri, 8 May 2009 06:37:20 +0100 Subject: preparing leadfield for Phantom In-Reply-To: Message-ID: Dear Jim, The example scripts: http://fieldtrip.fcdonders.nl/example/make_leadfields_using_different_headmodels and http://fieldtrip.fcdonders.nl/example/shift_electrode_positions_into_the_same_coordinate_system_as_the_corresponding_mri_for_using_individual_headmodels contain some ideas that you can use to do what you want. However, the trickiest part is coregistration. In the CTF system this problem is solved by the CTF software. Also for an expert it is easy to do with just a few lines of code. This is why there is no easy-to-use generic solution for it in Fieldtrip as far as I know. I would recommend you looking at SPM8 (http://www.fil.ion.ucl.ac.uk/spm/software/spm8/) which is another free Matlab toolbox. In SPM8 you can go through all the steps for leadfield computation using GUI (see the manual, imaging source reconstruction chapter). It support BTi data and is tightly integrated with Fieldtrip so you can later get the coregistered vol and grad from SPM and use them in your Fieldtrip script. See: https://www.jiscmail.ac.uk/cgi-bin/wa.exe?A2=ind0905&L=SPM&P=R8906 Also SPM saves leadfields for its 'canonical cortical mesh' in a mat-file and you can just use those. Best, Vladimir On Fri, May 8, 2009 at 12:43 AM, Jim Li wrote: > Hi all, > > Actually I just observed something: "hdr.grad.pnt" doesn't contain the > coordinates of digitization points, but instead seems to be sensor coil-related. > > My question regarding how to prepare the lead field using the > single shell modeling still remains. Any suggestion will be greatly appreciated! > > Thanks, > > Jim > > On Thu, 7 May 2009 02:08:47 +0200, Jim Li wrote: > >>Dear FTer: >> >>I'm trying to test a localization algorithm with some epoch data collected on >>our phantom. Can anyone suggest a way to prepare the lead field using the >>single shell modeling? I'm using 4D's system right now. >> >>While playing with "prepare_singleshell" and  "prepare_leadfield", I > encountered >>two questions: >> >>1) How can I get my headshape points in head coordinate system? >> >>I can run >>-------- >>hdr = read_fcdc_header(FileName); >>cfg.headshape = hdr.grad.pnt; >>[vol] = prepare_singleshell(cfg); >>------- >>but that doesn't seem to give me headshape points in head coordinate > system >>and it'll crash "prepare_leadfield" later on. >> >>2) Do I need to define "cfg.vol.r = 7.5; cfg.vol.o = [0,0,0];" before >>running "prepare_leadfield"? If not, I'll get weird stuff like "1 dipoles inside, 26 >>dipoles outside brain". >> >>I'd appreciate it if anyone can show me your complete script of preparing > lead >>field from beginning to end. >> >>Cheers, >> >>Jim >> >>---------------------------------- >>The aim of this list is to facilitate the discussion between users of the > FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and > EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From akiko at NYU.EDU Fri May 8 20:17:06 2009 From: akiko at NYU.EDU (Akiko Ikkai) Date: Fri, 8 May 2009 14:17:06 -0400 Subject: .sqd to FieldTrip steps Message-ID: Hello, I just started learning to do MEG experiments, and am very new to FieldTrip. I have a simple continuous recording (120s, 1000Hz) of MEG to test noise level, therefore no event type. My goal with this data is to look at frequency power distribution to check for any irregular spikes. We collect data in .sqd format. It appears that sqd format is not supported, so I simply renamed the data to .raw, which I could read into matLab using "read_fcdc_header" and "read_fcdc_data" (returns 192 x120000 matrix). However, since my data has no events, I'm not sure what inputs need to be fed into "definetrial". When I tried cfg = []; cfg.dataset = 'Out.raw'; cfg = definetrial(cfg); I got this message ??? Error using ==> definetrial at 151 no trialfunction specified, see DEFINETRIAL for help If you could give me some advise about how I should proceed (e.g. what parameters I need to have, and how I could create/retrieve them), it'll be very helpful. Also, if there are any specific notes about "using sqd and FieldTrip", please let me know as well. Thanks in advance! Akiko Ikkai ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From charles.cook at ULETH.CA Fri May 8 21:40:44 2009 From: charles.cook at ULETH.CA (Charles Cook) Date: Fri, 8 May 2009 21:40:44 +0200 Subject: electrode load and clusterrandanalysis Message-ID: Hi all, I'm having some trouble running the clusterrandanalysis on my time-frequency data collected using BESA. I've been trying to follow the example script ('Apply clusterrandanalysis on TFRs of power that were computed with BESA'), but am still coming up short. Specifically, I'm a little confused about loading electrodes % load a set of electrodes (these are on a unit sphere) % note, this will be different for your own data load('elec128.mat'); % scale the electrodes to a realistic head size (in cm) elec.pnt = 10*elec.pnt; Any suggestions would be much appreciated. Cheers, Charles Cook Canadian Centre for Behavioural Neuroscience University of Lethbridge ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From ole.jensen at DONDERS.RU.NL Sun May 10 22:26:29 2009 From: ole.jensen at DONDERS.RU.NL (Ole Jensen) Date: Sun, 10 May 2009 22:26:29 +0200 Subject: HBM lunch for MEG researcher at HBM/June 19 Message-ID: Dear MEG researcher, We would like to invite you to a lunch meeting Friday June 19, 12:30 at HBM2009/San Francisco. We hope to explore ways to strengthen the MEG community. We find it particularly important given that the increase of MEG groups warrants more initiatives for improving the communication between groups. Points to discuss: - Practical initiatives for strengthening communication between MEG groups * mailing lists/websites * satellite meetings in connection with conferences (e.g. HBM, FENS,...) - Improve education on MEG analysis (summer schools, boot camps, student exchanges,..) - How to promote a stronger presence in high impact journals and international meetings? The room will be posted later. Best regards, Ole Jensen, Joachim Gross and Srikantan Nagarajan P.S. Please bring your own lunch P.P.S. Please forward this message to other MEG researchers (we do not have a complete list). -- Ole Jensen Principal Investigator Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at donders.ru.nl URL : http://ojensen.ruhosting.nl/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From manish.saggar at GMAIL.COM Tue May 12 10:16:39 2009 From: manish.saggar at GMAIL.COM (Manish Saggar) Date: Tue, 12 May 2009 03:16:39 -0500 Subject: Clusterplot not highlighting clusters & average layout file Message-ID: All, I have a question regarding clusterplot function. I am doing a within-subject analysis. The experimental design that I have is as follows, there are three conditions C1, C2 and C3. Each condition is of 1 min duration (e.g. rest with eyes open for 1 min). Now I am comparing grandaverage of freq representation of a set of subjects for C2 with C1 etc. FreqStatistics is running just fine creating significant (<0.025 alpha, for 2-tailed test) clusters (positive). Now the problem is that when I try to plot the location of this cluster using clusterplot it doesn't show any highlighted channels. Any ideas why that is happening? Another question is that since I am using grandaverages of freq representation, what should I use for layout file (using BESA sfp file here). I have individual subject layout files. Currently I am just giving any file from one of the subjects. Since, I noticed that FreqStatistics finds a common minimum set of channels and then apply statistics on it. So do I need to average layout files for the subject group or is there any other way? Any help is much appreciated. Regards, Manish ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Tue May 12 23:26:03 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Tue, 12 May 2009 23:26:03 +0200 Subject: electrode load and clusterrandanalysis Message-ID: Hi Charles, i never actually tried doing the time-freq transform in BESA and then the stats in FT but I did so for ERP data and from what you write it is not clear what goes wrong. Could you please post the Fieldtrip version you use, the full error message you get and the full script code ? If your problems are related to electrode positions, you could try loading the BESA electrode (.elp) files directly if i am not mistaken. Michael > -----Ursprüngliche Nachricht----- > Von: "Charles Cook" > Gesendet: 08.05.09 21:51:46 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] electrode load and clusterrandanalysis > Hi all, > > I'm having some trouble running the clusterrandanalysis on my time-frequency > data collected using BESA. I've been trying to follow the example script > ('Apply clusterrandanalysis on TFRs of power that were computed with BESA'), > but am still coming up short. Specifically, I'm a little confused about > loading electrodes > > % load a set of electrodes (these are on a unit sphere) > % note, this will be different for your own data > load('elec128.mat'); > % scale the electrodes to a realistic head size (in cm) > elec.pnt = 10*elec.pnt; > > Any suggestions would be much appreciated. > > Cheers, > > Charles Cook > Canadian Centre for Behavioural Neuroscience > University of Lethbridge > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From susannah.murphy at PSYCH.OX.AC.UK Tue May 12 23:26:11 2009 From: susannah.murphy at PSYCH.OX.AC.UK (Susannah Murphy) Date: Tue, 12 May 2009 22:26:11 +0100 Subject: electrode load and clusterrandanalysis In-Reply-To: <966361168@web.de> Message-ID: Thanks for your message. I am out of the office until Thursday 21st May 2009. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From ingrid.nieuwenhuis at DONDERS.RU.NL Wed May 13 09:10:49 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 13 May 2009 09:10:49 +0200 Subject: Clusterplot not highlighting clusters & average layout file In-Reply-To: Message-ID: Dear Manish, You give a bit too few information to be able to figure out what could be the problem with clusterplot. After calling clusterplot, clusterplot gives information on which clusters it finds. Does the function find any clusters? Does the .mask field of the structure that comes out of freqstatistics contain any ones? Is everything else plotted normally? Do you get any errors or warnings? I'm not familiar with BESA layout files, but assuming that all layout files are similar over subjects, I think it is fine to just use an individual subject's layout file. Hope this helps, Best Ingrid > ---Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Manish Saggar > Sent: Tuesday, May 12, 2009 10:17 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] Clusterplot not highlighting clusters & average > layout file > > All, > > I have a question regarding clusterplot function. I am doing a > within-subject analysis. > The experimental design that I have is as follows, there are three > conditions C1, C2 and C3. Each condition is of 1 min duration (e.g. > rest with eyes open for 1 min). > > Now I am comparing grandaverage of freq representation of a set of > subjects for C2 with C1 etc. FreqStatistics is running just fine > creating significant (<0.025 alpha, for 2-tailed test) clusters > (positive). Now the problem is that when I try to plot the location of > this cluster using clusterplot it doesn't show any highlighted > channels. Any ideas why that is happening? > > Another question is that since I am using grandaverages of freq > representation, what should I use for layout file (using BESA sfp file > here). I have individual subject layout files. Currently I am just > giving any file from one of the subjects. Since, I noticed that > FreqStatistics finds a common minimum set of channels and then apply > statistics on it. So do I need to average layout files for the subject > group or is there any other way? > > Any help is much appreciated. > > Regards, > Manish > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK Wed May 13 18:47:01 2009 From: mark.drakesmith at POSTGRAD.MANCHESTER.AC.UK (Mark Drakesmith) Date: Wed, 13 May 2009 17:47:01 +0100 Subject: baseline correction on cross-spectral densities Message-ID: Dear Field Trip users I'm currently trying to obtain source coherence networks from some MEG data using the DICS beamformer method. I am calculating the necessary cross-spectral densities (CSDs) using the freqanalysis function. I was wondering is it necessary (or wise) to do baseline correction on the CSD data? I have already applied baseline correction to the data in time domain but I understand that the same correction still needs to be applied in the frequency domain. The function freqbaseline does this but it only allows you to correct non-complex power values. Is it appropriate to manually apply baseline correction on the complex CSDs? Or would it be more appropriate to calculate the CSDs and source coherence for the pre- and post- stimulus data separately, and then apply baseline correction to the coherence data? Any advice would be greatly appreciated. Thanks Mark -- Mark Drakesmith PhD Student Neuroscience and Aphasia Research Unit (NARU) University of Manchester ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From dsenkows at UKE.UNI-HAMBURG.DE Wed May 13 19:03:20 2009 From: dsenkows at UKE.UNI-HAMBURG.DE (vervang dit voor je naam of door ANONYMOUS) Date: Wed, 13 May 2009 19:03:20 +0200 Subject: ROI definition Message-ID: Dear all, I was wondering whether it is possible to use *.wrl files to assign ROIs in source space. Specifically, I am looking for a localization/probability file to define the sensorimotor hand area (*.hdr / *.img). Thank you for help and regards, Daniel Senkowski -- Pflichtangaben gem�� Gesetz �ber elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universit�tsklinikum Hamburg-Eppendorf K�rperschaft des �ffentlichen Rechts Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. J�rg F. Debatin (Vorsitzender) Dr. Alexander Kirstein Ricarda Klein Prof. Dr. Dr. Uwe Koch-Gromus ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jrkerlin at UCDAVIS.EDU Wed May 13 22:37:46 2009 From: jrkerlin at UCDAVIS.EDU (Jess R. Kerlin) Date: Wed, 13 May 2009 13:37:46 -0700 Subject: Source filtering Message-ID: Dear FTrippers, I created a standard 2-dipole model in BESA from a 128-electrode EEG array, and I would like to apply this as a filter on separate single trial data, to reduce each trial from 128 channels to 2 source waveforms. The external function readBESAbsa appears to load in the dipole locations and orientations correctly, however, I am unaware of a function which uses this information to filter the data as described above. Any input is appreciated. Thanks, Jess ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From nathanweisz at MAC.COM Thu May 14 07:55:49 2009 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Thu, 14 May 2009 07:55:49 +0200 Subject: Source filtering In-Reply-To: <4A0B2F9A.6050709@ucdavis.edu> Message-ID: hi jess, in the source analysis module of BESA you can create / save a source montage (e.g. based on ERP peak /peaks). then you can apply this montage to the raw data within BESA (haven't done it for a long time; look at the BESA-help). After that export the source projected data and read in matlab via besa2fieldtrip (that gives you a fieldtrip preprocessing structure). i.e. no need to do the single trial source projection in fieldtrip. also i can't remember it was possible to export leadfields out of BESA, but i may be wrong. good luck, nathan On 13.05.2009, at 22:37, Jess R. Kerlin wrote: > Dear FTrippers, > > I created a standard 2-dipole model in BESA from a 128-electrode EEG > array, and I would like to apply this as a filter on separate single > trial data, to reduce each trial from 128 channels to 2 source > waveforms. The external function readBESAbsa appears to load in the > dipole locations and orientations correctly, however, I am unaware > of a function which uses this information to filter the data as > described above. Any input is appreciated. > > Thanks, > Jess > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From tinar at IDAC.TOHOKU.AC.JP Thu May 14 10:28:03 2009 From: tinar at IDAC.TOHOKU.AC.JP (Tina Rasmussen) Date: Thu, 14 May 2009 17:28:03 +0900 Subject: ROI definition In-Reply-To: <4AA828C7-A2AE-48CD-BBD7-D9E2276DA6BE@UKE.UNI-HAMBURG.DE> Message-ID: Dear Daniel, I have not yet any experience with FieldTrip, so I cannot reply on the *.wrl issue. But with respect to masks for the hand area, here is a tip: The Jerne database (http://neuro.imm.dtu.dk/services/jerne/ninf/voi/hand_area.html) contains such localization masks. One important point is, that those masks have a smooth transition between voxels inside the region (one) and voxels outside the region (zero). If you need sharp transitions, you may have to generate them yourself (apply a threshold on the voxel values), or search somewhere else. Best regards, Tina Rasmussen. wrote: > Dear all, > > I was wondering whether it is possible to use *.wrl files to assign > ROIs in source space. > > Specifically, I am looking for a localization/probability file to > define the sensorimotor hand area (*.hdr / *.img). > > Thank you for help and regards, > > > Daniel Senkowski > > > > > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: tinar.vcf Type: text/x-vcard Size: 382 bytes Desc: not available URL: From moratti at MED.UCM.ES Thu May 14 15:39:48 2009 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Thu, 14 May 2009 15:39:48 +0200 Subject: Sourcefiltering In-Reply-To: Message-ID: Dear Jess, You could define a montage with your two sources in BESA and project the whole data set on the two sources. Then you export the projected data as for example simple binary that you can read in with fieldtrip. Thus, you would have the single trials already projected on the two sources. I am not sure if that is exactly what you want. I hope I could help, Best, Stephan -- *Stephan Moratti, PhD/ /**/see also: http://web.me.com/smoratti/ /*Centro de Tecnología Biomédica CBT, Universidad Politécnica de Madrid, en la actualidad (currently at) en el Centro de Magnetoencefalografía Dr. Perez Modrego, Universidad Complutense de Madrid, Faculdad de Medicina, Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain, email: moratti at gbt.tfo.upm.es moratti at med.ucm.es Tel.: +34 91 394 2292 Fax.: +34 91 394 2294 */ /* ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From charles.cook at ULETH.CA Thu May 14 15:41:21 2009 From: charles.cook at ULETH.CA (Charles Cook) Date: Thu, 14 May 2009 15:41:21 +0200 Subject: electrode load and clusterrandanalysis Message-ID: Hi Michael, Here's the basics of the code. As I mentioned I modified the code from Peter Praamstra's data where the TF power was computed in BESA. The full analysis will have both between group (males vs. females) and within group (location vs. feature identity) aspects. At this point in the code, I'm just trying to get the between group analysis going on one of the tasks. I'm not certain what precise version I'm with, I believe it's from fall 2008. For brevity, I've not included the BESA datafile lists for my different conditions. ------------------------------------------------------------------ % collect all single subject data in a convenient cell-array for i=1:nsubj femfeat{i} = besa2fieldtrip(filename_femfeat{i}); femloc{i} = besa2fieldtrip(filename_femloc{i}); malefeat{i} = besa2fieldtrip(filename_malefeat{i}); maleloc{i} = besa2fieldtrip(filename_maleloc{i}); end % this is needed for the channel labels in the data from Peter Praamstra % Matlab is case sensitive and so the channel and electrode names should match for i=1:nsubj for j=1:length(maleloc{i}.label) if maleloc{i}.label{j}(end)=='H' maleloc{i}.label{j}(end)='h'; end end for j=1:length(femloc{i}.label) if femloc{i}.label{j}(end)=='H' femloc{i}.label{j}(end)='h'; end end % load a set of electrodes (these are on a unit sphere) % note, this will be different for your own data load ('elec'); <------------------------------------------where it breaks down %scale the electrodes to a realistic head size (in cm) elec.pnt = 10*elec.pnt; %prepare layout read_fcdc_elec('HGSN_129_NoFids.sfp'); cfg = []; cfg.rotate = 0; cfg.elecfile = 'HGSN_129_NoFids.sfp'; mylay = prepare_layout(cfg); %cfg.layout = 'HGSN_129_NoFids.sfp'; %mylay = prepare_layout(cfg); % compute the grand average for both conditions cfg = []; cfg.keepindividuals = 'yes'; femfeat_avg = freqgrandaverage(cfg, femfeat{:}); femloc_avg = freqgrandaverage(cfg, femloc{:}); malefeat_avg = freqgrandaverage(cfg, malefeat{:}); maleloc_avg = freqgrandaverage(cfg, maleloc{:}); % Create difference waves % Female Location and feature fem_diff_feat_loc = femfeat_avg; %creates a dummy array male_diff_loc_feat = maleloc_avg; male_diff_loc_feat.powspctrm = maleloc_avg.powspctrm - femloc_avg.powspctrm; fem_diff_feat_loc.powspctrm = femfeat_avg.powspctrm - malefeat_avg.powspctrm; cfg = []; cfg.layout = mylay; cfg.showlabels = 'yes'; % recompute the average, except do _not_ average but keepindividual % this collects all identical time/frequency/channel samples over all % subjects into a single data structure cfg = []; cfg.keepindividual = 'yes'; maleloc_all = freqgrandaverage(cfg, maleloc{:}); femloc_all = freqgrandaverage(cfg, femloc{:}); % % perform the statistical test using randomization and a clustering approach % using the OLD clusterrandanalysis function cfg = []; cfg.elecfile = mylay; %cfg.geomfile = mylay; cfg.neighbourdist = 4; cfg.latency = 'all'; cfg.frequency = 'all'; cfg.channel = 'all'; % see CHANNELSELECTION cfg.avgovertime = 'no'; cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'indepsamplesT'; cfg.nranddraws = 200; stat = clusterrandanalysis (cfg.elecfile, maleloc_all, femloc_all); % perform the statistical test using randomization and a clustering approach % using the NEW freqstatistics function cfg = []; cfg.elecfile = mylay; cfg.neighbourdist = 4; cfg.latency = 'all'; cfg.frequency = 'all'; cfg.channel = 'all'; % see CHANNELSELECTION cfg.avgovertime = 'no'; cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'indepsamplesT'; cfg.numrandomization = 200; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.design = [ 1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 10 11 % subject number 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2]; % condition number cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable stat = freqstatistics(cfg, maleloc_avg, femloc_avg); ----------------------------------------------------------------------- The error I get is as follows: ??? Error using ==> load Unable to read file elec: No such file or directory. Error in ==> CMCWM2_clust at 108 load ('elec'); Any help would be greatly appreciated. Cheers, Charles ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jrkerlin at UCDAVIS.EDU Thu May 14 17:39:05 2009 From: jrkerlin at UCDAVIS.EDU (Jess R. Kerlin) Date: Thu, 14 May 2009 08:39:05 -0700 Subject: Sourcefiltering In-Reply-To: <4A0C1F24.8080600@med.ucm.es> Message-ID: Many thanks to Stephan and Nathan for the advice. I was hoping to avoid this option, as all of my other analysis steps are scripted in Matlab, but I suppose its worth the leg work. -Jess Stephan Moratti wrote: > Dear Jess, > > You could define a montage with your two sources in BESA and project > the whole data set on the two sources. Then you export the projected > data as for example simple binary that you can read in with fieldtrip. > Thus, you would have the single trials already projected on the two > sources. I am not sure if that is exactly what you want. > > I hope I could help, > > Best, > > Stephan > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From wibral at BIC.UNI-FRANKFURT.DE Thu May 14 19:13:43 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Thu, 14 May 2009 19:13:43 +0200 Subject: electrode load and clusterrandanalysis Message-ID: Hi Charles, if your code literally contains: load ('elec'); that will not work, for sure. The reason is, that you are trying to read a file (via MATLAB's load command) named "elec" in the current directory, which almost certainly does not exist. Try something like: elec = read_fcdc_elec('HGSN_129_NoFids.sfp'); and then add this as a field to the relevant data structures, like this femfeat{i}.elec=elec ... ... This way you'll be doing an electrode name based averaging over subjects. It may be better - since you have all the individual digitized electrode positions as .sfp files (do you?) - to export everything into a virtual BESA standard montage (81 ch in average reference is the most popular option) and then to fieldtrip, as this will take into account the different electrode positions in the different subjects (but we can leave that for later, let's first get the above running :-)...). Michael > -----Ursprüngliche Nachricht----- > Von: "Charles Cook" > Gesendet: 14.05.09 15:42:41 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] electrode load and clusterrandanalysis > Hi Michael, > > Here's the basics of the code. As I mentioned I modified the code from Peter > Praamstra's data where the TF power was computed in BESA. The full analysis > will have both between group (males vs. females) and within group (location > vs. feature identity) aspects. At this point in the code, I'm just trying to > get the between group analysis going on one of the tasks. I'm not certain > what precise version I'm with, I believe it's from fall 2008.femfeat{i} > > For brevity, I've not included the BESA datafile lists for my different > conditions. > > ------------------------------------------------------------------ > > % collect all single subject data in a convenient cell-array > for i=1:nsubj > femfeat{i} = besa2fieldtrip(filename_femfeat{i}); > femloc{i} = besa2fieldtrip(filename_femloc{i}); > malefeat{i} = besa2fieldtrip(filename_malefeat{i}); > maleloc{i} = besa2fieldtrip(filename_maleloc{i}); > end > > % this is needed for the channel labels in the data from Peter Praamstra > % Matlab is case sensitive and so the channel and electrode names should match > > for i=1:nsubj > for j=1:length(maleloc{i}.label) > if maleloc{i}.label{j}(end)=='H' > maleloc{i}.label{j}(end)='h'; > end > end > for j=1:length(femloc{i}.label) > if femloc{i}.label{j}(end)=='H' > femloc{i}.label{j}(end)='h'; > end > end > > > > % load a set of electrodes (these are on a unit sphere) > % note, this will be different for your own data > load ('elec'); <------------------------------------------where it breaks down > %scale the electrodes to a realistic head size (in cm) > elec.pnt = 10*elec.pnt; > > %prepare layout > read_fcdc_elec('HGSN_129_NoFids.sfp'); > cfg = []; > cfg.rotate = 0; > cfg.elecfile = 'HGSN_129_NoFids.sfp';read_fcdc_elec('HGSN_129_NoFids.sfp'); > mylay = prepare_layout(cfg); > %cfg.layout = 'HGSN_129_NoFids.sfp'; > %mylay = prepare_layout(cfg); > > % compute the grand average for both conditions > cfg = []; > cfg.keepindividuals = 'yes'; > femfeat_avg = freqgrandaverage(cfg, femfeat{:}); > femloc_avg = freqgrandaverage(cfg, femloc{:}); > malefeat_avg = freqgrandaverage(cfg, malefeat{:}); > maleloc_avg = freqgrandaverage(cfg, maleloc{:}); > > % Create difference waves > % Female Location and feature > fem_diff_feat_loc = femfeat_avg; %creates a dummy array > male_diff_loc_feat = maleloc_avg; > male_diff_loc_feat.powspctrm = maleloc_avg.powspctrm - femloc_avg.powspctrm; > fem_diff_feat_loc.powspctrm = femfeat_avg.powspctrm - malefeat_avg.powspctrm; > > cfg = []; > cfg.layout = mylay; > cfg.showlabels = 'yes'; > > % recompute the average, except do _not_ average but keepindividual > % this collects all identical time/frequency/channel samples over all > % subjects into a single data structure > cfg = []; > cfg.keepindividual = 'yes'; > maleloc_all = freqgrandaverage(cfg, maleloc{:}); > femloc_all = freqgrandaverage(cfg, femloc{:}); > > % > % perform the statistical test using randomization and a clustering approach > % using the OLD clusterrandanalysis function > cfg = []; > cfg.elecfile = mylay; > %cfg.geomfile = mylay; > cfg.neighbourdist = 4; > cfg.latency = 'all'; > cfg.frequency = 'all'; > cfg.channel = 'all'; % see CHANNELSELECTION > cfg.avgovertime = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgoverchan = 'no'; > cfg.statistic = 'indepsamplesT'; > cfg.nranddraws = 200; > stat = clusterrandanalysis (cfg.elecfile, maleloc_all, femloc_all); > > > % perform the statistical test using randomization and a clustering approach > % using the NEW freqstatistics function > cfg = []; > cfg.elecfile = mylay; > cfg.neighbourdist = 4; > cfg.latency = 'all'; > cfg.frequency = 'all'; > cfg.channel = 'all'; % see CHANNELSELECTION > cfg.avgovertime = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgoverchan = 'no'; > cfg.statistic = 'indepsamplesT'; > cfg.numrandomization = 200; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.design = [ > 1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 10 11 % subject number > 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2]; % condition number > cfg.uvar = 1; % "subject" is unit of > observation > cfg.ivar = 2; % "condition" is the > independent variable > stat = freqstatistics(cfg, maleloc_avg, femloc_avg); > ----------------------------------------------------------------------- > The error I get is as follows: > > ??? Error using ==> load > Unable to read file elec: No such file or directory. > > Error in ==> CMCWM2_clust at 108 > load ('elec'); > > Any help would be greatly appreciated. > > Cheers, > > Charles > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From manish.saggar at GMAIL.COM Fri May 15 08:25:47 2009 From: manish.saggar at GMAIL.COM (Manish Saggar) Date: Fri, 15 May 2009 01:25:47 -0500 Subject: Clusterplot not highlighting clusters & average layout file In-Reply-To: <01c901c9d399$f31b00e0$642dae83@fcdonders.nl> Message-ID: Ingrid, thanks for replying back. Apologies for lack of information. Clusterplot is plotting clusters fine most of the times, but in some cases it doesn't choose to highlight markers. I have attached two such images with this email. I do not get any errors or warnings. In fact the command window in matlab says, cluster found (with some prob and highlighter sign) and then the plot doesn't contain any highlighting. Initially I thought that my layout file might be messing it up or something, or may be I need to take an average layout file for group analysis (since cap size and electrode digitization varies for each subject). Then I put debug points in the code and found out that at line 235 the list cell (used to denote highlighted points) is empty. I am a novice so please forgive if what I am suggesting is dumb here, but I think when cluster plot is searching for significant clusters it is only looking into first column (which could correspond to first frequency in band) if one cluster is found by freqstats. It might be that in the code you guys are sorting columns and I might have missed it. But I thought I should clear this with you. In another thread you have mentioned to someone that their time limits might not be precise enough to get the clusers highlighted (https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0709&L=FIELDTRIP&P=R680 ). But they were doing time-freq analysis and I am just doing freq- representations. So should I use freqstats on each freq separately ? On a side note, when I run freqstats on my data (with 88 channels) command line says '89 neighbors per channel found'. I am a little confused with this. First since I only have less than 88 channels in the data and second since it should only consider a lower number for neighbor distance, right? and how can I change it? Thanks a ton in advance, Manish On May 13, 2009, at 2:10 AM, Ingrid Nieuwenhuis wrote: > Dear Manish, > > You give a bit too few information to be able to figure out what > could be > the problem with clusterplot. After calling clusterplot, clusterplot > gives > information on which clusters it finds. Does the function find any > clusters? > Does the .mask field of the structure that comes out of freqstatistics > contain any ones? Is everything else plotted normally? Do you get > any errors > or warnings? > > I'm not familiar with BESA layout files, but assuming that all > layout files > are similar over subjects, I think it is fine to just use an > individual > subject's layout file. > > Hope this helps, > Best Ingrid > > >> ---Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >> Behalf Of Manish Saggar >> Sent: Tuesday, May 12, 2009 10:17 AM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: [FIELDTRIP] Clusterplot not highlighting clusters & average >> layout file >> >> All, >> >> I have a question regarding clusterplot function. I am doing a >> within-subject analysis. >> The experimental design that I have is as follows, there are three >> conditions C1, C2 and C3. Each condition is of 1 min duration (e.g. >> rest with eyes open for 1 min). >> >> Now I am comparing grandaverage of freq representation of a set of >> subjects for C2 with C1 etc. FreqStatistics is running just fine >> creating significant (<0.025 alpha, for 2-tailed test) clusters >> (positive). Now the problem is that when I try to plot the location >> of >> this cluster using clusterplot it doesn't show any highlighted >> channels. Any ideas why that is happening? >> >> Another question is that since I am using grandaverages of freq >> representation, what should I use for layout file (using BESA sfp >> file >> here). I have individual subject layout files. Currently I am just >> giving any file from one of the subjects. Since, I noticed that >> FreqStatistics finds a common minimum set of channels and then apply >> statistics on it. So do I need to average layout files for the >> subject >> group or is there any other way? >> >> Any help is much appreciated. >> >> Regards, >> Manish >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the >> FieldTrip toolbox, to share experiences and to discuss new ideas >> for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html > and http://www.ru.nl/neuroimaging/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From dionyssios.theofilou at GMAIL.COM Fri May 15 18:10:41 2009 From: dionyssios.theofilou at GMAIL.COM (Dionyssios Theofilou) Date: Fri, 15 May 2009 09:10:41 -0700 Subject: trialfun_neuromag.m is missing ? Message-ID: Hello, I am new to fieldtrip and I have just started trying to import a neuromag '.fif' file. I wanted to ask: Is the 'trialfun_neuromag.m' missing from the latest distribution ? I have expanded the: fieldtrip-20090509.zip The error message that I receive is: evaluating trialfunction 'trialfun_neuromag' ??? Error using ==> feval Undefined function or method 'trialfun_neuromag' for input arguments of type 'struct'. Error in ==> definetrial at 200 trl = feval(cfg.trialfun, cfg); Error in ==> filename.m at 7 cfg = definetria(cfg); Also, I don't see any Neuromag-like directory in the subdirectories of the distribution. My Best, Dionyssios Theofilou. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From charles.cook at ULETH.CA Fri May 15 19:01:57 2009 From: charles.cook at ULETH.CA (Charles Cook) Date: Fri, 15 May 2009 19:01:57 +0200 Subject: electrode load and clusterrandanalysis Message-ID: Hi Michael, I do have all the sfp files, and agree that standardizing might be the best option to address the problem. Is there a version of the 'HGSN_129_NoFids.sfp' for the std-81 montage? Cheers, Charles ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From Nina.Kahlbrock at UNI-DUESSELDORF.DE Sat May 16 17:05:42 2009 From: Nina.Kahlbrock at UNI-DUESSELDORF.DE (Nina Kahlbrock) Date: Sat, 16 May 2009 17:05:42 +0200 Subject: significant coherence Message-ID: Dear Fieldtrip users, I have a question concerning significant coherence. I saw that a similar question was asked before on the mailing list. As I am new to coherence, I did not quite understand the answer. So here is my question: I have computed coherence between different MEG sensors and a photodiode. Now, I would like to compute significance levels for these coherence values at different frequencies. Is there a function in fieldtrip that I can use to solve this task? I have found the function 'statfun_indepsamplesZcoh'. However, I am not sure whether this is the right one to use. I would greatly appreciate your help! Thanks in advance. Nina ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.schoffelen at PSY.GLA.AC.UK Mon May 18 22:13:05 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Mon, 18 May 2009 21:13:05 +0100 Subject: significant coherence In-Reply-To: <000001c9d637$c817ad30$cd136386@vmed.ukd> Message-ID: Dear Nina, There is no fieldtrip function in the release allowing for the testing of significant coherence, if I understand correctly what you want. This would be to infer whether a given estimate of coherence is significantly different from zero. This means that you are not testing two conditions against each other (which is what stafun_indepsamplesZcoh is doing; on top of this: it does it for all combinations of channels, and not just for all channels versus a given external reference signal). There are two ways in which you can assess the 'significance'. First would be something like a 'shift predictor'. In short, one could shuffle the order of the replications for the reference channel and recompute coherence between the reference and the rest. Provided the reference is not the same signal in each trial, doing this many times would give you an estimate of the 'bias' in coherence. Any observed coherence values in the upper 5% tail then would count as significant (this by the way only works for an external reference channel, and not when you use one of the MEG channels as a reference). This shift predictor is perhaps something of an overkill, and you could use a parametric test instead. One way to do this, is to 'Z- transform' the coherence. I am used to using a particular formula which is described in one of our papers (Schoffelen, Science 2005 (supplementary material)); the appropriate references can also be found therein. I hope this helps, Cheers, Jan-Mathijs On May 16, 2009, at 4:05 PM, Nina Kahlbrock wrote: > Dear Fieldtrip users, > > I have a question concerning significant coherence. I saw that a > similar question was asked before on the mailing list. As I am new > to coherence, I did not quite understand the answer. > So here is my question: I have computed coherence between different > MEG sensors and a photodiode. Now, I would like to compute > significance levels for these coherence values at different > frequencies. Is there a function in fieldtrip that I can use to > solve this task? I have found the function > ‘statfun_indepsamplesZcoh’. However, I am not sure whether this is > the right one to use. > > I would greatly appreciate your help! > > Thanks in advance. > Nina > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From moratti at MED.UCM.ES Tue May 19 14:28:37 2009 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Tue, 19 May 2009 14:28:37 +0200 Subject: megplanar for magnetometers In-Reply-To: Message-ID: Hi all, I would like to transform my magnetometer maps to a planargradiometer representation (with BESA I can do that, but it would be nice to have it in fieldtrip). I guess, simply using megplanar and combineplanar as it is, would be incorrect, as this functions assume axial gradiameters. So, I tried to change some code of megplanar (lines 281-287, method 'orig') simply assuming that X2 Y2 and Z2 are equal to X,Y,Z in the case of magnetometers: % get the positions of bottom and top coil X = grad.pnt(:, 1); Y = grad.pnt(:, 2); Z = grad.pnt(:, 3); X2 = grad.pnt(:, 1);% + grad.ori(:,1); Y2 = grad.pnt(:, 2);% + grad.ori(:,2); Z2 = grad.pnt(:, 3);% + grad.ori(:,3); Well, probably this is quite naive. Attached please find my results (testplanar.tiff). testmagneto.tiff contains the original magnetic flux map (magentometers). Can anybody figure out if this makes sense? Thanks for any comments and help, Stephan -- *Stephan Moratti, PhD/ /**/see also: http://web.me.com/smoratti/ /*Centro de Tecnología Biomédica CBT, Universidad Politécnica de Madrid, en la actualidad (currently at) en el Centro de Magnetoencefalografía Dr. Perez Modrego, Universidad Complutense de Madrid, Faculdad de Medicina, Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain, email: moratti at gbt.tfo.upm.es moratti at med.ucm.es Tel.: +34 91 394 2292 Fax.: +34 91 394 2294 */ /* ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: testplanar.tif Type: image/tiff Size: 197102 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: testmagneto.tif Type: image/tiff Size: 193370 bytes Desc: not available URL: From j.schoffelen at PSY.GLA.AC.UK Tue May 19 23:28:17 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Tue, 19 May 2009 22:28:17 +0100 Subject: megplanar for magnetometers In-Reply-To: <4A12A5F5.6080704@med.ucm.es> Message-ID: Dear Stephan, I would advice you to use cfg.method = 'sincos'. As a matter of fact, the 'orig' method has been conceived indeed for axial gradient data, but I believe the info about the top coil is only used to temporarily generate a local z-axis throught the gradiometer, to define the local X and Y coordinate frame for the planar gradient. Using the sincos- method the XY coordinate frame is different, but apart from that, the planar gradient field interpolation works with the same logic, estimating a gradient in an X and Y direction based on an interpolation of the gradients between the magnetic field (magnetometers) or axial gradient (gradiometers) at a given sensor and its neighbours. Yours, Jan-Mathijs On May 19, 2009, at 1:28 PM, Stephan Moratti wrote: > Hi all, > > I would like to transform my magnetometer maps to a > planargradiometer representation (with BESA I can do that, but it > would be nice to have it in fieldtrip). I guess, simply using > megplanar and combineplanar as it is, would be incorrect, as this > functions assume axial gradiameters. So, I tried to change some > code of megplanar (lines 281-287, method 'orig') simply assuming > that X2 Y2 and Z2 are equal to X,Y,Z in the case of magnetometers: > > % get the positions of bottom and top coil > X = grad.pnt(:, 1); > Y = grad.pnt(:, 2); > Z = grad.pnt(:, 3); > X2 = grad.pnt(:, 1);% + grad.ori(:,1); > Y2 = grad.pnt(:, 2);% + grad.ori(:,2); > Z2 = grad.pnt(:, 3);% + grad.ori(:,3); > > Well, probably this is quite naive. Attached please find my results > (testplanar.tiff). testmagneto.tiff contains the original magnetic > flux map (magentometers). Can anybody figure out if this makes sense? > > Thanks for any comments and help, > > Stephan > > > -- > *Stephan Moratti, PhD/ > /**/see also: http://web.me.com/smoratti/ > /*Centro de Tecnología Biomédica CBT, > Universidad Politécnica de Madrid, > > en la actualidad (currently at) en el > Centro de Magnetoencefalografía Dr. Perez Modrego, > Universidad Complutense de Madrid, > Faculdad de Medicina, > Pabellón 8, > Avda. Complutense, s/n, > 28040 Madrid, > Spain, > > email: moratti at gbt.tfo.upm.es > moratti at med.ucm.es > Tel.: +34 91 394 2292 > Fax.: +34 91 394 2294 > */ > /* > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/neuroimaging/ > fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From moratti at MED.UCM.ES Wed May 20 10:05:36 2009 From: moratti at MED.UCM.ES (Stephan Moratti) Date: Wed, 20 May 2009 10:05:36 +0200 Subject: megplanar for magentometers In-Reply-To: Message-ID: Dear Jan-Mathijs, Thanks for your comments, I will check this out. By the way I am still behind the table weights ;-) .... Best, Stephan -- *Stephan Moratti, PhD/ /**/see also: http://web.me.com/smoratti/ /*Centro de Tecnología Biomédica CBT, Universidad Politécnica de Madrid, en la actualidad (currently at) en el Centro de Magnetoencefalografía Dr. Perez Modrego, Universidad Complutense de Madrid, Faculdad de Medicina, Pabellón 8, Avda. Complutense, s/n, 28040 Madrid, Spain, email: moratti at gbt.tfo.upm.es moratti at med.ucm.es Tel.: +34 91 394 2292 Fax.: +34 91 394 2294 */ /* ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From dahliash at STANFORD.EDU Thu May 21 22:24:59 2009 From: dahliash at STANFORD.EDU (Dahlia Sharon) Date: Thu, 21 May 2009 13:24:59 -0700 Subject: multiplotTFR not redrawing In-Reply-To: <1015851759.4956171242937368734.JavaMail.root@zm09.stanford.edu> Message-ID: Hi, I'm new to fieldtrip and am using the multiplotTFR to view results from freqanalysis. After I initially view a figure that contains a multiplot, if I then view another figure that has a multiplot, I cannot get matlab to redraw the first figure, and then the second figure also becomes blank, and I need to restart matlab (i.e. just closing the figures and repeating the multiplot command doesn't work). Any idea how I can resolve this issue? I'm viewing the Linux environment through X-Win32 on Windows XP; this is Neuromag data opened with Matti's MNE suite. Thanks!! Dahlia. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at DONDERS.RU.NL Fri May 22 16:47:42 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 22 May 2009 16:47:42 +0200 Subject: Clusterplot not highlighting clusters & average layout file Message-ID: Dear Manish, If I understand correctly you have multiple frequencies over which you cluster. Is that correct? (so cfg.avgoverfreq = 'no' when you called freqstatistics?) In that case you should not call clusterplot because for different frequencies there can be different channels part of the cluster. Instead you can call multiplotER or multiplotTFR and use cfg.maskparameter = 'mask' to plot the significant cluster. Hope this helps, Ingrid > -----Original Message----- > From: Manish Saggar [mailto:manish.saggar at gmail.com] > Sent: Friday, May 15, 2009 8:26 AM > To: ingrid.nieuwenhuis at donders.ru.nl > Cc: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] Clusterplot not highlighting clusters & average > layout file > > Ingrid, thanks for replying back. > > Apologies for lack of information. > > Clusterplot is plotting clusters fine most of the times, but in some > cases it doesn't choose to highlight markers. I have attached two such > images with this email. > > I do not get any errors or warnings. In fact the command window in > matlab says, cluster found (with some prob and highlighter sign) and > then the plot doesn't contain any highlighting. > Initially I thought that my layout file might be messing it up or > something, or may be I need to take an average layout file for group > analysis (since cap size and electrode digitization varies for each > subject). > > Then I put debug points in the code and found out that at line 235 the > list cell (used to denote highlighted points) is empty. I am a novice > so please forgive if what I am suggesting is dumb here, but I think > when cluster plot is searching for significant clusters it is only > looking into first column (which could correspond to first frequency > in band) if one cluster is found by freqstats. It might be that in the > code you guys are sorting columns and I might have missed it. But I > thought I should clear this with you. > > In another thread you have mentioned to someone that their time limits > might not be precise enough to get the clusers highlighted > (https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0709&L=FIELDTRIP&P=R680 > ). But they were doing time-freq analysis and I am just doing freq- > representations. So should I use freqstats on each freq separately ? > > On a side note, when I run freqstats on my data (with 88 channels) > command line says '89 neighbors per channel found'. I am a little > confused with this. First since I only have less than 88 channels in > the data and second since it should only consider a lower number for > neighbor distance, right? and how can I change it? > > Thanks a ton in advance, > Manish > > On May 13, 2009, at 2:10 AM, Ingrid Nieuwenhuis wrote: > > > Dear Manish, > > > > You give a bit too few information to be able to figure out what > > could be > > the problem with clusterplot. After calling clusterplot, clusterplot > > gives > > information on which clusters it finds. Does the function find any > > clusters? > > Does the .mask field of the structure that comes out of freqstatistics > > contain any ones? Is everything else plotted normally? Do you get > > any errors > > or warnings? > > > > I'm not familiar with BESA layout files, but assuming that all > > layout files > > are similar over subjects, I think it is fine to just use an > > individual > > subject's layout file. > > > > Hope this helps, > > Best Ingrid > > > > > >> ---Original Message----- > >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > >> Behalf Of Manish Saggar > >> Sent: Tuesday, May 12, 2009 10:17 AM > >> To: FIELDTRIP at NIC.SURFNET.NL > >> Subject: [FIELDTRIP] Clusterplot not highlighting clusters & average > >> layout file > >> > >> All, > >> > >> I have a question regarding clusterplot function. I am doing a > >> within-subject analysis. > >> The experimental design that I have is as follows, there are three > >> conditions C1, C2 and C3. Each condition is of 1 min duration (e.g. > >> rest with eyes open for 1 min). > >> > >> Now I am comparing grandaverage of freq representation of a set of > >> subjects for C2 with C1 etc. FreqStatistics is running just fine > >> creating significant (<0.025 alpha, for 2-tailed test) clusters > >> (positive). Now the problem is that when I try to plot the location > >> of > >> this cluster using clusterplot it doesn't show any highlighted > >> channels. Any ideas why that is happening? > >> > >> Another question is that since I am using grandaverages of freq > >> representation, what should I use for layout file (using BESA sfp > >> file > >> here). I have individual subject layout files. Currently I am just > >> giving any file from one of the subjects. Since, I noticed that > >> FreqStatistics finds a common minimum set of channels and then apply > >> statistics on it. So do I need to average layout files for the > >> subject > >> group or is there any other way? > >> > >> Any help is much appreciated. > >> > >> Regards, > >> Manish > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > >> of the > >> FieldTrip toolbox, to share experiences and to discuss new ideas > >> for MEG > >> and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > > of the FieldTrip toolbox, to share experiences and to discuss new > > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html > > and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From amano at BRAIN.K.U-TOKYO.AC.JP Mon May 25 10:26:14 2009 From: amano at BRAIN.K.U-TOKYO.AC.JP (Kaoru Amano) Date: Mon, 25 May 2009 17:26:14 +0900 Subject: independsamplesZcoh In-Reply-To: Message-ID: Dear all I have a very similar problem about the freqstatistics with 'independsamplesZcoh', as Jamie asked below. As jan-mathijs suggested, within 'independsamplesZcoh' Z-transformed coherence difference is computed between all pairs of input channels, but the 'clusterstat' seems to expect the first dimension of input to be the number of channels not the number of the combination of channels, which create an error in 'clusterstat' at 195. It would be great if some of you could tell me how we can solve this problem. Best, Kaoru -- Kaoru Amano email: amano at brain.k.u-tokyo.ac.jp URL: http://www.brain.k.u-tokyo.ac.jp/~amano/ > I have fixed the issues in my posting below and seem to be getting closer to having my code run. However, I still run into a dimension mismatch in clusterstat...I'm trying to understand the following code, where I think this mismatch occurs. > % determine whether the input represents N-D volumetric data or channel-freq-time data and provide the appropriate details > % TODO this detection should be more robust > if isfield(cfg, 'neighbours') && ~isempty(cfg.neighbours) > channeighbstructmat = makechanneighbstructmat(cfg); > issource = 0; > else > issource = 1; > % cfg contains dim and inside that are needed for reshaping the data to a volume, and inside should behave as a index vector > cfg = fixinside(cfg, 'index'); > end > The dimension of the data (statobs) that is passed to clusterstat is 520 X 1 (10 channels of coherence differences x 52 frequencies concatenated; note: this use to be 5 channels of powspctrm) which makes sense. I am trying to cluster by frequency (not channel)...the output of "fixinside" function returns cfg.index of dimension (1 X 260), causing a dimension mismatch at line 188 in clusterstat. The reason this happens, I think, is in line 37 of fixinside where > elseif isfield(source, 'dim') > source.inside = 1:prod(source.dim); > source.outside = []; > end > for some reason source.dim still has the dimension 5 X 52 X 1, ie, the dimensions prior to computing the coherence differences. I'm not sure whether/where I should change the cfg.dim, which I assume should reflect the dimensions of the newly computed data matrix. > Thanks, > Jamie > > ________________________________ > > From: FieldTrip discussion list on behalf of Jamie Johnston > Sent: Sun 5/3/2009 2:12 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] independsamplesZcoh > > > Thanks for your response. > > Let me clarify....I have 8 subjects (with 5 channels of data, 2 with 4 channels which I'm not using at this point)...I used only 2 subjects to test the code (for faster debugging). I do want to do a within subject statistical test between my conditions (of which I have 3, but I am only inputting 2 into freqstatistics as I was unclear whether I could run comparisons across 3 conditions). > > As you correctly point out, I did compute coherence across my 5 channels first, resulting in 10 spectra...this is what I inputted into freqstatistics, which is clearly incorrect. This is what I thought, however I didn't know exactly what the data input should look like. > > So, just to clarify, I'm running > > freqanalysis - inputting raw data, returning "powandcsd' > freqdescriptives - inputting data from freqanalysis, returning 'coh' > freqgrandaverage (keep individual 'yes') - inputting data from freqdescriptives, returning a grandaverage > freqstatistics - inputting two grandaverages (for 2 conditions), using the following parameters: > > %Compute Permutation Test > cfg = []; > cfg.parameter = 'cohspctrm'; > cfg.method = 'montecarlo'; > cfg.frequency = [0 50]; > cfg.statistic = 'indepsamplesT'; > cfg.correctm = 'cluster'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 100; > cfg.computestat = 'yes'; > > > subj = length(Subjects); > design=zeros(2,2*subj); > for i = 1:subj > design(1,i) = i; > end > for i = 1:subj > design(1,subj+i) = i; > end > design(2,1:subj) = 1; > design(2,subj+1:2*subj) = 2; > > cfg.design = design; > cfg.uvar = 1; > cfg.ivar = 2; > > [stat] = freqstatistics(cfg, grandavg{1}, grandavg{2}); > > > Are you saying, I should use the output from freqanalysis (skipping freqdescriptives) as input to freqgrandaverage? Also, should my "cfg.parameter" for the freqstatistics function still be 'cohspctrm' or 'powspctrm'? > > Thanks again, > > Jamie > > > > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of jan-mathijs schoffelen > Sent: May 3, 2009 1:34 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] independsamplesZcoh > > Dear Jamie, > > For me it is not exactly clear what you want to do. In an earlier message you referred to our paper using a permutation test to test for a significant difference in coherence between conditions (Maris et al 2007). Essentially, as described, this is a test which is performed within each subject allowing you to do statistical inference about the potential difference between two conditions. As such this is the type of test indepsamplesZcoh can perform, if properly used (see below). Yet, you describe using two subjects as an input. This to me sounds rather that you would like to do statistics across subjects (although 2 subjects of course is a rather low number). This is NOT something indepsamplesZcoh can do for you. In general it is possible to test for a significant difference between two conditions across a population of subjects, but this would require a different approach. Rather than shuffling single observations across conditions PRIOR TO COMPUTING THE COHERENCE DIFFER ENCE (sorry about the capitals but this is essential for what is to follow below), one would swap the sign of the Z-transformed coherence difference for a random subset of subjects prior to averaging. > It seems as if you computed coherence spectra between all unique pairs of channels (4x5)/2 and used this as an input to freqstatistics. Yet, for single subject statistics this does not make sense, because indepsamplesZcoh expects fourier-spectra in the input. Within the function Z-transformed coherence difference will be computed between all pairs of input channels (in your case this would be (9x10)/2 (even though the function does not know you provide it with the wrong input), and multiplying this number with 52 would give your 'magical' 2340). > So, indeed you should either format your data in a different way using single subject fourier spectra in two conditions as an input to freqstatistics, or using a different statistical test to test for differences across subjects. > > Yours, > > Jan-Mathijs > > > > On May 3, 2009, at 7:00 PM, Jamie Johnston wrote: > > > > Hi all - > > I am trying to run a monte carlo - indepsamplesZcoh - cluster on my data using freqstatistics. I input two data files into freqstatistics with the cohspctrm having dimensions 2 (subjects) x 10 (channels, # of coherence spectra) x 52 (frequencies). I run into a dimension mismatch in the function clusterstat. If I run any other statistic (i.e., indepsamplesT) it runs fine. When running the indepsamplesT, clusterstat receives two inputs: statobs (520x1) and statrnd (520x100). These dimensions make sense to me. However, when running indepsamplesZcohthese two variables have dimensions 2340x1 and 2340x100, respectively. This happens around lines 104-108 in indepsamplesZcoh.m with computation of the variables "chancmbsel" and "nnewsamples." I'm not understanding what these variables do, but my guess is that I need to setup my data files differently in the beginning. My understanding of what this analysis protocol does is compute the z-statistic on each channel of coherenc e data (10 for each data file) and then find the difference between the z-statistic for each channel across the data files. Once this is complete it runs the permutations to determine the significance. > > Please verify that what I have done is correct and any help with the error I am getting would be greatly appreciated. > > Thanks, > > Jamie > > _______________ > Jamie Johnston, Ph.D. > Assistant Professor > Faculty of Kinesiology > University of Calgary > 2500 University Dr. NW > Calgary, AB > T2N 1N4 > Phone: +1 (403) 220-3649 > Fax: +1 (403) 284-3553 > email: johnston at kin.ucalgary.ca > website: http://www.kin.ucalgary.ca/wcm/knes/johnston.html > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > http://listserv.surfnet.nl/archives/fieldtrip.html > http://www.ru.nl/fcdonders/fieldtrip/ > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From muthuraman10 at HOTMAIL.COM Mon May 25 16:54:20 2009 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 25 May 2009 14:54:20 +0000 Subject: Source plot! Message-ID: Hello Fieldtrip Users, I have attached a orthoplot with this mail. This source plot i plotted with the method 'ortho', but i would like get the plot in the correct direction in all the 3 slices. As i looked in the tutorial documentation need to use the volumenormalisation to get it in the correct direction. Then the next question where i can get the template with MNI coordinates which is showed in the tutorial documentation. Thanking you With regards, M.Muthuraman. _________________________________________________________________ Planning the weekend ? Here’s what is happening in your town. http://msn.asklaila.com/events/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: orthoplot.jpg Type: image/jpeg Size: 44484 bytes Desc: not available URL: From r.oostenveld at FCDONDERS.RU.NL Mon May 25 22:13:22 2009 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 25 May 2009 22:13:22 +0200 Subject: multiplotTFR not redrawing In-Reply-To: <1588054045.4956801242937499868.JavaMail.root@zm09.stanford.edu> Message-ID: Dear Dahlia, On 21 May 2009, at 22:24, Dahlia Sharon wrote: > Any idea how I can resolve this issue? Please try the cfg.renderer option. The default (opengl) might cause problems with your X11 connection. best regards, Robert ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From julian.keil at GMAIL.COM Tue May 26 09:51:37 2009 From: julian.keil at GMAIL.COM (Julian Keil) Date: Tue, 26 May 2009 09:51:37 +0200 Subject: TFR plot uneven y-axis spacing Message-ID: Hi everyone, I performed a TFR-analysis with unevenly spaced frequency steps (cfg.foi=[10.^(log10(2):((log10(100)-log10(2))/35):log10(100))];) Now, when I try to plot the results with multiplotTFR, I get the warning, that (one of the axis) is/are not evenly spaced. Nonetheless, the multiplotTFR works fine. The Probem arises, when I try to select single (or a number) of sensors to be plotted. I then get the following error message: ??? Attempted to access c(22,1); index out of bounds because size(c)=[21,101]. Error in ==> uimage at 128 ce(j,i) = c(indi(end), indj(end)); Error in ==> uimagesc at 50 hh = uimage(varargin{:},'CDataMapping','scaled'); Error in ==> singleplotTFR at 282 h = uimagesc(data.(cfg.xparam)(xidc), data.(cfg.yparam)(yidc), TFR, [zmin,zmax]); Error in ==> plotSelection at 343 singleplotTFR(new_cfg, userData.data); ??? Error while evaluating figure WindowButtonUpFcn Is there any way to work around this (I already tried defining the y- axis with cfg.ylim)? Thanks a lot Julian Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: julian.keil at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 194 bytes Desc: Signierter Teil der Nachricht URL: From ingrid.nieuwenhuis at DONDERS.RU.NL Tue May 26 15:23:53 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 26 May 2009 15:23:53 +0200 Subject: TFR plot uneven y-axis spacing In-Reply-To: <35A3B14D-C8E5-4B3A-AAC2-2558B43C0FB1@gmail.com> Message-ID: Hi Julian, Yes indeed plotting with unevenly spaced axis is problematic in Matlab. The problem lies in the image (and imagesc) Matlab functions that singleplotTFR and multiplotTFR call. These functions assume evenly spaced axis, and they just interpolate linearly between lowest and highest value. Therefore you cannot trust the values next to the axis when you look at the blobs, because they can be totally wrong (which you will see if you change the ylims, then the blobs shift). To get around this we used uimage and uimagesc in fieldtrip, which works around this problem by making new axis before calling image and imagesc. This was hard to implement in the current version of multiplotTFR, so there we only give a warning (we're working on restructuring the plotting functions, so in the future hopefully this will be also implemented in the multiplot functions). So although everything seems to be going fine in multiplot, you can not trust the axis there, because they are linearly interpolated! So for the error in the singleplot function, there something is not going right when making the new axis. We got the uimage and uimagesc functions as free functions from the matlabcentral fileexchange (see url in the code). You could try to debug, and see why the new axis making doesn't work. I hope this helps to solve the problem, if not let me know, I could try to help then. Best Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Julian Keil Sent: Tuesday, May 26, 2009 9:52 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] TFR plot uneven y-axis spacing Hi everyone, I performed a TFR-analysis with unevenly spaced frequency steps (cfg.foi=[10.^(log10(2):((log10(100)-log10(2))/35):log10(100))];) Now, when I try to plot the results with multiplotTFR, I get the warning, that (one of the axis) is/are not evenly spaced. Nonetheless, the multiplotTFR works fine. The Probem arises, when I try to select single (or a number) of sensors to be plotted. I then get the following error message: ??? Attempted to access c(22,1); index out of bounds because size(c)=[21,101]. Error in ==> uimage at 128 ce(j,i) = c(indi(end), indj(end)); Error in ==> uimagesc at 50 hh = uimage(varargin{:},'CDataMapping','scaled'); Error in ==> singleplotTFR at 282 h = uimagesc(data.(cfg.xparam)(xidc), data.(cfg.yparam)(yidc), TFR, [zmin,zmax]); Error in ==> plotSelection at 343 singleplotTFR(new_cfg, userData.data); ??? Error while evaluating figure WindowButtonUpFcn Is there any way to work around this (I already tried defining the y-axis with cfg.ylim)? Thanks a lot Julian Dipl. Psych. Julian Keil OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 42 50 Fax: ++49 - (0)7531 - 88 28 91 Email: julian.keil at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From charles.cook at ULETH.CA Tue May 26 16:36:08 2009 From: charles.cook at ULETH.CA (Charles Cook) Date: Tue, 26 May 2009 16:36:08 +0200 Subject: electrode load and clusterrandanalysis Message-ID: Hi Michael, Still working on the problem. I have all my data in a standard 81 montage in average reference. When I'm preparing the electrode layout now, is there an sfp I need to call for, like the HGSN_129_NoFids.sfp file when analyzing 128 channels? Cheers, Charles On Thu, 14 May 2009 19:13:43 +0200, Michael Wibral wrote: >Hi Charles, >It may be better - since you have all the individual digitized electrode positions as .sfp files (do you?) - to export everything into a virtual BESA standard montage (81 ch in average reference is the most popular option) and then to fieldtrip, as this will take into account the different electrode positions in the different subjects (but we can leave that for later, let's first get the above running :-)...). > >Michael > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From khoechstetter at BESA.DE Tue May 26 17:53:51 2009 From: khoechstetter at BESA.DE (Karsten Hoechstetter) Date: Tue, 26 May 2009 17:53:51 +0200 Subject: Job offer: EEG/MEG scientist for support and development In-Reply-To: Message-ID: Dear Fieldtrip mailing list members, MEGIS Software GmbH (Munich, Germany) is looking for an EEG/MEG scientist to join our support and development team. The main tasks will be to: - provide support to our customers (predominantly email) - teach the use of our software at customer workshops - represent our products and software at neuroimaging conferences - participate in joint research projects with our customers - contribute to the development of new analysis techniques and program features The applicant should have profound experience in EEG/MEG measurement and data analysis, preferably with BESA and/or MATLAB. We expect the applicant to have experience with all steps of ERP analysis (paradigm design, digital processing, topographic mapping, averaging, source analysis). Fluency in written and spoken English are a prerequisite for the announced position. MEGIS is one of the leading developers of EEG/MEG analysis software. Our BESA program is a widely used research software the analysis of EEG and MEG data (see www.besa.de). As a free enterprise in the field of science and research we can offer job positions combining the advantages of both fields: Stay in touch with current front-end research work while enjoying the advantages of a permanent position with adequate salary. Applications should include a current CV, a letter indicating motivation and skills, and a list of publications. Electronic applications preferred. Please send your application to: Theodor Scherg (tscherg at besa.de) or to: MEGIS Software GmbH Freihamer Str. 18 82166 Graefelfing Germany We’re looking forward to hearing from you! -------------------------------------- Dr. Karsten Hoechstetter MEGIS Software GmbH Gräfelfing, Germany HRB München 109956 CEO Dr. Michael Scherg -------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From jean-michel.badier at UNIVMED.FR Wed May 27 21:16:12 2009 From: jean-michel.badier at UNIVMED.FR (Jean-Michel Badier) Date: Wed, 27 May 2009 21:16:12 +0200 Subject: Problem with freqstatistics Message-ID: Dear Fieldtrip mailing list members, I am a quite new user of fieldtrip (version 10090331). I have been trying to use it for analyzing distribution of frequencies on MEG signal between two events of a task. The last command using freqstatistics result of an error message. I decided to run the tutorial "Cluster-based permutation tests on time-frequency data" in order to compare the organization my data set compared with the one in the data set. In fact I got the same bug with the tutorial data set that is for the tutorial data set: selected 149 channels selected 61 time bins selected 1 frequency bins Warning: PACK can only be used from the MATLAB command line. > In fieldtrip-20090331/private/prepare_timefreq_data at 314 In fieldtrip-20090331/private/statistics_wrapper at 315 In freqstatistics at 137 Using the gradiometer configuration from the dataset. there are on average 4.7 neighbours per channel using "statistics_montecarlo" for the statistical testing using "statfun_indepsamplesT" for the single-sample statistics constructing randomized design total number of measurements = 149 total number of variables = 1 number of independent variables = 1 number of unit variables = 0 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach computing a parmetric threshold for clustering Warning: Not all replications are used for the computation of the statistic. > In statfun_indepsamplesT at 90 In statistics_montecarlo at 275 In fieldtrip-20090331/private/statistics_wrapper at 381 In freqstatistics at 137 Undefined function or method 'tinv' for input arguments of type 'double'. ??? Error using ==> statistics_montecarlo at 278 could not determine the parametric critical value for clustering Error in ==> statistics_wrapper at 381 [stat, cfg] = statmethod(cfg, dat, cfg.design); Error in ==> freqstatistics at 137 [stat] = statistics_wrapper(cfg, varargin{:}); >> Any idea or suggestion about that problem? Thanks. Jean-Michel -- Jean-Michel Badier Laboratoire de MagnétoEncéphaloGraphie INSERM U751. Aix Marseille Université 33 (0)4 91 38 55 62 _jean-michel.badier at univmed.fr_ Service de Neurophysiologie Clinique. CHU Timone 264 Rue Saint-Pierre, 13005 Marseille-France ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From R.Oostenveld at FCDONDERS.RU.NL Fri May 29 14:28:24 2009 From: R.Oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 29 May 2009 14:28:24 +0200 Subject: research and engineering positions available at NeuroSpin MEG centre Message-ID: NeuroSpin MEG at CEA Paris, France is recruiting TWO engineers RESEARCH/DEVELOPMENT ENGINEER & ELECTRONICS ENGINEER Work Environment The Magnetoencephalography (MEG) center is a recent addition to NeuroSpin, a neuroimaging platform located 20 km south of Paris in the Centre d'Energie Atomique (CEA). The CEA is an international scientific center that offers state-of-the-art equipment and opportunities for career growth. Two groups, the Cognitive Neuroimaging Unit (INSERM U562) and theNanomagnetism group closely collaborate on different aspects of the MEG technique: the Cognitive Neuroimaging Unit, part of the Life Sciences department, investigates human cognition at large (including consciousness, language, mathematics and perception research); the Nanomagnetism group, part of the Physics department, investigates new sensors for novel biomedical imaging devices. Positions Statement RESEARCH & DEVELOPMENT ENGINEER: the ideal candidate is a technically oriented researcher who will insure the daily technical maintenance (hardware and software) of the MEG and electroencephalography (EEG) equipment. He/she will be encouraged to develop autonomy in doing so, and use his/her organizational skills to develop a set of control quality assessments for these systems. This part of the work will be done in close association with the electronics engineer. The position also involves interacting with an international team of researchers and clinical staff for the implementation of experimental work in both patients and healthy individuals. The research engineer will be encouraged to invest part of his/her time into research both at the technical (for instance, in developing innovative analysis techniques) and/or at a scientific level (e.g. cognitive neurosciences and/or clinical). The research engineer will mostly work with the Cognitive Neuroimaging Unit and interact closely with the electronics engineer. Required Skills § PhD education (physics, neurosciences, engineering …). § Mastering of fundamentals in MEG and EEG techniques § Good programming skills (e.g. Matlab, C ++, shell…) § English and French proficiency (opportunities to learn either available) § Mastering of signal processing and associated tools (e.g. EEGlab, Fieldtrip, MNE, SPM, NutMeg …) a plus! Type of Position This Ingénieur de Recherche (IR) is a category A position in the French public services. Selection is competitive and the start date is 01/01/2010. The deadline to download the application package is July 7th 2009. The deadline for submission of your application package is July 9th 2009. Application packages can be downloaded from the INSERM Human Resources website (www.rh.inserm.fr). Applicants selected by the search committee will be contacted personally for the open competition. Prior to application, interested applicants are encouraged to contact the search committee (emails listed at the end of this flyer). ELECTRONICS ENGINEER: the ideal candidate is an expert in electronics who will work at the interface of physics research and medical applications. He/she will be in charge of developing interfaces for analog/digital electronics associated with new low field magnetic sensors and necessary signal processing and computing tools. Specifically, the complex multiple sensor arrays being designed will require sophisticated interfacing, prototyping at various stages of the project and validation for diverse type of applications (including magnetocardiography, combined low field MRI and MEG, in adults and children). The chosen candidate will interface between the cognitive neuroimaging unit and the nanomagnetism group on a regular basis while working more closely with the nanomagnetism group. His/her autonomy and initiative taking will be encouraged. Required Skills § PhD education (physics, electronics, engineering …). § Expertise in electronics, general knowledge of mathematics and physics § English and French proficiency (opportunities to learn either available) Type de Position Fixed-term contract from 10/01/2009 to 12/31/2010. Salaries depend on the experience of the candidate and will be based on the INSERM rate (yearly gross income from 27 K€ with no experience to 32 K€). Application packages MUST be received by July 9th 2009. For further information on these two positions, please contact: Claude.Fermon AT cea.fr, Myriam.Pannetier AT cea.fr, Stanislas.Dehaene AT cea.fr, Virginie.van-Wassenhove AT cea.fr ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. From ingrid.nieuwenhuis at DONDERS.RU.NL Fri May 29 14:31:44 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 29 May 2009 14:31:44 +0200 Subject: Source plot! In-Reply-To: Message-ID: Dear M.Muthuraman, You can find it in fieldtrip/templates/ Best ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Monday, May 25, 2009 4:54 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Source plot! Hello Fieldtrip Users, I have attached a orthoplot with this mail. This source plot i plotted with the method 'ortho', but i would like get the plot in the correct direction in all the 3 slices. As i looked in the tutorial documentation need to use the volumenormalisation to get it in the correct direction. Then the next question where i can get the template with MNI coordinates which is showed in the tutorial documentation. Thanking you With regards, M.Muthuraman. _____ MSN Battles We pitch one stalwart against the other and give you the power. Who will you vote for? Share photos while you chat with Windows Live Messenger. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: