From olga at GRAPHICMIND.INFO Mon Jul 2 16:22:36 2007 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Mon, 2 Jul 2007 18:22:36 +0400 Subject: PC for Fieldtrip, yours experience Message-ID: Dear Fieldtrippers, sorry for annoying with the same question, but can you just specified your own PC, which you use for analysing. We wish to speed up our analysis. Best Regards. Olga. ---------------------------------------------------------------------------------------------------------------------------------------- Dear all, It is probably a dull question, but can you specified the "good" PC Computer for analysing 64-channel data in Fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Mon Jul 2 19:04:47 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 2 Jul 2007 13:04:47 -0400 Subject: using cfg.correctm = 'cluster' and related memory issues. Message-ID: Hello, I am running into memory issues while trying to do non-parametric statistical testing for coherence differences for my Neuromag 306 data. The statement causing overflow is line 277 in statistics_montecarlo: statrand = zeros(size(statobs,1), size(res,1)); This would be a matrix of size 50631525 X 100 corresponding to some 40 GB! (Am I correct in assuming that the 100 is from cfg.numrandomization)? This statement is evoked if cfg.correctm = 'cluster'; I could use cfg.correctm = max but I dont think this will do the right analysis. The one thing I can think of is changing cfg.channelcmb to try and reduce the number of combinations tried (but is not very preferable atleast right now). Is there anything else that comes to mind? The cfg I am using and other info is added below. Thank you for your time and help. sameer >>cfg = []; cfg.channelcmb = {'MEG' 'MEG'}; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesZcoh'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.clusterthreshold = 'nonparametric'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 100; % make it larger for better testing cfg.precision = 'single'; % experimenting to save memory cfg.label = CSD_LL_200_400.label ; cfg.channelcmb = CSD_LL_200_400.labelcmb; [statistics] = freqstatistics(cfg, CSD_LL_200_400 , CSD_RR_200_400); Note: I use Cross Spectral density instead of coherence as coherence does not keep trials. At the debug prompt after the error I have: K>> whos Name Size Bytes Class Attributes Nrand 1x1 8 double cfg 1x1 60159588 struct dat 326655x127 331881480 single complex design 1x127 1016 double res 100x1x127 101600 double statfull 1x1 405052324 struct statfun 1x1 16 function_handle statobs 50631525x1 405052200 double time_eval 1x1 8 double time_pre 1x1 8 double ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Mon Jul 2 21:56:58 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Mon, 2 Jul 2007 21:56:58 +0200 Subject: using cfg.correctm = 'cluster' and related memory issues. In-Reply-To: Message-ID: Dear Sameer, > I am running into memory issues while trying to do non-parametric > statistical testing for coherence differences for my Neuromag 306 data. > > The statement causing overflow is line 277 in statistics_montecarlo: > statrand = zeros(size(statobs,1), size(res,1)); > This would be a matrix of size 50631525 X 100 corresponding to some 40 GB! > (Am I correct in assuming that the 100 is from cfg.numrandomization)? > > This statement is evoked if cfg.correctm = 'cluster'; > I could use cfg.correctm = max but I dont think this will do the right > analysis. > > The one thing I can think of is changing cfg.channelcmb to try and reduce > the number of combinations tried (but is not very preferable atleast right > now). Is there anything else that comes to mind? > > The cfg I am using and other info is added below. Using Fieldtrip for nonparametric statistical testing of the complete set of between-channel coherences is one step too far. As a first step, one should start comparing coherences with a single reference channel. I have described this methodology in a recent paper in the Journal of Neuroscience Methods (Maris et al., 2007). Unfortunately, there is not a tutorial for this type of analysis, and the help documentation does not bring you very far. This job is on my list, but I have not yet found the time. The bottom line is that testing coherence differences involving a reference channel is certainly feasible, but the documentation is lacking, Kind regards, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > Thank you for your time and help. > sameer > > >>cfg = []; > cfg.channelcmb = {'MEG' 'MEG'}; > cfg.method = 'montecarlo'; > cfg.statistic = 'indepsamplesZcoh'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.clusterthreshold = 'nonparametric'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 100; % make it larger for better testing > cfg.precision = 'single'; % experimenting to save memory > cfg.label = CSD_LL_200_400.label ; > cfg.channelcmb = CSD_LL_200_400.labelcmb; > > > [statistics] = freqstatistics(cfg, CSD_LL_200_400 , CSD_RR_200_400); > > Note: I use Cross Spectral density instead of coherence as coherence does > not keep trials. > > At the debug prompt after the error I have: > > K>> whos > Name Size Bytes Class > Attributes > > Nrand 1x1 8 double > cfg 1x1 60159588 struct > dat 326655x127 331881480 single > complex > design 1x127 1016 double > res 100x1x127 101600 double > statfull 1x1 405052324 struct > statfun 1x1 16 function_handle > statobs 50631525x1 405052200 double > time_eval 1x1 8 double > time_pre 1x1 8 double > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Mon Jul 2 22:14:55 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Mon, 2 Jul 2007 22:14:55 +0200 Subject: using cfg.correctm = 'cluster' and related memory issues. In-Reply-To: Message-ID: Dear Sameer, I forgot to mention that the analyses on which is reported in the J. Neuroscience Methods paper were done using Clusterrandanalysis.m, which is an older version of the Fieldtrip statistics. For testing coherence differences, Clusterrandanalysis.m is better suited than the new statistics functions. Good luck, Eric dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of > Sameer Walawalkar > Sent: Monday, July 02, 2007 7:05 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] using cfg.correctm = 'cluster' and related memory issues. > > Hello, > > I am running into memory issues while trying to do non-parametric > statistical testing for coherence differences for my Neuromag 306 data. > > The statement causing overflow is line 277 in statistics_montecarlo: > statrand = zeros(size(statobs,1), size(res,1)); > This would be a matrix of size 50631525 X 100 corresponding to some 40 GB! > (Am I correct in assuming that the 100 is from cfg.numrandomization)? > > This statement is evoked if cfg.correctm = 'cluster'; > I could use cfg.correctm = max but I dont think this will do the right > analysis. > > The one thing I can think of is changing cfg.channelcmb to try and reduce > the number of combinations tried (but is not very preferable atleast right > now). Is there anything else that comes to mind? > > The cfg I am using and other info is added below. > > Thank you for your time and help. > sameer > > >>cfg = []; > cfg.channelcmb = {'MEG' 'MEG'}; > cfg.method = 'montecarlo'; > cfg.statistic = 'indepsamplesZcoh'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.clusterthreshold = 'nonparametric'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 100; % make it larger for better testing > cfg.precision = 'single'; % experimenting to save memory > cfg.label = CSD_LL_200_400.label ; > cfg.channelcmb = CSD_LL_200_400.labelcmb; > > > [statistics] = freqstatistics(cfg, CSD_LL_200_400 , CSD_RR_200_400); > > Note: I use Cross Spectral density instead of coherence as coherence does > not keep trials. > > At the debug prompt after the error I have: > > K>> whos > Name Size Bytes Class > Attributes > > Nrand 1x1 8 double > cfg 1x1 60159588 struct > dat 326655x127 331881480 single > complex > design 1x127 1016 double > res 100x1x127 101600 double > statfull 1x1 405052324 struct > statfun 1x1 16 function_handle > statobs 50631525x1 405052200 double > time_eval 1x1 8 double > time_pre 1x1 8 double > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From c.hesse at FCDONDERS.RU.NL Tue Jul 3 11:41:55 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Tue, 3 Jul 2007 11:41:55 +0200 Subject: PC for Fieldtrip, yours experience In-Reply-To: <001f01c7bcb4$70b713d0$51210ad9@acer027f9640b7> Message-ID: Dear Olga, this is, in a way, a difficult question to answer. You obviously want a machine with lots of memory and a fast processor (possibly several)! Here at the FCDC we have a couple of 64 bit Linux machines with 16 Gb RAM, 220 Gb HD and 4 CPUs (Dual Core AMD Opteron(tm) Processor 270) And the majority of nodes in the cluster are 64 bit Linux machines with 4 Gb RAM, 220 Gb HD and 2 CPUs (Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz) It all depends on what (else) you want to do on the machine while it is Fieldtriping, how large your data sets are and how memory efficient your Matlab scripts are (i.e. not trying to have the data from 10 subjects in memory at the same time while doing coherence analysis with 300 channels :-) Hope this gives some indication Christian On 2 Jul 2007, at 16:22, Olga Sysoeva wrote: > Dear Fieldtrippers, > > sorry for annoying with the same question, but can you just > specified your own PC, which you use for analysing. We wish to > speed up our analysis. > > Best Regards. > Olga. > > ---------------------------------------------------------------------- > ------------------------------------------------------------------ > Dear all, > > It is probably a dull question, but can you specified the "good" PC > Computer for analysing 64-channel data in Fieldtrip. > > ---------------------------------- > > The aim of this list 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/ > > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From teresa at DSRF.ORG Tue Jul 3 11:42:39 2007 From: teresa at DSRF.ORG (Teresa Cheung) Date: Tue, 3 Jul 2007 02:42:39 -0700 Subject: Auto Reply Message-ID: Dear Colleagues, I am on vacation from Tuesday July 2 to Friday July 5. If you need to book MEG time, please contact julie at dsrf.org If you need help with MEG analysis, please contact Alexander at amoisieev at dsrf.org For other urgent inquiries, please contact dawn at dsrf.org. Otherwise, I will reply to your email early next week. Best regards, -Teresa Cheung Teresa Cheung MEG Laboratory Manager Down Syndrome Research Foundation 1409 Sperling Avenue Burnaby, BC Office: 604 444 3773 ext 2239 Lab: 604 444 3773 ext 2249 Cell: 604 313 0338 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Tue Jul 3 16:41:37 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 3 Jul 2007 10:41:37 -0400 Subject: using cfg.correctm = 'cluster' and related memory issues. In-Reply-To: <021c01c7bce5$a861e8b0$6701a8c0@fcdonders.nl> Message-ID: Dear Eric, Thank you for you reply. I am now trying to use clusterrandanalysis. It looks for data.dof. So for freqanalysis I have cfgCSD.method = 'mtmfft'; cfgCSD.keeptrials = 'yes' ; cfgCSD.keeptapers = 'yes' ; cfgCSD.calcdof = 'yes'; this leads to error on line 540 if calcdof freq.dof=2*repmat(cumtapcnt,[1,numfoi]); end; Basically, numfoi is not defined before this statement, and only appears once throughout the file. Should it be numel(foi) ? Best, Sameer p.s: incidently, ~exist(cumtapcnt) gives error. MATLAB needs ~exist('cumtapcnt') (it could be a version problem). On Mon, 2 Jul 2007, Eric Maris wrote: > Dear Sameer, > > > I forgot to mention that the analyses on which is reported in the J. > Neuroscience Methods paper were done using Clusterrandanalysis.m, which is > an older version of the Fieldtrip statistics. For testing coherence > differences, Clusterrandanalysis.m is better suited than the new statistics > functions. > > > Good luck, > > Eric > > dr. Eric Maris > NICI/Biological Psychology and > F.C. Donders Center for Cognitive NeuroImaging > University of Nijmegen > P.O. Box 9104 > 6500 HE Nijmegen > The Netherlands > T:+31 24 3612651 (NICI) > T:+31 24 3610754 (FCDC) > F:+31 24 3616066 (NICI) > E: maris at nici.ru.nl > MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > >> -----Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of >> Sameer Walawalkar >> Sent: Monday, July 02, 2007 7:05 PM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: [FIELDTRIP] using cfg.correctm = 'cluster' and related memory > issues. >> >> Hello, >> >> I am running into memory issues while trying to do non-parametric >> statistical testing for coherence differences for my Neuromag 306 data. >> >> The statement causing overflow is line 277 in statistics_montecarlo: >> statrand = zeros(size(statobs,1), size(res,1)); >> This would be a matrix of size 50631525 X 100 corresponding to some 40 GB! >> (Am I correct in assuming that the 100 is from cfg.numrandomization)? >> >> This statement is evoked if cfg.correctm = 'cluster'; >> I could use cfg.correctm = max but I dont think this will do the right >> analysis. >> >> The one thing I can think of is changing cfg.channelcmb to try and reduce >> the number of combinations tried (but is not very preferable atleast right >> now). Is there anything else that comes to mind? >> >> The cfg I am using and other info is added below. >> >> Thank you for your time and help. >> sameer >> >>>> cfg = []; >> cfg.channelcmb = {'MEG' 'MEG'}; >> cfg.method = 'montecarlo'; >> cfg.statistic = 'indepsamplesZcoh'; >> cfg.clusteralpha = 0.05; >> cfg.clusterstatistic = 'maxsum'; >> cfg.clusterthreshold = 'nonparametric'; >> cfg.minnbchan = 2; >> cfg.tail = 0; >> cfg.clustertail = 0; >> cfg.alpha = 0.05; >> cfg.numrandomization = 100; % make it larger for better testing >> cfg.precision = 'single'; % experimenting to save memory >> cfg.label = CSD_LL_200_400.label ; >> cfg.channelcmb = CSD_LL_200_400.labelcmb; >> >> >> [statistics] = freqstatistics(cfg, CSD_LL_200_400 , CSD_RR_200_400); >> >> Note: I use Cross Spectral density instead of coherence as coherence does >> not keep trials. >> >> At the debug prompt after the error I have: >> >> K>> whos >> Name Size Bytes Class >> Attributes >> >> Nrand 1x1 8 double >> cfg 1x1 60159588 struct >> dat 326655x127 331881480 single >> complex >> design 1x127 1016 double >> res 100x1x127 101600 double >> statfull 1x1 405052324 struct >> statfun 1x1 16 function_handle >> statobs 50631525x1 405052200 double >> time_eval 1x1 8 double >> time_pre 1x1 8 double >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the > FieldTrip >> toolbox, to share experiences and to discuss new ideas for MEG and EEG > analysis. >> See also http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Tue Jul 3 21:09:08 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 3 Jul 2007 15:09:08 -0400 Subject: plotting clusterandanalysis output. Message-ID: Hello, After doing clusterandanalysis for coherence differences, I want to plot the results using information on http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:clusterrandanalysis plotdata requires plotdata.label=clusrand.label; However as clusrand = stats: [280x3 double] raweffect: [280x3 double] obsmeanc1: [280x3 double] obsmeanc2: [280x3 double] posclusters: [1x1 struct] negclusters: [] posclusterslabelmat: [280x3 double] negclusterslabelmat: [] critvals: 57.8332 labelcmb: {280x2 cell} freq: [54.7264 59.7015 64.6766] time: NaN cfg: [1x1 struct] I use plotdata.label = 'MEG2443' as that is what I have used in cfg.channelcmb (see below). This gives ??? Error using ==> fieldtrip/private/nearest at 24 incorrect value what input cfg for clusrandanalysis would change this? My current (very experimental) cfg is cfg = []; cfg.channelcmb = { 'MEG2443' 'MEG'}; cfg.statistic = 'indepsamplesZcoh' ; cfg.alpha = 0.05 ; cfg.clusterteststat = 'maxsum' ; cfg.onetwo = 'onesided_1<2' ; cfg.makeclusters = 'yes' ; cfg.minnbchan = 2; cfg.nranddraws = 100; thanks for your time. best, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Wed Jul 4 11:26:43 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Wed, 4 Jul 2007 11:26:43 +0200 Subject: plotting clusterandanalysis output. In-Reply-To: Message-ID: Sameer, > After doing clusterandanalysis for coherence differences, I want to plot > the results using information on > http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu tori > al:clusterrandanalysis You have to do some work yourself here. Replace labelcmb by a one-dimensional cell array containing the labels of the non-reference channels, and then use a topoplot-function. Good luck, Eric dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > plotdata requires > > plotdata.label=clusrand.label; > > However as > > > clusrand = > > stats: [280x3 double] > raweffect: [280x3 double] > obsmeanc1: [280x3 double] > obsmeanc2: [280x3 double] > posclusters: [1x1 struct] > negclusters: [] > posclusterslabelmat: [280x3 double] > negclusterslabelmat: [] > critvals: 57.8332 > labelcmb: {280x2 cell} > freq: [54.7264 59.7015 64.6766] > time: NaN > cfg: [1x1 struct] > > I use > plotdata.label = 'MEG2443' as that is what I have used in cfg.channelcmb > (see below). This gives > > ??? Error using ==> fieldtrip/private/nearest at 24 > incorrect value > > what input cfg for clusrandanalysis would change this? My current (very > experimental) cfg is > > cfg = []; > cfg.channelcmb = { 'MEG2443' 'MEG'}; > cfg.statistic = 'indepsamplesZcoh' ; > cfg.alpha = 0.05 ; > cfg.clusterteststat = 'maxsum' ; > cfg.onetwo = 'onesided_1<2' ; > cfg.makeclusters = 'yes' ; > cfg.minnbchan = 2; > cfg.nranddraws = 100; > > > thanks for your time. > > best, > sameer > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From litvak at TECHUNIX.TECHNION.AC.IL Wed Jul 4 16:24:33 2007 From: litvak at TECHUNIX.TECHNION.AC.IL (Vladimir Litvak) Date: Wed, 4 Jul 2007 15:24:33 +0100 Subject: EGI reader Message-ID: Dear all, A new reader for EGIS format (which is far as I understand is one of several formats used by the EGI system) was added to the fileio toolbox starting from version 20070704. This reader is the first result of collaboration between Fieldtrip and SPM developers. It was developed by Joseph Dien (jdien at ku.edu) originally for SPM. EGI users are welcome to test the new reader and report any problems directly to Joseph (he is probably not subscribed to the list). Best, Vladimir ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From grigu at CBS.MPG.DE Thu Jul 5 13:57:51 2007 From: grigu at CBS.MPG.DE (Maren Grigutsch) Date: Thu, 5 Jul 2007 13:57:51 +0200 Subject: bug in statistics_montecarlo? Message-ID: Dear Robert, Eric and other fellows of the Fieldtrip team, I'm just trying out your excellent software, in specific your extremely useful and well designed statistics functions. Many thanks for this great and generous gift to the neuroscience community! I would like to point you to an inconsistency I seem to have found in the implementation of the statistics_montecarlo function. When I compared the probabilities computed with statistics_analytic and statistics_montecarlo for the depsamplesT test, the probabilities determined via the randomization test turned out to be too low by a factor of about 1/2, see code and Matlab output below. ------------------------- N = 50; M = 0.25; alpha = 0.05; tail = 0; % 'both' % construct a normally distributed difference vector % with unit variance and mean M d = randn(1,N); d = d ./ sqrt(var(d,1,2)); d = d -mean(d) + M; % compute a paired t-test [H,P,CI,stat] = ttest(d,0,alpha,tail) H = 0 P = 0.0864 CI = -0.0371 0.5371 stat = tstat: 1.7500 df: 49 sd: 1.0102 % generate two sample vectors with their difference given by d x =randn(1,N); y = x + d; % generate the design matrix for testing with fieldtrip design = [ 1:N 1:N % subject number repmat(1,[1 N]) repmat(2,[1 N]) % condition number ]; cfg = []; cfg.statistic = 'depsamplesT'; cfg.method = 'analytic'; cfg.correctm = 'no'; cfg.alpha = 0.05; cfg.tail = 0; cfg.uvar = 1; cfg.ivar = 2; [stat_analytic, cfg] = statistics_analytic(cfg,[x y],design) stat_analytic = stat: -1.7500 df: 49 critval: [-2.0096 2.0096] prob: 0.0864 mask: 0 cfg.numrandomization = 5000; [stat_montecarlo, cfg] = statistics_montecarlo(cfg,[x y],design) using "statfun_depsamplesT" for the single-sample statistics constructing randomized design total number of measurements = 100 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of control variables = 0 number of within-block variables = 0 repeated measurement in variable 1 over 50 levels number of repeated measurements in each level is 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 estimated time per randomization is 0 seconds not performing a correction for multiple comparisons stat_montecarlo = prob: 0.0394 mask: 1 stat: -1.7500 -------------------- Maybe I'm missing something. But I think you should replace stat.prob = min(prb_neg, prb_pos); by stat.prob = 2 *min(prb_neg, prb_pos); in line 344 of statistics_montecarlo(), for the two-tailed test. Maybe it would be even better to compare the absolute values of the observed and the randomized statistics, i.e. doing something like this for i=1:Nrand, .... if tail == 0, prb_pos = prb_pos + (abs(statobs) Message-ID: On 29 Jun 2007, at 9:12, Valesca Kooijman wrote: >> Warning: cannot convert matlab version into a number >> In eeglab2fieldtrip>matlabversion at 265 >> In eeglab2fieldtrip>fixprecision at 230 >> In eeglab2fieldtrip at 149 >> ??? Index exceeds matrix dimensions. >> >> Error in ==> eeglab2fieldtrip at 149 >> data.trial{index} = fixprecision(EEG.data(:,:,index)); Hi Valesca The up-to-date version of eeglab2fieldtrip that is included in fieldtrip has something else on line 149, and does not call the fixprecision function. I suggest that you upgrade to the latest fieldtrip version and try with that. Alternatively you can try a more recent matlab version. 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 5 17:06:16 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 5 Jul 2007 17:06:16 +0200 Subject: Interpolating bad channels in EEG In-Reply-To: Message-ID: Hi Helen > Is there a function in Fieldtrip that can replace data from a bad EEG > channel using interpolation of neighbouring channels? There is the function MEGREPAIR, which also will work on EEG channels. It does require that you specify a structure with electrode positions in 3D. See http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#how_are_electrodes _magnetometers_or_gradiometers_described and see READ_FCDC_ELEC. Since the function was written for MEG data, you have to add the electrode structure to the data as if it is a gradiometer structure, i.e. elec = something... data.grad = elec prior to calling MEGREPAIR. You also have to specify cfg.neighbourdist in the same units as they are in your electrode definition (e.g. cm or mm). 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 5 17:25:04 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 5 Jul 2007 17:25:04 +0200 Subject: Volume conduction model for EEG DICS beamforming In-Reply-To: Message-ID: Hi Jared, On 29 Jun 2007, at 3:31, Jared Van Snellenberg wrote: > I'm currently working on a few DICS beamforming analyses for an EEG > dataset > I have, and I have a couple of questions regarding obtaining a good > volume > conduction model to include in the cfg.vol input to sourceanalysis. > > I do not have MRIs or headshape information for my subjects, but of > course > I have electrode position information in spherical coordinates > (stored in > an elec structure imported from a BESA .elp file). As far as I know, the BESA elp format only contains the two angles that define the electrode position in spherical coordinates (i.e. see http://en.wikipedia.org/wiki/Spherical_coordinates) to project them onto a spherical head model. The 3D carthesian coordinates would be more usefull and realistic (i.e. an x, y, and z value for each electrode). > It's not clear to me how to generate a volume conduction model with > this > information, so any guidance here would be greatly appreciated. > Ideally, I > would like to use a 4-shell model. You can use a 4-shell concentric sphere model. That is specified using vol.r = [r1 r2 r3 r4] % radii of the shperes vol.c = [c1 c2 c3 c4] % conductivit within each sphere vol.o = [x y z] % optional, origin of the sphere. Default is to assume [0 0 0] You can fit the radius of the outermost sphere to the electrodes. For the elp files I would assume that the origin of the sphere would be [0 0 0], which means that you do not have to specify that. The standard spherical model used in BESA is vol = r: [71 72 79 85] c: [0.3300 1 0.0042 0.3300] o: [0 0 0] > The FIELDTRIP documentation indicates > that this model is implemented, but I can not seem to find the > relevant > function (and prepare_singleshell requires headshape information or > an nx3 > sensor array--I presume in grid coordinates--that I do not have). The prepare_localspheres and prepare_singleshell are indeed for MEG volume conductors. They can use a polhemus scanned surface of the head, or a large set of points on the brain (from an MRI) or they can use a segmented anatomical MRI. > Finally, > all of the relevant prepare_XXX functions seem to indicate that > they are > specifically for MEG data, so I wanted to make sure that whatever > approach > I use is appropriate for EEG electrodes rather than MEG sensors. You can also use a standard realistic EEG model using the boundary element method (BEM), which is based on the SPM/MNI template brain. That is not included by default in the fieldtrip release version but I have just copied it as a seperate file to our ftp server. You can find it on ftp://ftp.fcdonders.nl/pub/fieldtrip/standard_BEM.zip 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/fcdonders/fieldtrip. From maris at NICI.RU.NL Thu Jul 5 21:51:03 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 5 Jul 2007 21:51:03 +0200 Subject: bug in statistics_montecarlo? In-Reply-To: <468CDCBF.50707@cbs.mpg.de> Message-ID: Dear Maren, > I'm just trying out your excellent software, in specific your extremely > useful and well designed statistics functions. Many thanks for this > great and generous gift to the neuroscience community! > > I would like to point you to an inconsistency I seem to have found in > the implementation of the statistics_montecarlo function. When I > compared the probabilities computed with statistics_analytic and > statistics_montecarlo for the depsamplesT test, the probabilities > determined via the randomization test turned out to be too low by a > factor of about 1/2, see code and Matlab output below. Most likely, there will be a bug in statistics_montecarlo somewhere, but I do not think that your numerical demonstration is evidence for such a bug. The following points are relevant in this respect: 1. For a permutation test to be correct (in the sense that it controls the false alarm rate), it is NOT required that it produces the same p-value as the corresponding parametric test (i.e., using the same test statistic and calculating the p-value under auxiliary assumption of normality). 2. To show that there is a bug in the statistics_montecarlo, you must show that its permutation p-values do not have the properties they should have according to the theory behind permutation tests (see, Maris and Oostenveld, in the most recent issue of the Journal of Neuroscience Methods). For instance, you could do the following: 1. Take a test statistic, e.g., the dependent samples t-statistic. 2. Generate N pairs of observations from a bivariate distribution with identical marginal distributions (this is the null hypothesis of a permutation test for a within-units study). 3. Calculate the permutation p-value under the permutation distribution, which is obtained by randomly permuting the elements of the N pairs. 4. Repeat steps 2-3 a large number of times and calculate the proportion of times that it is less than 0.05. 5. If the proportion in 4. is significantly different from 0.05 (the nomical alpha-level) you have shown that there is bug in statistics_montecarlo. A simulation study of the type described here was performed by Maris, Schoffelen, & Fries (2007, also in the Journal of Neuroscience Methods) to show that a permutation test for coherence differences controls the false alarm rate whereas the corresponding parametric test does not. Kind regards, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > ------------------------- > > N = 50; > M = 0.25; > alpha = 0.05; > tail = 0; % 'both' > > % construct a normally distributed difference vector > % with unit variance and mean M > d = randn(1,N); > d = d ./ sqrt(var(d,1,2)); > d = d -mean(d) + M; > > % compute a paired t-test > [H,P,CI,stat] = ttest(d,0,alpha,tail) > > H = > > 0 > > > P = > > 0.0864 > > > CI = > > -0.0371 0.5371 > > > stat = > > tstat: 1.7500 > df: 49 > sd: 1.0102 > > % generate two sample vectors with their difference given by d > x =randn(1,N); > y = x + d; > > % generate the design matrix for testing with fieldtrip > design = [ > 1:N 1:N % subject number > repmat(1,[1 N]) repmat(2,[1 N]) % condition number > ]; > > cfg = []; > cfg.statistic = 'depsamplesT'; > cfg.method = 'analytic'; > cfg.correctm = 'no'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.uvar = 1; > cfg.ivar = 2; > > [stat_analytic, cfg] = statistics_analytic(cfg,[x y],design) > > stat_analytic = > > stat: -1.7500 > df: 49 > critval: [-2.0096 2.0096] > prob: 0.0864 > mask: 0 > > cfg.numrandomization = 5000; > [stat_montecarlo, cfg] = statistics_montecarlo(cfg,[x y],design) > > using "statfun_depsamplesT" for the single-sample statistics > constructing randomized design > total number of measurements = 100 > total number of variables = 2 > number of independent variables = 1 > number of unit variables = 1 > number of control variables = 0 > number of within-block variables = 0 > repeated measurement in variable 1 over 50 levels > number of repeated measurements in each level is 2 2 2 2 2 2 2 2 2 2 2 2 > 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 > estimated time per randomization is 0 seconds > not performing a correction for multiple comparisons > > stat_montecarlo = > > prob: 0.0394 > mask: 1 > stat: -1.7500 > > -------------------- > > Maybe I'm missing something. But I think you should replace > > stat.prob = min(prb_neg, prb_pos); > by > stat.prob = 2 *min(prb_neg, prb_pos); > > in line 344 of statistics_montecarlo(), for the two-tailed test. > > Maybe it would be even better to compare the absolute values of the > observed and the randomized statistics, i.e. doing something like this > > for i=1:Nrand, > .... > if tail == 0, > prb_pos = prb_pos + (abs(statobs) end > ... > end > if tail == 0, > stat.prob = prb_pos./Nrand; > end > > > What do you think? > > Many thanks in advance for your comments. > Best regards, > --Maren > > -- > Max Planck Institute for Human Cognitive and Brain Sciences > Dipl.-Phys. Maren Grigutsch mailto:grigu at cbs.mpg.de > Stephanstr.1a http://www.cbs.mpg.de > 04103 Leipzig, Germany phone/fax: +49 341 9940-136/-260 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kooijman at TIFN.NL Fri Jul 6 08:27:12 2007 From: Kooijman at TIFN.NL (Valesca Kooijman) Date: Fri, 6 Jul 2007 08:27:12 +0200 Subject: eeglab2fieldtrip In-Reply-To: Message-ID: Hi Robert, The latest version of eeglab2fieldtrip gives me the same error message in line 146 (where it calls the fixprecission function, instead of in line 149). Is there another solution? If not, which version of matlab do you recommend? Thanks, Valesca Robert Oostenveld Sent by: FieldTrip discussion list 07/05/2007 05:00 PM Please respond to FieldTrip discussion list To FIELDTRIP at NIC.SURFNET.NL cc Subject Re: [FIELDTRIP] eeglab2fieldtrip On 29 Jun 2007, at 9:12, Valesca Kooijman wrote: >> Warning: cannot convert matlab version into a number >> In eeglab2fieldtrip>matlabversion at 265 >> In eeglab2fieldtrip>fixprecision at 230 >> In eeglab2fieldtrip at 149 >> ??? Index exceeds matrix dimensions. >> >> Error in ==> eeglab2fieldtrip at 149 >> data.trial{index} = fixprecision(EEG.data(:,:,index)); Hi Valesca The up-to-date version of eeglab2fieldtrip that is included in fieldtrip has something else on line 149, and does not call the fixprecision function. I suggest that you upgrade to the latest fieldtrip version and try with that. Alternatively you can try a more recent matlab version. 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/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From grigu at CBS.MPG.DE Fri Jul 6 15:27:14 2007 From: grigu at CBS.MPG.DE (Maren Grigutsch) Date: Fri, 6 Jul 2007 15:27:14 +0200 Subject: bug in statistics_montecarlo? In-Reply-To: <00d501c7bf3d$d1a796c0$b0ccae83@fcdonders.nl> Message-ID: Eric Maris wrote: >Dear Maren, > > >Most likely, there will be a bug in statistics_montecarlo somewhere, but I >do not think that your numerical demonstration is evidence for such a bug. > >The following points are relevant in this respect: > > > 1. For a permutation test to be correct (in the sense that it controls the > false alarm rate), it is NOT required that it produces the same p-value as > the corresponding parametric test (i.e., using the same test statistic and > calculating the p-value under auxiliary assumption of normality). > > > Dear Eric, Many thanks for your fast response! You may be right that the data I sent you cannot be regarded as an unequivocal evidence for a bug in statistics_montecarlo. What I had in mind and wanted to demonstrate to you was the following: The dependent samples t-test gives accurate P-values if the sampling distribution of the difference of means is roughly normal, as was the case in my example. The permutation distribution of the dependent samples t-statistic approximates the sampling distribution of t-values under the null hypothesis. For my example with normally distributed differences and 5000 permutations, the permutation distribution should closely resemble the theoretical t distribution underlying the analytic t-test. Thus, I had expected te get roughly the same p-values from both the analytic and the permutation t-test. However, when I repeated my simulations many times, the p-values obtained from statistics_montecarlo, using a two-tailed test, were always smaller by a factor of about 1/2 as compared to the p-values obtained from statistics_analytic or Matlab's ttest function. In contrast, when I applied a one-sided test the P-values were roughly the same between the different functions. > >2. To show that there is a bug in the statistics_montecarlo, you must show >that its permutation p-values do not have the properties they should have >according to the theory behind permutation tests (see, Maris and Oostenveld, >in the most recent issue of the Journal of Neuroscience Methods). For >instance, you could do the following: > >1. Take a test statistic, e.g., the dependent samples t-statistic. > >2. Generate N pairs of observations from a bivariate distribution with >identical marginal distributions (this is the null hypothesis of a >permutation test for a within-units study). > >3. Calculate the permutation p-value under the permutation distribution, >which is obtained by randomly permuting the elements of the N pairs. > >4. Repeat steps 2-3 a large number of times and calculate the proportion >of times that it is less than 0.05. > >5. If the proportion in 4. is significantly different from 0.05 (the >nomical alpha-level) you have shown that there is bug in >statistics_montecarlo. > > > > Well, this sounds very convincing. To follow your suggestions I ran the following script (using only 500 permutations, for the sake of time): --------- Nrep = 500; Nperm = 500; N = 50; design = [ 1:N 1:N % subject number repmat(1,[1 N]) repmat(2,[1 N]) % condition number ]; cfg = []; cfg.statistic = 'depsamplesT'; cfg.method = 'montecarlo'; cfg.correctm = 'no'; cfg.alpha = 0.05; cfg.tail = 0; cfg.uvar = 1; % "subject" is unit of observation (unit factor) cfg.ivar = 2; % "condition" is the independent variable (repeated measures) cfg.numrandomization = Nperm; cfg.feedback = 'no'; prob = zeros(1,Nrep); T = zeros(1,Nrep); wb = waitbar(0,'Please wait...'); for k=1:Nrep, x = randn(1,N); y = randn(1,N); [stat_montecarlo, cfg] = statistics_montecarlo(cfg,[x y],design); prob(k) = stat_montecarlo.prob; T(k) = stat_montecarlo.stat; waitbar(k/Nrep,wb); end close(wb); % should be approximately 0.05 sum(prob<0.05) / Nrep ------- And here is the result: ans = 0.1000 If I got it correctly, this means that the observed FA rate (0.1) is twice the expected value of 0.05 (the nominal alpha level). So it still seems to me that there is something wrong with statistics_montecarlo. I'm just about reading the paper of yours mentioned above. In section 3.1.1 you describe cluster-based nonparametric statistical tests, and you give the following statement: "for a two-sided test, we select test statistics whose absolute value is larger than some threshold". In my opinion, this is exactly what should be done in statistics_montecarlo for a two-sided test: comparing the *absolute* t-values. >A simulation study of the type described here was performed by Maris, >Schoffelen, & Fries (2007, also in the Journal of Neuroscience Methods) to >show that a permutation test for coherence differences controls the false >alarm rate whereas the corresponding parametric test does not. > > Thank you for pointing me to that paper. I'm sure it will help me a lot to improve my understanding of nonparametric statistical tests. I'm looking forward to your response. Hope not to bother you too much. But I think the issue has some impact and is worth to be thoroughly discussed. Best regards, --Maren > > > > >Kind regards, > > > > > >Eric Maris > > > >dr. Eric Maris > >NICI/Biological Psychology and > >F.C. Donders Center for Cognitive NeuroImaging > >University of Nijmegen > >P.O. Box 9104 > >6500 HE Nijmegen > >The Netherlands > >T:+31 24 3612651 (NICI) > >T:+31 24 3610754 (FCDC) > >F:+31 24 3616066 (NICI) > >E: maris at nici.ru.nl > >MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > -- Max Planck Institute for Human Cognitive and Brain Sciences Dipl.-Phys. Maren Grigutsch mailto:grigu at cbs.mpg.de Stephanstr.1a http://www.cbs.mpg.de 04103 Leipzig, Germany phone/fax: +49 341 9940-136/-260 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jaredvs at GMAIL.COM Sat Jul 7 05:12:49 2007 From: jaredvs at GMAIL.COM (Jared Van Snellenberg) Date: Fri, 6 Jul 2007 23:12:49 -0400 Subject: Volume conduction model for EEG DICS beamforming In-Reply-To: <4D495628-E1DE-4D4B-9CEF-A55136D6FCDF@fcdonders.ru.nl> Message-ID: Hi Robert, Thanks very much for the clarifications. Quick question about the BEM model you supplied--is it correct to just pass in the vol structure contained in the standard_vol.mat along with an elec structure containing the nx3 array of electrode coordinates in MNI space? That is, is the following correct: load standard_vol.mat cfg.vol=vol; cfg.elec=elec; %predefined; 59 electrode coordinates in MNI results=sourceanalysis(cfg,data); Thanks, -Jared Van Snellenberg On 7/5/07, Robert Oostenveld wrote: > > Hi Jared, > > On 29 Jun 2007, at 3:31, Jared Van Snellenberg wrote: > > I'm currently working on a few DICS beamforming analyses for an EEG > > dataset > > I have, and I have a couple of questions regarding obtaining a good > > volume > > conduction model to include in the cfg.vol input to sourceanalysis. > > > > I do not have MRIs or headshape information for my subjects, but of > > course > > I have electrode position information in spherical coordinates > > (stored in > > an elec structure imported from a BESA .elp file). > > As far as I know, the BESA elp format only contains the two angles > that define the electrode position in spherical coordinates (i.e. see > http://en.wikipedia.org/wiki/Spherical_coordinates) to project them > onto a spherical head model. The 3D carthesian coordinates would be > more usefull and realistic (i.e. an x, y, and z value for each > electrode). > > > It's not clear to me how to generate a volume conduction model with > > this > > information, so any guidance here would be greatly appreciated. > > Ideally, I > > would like to use a 4-shell model. > > You can use a 4-shell concentric sphere model. That is specified using > vol.r = [r1 r2 r3 r4] % radii of the shperes > vol.c = [c1 c2 c3 c4] % conductivit within each sphere > vol.o = [x y z] % optional, origin of the sphere. Default is to > assume [0 0 0] > > You can fit the radius of the outermost sphere to the electrodes. For > the elp files I would assume that the origin of the sphere would be > [0 0 0], which means that you do not have to specify that. > > The standard spherical model used in BESA is > vol = > r: [71 72 79 85] > c: [0.3300 1 0.0042 0.3300] > o: [0 0 0] > > > The FIELDTRIP documentation indicates > > that this model is implemented, but I can not seem to find the > > relevant > > function (and prepare_singleshell requires headshape information or > > an nx3 > > sensor array--I presume in grid coordinates--that I do not have). > > The prepare_localspheres and prepare_singleshell are indeed for MEG > volume conductors. They can use a polhemus scanned surface of the > head, or a large set of points on the brain (from an MRI) or they can > use a segmented anatomical MRI. > > > Finally, > > all of the relevant prepare_XXX functions seem to indicate that > > they are > > specifically for MEG data, so I wanted to make sure that whatever > > approach > > I use is appropriate for EEG electrodes rather than MEG sensors. > > You can also use a standard realistic EEG model using the boundary > element method (BEM), which is based on the SPM/MNI template brain. > That is not included by default in the fieldtrip release version but > I have just copied it as a seperate file to our ftp server. You can > find it on ftp://ftp.fcdonders.nl/pub/fieldtrip/standard_BEM.zip > > 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/fcdonders/fieldtrip. > -- Jared Van Snellenberg Social Cognitive Affective Neuroscience Unit http://scan.psych.columbia.edu (212) 854-7858 p (212) 854-3609 f Department of Psychology, Columbia University 406 Schermerhorn Hall 1190 Amsterdam Avenue, Mail Code 5501 New York, NY 10027 _______________________________ "Luck is the residue of design" -Attributed to Branch Rickey, former US Baseball Administrator, and also to John Milton. Go figure. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Sat Jul 7 13:48:55 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Sat, 7 Jul 2007 13:48:55 +0200 Subject: Volume conduction model for EEG DICS beamforming In-Reply-To: <51d499680707062012i76928451te1a47f515e26abd9@mail.gmail.com> Message-ID: On 7 Jul 2007, at 5:12, Jared Van Snellenberg wrote: > Quick question about the BEM model you supplied--is it correct to > just pass in the vol structure contained in the standard_vol.mat > along with an elec structure containing the nx3 array of electrode > coordinates in MNI space? That is, is the following correct: > > load standard_vol.mat > cfg.vol=vol; > cfg.elec=elec; %predefined; 59 electrode coordinates in MNI > results=sourceanalysis(cfg,data); Yes, but only if the electrode labels in your data match with the complete set or a subset of the labels in elec (it is case sensitive). The intersection of data.label and elec.label will be used for sourecanalysis. However, for EEG source analysis your data should be average referenced. And that is something that you do during preprocessing (or optionally timelockanalysis). That means that all channels in your data for which there is a corresponding electrode position in the elec structure should be average referenced. Prior to sourceanalysis, you can use the headmodelplot function (or electroderealign with method=interactive) to check that the electrodes ly on the skin compartment of the MNI head model. 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Sat Jul 7 14:09:15 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Sat, 7 Jul 2007 14:09:15 +0200 Subject: eeglab2fieldtrip In-Reply-To: Message-ID: On 6 Jul 2007, at 8:27, Valesca Kooijman wrote: > The latest version of eeglab2fieldtrip gives me the same error > message in line 146 (where it calls the fixprecission function, > instead of in line 149). > Is there another solution? If not, which version of matlab do you > recommend? Matlab 7.0.1 is an old version, released around end 2004. It was quickly superseeded with version 7.0.4 to fix some serious bugs. I reccommend people in general to work with the latest matlab versionm, which now is 7.4. You can fix your problem by changing the "matlabversion" function which is included as subfunction inside the eeglab2fieldtrip function. Go to line 250 and replace the code there with the snippet below. I will make the same change in the release version. Robert ---- function [v] = matlabversion; s = ver('matlab'); v = s.Version; if ischar(v) % try converting to a number n = str2num(v); if isempty(n) switch v case '6.5.1' n = 6.5; % this is accurate enough case '7.0.1' n = 7.0; % this is accurate enough case '7.0.4' n = 7.0; % this is accurate enough otherwise warning('cannot convert matlab version into a number'); v = v; end end v = n; end ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Sun Jul 8 21:11:10 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Sun, 8 Jul 2007 15:11:10 -0400 Subject: clusterandanalysis: negculsters vs posclusters and onesided vs two sided tests. Message-ID: Dear Fieldtrippers, I have been implementing clusterandanalysis (instead of freqstatistics) according to Eric Mariss suggestion to find coherence differences between trials. However I seem to be getting some confusing results. I do the following for i = 1: numel(MEGchan) cfg = []; cfg.channelcmb = { MEGchan{i} 'MEG'}; cfg.statistic = 'indepsamplesZcoh' ; cfg.onetwo = 'onesided_1<2 ; OR cfg.onetwo = 'onesided_2<1; cfg.alpha = 0.05 ; cfg.clusterteststat = 'maxsum' ; cfg.makeclusters = 'yes' ; cfg.minnbchan = 2; cfg.nranddraws = 1000; [clusrand] = clusterrandanalysis(cfg, CSD1 , CSD2); clusrand_Coh_1greater2{i} = clusrand; OR clusrand_Coh_2greater1{i} = clusrand; OR clusrand_Coh_twosided{i} = clusrand; end cfg.onetwo = 'onesided_1<2 ; as well as cfg.onetwo = 'onesided_2<1; find the same positive clusters (posclusters) for one of the 6 sensors belonging to MEGchans (the other 5 return empty posclusters and negclusters). I would have thought the cluster which shows up as posculster in 'onesided_1<2 should show up as negcluster in 'onesided_2<1. Secondly, cfg.onetwo = 'twosided' ; returns clustering effects for channels other than the one seen above and show only negclusters. At the same time the channel which showed posclusters in the two one sided tests shows no custering in coherence. Does this make sense? If yes, what is it? Thanks a lot for your time. Your replies are always much appreciated. Best, sameer p.s: Ill admit that the questions written above also partly stem from my lack of deep understanding of clustering analysis, and in particular, I have no idea what is meant by negative and positive clusters. It would be great if someone could point me to some reading material. I have tried, but, have been unable to find any definition on negative clusters and positive clusters, though I have some idea about how clustering works. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From J.Geuze at STUDENT.RU.NL Mon Jul 9 12:22:15 2007 From: J.Geuze at STUDENT.RU.NL (Jeroen Geuze) Date: Mon, 9 Jul 2007 12:22:15 +0200 Subject: freqanalysis_mtmconvol Message-ID: Dear Fieltrip team, I'm using freqanalysis_mtmconvol to extract single trial TFR data. What I noticed when running the code is that not all my trials end up in the 4D powspctrm field of the result struct. I have used two datasets. One contains 193 trials and the other 324. When I run freqanalysis, I am left with 154 and 140 trials respectively in the rpt part of powspctrm. Is there a problem here or is my fieldtrip ignorance playing up. The config I used: cfg = []; cfg.output = 'pow'; cfg.channel = 'all'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 5:1:40; cfg.t_ftimwin = 4./cfg.foi; % 4 cycles per time window cfg.toi = -0.5:0.05:2; cfg.keeptrials = 'yes'; Thanks in advance for any help, Jeroen Geuze ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Mon Jul 9 13:27:02 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 9 Jul 2007 13:27:02 +0200 Subject: freqanalysis_mtmconvol In-Reply-To: <37814C52-03FE-4CE8-8FBA-11142B6BA59A@student.ru.nl> Message-ID: Hi Jeroen, The cfg looks okay as far as I can see. Does freqanalysis say the correct amount of trials when you call it? (It starts up with saying something like "the input is raw data with . channels and . trials) If it does not say anything like this, it could be that you are using an old version of FieldTrip. (not that an old version could be an explanation for this though). I have no idea what it could be, but probably it has to do with the data set that you give in. Could it be that the trials do not all have the same time axis, and that some trials are not from -0.5 to 2 seconds and therefore omitted since cfg.toi = -0.5:0.05:2; If not can you give some more information on your data, what are the time axis of the trials, what did you do before calling freqanalysis? Bests Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Jeroen Geuze Sent: Monday, July 09, 2007 12:22 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] freqanalysis_mtmconvol Dear Fieltrip team, I'm using freqanalysis_mtmconvol to extract single trial TFR data. What I noticed when running the code is that not all my trials end up in the 4D powspctrm field of the result struct. I have used two datasets. One contains 193 trials and the other 324. When I run freqanalysis, I am left with 154 and 140 trials respectively in the rpt part of powspctrm. Is there a problem here or is my fieldtrip ignorance playing up. The config I used: cfg = []; cfg.output = 'pow'; cfg.channel = 'all'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 5:1:40; cfg.t_ftimwin = 4./cfg.foi; % 4 cycles per time window cfg.toi = -0.5:0.05:2; cfg.keeptrials = 'yes'; Thanks in advance for any help, Jeroen Geuze ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From J.Geuze at STUDENT.RU.NL Mon Jul 9 13:29:58 2007 From: J.Geuze at STUDENT.RU.NL (Jeroen Geuze) Date: Mon, 9 Jul 2007 13:29:58 +0200 Subject: freqanalysis_mtmconvol In-Reply-To: <37814C52-03FE-4CE8-8FBA-11142B6BA59A@student.ru.nl> Message-ID: Dear Fieldtrip team, My sincere apologies for spamming your mailbox (twice), there seemed to be a wrong flag somewhere in my code, causing a data set mix up. The problem is solved now. Regards, Jeroen. On Jul 9, 2007, at 12:22 PM, Jeroen Geuze wrote: > Dear Fieltrip team, > > I'm using freqanalysis_mtmconvol to extract single trial TFR data. > What I noticed when running the code is that not all my trials end > up in the 4D powspctrm field of the result struct. I have used two > datasets. One contains 193 trials and the other 324. When I run > freqanalysis, I am left with 154 and 140 trials respectively in the > rpt part of powspctrm. Is there a problem here or is my fieldtrip > ignorance playing up. > The config I used: > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'all'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.foi = 5:1:40; > cfg.t_ftimwin = 4./cfg.foi; % 4 cycles per time window > cfg.toi = -0.5:0.05:2; > cfg.keeptrials = 'yes'; > > Thanks in advance for any help, > > > Jeroen Geuze > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marie at PSY.GLA.AC.UK Thu Jul 12 11:25:33 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Thu, 12 Jul 2007 10:25:33 +0100 Subject: Job advertisement - CCNI Glasgow Message-ID: UNIVERSITY of GLASGOW DEPARTMENT OF PSYCHOLOGY Centre for Cognitive Neuroimaging (CCNi) POST DOCTORAL RESEARCH ASSISTANT 1 year fixed term appointment, £23,692 - £26,666 per annum REF: 13436/DPO/A3 Applications are invited for a Postdoctoral Research Assistant to work with Dr. Guillaume Rousselet in the newly established Centre for Cognitive Neuroimaging (CCNi). The CCNi is a research institution with state-of-the-art EEG and TMS systems and a large computing grid. Within the next few months a new fMRI and MEG system will be installed. The position is offered for a period of one year with potential 1-2 year extension pending funding approval. Several research projects are available, dealing with the rapid visual processing of faces, objects, and natural scenes. The primary goal of these projects is to map systematically how statistical image properties impact brain and behavioural responses, using a range of psychophysics paradigms and EEG techniques. You will be able to think out of the box in terms of EEG analyses and statistical procedures. You will be qualified, with a PhD, or equivalent, in Psychophysics, Cognitive Neuroscience, or a closely related discipline. Strong Matlab programming skills and psychophysics are essential. EEG expertise is not required and appropriate training will be provided. Finally, you should have a strong interest in developing your own scientific program and pursuing a research career. This post is available from 1 September 2007. Informal enquiries may be made to Dr. Guillaume Rousselet, (+44 (0) 141 330 6652; g.rousselet at psy.gla.ac.uk). For further details about the post and how to apply: see our web site at http://www.psy.gla.ac.uk/jobs.php or contact Clare Alexander, Department of Psychology,University of Glasgow, G12 8QQ (+44 (0)141 330 5090, e-mail c.alexander at psy.gla.ac.uk or the University web site at www.gla.ac.uk Closing date: Friday 3rd August 2007. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kooijman at TIFN.NL Fri Jul 13 11:02:44 2007 From: Kooijman at TIFN.NL (Valesca Kooijman) Date: Fri, 13 Jul 2007 11:02:44 +0200 Subject: eeglab2fieldtrip In-Reply-To: <433064D4-1D28-43C8-B1B3-0E926E407173@fcdonders.ru.nl> Message-ID: Hi Robert, In connection with your previous advice concerning the eeglab2fieldtrip script, we came accross the following problem and solution (see script below): filename = 'fk dag 5-Deci.set'; load(filename, '-mat'); %the next line was included because the eeglab2fieldtrip script says % %data.trial{index} = fixprecision(EEG.data(:,:,index)); % while the variable EEG.data only contains the name of the variable and not the data % the next line assigns the data to EEG.data EEG.data = EEGDATA; %%%%%% data = eeglab2fieldtrip(EEG,'preprocessing'); hdr.nChans = length(data.label); hdr.label = data.label; hdr.Fs = data.fsample; write_fcdc_data(filename, EEG.data, 'header', hdr, 'dataformat', 'brainvision_eeg'); I do still get the following warning after running the above script: Warning: writing segmented data as if it were continuous In fieldtrip-20070710\private\write_brainvision_eeg at 38 In fieldtrip-20070710\private\write_data at 63 In write_fcdc_data at 48 In ConversionEEGDATA at 13 Is this problematic or is this a standard warning following conversion to Vision Analyzer? In addition, I was wondering where my trial onset markers are written to? Write_fcdc_data only generates a .eeg and a .hdr file, and not a .vmrk file. >>From your earlier emails I understood that the datamatrix should be converted to ntrials X nchans X nsamples before running write­_fcdc_data. Currently my datamatrix consists of nchans X nsamples X ntrials. Would you mind letting me know how I can convert my datamatrix? Thanks a lot. Best, Valesca Robert Oostenveld Sent by: FieldTrip discussion list 07/07/2007 02:09 PM Please respond to FieldTrip discussion list To FIELDTRIP at NIC.SURFNET.NL cc Subject Re: [FIELDTRIP] eeglab2fieldtrip On 6 Jul 2007, at 8:27, Valesca Kooijman wrote: > The latest version of eeglab2fieldtrip gives me the same error > message in line 146 (where it calls the fixprecission function, > instead of in line 149). > Is there another solution? If not, which version of matlab do you > recommend? Matlab 7.0.1 is an old version, released around end 2004. It was quickly superseeded with version 7.0.4 to fix some serious bugs. I reccommend people in general to work with the latest matlab versionm, which now is 7.4. You can fix your problem by changing the "matlabversion" function which is included as subfunction inside the eeglab2fieldtrip function. Go to line 250 and replace the code there with the snippet below. I will make the same change in the release version. Robert ---- function [v] = matlabversion; s = ver('matlab'); v = s.Version; if ischar(v) % try converting to a number n = str2num(v); if isempty(n) switch v case '6.5.1' n = 6.5; % this is accurate enough case '7.0.1' n = 7.0; % this is accurate enough case '7.0.4' n = 7.0; % this is accurate enough otherwise warning('cannot convert matlab version into a number'); v = v; end end v = n; end ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak at TECHUNIX.TECHNION.AC.IL Fri Jul 13 17:34:45 2007 From: litvak at TECHUNIX.TECHNION.AC.IL (Vladimir Litvak) Date: Fri, 13 Jul 2007 16:34:45 +0100 Subject: out of memory - window machine In-Reply-To: <51d499680706281957v2b1c34bfx48d7a15f0ff82ca2@mail.gmail.com> Message-ID: Dear all, I've been to a Mathworks workshop yesterday and they talked about their new distributed computing toolbox (version 3.1). What they say is that if one has a computer cluster it is possible to install a slave Matlab engine on each machine and declare a variable that will be distributed among all the machines and thereby utilize all their memory even without parallelizing any of the computations. Of course things will run rather slowly that way. Moreover, it should also be possible to run several instances of this engine on the same machine and make use of multiple core processors (if the code is parallelized) but also address more than 2Gb of memory on a 32-bit machine given that every instance of the engine stores less than 2Gb. I have not tried any of this, but if you try and it works for you I'd be very interested to hear about it. Best, Vladimir _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Jared Van Snellenberg Sent: Friday, June 29, 2007 3:58 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] out of memory - window machine Hi Virginie, There are a couple of other things you can do. First, make certain that you are not growing any variables inside a loop. For example, if you have any code like: for i=1:size(data,1) for j=1:size(data,2) newvar(i,j)=data(i,j); end end make sure that you precede this code with: newvar=zeros(size(data)); This will not only speed up the execution of your code but can prevent memory errors in matlab. Second, use the clear function to remove any variables that are no longer necessary. Third, type 'pack' at the command line prior to executing the part of your code that generates the memory error. If none of this works, there are two more options that I'm aware of for avoiding a memory error. First, you can run your analysis on a computer with a 64-bit architecture and a 64-bit operating system. The reason that you are still encountering memory errors despite having virtual memory maximized is that 32-bit systems are incapable of addressing more than approximately 4 GB of memory, regardless of how much is available. This limitation is effectively removed on 64 bit systems (or rather, the limitation is several orders of magnitude higher). Finally, you can run your analysis in steps, saving the results of each step and clearing all the data. I've certainly had to do this before when working in fieldtrip. For example, if you're attempting to timelock analyses, load each subject individually and grandaverage their trials, saving the results to a new variable. Then clear their data, load the next subject, and continue. In addition, with the datasets I've used in FIELDTRIP I've noticed that for most functions specifying cfg.keeptrials='yes' is likely to generate memory errors, and for frequency analyses specifying cfg.parameter='powandcsd' and using a large number of pairings in cfg.channelcmb (or leaving it at default) is pretty well guarenteed to generate a memory error. Good luck! -Jared On 6/28/07, Virginie van Wassenhove wrote: Hi fieldtrippers, would anyone have a trick to share for optimizing memory in matlab...? What I have tried so far (insufficient still): - let windows manage memory - boost virtual memory to maximum (on 2 drives!) - clear all unnecessary variables in mat space - disable java - turned off graphic hardware acceleration - shut off unused processes I am running out of options...Would using a mac solve these issues? Thanks in advance, -vv Virginie van Wassenhove, PhD :::::::::::: contact info ::::::::::::: Caltech - Division of Biology 1200 E. California Blvd M/C 139-74 Pasadena CA 91125 USA ::::::::::::::::::::::::::::::::::::::::::::::::: vvw at caltech.edu Virginie.van.Wassenhove at gmail.com W: 626.395.8959 http://www.its.caltech.edu/~vvw :::::::::::::::::: extras :::::::::::::::::::: http://www.kiva.org http://www.thehungersite.com/ http://www.agloco.com/r/BBBS1539 ::::::::::::::::::::::::::::::::::::::::::::::::: ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -- Jared Van Snellenberg Social Cognitive Affective Neuroscience Unit http://scan.psych.columbia.edu (212) 854-7858 p (212) 854-3609 f Department of Psychology, Columbia University 406 Schermerhorn Hall 1190 Amsterdam Avenue, Mail Code 5501 New York, NY 10027 _______________________________ "Luck is the residue of design" -Attributed to Branch Rickey, former US Baseball Administrator, and also to John Milton. Go figure. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Mon Jul 16 17:36:58 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 16 Jul 2007 11:36:58 -0400 Subject: fd.dof matrix Message-ID: Dear Fieldtrippers, I have a question about calculating degrees of freedom. I get (after freqdescriptives) fd.dof = [46665x26 double]; However, dof = 2 x (Number of trials) x (number of tapers) and my trials are of equal length and I use padding. So I think (and my understanding could be wrong) this huge matrix is a waste of space as the dofs are going to be the same for every pair on each trial. How can I then ensure that freq.dof is just a number and can be still used later on? I am using the following configuration settings. cfgCSD = []; cfgCSD.ouput = 'powandcsd'; cfgCSD.method = 'mtmfft'; cfgCSD.keeptrials = 'yes' ; cfgCSD.keeptapers = 'no' ; cfgCSD.calcdof = 'yes'; cfgCSD.tapsmofrq = 4; cfgCSD.foilim = [f1 f2]; CSD = freqanalysis(cfgCSD, data); cfg = []; cfg.cohmethod = 'plv'; fd = freqdescriptives(cfg, CSD) Thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Andres.Posada at PSE.UNIGE.CH Tue Jul 17 16:21:00 2007 From: Andres.Posada at PSE.UNIGE.CH (Andres Posada) Date: Tue, 17 Jul 2007 16:21:00 +0200 Subject: 2 simple questions Message-ID: Hi all, I am just starting to use FieldTrip, fantastic program and very easy to use. I am doing the tutorial but I am blocked in two different places: First, how I can prepocess (filter, baseline, etc) already saved data? I use manual artifact rejection and I save the data ('save PreprocDataClean dataFIC'). Now when I want to filter and baseline this data, I cannot access them (variable in matlab or a matlab file) with the commands: cfg = []; cfg.datafile = 'PreprocDataClean.mat'; (?) cfg.blc = 'yes'; % apply baseline correction cfg.blcwindow = [-0.2 0]; % baseline: -0.2 sec to 0 cfg.lpfilter = 'yes'; % apply lowpass filter cfg.lpfreq = 35; % lowpass at 35 Hz. dataFIC = preprocessing(cfg); The other problem, when I try to do the tutorial of beamforming, with the mri data of the subject01 (available online) there is a SPM bug! My version of Matlab is 7.0.1.24704 (R14) Service Pack 1 and I use SMP2 (last update). The commands: mri = read_fcdc_mri('Subject01.mri'); cfg = []; cfg.name = 'segment'; cfg.write = 'yes'; cfg.coordinates = 'ctf'; [segmentedmri] = volumesegment(cfg, mri); and the bug is: Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 193 In spm_create_vol at 14 In spm_write_vol at 76 In fieldtrip-20070701\private\volumewrite_spm at 62 In volumesegment at 222 In temp at 6 performing the segmentation on the specified volume * - SPM2: spm_vol ------------------------------------------------- Error reading information on: ..ome/common/matlab/spm2/templates/T1.mnc Please check that it is in the correct format. ----------------------------------------- 15:49:03 - 17/07/2007 ??? Error using ==> spm_vol>subfunc1 Can't get volume information for '/home/common/matlab/spm2/templates/T1.mnc' Error in ==> spm_vol>subfunc2 at 51 V = subfunc1(P); Error in ==> spm_vol at 37 V = subfunc2(P); Error in ==> spm_segment>get_affine_mapping at 226 if ~isempty(VG) & ischar(VG), VG = spm_vol(VG); end; Error in ==> spm_segment>init_sp at 567 MM = get_affine_mapping(VF,PG,flags.affreg); Error in ==> spm_segment at 91 SP = init_sp(flags.estimate,VF,PG); Error in ==> volumesegment at 246 spm_segment(Va,cfg.template,flags); Error in ==> temp at 6 [segmentedmri] = volumesegment(cfg, mri); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jaredvs at GMAIL.COM Tue Jul 17 22:24:02 2007 From: jaredvs at GMAIL.COM (Jared Van Snellenberg) Date: Tue, 17 Jul 2007 22:24:02 +0200 Subject: Mex File error during call to eeg_leadfield Message-ID: Hi all, I'm working on a DICS beamformer analysis, and ran into a Mex file error. Here's the MATLAB error (as you can see I have the most recent versions of MATLAB and FIELTRIP): ??? Invalid MEX-file 'C:\Program Files\MATLAB\R2007a\fieldtrip-20070717 \private\plgndr.dll': The specified procedure could not be found. . Error in ==> fieldtrip-20070717\private\eeg_leadfield4 at 126 P0 = plgndr(n,0,cos_theta); % zero'th order Legendre Error in ==> fieldtrip-20070717\private\compute_leadfield at 447 lf = eeg_leadfield4(pos, sens.pnt, vol); Error in ==> fieldtrip-20070717\private\beamformer_dics at 212 lf = compute_leadfield(dip.pos(i,:), grad, vol, 'reducerank', reducerank, 'normalize', normalize); Error in ==> sourceanalysis at 855 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); In case it helps, my cfg options are as follows: src_cfg.method='dics'; src_cfg.vol.r=[71 72 79 85]; src_cfg.vol.c=[0.3300 1 0.0042 0.3300]; src_cfg.vol.o=[0 0 35.9]; src_cfg.grid.xgrid=-85:5:85; src_cfg.grid.ygrid=-85:5:85; src_cfg.grid.zgrid=-50:5:125; src_cfg.grid.resolution=5; src_cfg.channel=1:59; Also, the data contain an elec field with a 61x3 list of coordinates (in mm, like the cfg.grid) and a 61x1 cell array of channel labels. The data come from a call to freqanalysis with the following options: f_cfg.method='mtmconvol'; f_cfg.output='powandcsd'; f_cfg.taper='hanning'; f_cfg.tapsmofrq=1; f_cfg.keeptrials='yes'; f_cfg.channel=1:59; Any assistance would be greatly appreciated. Regards, Jared Van Snellenberg Social Cognitive Affective Neuroscience Unit http://scan.psych.columbia.edu (212) 854-7858 p (212) 854-3609 f Department of Psychology, Columbia University 406 Schermerhorn Hall 1190 Amsterdam Avenue, Mail Code 5501 New York, NY 10027 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ctesche at UNM.EDU Thu Jul 19 17:59:06 2007 From: ctesche at UNM.EDU (Claudia Tesche) Date: Thu, 19 Jul 2007 17:59:06 +0200 Subject: CTF MEG42RS format Message-ID: Hi All Does anyone know how to read CTF MEG data in MEG42RS format into either fieldtrip or eeglab? Thanks, Claudia ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From enteka at HOTMAIL.COM Thu Jul 19 19:33:55 2007 From: enteka at HOTMAIL.COM (Nicolas Robitaille) Date: Thu, 19 Jul 2007 17:33:55 +0000 Subject: CTF MEG42RS format Message-ID: Hello When reading CTF MEG data into fieldtrip or eeglab via their included functions, there is a warning about the MEG42RS format, but usually the data are ok. Did you got further problem than this warning? Nicolas************************************ Nicolas Robitaille, candidat Ph.D Département de Psychologie Université de Montréal C.P. 6128, succursale Centre-ville Montréal, Québec H3C 3J7 Tel.: 514-343-6111 x2631 Fax: 514-343-5787 ************************************ > Date: Thu, 19 Jul 2007 17:59:06 +0200> From: ctesche at UNM.EDU> Subject: [FIELDTRIP] CTF MEG42RS format> To: FIELDTRIP at NIC.SURFNET.NL> > Hi All> > Does anyone know how to read CTF MEG data in MEG42RS format into either > fieldtrip or eeglab?> > Thanks,> > Claudia> > ----------------------------------> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. _________________________________________________________________ Soyez parmi les premiers à essayer Windows Live Mail. http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Thu Jul 19 21:23:32 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 19 Jul 2007 15:23:32 -0400 Subject: spatial clustering Message-ID: Hello, I am using clusterandanalysis to detect coherence differences and wonder how the spatial adjacency of sensors is determined. Am I right in understanding that given an MEG (e.g. Neuromag 306) since the exact layout is known, one can determine the nearest neighbours for each sensor simply by looking up the layout? So for example, if a squid 20.2 shows a significant effect, its nearest neighbours from the layout are 18.3, 22.4, 22.2, 23.1, 20.3, 20.4, 20.1. If I use cfg.minnbchan = 2, the clustering algorithm will look to see if atleast two of the neighbours given above also show a significant effect for a cluster to be determined. Is this what is implemented in clusterandanalysis? Thank you very much for your time, best, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From tomh at KURAGE.NIMH.NIH.GOV Thu Jul 19 23:49:22 2007 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd (NIH/NIMH) [E]) Date: Thu, 19 Jul 2007 17:49:22 -0400 Subject: CTF MEG42RS format In-Reply-To: Message-ID: Fieldtrip has code to read CTF MEG files. I use it all the time. Try it. It also reads the CTF multisphere models produced by localSpheres. Claudia Tesche wrote: > Hi All > > Does anyone know how to read CTF MEG data in MEG42RS format into either > fieldtrip or eeglab? > > Thanks, > > Claudia > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -- Tom Holroyd, Ph.D. "The fundamentally misconceived nature versus nurture debate should be abandoned: child development is inextricably both." -- Louann Brizendine ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Jul 23 16:16:08 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 23 Jul 2007 16:16:08 +0200 Subject: Mex File error during call to eeg_leadfield In-Reply-To: Message-ID: Hi Jared, On 17 Jul 2007, at 22:24, Jared Van Snellenberg wrote: > I'm working on a DICS beamformer analysis, and ran into a Mex file > error. > > Here's the MATLAB error (as you can see I have the most recent > versions of > MATLAB and FIELTRIP): > > ??? Invalid MEX-file 'C:\Program Files\MATLAB\R2007a > \fieldtrip-20070717 > \private\plgndr.dll': The specified procedure could not be found. The dll file itself is included in the FT version that you have. Which matlab version are you using, and on what windows platform (64 bit perhaps?). Please try recompiling the plgndr mex file using the attached code. 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: plgndr.c Type: application/octet-stream Size: 3154 bytes Desc: not available URL: -------------- next part -------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Jul 23 16:26:25 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 23 Jul 2007 16:26:25 +0200 Subject: 2 simple questions In-Reply-To: Message-ID: Dear Andres, On 17 Jul 2007, at 16:21, Andres Posada wrote: > I am doing the tutorial but I am blocked in two different places: > First, how I can prepocess (filter, baseline, etc) already saved > data? I use > manual artifact rejection and I save the data ('save > PreprocDataClean dataFIC'). Normally you would filter and baseline correct only once, and that is at the time of preprocessing. You cannot call the preprocessing function multiple times. > Now when I want to filter and baseline this data, I cannot access them > (variable in matlab or a matlab file) with the commands: > > cfg = []; > cfg.datafile = 'PreprocDataClean.mat'; (?) If you decide afterwards that you want to change your filter settings, you either should call preprocessing once more (with cfg.dataset=original_file). You can reuse the cleaned trial definition that results from rejectvisual as explained on http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:tutorial:rejectvisual and http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:tutorial:eventrelatedaveraging#preprocessing_ the_data A smart trich that you can use is that teh output data of each fieldtrip function will contain the "cfg" field. I.e. the rejectvisual function returns cleandata, with cleandata.cfg.trl representing the trials that are actually clean. So you can easily preprocess the clean segments of the data with other filter settings. Alternatively, you can apply filters and baselinecorrection once more when you call timelockanalysis. That function replicates most of the filtering options of preprocessing, except that you cannot use filter padding. In your case, you could do load PreprocDataClean cfg = []; cfg.blc = 'yes'; % apply baseline correction cfg.blcwindow = [-0.2 0]; % baseline: -0.2 sec to 0 cfg.lpfilter = 'yes'; % apply lowpass filter cfg.lpfreq = 35; % lowpass at 35 Hz. avgFIC = preprocessing(dataFIC); > The other problem, when I try to do the tutorial of beamforming, > with the > mri data of the subject01 (available online) there is a SPM bug! My > version > of Matlab is 7.0.1.24704 (R14) Service Pack 1 and I use SMP2 (last > update). > > The commands: > > mri = read_fcdc_mri('Subject01.mri'); > cfg = []; > cfg.name = 'segment'; > cfg.write = 'yes'; > cfg.coordinates = 'ctf'; > [segmentedmri] = volumesegment(cfg, mri); > > and the bug is: > ... > ??? Error using ==> spm_vol>subfunc1 > Can't get volume information for '/home/common/matlab/spm2/ > templates/T1.mnc' You have to specify the exact path of the template file, which in your case will not be on /home/common (as that is a network disk within the FCDC). 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Jul 23 16:29:38 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 23 Jul 2007 16:29:38 +0200 Subject: fd.dof matrix In-Reply-To: Message-ID: On 16 Jul 2007, at 17:36, Sameer Walawalkar wrote: > I have a question about calculating degrees of freedom. I get > (after freqdescriptives) > fd.dof = [46665x26 double]; > > However, dof = 2 x (Number of trials) x (number of tapers) and my > trials are of equal length and I use padding. So I think (and my > understanding could be wrong) this huge matrix is a waste of space > as the dofs are going to be the same for every pair on each trial. > How can I then ensure that freq.dof is just a number and can be > still used later on? The dof can be different if you have variable trial lengths'. That happens if you use partial artifact recection, or can also be the result of your trial function. That in combination with multitapers results in different dofs. There are only a few very specific instances where the dof is required, so usually you can throw it away without any consequences. 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Jul 23 16:44:20 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 23 Jul 2007 16:44:20 +0200 Subject: eeglab2fieldtrip In-Reply-To: Message-ID: Hi Valesca On 13 Jul 2007, at 11:02, Valesca Kooijman wrote: > In connection with your previous advice concerning the > eeglab2fieldtrip script, we came accross the following problem and > solution (see script below): > ... > > I do still get the following warning after running the above script: > > Warning: writing segmented data as if it were continuous > In fieldtrip-20070710\private\write_brainvision_eeg at 38 > In fieldtrip-20070710\private\write_data at 63 > In write_fcdc_data at 48 > In ConversionEEGDATA at 13 > > Is this problematic or is this a standard warning following > conversion to Vision Analyzer? The warning relates to the problem that you indicated in your email further down (i.e. the data being assumed to be ntrials X nchans X nsamples). I.e. if your data is indeed ntrials X nchans X nsamples, then you don't have to worry. In your case, you should worry (see below). > In addition, I was wondering where my trial onset markers are > written to? Write_fcdc_data only generates a .eeg and a .hdr file, > and not a .vmrk file. They are not writen. You could manually write a vmrk file (they are ascii files). The format is like the snippet below Brain Vision Data Exchange Marker File, Version 1.0 [Common Infos] DataFile=pp01_pilot_load0_3s.seg [Marker Infos] ; Each entry: Mk=,,, ; , , ; ; Fields are delimited by commas, some fields might be omited (empty). ; Commas in type or description text are coded as "\1". Mk1=New Segment,,1,1,0,20050315114252667836 ... > From your earlier emails I understood that the datamatrix should be > converted to ntrials X nchans X nsamples before running > write_fcdc_data. Currently my datamatrix consists of nchans X > nsamples X ntrials. Would you mind letting me know how I can > convert my datamatrix? Thanks a lot. I just made a change to write_brainvision_eeg, please update to the latest FT release. In that function it still expects the data to be ntrials X nchans X nsamples, i.e. ntrl = size(dat,1); nchan = size(dat,2); nsmp = size(dat,3); You can use the matlab function permute (see "help permute") to swap the dimensions in EEG.data by permute(EEG.data, [3 1 2]). 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/fcdonders/fieldtrip. From jaredvs at GMAIL.COM Mon Jul 23 18:54:01 2007 From: jaredvs at GMAIL.COM (Jared Van Snellenberg) Date: Mon, 23 Jul 2007 12:54:01 -0400 Subject: Mex File error during call to eeg_leadfield In-Reply-To: <0722EDE3-E904-4A66-B9CB-B02281516864@fcdonders.ru.nl> Message-ID: Thanks Robert, that appears to have worked. I'm on a 32-bit windows machine, using r2007a. Does it perhaps matter that I'm on a dual-core processor? At any rate, 'mex plgndr.c' created plgndr.mexw32, which did not exist in the /private directory of the fieldtrip download, so perhaps it should be included? Thanks again, -Jared On 7/23/07, Robert Oostenveld wrote: > > Hi Jared, > > On 17 Jul 2007, at 22:24, Jared Van Snellenberg wrote: > > I'm working on a DICS beamformer analysis, and ran into a Mex file > > error. > > > > Here's the MATLAB error (as you can see I have the most recent > > versions of > > MATLAB and FIELTRIP): > > > > ??? Invalid MEX-file 'C:\Program Files\MATLAB\R2007a > > \fieldtrip-20070717 > > \private\plgndr.dll': The specified procedure could not be found. > > The dll file itself is included in the FT version that you have. > Which matlab version are you using, and on what windows platform (64 > bit perhaps?). Please try recompiling the plgndr mex file using the > attached code. > > 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/fcdonders/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. > > > -- Jared Van Snellenberg Social Cognitive Affective Neuroscience Unit http://scan.psych.columbia.edu (212) 854-7858 p (212) 854-3609 f Department of Psychology, Columbia University 406 Schermerhorn Hall 1190 Amsterdam Avenue, Mail Code 5501 New York, NY 10027 _______________________________ "Luck is the residue of design" -Attributed to Branch Rickey, former US Baseball Administrator, and also to John Milton. Go figure. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eolejarczyk at IBIB.WAW.PL Mon Jul 23 20:39:24 2007 From: eolejarczyk at IBIB.WAW.PL (Elzbieta Olejarczyk) Date: Mon, 23 Jul 2007 20:39:24 +0200 Subject: ASCII format Message-ID: I would like to use continuous data in Ascii format (Nchannels x Nsamples values). I have information about sampling frequency, moments of several events occured during EEG registration and channels montage (8 or 16 channels). Is it possible to use FieldTrip functions with such data? Elzbieta ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From weisz at LYON.INSERM.FR Wed Jul 25 13:22:42 2007 From: weisz at LYON.INSERM.FR (Nathan Weisz) Date: Wed, 25 Jul 2007 13:22:42 +0200 Subject: z-score Message-ID: hi, this question was asked before, but i couldn't find an answer in the archives. is there a special reason 'zscore' was canceled from freqbaseline-function? best, nathan -------------------------------- Dr. Nathan Weisz INSERM - Unité 821 Dynamique cérébrale et cognition Centre Hospitalier Le Vinatier, Bâtiment 452 95 Boulevard Pinel 69500 Bron, France Tel: ++33 - (0)4 - 7213 8915 Email: weisz at lyon.inserm.fr Chat-AV: nathanweisz at mac.com Homepage: http://web.mac.com/nathanweisz Neurotree: http://neurotree.org/neurotree/tree.php?pid=8692 Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Wed Jul 25 14:31:53 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 25 Jul 2007 14:31:53 +0200 Subject: Mex File error during call to eeg_leadfield In-Reply-To: <51d499680707230954m359e89efwf6cfdfd8d8c3fb18@mail.gmail.com> Message-ID: On 23 Jul 2007, at 18:54, Jared Van Snellenberg wrote: > Thanks Robert, that appears to have worked. I'm on a 32-bit windows > machine, using r2007a. Does it perhaps matter that I'm on a dual- > core processor? At any rate, 'mex plgndr.c' created plgndr.mexw32, > which did not exist in the /private directory of the fieldtrip > download, so perhaps it should be included? For older matlab versions, the mex files for windows had the extension *.dll. For later version (I don't know exactly from which version onward), they have the extensions mexw32 and mexw64 for 32 and 64 bit windows platforms respectively. Furthermore, mex files tend to be compatible over many matlab versions. It seems that our (old) mex files are not compatible any more with your (new) matlab version. I will modify the packaging and ftp release scripts so that the source code for all mex files (plus the associated c code) will also be included in the zip file. Then people are always able to recompile them for their specific platform. Robert PS See http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/ access/helpdesk/help/techdoc/matlab_external/f29502.html for the mex files and http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/ access/helpdesk/help/techdoc/rn/bq1zbsn.html for a general description of compatibility issues in matlab. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Jul 25 14:34:57 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 25 Jul 2007 14:34:57 +0200 Subject: ASCII format In-Reply-To: <50220.87.205.80.79.1185215964.squirrel@mail.ibib.waw.pl> Message-ID: Dear Elzbieta On 23 Jul 2007, at 20:39, Elzbieta Olejarczyk wrote: > I would like to use continuous data in Ascii format (Nchannels x > Nsamples > values). I have information about sampling frequency, moments of > several > events occured during EEG registration and channels montage (8 or 16 > channels). > Is it possible to use FieldTrip functions with such data? That is described in the frequently asked questions, see http:// www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#how_can_i_import_m y_own_dataformat Probably the easiest approach for you would be to reformat that data within Matlab into a data structure that is compatible with FieldTrip, i.e. similar to the outpout of the preprocessing function. 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/fcdonders/fieldtrip. From andrew.smart at NYU.EDU Wed Jul 25 18:56:52 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Wed, 25 Jul 2007 18:56:52 +0200 Subject: spm2 question Message-ID: Hi, I am trying to plot beamforming data from CTF MEG onto a standard or generic MRI (since I don't have MRIs for the subjects). Using volumesegment for Subject01.mri I get this error: ??? Cant map image file. Error in ==> spm_smoothto8bit>smoothto8bit at 51 img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim (1:2),0); The read_fcdc_mri works to open Subject01.mri. I have also tried using single_subj_T1.mnc from SPM2 and the standard_mri from EEGLAB and get a similar error K>> spm_slice_vol(V(i),spm_matrix([0 0 p]),V(i).dim(1:2),0) ??? Cant open image file. Thanks! andy ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From c.nohn at UKE.DE Mon Jul 30 12:42:00 2007 From: c.nohn at UKE.DE (Claudia Nohn) Date: Mon, 30 Jul 2007 12:42:00 +0200 Subject: clusterrandanalysis actvsblT Message-ID: dear all, i have a questions about clusteranalysis comparing baseline and activation period. is it really impossible to compare two periods of different length? and why? as far as i understand the mean of the baseline is used and so you have only one value per frequency anyway. can i avoid this problem or do i have to divide my activation period into different segments because my baseline period is much shorter? thanks in advance claudia -- 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 From weisz at LYON.INSERM.FR Mon Jul 30 15:08:03 2007 From: weisz at LYON.INSERM.FR (Nathan Weisz) Date: Mon, 30 Jul 2007 15:08:03 +0200 Subject: problems using dics Message-ID: hi, i am trying to do sourceanalysis on spontaneous activity data, i.e. there is no baseline condition (such as a pre-stimulus period). tried the approach using the "NAI" as described in the tutorial (Localizing oscillatory sources using beamformer techniques). however there apparently are problems. see more below. data is 60 channel EEG, preprocessed in eeglab (ICA artefact correction + removal of bad data periods) and cut into non- overlapping "epochs" of 2 seconds. a fieldtrip structure was generated using eeglab2fieldtrip. >> data data = label: {1x60 cell} fsample: 250 elec: [1x1 struct] trial: {1x138 cell} time: {1x138 cell} cfg: [1x1 struct] then estimate power with freqanalysis: cfg=[]; cfg.method='mtmfft'; cfg.output='powandcsd'; cfg.foilim=[12 18]; cfg.tapsmofrq=1.5; freq4dics=freqanalysis(cfg,data); >> freq4dics freq4dics = label: {1x60 cell} dimord: 'chan_freq' freq: [12 12.5000 13 13.5000 14 14.5000 15 15.5000 16 16.5000 17 17.5000 18] powspctrm: [60x13 double] labelcmb: {1770x2 cell} crsspctrm: [1770x13 double] elec: [1x1 struct] cfg: [1x1 struct] so far so good. now i'd like to do some sourceanalysis. cfg=[]; cfg.method='dics'; cfg.grid=grid; cfg.vol=vol; %use of the standard BEM model cfg.lambda =[]; cfg.frequency=15; cfg.projectnoise='yes'; cfg.elec=newelec;%electrode positions adapted to BEM released on FT- FTP (in standard_BEM) alphaS=sourceanalysis(cfg,freq4dics); the problem here is that the noise is set to 0. while executing the code this warning message appears: Warning: cross-spectral density matrix is rank deficient > In beamformer_dics at 161 In sourceanalysis at 855 a look at the code shows that in this case that the noise is set to lambda (empty and set to 0 per default). I then tried different lamdas but as results varied quite a lot I have an uneasy feeling doing it this way. question: is there something apparently wrong with the configs that leads to the problem of not being able to make a noise estimate from the CSD? cheers, nathan -------------------------------- Dr. Nathan Weisz INSERM - Unité 821 Dynamique cérébrale et cognition Centre Hospitalier Le Vinatier, Bâtiment 452 95 Boulevard Pinel 69500 Bron, France Tel: ++33 - (0)4 - 7213 8915 Email: weisz at lyon.inserm.fr Chat-AV: nathanweisz at mac.com Homepage: http://web.mac.com/nathanweisz Neurotree: http://neurotree.org/neurotree/tree.php?pid=8692 Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maris at NICI.RU.NL Mon Jul 30 22:49:43 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Mon, 30 Jul 2007 22:49:43 +0200 Subject: clusterrandanalysis actvsblT In-Reply-To: <46ADC078.6010209@uke.de> Message-ID: Dear Claudia, > i have a questions about clusteranalysis comparing baseline and > activation period. is it really impossible to compare two periods of > different length? and why? as far as i understand the mean of the > baseline is used and so you have only one value per frequency anyway. > can i avoid this problem or do i have to divide my activation period > into different segments because my baseline period is much shorter? You are one of many to complain about this feature of clusterrandanalysis. Nevertheless, you do have to divide your activation period into different segments. The reason for this has to do with the null hypothesis that is tested when you use the activation-versus-baseline statistic. This null hypothesis is the following: The data in the baseline period are drawn from the same probability distribution (over the spatiotemporal domain) as the data in the activation period. This null hypothesis only makes sense if the spatiotemporal dimensionality of the activation and the baseline period are equal. Kind regards, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > thanks in advance > claudia > > > -- > 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/fcdonders/fieldtrip. From abastos at BERKELEY.EDU Mon Jul 30 23:56:00 2007 From: abastos at BERKELEY.EDU (Andre Bastos) Date: Mon, 30 Jul 2007 14:56:00 -0700 Subject: clusterrandanalysis actvsblT In-Reply-To: <005d01c7d2eb$2836dc60$6701a8c0@fcdonders.nl> Message-ID: On a related note, I would like to ask about the clusterrandanalysis option to set avgovertime = 'yes' In this case, as far as I am aware, the frequency-space-time-trial quadlets which clusterrand analysis uses become doublets of frequency-space. In this case, wouldn't it be possible to compare data periods of different lengths, as clusterrandanalysis would just average across your baseline period as set 1 and average across the activation period as set 2? Does the distribution of activation over time get factored in to the clusterrandanalysis function even when avgovertime is set to 'yes'? Thanks, -Andre -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Eric Maris Sent: Monday, July 30, 2007 1:50 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandanalysis actvsblT Dear Claudia, > i have a questions about clusteranalysis comparing baseline and > activation period. is it really impossible to compare two periods of > different length? and why? as far as i understand the mean of the > baseline is used and so you have only one value per frequency anyway. > can i avoid this problem or do i have to divide my activation period > into different segments because my baseline period is much shorter? You are one of many to complain about this feature of clusterrandanalysis. Nevertheless, you do have to divide your activation period into different segments. The reason for this has to do with the null hypothesis that is tested when you use the activation-versus-baseline statistic. This null hypothesis is the following: The data in the baseline period are drawn from the same probability distribution (over the spatiotemporal domain) as the data in the activation period. This null hypothesis only makes sense if the spatiotemporal dimensionality of the activation and the baseline period are equal. Kind regards, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > thanks in advance > claudia > > > -- > 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/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Tue Jul 31 00:42:07 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Tue, 31 Jul 2007 00:42:07 +0200 Subject: clusterrandanalysis actvsblT In-Reply-To: <000301c7d2f4$6bebd7e0$43c387a0$@edu> Message-ID: Dear Andre, > On a related note, I would like to ask about the clusterrandanalysis option > to set avgovertime = 'yes' > > In this case, as far as I am aware, the frequency-space-time-trial quadlets > which clusterrand analysis uses become doublets of frequency-space. In this > case, wouldn't it be possible to compare data periods of different lengths, > as clusterrandanalysis would just average across your baseline period as set > 1 and average across the activation period as set 2? > > Does the distribution of activation over time get factored in to the > clusterrandanalysis function even when avgovertime is set to 'yes'? If you try to do this, you should get an error message. Have a try, and if you don't get an error message let me know. Anyhow, even without an error message, the p-value that you get out of clusterrandanalysis only makes sense if the baseline and activation periods are of equal length. Good luck, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > Thanks, > > -Andre > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Eric Maris > Sent: Monday, July 30, 2007 1:50 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] clusterrandanalysis actvsblT > > Dear Claudia, > > > > > i have a questions about clusteranalysis comparing baseline and > > activation period. is it really impossible to compare two periods of > > different length? and why? as far as i understand the mean of the > > baseline is used and so you have only one value per frequency anyway. > > can i avoid this problem or do i have to divide my activation period > > into different segments because my baseline period is much shorter? > > > You are one of many to complain about this feature of clusterrandanalysis. > Nevertheless, you do have to divide your activation period into different > segments. The reason for this has to do with the null hypothesis that is > tested when you use the activation-versus-baseline statistic. This null > hypothesis is the following: The data in the baseline period are drawn from > the same probability distribution (over the spatiotemporal domain) as the > data in the activation period. This null hypothesis only makes sense if the > spatiotemporal dimensionality of the activation and the baseline period are > equal. > > > Kind regards, > > Eric Maris > > > > > > > > > dr. Eric Maris > > NICI/Biological Psychology and > > F.C. Donders Center for Cognitive NeuroImaging > > University of Nijmegen > > P.O. Box 9104 > > 6500 HE Nijmegen > > The Netherlands > > T:+31 24 3612651 (NICI) > > T:+31 24 3610754 (FCDC) > > F:+31 24 3616066 (NICI) > > E: maris at nici.ru.nl > > MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > > > > > thanks in advance > > claudia > > > > > > -- > > 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/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From abastos at BERKELEY.EDU Tue Jul 31 02:44:10 2007 From: abastos at BERKELEY.EDU (Andre Bastos) Date: Mon, 30 Jul 2007 17:44:10 -0700 Subject: clusterrandanalysis actvsblT In-Reply-To: <009301c7d2fa$dc046140$6701a8c0@fcdonders.nl> Message-ID: Eric, Yes, I understand about the pvalues not working for comparing within a trial (from baseline to activation). But what about comparing across different periods of time, using independent samples? Is it okay to set avgovertime = 'yes' then? For example, I am comparing two conditions in a ssvep paradigm: attend left and attend right, for one subject. I am not quite sure what I am doing wrong, as I am sure that there are differences between these two conditions, although the clusters that I get are all insignificant. In this case, when the subject attends left they attend to 7.5 Hz, and when they attend right they attend to 10 Hz flicker stimulus. I am expecting that these frequencies, as well as higher harmonics will be sensitive to attention (as previously reported in the ssvep lit). However, my clusters all have p values above 0.2. I tried this with avgovertime set to both yes and no, and still no sig clusters. Why are the insignificant clusters even returned at all, especially when there is a parameter value for determining significant clusters, alphathresh, which is set in the cfg but never used? I know that other people have had the same issue before... Thanks again, Andre Here is my config (I am using just the 29 parietal and occipital electrodes for this analysis). elec.pnt = elec.pnt(1:29,:); elec.label = elec.label(1:29,:); cfg=[]; cfg.statistic = 'indepsamplesT'; cfg.alphathresh = 0.05; cfg.makeclusters = 'yes'; cfg.minnbchan = 2; cfg.clusterteststat = 'maxsum'; cfg.onetwo = 'twosided'; cfg.alpha = 0.05; cfg.nranddraws = 500; cfg.channel = 'all'; %TFR(1).elec.label(1:64); %{'EEG'}; cfg.latency = [1 5 ]; cfg.elec = elec; cfg.neighbourdist = 49; cfg.avgovertime = 'no'; [clusrand] = clusterrandanalysis(cfg, TFR1, TFR2); -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Eric Maris Sent: Monday, July 30, 2007 3:42 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandanalysis actvsblT Dear Andre, > On a related note, I would like to ask about the clusterrandanalysis option > to set avgovertime = 'yes' > > In this case, as far as I am aware, the frequency-space-time-trial quadlets > which clusterrand analysis uses become doublets of frequency-space. In this > case, wouldn't it be possible to compare data periods of different lengths, > as clusterrandanalysis would just average across your baseline period as set > 1 and average across the activation period as set 2? > > Does the distribution of activation over time get factored in to the > clusterrandanalysis function even when avgovertime is set to 'yes'? If you try to do this, you should get an error message. Have a try, and if you don't get an error message let me know. Anyhow, even without an error message, the p-value that you get out of clusterrandanalysis only makes sense if the baseline and activation periods are of equal length. Good luck, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > Thanks, > > -Andre > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Eric Maris > Sent: Monday, July 30, 2007 1:50 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] clusterrandanalysis actvsblT > > Dear Claudia, > > > > > i have a questions about clusteranalysis comparing baseline and > > activation period. is it really impossible to compare two periods of > > different length? and why? as far as i understand the mean of the > > baseline is used and so you have only one value per frequency anyway. > > can i avoid this problem or do i have to divide my activation period > > into different segments because my baseline period is much shorter? > > > You are one of many to complain about this feature of clusterrandanalysis. > Nevertheless, you do have to divide your activation period into different > segments. The reason for this has to do with the null hypothesis that is > tested when you use the activation-versus-baseline statistic. This null > hypothesis is the following: The data in the baseline period are drawn from > the same probability distribution (over the spatiotemporal domain) as the > data in the activation period. This null hypothesis only makes sense if the > spatiotemporal dimensionality of the activation and the baseline period are > equal. > > > Kind regards, > > Eric Maris > > > > > > > > > dr. Eric Maris > > NICI/Biological Psychology and > > F.C. Donders Center for Cognitive NeuroImaging > > University of Nijmegen > > P.O. Box 9104 > > 6500 HE Nijmegen > > The Netherlands > > T:+31 24 3612651 (NICI) > > T:+31 24 3610754 (FCDC) > > F:+31 24 3616066 (NICI) > > E: maris at nici.ru.nl > > MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > > > > > thanks in advance > > claudia > > > > > > -- > > 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/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Tue Jul 31 17:57:53 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Tue, 31 Jul 2007 17:57:53 +0200 Subject: clusterrandanalysis actvsblT In-Reply-To: <002001c7d30b$eb341af0$c19c50d0$@edu> Message-ID: Dear Andre, > Yes, I understand about the pvalues not working for comparing within a trial > (from baseline to activation). But what about comparing across different > periods of time, using independent samples? Is it okay to set avgovertime = > 'yes' then? As long as you average over periods of time of equal length (in different experimental conditions), it is okay. > > For example, I am comparing two conditions in a ssvep paradigm: attend left > and attend right, for one subject. I am not quite sure what I am doing > wrong, as I am sure that there are differences between these two conditions, > although the clusters that I get are all insignificant. > > In this case, when the subject attends left they attend to 7.5 Hz, and when > they attend right they attend to 10 Hz flicker stimulus. I am expecting that > these frequencies, as well as higher harmonics will be sensitive to > attention (as previously reported in the ssvep lit). However, my clusters > all have p values above 0.2. I tried this with avgovertime set to both yes > and no, and still no sig clusters. > > Why are the insignificant clusters even returned at all, especially when > there is a parameter value for determining significant clusters, > alphathresh, which is set in the cfg but never used? I know that other > people have had the same issue before... It is a misunderstanding that cfg.alphathresh is never used. It is used to define the clusters. If you change the value of cfg.alphathresh you get different clusters. Be aware that cfg.alphathresh must be chosen independent of the data if you want to control the FA rate. Kind regards, Eric Maris > > Thanks again, > > Andre > > Here is my config (I am using just the 29 parietal and occipital electrodes > for this analysis). > > elec.pnt = elec.pnt(1:29,:); > elec.label = elec.label(1:29,:); > > cfg=[]; > cfg.statistic = 'indepsamplesT'; > cfg.alphathresh = 0.05; > cfg.makeclusters = 'yes'; > cfg.minnbchan = 2; > cfg.clusterteststat = 'maxsum'; > cfg.onetwo = 'twosided'; > cfg.alpha = 0.05; > cfg.nranddraws = 500; > cfg.channel = 'all'; %TFR(1).elec.label(1:64); %{'EEG'}; > cfg.latency = [1 5 ]; > cfg.elec = elec; > cfg.neighbourdist = 49; > cfg.avgovertime = 'no'; > > [clusrand] = clusterrandanalysis(cfg, TFR1, TFR2); > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Eric Maris > Sent: Monday, July 30, 2007 3:42 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] clusterrandanalysis actvsblT > > Dear Andre, > > > On a related note, I would like to ask about the clusterrandanalysis > option > > to set avgovertime = 'yes' > > > > In this case, as far as I am aware, the frequency-space-time-trial > quadlets > > which clusterrand analysis uses become doublets of frequency-space. In > this > > case, wouldn't it be possible to compare data periods of different > lengths, > > as clusterrandanalysis would just average across your baseline period as > set > > 1 and average across the activation period as set 2? > > > > Does the distribution of activation over time get factored in to the > > clusterrandanalysis function even when avgovertime is set to 'yes'? > > > If you try to do this, you should get an error message. Have a try, and if > you don't get an error message let me know. Anyhow, even without an error > message, the p-value that you get out of clusterrandanalysis only makes > sense if the baseline and activation periods are of equal length. > > > Good luck, > > Eric Maris > > > > dr. Eric Maris > > NICI/Biological Psychology and > > F.C. Donders Center for Cognitive NeuroImaging > > University of Nijmegen > > P.O. Box 9104 > > 6500 HE Nijmegen > > The Netherlands > > T:+31 24 3612651 (NICI) > > T:+31 24 3610754 (FCDC) > > F:+31 24 3616066 (NICI) > > E: maris at nici.ru.nl > > MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > > > > > > > > > > Thanks, > > > > -Andre > > > > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf > > Of Eric Maris > > Sent: Monday, July 30, 2007 1:50 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: Re: [FIELDTRIP] clusterrandanalysis actvsblT > > > > Dear Claudia, > > > > > > > > > i have a questions about clusteranalysis comparing baseline and > > > activation period. is it really impossible to compare two periods of > > > different length? and why? as far as i understand the mean of the > > > baseline is used and so you have only one value per frequency anyway. > > > can i avoid this problem or do i have to divide my activation period > > > into different segments because my baseline period is much shorter? > > > > > > You are one of many to complain about this feature of clusterrandanalysis. > > Nevertheless, you do have to divide your activation period into different > > segments. The reason for this has to do with the null hypothesis that is > > tested when you use the activation-versus-baseline statistic. This null > > hypothesis is the following: The data in the baseline period are drawn > from > > the same probability distribution (over the spatiotemporal domain) as the > > data in the activation period. This null hypothesis only makes sense if > the > > spatiotemporal dimensionality of the activation and the baseline period > are > > equal. > > > > > > Kind regards, > > > > Eric Maris > > > > > > > > > > > > > > > > > > dr. Eric Maris > > > > NICI/Biological Psychology and > > > > F.C. Donders Center for Cognitive NeuroImaging > > > > University of Nijmegen > > > > P.O. Box 9104 > > > > 6500 HE Nijmegen > > > > The Netherlands > > > > T:+31 24 3612651 (NICI) > > > > T:+31 24 3610754 (FCDC) > > > > F:+31 24 3616066 (NICI) > > > > E: maris at nici.ru.nl > > > > MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > > > > > > > > > > thanks in advance > > > claudia > > > > > > > > > -- > > > 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/fcdonders/fieldtrip. > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip > > toolbox, to share experiences and to discuss new ideas for MEG and EEG > analysis. > > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > > http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From olga at GRAPHICMIND.INFO Mon Jul 2 16:22:36 2007 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Mon, 2 Jul 2007 18:22:36 +0400 Subject: PC for Fieldtrip, yours experience Message-ID: Dear Fieldtrippers, sorry for annoying with the same question, but can you just specified your own PC, which you use for analysing. We wish to speed up our analysis. Best Regards. Olga. ---------------------------------------------------------------------------------------------------------------------------------------- Dear all, It is probably a dull question, but can you specified the "good" PC Computer for analysing 64-channel data in Fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Mon Jul 2 19:04:47 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 2 Jul 2007 13:04:47 -0400 Subject: using cfg.correctm = 'cluster' and related memory issues. Message-ID: Hello, I am running into memory issues while trying to do non-parametric statistical testing for coherence differences for my Neuromag 306 data. The statement causing overflow is line 277 in statistics_montecarlo: statrand = zeros(size(statobs,1), size(res,1)); This would be a matrix of size 50631525 X 100 corresponding to some 40 GB! (Am I correct in assuming that the 100 is from cfg.numrandomization)? This statement is evoked if cfg.correctm = 'cluster'; I could use cfg.correctm = max but I dont think this will do the right analysis. The one thing I can think of is changing cfg.channelcmb to try and reduce the number of combinations tried (but is not very preferable atleast right now). Is there anything else that comes to mind? The cfg I am using and other info is added below. Thank you for your time and help. sameer >>cfg = []; cfg.channelcmb = {'MEG' 'MEG'}; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesZcoh'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.clusterthreshold = 'nonparametric'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 100; % make it larger for better testing cfg.precision = 'single'; % experimenting to save memory cfg.label = CSD_LL_200_400.label ; cfg.channelcmb = CSD_LL_200_400.labelcmb; [statistics] = freqstatistics(cfg, CSD_LL_200_400 , CSD_RR_200_400); Note: I use Cross Spectral density instead of coherence as coherence does not keep trials. At the debug prompt after the error I have: K>> whos Name Size Bytes Class Attributes Nrand 1x1 8 double cfg 1x1 60159588 struct dat 326655x127 331881480 single complex design 1x127 1016 double res 100x1x127 101600 double statfull 1x1 405052324 struct statfun 1x1 16 function_handle statobs 50631525x1 405052200 double time_eval 1x1 8 double time_pre 1x1 8 double ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Mon Jul 2 21:56:58 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Mon, 2 Jul 2007 21:56:58 +0200 Subject: using cfg.correctm = 'cluster' and related memory issues. In-Reply-To: Message-ID: Dear Sameer, > I am running into memory issues while trying to do non-parametric > statistical testing for coherence differences for my Neuromag 306 data. > > The statement causing overflow is line 277 in statistics_montecarlo: > statrand = zeros(size(statobs,1), size(res,1)); > This would be a matrix of size 50631525 X 100 corresponding to some 40 GB! > (Am I correct in assuming that the 100 is from cfg.numrandomization)? > > This statement is evoked if cfg.correctm = 'cluster'; > I could use cfg.correctm = max but I dont think this will do the right > analysis. > > The one thing I can think of is changing cfg.channelcmb to try and reduce > the number of combinations tried (but is not very preferable atleast right > now). Is there anything else that comes to mind? > > The cfg I am using and other info is added below. Using Fieldtrip for nonparametric statistical testing of the complete set of between-channel coherences is one step too far. As a first step, one should start comparing coherences with a single reference channel. I have described this methodology in a recent paper in the Journal of Neuroscience Methods (Maris et al., 2007). Unfortunately, there is not a tutorial for this type of analysis, and the help documentation does not bring you very far. This job is on my list, but I have not yet found the time. The bottom line is that testing coherence differences involving a reference channel is certainly feasible, but the documentation is lacking, Kind regards, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > Thank you for your time and help. > sameer > > >>cfg = []; > cfg.channelcmb = {'MEG' 'MEG'}; > cfg.method = 'montecarlo'; > cfg.statistic = 'indepsamplesZcoh'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.clusterthreshold = 'nonparametric'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 100; % make it larger for better testing > cfg.precision = 'single'; % experimenting to save memory > cfg.label = CSD_LL_200_400.label ; > cfg.channelcmb = CSD_LL_200_400.labelcmb; > > > [statistics] = freqstatistics(cfg, CSD_LL_200_400 , CSD_RR_200_400); > > Note: I use Cross Spectral density instead of coherence as coherence does > not keep trials. > > At the debug prompt after the error I have: > > K>> whos > Name Size Bytes Class > Attributes > > Nrand 1x1 8 double > cfg 1x1 60159588 struct > dat 326655x127 331881480 single > complex > design 1x127 1016 double > res 100x1x127 101600 double > statfull 1x1 405052324 struct > statfun 1x1 16 function_handle > statobs 50631525x1 405052200 double > time_eval 1x1 8 double > time_pre 1x1 8 double > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Mon Jul 2 22:14:55 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Mon, 2 Jul 2007 22:14:55 +0200 Subject: using cfg.correctm = 'cluster' and related memory issues. In-Reply-To: Message-ID: Dear Sameer, I forgot to mention that the analyses on which is reported in the J. Neuroscience Methods paper were done using Clusterrandanalysis.m, which is an older version of the Fieldtrip statistics. For testing coherence differences, Clusterrandanalysis.m is better suited than the new statistics functions. Good luck, Eric dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of > Sameer Walawalkar > Sent: Monday, July 02, 2007 7:05 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] using cfg.correctm = 'cluster' and related memory issues. > > Hello, > > I am running into memory issues while trying to do non-parametric > statistical testing for coherence differences for my Neuromag 306 data. > > The statement causing overflow is line 277 in statistics_montecarlo: > statrand = zeros(size(statobs,1), size(res,1)); > This would be a matrix of size 50631525 X 100 corresponding to some 40 GB! > (Am I correct in assuming that the 100 is from cfg.numrandomization)? > > This statement is evoked if cfg.correctm = 'cluster'; > I could use cfg.correctm = max but I dont think this will do the right > analysis. > > The one thing I can think of is changing cfg.channelcmb to try and reduce > the number of combinations tried (but is not very preferable atleast right > now). Is there anything else that comes to mind? > > The cfg I am using and other info is added below. > > Thank you for your time and help. > sameer > > >>cfg = []; > cfg.channelcmb = {'MEG' 'MEG'}; > cfg.method = 'montecarlo'; > cfg.statistic = 'indepsamplesZcoh'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.clusterthreshold = 'nonparametric'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 100; % make it larger for better testing > cfg.precision = 'single'; % experimenting to save memory > cfg.label = CSD_LL_200_400.label ; > cfg.channelcmb = CSD_LL_200_400.labelcmb; > > > [statistics] = freqstatistics(cfg, CSD_LL_200_400 , CSD_RR_200_400); > > Note: I use Cross Spectral density instead of coherence as coherence does > not keep trials. > > At the debug prompt after the error I have: > > K>> whos > Name Size Bytes Class > Attributes > > Nrand 1x1 8 double > cfg 1x1 60159588 struct > dat 326655x127 331881480 single > complex > design 1x127 1016 double > res 100x1x127 101600 double > statfull 1x1 405052324 struct > statfun 1x1 16 function_handle > statobs 50631525x1 405052200 double > time_eval 1x1 8 double > time_pre 1x1 8 double > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From c.hesse at FCDONDERS.RU.NL Tue Jul 3 11:41:55 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Tue, 3 Jul 2007 11:41:55 +0200 Subject: PC for Fieldtrip, yours experience In-Reply-To: <001f01c7bcb4$70b713d0$51210ad9@acer027f9640b7> Message-ID: Dear Olga, this is, in a way, a difficult question to answer. You obviously want a machine with lots of memory and a fast processor (possibly several)! Here at the FCDC we have a couple of 64 bit Linux machines with 16 Gb RAM, 220 Gb HD and 4 CPUs (Dual Core AMD Opteron(tm) Processor 270) And the majority of nodes in the cluster are 64 bit Linux machines with 4 Gb RAM, 220 Gb HD and 2 CPUs (Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz) It all depends on what (else) you want to do on the machine while it is Fieldtriping, how large your data sets are and how memory efficient your Matlab scripts are (i.e. not trying to have the data from 10 subjects in memory at the same time while doing coherence analysis with 300 channels :-) Hope this gives some indication Christian On 2 Jul 2007, at 16:22, Olga Sysoeva wrote: > Dear Fieldtrippers, > > sorry for annoying with the same question, but can you just > specified your own PC, which you use for analysing. We wish to > speed up our analysis. > > Best Regards. > Olga. > > ---------------------------------------------------------------------- > ------------------------------------------------------------------ > Dear all, > > It is probably a dull question, but can you specified the "good" PC > Computer for analysing 64-channel data in Fieldtrip. > > ---------------------------------- > > The aim of this list 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/ > > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From teresa at DSRF.ORG Tue Jul 3 11:42:39 2007 From: teresa at DSRF.ORG (Teresa Cheung) Date: Tue, 3 Jul 2007 02:42:39 -0700 Subject: Auto Reply Message-ID: Dear Colleagues, I am on vacation from Tuesday July 2 to Friday July 5. If you need to book MEG time, please contact julie at dsrf.org If you need help with MEG analysis, please contact Alexander at amoisieev at dsrf.org For other urgent inquiries, please contact dawn at dsrf.org. Otherwise, I will reply to your email early next week. Best regards, -Teresa Cheung Teresa Cheung MEG Laboratory Manager Down Syndrome Research Foundation 1409 Sperling Avenue Burnaby, BC Office: 604 444 3773 ext 2239 Lab: 604 444 3773 ext 2249 Cell: 604 313 0338 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Tue Jul 3 16:41:37 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 3 Jul 2007 10:41:37 -0400 Subject: using cfg.correctm = 'cluster' and related memory issues. In-Reply-To: <021c01c7bce5$a861e8b0$6701a8c0@fcdonders.nl> Message-ID: Dear Eric, Thank you for you reply. I am now trying to use clusterrandanalysis. It looks for data.dof. So for freqanalysis I have cfgCSD.method = 'mtmfft'; cfgCSD.keeptrials = 'yes' ; cfgCSD.keeptapers = 'yes' ; cfgCSD.calcdof = 'yes'; this leads to error on line 540 if calcdof freq.dof=2*repmat(cumtapcnt,[1,numfoi]); end; Basically, numfoi is not defined before this statement, and only appears once throughout the file. Should it be numel(foi) ? Best, Sameer p.s: incidently, ~exist(cumtapcnt) gives error. MATLAB needs ~exist('cumtapcnt') (it could be a version problem). On Mon, 2 Jul 2007, Eric Maris wrote: > Dear Sameer, > > > I forgot to mention that the analyses on which is reported in the J. > Neuroscience Methods paper were done using Clusterrandanalysis.m, which is > an older version of the Fieldtrip statistics. For testing coherence > differences, Clusterrandanalysis.m is better suited than the new statistics > functions. > > > Good luck, > > Eric > > dr. Eric Maris > NICI/Biological Psychology and > F.C. Donders Center for Cognitive NeuroImaging > University of Nijmegen > P.O. Box 9104 > 6500 HE Nijmegen > The Netherlands > T:+31 24 3612651 (NICI) > T:+31 24 3610754 (FCDC) > F:+31 24 3616066 (NICI) > E: maris at nici.ru.nl > MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > >> -----Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of >> Sameer Walawalkar >> Sent: Monday, July 02, 2007 7:05 PM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: [FIELDTRIP] using cfg.correctm = 'cluster' and related memory > issues. >> >> Hello, >> >> I am running into memory issues while trying to do non-parametric >> statistical testing for coherence differences for my Neuromag 306 data. >> >> The statement causing overflow is line 277 in statistics_montecarlo: >> statrand = zeros(size(statobs,1), size(res,1)); >> This would be a matrix of size 50631525 X 100 corresponding to some 40 GB! >> (Am I correct in assuming that the 100 is from cfg.numrandomization)? >> >> This statement is evoked if cfg.correctm = 'cluster'; >> I could use cfg.correctm = max but I dont think this will do the right >> analysis. >> >> The one thing I can think of is changing cfg.channelcmb to try and reduce >> the number of combinations tried (but is not very preferable atleast right >> now). Is there anything else that comes to mind? >> >> The cfg I am using and other info is added below. >> >> Thank you for your time and help. >> sameer >> >>>> cfg = []; >> cfg.channelcmb = {'MEG' 'MEG'}; >> cfg.method = 'montecarlo'; >> cfg.statistic = 'indepsamplesZcoh'; >> cfg.clusteralpha = 0.05; >> cfg.clusterstatistic = 'maxsum'; >> cfg.clusterthreshold = 'nonparametric'; >> cfg.minnbchan = 2; >> cfg.tail = 0; >> cfg.clustertail = 0; >> cfg.alpha = 0.05; >> cfg.numrandomization = 100; % make it larger for better testing >> cfg.precision = 'single'; % experimenting to save memory >> cfg.label = CSD_LL_200_400.label ; >> cfg.channelcmb = CSD_LL_200_400.labelcmb; >> >> >> [statistics] = freqstatistics(cfg, CSD_LL_200_400 , CSD_RR_200_400); >> >> Note: I use Cross Spectral density instead of coherence as coherence does >> not keep trials. >> >> At the debug prompt after the error I have: >> >> K>> whos >> Name Size Bytes Class >> Attributes >> >> Nrand 1x1 8 double >> cfg 1x1 60159588 struct >> dat 326655x127 331881480 single >> complex >> design 1x127 1016 double >> res 100x1x127 101600 double >> statfull 1x1 405052324 struct >> statfun 1x1 16 function_handle >> statobs 50631525x1 405052200 double >> time_eval 1x1 8 double >> time_pre 1x1 8 double >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the > FieldTrip >> toolbox, to share experiences and to discuss new ideas for MEG and EEG > analysis. >> See also http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Tue Jul 3 21:09:08 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 3 Jul 2007 15:09:08 -0400 Subject: plotting clusterandanalysis output. Message-ID: Hello, After doing clusterandanalysis for coherence differences, I want to plot the results using information on http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:clusterrandanalysis plotdata requires plotdata.label=clusrand.label; However as clusrand = stats: [280x3 double] raweffect: [280x3 double] obsmeanc1: [280x3 double] obsmeanc2: [280x3 double] posclusters: [1x1 struct] negclusters: [] posclusterslabelmat: [280x3 double] negclusterslabelmat: [] critvals: 57.8332 labelcmb: {280x2 cell} freq: [54.7264 59.7015 64.6766] time: NaN cfg: [1x1 struct] I use plotdata.label = 'MEG2443' as that is what I have used in cfg.channelcmb (see below). This gives ??? Error using ==> fieldtrip/private/nearest at 24 incorrect value what input cfg for clusrandanalysis would change this? My current (very experimental) cfg is cfg = []; cfg.channelcmb = { 'MEG2443' 'MEG'}; cfg.statistic = 'indepsamplesZcoh' ; cfg.alpha = 0.05 ; cfg.clusterteststat = 'maxsum' ; cfg.onetwo = 'onesided_1<2' ; cfg.makeclusters = 'yes' ; cfg.minnbchan = 2; cfg.nranddraws = 100; thanks for your time. best, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Wed Jul 4 11:26:43 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Wed, 4 Jul 2007 11:26:43 +0200 Subject: plotting clusterandanalysis output. In-Reply-To: Message-ID: Sameer, > After doing clusterandanalysis for coherence differences, I want to plot > the results using information on > http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu tori > al:clusterrandanalysis You have to do some work yourself here. Replace labelcmb by a one-dimensional cell array containing the labels of the non-reference channels, and then use a topoplot-function. Good luck, Eric dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > plotdata requires > > plotdata.label=clusrand.label; > > However as > > > clusrand = > > stats: [280x3 double] > raweffect: [280x3 double] > obsmeanc1: [280x3 double] > obsmeanc2: [280x3 double] > posclusters: [1x1 struct] > negclusters: [] > posclusterslabelmat: [280x3 double] > negclusterslabelmat: [] > critvals: 57.8332 > labelcmb: {280x2 cell} > freq: [54.7264 59.7015 64.6766] > time: NaN > cfg: [1x1 struct] > > I use > plotdata.label = 'MEG2443' as that is what I have used in cfg.channelcmb > (see below). This gives > > ??? Error using ==> fieldtrip/private/nearest at 24 > incorrect value > > what input cfg for clusrandanalysis would change this? My current (very > experimental) cfg is > > cfg = []; > cfg.channelcmb = { 'MEG2443' 'MEG'}; > cfg.statistic = 'indepsamplesZcoh' ; > cfg.alpha = 0.05 ; > cfg.clusterteststat = 'maxsum' ; > cfg.onetwo = 'onesided_1<2' ; > cfg.makeclusters = 'yes' ; > cfg.minnbchan = 2; > cfg.nranddraws = 100; > > > thanks for your time. > > best, > sameer > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From litvak at TECHUNIX.TECHNION.AC.IL Wed Jul 4 16:24:33 2007 From: litvak at TECHUNIX.TECHNION.AC.IL (Vladimir Litvak) Date: Wed, 4 Jul 2007 15:24:33 +0100 Subject: EGI reader Message-ID: Dear all, A new reader for EGIS format (which is far as I understand is one of several formats used by the EGI system) was added to the fileio toolbox starting from version 20070704. This reader is the first result of collaboration between Fieldtrip and SPM developers. It was developed by Joseph Dien (jdien at ku.edu) originally for SPM. EGI users are welcome to test the new reader and report any problems directly to Joseph (he is probably not subscribed to the list). Best, Vladimir ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From grigu at CBS.MPG.DE Thu Jul 5 13:57:51 2007 From: grigu at CBS.MPG.DE (Maren Grigutsch) Date: Thu, 5 Jul 2007 13:57:51 +0200 Subject: bug in statistics_montecarlo? Message-ID: Dear Robert, Eric and other fellows of the Fieldtrip team, I'm just trying out your excellent software, in specific your extremely useful and well designed statistics functions. Many thanks for this great and generous gift to the neuroscience community! I would like to point you to an inconsistency I seem to have found in the implementation of the statistics_montecarlo function. When I compared the probabilities computed with statistics_analytic and statistics_montecarlo for the depsamplesT test, the probabilities determined via the randomization test turned out to be too low by a factor of about 1/2, see code and Matlab output below. ------------------------- N = 50; M = 0.25; alpha = 0.05; tail = 0; % 'both' % construct a normally distributed difference vector % with unit variance and mean M d = randn(1,N); d = d ./ sqrt(var(d,1,2)); d = d -mean(d) + M; % compute a paired t-test [H,P,CI,stat] = ttest(d,0,alpha,tail) H = 0 P = 0.0864 CI = -0.0371 0.5371 stat = tstat: 1.7500 df: 49 sd: 1.0102 % generate two sample vectors with their difference given by d x =randn(1,N); y = x + d; % generate the design matrix for testing with fieldtrip design = [ 1:N 1:N % subject number repmat(1,[1 N]) repmat(2,[1 N]) % condition number ]; cfg = []; cfg.statistic = 'depsamplesT'; cfg.method = 'analytic'; cfg.correctm = 'no'; cfg.alpha = 0.05; cfg.tail = 0; cfg.uvar = 1; cfg.ivar = 2; [stat_analytic, cfg] = statistics_analytic(cfg,[x y],design) stat_analytic = stat: -1.7500 df: 49 critval: [-2.0096 2.0096] prob: 0.0864 mask: 0 cfg.numrandomization = 5000; [stat_montecarlo, cfg] = statistics_montecarlo(cfg,[x y],design) using "statfun_depsamplesT" for the single-sample statistics constructing randomized design total number of measurements = 100 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of control variables = 0 number of within-block variables = 0 repeated measurement in variable 1 over 50 levels number of repeated measurements in each level is 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 estimated time per randomization is 0 seconds not performing a correction for multiple comparisons stat_montecarlo = prob: 0.0394 mask: 1 stat: -1.7500 -------------------- Maybe I'm missing something. But I think you should replace stat.prob = min(prb_neg, prb_pos); by stat.prob = 2 *min(prb_neg, prb_pos); in line 344 of statistics_montecarlo(), for the two-tailed test. Maybe it would be even better to compare the absolute values of the observed and the randomized statistics, i.e. doing something like this for i=1:Nrand, .... if tail == 0, prb_pos = prb_pos + (abs(statobs) Message-ID: On 29 Jun 2007, at 9:12, Valesca Kooijman wrote: >> Warning: cannot convert matlab version into a number >> In eeglab2fieldtrip>matlabversion at 265 >> In eeglab2fieldtrip>fixprecision at 230 >> In eeglab2fieldtrip at 149 >> ??? Index exceeds matrix dimensions. >> >> Error in ==> eeglab2fieldtrip at 149 >> data.trial{index} = fixprecision(EEG.data(:,:,index)); Hi Valesca The up-to-date version of eeglab2fieldtrip that is included in fieldtrip has something else on line 149, and does not call the fixprecision function. I suggest that you upgrade to the latest fieldtrip version and try with that. Alternatively you can try a more recent matlab version. 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 5 17:06:16 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 5 Jul 2007 17:06:16 +0200 Subject: Interpolating bad channels in EEG In-Reply-To: Message-ID: Hi Helen > Is there a function in Fieldtrip that can replace data from a bad EEG > channel using interpolation of neighbouring channels? There is the function MEGREPAIR, which also will work on EEG channels. It does require that you specify a structure with electrode positions in 3D. See http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#how_are_electrodes _magnetometers_or_gradiometers_described and see READ_FCDC_ELEC. Since the function was written for MEG data, you have to add the electrode structure to the data as if it is a gradiometer structure, i.e. elec = something... data.grad = elec prior to calling MEGREPAIR. You also have to specify cfg.neighbourdist in the same units as they are in your electrode definition (e.g. cm or mm). 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 5 17:25:04 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 5 Jul 2007 17:25:04 +0200 Subject: Volume conduction model for EEG DICS beamforming In-Reply-To: Message-ID: Hi Jared, On 29 Jun 2007, at 3:31, Jared Van Snellenberg wrote: > I'm currently working on a few DICS beamforming analyses for an EEG > dataset > I have, and I have a couple of questions regarding obtaining a good > volume > conduction model to include in the cfg.vol input to sourceanalysis. > > I do not have MRIs or headshape information for my subjects, but of > course > I have electrode position information in spherical coordinates > (stored in > an elec structure imported from a BESA .elp file). As far as I know, the BESA elp format only contains the two angles that define the electrode position in spherical coordinates (i.e. see http://en.wikipedia.org/wiki/Spherical_coordinates) to project them onto a spherical head model. The 3D carthesian coordinates would be more usefull and realistic (i.e. an x, y, and z value for each electrode). > It's not clear to me how to generate a volume conduction model with > this > information, so any guidance here would be greatly appreciated. > Ideally, I > would like to use a 4-shell model. You can use a 4-shell concentric sphere model. That is specified using vol.r = [r1 r2 r3 r4] % radii of the shperes vol.c = [c1 c2 c3 c4] % conductivit within each sphere vol.o = [x y z] % optional, origin of the sphere. Default is to assume [0 0 0] You can fit the radius of the outermost sphere to the electrodes. For the elp files I would assume that the origin of the sphere would be [0 0 0], which means that you do not have to specify that. The standard spherical model used in BESA is vol = r: [71 72 79 85] c: [0.3300 1 0.0042 0.3300] o: [0 0 0] > The FIELDTRIP documentation indicates > that this model is implemented, but I can not seem to find the > relevant > function (and prepare_singleshell requires headshape information or > an nx3 > sensor array--I presume in grid coordinates--that I do not have). The prepare_localspheres and prepare_singleshell are indeed for MEG volume conductors. They can use a polhemus scanned surface of the head, or a large set of points on the brain (from an MRI) or they can use a segmented anatomical MRI. > Finally, > all of the relevant prepare_XXX functions seem to indicate that > they are > specifically for MEG data, so I wanted to make sure that whatever > approach > I use is appropriate for EEG electrodes rather than MEG sensors. You can also use a standard realistic EEG model using the boundary element method (BEM), which is based on the SPM/MNI template brain. That is not included by default in the fieldtrip release version but I have just copied it as a seperate file to our ftp server. You can find it on ftp://ftp.fcdonders.nl/pub/fieldtrip/standard_BEM.zip 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/fcdonders/fieldtrip. From maris at NICI.RU.NL Thu Jul 5 21:51:03 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 5 Jul 2007 21:51:03 +0200 Subject: bug in statistics_montecarlo? In-Reply-To: <468CDCBF.50707@cbs.mpg.de> Message-ID: Dear Maren, > I'm just trying out your excellent software, in specific your extremely > useful and well designed statistics functions. Many thanks for this > great and generous gift to the neuroscience community! > > I would like to point you to an inconsistency I seem to have found in > the implementation of the statistics_montecarlo function. When I > compared the probabilities computed with statistics_analytic and > statistics_montecarlo for the depsamplesT test, the probabilities > determined via the randomization test turned out to be too low by a > factor of about 1/2, see code and Matlab output below. Most likely, there will be a bug in statistics_montecarlo somewhere, but I do not think that your numerical demonstration is evidence for such a bug. The following points are relevant in this respect: 1. For a permutation test to be correct (in the sense that it controls the false alarm rate), it is NOT required that it produces the same p-value as the corresponding parametric test (i.e., using the same test statistic and calculating the p-value under auxiliary assumption of normality). 2. To show that there is a bug in the statistics_montecarlo, you must show that its permutation p-values do not have the properties they should have according to the theory behind permutation tests (see, Maris and Oostenveld, in the most recent issue of the Journal of Neuroscience Methods). For instance, you could do the following: 1. Take a test statistic, e.g., the dependent samples t-statistic. 2. Generate N pairs of observations from a bivariate distribution with identical marginal distributions (this is the null hypothesis of a permutation test for a within-units study). 3. Calculate the permutation p-value under the permutation distribution, which is obtained by randomly permuting the elements of the N pairs. 4. Repeat steps 2-3 a large number of times and calculate the proportion of times that it is less than 0.05. 5. If the proportion in 4. is significantly different from 0.05 (the nomical alpha-level) you have shown that there is bug in statistics_montecarlo. A simulation study of the type described here was performed by Maris, Schoffelen, & Fries (2007, also in the Journal of Neuroscience Methods) to show that a permutation test for coherence differences controls the false alarm rate whereas the corresponding parametric test does not. Kind regards, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > ------------------------- > > N = 50; > M = 0.25; > alpha = 0.05; > tail = 0; % 'both' > > % construct a normally distributed difference vector > % with unit variance and mean M > d = randn(1,N); > d = d ./ sqrt(var(d,1,2)); > d = d -mean(d) + M; > > % compute a paired t-test > [H,P,CI,stat] = ttest(d,0,alpha,tail) > > H = > > 0 > > > P = > > 0.0864 > > > CI = > > -0.0371 0.5371 > > > stat = > > tstat: 1.7500 > df: 49 > sd: 1.0102 > > % generate two sample vectors with their difference given by d > x =randn(1,N); > y = x + d; > > % generate the design matrix for testing with fieldtrip > design = [ > 1:N 1:N % subject number > repmat(1,[1 N]) repmat(2,[1 N]) % condition number > ]; > > cfg = []; > cfg.statistic = 'depsamplesT'; > cfg.method = 'analytic'; > cfg.correctm = 'no'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.uvar = 1; > cfg.ivar = 2; > > [stat_analytic, cfg] = statistics_analytic(cfg,[x y],design) > > stat_analytic = > > stat: -1.7500 > df: 49 > critval: [-2.0096 2.0096] > prob: 0.0864 > mask: 0 > > cfg.numrandomization = 5000; > [stat_montecarlo, cfg] = statistics_montecarlo(cfg,[x y],design) > > using "statfun_depsamplesT" for the single-sample statistics > constructing randomized design > total number of measurements = 100 > total number of variables = 2 > number of independent variables = 1 > number of unit variables = 1 > number of control variables = 0 > number of within-block variables = 0 > repeated measurement in variable 1 over 50 levels > number of repeated measurements in each level is 2 2 2 2 2 2 2 2 2 2 2 2 > 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 > estimated time per randomization is 0 seconds > not performing a correction for multiple comparisons > > stat_montecarlo = > > prob: 0.0394 > mask: 1 > stat: -1.7500 > > -------------------- > > Maybe I'm missing something. But I think you should replace > > stat.prob = min(prb_neg, prb_pos); > by > stat.prob = 2 *min(prb_neg, prb_pos); > > in line 344 of statistics_montecarlo(), for the two-tailed test. > > Maybe it would be even better to compare the absolute values of the > observed and the randomized statistics, i.e. doing something like this > > for i=1:Nrand, > .... > if tail == 0, > prb_pos = prb_pos + (abs(statobs) end > ... > end > if tail == 0, > stat.prob = prb_pos./Nrand; > end > > > What do you think? > > Many thanks in advance for your comments. > Best regards, > --Maren > > -- > Max Planck Institute for Human Cognitive and Brain Sciences > Dipl.-Phys. Maren Grigutsch mailto:grigu at cbs.mpg.de > Stephanstr.1a http://www.cbs.mpg.de > 04103 Leipzig, Germany phone/fax: +49 341 9940-136/-260 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kooijman at TIFN.NL Fri Jul 6 08:27:12 2007 From: Kooijman at TIFN.NL (Valesca Kooijman) Date: Fri, 6 Jul 2007 08:27:12 +0200 Subject: eeglab2fieldtrip In-Reply-To: Message-ID: Hi Robert, The latest version of eeglab2fieldtrip gives me the same error message in line 146 (where it calls the fixprecission function, instead of in line 149). Is there another solution? If not, which version of matlab do you recommend? Thanks, Valesca Robert Oostenveld Sent by: FieldTrip discussion list 07/05/2007 05:00 PM Please respond to FieldTrip discussion list To FIELDTRIP at NIC.SURFNET.NL cc Subject Re: [FIELDTRIP] eeglab2fieldtrip On 29 Jun 2007, at 9:12, Valesca Kooijman wrote: >> Warning: cannot convert matlab version into a number >> In eeglab2fieldtrip>matlabversion at 265 >> In eeglab2fieldtrip>fixprecision at 230 >> In eeglab2fieldtrip at 149 >> ??? Index exceeds matrix dimensions. >> >> Error in ==> eeglab2fieldtrip at 149 >> data.trial{index} = fixprecision(EEG.data(:,:,index)); Hi Valesca The up-to-date version of eeglab2fieldtrip that is included in fieldtrip has something else on line 149, and does not call the fixprecision function. I suggest that you upgrade to the latest fieldtrip version and try with that. Alternatively you can try a more recent matlab version. 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/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From grigu at CBS.MPG.DE Fri Jul 6 15:27:14 2007 From: grigu at CBS.MPG.DE (Maren Grigutsch) Date: Fri, 6 Jul 2007 15:27:14 +0200 Subject: bug in statistics_montecarlo? In-Reply-To: <00d501c7bf3d$d1a796c0$b0ccae83@fcdonders.nl> Message-ID: Eric Maris wrote: >Dear Maren, > > >Most likely, there will be a bug in statistics_montecarlo somewhere, but I >do not think that your numerical demonstration is evidence for such a bug. > >The following points are relevant in this respect: > > > 1. For a permutation test to be correct (in the sense that it controls the > false alarm rate), it is NOT required that it produces the same p-value as > the corresponding parametric test (i.e., using the same test statistic and > calculating the p-value under auxiliary assumption of normality). > > > Dear Eric, Many thanks for your fast response! You may be right that the data I sent you cannot be regarded as an unequivocal evidence for a bug in statistics_montecarlo. What I had in mind and wanted to demonstrate to you was the following: The dependent samples t-test gives accurate P-values if the sampling distribution of the difference of means is roughly normal, as was the case in my example. The permutation distribution of the dependent samples t-statistic approximates the sampling distribution of t-values under the null hypothesis. For my example with normally distributed differences and 5000 permutations, the permutation distribution should closely resemble the theoretical t distribution underlying the analytic t-test. Thus, I had expected te get roughly the same p-values from both the analytic and the permutation t-test. However, when I repeated my simulations many times, the p-values obtained from statistics_montecarlo, using a two-tailed test, were always smaller by a factor of about 1/2 as compared to the p-values obtained from statistics_analytic or Matlab's ttest function. In contrast, when I applied a one-sided test the P-values were roughly the same between the different functions. > >2. To show that there is a bug in the statistics_montecarlo, you must show >that its permutation p-values do not have the properties they should have >according to the theory behind permutation tests (see, Maris and Oostenveld, >in the most recent issue of the Journal of Neuroscience Methods). For >instance, you could do the following: > >1. Take a test statistic, e.g., the dependent samples t-statistic. > >2. Generate N pairs of observations from a bivariate distribution with >identical marginal distributions (this is the null hypothesis of a >permutation test for a within-units study). > >3. Calculate the permutation p-value under the permutation distribution, >which is obtained by randomly permuting the elements of the N pairs. > >4. Repeat steps 2-3 a large number of times and calculate the proportion >of times that it is less than 0.05. > >5. If the proportion in 4. is significantly different from 0.05 (the >nomical alpha-level) you have shown that there is bug in >statistics_montecarlo. > > > > Well, this sounds very convincing. To follow your suggestions I ran the following script (using only 500 permutations, for the sake of time): --------- Nrep = 500; Nperm = 500; N = 50; design = [ 1:N 1:N % subject number repmat(1,[1 N]) repmat(2,[1 N]) % condition number ]; cfg = []; cfg.statistic = 'depsamplesT'; cfg.method = 'montecarlo'; cfg.correctm = 'no'; cfg.alpha = 0.05; cfg.tail = 0; cfg.uvar = 1; % "subject" is unit of observation (unit factor) cfg.ivar = 2; % "condition" is the independent variable (repeated measures) cfg.numrandomization = Nperm; cfg.feedback = 'no'; prob = zeros(1,Nrep); T = zeros(1,Nrep); wb = waitbar(0,'Please wait...'); for k=1:Nrep, x = randn(1,N); y = randn(1,N); [stat_montecarlo, cfg] = statistics_montecarlo(cfg,[x y],design); prob(k) = stat_montecarlo.prob; T(k) = stat_montecarlo.stat; waitbar(k/Nrep,wb); end close(wb); % should be approximately 0.05 sum(prob<0.05) / Nrep ------- And here is the result: ans = 0.1000 If I got it correctly, this means that the observed FA rate (0.1) is twice the expected value of 0.05 (the nominal alpha level). So it still seems to me that there is something wrong with statistics_montecarlo. I'm just about reading the paper of yours mentioned above. In section 3.1.1 you describe cluster-based nonparametric statistical tests, and you give the following statement: "for a two-sided test, we select test statistics whose absolute value is larger than some threshold". In my opinion, this is exactly what should be done in statistics_montecarlo for a two-sided test: comparing the *absolute* t-values. >A simulation study of the type described here was performed by Maris, >Schoffelen, & Fries (2007, also in the Journal of Neuroscience Methods) to >show that a permutation test for coherence differences controls the false >alarm rate whereas the corresponding parametric test does not. > > Thank you for pointing me to that paper. I'm sure it will help me a lot to improve my understanding of nonparametric statistical tests. I'm looking forward to your response. Hope not to bother you too much. But I think the issue has some impact and is worth to be thoroughly discussed. Best regards, --Maren > > > > >Kind regards, > > > > > >Eric Maris > > > >dr. Eric Maris > >NICI/Biological Psychology and > >F.C. Donders Center for Cognitive NeuroImaging > >University of Nijmegen > >P.O. Box 9104 > >6500 HE Nijmegen > >The Netherlands > >T:+31 24 3612651 (NICI) > >T:+31 24 3610754 (FCDC) > >F:+31 24 3616066 (NICI) > >E: maris at nici.ru.nl > >MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > -- Max Planck Institute for Human Cognitive and Brain Sciences Dipl.-Phys. Maren Grigutsch mailto:grigu at cbs.mpg.de Stephanstr.1a http://www.cbs.mpg.de 04103 Leipzig, Germany phone/fax: +49 341 9940-136/-260 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jaredvs at GMAIL.COM Sat Jul 7 05:12:49 2007 From: jaredvs at GMAIL.COM (Jared Van Snellenberg) Date: Fri, 6 Jul 2007 23:12:49 -0400 Subject: Volume conduction model for EEG DICS beamforming In-Reply-To: <4D495628-E1DE-4D4B-9CEF-A55136D6FCDF@fcdonders.ru.nl> Message-ID: Hi Robert, Thanks very much for the clarifications. Quick question about the BEM model you supplied--is it correct to just pass in the vol structure contained in the standard_vol.mat along with an elec structure containing the nx3 array of electrode coordinates in MNI space? That is, is the following correct: load standard_vol.mat cfg.vol=vol; cfg.elec=elec; %predefined; 59 electrode coordinates in MNI results=sourceanalysis(cfg,data); Thanks, -Jared Van Snellenberg On 7/5/07, Robert Oostenveld wrote: > > Hi Jared, > > On 29 Jun 2007, at 3:31, Jared Van Snellenberg wrote: > > I'm currently working on a few DICS beamforming analyses for an EEG > > dataset > > I have, and I have a couple of questions regarding obtaining a good > > volume > > conduction model to include in the cfg.vol input to sourceanalysis. > > > > I do not have MRIs or headshape information for my subjects, but of > > course > > I have electrode position information in spherical coordinates > > (stored in > > an elec structure imported from a BESA .elp file). > > As far as I know, the BESA elp format only contains the two angles > that define the electrode position in spherical coordinates (i.e. see > http://en.wikipedia.org/wiki/Spherical_coordinates) to project them > onto a spherical head model. The 3D carthesian coordinates would be > more usefull and realistic (i.e. an x, y, and z value for each > electrode). > > > It's not clear to me how to generate a volume conduction model with > > this > > information, so any guidance here would be greatly appreciated. > > Ideally, I > > would like to use a 4-shell model. > > You can use a 4-shell concentric sphere model. That is specified using > vol.r = [r1 r2 r3 r4] % radii of the shperes > vol.c = [c1 c2 c3 c4] % conductivit within each sphere > vol.o = [x y z] % optional, origin of the sphere. Default is to > assume [0 0 0] > > You can fit the radius of the outermost sphere to the electrodes. For > the elp files I would assume that the origin of the sphere would be > [0 0 0], which means that you do not have to specify that. > > The standard spherical model used in BESA is > vol = > r: [71 72 79 85] > c: [0.3300 1 0.0042 0.3300] > o: [0 0 0] > > > The FIELDTRIP documentation indicates > > that this model is implemented, but I can not seem to find the > > relevant > > function (and prepare_singleshell requires headshape information or > > an nx3 > > sensor array--I presume in grid coordinates--that I do not have). > > The prepare_localspheres and prepare_singleshell are indeed for MEG > volume conductors. They can use a polhemus scanned surface of the > head, or a large set of points on the brain (from an MRI) or they can > use a segmented anatomical MRI. > > > Finally, > > all of the relevant prepare_XXX functions seem to indicate that > > they are > > specifically for MEG data, so I wanted to make sure that whatever > > approach > > I use is appropriate for EEG electrodes rather than MEG sensors. > > You can also use a standard realistic EEG model using the boundary > element method (BEM), which is based on the SPM/MNI template brain. > That is not included by default in the fieldtrip release version but > I have just copied it as a seperate file to our ftp server. You can > find it on ftp://ftp.fcdonders.nl/pub/fieldtrip/standard_BEM.zip > > 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/fcdonders/fieldtrip. > -- Jared Van Snellenberg Social Cognitive Affective Neuroscience Unit http://scan.psych.columbia.edu (212) 854-7858 p (212) 854-3609 f Department of Psychology, Columbia University 406 Schermerhorn Hall 1190 Amsterdam Avenue, Mail Code 5501 New York, NY 10027 _______________________________ "Luck is the residue of design" -Attributed to Branch Rickey, former US Baseball Administrator, and also to John Milton. Go figure. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Sat Jul 7 13:48:55 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Sat, 7 Jul 2007 13:48:55 +0200 Subject: Volume conduction model for EEG DICS beamforming In-Reply-To: <51d499680707062012i76928451te1a47f515e26abd9@mail.gmail.com> Message-ID: On 7 Jul 2007, at 5:12, Jared Van Snellenberg wrote: > Quick question about the BEM model you supplied--is it correct to > just pass in the vol structure contained in the standard_vol.mat > along with an elec structure containing the nx3 array of electrode > coordinates in MNI space? That is, is the following correct: > > load standard_vol.mat > cfg.vol=vol; > cfg.elec=elec; %predefined; 59 electrode coordinates in MNI > results=sourceanalysis(cfg,data); Yes, but only if the electrode labels in your data match with the complete set or a subset of the labels in elec (it is case sensitive). The intersection of data.label and elec.label will be used for sourecanalysis. However, for EEG source analysis your data should be average referenced. And that is something that you do during preprocessing (or optionally timelockanalysis). That means that all channels in your data for which there is a corresponding electrode position in the elec structure should be average referenced. Prior to sourceanalysis, you can use the headmodelplot function (or electroderealign with method=interactive) to check that the electrodes ly on the skin compartment of the MNI head model. 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Sat Jul 7 14:09:15 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Sat, 7 Jul 2007 14:09:15 +0200 Subject: eeglab2fieldtrip In-Reply-To: Message-ID: On 6 Jul 2007, at 8:27, Valesca Kooijman wrote: > The latest version of eeglab2fieldtrip gives me the same error > message in line 146 (where it calls the fixprecission function, > instead of in line 149). > Is there another solution? If not, which version of matlab do you > recommend? Matlab 7.0.1 is an old version, released around end 2004. It was quickly superseeded with version 7.0.4 to fix some serious bugs. I reccommend people in general to work with the latest matlab versionm, which now is 7.4. You can fix your problem by changing the "matlabversion" function which is included as subfunction inside the eeglab2fieldtrip function. Go to line 250 and replace the code there with the snippet below. I will make the same change in the release version. Robert ---- function [v] = matlabversion; s = ver('matlab'); v = s.Version; if ischar(v) % try converting to a number n = str2num(v); if isempty(n) switch v case '6.5.1' n = 6.5; % this is accurate enough case '7.0.1' n = 7.0; % this is accurate enough case '7.0.4' n = 7.0; % this is accurate enough otherwise warning('cannot convert matlab version into a number'); v = v; end end v = n; end ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Sun Jul 8 21:11:10 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Sun, 8 Jul 2007 15:11:10 -0400 Subject: clusterandanalysis: negculsters vs posclusters and onesided vs two sided tests. Message-ID: Dear Fieldtrippers, I have been implementing clusterandanalysis (instead of freqstatistics) according to Eric Mariss suggestion to find coherence differences between trials. However I seem to be getting some confusing results. I do the following for i = 1: numel(MEGchan) cfg = []; cfg.channelcmb = { MEGchan{i} 'MEG'}; cfg.statistic = 'indepsamplesZcoh' ; cfg.onetwo = 'onesided_1<2 ; OR cfg.onetwo = 'onesided_2<1; cfg.alpha = 0.05 ; cfg.clusterteststat = 'maxsum' ; cfg.makeclusters = 'yes' ; cfg.minnbchan = 2; cfg.nranddraws = 1000; [clusrand] = clusterrandanalysis(cfg, CSD1 , CSD2); clusrand_Coh_1greater2{i} = clusrand; OR clusrand_Coh_2greater1{i} = clusrand; OR clusrand_Coh_twosided{i} = clusrand; end cfg.onetwo = 'onesided_1<2 ; as well as cfg.onetwo = 'onesided_2<1; find the same positive clusters (posclusters) for one of the 6 sensors belonging to MEGchans (the other 5 return empty posclusters and negclusters). I would have thought the cluster which shows up as posculster in 'onesided_1<2 should show up as negcluster in 'onesided_2<1. Secondly, cfg.onetwo = 'twosided' ; returns clustering effects for channels other than the one seen above and show only negclusters. At the same time the channel which showed posclusters in the two one sided tests shows no custering in coherence. Does this make sense? If yes, what is it? Thanks a lot for your time. Your replies are always much appreciated. Best, sameer p.s: Ill admit that the questions written above also partly stem from my lack of deep understanding of clustering analysis, and in particular, I have no idea what is meant by negative and positive clusters. It would be great if someone could point me to some reading material. I have tried, but, have been unable to find any definition on negative clusters and positive clusters, though I have some idea about how clustering works. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From J.Geuze at STUDENT.RU.NL Mon Jul 9 12:22:15 2007 From: J.Geuze at STUDENT.RU.NL (Jeroen Geuze) Date: Mon, 9 Jul 2007 12:22:15 +0200 Subject: freqanalysis_mtmconvol Message-ID: Dear Fieltrip team, I'm using freqanalysis_mtmconvol to extract single trial TFR data. What I noticed when running the code is that not all my trials end up in the 4D powspctrm field of the result struct. I have used two datasets. One contains 193 trials and the other 324. When I run freqanalysis, I am left with 154 and 140 trials respectively in the rpt part of powspctrm. Is there a problem here or is my fieldtrip ignorance playing up. The config I used: cfg = []; cfg.output = 'pow'; cfg.channel = 'all'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 5:1:40; cfg.t_ftimwin = 4./cfg.foi; % 4 cycles per time window cfg.toi = -0.5:0.05:2; cfg.keeptrials = 'yes'; Thanks in advance for any help, Jeroen Geuze ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Mon Jul 9 13:27:02 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 9 Jul 2007 13:27:02 +0200 Subject: freqanalysis_mtmconvol In-Reply-To: <37814C52-03FE-4CE8-8FBA-11142B6BA59A@student.ru.nl> Message-ID: Hi Jeroen, The cfg looks okay as far as I can see. Does freqanalysis say the correct amount of trials when you call it? (It starts up with saying something like "the input is raw data with . channels and . trials) If it does not say anything like this, it could be that you are using an old version of FieldTrip. (not that an old version could be an explanation for this though). I have no idea what it could be, but probably it has to do with the data set that you give in. Could it be that the trials do not all have the same time axis, and that some trials are not from -0.5 to 2 seconds and therefore omitted since cfg.toi = -0.5:0.05:2; If not can you give some more information on your data, what are the time axis of the trials, what did you do before calling freqanalysis? Bests Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Jeroen Geuze Sent: Monday, July 09, 2007 12:22 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] freqanalysis_mtmconvol Dear Fieltrip team, I'm using freqanalysis_mtmconvol to extract single trial TFR data. What I noticed when running the code is that not all my trials end up in the 4D powspctrm field of the result struct. I have used two datasets. One contains 193 trials and the other 324. When I run freqanalysis, I am left with 154 and 140 trials respectively in the rpt part of powspctrm. Is there a problem here or is my fieldtrip ignorance playing up. The config I used: cfg = []; cfg.output = 'pow'; cfg.channel = 'all'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 5:1:40; cfg.t_ftimwin = 4./cfg.foi; % 4 cycles per time window cfg.toi = -0.5:0.05:2; cfg.keeptrials = 'yes'; Thanks in advance for any help, Jeroen Geuze ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From J.Geuze at STUDENT.RU.NL Mon Jul 9 13:29:58 2007 From: J.Geuze at STUDENT.RU.NL (Jeroen Geuze) Date: Mon, 9 Jul 2007 13:29:58 +0200 Subject: freqanalysis_mtmconvol In-Reply-To: <37814C52-03FE-4CE8-8FBA-11142B6BA59A@student.ru.nl> Message-ID: Dear Fieldtrip team, My sincere apologies for spamming your mailbox (twice), there seemed to be a wrong flag somewhere in my code, causing a data set mix up. The problem is solved now. Regards, Jeroen. On Jul 9, 2007, at 12:22 PM, Jeroen Geuze wrote: > Dear Fieltrip team, > > I'm using freqanalysis_mtmconvol to extract single trial TFR data. > What I noticed when running the code is that not all my trials end > up in the 4D powspctrm field of the result struct. I have used two > datasets. One contains 193 trials and the other 324. When I run > freqanalysis, I am left with 154 and 140 trials respectively in the > rpt part of powspctrm. Is there a problem here or is my fieldtrip > ignorance playing up. > The config I used: > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'all'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.foi = 5:1:40; > cfg.t_ftimwin = 4./cfg.foi; % 4 cycles per time window > cfg.toi = -0.5:0.05:2; > cfg.keeptrials = 'yes'; > > Thanks in advance for any help, > > > Jeroen Geuze > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marie at PSY.GLA.AC.UK Thu Jul 12 11:25:33 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Thu, 12 Jul 2007 10:25:33 +0100 Subject: Job advertisement - CCNI Glasgow Message-ID: UNIVERSITY of GLASGOW DEPARTMENT OF PSYCHOLOGY Centre for Cognitive Neuroimaging (CCNi) POST DOCTORAL RESEARCH ASSISTANT 1 year fixed term appointment, £23,692 - £26,666 per annum REF: 13436/DPO/A3 Applications are invited for a Postdoctoral Research Assistant to work with Dr. Guillaume Rousselet in the newly established Centre for Cognitive Neuroimaging (CCNi). The CCNi is a research institution with state-of-the-art EEG and TMS systems and a large computing grid. Within the next few months a new fMRI and MEG system will be installed. The position is offered for a period of one year with potential 1-2 year extension pending funding approval. Several research projects are available, dealing with the rapid visual processing of faces, objects, and natural scenes. The primary goal of these projects is to map systematically how statistical image properties impact brain and behavioural responses, using a range of psychophysics paradigms and EEG techniques. You will be able to think out of the box in terms of EEG analyses and statistical procedures. You will be qualified, with a PhD, or equivalent, in Psychophysics, Cognitive Neuroscience, or a closely related discipline. Strong Matlab programming skills and psychophysics are essential. EEG expertise is not required and appropriate training will be provided. Finally, you should have a strong interest in developing your own scientific program and pursuing a research career. This post is available from 1 September 2007. Informal enquiries may be made to Dr. Guillaume Rousselet, (+44 (0) 141 330 6652; g.rousselet at psy.gla.ac.uk). For further details about the post and how to apply: see our web site at http://www.psy.gla.ac.uk/jobs.php or contact Clare Alexander, Department of Psychology,University of Glasgow, G12 8QQ (+44 (0)141 330 5090, e-mail c.alexander at psy.gla.ac.uk or the University web site at www.gla.ac.uk Closing date: Friday 3rd August 2007. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kooijman at TIFN.NL Fri Jul 13 11:02:44 2007 From: Kooijman at TIFN.NL (Valesca Kooijman) Date: Fri, 13 Jul 2007 11:02:44 +0200 Subject: eeglab2fieldtrip In-Reply-To: <433064D4-1D28-43C8-B1B3-0E926E407173@fcdonders.ru.nl> Message-ID: Hi Robert, In connection with your previous advice concerning the eeglab2fieldtrip script, we came accross the following problem and solution (see script below): filename = 'fk dag 5-Deci.set'; load(filename, '-mat'); %the next line was included because the eeglab2fieldtrip script says % %data.trial{index} = fixprecision(EEG.data(:,:,index)); % while the variable EEG.data only contains the name of the variable and not the data % the next line assigns the data to EEG.data EEG.data = EEGDATA; %%%%%% data = eeglab2fieldtrip(EEG,'preprocessing'); hdr.nChans = length(data.label); hdr.label = data.label; hdr.Fs = data.fsample; write_fcdc_data(filename, EEG.data, 'header', hdr, 'dataformat', 'brainvision_eeg'); I do still get the following warning after running the above script: Warning: writing segmented data as if it were continuous In fieldtrip-20070710\private\write_brainvision_eeg at 38 In fieldtrip-20070710\private\write_data at 63 In write_fcdc_data at 48 In ConversionEEGDATA at 13 Is this problematic or is this a standard warning following conversion to Vision Analyzer? In addition, I was wondering where my trial onset markers are written to? Write_fcdc_data only generates a .eeg and a .hdr file, and not a .vmrk file. >>From your earlier emails I understood that the datamatrix should be converted to ntrials X nchans X nsamples before running write­_fcdc_data. Currently my datamatrix consists of nchans X nsamples X ntrials. Would you mind letting me know how I can convert my datamatrix? Thanks a lot. Best, Valesca Robert Oostenveld Sent by: FieldTrip discussion list 07/07/2007 02:09 PM Please respond to FieldTrip discussion list To FIELDTRIP at NIC.SURFNET.NL cc Subject Re: [FIELDTRIP] eeglab2fieldtrip On 6 Jul 2007, at 8:27, Valesca Kooijman wrote: > The latest version of eeglab2fieldtrip gives me the same error > message in line 146 (where it calls the fixprecission function, > instead of in line 149). > Is there another solution? If not, which version of matlab do you > recommend? Matlab 7.0.1 is an old version, released around end 2004. It was quickly superseeded with version 7.0.4 to fix some serious bugs. I reccommend people in general to work with the latest matlab versionm, which now is 7.4. You can fix your problem by changing the "matlabversion" function which is included as subfunction inside the eeglab2fieldtrip function. Go to line 250 and replace the code there with the snippet below. I will make the same change in the release version. Robert ---- function [v] = matlabversion; s = ver('matlab'); v = s.Version; if ischar(v) % try converting to a number n = str2num(v); if isempty(n) switch v case '6.5.1' n = 6.5; % this is accurate enough case '7.0.1' n = 7.0; % this is accurate enough case '7.0.4' n = 7.0; % this is accurate enough otherwise warning('cannot convert matlab version into a number'); v = v; end end v = n; end ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak at TECHUNIX.TECHNION.AC.IL Fri Jul 13 17:34:45 2007 From: litvak at TECHUNIX.TECHNION.AC.IL (Vladimir Litvak) Date: Fri, 13 Jul 2007 16:34:45 +0100 Subject: out of memory - window machine In-Reply-To: <51d499680706281957v2b1c34bfx48d7a15f0ff82ca2@mail.gmail.com> Message-ID: Dear all, I've been to a Mathworks workshop yesterday and they talked about their new distributed computing toolbox (version 3.1). What they say is that if one has a computer cluster it is possible to install a slave Matlab engine on each machine and declare a variable that will be distributed among all the machines and thereby utilize all their memory even without parallelizing any of the computations. Of course things will run rather slowly that way. Moreover, it should also be possible to run several instances of this engine on the same machine and make use of multiple core processors (if the code is parallelized) but also address more than 2Gb of memory on a 32-bit machine given that every instance of the engine stores less than 2Gb. I have not tried any of this, but if you try and it works for you I'd be very interested to hear about it. Best, Vladimir _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Jared Van Snellenberg Sent: Friday, June 29, 2007 3:58 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] out of memory - window machine Hi Virginie, There are a couple of other things you can do. First, make certain that you are not growing any variables inside a loop. For example, if you have any code like: for i=1:size(data,1) for j=1:size(data,2) newvar(i,j)=data(i,j); end end make sure that you precede this code with: newvar=zeros(size(data)); This will not only speed up the execution of your code but can prevent memory errors in matlab. Second, use the clear function to remove any variables that are no longer necessary. Third, type 'pack' at the command line prior to executing the part of your code that generates the memory error. If none of this works, there are two more options that I'm aware of for avoiding a memory error. First, you can run your analysis on a computer with a 64-bit architecture and a 64-bit operating system. The reason that you are still encountering memory errors despite having virtual memory maximized is that 32-bit systems are incapable of addressing more than approximately 4 GB of memory, regardless of how much is available. This limitation is effectively removed on 64 bit systems (or rather, the limitation is several orders of magnitude higher). Finally, you can run your analysis in steps, saving the results of each step and clearing all the data. I've certainly had to do this before when working in fieldtrip. For example, if you're attempting to timelock analyses, load each subject individually and grandaverage their trials, saving the results to a new variable. Then clear their data, load the next subject, and continue. In addition, with the datasets I've used in FIELDTRIP I've noticed that for most functions specifying cfg.keeptrials='yes' is likely to generate memory errors, and for frequency analyses specifying cfg.parameter='powandcsd' and using a large number of pairings in cfg.channelcmb (or leaving it at default) is pretty well guarenteed to generate a memory error. Good luck! -Jared On 6/28/07, Virginie van Wassenhove wrote: Hi fieldtrippers, would anyone have a trick to share for optimizing memory in matlab...? What I have tried so far (insufficient still): - let windows manage memory - boost virtual memory to maximum (on 2 drives!) - clear all unnecessary variables in mat space - disable java - turned off graphic hardware acceleration - shut off unused processes I am running out of options...Would using a mac solve these issues? Thanks in advance, -vv Virginie van Wassenhove, PhD :::::::::::: contact info ::::::::::::: Caltech - Division of Biology 1200 E. California Blvd M/C 139-74 Pasadena CA 91125 USA ::::::::::::::::::::::::::::::::::::::::::::::::: vvw at caltech.edu Virginie.van.Wassenhove at gmail.com W: 626.395.8959 http://www.its.caltech.edu/~vvw :::::::::::::::::: extras :::::::::::::::::::: http://www.kiva.org http://www.thehungersite.com/ http://www.agloco.com/r/BBBS1539 ::::::::::::::::::::::::::::::::::::::::::::::::: ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -- Jared Van Snellenberg Social Cognitive Affective Neuroscience Unit http://scan.psych.columbia.edu (212) 854-7858 p (212) 854-3609 f Department of Psychology, Columbia University 406 Schermerhorn Hall 1190 Amsterdam Avenue, Mail Code 5501 New York, NY 10027 _______________________________ "Luck is the residue of design" -Attributed to Branch Rickey, former US Baseball Administrator, and also to John Milton. Go figure. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Mon Jul 16 17:36:58 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 16 Jul 2007 11:36:58 -0400 Subject: fd.dof matrix Message-ID: Dear Fieldtrippers, I have a question about calculating degrees of freedom. I get (after freqdescriptives) fd.dof = [46665x26 double]; However, dof = 2 x (Number of trials) x (number of tapers) and my trials are of equal length and I use padding. So I think (and my understanding could be wrong) this huge matrix is a waste of space as the dofs are going to be the same for every pair on each trial. How can I then ensure that freq.dof is just a number and can be still used later on? I am using the following configuration settings. cfgCSD = []; cfgCSD.ouput = 'powandcsd'; cfgCSD.method = 'mtmfft'; cfgCSD.keeptrials = 'yes' ; cfgCSD.keeptapers = 'no' ; cfgCSD.calcdof = 'yes'; cfgCSD.tapsmofrq = 4; cfgCSD.foilim = [f1 f2]; CSD = freqanalysis(cfgCSD, data); cfg = []; cfg.cohmethod = 'plv'; fd = freqdescriptives(cfg, CSD) Thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Andres.Posada at PSE.UNIGE.CH Tue Jul 17 16:21:00 2007 From: Andres.Posada at PSE.UNIGE.CH (Andres Posada) Date: Tue, 17 Jul 2007 16:21:00 +0200 Subject: 2 simple questions Message-ID: Hi all, I am just starting to use FieldTrip, fantastic program and very easy to use. I am doing the tutorial but I am blocked in two different places: First, how I can prepocess (filter, baseline, etc) already saved data? I use manual artifact rejection and I save the data ('save PreprocDataClean dataFIC'). Now when I want to filter and baseline this data, I cannot access them (variable in matlab or a matlab file) with the commands: cfg = []; cfg.datafile = 'PreprocDataClean.mat'; (?) cfg.blc = 'yes'; % apply baseline correction cfg.blcwindow = [-0.2 0]; % baseline: -0.2 sec to 0 cfg.lpfilter = 'yes'; % apply lowpass filter cfg.lpfreq = 35; % lowpass at 35 Hz. dataFIC = preprocessing(cfg); The other problem, when I try to do the tutorial of beamforming, with the mri data of the subject01 (available online) there is a SPM bug! My version of Matlab is 7.0.1.24704 (R14) Service Pack 1 and I use SMP2 (last update). The commands: mri = read_fcdc_mri('Subject01.mri'); cfg = []; cfg.name = 'segment'; cfg.write = 'yes'; cfg.coordinates = 'ctf'; [segmentedmri] = volumesegment(cfg, mri); and the bug is: Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 193 In spm_create_vol at 14 In spm_write_vol at 76 In fieldtrip-20070701\private\volumewrite_spm at 62 In volumesegment at 222 In temp at 6 performing the segmentation on the specified volume * - SPM2: spm_vol ------------------------------------------------- Error reading information on: ..ome/common/matlab/spm2/templates/T1.mnc Please check that it is in the correct format. ----------------------------------------- 15:49:03 - 17/07/2007 ??? Error using ==> spm_vol>subfunc1 Can't get volume information for '/home/common/matlab/spm2/templates/T1.mnc' Error in ==> spm_vol>subfunc2 at 51 V = subfunc1(P); Error in ==> spm_vol at 37 V = subfunc2(P); Error in ==> spm_segment>get_affine_mapping at 226 if ~isempty(VG) & ischar(VG), VG = spm_vol(VG); end; Error in ==> spm_segment>init_sp at 567 MM = get_affine_mapping(VF,PG,flags.affreg); Error in ==> spm_segment at 91 SP = init_sp(flags.estimate,VF,PG); Error in ==> volumesegment at 246 spm_segment(Va,cfg.template,flags); Error in ==> temp at 6 [segmentedmri] = volumesegment(cfg, mri); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jaredvs at GMAIL.COM Tue Jul 17 22:24:02 2007 From: jaredvs at GMAIL.COM (Jared Van Snellenberg) Date: Tue, 17 Jul 2007 22:24:02 +0200 Subject: Mex File error during call to eeg_leadfield Message-ID: Hi all, I'm working on a DICS beamformer analysis, and ran into a Mex file error. Here's the MATLAB error (as you can see I have the most recent versions of MATLAB and FIELTRIP): ??? Invalid MEX-file 'C:\Program Files\MATLAB\R2007a\fieldtrip-20070717 \private\plgndr.dll': The specified procedure could not be found. . Error in ==> fieldtrip-20070717\private\eeg_leadfield4 at 126 P0 = plgndr(n,0,cos_theta); % zero'th order Legendre Error in ==> fieldtrip-20070717\private\compute_leadfield at 447 lf = eeg_leadfield4(pos, sens.pnt, vol); Error in ==> fieldtrip-20070717\private\beamformer_dics at 212 lf = compute_leadfield(dip.pos(i,:), grad, vol, 'reducerank', reducerank, 'normalize', normalize); Error in ==> sourceanalysis at 855 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); In case it helps, my cfg options are as follows: src_cfg.method='dics'; src_cfg.vol.r=[71 72 79 85]; src_cfg.vol.c=[0.3300 1 0.0042 0.3300]; src_cfg.vol.o=[0 0 35.9]; src_cfg.grid.xgrid=-85:5:85; src_cfg.grid.ygrid=-85:5:85; src_cfg.grid.zgrid=-50:5:125; src_cfg.grid.resolution=5; src_cfg.channel=1:59; Also, the data contain an elec field with a 61x3 list of coordinates (in mm, like the cfg.grid) and a 61x1 cell array of channel labels. The data come from a call to freqanalysis with the following options: f_cfg.method='mtmconvol'; f_cfg.output='powandcsd'; f_cfg.taper='hanning'; f_cfg.tapsmofrq=1; f_cfg.keeptrials='yes'; f_cfg.channel=1:59; Any assistance would be greatly appreciated. Regards, Jared Van Snellenberg Social Cognitive Affective Neuroscience Unit http://scan.psych.columbia.edu (212) 854-7858 p (212) 854-3609 f Department of Psychology, Columbia University 406 Schermerhorn Hall 1190 Amsterdam Avenue, Mail Code 5501 New York, NY 10027 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ctesche at UNM.EDU Thu Jul 19 17:59:06 2007 From: ctesche at UNM.EDU (Claudia Tesche) Date: Thu, 19 Jul 2007 17:59:06 +0200 Subject: CTF MEG42RS format Message-ID: Hi All Does anyone know how to read CTF MEG data in MEG42RS format into either fieldtrip or eeglab? Thanks, Claudia ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From enteka at HOTMAIL.COM Thu Jul 19 19:33:55 2007 From: enteka at HOTMAIL.COM (Nicolas Robitaille) Date: Thu, 19 Jul 2007 17:33:55 +0000 Subject: CTF MEG42RS format Message-ID: Hello When reading CTF MEG data into fieldtrip or eeglab via their included functions, there is a warning about the MEG42RS format, but usually the data are ok. Did you got further problem than this warning? Nicolas************************************ Nicolas Robitaille, candidat Ph.D Département de Psychologie Université de Montréal C.P. 6128, succursale Centre-ville Montréal, Québec H3C 3J7 Tel.: 514-343-6111 x2631 Fax: 514-343-5787 ************************************ > Date: Thu, 19 Jul 2007 17:59:06 +0200> From: ctesche at UNM.EDU> Subject: [FIELDTRIP] CTF MEG42RS format> To: FIELDTRIP at NIC.SURFNET.NL> > Hi All> > Does anyone know how to read CTF MEG data in MEG42RS format into either > fieldtrip or eeglab?> > Thanks,> > Claudia> > ----------------------------------> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. _________________________________________________________________ Soyez parmi les premiers à essayer Windows Live Mail. http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Thu Jul 19 21:23:32 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 19 Jul 2007 15:23:32 -0400 Subject: spatial clustering Message-ID: Hello, I am using clusterandanalysis to detect coherence differences and wonder how the spatial adjacency of sensors is determined. Am I right in understanding that given an MEG (e.g. Neuromag 306) since the exact layout is known, one can determine the nearest neighbours for each sensor simply by looking up the layout? So for example, if a squid 20.2 shows a significant effect, its nearest neighbours from the layout are 18.3, 22.4, 22.2, 23.1, 20.3, 20.4, 20.1. If I use cfg.minnbchan = 2, the clustering algorithm will look to see if atleast two of the neighbours given above also show a significant effect for a cluster to be determined. Is this what is implemented in clusterandanalysis? Thank you very much for your time, best, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From tomh at KURAGE.NIMH.NIH.GOV Thu Jul 19 23:49:22 2007 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd (NIH/NIMH) [E]) Date: Thu, 19 Jul 2007 17:49:22 -0400 Subject: CTF MEG42RS format In-Reply-To: Message-ID: Fieldtrip has code to read CTF MEG files. I use it all the time. Try it. It also reads the CTF multisphere models produced by localSpheres. Claudia Tesche wrote: > Hi All > > Does anyone know how to read CTF MEG data in MEG42RS format into either > fieldtrip or eeglab? > > Thanks, > > Claudia > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -- Tom Holroyd, Ph.D. "The fundamentally misconceived nature versus nurture debate should be abandoned: child development is inextricably both." -- Louann Brizendine ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Jul 23 16:16:08 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 23 Jul 2007 16:16:08 +0200 Subject: Mex File error during call to eeg_leadfield In-Reply-To: Message-ID: Hi Jared, On 17 Jul 2007, at 22:24, Jared Van Snellenberg wrote: > I'm working on a DICS beamformer analysis, and ran into a Mex file > error. > > Here's the MATLAB error (as you can see I have the most recent > versions of > MATLAB and FIELTRIP): > > ??? Invalid MEX-file 'C:\Program Files\MATLAB\R2007a > \fieldtrip-20070717 > \private\plgndr.dll': The specified procedure could not be found. The dll file itself is included in the FT version that you have. Which matlab version are you using, and on what windows platform (64 bit perhaps?). Please try recompiling the plgndr mex file using the attached code. 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: plgndr.c Type: application/octet-stream Size: 3154 bytes Desc: not available URL: -------------- next part -------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Jul 23 16:26:25 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 23 Jul 2007 16:26:25 +0200 Subject: 2 simple questions In-Reply-To: Message-ID: Dear Andres, On 17 Jul 2007, at 16:21, Andres Posada wrote: > I am doing the tutorial but I am blocked in two different places: > First, how I can prepocess (filter, baseline, etc) already saved > data? I use > manual artifact rejection and I save the data ('save > PreprocDataClean dataFIC'). Normally you would filter and baseline correct only once, and that is at the time of preprocessing. You cannot call the preprocessing function multiple times. > Now when I want to filter and baseline this data, I cannot access them > (variable in matlab or a matlab file) with the commands: > > cfg = []; > cfg.datafile = 'PreprocDataClean.mat'; (?) If you decide afterwards that you want to change your filter settings, you either should call preprocessing once more (with cfg.dataset=original_file). You can reuse the cleaned trial definition that results from rejectvisual as explained on http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:tutorial:rejectvisual and http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:tutorial:eventrelatedaveraging#preprocessing_ the_data A smart trich that you can use is that teh output data of each fieldtrip function will contain the "cfg" field. I.e. the rejectvisual function returns cleandata, with cleandata.cfg.trl representing the trials that are actually clean. So you can easily preprocess the clean segments of the data with other filter settings. Alternatively, you can apply filters and baselinecorrection once more when you call timelockanalysis. That function replicates most of the filtering options of preprocessing, except that you cannot use filter padding. In your case, you could do load PreprocDataClean cfg = []; cfg.blc = 'yes'; % apply baseline correction cfg.blcwindow = [-0.2 0]; % baseline: -0.2 sec to 0 cfg.lpfilter = 'yes'; % apply lowpass filter cfg.lpfreq = 35; % lowpass at 35 Hz. avgFIC = preprocessing(dataFIC); > The other problem, when I try to do the tutorial of beamforming, > with the > mri data of the subject01 (available online) there is a SPM bug! My > version > of Matlab is 7.0.1.24704 (R14) Service Pack 1 and I use SMP2 (last > update). > > The commands: > > mri = read_fcdc_mri('Subject01.mri'); > cfg = []; > cfg.name = 'segment'; > cfg.write = 'yes'; > cfg.coordinates = 'ctf'; > [segmentedmri] = volumesegment(cfg, mri); > > and the bug is: > ... > ??? Error using ==> spm_vol>subfunc1 > Can't get volume information for '/home/common/matlab/spm2/ > templates/T1.mnc' You have to specify the exact path of the template file, which in your case will not be on /home/common (as that is a network disk within the FCDC). 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Jul 23 16:29:38 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 23 Jul 2007 16:29:38 +0200 Subject: fd.dof matrix In-Reply-To: Message-ID: On 16 Jul 2007, at 17:36, Sameer Walawalkar wrote: > I have a question about calculating degrees of freedom. I get > (after freqdescriptives) > fd.dof = [46665x26 double]; > > However, dof = 2 x (Number of trials) x (number of tapers) and my > trials are of equal length and I use padding. So I think (and my > understanding could be wrong) this huge matrix is a waste of space > as the dofs are going to be the same for every pair on each trial. > How can I then ensure that freq.dof is just a number and can be > still used later on? The dof can be different if you have variable trial lengths'. That happens if you use partial artifact recection, or can also be the result of your trial function. That in combination with multitapers results in different dofs. There are only a few very specific instances where the dof is required, so usually you can throw it away without any consequences. 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Jul 23 16:44:20 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 23 Jul 2007 16:44:20 +0200 Subject: eeglab2fieldtrip In-Reply-To: Message-ID: Hi Valesca On 13 Jul 2007, at 11:02, Valesca Kooijman wrote: > In connection with your previous advice concerning the > eeglab2fieldtrip script, we came accross the following problem and > solution (see script below): > ... > > I do still get the following warning after running the above script: > > Warning: writing segmented data as if it were continuous > In fieldtrip-20070710\private\write_brainvision_eeg at 38 > In fieldtrip-20070710\private\write_data at 63 > In write_fcdc_data at 48 > In ConversionEEGDATA at 13 > > Is this problematic or is this a standard warning following > conversion to Vision Analyzer? The warning relates to the problem that you indicated in your email further down (i.e. the data being assumed to be ntrials X nchans X nsamples). I.e. if your data is indeed ntrials X nchans X nsamples, then you don't have to worry. In your case, you should worry (see below). > In addition, I was wondering where my trial onset markers are > written to? Write_fcdc_data only generates a .eeg and a .hdr file, > and not a .vmrk file. They are not writen. You could manually write a vmrk file (they are ascii files). The format is like the snippet below Brain Vision Data Exchange Marker File, Version 1.0 [Common Infos] DataFile=pp01_pilot_load0_3s.seg [Marker Infos] ; Each entry: Mk=,,, ; , , ; ; Fields are delimited by commas, some fields might be omited (empty). ; Commas in type or description text are coded as "\1". Mk1=New Segment,,1,1,0,20050315114252667836 ... > From your earlier emails I understood that the datamatrix should be > converted to ntrials X nchans X nsamples before running > write_fcdc_data. Currently my datamatrix consists of nchans X > nsamples X ntrials. Would you mind letting me know how I can > convert my datamatrix? Thanks a lot. I just made a change to write_brainvision_eeg, please update to the latest FT release. In that function it still expects the data to be ntrials X nchans X nsamples, i.e. ntrl = size(dat,1); nchan = size(dat,2); nsmp = size(dat,3); You can use the matlab function permute (see "help permute") to swap the dimensions in EEG.data by permute(EEG.data, [3 1 2]). 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/fcdonders/fieldtrip. From jaredvs at GMAIL.COM Mon Jul 23 18:54:01 2007 From: jaredvs at GMAIL.COM (Jared Van Snellenberg) Date: Mon, 23 Jul 2007 12:54:01 -0400 Subject: Mex File error during call to eeg_leadfield In-Reply-To: <0722EDE3-E904-4A66-B9CB-B02281516864@fcdonders.ru.nl> Message-ID: Thanks Robert, that appears to have worked. I'm on a 32-bit windows machine, using r2007a. Does it perhaps matter that I'm on a dual-core processor? At any rate, 'mex plgndr.c' created plgndr.mexw32, which did not exist in the /private directory of the fieldtrip download, so perhaps it should be included? Thanks again, -Jared On 7/23/07, Robert Oostenveld wrote: > > Hi Jared, > > On 17 Jul 2007, at 22:24, Jared Van Snellenberg wrote: > > I'm working on a DICS beamformer analysis, and ran into a Mex file > > error. > > > > Here's the MATLAB error (as you can see I have the most recent > > versions of > > MATLAB and FIELTRIP): > > > > ??? Invalid MEX-file 'C:\Program Files\MATLAB\R2007a > > \fieldtrip-20070717 > > \private\plgndr.dll': The specified procedure could not be found. > > The dll file itself is included in the FT version that you have. > Which matlab version are you using, and on what windows platform (64 > bit perhaps?). Please try recompiling the plgndr mex file using the > attached code. > > 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/fcdonders/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. > > > -- Jared Van Snellenberg Social Cognitive Affective Neuroscience Unit http://scan.psych.columbia.edu (212) 854-7858 p (212) 854-3609 f Department of Psychology, Columbia University 406 Schermerhorn Hall 1190 Amsterdam Avenue, Mail Code 5501 New York, NY 10027 _______________________________ "Luck is the residue of design" -Attributed to Branch Rickey, former US Baseball Administrator, and also to John Milton. Go figure. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eolejarczyk at IBIB.WAW.PL Mon Jul 23 20:39:24 2007 From: eolejarczyk at IBIB.WAW.PL (Elzbieta Olejarczyk) Date: Mon, 23 Jul 2007 20:39:24 +0200 Subject: ASCII format Message-ID: I would like to use continuous data in Ascii format (Nchannels x Nsamples values). I have information about sampling frequency, moments of several events occured during EEG registration and channels montage (8 or 16 channels). Is it possible to use FieldTrip functions with such data? Elzbieta ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From weisz at LYON.INSERM.FR Wed Jul 25 13:22:42 2007 From: weisz at LYON.INSERM.FR (Nathan Weisz) Date: Wed, 25 Jul 2007 13:22:42 +0200 Subject: z-score Message-ID: hi, this question was asked before, but i couldn't find an answer in the archives. is there a special reason 'zscore' was canceled from freqbaseline-function? best, nathan -------------------------------- Dr. Nathan Weisz INSERM - Unité 821 Dynamique cérébrale et cognition Centre Hospitalier Le Vinatier, Bâtiment 452 95 Boulevard Pinel 69500 Bron, France Tel: ++33 - (0)4 - 7213 8915 Email: weisz at lyon.inserm.fr Chat-AV: nathanweisz at mac.com Homepage: http://web.mac.com/nathanweisz Neurotree: http://neurotree.org/neurotree/tree.php?pid=8692 Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Wed Jul 25 14:31:53 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 25 Jul 2007 14:31:53 +0200 Subject: Mex File error during call to eeg_leadfield In-Reply-To: <51d499680707230954m359e89efwf6cfdfd8d8c3fb18@mail.gmail.com> Message-ID: On 23 Jul 2007, at 18:54, Jared Van Snellenberg wrote: > Thanks Robert, that appears to have worked. I'm on a 32-bit windows > machine, using r2007a. Does it perhaps matter that I'm on a dual- > core processor? At any rate, 'mex plgndr.c' created plgndr.mexw32, > which did not exist in the /private directory of the fieldtrip > download, so perhaps it should be included? For older matlab versions, the mex files for windows had the extension *.dll. For later version (I don't know exactly from which version onward), they have the extensions mexw32 and mexw64 for 32 and 64 bit windows platforms respectively. Furthermore, mex files tend to be compatible over many matlab versions. It seems that our (old) mex files are not compatible any more with your (new) matlab version. I will modify the packaging and ftp release scripts so that the source code for all mex files (plus the associated c code) will also be included in the zip file. Then people are always able to recompile them for their specific platform. Robert PS See http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/ access/helpdesk/help/techdoc/matlab_external/f29502.html for the mex files and http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/ access/helpdesk/help/techdoc/rn/bq1zbsn.html for a general description of compatibility issues in matlab. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Jul 25 14:34:57 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 25 Jul 2007 14:34:57 +0200 Subject: ASCII format In-Reply-To: <50220.87.205.80.79.1185215964.squirrel@mail.ibib.waw.pl> Message-ID: Dear Elzbieta On 23 Jul 2007, at 20:39, Elzbieta Olejarczyk wrote: > I would like to use continuous data in Ascii format (Nchannels x > Nsamples > values). I have information about sampling frequency, moments of > several > events occured during EEG registration and channels montage (8 or 16 > channels). > Is it possible to use FieldTrip functions with such data? That is described in the frequently asked questions, see http:// www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#how_can_i_import_m y_own_dataformat Probably the easiest approach for you would be to reformat that data within Matlab into a data structure that is compatible with FieldTrip, i.e. similar to the outpout of the preprocessing function. 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/fcdonders/fieldtrip. From andrew.smart at NYU.EDU Wed Jul 25 18:56:52 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Wed, 25 Jul 2007 18:56:52 +0200 Subject: spm2 question Message-ID: Hi, I am trying to plot beamforming data from CTF MEG onto a standard or generic MRI (since I don't have MRIs for the subjects). Using volumesegment for Subject01.mri I get this error: ??? Cant map image file. Error in ==> spm_smoothto8bit>smoothto8bit at 51 img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim (1:2),0); The read_fcdc_mri works to open Subject01.mri. I have also tried using single_subj_T1.mnc from SPM2 and the standard_mri from EEGLAB and get a similar error K>> spm_slice_vol(V(i),spm_matrix([0 0 p]),V(i).dim(1:2),0) ??? Cant open image file. Thanks! andy ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From c.nohn at UKE.DE Mon Jul 30 12:42:00 2007 From: c.nohn at UKE.DE (Claudia Nohn) Date: Mon, 30 Jul 2007 12:42:00 +0200 Subject: clusterrandanalysis actvsblT Message-ID: dear all, i have a questions about clusteranalysis comparing baseline and activation period. is it really impossible to compare two periods of different length? and why? as far as i understand the mean of the baseline is used and so you have only one value per frequency anyway. can i avoid this problem or do i have to divide my activation period into different segments because my baseline period is much shorter? thanks in advance claudia -- 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 From weisz at LYON.INSERM.FR Mon Jul 30 15:08:03 2007 From: weisz at LYON.INSERM.FR (Nathan Weisz) Date: Mon, 30 Jul 2007 15:08:03 +0200 Subject: problems using dics Message-ID: hi, i am trying to do sourceanalysis on spontaneous activity data, i.e. there is no baseline condition (such as a pre-stimulus period). tried the approach using the "NAI" as described in the tutorial (Localizing oscillatory sources using beamformer techniques). however there apparently are problems. see more below. data is 60 channel EEG, preprocessed in eeglab (ICA artefact correction + removal of bad data periods) and cut into non- overlapping "epochs" of 2 seconds. a fieldtrip structure was generated using eeglab2fieldtrip. >> data data = label: {1x60 cell} fsample: 250 elec: [1x1 struct] trial: {1x138 cell} time: {1x138 cell} cfg: [1x1 struct] then estimate power with freqanalysis: cfg=[]; cfg.method='mtmfft'; cfg.output='powandcsd'; cfg.foilim=[12 18]; cfg.tapsmofrq=1.5; freq4dics=freqanalysis(cfg,data); >> freq4dics freq4dics = label: {1x60 cell} dimord: 'chan_freq' freq: [12 12.5000 13 13.5000 14 14.5000 15 15.5000 16 16.5000 17 17.5000 18] powspctrm: [60x13 double] labelcmb: {1770x2 cell} crsspctrm: [1770x13 double] elec: [1x1 struct] cfg: [1x1 struct] so far so good. now i'd like to do some sourceanalysis. cfg=[]; cfg.method='dics'; cfg.grid=grid; cfg.vol=vol; %use of the standard BEM model cfg.lambda =[]; cfg.frequency=15; cfg.projectnoise='yes'; cfg.elec=newelec;%electrode positions adapted to BEM released on FT- FTP (in standard_BEM) alphaS=sourceanalysis(cfg,freq4dics); the problem here is that the noise is set to 0. while executing the code this warning message appears: Warning: cross-spectral density matrix is rank deficient > In beamformer_dics at 161 In sourceanalysis at 855 a look at the code shows that in this case that the noise is set to lambda (empty and set to 0 per default). I then tried different lamdas but as results varied quite a lot I have an uneasy feeling doing it this way. question: is there something apparently wrong with the configs that leads to the problem of not being able to make a noise estimate from the CSD? cheers, nathan -------------------------------- Dr. Nathan Weisz INSERM - Unité 821 Dynamique cérébrale et cognition Centre Hospitalier Le Vinatier, Bâtiment 452 95 Boulevard Pinel 69500 Bron, France Tel: ++33 - (0)4 - 7213 8915 Email: weisz at lyon.inserm.fr Chat-AV: nathanweisz at mac.com Homepage: http://web.mac.com/nathanweisz Neurotree: http://neurotree.org/neurotree/tree.php?pid=8692 Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maris at NICI.RU.NL Mon Jul 30 22:49:43 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Mon, 30 Jul 2007 22:49:43 +0200 Subject: clusterrandanalysis actvsblT In-Reply-To: <46ADC078.6010209@uke.de> Message-ID: Dear Claudia, > i have a questions about clusteranalysis comparing baseline and > activation period. is it really impossible to compare two periods of > different length? and why? as far as i understand the mean of the > baseline is used and so you have only one value per frequency anyway. > can i avoid this problem or do i have to divide my activation period > into different segments because my baseline period is much shorter? You are one of many to complain about this feature of clusterrandanalysis. Nevertheless, you do have to divide your activation period into different segments. The reason for this has to do with the null hypothesis that is tested when you use the activation-versus-baseline statistic. This null hypothesis is the following: The data in the baseline period are drawn from the same probability distribution (over the spatiotemporal domain) as the data in the activation period. This null hypothesis only makes sense if the spatiotemporal dimensionality of the activation and the baseline period are equal. Kind regards, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > thanks in advance > claudia > > > -- > 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/fcdonders/fieldtrip. From abastos at BERKELEY.EDU Mon Jul 30 23:56:00 2007 From: abastos at BERKELEY.EDU (Andre Bastos) Date: Mon, 30 Jul 2007 14:56:00 -0700 Subject: clusterrandanalysis actvsblT In-Reply-To: <005d01c7d2eb$2836dc60$6701a8c0@fcdonders.nl> Message-ID: On a related note, I would like to ask about the clusterrandanalysis option to set avgovertime = 'yes' In this case, as far as I am aware, the frequency-space-time-trial quadlets which clusterrand analysis uses become doublets of frequency-space. In this case, wouldn't it be possible to compare data periods of different lengths, as clusterrandanalysis would just average across your baseline period as set 1 and average across the activation period as set 2? Does the distribution of activation over time get factored in to the clusterrandanalysis function even when avgovertime is set to 'yes'? Thanks, -Andre -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Eric Maris Sent: Monday, July 30, 2007 1:50 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandanalysis actvsblT Dear Claudia, > i have a questions about clusteranalysis comparing baseline and > activation period. is it really impossible to compare two periods of > different length? and why? as far as i understand the mean of the > baseline is used and so you have only one value per frequency anyway. > can i avoid this problem or do i have to divide my activation period > into different segments because my baseline period is much shorter? You are one of many to complain about this feature of clusterrandanalysis. Nevertheless, you do have to divide your activation period into different segments. The reason for this has to do with the null hypothesis that is tested when you use the activation-versus-baseline statistic. This null hypothesis is the following: The data in the baseline period are drawn from the same probability distribution (over the spatiotemporal domain) as the data in the activation period. This null hypothesis only makes sense if the spatiotemporal dimensionality of the activation and the baseline period are equal. Kind regards, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > thanks in advance > claudia > > > -- > 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/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Tue Jul 31 00:42:07 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Tue, 31 Jul 2007 00:42:07 +0200 Subject: clusterrandanalysis actvsblT In-Reply-To: <000301c7d2f4$6bebd7e0$43c387a0$@edu> Message-ID: Dear Andre, > On a related note, I would like to ask about the clusterrandanalysis option > to set avgovertime = 'yes' > > In this case, as far as I am aware, the frequency-space-time-trial quadlets > which clusterrand analysis uses become doublets of frequency-space. In this > case, wouldn't it be possible to compare data periods of different lengths, > as clusterrandanalysis would just average across your baseline period as set > 1 and average across the activation period as set 2? > > Does the distribution of activation over time get factored in to the > clusterrandanalysis function even when avgovertime is set to 'yes'? If you try to do this, you should get an error message. Have a try, and if you don't get an error message let me know. Anyhow, even without an error message, the p-value that you get out of clusterrandanalysis only makes sense if the baseline and activation periods are of equal length. Good luck, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > Thanks, > > -Andre > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Eric Maris > Sent: Monday, July 30, 2007 1:50 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] clusterrandanalysis actvsblT > > Dear Claudia, > > > > > i have a questions about clusteranalysis comparing baseline and > > activation period. is it really impossible to compare two periods of > > different length? and why? as far as i understand the mean of the > > baseline is used and so you have only one value per frequency anyway. > > can i avoid this problem or do i have to divide my activation period > > into different segments because my baseline period is much shorter? > > > You are one of many to complain about this feature of clusterrandanalysis. > Nevertheless, you do have to divide your activation period into different > segments. The reason for this has to do with the null hypothesis that is > tested when you use the activation-versus-baseline statistic. This null > hypothesis is the following: The data in the baseline period are drawn from > the same probability distribution (over the spatiotemporal domain) as the > data in the activation period. This null hypothesis only makes sense if the > spatiotemporal dimensionality of the activation and the baseline period are > equal. > > > Kind regards, > > Eric Maris > > > > > > > > > dr. Eric Maris > > NICI/Biological Psychology and > > F.C. Donders Center for Cognitive NeuroImaging > > University of Nijmegen > > P.O. Box 9104 > > 6500 HE Nijmegen > > The Netherlands > > T:+31 24 3612651 (NICI) > > T:+31 24 3610754 (FCDC) > > F:+31 24 3616066 (NICI) > > E: maris at nici.ru.nl > > MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > > > > > thanks in advance > > claudia > > > > > > -- > > 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/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From abastos at BERKELEY.EDU Tue Jul 31 02:44:10 2007 From: abastos at BERKELEY.EDU (Andre Bastos) Date: Mon, 30 Jul 2007 17:44:10 -0700 Subject: clusterrandanalysis actvsblT In-Reply-To: <009301c7d2fa$dc046140$6701a8c0@fcdonders.nl> Message-ID: Eric, Yes, I understand about the pvalues not working for comparing within a trial (from baseline to activation). But what about comparing across different periods of time, using independent samples? Is it okay to set avgovertime = 'yes' then? For example, I am comparing two conditions in a ssvep paradigm: attend left and attend right, for one subject. I am not quite sure what I am doing wrong, as I am sure that there are differences between these two conditions, although the clusters that I get are all insignificant. In this case, when the subject attends left they attend to 7.5 Hz, and when they attend right they attend to 10 Hz flicker stimulus. I am expecting that these frequencies, as well as higher harmonics will be sensitive to attention (as previously reported in the ssvep lit). However, my clusters all have p values above 0.2. I tried this with avgovertime set to both yes and no, and still no sig clusters. Why are the insignificant clusters even returned at all, especially when there is a parameter value for determining significant clusters, alphathresh, which is set in the cfg but never used? I know that other people have had the same issue before... Thanks again, Andre Here is my config (I am using just the 29 parietal and occipital electrodes for this analysis). elec.pnt = elec.pnt(1:29,:); elec.label = elec.label(1:29,:); cfg=[]; cfg.statistic = 'indepsamplesT'; cfg.alphathresh = 0.05; cfg.makeclusters = 'yes'; cfg.minnbchan = 2; cfg.clusterteststat = 'maxsum'; cfg.onetwo = 'twosided'; cfg.alpha = 0.05; cfg.nranddraws = 500; cfg.channel = 'all'; %TFR(1).elec.label(1:64); %{'EEG'}; cfg.latency = [1 5 ]; cfg.elec = elec; cfg.neighbourdist = 49; cfg.avgovertime = 'no'; [clusrand] = clusterrandanalysis(cfg, TFR1, TFR2); -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Eric Maris Sent: Monday, July 30, 2007 3:42 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandanalysis actvsblT Dear Andre, > On a related note, I would like to ask about the clusterrandanalysis option > to set avgovertime = 'yes' > > In this case, as far as I am aware, the frequency-space-time-trial quadlets > which clusterrand analysis uses become doublets of frequency-space. In this > case, wouldn't it be possible to compare data periods of different lengths, > as clusterrandanalysis would just average across your baseline period as set > 1 and average across the activation period as set 2? > > Does the distribution of activation over time get factored in to the > clusterrandanalysis function even when avgovertime is set to 'yes'? If you try to do this, you should get an error message. Have a try, and if you don't get an error message let me know. Anyhow, even without an error message, the p-value that you get out of clusterrandanalysis only makes sense if the baseline and activation periods are of equal length. Good luck, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > Thanks, > > -Andre > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Eric Maris > Sent: Monday, July 30, 2007 1:50 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] clusterrandanalysis actvsblT > > Dear Claudia, > > > > > i have a questions about clusteranalysis comparing baseline and > > activation period. is it really impossible to compare two periods of > > different length? and why? as far as i understand the mean of the > > baseline is used and so you have only one value per frequency anyway. > > can i avoid this problem or do i have to divide my activation period > > into different segments because my baseline period is much shorter? > > > You are one of many to complain about this feature of clusterrandanalysis. > Nevertheless, you do have to divide your activation period into different > segments. The reason for this has to do with the null hypothesis that is > tested when you use the activation-versus-baseline statistic. This null > hypothesis is the following: The data in the baseline period are drawn from > the same probability distribution (over the spatiotemporal domain) as the > data in the activation period. This null hypothesis only makes sense if the > spatiotemporal dimensionality of the activation and the baseline period are > equal. > > > Kind regards, > > Eric Maris > > > > > > > > > dr. Eric Maris > > NICI/Biological Psychology and > > F.C. Donders Center for Cognitive NeuroImaging > > University of Nijmegen > > P.O. Box 9104 > > 6500 HE Nijmegen > > The Netherlands > > T:+31 24 3612651 (NICI) > > T:+31 24 3610754 (FCDC) > > F:+31 24 3616066 (NICI) > > E: maris at nici.ru.nl > > MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > > > > > thanks in advance > > claudia > > > > > > -- > > 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/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Tue Jul 31 17:57:53 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Tue, 31 Jul 2007 17:57:53 +0200 Subject: clusterrandanalysis actvsblT In-Reply-To: <002001c7d30b$eb341af0$c19c50d0$@edu> Message-ID: Dear Andre, > Yes, I understand about the pvalues not working for comparing within a trial > (from baseline to activation). But what about comparing across different > periods of time, using independent samples? Is it okay to set avgovertime = > 'yes' then? As long as you average over periods of time of equal length (in different experimental conditions), it is okay. > > For example, I am comparing two conditions in a ssvep paradigm: attend left > and attend right, for one subject. I am not quite sure what I am doing > wrong, as I am sure that there are differences between these two conditions, > although the clusters that I get are all insignificant. > > In this case, when the subject attends left they attend to 7.5 Hz, and when > they attend right they attend to 10 Hz flicker stimulus. I am expecting that > these frequencies, as well as higher harmonics will be sensitive to > attention (as previously reported in the ssvep lit). However, my clusters > all have p values above 0.2. I tried this with avgovertime set to both yes > and no, and still no sig clusters. > > Why are the insignificant clusters even returned at all, especially when > there is a parameter value for determining significant clusters, > alphathresh, which is set in the cfg but never used? I know that other > people have had the same issue before... It is a misunderstanding that cfg.alphathresh is never used. It is used to define the clusters. If you change the value of cfg.alphathresh you get different clusters. Be aware that cfg.alphathresh must be chosen independent of the data if you want to control the FA rate. Kind regards, Eric Maris > > Thanks again, > > Andre > > Here is my config (I am using just the 29 parietal and occipital electrodes > for this analysis). > > elec.pnt = elec.pnt(1:29,:); > elec.label = elec.label(1:29,:); > > cfg=[]; > cfg.statistic = 'indepsamplesT'; > cfg.alphathresh = 0.05; > cfg.makeclusters = 'yes'; > cfg.minnbchan = 2; > cfg.clusterteststat = 'maxsum'; > cfg.onetwo = 'twosided'; > cfg.alpha = 0.05; > cfg.nranddraws = 500; > cfg.channel = 'all'; %TFR(1).elec.label(1:64); %{'EEG'}; > cfg.latency = [1 5 ]; > cfg.elec = elec; > cfg.neighbourdist = 49; > cfg.avgovertime = 'no'; > > [clusrand] = clusterrandanalysis(cfg, TFR1, TFR2); > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Eric Maris > Sent: Monday, July 30, 2007 3:42 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] clusterrandanalysis actvsblT > > Dear Andre, > > > On a related note, I would like to ask about the clusterrandanalysis > option > > to set avgovertime = 'yes' > > > > In this case, as far as I am aware, the frequency-space-time-trial > quadlets > > which clusterrand analysis uses become doublets of frequency-space. In > this > > case, wouldn't it be possible to compare data periods of different > lengths, > > as clusterrandanalysis would just average across your baseline period as > set > > 1 and average across the activation period as set 2? > > > > Does the distribution of activation over time get factored in to the > > clusterrandanalysis function even when avgovertime is set to 'yes'? > > > If you try to do this, you should get an error message. Have a try, and if > you don't get an error message let me know. Anyhow, even without an error > message, the p-value that you get out of clusterrandanalysis only makes > sense if the baseline and activation periods are of equal length. > > > Good luck, > > Eric Maris > > > > dr. Eric Maris > > NICI/Biological Psychology and > > F.C. Donders Center for Cognitive NeuroImaging > > University of Nijmegen > > P.O. Box 9104 > > 6500 HE Nijmegen > > The Netherlands > > T:+31 24 3612651 (NICI) > > T:+31 24 3610754 (FCDC) > > F:+31 24 3616066 (NICI) > > E: maris at nici.ru.nl > > MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > > > > > > > > > > Thanks, > > > > -Andre > > > > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf > > Of Eric Maris > > Sent: Monday, July 30, 2007 1:50 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: Re: [FIELDTRIP] clusterrandanalysis actvsblT > > > > Dear Claudia, > > > > > > > > > i have a questions about clusteranalysis comparing baseline and > > > activation period. is it really impossible to compare two periods of > > > different length? and why? as far as i understand the mean of the > > > baseline is used and so you have only one value per frequency anyway. > > > can i avoid this problem or do i have to divide my activation period > > > into different segments because my baseline period is much shorter? > > > > > > You are one of many to complain about this feature of clusterrandanalysis. > > Nevertheless, you do have to divide your activation period into different > > segments. The reason for this has to do with the null hypothesis that is > > tested when you use the activation-versus-baseline statistic. This null > > hypothesis is the following: The data in the baseline period are drawn > from > > the same probability distribution (over the spatiotemporal domain) as the > > data in the activation period. This null hypothesis only makes sense if > the > > spatiotemporal dimensionality of the activation and the baseline period > are > > equal. > > > > > > Kind regards, > > > > Eric Maris > > > > > > > > > > > > > > > > > > dr. Eric Maris > > > > NICI/Biological Psychology and > > > > F.C. Donders Center for Cognitive NeuroImaging > > > > University of Nijmegen > > > > P.O. Box 9104 > > > > 6500 HE Nijmegen > > > > The Netherlands > > > > T:+31 24 3612651 (NICI) > > > > T:+31 24 3610754 (FCDC) > > > > F:+31 24 3616066 (NICI) > > > > E: maris at nici.ru.nl > > > > MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > > > > > > > > > > thanks in advance > > > claudia > > > > > > > > > -- > > > 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/fcdonders/fieldtrip. > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip > > toolbox, to share experiences and to discuss new ideas for MEG and EEG > analysis. > > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > > http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From olga at GRAPHICMIND.INFO Mon Jul 2 16:22:36 2007 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Mon, 2 Jul 2007 18:22:36 +0400 Subject: PC for Fieldtrip, yours experience Message-ID: Dear Fieldtrippers, sorry for annoying with the same question, but can you just specified your own PC, which you use for analysing. We wish to speed up our analysis. Best Regards. Olga. ---------------------------------------------------------------------------------------------------------------------------------------- Dear all, It is probably a dull question, but can you specified the "good" PC Computer for analysing 64-channel data in Fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Mon Jul 2 19:04:47 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 2 Jul 2007 13:04:47 -0400 Subject: using cfg.correctm = 'cluster' and related memory issues. Message-ID: Hello, I am running into memory issues while trying to do non-parametric statistical testing for coherence differences for my Neuromag 306 data. The statement causing overflow is line 277 in statistics_montecarlo: statrand = zeros(size(statobs,1), size(res,1)); This would be a matrix of size 50631525 X 100 corresponding to some 40 GB! (Am I correct in assuming that the 100 is from cfg.numrandomization)? This statement is evoked if cfg.correctm = 'cluster'; I could use cfg.correctm = max but I dont think this will do the right analysis. The one thing I can think of is changing cfg.channelcmb to try and reduce the number of combinations tried (but is not very preferable atleast right now). Is there anything else that comes to mind? The cfg I am using and other info is added below. Thank you for your time and help. sameer >>cfg = []; cfg.channelcmb = {'MEG' 'MEG'}; cfg.method = 'montecarlo'; cfg.statistic = 'indepsamplesZcoh'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.clusterthreshold = 'nonparametric'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 100; % make it larger for better testing cfg.precision = 'single'; % experimenting to save memory cfg.label = CSD_LL_200_400.label ; cfg.channelcmb = CSD_LL_200_400.labelcmb; [statistics] = freqstatistics(cfg, CSD_LL_200_400 , CSD_RR_200_400); Note: I use Cross Spectral density instead of coherence as coherence does not keep trials. At the debug prompt after the error I have: K>> whos Name Size Bytes Class Attributes Nrand 1x1 8 double cfg 1x1 60159588 struct dat 326655x127 331881480 single complex design 1x127 1016 double res 100x1x127 101600 double statfull 1x1 405052324 struct statfun 1x1 16 function_handle statobs 50631525x1 405052200 double time_eval 1x1 8 double time_pre 1x1 8 double ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Mon Jul 2 21:56:58 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Mon, 2 Jul 2007 21:56:58 +0200 Subject: using cfg.correctm = 'cluster' and related memory issues. In-Reply-To: Message-ID: Dear Sameer, > I am running into memory issues while trying to do non-parametric > statistical testing for coherence differences for my Neuromag 306 data. > > The statement causing overflow is line 277 in statistics_montecarlo: > statrand = zeros(size(statobs,1), size(res,1)); > This would be a matrix of size 50631525 X 100 corresponding to some 40 GB! > (Am I correct in assuming that the 100 is from cfg.numrandomization)? > > This statement is evoked if cfg.correctm = 'cluster'; > I could use cfg.correctm = max but I dont think this will do the right > analysis. > > The one thing I can think of is changing cfg.channelcmb to try and reduce > the number of combinations tried (but is not very preferable atleast right > now). Is there anything else that comes to mind? > > The cfg I am using and other info is added below. Using Fieldtrip for nonparametric statistical testing of the complete set of between-channel coherences is one step too far. As a first step, one should start comparing coherences with a single reference channel. I have described this methodology in a recent paper in the Journal of Neuroscience Methods (Maris et al., 2007). Unfortunately, there is not a tutorial for this type of analysis, and the help documentation does not bring you very far. This job is on my list, but I have not yet found the time. The bottom line is that testing coherence differences involving a reference channel is certainly feasible, but the documentation is lacking, Kind regards, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > Thank you for your time and help. > sameer > > >>cfg = []; > cfg.channelcmb = {'MEG' 'MEG'}; > cfg.method = 'montecarlo'; > cfg.statistic = 'indepsamplesZcoh'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.clusterthreshold = 'nonparametric'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 100; % make it larger for better testing > cfg.precision = 'single'; % experimenting to save memory > cfg.label = CSD_LL_200_400.label ; > cfg.channelcmb = CSD_LL_200_400.labelcmb; > > > [statistics] = freqstatistics(cfg, CSD_LL_200_400 , CSD_RR_200_400); > > Note: I use Cross Spectral density instead of coherence as coherence does > not keep trials. > > At the debug prompt after the error I have: > > K>> whos > Name Size Bytes Class > Attributes > > Nrand 1x1 8 double > cfg 1x1 60159588 struct > dat 326655x127 331881480 single > complex > design 1x127 1016 double > res 100x1x127 101600 double > statfull 1x1 405052324 struct > statfun 1x1 16 function_handle > statobs 50631525x1 405052200 double > time_eval 1x1 8 double > time_pre 1x1 8 double > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Mon Jul 2 22:14:55 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Mon, 2 Jul 2007 22:14:55 +0200 Subject: using cfg.correctm = 'cluster' and related memory issues. In-Reply-To: Message-ID: Dear Sameer, I forgot to mention that the analyses on which is reported in the J. Neuroscience Methods paper were done using Clusterrandanalysis.m, which is an older version of the Fieldtrip statistics. For testing coherence differences, Clusterrandanalysis.m is better suited than the new statistics functions. Good luck, Eric dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of > Sameer Walawalkar > Sent: Monday, July 02, 2007 7:05 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] using cfg.correctm = 'cluster' and related memory issues. > > Hello, > > I am running into memory issues while trying to do non-parametric > statistical testing for coherence differences for my Neuromag 306 data. > > The statement causing overflow is line 277 in statistics_montecarlo: > statrand = zeros(size(statobs,1), size(res,1)); > This would be a matrix of size 50631525 X 100 corresponding to some 40 GB! > (Am I correct in assuming that the 100 is from cfg.numrandomization)? > > This statement is evoked if cfg.correctm = 'cluster'; > I could use cfg.correctm = max but I dont think this will do the right > analysis. > > The one thing I can think of is changing cfg.channelcmb to try and reduce > the number of combinations tried (but is not very preferable atleast right > now). Is there anything else that comes to mind? > > The cfg I am using and other info is added below. > > Thank you for your time and help. > sameer > > >>cfg = []; > cfg.channelcmb = {'MEG' 'MEG'}; > cfg.method = 'montecarlo'; > cfg.statistic = 'indepsamplesZcoh'; > cfg.clusteralpha = 0.05; > cfg.clusterstatistic = 'maxsum'; > cfg.clusterthreshold = 'nonparametric'; > cfg.minnbchan = 2; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.alpha = 0.05; > cfg.numrandomization = 100; % make it larger for better testing > cfg.precision = 'single'; % experimenting to save memory > cfg.label = CSD_LL_200_400.label ; > cfg.channelcmb = CSD_LL_200_400.labelcmb; > > > [statistics] = freqstatistics(cfg, CSD_LL_200_400 , CSD_RR_200_400); > > Note: I use Cross Spectral density instead of coherence as coherence does > not keep trials. > > At the debug prompt after the error I have: > > K>> whos > Name Size Bytes Class > Attributes > > Nrand 1x1 8 double > cfg 1x1 60159588 struct > dat 326655x127 331881480 single > complex > design 1x127 1016 double > res 100x1x127 101600 double > statfull 1x1 405052324 struct > statfun 1x1 16 function_handle > statobs 50631525x1 405052200 double > time_eval 1x1 8 double > time_pre 1x1 8 double > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From c.hesse at FCDONDERS.RU.NL Tue Jul 3 11:41:55 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Tue, 3 Jul 2007 11:41:55 +0200 Subject: PC for Fieldtrip, yours experience In-Reply-To: <001f01c7bcb4$70b713d0$51210ad9@acer027f9640b7> Message-ID: Dear Olga, this is, in a way, a difficult question to answer. You obviously want a machine with lots of memory and a fast processor (possibly several)! Here at the FCDC we have a couple of 64 bit Linux machines with 16 Gb RAM, 220 Gb HD and 4 CPUs (Dual Core AMD Opteron(tm) Processor 270) And the majority of nodes in the cluster are 64 bit Linux machines with 4 Gb RAM, 220 Gb HD and 2 CPUs (Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz) It all depends on what (else) you want to do on the machine while it is Fieldtriping, how large your data sets are and how memory efficient your Matlab scripts are (i.e. not trying to have the data from 10 subjects in memory at the same time while doing coherence analysis with 300 channels :-) Hope this gives some indication Christian On 2 Jul 2007, at 16:22, Olga Sysoeva wrote: > Dear Fieldtrippers, > > sorry for annoying with the same question, but can you just > specified your own PC, which you use for analysing. We wish to > speed up our analysis. > > Best Regards. > Olga. > > ---------------------------------------------------------------------- > ------------------------------------------------------------------ > Dear all, > > It is probably a dull question, but can you specified the "good" PC > Computer for analysing 64-channel data in Fieldtrip. > > ---------------------------------- > > The aim of this list 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/ > > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From teresa at DSRF.ORG Tue Jul 3 11:42:39 2007 From: teresa at DSRF.ORG (Teresa Cheung) Date: Tue, 3 Jul 2007 02:42:39 -0700 Subject: Auto Reply Message-ID: Dear Colleagues, I am on vacation from Tuesday July 2 to Friday July 5. If you need to book MEG time, please contact julie at dsrf.org If you need help with MEG analysis, please contact Alexander at amoisieev at dsrf.org For other urgent inquiries, please contact dawn at dsrf.org. Otherwise, I will reply to your email early next week. Best regards, -Teresa Cheung Teresa Cheung MEG Laboratory Manager Down Syndrome Research Foundation 1409 Sperling Avenue Burnaby, BC Office: 604 444 3773 ext 2239 Lab: 604 444 3773 ext 2249 Cell: 604 313 0338 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Tue Jul 3 16:41:37 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 3 Jul 2007 10:41:37 -0400 Subject: using cfg.correctm = 'cluster' and related memory issues. In-Reply-To: <021c01c7bce5$a861e8b0$6701a8c0@fcdonders.nl> Message-ID: Dear Eric, Thank you for you reply. I am now trying to use clusterrandanalysis. It looks for data.dof. So for freqanalysis I have cfgCSD.method = 'mtmfft'; cfgCSD.keeptrials = 'yes' ; cfgCSD.keeptapers = 'yes' ; cfgCSD.calcdof = 'yes'; this leads to error on line 540 if calcdof freq.dof=2*repmat(cumtapcnt,[1,numfoi]); end; Basically, numfoi is not defined before this statement, and only appears once throughout the file. Should it be numel(foi) ? Best, Sameer p.s: incidently, ~exist(cumtapcnt) gives error. MATLAB needs ~exist('cumtapcnt') (it could be a version problem). On Mon, 2 Jul 2007, Eric Maris wrote: > Dear Sameer, > > > I forgot to mention that the analyses on which is reported in the J. > Neuroscience Methods paper were done using Clusterrandanalysis.m, which is > an older version of the Fieldtrip statistics. For testing coherence > differences, Clusterrandanalysis.m is better suited than the new statistics > functions. > > > Good luck, > > Eric > > dr. Eric Maris > NICI/Biological Psychology and > F.C. Donders Center for Cognitive NeuroImaging > University of Nijmegen > P.O. Box 9104 > 6500 HE Nijmegen > The Netherlands > T:+31 24 3612651 (NICI) > T:+31 24 3610754 (FCDC) > F:+31 24 3616066 (NICI) > E: maris at nici.ru.nl > MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > >> -----Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of >> Sameer Walawalkar >> Sent: Monday, July 02, 2007 7:05 PM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: [FIELDTRIP] using cfg.correctm = 'cluster' and related memory > issues. >> >> Hello, >> >> I am running into memory issues while trying to do non-parametric >> statistical testing for coherence differences for my Neuromag 306 data. >> >> The statement causing overflow is line 277 in statistics_montecarlo: >> statrand = zeros(size(statobs,1), size(res,1)); >> This would be a matrix of size 50631525 X 100 corresponding to some 40 GB! >> (Am I correct in assuming that the 100 is from cfg.numrandomization)? >> >> This statement is evoked if cfg.correctm = 'cluster'; >> I could use cfg.correctm = max but I dont think this will do the right >> analysis. >> >> The one thing I can think of is changing cfg.channelcmb to try and reduce >> the number of combinations tried (but is not very preferable atleast right >> now). Is there anything else that comes to mind? >> >> The cfg I am using and other info is added below. >> >> Thank you for your time and help. >> sameer >> >>>> cfg = []; >> cfg.channelcmb = {'MEG' 'MEG'}; >> cfg.method = 'montecarlo'; >> cfg.statistic = 'indepsamplesZcoh'; >> cfg.clusteralpha = 0.05; >> cfg.clusterstatistic = 'maxsum'; >> cfg.clusterthreshold = 'nonparametric'; >> cfg.minnbchan = 2; >> cfg.tail = 0; >> cfg.clustertail = 0; >> cfg.alpha = 0.05; >> cfg.numrandomization = 100; % make it larger for better testing >> cfg.precision = 'single'; % experimenting to save memory >> cfg.label = CSD_LL_200_400.label ; >> cfg.channelcmb = CSD_LL_200_400.labelcmb; >> >> >> [statistics] = freqstatistics(cfg, CSD_LL_200_400 , CSD_RR_200_400); >> >> Note: I use Cross Spectral density instead of coherence as coherence does >> not keep trials. >> >> At the debug prompt after the error I have: >> >> K>> whos >> Name Size Bytes Class >> Attributes >> >> Nrand 1x1 8 double >> cfg 1x1 60159588 struct >> dat 326655x127 331881480 single >> complex >> design 1x127 1016 double >> res 100x1x127 101600 double >> statfull 1x1 405052324 struct >> statfun 1x1 16 function_handle >> statobs 50631525x1 405052200 double >> time_eval 1x1 8 double >> time_pre 1x1 8 double >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the > FieldTrip >> toolbox, to share experiences and to discuss new ideas for MEG and EEG > analysis. >> See also http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Tue Jul 3 21:09:08 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 3 Jul 2007 15:09:08 -0400 Subject: plotting clusterandanalysis output. Message-ID: Hello, After doing clusterandanalysis for coherence differences, I want to plot the results using information on http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:clusterrandanalysis plotdata requires plotdata.label=clusrand.label; However as clusrand = stats: [280x3 double] raweffect: [280x3 double] obsmeanc1: [280x3 double] obsmeanc2: [280x3 double] posclusters: [1x1 struct] negclusters: [] posclusterslabelmat: [280x3 double] negclusterslabelmat: [] critvals: 57.8332 labelcmb: {280x2 cell} freq: [54.7264 59.7015 64.6766] time: NaN cfg: [1x1 struct] I use plotdata.label = 'MEG2443' as that is what I have used in cfg.channelcmb (see below). This gives ??? Error using ==> fieldtrip/private/nearest at 24 incorrect value what input cfg for clusrandanalysis would change this? My current (very experimental) cfg is cfg = []; cfg.channelcmb = { 'MEG2443' 'MEG'}; cfg.statistic = 'indepsamplesZcoh' ; cfg.alpha = 0.05 ; cfg.clusterteststat = 'maxsum' ; cfg.onetwo = 'onesided_1<2' ; cfg.makeclusters = 'yes' ; cfg.minnbchan = 2; cfg.nranddraws = 100; thanks for your time. best, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Wed Jul 4 11:26:43 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Wed, 4 Jul 2007 11:26:43 +0200 Subject: plotting clusterandanalysis output. In-Reply-To: Message-ID: Sameer, > After doing clusterandanalysis for coherence differences, I want to plot > the results using information on > http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu tori > al:clusterrandanalysis You have to do some work yourself here. Replace labelcmb by a one-dimensional cell array containing the labels of the non-reference channels, and then use a topoplot-function. Good luck, Eric dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > plotdata requires > > plotdata.label=clusrand.label; > > However as > > > clusrand = > > stats: [280x3 double] > raweffect: [280x3 double] > obsmeanc1: [280x3 double] > obsmeanc2: [280x3 double] > posclusters: [1x1 struct] > negclusters: [] > posclusterslabelmat: [280x3 double] > negclusterslabelmat: [] > critvals: 57.8332 > labelcmb: {280x2 cell} > freq: [54.7264 59.7015 64.6766] > time: NaN > cfg: [1x1 struct] > > I use > plotdata.label = 'MEG2443' as that is what I have used in cfg.channelcmb > (see below). This gives > > ??? Error using ==> fieldtrip/private/nearest at 24 > incorrect value > > what input cfg for clusrandanalysis would change this? My current (very > experimental) cfg is > > cfg = []; > cfg.channelcmb = { 'MEG2443' 'MEG'}; > cfg.statistic = 'indepsamplesZcoh' ; > cfg.alpha = 0.05 ; > cfg.clusterteststat = 'maxsum' ; > cfg.onetwo = 'onesided_1<2' ; > cfg.makeclusters = 'yes' ; > cfg.minnbchan = 2; > cfg.nranddraws = 100; > > > thanks for your time. > > best, > sameer > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From litvak at TECHUNIX.TECHNION.AC.IL Wed Jul 4 16:24:33 2007 From: litvak at TECHUNIX.TECHNION.AC.IL (Vladimir Litvak) Date: Wed, 4 Jul 2007 15:24:33 +0100 Subject: EGI reader Message-ID: Dear all, A new reader for EGIS format (which is far as I understand is one of several formats used by the EGI system) was added to the fileio toolbox starting from version 20070704. This reader is the first result of collaboration between Fieldtrip and SPM developers. It was developed by Joseph Dien (jdien at ku.edu) originally for SPM. EGI users are welcome to test the new reader and report any problems directly to Joseph (he is probably not subscribed to the list). Best, Vladimir ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From grigu at CBS.MPG.DE Thu Jul 5 13:57:51 2007 From: grigu at CBS.MPG.DE (Maren Grigutsch) Date: Thu, 5 Jul 2007 13:57:51 +0200 Subject: bug in statistics_montecarlo? Message-ID: Dear Robert, Eric and other fellows of the Fieldtrip team, I'm just trying out your excellent software, in specific your extremely useful and well designed statistics functions. Many thanks for this great and generous gift to the neuroscience community! I would like to point you to an inconsistency I seem to have found in the implementation of the statistics_montecarlo function. When I compared the probabilities computed with statistics_analytic and statistics_montecarlo for the depsamplesT test, the probabilities determined via the randomization test turned out to be too low by a factor of about 1/2, see code and Matlab output below. ------------------------- N = 50; M = 0.25; alpha = 0.05; tail = 0; % 'both' % construct a normally distributed difference vector % with unit variance and mean M d = randn(1,N); d = d ./ sqrt(var(d,1,2)); d = d -mean(d) + M; % compute a paired t-test [H,P,CI,stat] = ttest(d,0,alpha,tail) H = 0 P = 0.0864 CI = -0.0371 0.5371 stat = tstat: 1.7500 df: 49 sd: 1.0102 % generate two sample vectors with their difference given by d x =randn(1,N); y = x + d; % generate the design matrix for testing with fieldtrip design = [ 1:N 1:N % subject number repmat(1,[1 N]) repmat(2,[1 N]) % condition number ]; cfg = []; cfg.statistic = 'depsamplesT'; cfg.method = 'analytic'; cfg.correctm = 'no'; cfg.alpha = 0.05; cfg.tail = 0; cfg.uvar = 1; cfg.ivar = 2; [stat_analytic, cfg] = statistics_analytic(cfg,[x y],design) stat_analytic = stat: -1.7500 df: 49 critval: [-2.0096 2.0096] prob: 0.0864 mask: 0 cfg.numrandomization = 5000; [stat_montecarlo, cfg] = statistics_montecarlo(cfg,[x y],design) using "statfun_depsamplesT" for the single-sample statistics constructing randomized design total number of measurements = 100 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of control variables = 0 number of within-block variables = 0 repeated measurement in variable 1 over 50 levels number of repeated measurements in each level is 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 estimated time per randomization is 0 seconds not performing a correction for multiple comparisons stat_montecarlo = prob: 0.0394 mask: 1 stat: -1.7500 -------------------- Maybe I'm missing something. But I think you should replace stat.prob = min(prb_neg, prb_pos); by stat.prob = 2 *min(prb_neg, prb_pos); in line 344 of statistics_montecarlo(), for the two-tailed test. Maybe it would be even better to compare the absolute values of the observed and the randomized statistics, i.e. doing something like this for i=1:Nrand, .... if tail == 0, prb_pos = prb_pos + (abs(statobs) Message-ID: On 29 Jun 2007, at 9:12, Valesca Kooijman wrote: >> Warning: cannot convert matlab version into a number >> In eeglab2fieldtrip>matlabversion at 265 >> In eeglab2fieldtrip>fixprecision at 230 >> In eeglab2fieldtrip at 149 >> ??? Index exceeds matrix dimensions. >> >> Error in ==> eeglab2fieldtrip at 149 >> data.trial{index} = fixprecision(EEG.data(:,:,index)); Hi Valesca The up-to-date version of eeglab2fieldtrip that is included in fieldtrip has something else on line 149, and does not call the fixprecision function. I suggest that you upgrade to the latest fieldtrip version and try with that. Alternatively you can try a more recent matlab version. 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 5 17:06:16 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 5 Jul 2007 17:06:16 +0200 Subject: Interpolating bad channels in EEG In-Reply-To: Message-ID: Hi Helen > Is there a function in Fieldtrip that can replace data from a bad EEG > channel using interpolation of neighbouring channels? There is the function MEGREPAIR, which also will work on EEG channels. It does require that you specify a structure with electrode positions in 3D. See http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#how_are_electrodes _magnetometers_or_gradiometers_described and see READ_FCDC_ELEC. Since the function was written for MEG data, you have to add the electrode structure to the data as if it is a gradiometer structure, i.e. elec = something... data.grad = elec prior to calling MEGREPAIR. You also have to specify cfg.neighbourdist in the same units as they are in your electrode definition (e.g. cm or mm). 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Thu Jul 5 17:25:04 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 5 Jul 2007 17:25:04 +0200 Subject: Volume conduction model for EEG DICS beamforming In-Reply-To: Message-ID: Hi Jared, On 29 Jun 2007, at 3:31, Jared Van Snellenberg wrote: > I'm currently working on a few DICS beamforming analyses for an EEG > dataset > I have, and I have a couple of questions regarding obtaining a good > volume > conduction model to include in the cfg.vol input to sourceanalysis. > > I do not have MRIs or headshape information for my subjects, but of > course > I have electrode position information in spherical coordinates > (stored in > an elec structure imported from a BESA .elp file). As far as I know, the BESA elp format only contains the two angles that define the electrode position in spherical coordinates (i.e. see http://en.wikipedia.org/wiki/Spherical_coordinates) to project them onto a spherical head model. The 3D carthesian coordinates would be more usefull and realistic (i.e. an x, y, and z value for each electrode). > It's not clear to me how to generate a volume conduction model with > this > information, so any guidance here would be greatly appreciated. > Ideally, I > would like to use a 4-shell model. You can use a 4-shell concentric sphere model. That is specified using vol.r = [r1 r2 r3 r4] % radii of the shperes vol.c = [c1 c2 c3 c4] % conductivit within each sphere vol.o = [x y z] % optional, origin of the sphere. Default is to assume [0 0 0] You can fit the radius of the outermost sphere to the electrodes. For the elp files I would assume that the origin of the sphere would be [0 0 0], which means that you do not have to specify that. The standard spherical model used in BESA is vol = r: [71 72 79 85] c: [0.3300 1 0.0042 0.3300] o: [0 0 0] > The FIELDTRIP documentation indicates > that this model is implemented, but I can not seem to find the > relevant > function (and prepare_singleshell requires headshape information or > an nx3 > sensor array--I presume in grid coordinates--that I do not have). The prepare_localspheres and prepare_singleshell are indeed for MEG volume conductors. They can use a polhemus scanned surface of the head, or a large set of points on the brain (from an MRI) or they can use a segmented anatomical MRI. > Finally, > all of the relevant prepare_XXX functions seem to indicate that > they are > specifically for MEG data, so I wanted to make sure that whatever > approach > I use is appropriate for EEG electrodes rather than MEG sensors. You can also use a standard realistic EEG model using the boundary element method (BEM), which is based on the SPM/MNI template brain. That is not included by default in the fieldtrip release version but I have just copied it as a seperate file to our ftp server. You can find it on ftp://ftp.fcdonders.nl/pub/fieldtrip/standard_BEM.zip 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/fcdonders/fieldtrip. From maris at NICI.RU.NL Thu Jul 5 21:51:03 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 5 Jul 2007 21:51:03 +0200 Subject: bug in statistics_montecarlo? In-Reply-To: <468CDCBF.50707@cbs.mpg.de> Message-ID: Dear Maren, > I'm just trying out your excellent software, in specific your extremely > useful and well designed statistics functions. Many thanks for this > great and generous gift to the neuroscience community! > > I would like to point you to an inconsistency I seem to have found in > the implementation of the statistics_montecarlo function. When I > compared the probabilities computed with statistics_analytic and > statistics_montecarlo for the depsamplesT test, the probabilities > determined via the randomization test turned out to be too low by a > factor of about 1/2, see code and Matlab output below. Most likely, there will be a bug in statistics_montecarlo somewhere, but I do not think that your numerical demonstration is evidence for such a bug. The following points are relevant in this respect: 1. For a permutation test to be correct (in the sense that it controls the false alarm rate), it is NOT required that it produces the same p-value as the corresponding parametric test (i.e., using the same test statistic and calculating the p-value under auxiliary assumption of normality). 2. To show that there is a bug in the statistics_montecarlo, you must show that its permutation p-values do not have the properties they should have according to the theory behind permutation tests (see, Maris and Oostenveld, in the most recent issue of the Journal of Neuroscience Methods). For instance, you could do the following: 1. Take a test statistic, e.g., the dependent samples t-statistic. 2. Generate N pairs of observations from a bivariate distribution with identical marginal distributions (this is the null hypothesis of a permutation test for a within-units study). 3. Calculate the permutation p-value under the permutation distribution, which is obtained by randomly permuting the elements of the N pairs. 4. Repeat steps 2-3 a large number of times and calculate the proportion of times that it is less than 0.05. 5. If the proportion in 4. is significantly different from 0.05 (the nomical alpha-level) you have shown that there is bug in statistics_montecarlo. A simulation study of the type described here was performed by Maris, Schoffelen, & Fries (2007, also in the Journal of Neuroscience Methods) to show that a permutation test for coherence differences controls the false alarm rate whereas the corresponding parametric test does not. Kind regards, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > ------------------------- > > N = 50; > M = 0.25; > alpha = 0.05; > tail = 0; % 'both' > > % construct a normally distributed difference vector > % with unit variance and mean M > d = randn(1,N); > d = d ./ sqrt(var(d,1,2)); > d = d -mean(d) + M; > > % compute a paired t-test > [H,P,CI,stat] = ttest(d,0,alpha,tail) > > H = > > 0 > > > P = > > 0.0864 > > > CI = > > -0.0371 0.5371 > > > stat = > > tstat: 1.7500 > df: 49 > sd: 1.0102 > > % generate two sample vectors with their difference given by d > x =randn(1,N); > y = x + d; > > % generate the design matrix for testing with fieldtrip > design = [ > 1:N 1:N % subject number > repmat(1,[1 N]) repmat(2,[1 N]) % condition number > ]; > > cfg = []; > cfg.statistic = 'depsamplesT'; > cfg.method = 'analytic'; > cfg.correctm = 'no'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.uvar = 1; > cfg.ivar = 2; > > [stat_analytic, cfg] = statistics_analytic(cfg,[x y],design) > > stat_analytic = > > stat: -1.7500 > df: 49 > critval: [-2.0096 2.0096] > prob: 0.0864 > mask: 0 > > cfg.numrandomization = 5000; > [stat_montecarlo, cfg] = statistics_montecarlo(cfg,[x y],design) > > using "statfun_depsamplesT" for the single-sample statistics > constructing randomized design > total number of measurements = 100 > total number of variables = 2 > number of independent variables = 1 > number of unit variables = 1 > number of control variables = 0 > number of within-block variables = 0 > repeated measurement in variable 1 over 50 levels > number of repeated measurements in each level is 2 2 2 2 2 2 2 2 2 2 2 2 > 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 > estimated time per randomization is 0 seconds > not performing a correction for multiple comparisons > > stat_montecarlo = > > prob: 0.0394 > mask: 1 > stat: -1.7500 > > -------------------- > > Maybe I'm missing something. But I think you should replace > > stat.prob = min(prb_neg, prb_pos); > by > stat.prob = 2 *min(prb_neg, prb_pos); > > in line 344 of statistics_montecarlo(), for the two-tailed test. > > Maybe it would be even better to compare the absolute values of the > observed and the randomized statistics, i.e. doing something like this > > for i=1:Nrand, > .... > if tail == 0, > prb_pos = prb_pos + (abs(statobs) end > ... > end > if tail == 0, > stat.prob = prb_pos./Nrand; > end > > > What do you think? > > Many thanks in advance for your comments. > Best regards, > --Maren > > -- > Max Planck Institute for Human Cognitive and Brain Sciences > Dipl.-Phys. Maren Grigutsch mailto:grigu at cbs.mpg.de > Stephanstr.1a http://www.cbs.mpg.de > 04103 Leipzig, Germany phone/fax: +49 341 9940-136/-260 > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kooijman at TIFN.NL Fri Jul 6 08:27:12 2007 From: Kooijman at TIFN.NL (Valesca Kooijman) Date: Fri, 6 Jul 2007 08:27:12 +0200 Subject: eeglab2fieldtrip In-Reply-To: Message-ID: Hi Robert, The latest version of eeglab2fieldtrip gives me the same error message in line 146 (where it calls the fixprecission function, instead of in line 149). Is there another solution? If not, which version of matlab do you recommend? Thanks, Valesca Robert Oostenveld Sent by: FieldTrip discussion list 07/05/2007 05:00 PM Please respond to FieldTrip discussion list To FIELDTRIP at NIC.SURFNET.NL cc Subject Re: [FIELDTRIP] eeglab2fieldtrip On 29 Jun 2007, at 9:12, Valesca Kooijman wrote: >> Warning: cannot convert matlab version into a number >> In eeglab2fieldtrip>matlabversion at 265 >> In eeglab2fieldtrip>fixprecision at 230 >> In eeglab2fieldtrip at 149 >> ??? Index exceeds matrix dimensions. >> >> Error in ==> eeglab2fieldtrip at 149 >> data.trial{index} = fixprecision(EEG.data(:,:,index)); Hi Valesca The up-to-date version of eeglab2fieldtrip that is included in fieldtrip has something else on line 149, and does not call the fixprecision function. I suggest that you upgrade to the latest fieldtrip version and try with that. Alternatively you can try a more recent matlab version. 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/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From grigu at CBS.MPG.DE Fri Jul 6 15:27:14 2007 From: grigu at CBS.MPG.DE (Maren Grigutsch) Date: Fri, 6 Jul 2007 15:27:14 +0200 Subject: bug in statistics_montecarlo? In-Reply-To: <00d501c7bf3d$d1a796c0$b0ccae83@fcdonders.nl> Message-ID: Eric Maris wrote: >Dear Maren, > > >Most likely, there will be a bug in statistics_montecarlo somewhere, but I >do not think that your numerical demonstration is evidence for such a bug. > >The following points are relevant in this respect: > > > 1. For a permutation test to be correct (in the sense that it controls the > false alarm rate), it is NOT required that it produces the same p-value as > the corresponding parametric test (i.e., using the same test statistic and > calculating the p-value under auxiliary assumption of normality). > > > Dear Eric, Many thanks for your fast response! You may be right that the data I sent you cannot be regarded as an unequivocal evidence for a bug in statistics_montecarlo. What I had in mind and wanted to demonstrate to you was the following: The dependent samples t-test gives accurate P-values if the sampling distribution of the difference of means is roughly normal, as was the case in my example. The permutation distribution of the dependent samples t-statistic approximates the sampling distribution of t-values under the null hypothesis. For my example with normally distributed differences and 5000 permutations, the permutation distribution should closely resemble the theoretical t distribution underlying the analytic t-test. Thus, I had expected te get roughly the same p-values from both the analytic and the permutation t-test. However, when I repeated my simulations many times, the p-values obtained from statistics_montecarlo, using a two-tailed test, were always smaller by a factor of about 1/2 as compared to the p-values obtained from statistics_analytic or Matlab's ttest function. In contrast, when I applied a one-sided test the P-values were roughly the same between the different functions. > >2. To show that there is a bug in the statistics_montecarlo, you must show >that its permutation p-values do not have the properties they should have >according to the theory behind permutation tests (see, Maris and Oostenveld, >in the most recent issue of the Journal of Neuroscience Methods). For >instance, you could do the following: > >1. Take a test statistic, e.g., the dependent samples t-statistic. > >2. Generate N pairs of observations from a bivariate distribution with >identical marginal distributions (this is the null hypothesis of a >permutation test for a within-units study). > >3. Calculate the permutation p-value under the permutation distribution, >which is obtained by randomly permuting the elements of the N pairs. > >4. Repeat steps 2-3 a large number of times and calculate the proportion >of times that it is less than 0.05. > >5. If the proportion in 4. is significantly different from 0.05 (the >nomical alpha-level) you have shown that there is bug in >statistics_montecarlo. > > > > Well, this sounds very convincing. To follow your suggestions I ran the following script (using only 500 permutations, for the sake of time): --------- Nrep = 500; Nperm = 500; N = 50; design = [ 1:N 1:N % subject number repmat(1,[1 N]) repmat(2,[1 N]) % condition number ]; cfg = []; cfg.statistic = 'depsamplesT'; cfg.method = 'montecarlo'; cfg.correctm = 'no'; cfg.alpha = 0.05; cfg.tail = 0; cfg.uvar = 1; % "subject" is unit of observation (unit factor) cfg.ivar = 2; % "condition" is the independent variable (repeated measures) cfg.numrandomization = Nperm; cfg.feedback = 'no'; prob = zeros(1,Nrep); T = zeros(1,Nrep); wb = waitbar(0,'Please wait...'); for k=1:Nrep, x = randn(1,N); y = randn(1,N); [stat_montecarlo, cfg] = statistics_montecarlo(cfg,[x y],design); prob(k) = stat_montecarlo.prob; T(k) = stat_montecarlo.stat; waitbar(k/Nrep,wb); end close(wb); % should be approximately 0.05 sum(prob<0.05) / Nrep ------- And here is the result: ans = 0.1000 If I got it correctly, this means that the observed FA rate (0.1) is twice the expected value of 0.05 (the nominal alpha level). So it still seems to me that there is something wrong with statistics_montecarlo. I'm just about reading the paper of yours mentioned above. In section 3.1.1 you describe cluster-based nonparametric statistical tests, and you give the following statement: "for a two-sided test, we select test statistics whose absolute value is larger than some threshold". In my opinion, this is exactly what should be done in statistics_montecarlo for a two-sided test: comparing the *absolute* t-values. >A simulation study of the type described here was performed by Maris, >Schoffelen, & Fries (2007, also in the Journal of Neuroscience Methods) to >show that a permutation test for coherence differences controls the false >alarm rate whereas the corresponding parametric test does not. > > Thank you for pointing me to that paper. I'm sure it will help me a lot to improve my understanding of nonparametric statistical tests. I'm looking forward to your response. Hope not to bother you too much. But I think the issue has some impact and is worth to be thoroughly discussed. Best regards, --Maren > > > > >Kind regards, > > > > > >Eric Maris > > > >dr. Eric Maris > >NICI/Biological Psychology and > >F.C. Donders Center for Cognitive NeuroImaging > >University of Nijmegen > >P.O. Box 9104 > >6500 HE Nijmegen > >The Netherlands > >T:+31 24 3612651 (NICI) > >T:+31 24 3610754 (FCDC) > >F:+31 24 3616066 (NICI) > >E: maris at nici.ru.nl > >MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > -- Max Planck Institute for Human Cognitive and Brain Sciences Dipl.-Phys. Maren Grigutsch mailto:grigu at cbs.mpg.de Stephanstr.1a http://www.cbs.mpg.de 04103 Leipzig, Germany phone/fax: +49 341 9940-136/-260 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jaredvs at GMAIL.COM Sat Jul 7 05:12:49 2007 From: jaredvs at GMAIL.COM (Jared Van Snellenberg) Date: Fri, 6 Jul 2007 23:12:49 -0400 Subject: Volume conduction model for EEG DICS beamforming In-Reply-To: <4D495628-E1DE-4D4B-9CEF-A55136D6FCDF@fcdonders.ru.nl> Message-ID: Hi Robert, Thanks very much for the clarifications. Quick question about the BEM model you supplied--is it correct to just pass in the vol structure contained in the standard_vol.mat along with an elec structure containing the nx3 array of electrode coordinates in MNI space? That is, is the following correct: load standard_vol.mat cfg.vol=vol; cfg.elec=elec; %predefined; 59 electrode coordinates in MNI results=sourceanalysis(cfg,data); Thanks, -Jared Van Snellenberg On 7/5/07, Robert Oostenveld wrote: > > Hi Jared, > > On 29 Jun 2007, at 3:31, Jared Van Snellenberg wrote: > > I'm currently working on a few DICS beamforming analyses for an EEG > > dataset > > I have, and I have a couple of questions regarding obtaining a good > > volume > > conduction model to include in the cfg.vol input to sourceanalysis. > > > > I do not have MRIs or headshape information for my subjects, but of > > course > > I have electrode position information in spherical coordinates > > (stored in > > an elec structure imported from a BESA .elp file). > > As far as I know, the BESA elp format only contains the two angles > that define the electrode position in spherical coordinates (i.e. see > http://en.wikipedia.org/wiki/Spherical_coordinates) to project them > onto a spherical head model. The 3D carthesian coordinates would be > more usefull and realistic (i.e. an x, y, and z value for each > electrode). > > > It's not clear to me how to generate a volume conduction model with > > this > > information, so any guidance here would be greatly appreciated. > > Ideally, I > > would like to use a 4-shell model. > > You can use a 4-shell concentric sphere model. That is specified using > vol.r = [r1 r2 r3 r4] % radii of the shperes > vol.c = [c1 c2 c3 c4] % conductivit within each sphere > vol.o = [x y z] % optional, origin of the sphere. Default is to > assume [0 0 0] > > You can fit the radius of the outermost sphere to the electrodes. For > the elp files I would assume that the origin of the sphere would be > [0 0 0], which means that you do not have to specify that. > > The standard spherical model used in BESA is > vol = > r: [71 72 79 85] > c: [0.3300 1 0.0042 0.3300] > o: [0 0 0] > > > The FIELDTRIP documentation indicates > > that this model is implemented, but I can not seem to find the > > relevant > > function (and prepare_singleshell requires headshape information or > > an nx3 > > sensor array--I presume in grid coordinates--that I do not have). > > The prepare_localspheres and prepare_singleshell are indeed for MEG > volume conductors. They can use a polhemus scanned surface of the > head, or a large set of points on the brain (from an MRI) or they can > use a segmented anatomical MRI. > > > Finally, > > all of the relevant prepare_XXX functions seem to indicate that > > they are > > specifically for MEG data, so I wanted to make sure that whatever > > approach > > I use is appropriate for EEG electrodes rather than MEG sensors. > > You can also use a standard realistic EEG model using the boundary > element method (BEM), which is based on the SPM/MNI template brain. > That is not included by default in the fieldtrip release version but > I have just copied it as a seperate file to our ftp server. You can > find it on ftp://ftp.fcdonders.nl/pub/fieldtrip/standard_BEM.zip > > 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/fcdonders/fieldtrip. > -- Jared Van Snellenberg Social Cognitive Affective Neuroscience Unit http://scan.psych.columbia.edu (212) 854-7858 p (212) 854-3609 f Department of Psychology, Columbia University 406 Schermerhorn Hall 1190 Amsterdam Avenue, Mail Code 5501 New York, NY 10027 _______________________________ "Luck is the residue of design" -Attributed to Branch Rickey, former US Baseball Administrator, and also to John Milton. Go figure. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Sat Jul 7 13:48:55 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Sat, 7 Jul 2007 13:48:55 +0200 Subject: Volume conduction model for EEG DICS beamforming In-Reply-To: <51d499680707062012i76928451te1a47f515e26abd9@mail.gmail.com> Message-ID: On 7 Jul 2007, at 5:12, Jared Van Snellenberg wrote: > Quick question about the BEM model you supplied--is it correct to > just pass in the vol structure contained in the standard_vol.mat > along with an elec structure containing the nx3 array of electrode > coordinates in MNI space? That is, is the following correct: > > load standard_vol.mat > cfg.vol=vol; > cfg.elec=elec; %predefined; 59 electrode coordinates in MNI > results=sourceanalysis(cfg,data); Yes, but only if the electrode labels in your data match with the complete set or a subset of the labels in elec (it is case sensitive). The intersection of data.label and elec.label will be used for sourecanalysis. However, for EEG source analysis your data should be average referenced. And that is something that you do during preprocessing (or optionally timelockanalysis). That means that all channels in your data for which there is a corresponding electrode position in the elec structure should be average referenced. Prior to sourceanalysis, you can use the headmodelplot function (or electroderealign with method=interactive) to check that the electrodes ly on the skin compartment of the MNI head model. 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Sat Jul 7 14:09:15 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Sat, 7 Jul 2007 14:09:15 +0200 Subject: eeglab2fieldtrip In-Reply-To: Message-ID: On 6 Jul 2007, at 8:27, Valesca Kooijman wrote: > The latest version of eeglab2fieldtrip gives me the same error > message in line 146 (where it calls the fixprecission function, > instead of in line 149). > Is there another solution? If not, which version of matlab do you > recommend? Matlab 7.0.1 is an old version, released around end 2004. It was quickly superseeded with version 7.0.4 to fix some serious bugs. I reccommend people in general to work with the latest matlab versionm, which now is 7.4. You can fix your problem by changing the "matlabversion" function which is included as subfunction inside the eeglab2fieldtrip function. Go to line 250 and replace the code there with the snippet below. I will make the same change in the release version. Robert ---- function [v] = matlabversion; s = ver('matlab'); v = s.Version; if ischar(v) % try converting to a number n = str2num(v); if isempty(n) switch v case '6.5.1' n = 6.5; % this is accurate enough case '7.0.1' n = 7.0; % this is accurate enough case '7.0.4' n = 7.0; % this is accurate enough otherwise warning('cannot convert matlab version into a number'); v = v; end end v = n; end ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Sun Jul 8 21:11:10 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Sun, 8 Jul 2007 15:11:10 -0400 Subject: clusterandanalysis: negculsters vs posclusters and onesided vs two sided tests. Message-ID: Dear Fieldtrippers, I have been implementing clusterandanalysis (instead of freqstatistics) according to Eric Mariss suggestion to find coherence differences between trials. However I seem to be getting some confusing results. I do the following for i = 1: numel(MEGchan) cfg = []; cfg.channelcmb = { MEGchan{i} 'MEG'}; cfg.statistic = 'indepsamplesZcoh' ; cfg.onetwo = 'onesided_1<2 ; OR cfg.onetwo = 'onesided_2<1; cfg.alpha = 0.05 ; cfg.clusterteststat = 'maxsum' ; cfg.makeclusters = 'yes' ; cfg.minnbchan = 2; cfg.nranddraws = 1000; [clusrand] = clusterrandanalysis(cfg, CSD1 , CSD2); clusrand_Coh_1greater2{i} = clusrand; OR clusrand_Coh_2greater1{i} = clusrand; OR clusrand_Coh_twosided{i} = clusrand; end cfg.onetwo = 'onesided_1<2 ; as well as cfg.onetwo = 'onesided_2<1; find the same positive clusters (posclusters) for one of the 6 sensors belonging to MEGchans (the other 5 return empty posclusters and negclusters). I would have thought the cluster which shows up as posculster in 'onesided_1<2 should show up as negcluster in 'onesided_2<1. Secondly, cfg.onetwo = 'twosided' ; returns clustering effects for channels other than the one seen above and show only negclusters. At the same time the channel which showed posclusters in the two one sided tests shows no custering in coherence. Does this make sense? If yes, what is it? Thanks a lot for your time. Your replies are always much appreciated. Best, sameer p.s: Ill admit that the questions written above also partly stem from my lack of deep understanding of clustering analysis, and in particular, I have no idea what is meant by negative and positive clusters. It would be great if someone could point me to some reading material. I have tried, but, have been unable to find any definition on negative clusters and positive clusters, though I have some idea about how clustering works. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From J.Geuze at STUDENT.RU.NL Mon Jul 9 12:22:15 2007 From: J.Geuze at STUDENT.RU.NL (Jeroen Geuze) Date: Mon, 9 Jul 2007 12:22:15 +0200 Subject: freqanalysis_mtmconvol Message-ID: Dear Fieltrip team, I'm using freqanalysis_mtmconvol to extract single trial TFR data. What I noticed when running the code is that not all my trials end up in the 4D powspctrm field of the result struct. I have used two datasets. One contains 193 trials and the other 324. When I run freqanalysis, I am left with 154 and 140 trials respectively in the rpt part of powspctrm. Is there a problem here or is my fieldtrip ignorance playing up. The config I used: cfg = []; cfg.output = 'pow'; cfg.channel = 'all'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 5:1:40; cfg.t_ftimwin = 4./cfg.foi; % 4 cycles per time window cfg.toi = -0.5:0.05:2; cfg.keeptrials = 'yes'; Thanks in advance for any help, Jeroen Geuze ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Mon Jul 9 13:27:02 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 9 Jul 2007 13:27:02 +0200 Subject: freqanalysis_mtmconvol In-Reply-To: <37814C52-03FE-4CE8-8FBA-11142B6BA59A@student.ru.nl> Message-ID: Hi Jeroen, The cfg looks okay as far as I can see. Does freqanalysis say the correct amount of trials when you call it? (It starts up with saying something like "the input is raw data with . channels and . trials) If it does not say anything like this, it could be that you are using an old version of FieldTrip. (not that an old version could be an explanation for this though). I have no idea what it could be, but probably it has to do with the data set that you give in. Could it be that the trials do not all have the same time axis, and that some trials are not from -0.5 to 2 seconds and therefore omitted since cfg.toi = -0.5:0.05:2; If not can you give some more information on your data, what are the time axis of the trials, what did you do before calling freqanalysis? Bests Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Jeroen Geuze Sent: Monday, July 09, 2007 12:22 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] freqanalysis_mtmconvol Dear Fieltrip team, I'm using freqanalysis_mtmconvol to extract single trial TFR data. What I noticed when running the code is that not all my trials end up in the 4D powspctrm field of the result struct. I have used two datasets. One contains 193 trials and the other 324. When I run freqanalysis, I am left with 154 and 140 trials respectively in the rpt part of powspctrm. Is there a problem here or is my fieldtrip ignorance playing up. The config I used: cfg = []; cfg.output = 'pow'; cfg.channel = 'all'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 5:1:40; cfg.t_ftimwin = 4./cfg.foi; % 4 cycles per time window cfg.toi = -0.5:0.05:2; cfg.keeptrials = 'yes'; Thanks in advance for any help, Jeroen Geuze ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From J.Geuze at STUDENT.RU.NL Mon Jul 9 13:29:58 2007 From: J.Geuze at STUDENT.RU.NL (Jeroen Geuze) Date: Mon, 9 Jul 2007 13:29:58 +0200 Subject: freqanalysis_mtmconvol In-Reply-To: <37814C52-03FE-4CE8-8FBA-11142B6BA59A@student.ru.nl> Message-ID: Dear Fieldtrip team, My sincere apologies for spamming your mailbox (twice), there seemed to be a wrong flag somewhere in my code, causing a data set mix up. The problem is solved now. Regards, Jeroen. On Jul 9, 2007, at 12:22 PM, Jeroen Geuze wrote: > Dear Fieltrip team, > > I'm using freqanalysis_mtmconvol to extract single trial TFR data. > What I noticed when running the code is that not all my trials end > up in the 4D powspctrm field of the result struct. I have used two > datasets. One contains 193 trials and the other 324. When I run > freqanalysis, I am left with 154 and 140 trials respectively in the > rpt part of powspctrm. Is there a problem here or is my fieldtrip > ignorance playing up. > The config I used: > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'all'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.foi = 5:1:40; > cfg.t_ftimwin = 4./cfg.foi; % 4 cycles per time window > cfg.toi = -0.5:0.05:2; > cfg.keeptrials = 'yes'; > > Thanks in advance for any help, > > > Jeroen Geuze > ---------------------------------- > > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marie at PSY.GLA.AC.UK Thu Jul 12 11:25:33 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Thu, 12 Jul 2007 10:25:33 +0100 Subject: Job advertisement - CCNI Glasgow Message-ID: UNIVERSITY of GLASGOW DEPARTMENT OF PSYCHOLOGY Centre for Cognitive Neuroimaging (CCNi) POST DOCTORAL RESEARCH ASSISTANT 1 year fixed term appointment, £23,692 - £26,666 per annum REF: 13436/DPO/A3 Applications are invited for a Postdoctoral Research Assistant to work with Dr. Guillaume Rousselet in the newly established Centre for Cognitive Neuroimaging (CCNi). The CCNi is a research institution with state-of-the-art EEG and TMS systems and a large computing grid. Within the next few months a new fMRI and MEG system will be installed. The position is offered for a period of one year with potential 1-2 year extension pending funding approval. Several research projects are available, dealing with the rapid visual processing of faces, objects, and natural scenes. The primary goal of these projects is to map systematically how statistical image properties impact brain and behavioural responses, using a range of psychophysics paradigms and EEG techniques. You will be able to think out of the box in terms of EEG analyses and statistical procedures. You will be qualified, with a PhD, or equivalent, in Psychophysics, Cognitive Neuroscience, or a closely related discipline. Strong Matlab programming skills and psychophysics are essential. EEG expertise is not required and appropriate training will be provided. Finally, you should have a strong interest in developing your own scientific program and pursuing a research career. This post is available from 1 September 2007. Informal enquiries may be made to Dr. Guillaume Rousselet, (+44 (0) 141 330 6652; g.rousselet at psy.gla.ac.uk). For further details about the post and how to apply: see our web site at http://www.psy.gla.ac.uk/jobs.php or contact Clare Alexander, Department of Psychology,University of Glasgow, G12 8QQ (+44 (0)141 330 5090, e-mail c.alexander at psy.gla.ac.uk or the University web site at www.gla.ac.uk Closing date: Friday 3rd August 2007. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kooijman at TIFN.NL Fri Jul 13 11:02:44 2007 From: Kooijman at TIFN.NL (Valesca Kooijman) Date: Fri, 13 Jul 2007 11:02:44 +0200 Subject: eeglab2fieldtrip In-Reply-To: <433064D4-1D28-43C8-B1B3-0E926E407173@fcdonders.ru.nl> Message-ID: Hi Robert, In connection with your previous advice concerning the eeglab2fieldtrip script, we came accross the following problem and solution (see script below): filename = 'fk dag 5-Deci.set'; load(filename, '-mat'); %the next line was included because the eeglab2fieldtrip script says % %data.trial{index} = fixprecision(EEG.data(:,:,index)); % while the variable EEG.data only contains the name of the variable and not the data % the next line assigns the data to EEG.data EEG.data = EEGDATA; %%%%%% data = eeglab2fieldtrip(EEG,'preprocessing'); hdr.nChans = length(data.label); hdr.label = data.label; hdr.Fs = data.fsample; write_fcdc_data(filename, EEG.data, 'header', hdr, 'dataformat', 'brainvision_eeg'); I do still get the following warning after running the above script: Warning: writing segmented data as if it were continuous In fieldtrip-20070710\private\write_brainvision_eeg at 38 In fieldtrip-20070710\private\write_data at 63 In write_fcdc_data at 48 In ConversionEEGDATA at 13 Is this problematic or is this a standard warning following conversion to Vision Analyzer? In addition, I was wondering where my trial onset markers are written to? Write_fcdc_data only generates a .eeg and a .hdr file, and not a .vmrk file. >>From your earlier emails I understood that the datamatrix should be converted to ntrials X nchans X nsamples before running write­_fcdc_data. Currently my datamatrix consists of nchans X nsamples X ntrials. Would you mind letting me know how I can convert my datamatrix? Thanks a lot. Best, Valesca Robert Oostenveld Sent by: FieldTrip discussion list 07/07/2007 02:09 PM Please respond to FieldTrip discussion list To FIELDTRIP at NIC.SURFNET.NL cc Subject Re: [FIELDTRIP] eeglab2fieldtrip On 6 Jul 2007, at 8:27, Valesca Kooijman wrote: > The latest version of eeglab2fieldtrip gives me the same error > message in line 146 (where it calls the fixprecission function, > instead of in line 149). > Is there another solution? If not, which version of matlab do you > recommend? Matlab 7.0.1 is an old version, released around end 2004. It was quickly superseeded with version 7.0.4 to fix some serious bugs. I reccommend people in general to work with the latest matlab versionm, which now is 7.4. You can fix your problem by changing the "matlabversion" function which is included as subfunction inside the eeglab2fieldtrip function. Go to line 250 and replace the code there with the snippet below. I will make the same change in the release version. Robert ---- function [v] = matlabversion; s = ver('matlab'); v = s.Version; if ischar(v) % try converting to a number n = str2num(v); if isempty(n) switch v case '6.5.1' n = 6.5; % this is accurate enough case '7.0.1' n = 7.0; % this is accurate enough case '7.0.4' n = 7.0; % this is accurate enough otherwise warning('cannot convert matlab version into a number'); v = v; end end v = n; end ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak at TECHUNIX.TECHNION.AC.IL Fri Jul 13 17:34:45 2007 From: litvak at TECHUNIX.TECHNION.AC.IL (Vladimir Litvak) Date: Fri, 13 Jul 2007 16:34:45 +0100 Subject: out of memory - window machine In-Reply-To: <51d499680706281957v2b1c34bfx48d7a15f0ff82ca2@mail.gmail.com> Message-ID: Dear all, I've been to a Mathworks workshop yesterday and they talked about their new distributed computing toolbox (version 3.1). What they say is that if one has a computer cluster it is possible to install a slave Matlab engine on each machine and declare a variable that will be distributed among all the machines and thereby utilize all their memory even without parallelizing any of the computations. Of course things will run rather slowly that way. Moreover, it should also be possible to run several instances of this engine on the same machine and make use of multiple core processors (if the code is parallelized) but also address more than 2Gb of memory on a 32-bit machine given that every instance of the engine stores less than 2Gb. I have not tried any of this, but if you try and it works for you I'd be very interested to hear about it. Best, Vladimir _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Jared Van Snellenberg Sent: Friday, June 29, 2007 3:58 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] out of memory - window machine Hi Virginie, There are a couple of other things you can do. First, make certain that you are not growing any variables inside a loop. For example, if you have any code like: for i=1:size(data,1) for j=1:size(data,2) newvar(i,j)=data(i,j); end end make sure that you precede this code with: newvar=zeros(size(data)); This will not only speed up the execution of your code but can prevent memory errors in matlab. Second, use the clear function to remove any variables that are no longer necessary. Third, type 'pack' at the command line prior to executing the part of your code that generates the memory error. If none of this works, there are two more options that I'm aware of for avoiding a memory error. First, you can run your analysis on a computer with a 64-bit architecture and a 64-bit operating system. The reason that you are still encountering memory errors despite having virtual memory maximized is that 32-bit systems are incapable of addressing more than approximately 4 GB of memory, regardless of how much is available. This limitation is effectively removed on 64 bit systems (or rather, the limitation is several orders of magnitude higher). Finally, you can run your analysis in steps, saving the results of each step and clearing all the data. I've certainly had to do this before when working in fieldtrip. For example, if you're attempting to timelock analyses, load each subject individually and grandaverage their trials, saving the results to a new variable. Then clear their data, load the next subject, and continue. In addition, with the datasets I've used in FIELDTRIP I've noticed that for most functions specifying cfg.keeptrials='yes' is likely to generate memory errors, and for frequency analyses specifying cfg.parameter='powandcsd' and using a large number of pairings in cfg.channelcmb (or leaving it at default) is pretty well guarenteed to generate a memory error. Good luck! -Jared On 6/28/07, Virginie van Wassenhove wrote: Hi fieldtrippers, would anyone have a trick to share for optimizing memory in matlab...? What I have tried so far (insufficient still): - let windows manage memory - boost virtual memory to maximum (on 2 drives!) - clear all unnecessary variables in mat space - disable java - turned off graphic hardware acceleration - shut off unused processes I am running out of options...Would using a mac solve these issues? Thanks in advance, -vv Virginie van Wassenhove, PhD :::::::::::: contact info ::::::::::::: Caltech - Division of Biology 1200 E. California Blvd M/C 139-74 Pasadena CA 91125 USA ::::::::::::::::::::::::::::::::::::::::::::::::: vvw at caltech.edu Virginie.van.Wassenhove at gmail.com W: 626.395.8959 http://www.its.caltech.edu/~vvw :::::::::::::::::: extras :::::::::::::::::::: http://www.kiva.org http://www.thehungersite.com/ http://www.agloco.com/r/BBBS1539 ::::::::::::::::::::::::::::::::::::::::::::::::: ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -- Jared Van Snellenberg Social Cognitive Affective Neuroscience Unit http://scan.psych.columbia.edu (212) 854-7858 p (212) 854-3609 f Department of Psychology, Columbia University 406 Schermerhorn Hall 1190 Amsterdam Avenue, Mail Code 5501 New York, NY 10027 _______________________________ "Luck is the residue of design" -Attributed to Branch Rickey, former US Baseball Administrator, and also to John Milton. Go figure. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Mon Jul 16 17:36:58 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 16 Jul 2007 11:36:58 -0400 Subject: fd.dof matrix Message-ID: Dear Fieldtrippers, I have a question about calculating degrees of freedom. I get (after freqdescriptives) fd.dof = [46665x26 double]; However, dof = 2 x (Number of trials) x (number of tapers) and my trials are of equal length and I use padding. So I think (and my understanding could be wrong) this huge matrix is a waste of space as the dofs are going to be the same for every pair on each trial. How can I then ensure that freq.dof is just a number and can be still used later on? I am using the following configuration settings. cfgCSD = []; cfgCSD.ouput = 'powandcsd'; cfgCSD.method = 'mtmfft'; cfgCSD.keeptrials = 'yes' ; cfgCSD.keeptapers = 'no' ; cfgCSD.calcdof = 'yes'; cfgCSD.tapsmofrq = 4; cfgCSD.foilim = [f1 f2]; CSD = freqanalysis(cfgCSD, data); cfg = []; cfg.cohmethod = 'plv'; fd = freqdescriptives(cfg, CSD) Thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Andres.Posada at PSE.UNIGE.CH Tue Jul 17 16:21:00 2007 From: Andres.Posada at PSE.UNIGE.CH (Andres Posada) Date: Tue, 17 Jul 2007 16:21:00 +0200 Subject: 2 simple questions Message-ID: Hi all, I am just starting to use FieldTrip, fantastic program and very easy to use. I am doing the tutorial but I am blocked in two different places: First, how I can prepocess (filter, baseline, etc) already saved data? I use manual artifact rejection and I save the data ('save PreprocDataClean dataFIC'). Now when I want to filter and baseline this data, I cannot access them (variable in matlab or a matlab file) with the commands: cfg = []; cfg.datafile = 'PreprocDataClean.mat'; (?) cfg.blc = 'yes'; % apply baseline correction cfg.blcwindow = [-0.2 0]; % baseline: -0.2 sec to 0 cfg.lpfilter = 'yes'; % apply lowpass filter cfg.lpfreq = 35; % lowpass at 35 Hz. dataFIC = preprocessing(cfg); The other problem, when I try to do the tutorial of beamforming, with the mri data of the subject01 (available online) there is a SPM bug! My version of Matlab is 7.0.1.24704 (R14) Service Pack 1 and I use SMP2 (last update). The commands: mri = read_fcdc_mri('Subject01.mri'); cfg = []; cfg.name = 'segment'; cfg.write = 'yes'; cfg.coordinates = 'ctf'; [segmentedmri] = volumesegment(cfg, mri); and the bug is: Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 193 In spm_create_vol at 14 In spm_write_vol at 76 In fieldtrip-20070701\private\volumewrite_spm at 62 In volumesegment at 222 In temp at 6 performing the segmentation on the specified volume * - SPM2: spm_vol ------------------------------------------------- Error reading information on: ..ome/common/matlab/spm2/templates/T1.mnc Please check that it is in the correct format. ----------------------------------------- 15:49:03 - 17/07/2007 ??? Error using ==> spm_vol>subfunc1 Can't get volume information for '/home/common/matlab/spm2/templates/T1.mnc' Error in ==> spm_vol>subfunc2 at 51 V = subfunc1(P); Error in ==> spm_vol at 37 V = subfunc2(P); Error in ==> spm_segment>get_affine_mapping at 226 if ~isempty(VG) & ischar(VG), VG = spm_vol(VG); end; Error in ==> spm_segment>init_sp at 567 MM = get_affine_mapping(VF,PG,flags.affreg); Error in ==> spm_segment at 91 SP = init_sp(flags.estimate,VF,PG); Error in ==> volumesegment at 246 spm_segment(Va,cfg.template,flags); Error in ==> temp at 6 [segmentedmri] = volumesegment(cfg, mri); ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jaredvs at GMAIL.COM Tue Jul 17 22:24:02 2007 From: jaredvs at GMAIL.COM (Jared Van Snellenberg) Date: Tue, 17 Jul 2007 22:24:02 +0200 Subject: Mex File error during call to eeg_leadfield Message-ID: Hi all, I'm working on a DICS beamformer analysis, and ran into a Mex file error. Here's the MATLAB error (as you can see I have the most recent versions of MATLAB and FIELTRIP): ??? Invalid MEX-file 'C:\Program Files\MATLAB\R2007a\fieldtrip-20070717 \private\plgndr.dll': The specified procedure could not be found. . Error in ==> fieldtrip-20070717\private\eeg_leadfield4 at 126 P0 = plgndr(n,0,cos_theta); % zero'th order Legendre Error in ==> fieldtrip-20070717\private\compute_leadfield at 447 lf = eeg_leadfield4(pos, sens.pnt, vol); Error in ==> fieldtrip-20070717\private\beamformer_dics at 212 lf = compute_leadfield(dip.pos(i,:), grad, vol, 'reducerank', reducerank, 'normalize', normalize); Error in ==> sourceanalysis at 855 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); In case it helps, my cfg options are as follows: src_cfg.method='dics'; src_cfg.vol.r=[71 72 79 85]; src_cfg.vol.c=[0.3300 1 0.0042 0.3300]; src_cfg.vol.o=[0 0 35.9]; src_cfg.grid.xgrid=-85:5:85; src_cfg.grid.ygrid=-85:5:85; src_cfg.grid.zgrid=-50:5:125; src_cfg.grid.resolution=5; src_cfg.channel=1:59; Also, the data contain an elec field with a 61x3 list of coordinates (in mm, like the cfg.grid) and a 61x1 cell array of channel labels. The data come from a call to freqanalysis with the following options: f_cfg.method='mtmconvol'; f_cfg.output='powandcsd'; f_cfg.taper='hanning'; f_cfg.tapsmofrq=1; f_cfg.keeptrials='yes'; f_cfg.channel=1:59; Any assistance would be greatly appreciated. Regards, Jared Van Snellenberg Social Cognitive Affective Neuroscience Unit http://scan.psych.columbia.edu (212) 854-7858 p (212) 854-3609 f Department of Psychology, Columbia University 406 Schermerhorn Hall 1190 Amsterdam Avenue, Mail Code 5501 New York, NY 10027 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ctesche at UNM.EDU Thu Jul 19 17:59:06 2007 From: ctesche at UNM.EDU (Claudia Tesche) Date: Thu, 19 Jul 2007 17:59:06 +0200 Subject: CTF MEG42RS format Message-ID: Hi All Does anyone know how to read CTF MEG data in MEG42RS format into either fieldtrip or eeglab? Thanks, Claudia ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From enteka at HOTMAIL.COM Thu Jul 19 19:33:55 2007 From: enteka at HOTMAIL.COM (Nicolas Robitaille) Date: Thu, 19 Jul 2007 17:33:55 +0000 Subject: CTF MEG42RS format Message-ID: Hello When reading CTF MEG data into fieldtrip or eeglab via their included functions, there is a warning about the MEG42RS format, but usually the data are ok. Did you got further problem than this warning? Nicolas************************************ Nicolas Robitaille, candidat Ph.D Département de Psychologie Université de Montréal C.P. 6128, succursale Centre-ville Montréal, Québec H3C 3J7 Tel.: 514-343-6111 x2631 Fax: 514-343-5787 ************************************ > Date: Thu, 19 Jul 2007 17:59:06 +0200> From: ctesche at UNM.EDU> Subject: [FIELDTRIP] CTF MEG42RS format> To: FIELDTRIP at NIC.SURFNET.NL> > Hi All> > Does anyone know how to read CTF MEG data in MEG42RS format into either > fieldtrip or eeglab?> > Thanks,> > Claudia> > ----------------------------------> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. _________________________________________________________________ Soyez parmi les premiers à essayer Windows Live Mail. http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Thu Jul 19 21:23:32 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 19 Jul 2007 15:23:32 -0400 Subject: spatial clustering Message-ID: Hello, I am using clusterandanalysis to detect coherence differences and wonder how the spatial adjacency of sensors is determined. Am I right in understanding that given an MEG (e.g. Neuromag 306) since the exact layout is known, one can determine the nearest neighbours for each sensor simply by looking up the layout? So for example, if a squid 20.2 shows a significant effect, its nearest neighbours from the layout are 18.3, 22.4, 22.2, 23.1, 20.3, 20.4, 20.1. If I use cfg.minnbchan = 2, the clustering algorithm will look to see if atleast two of the neighbours given above also show a significant effect for a cluster to be determined. Is this what is implemented in clusterandanalysis? Thank you very much for your time, best, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From tomh at KURAGE.NIMH.NIH.GOV Thu Jul 19 23:49:22 2007 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd (NIH/NIMH) [E]) Date: Thu, 19 Jul 2007 17:49:22 -0400 Subject: CTF MEG42RS format In-Reply-To: Message-ID: Fieldtrip has code to read CTF MEG files. I use it all the time. Try it. It also reads the CTF multisphere models produced by localSpheres. Claudia Tesche wrote: > Hi All > > Does anyone know how to read CTF MEG data in MEG42RS format into either > fieldtrip or eeglab? > > Thanks, > > Claudia > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -- Tom Holroyd, Ph.D. "The fundamentally misconceived nature versus nurture debate should be abandoned: child development is inextricably both." -- Louann Brizendine ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Jul 23 16:16:08 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 23 Jul 2007 16:16:08 +0200 Subject: Mex File error during call to eeg_leadfield In-Reply-To: Message-ID: Hi Jared, On 17 Jul 2007, at 22:24, Jared Van Snellenberg wrote: > I'm working on a DICS beamformer analysis, and ran into a Mex file > error. > > Here's the MATLAB error (as you can see I have the most recent > versions of > MATLAB and FIELTRIP): > > ??? Invalid MEX-file 'C:\Program Files\MATLAB\R2007a > \fieldtrip-20070717 > \private\plgndr.dll': The specified procedure could not be found. The dll file itself is included in the FT version that you have. Which matlab version are you using, and on what windows platform (64 bit perhaps?). Please try recompiling the plgndr mex file using the attached code. 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/fcdonders/fieldtrip. -------------- next part -------------- A non-text attachment was scrubbed... Name: plgndr.c Type: application/octet-stream Size: 3154 bytes Desc: not available URL: -------------- next part -------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Jul 23 16:26:25 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 23 Jul 2007 16:26:25 +0200 Subject: 2 simple questions In-Reply-To: Message-ID: Dear Andres, On 17 Jul 2007, at 16:21, Andres Posada wrote: > I am doing the tutorial but I am blocked in two different places: > First, how I can prepocess (filter, baseline, etc) already saved > data? I use > manual artifact rejection and I save the data ('save > PreprocDataClean dataFIC'). Normally you would filter and baseline correct only once, and that is at the time of preprocessing. You cannot call the preprocessing function multiple times. > Now when I want to filter and baseline this data, I cannot access them > (variable in matlab or a matlab file) with the commands: > > cfg = []; > cfg.datafile = 'PreprocDataClean.mat'; (?) If you decide afterwards that you want to change your filter settings, you either should call preprocessing once more (with cfg.dataset=original_file). You can reuse the cleaned trial definition that results from rejectvisual as explained on http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:tutorial:rejectvisual and http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:tutorial:eventrelatedaveraging#preprocessing_ the_data A smart trich that you can use is that teh output data of each fieldtrip function will contain the "cfg" field. I.e. the rejectvisual function returns cleandata, with cleandata.cfg.trl representing the trials that are actually clean. So you can easily preprocess the clean segments of the data with other filter settings. Alternatively, you can apply filters and baselinecorrection once more when you call timelockanalysis. That function replicates most of the filtering options of preprocessing, except that you cannot use filter padding. In your case, you could do load PreprocDataClean cfg = []; cfg.blc = 'yes'; % apply baseline correction cfg.blcwindow = [-0.2 0]; % baseline: -0.2 sec to 0 cfg.lpfilter = 'yes'; % apply lowpass filter cfg.lpfreq = 35; % lowpass at 35 Hz. avgFIC = preprocessing(dataFIC); > The other problem, when I try to do the tutorial of beamforming, > with the > mri data of the subject01 (available online) there is a SPM bug! My > version > of Matlab is 7.0.1.24704 (R14) Service Pack 1 and I use SMP2 (last > update). > > The commands: > > mri = read_fcdc_mri('Subject01.mri'); > cfg = []; > cfg.name = 'segment'; > cfg.write = 'yes'; > cfg.coordinates = 'ctf'; > [segmentedmri] = volumesegment(cfg, mri); > > and the bug is: > ... > ??? Error using ==> spm_vol>subfunc1 > Can't get volume information for '/home/common/matlab/spm2/ > templates/T1.mnc' You have to specify the exact path of the template file, which in your case will not be on /home/common (as that is a network disk within the FCDC). 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Jul 23 16:29:38 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 23 Jul 2007 16:29:38 +0200 Subject: fd.dof matrix In-Reply-To: Message-ID: On 16 Jul 2007, at 17:36, Sameer Walawalkar wrote: > I have a question about calculating degrees of freedom. I get > (after freqdescriptives) > fd.dof = [46665x26 double]; > > However, dof = 2 x (Number of trials) x (number of tapers) and my > trials are of equal length and I use padding. So I think (and my > understanding could be wrong) this huge matrix is a waste of space > as the dofs are going to be the same for every pair on each trial. > How can I then ensure that freq.dof is just a number and can be > still used later on? The dof can be different if you have variable trial lengths'. That happens if you use partial artifact recection, or can also be the result of your trial function. That in combination with multitapers results in different dofs. There are only a few very specific instances where the dof is required, so usually you can throw it away without any consequences. 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/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Mon Jul 23 16:44:20 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 23 Jul 2007 16:44:20 +0200 Subject: eeglab2fieldtrip In-Reply-To: Message-ID: Hi Valesca On 13 Jul 2007, at 11:02, Valesca Kooijman wrote: > In connection with your previous advice concerning the > eeglab2fieldtrip script, we came accross the following problem and > solution (see script below): > ... > > I do still get the following warning after running the above script: > > Warning: writing segmented data as if it were continuous > In fieldtrip-20070710\private\write_brainvision_eeg at 38 > In fieldtrip-20070710\private\write_data at 63 > In write_fcdc_data at 48 > In ConversionEEGDATA at 13 > > Is this problematic or is this a standard warning following > conversion to Vision Analyzer? The warning relates to the problem that you indicated in your email further down (i.e. the data being assumed to be ntrials X nchans X nsamples). I.e. if your data is indeed ntrials X nchans X nsamples, then you don't have to worry. In your case, you should worry (see below). > In addition, I was wondering where my trial onset markers are > written to? Write_fcdc_data only generates a .eeg and a .hdr file, > and not a .vmrk file. They are not writen. You could manually write a vmrk file (they are ascii files). The format is like the snippet below Brain Vision Data Exchange Marker File, Version 1.0 [Common Infos] DataFile=pp01_pilot_load0_3s.seg [Marker Infos] ; Each entry: Mk=,,, ; , , ; ; Fields are delimited by commas, some fields might be omited (empty). ; Commas in type or description text are coded as "\1". Mk1=New Segment,,1,1,0,20050315114252667836 ... > From your earlier emails I understood that the datamatrix should be > converted to ntrials X nchans X nsamples before running > write_fcdc_data. Currently my datamatrix consists of nchans X > nsamples X ntrials. Would you mind letting me know how I can > convert my datamatrix? Thanks a lot. I just made a change to write_brainvision_eeg, please update to the latest FT release. In that function it still expects the data to be ntrials X nchans X nsamples, i.e. ntrl = size(dat,1); nchan = size(dat,2); nsmp = size(dat,3); You can use the matlab function permute (see "help permute") to swap the dimensions in EEG.data by permute(EEG.data, [3 1 2]). 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/fcdonders/fieldtrip. From jaredvs at GMAIL.COM Mon Jul 23 18:54:01 2007 From: jaredvs at GMAIL.COM (Jared Van Snellenberg) Date: Mon, 23 Jul 2007 12:54:01 -0400 Subject: Mex File error during call to eeg_leadfield In-Reply-To: <0722EDE3-E904-4A66-B9CB-B02281516864@fcdonders.ru.nl> Message-ID: Thanks Robert, that appears to have worked. I'm on a 32-bit windows machine, using r2007a. Does it perhaps matter that I'm on a dual-core processor? At any rate, 'mex plgndr.c' created plgndr.mexw32, which did not exist in the /private directory of the fieldtrip download, so perhaps it should be included? Thanks again, -Jared On 7/23/07, Robert Oostenveld wrote: > > Hi Jared, > > On 17 Jul 2007, at 22:24, Jared Van Snellenberg wrote: > > I'm working on a DICS beamformer analysis, and ran into a Mex file > > error. > > > > Here's the MATLAB error (as you can see I have the most recent > > versions of > > MATLAB and FIELTRIP): > > > > ??? Invalid MEX-file 'C:\Program Files\MATLAB\R2007a > > \fieldtrip-20070717 > > \private\plgndr.dll': The specified procedure could not be found. > > The dll file itself is included in the FT version that you have. > Which matlab version are you using, and on what windows platform (64 > bit perhaps?). Please try recompiling the plgndr mex file using the > attached code. > > 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/fcdonders/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. > > > -- Jared Van Snellenberg Social Cognitive Affective Neuroscience Unit http://scan.psych.columbia.edu (212) 854-7858 p (212) 854-3609 f Department of Psychology, Columbia University 406 Schermerhorn Hall 1190 Amsterdam Avenue, Mail Code 5501 New York, NY 10027 _______________________________ "Luck is the residue of design" -Attributed to Branch Rickey, former US Baseball Administrator, and also to John Milton. Go figure. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eolejarczyk at IBIB.WAW.PL Mon Jul 23 20:39:24 2007 From: eolejarczyk at IBIB.WAW.PL (Elzbieta Olejarczyk) Date: Mon, 23 Jul 2007 20:39:24 +0200 Subject: ASCII format Message-ID: I would like to use continuous data in Ascii format (Nchannels x Nsamples values). I have information about sampling frequency, moments of several events occured during EEG registration and channels montage (8 or 16 channels). Is it possible to use FieldTrip functions with such data? Elzbieta ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From weisz at LYON.INSERM.FR Wed Jul 25 13:22:42 2007 From: weisz at LYON.INSERM.FR (Nathan Weisz) Date: Wed, 25 Jul 2007 13:22:42 +0200 Subject: z-score Message-ID: hi, this question was asked before, but i couldn't find an answer in the archives. is there a special reason 'zscore' was canceled from freqbaseline-function? best, nathan -------------------------------- Dr. Nathan Weisz INSERM - Unité 821 Dynamique cérébrale et cognition Centre Hospitalier Le Vinatier, Bâtiment 452 95 Boulevard Pinel 69500 Bron, France Tel: ++33 - (0)4 - 7213 8915 Email: weisz at lyon.inserm.fr Chat-AV: nathanweisz at mac.com Homepage: http://web.mac.com/nathanweisz Neurotree: http://neurotree.org/neurotree/tree.php?pid=8692 Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Wed Jul 25 14:31:53 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 25 Jul 2007 14:31:53 +0200 Subject: Mex File error during call to eeg_leadfield In-Reply-To: <51d499680707230954m359e89efwf6cfdfd8d8c3fb18@mail.gmail.com> Message-ID: On 23 Jul 2007, at 18:54, Jared Van Snellenberg wrote: > Thanks Robert, that appears to have worked. I'm on a 32-bit windows > machine, using r2007a. Does it perhaps matter that I'm on a dual- > core processor? At any rate, 'mex plgndr.c' created plgndr.mexw32, > which did not exist in the /private directory of the fieldtrip > download, so perhaps it should be included? For older matlab versions, the mex files for windows had the extension *.dll. For later version (I don't know exactly from which version onward), they have the extensions mexw32 and mexw64 for 32 and 64 bit windows platforms respectively. Furthermore, mex files tend to be compatible over many matlab versions. It seems that our (old) mex files are not compatible any more with your (new) matlab version. I will modify the packaging and ftp release scripts so that the source code for all mex files (plus the associated c code) will also be included in the zip file. Then people are always able to recompile them for their specific platform. Robert PS See http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/ access/helpdesk/help/techdoc/matlab_external/f29502.html for the mex files and http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/ access/helpdesk/help/techdoc/rn/bq1zbsn.html for a general description of compatibility issues in matlab. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From r.oostenveld at FCDONDERS.RU.NL Wed Jul 25 14:34:57 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 25 Jul 2007 14:34:57 +0200 Subject: ASCII format In-Reply-To: <50220.87.205.80.79.1185215964.squirrel@mail.ibib.waw.pl> Message-ID: Dear Elzbieta On 23 Jul 2007, at 20:39, Elzbieta Olejarczyk wrote: > I would like to use continuous data in Ascii format (Nchannels x > Nsamples > values). I have information about sampling frequency, moments of > several > events occured during EEG registration and channels montage (8 or 16 > channels). > Is it possible to use FieldTrip functions with such data? That is described in the frequently asked questions, see http:// www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#how_can_i_import_m y_own_dataformat Probably the easiest approach for you would be to reformat that data within Matlab into a data structure that is compatible with FieldTrip, i.e. similar to the outpout of the preprocessing function. 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/fcdonders/fieldtrip. From andrew.smart at NYU.EDU Wed Jul 25 18:56:52 2007 From: andrew.smart at NYU.EDU (Andrew Smart) Date: Wed, 25 Jul 2007 18:56:52 +0200 Subject: spm2 question Message-ID: Hi, I am trying to plot beamforming data from CTF MEG onto a standard or generic MRI (since I don't have MRIs for the subjects). Using volumesegment for Subject01.mri I get this error: ??? Cant map image file. Error in ==> spm_smoothto8bit>smoothto8bit at 51 img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim (1:2),0); The read_fcdc_mri works to open Subject01.mri. I have also tried using single_subj_T1.mnc from SPM2 and the standard_mri from EEGLAB and get a similar error K>> spm_slice_vol(V(i),spm_matrix([0 0 p]),V(i).dim(1:2),0) ??? Cant open image file. Thanks! andy ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From c.nohn at UKE.DE Mon Jul 30 12:42:00 2007 From: c.nohn at UKE.DE (Claudia Nohn) Date: Mon, 30 Jul 2007 12:42:00 +0200 Subject: clusterrandanalysis actvsblT Message-ID: dear all, i have a questions about clusteranalysis comparing baseline and activation period. is it really impossible to compare two periods of different length? and why? as far as i understand the mean of the baseline is used and so you have only one value per frequency anyway. can i avoid this problem or do i have to divide my activation period into different segments because my baseline period is much shorter? thanks in advance claudia -- 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 From weisz at LYON.INSERM.FR Mon Jul 30 15:08:03 2007 From: weisz at LYON.INSERM.FR (Nathan Weisz) Date: Mon, 30 Jul 2007 15:08:03 +0200 Subject: problems using dics Message-ID: hi, i am trying to do sourceanalysis on spontaneous activity data, i.e. there is no baseline condition (such as a pre-stimulus period). tried the approach using the "NAI" as described in the tutorial (Localizing oscillatory sources using beamformer techniques). however there apparently are problems. see more below. data is 60 channel EEG, preprocessed in eeglab (ICA artefact correction + removal of bad data periods) and cut into non- overlapping "epochs" of 2 seconds. a fieldtrip structure was generated using eeglab2fieldtrip. >> data data = label: {1x60 cell} fsample: 250 elec: [1x1 struct] trial: {1x138 cell} time: {1x138 cell} cfg: [1x1 struct] then estimate power with freqanalysis: cfg=[]; cfg.method='mtmfft'; cfg.output='powandcsd'; cfg.foilim=[12 18]; cfg.tapsmofrq=1.5; freq4dics=freqanalysis(cfg,data); >> freq4dics freq4dics = label: {1x60 cell} dimord: 'chan_freq' freq: [12 12.5000 13 13.5000 14 14.5000 15 15.5000 16 16.5000 17 17.5000 18] powspctrm: [60x13 double] labelcmb: {1770x2 cell} crsspctrm: [1770x13 double] elec: [1x1 struct] cfg: [1x1 struct] so far so good. now i'd like to do some sourceanalysis. cfg=[]; cfg.method='dics'; cfg.grid=grid; cfg.vol=vol; %use of the standard BEM model cfg.lambda =[]; cfg.frequency=15; cfg.projectnoise='yes'; cfg.elec=newelec;%electrode positions adapted to BEM released on FT- FTP (in standard_BEM) alphaS=sourceanalysis(cfg,freq4dics); the problem here is that the noise is set to 0. while executing the code this warning message appears: Warning: cross-spectral density matrix is rank deficient > In beamformer_dics at 161 In sourceanalysis at 855 a look at the code shows that in this case that the noise is set to lambda (empty and set to 0 per default). I then tried different lamdas but as results varied quite a lot I have an uneasy feeling doing it this way. question: is there something apparently wrong with the configs that leads to the problem of not being able to make a noise estimate from the CSD? cheers, nathan -------------------------------- Dr. Nathan Weisz INSERM - Unité 821 Dynamique cérébrale et cognition Centre Hospitalier Le Vinatier, Bâtiment 452 95 Boulevard Pinel 69500 Bron, France Tel: ++33 - (0)4 - 7213 8915 Email: weisz at lyon.inserm.fr Chat-AV: nathanweisz at mac.com Homepage: http://web.mac.com/nathanweisz Neurotree: http://neurotree.org/neurotree/tree.php?pid=8692 Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.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/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maris at NICI.RU.NL Mon Jul 30 22:49:43 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Mon, 30 Jul 2007 22:49:43 +0200 Subject: clusterrandanalysis actvsblT In-Reply-To: <46ADC078.6010209@uke.de> Message-ID: Dear Claudia, > i have a questions about clusteranalysis comparing baseline and > activation period. is it really impossible to compare two periods of > different length? and why? as far as i understand the mean of the > baseline is used and so you have only one value per frequency anyway. > can i avoid this problem or do i have to divide my activation period > into different segments because my baseline period is much shorter? You are one of many to complain about this feature of clusterrandanalysis. Nevertheless, you do have to divide your activation period into different segments. The reason for this has to do with the null hypothesis that is tested when you use the activation-versus-baseline statistic. This null hypothesis is the following: The data in the baseline period are drawn from the same probability distribution (over the spatiotemporal domain) as the data in the activation period. This null hypothesis only makes sense if the spatiotemporal dimensionality of the activation and the baseline period are equal. Kind regards, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > thanks in advance > claudia > > > -- > 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/fcdonders/fieldtrip. From abastos at BERKELEY.EDU Mon Jul 30 23:56:00 2007 From: abastos at BERKELEY.EDU (Andre Bastos) Date: Mon, 30 Jul 2007 14:56:00 -0700 Subject: clusterrandanalysis actvsblT In-Reply-To: <005d01c7d2eb$2836dc60$6701a8c0@fcdonders.nl> Message-ID: On a related note, I would like to ask about the clusterrandanalysis option to set avgovertime = 'yes' In this case, as far as I am aware, the frequency-space-time-trial quadlets which clusterrand analysis uses become doublets of frequency-space. In this case, wouldn't it be possible to compare data periods of different lengths, as clusterrandanalysis would just average across your baseline period as set 1 and average across the activation period as set 2? Does the distribution of activation over time get factored in to the clusterrandanalysis function even when avgovertime is set to 'yes'? Thanks, -Andre -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Eric Maris Sent: Monday, July 30, 2007 1:50 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandanalysis actvsblT Dear Claudia, > i have a questions about clusteranalysis comparing baseline and > activation period. is it really impossible to compare two periods of > different length? and why? as far as i understand the mean of the > baseline is used and so you have only one value per frequency anyway. > can i avoid this problem or do i have to divide my activation period > into different segments because my baseline period is much shorter? You are one of many to complain about this feature of clusterrandanalysis. Nevertheless, you do have to divide your activation period into different segments. The reason for this has to do with the null hypothesis that is tested when you use the activation-versus-baseline statistic. This null hypothesis is the following: The data in the baseline period are drawn from the same probability distribution (over the spatiotemporal domain) as the data in the activation period. This null hypothesis only makes sense if the spatiotemporal dimensionality of the activation and the baseline period are equal. Kind regards, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > thanks in advance > claudia > > > -- > 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/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Tue Jul 31 00:42:07 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Tue, 31 Jul 2007 00:42:07 +0200 Subject: clusterrandanalysis actvsblT In-Reply-To: <000301c7d2f4$6bebd7e0$43c387a0$@edu> Message-ID: Dear Andre, > On a related note, I would like to ask about the clusterrandanalysis option > to set avgovertime = 'yes' > > In this case, as far as I am aware, the frequency-space-time-trial quadlets > which clusterrand analysis uses become doublets of frequency-space. In this > case, wouldn't it be possible to compare data periods of different lengths, > as clusterrandanalysis would just average across your baseline period as set > 1 and average across the activation period as set 2? > > Does the distribution of activation over time get factored in to the > clusterrandanalysis function even when avgovertime is set to 'yes'? If you try to do this, you should get an error message. Have a try, and if you don't get an error message let me know. Anyhow, even without an error message, the p-value that you get out of clusterrandanalysis only makes sense if the baseline and activation periods are of equal length. Good luck, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > Thanks, > > -Andre > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Eric Maris > Sent: Monday, July 30, 2007 1:50 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] clusterrandanalysis actvsblT > > Dear Claudia, > > > > > i have a questions about clusteranalysis comparing baseline and > > activation period. is it really impossible to compare two periods of > > different length? and why? as far as i understand the mean of the > > baseline is used and so you have only one value per frequency anyway. > > can i avoid this problem or do i have to divide my activation period > > into different segments because my baseline period is much shorter? > > > You are one of many to complain about this feature of clusterrandanalysis. > Nevertheless, you do have to divide your activation period into different > segments. The reason for this has to do with the null hypothesis that is > tested when you use the activation-versus-baseline statistic. This null > hypothesis is the following: The data in the baseline period are drawn from > the same probability distribution (over the spatiotemporal domain) as the > data in the activation period. This null hypothesis only makes sense if the > spatiotemporal dimensionality of the activation and the baseline period are > equal. > > > Kind regards, > > Eric Maris > > > > > > > > > dr. Eric Maris > > NICI/Biological Psychology and > > F.C. Donders Center for Cognitive NeuroImaging > > University of Nijmegen > > P.O. Box 9104 > > 6500 HE Nijmegen > > The Netherlands > > T:+31 24 3612651 (NICI) > > T:+31 24 3610754 (FCDC) > > F:+31 24 3616066 (NICI) > > E: maris at nici.ru.nl > > MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > > > > > thanks in advance > > claudia > > > > > > -- > > 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/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From abastos at BERKELEY.EDU Tue Jul 31 02:44:10 2007 From: abastos at BERKELEY.EDU (Andre Bastos) Date: Mon, 30 Jul 2007 17:44:10 -0700 Subject: clusterrandanalysis actvsblT In-Reply-To: <009301c7d2fa$dc046140$6701a8c0@fcdonders.nl> Message-ID: Eric, Yes, I understand about the pvalues not working for comparing within a trial (from baseline to activation). But what about comparing across different periods of time, using independent samples? Is it okay to set avgovertime = 'yes' then? For example, I am comparing two conditions in a ssvep paradigm: attend left and attend right, for one subject. I am not quite sure what I am doing wrong, as I am sure that there are differences between these two conditions, although the clusters that I get are all insignificant. In this case, when the subject attends left they attend to 7.5 Hz, and when they attend right they attend to 10 Hz flicker stimulus. I am expecting that these frequencies, as well as higher harmonics will be sensitive to attention (as previously reported in the ssvep lit). However, my clusters all have p values above 0.2. I tried this with avgovertime set to both yes and no, and still no sig clusters. Why are the insignificant clusters even returned at all, especially when there is a parameter value for determining significant clusters, alphathresh, which is set in the cfg but never used? I know that other people have had the same issue before... Thanks again, Andre Here is my config (I am using just the 29 parietal and occipital electrodes for this analysis). elec.pnt = elec.pnt(1:29,:); elec.label = elec.label(1:29,:); cfg=[]; cfg.statistic = 'indepsamplesT'; cfg.alphathresh = 0.05; cfg.makeclusters = 'yes'; cfg.minnbchan = 2; cfg.clusterteststat = 'maxsum'; cfg.onetwo = 'twosided'; cfg.alpha = 0.05; cfg.nranddraws = 500; cfg.channel = 'all'; %TFR(1).elec.label(1:64); %{'EEG'}; cfg.latency = [1 5 ]; cfg.elec = elec; cfg.neighbourdist = 49; cfg.avgovertime = 'no'; [clusrand] = clusterrandanalysis(cfg, TFR1, TFR2); -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Eric Maris Sent: Monday, July 30, 2007 3:42 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandanalysis actvsblT Dear Andre, > On a related note, I would like to ask about the clusterrandanalysis option > to set avgovertime = 'yes' > > In this case, as far as I am aware, the frequency-space-time-trial quadlets > which clusterrand analysis uses become doublets of frequency-space. In this > case, wouldn't it be possible to compare data periods of different lengths, > as clusterrandanalysis would just average across your baseline period as set > 1 and average across the activation period as set 2? > > Does the distribution of activation over time get factored in to the > clusterrandanalysis function even when avgovertime is set to 'yes'? If you try to do this, you should get an error message. Have a try, and if you don't get an error message let me know. Anyhow, even without an error message, the p-value that you get out of clusterrandanalysis only makes sense if the baseline and activation periods are of equal length. Good luck, Eric Maris dr. Eric Maris NICI/Biological Psychology and F.C. Donders Center for Cognitive NeuroImaging University of Nijmegen P.O. Box 9104 6500 HE Nijmegen The Netherlands T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) F:+31 24 3616066 (NICI) E: maris at nici.ru.nl MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > Thanks, > > -Andre > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Eric Maris > Sent: Monday, July 30, 2007 1:50 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] clusterrandanalysis actvsblT > > Dear Claudia, > > > > > i have a questions about clusteranalysis comparing baseline and > > activation period. is it really impossible to compare two periods of > > different length? and why? as far as i understand the mean of the > > baseline is used and so you have only one value per frequency anyway. > > can i avoid this problem or do i have to divide my activation period > > into different segments because my baseline period is much shorter? > > > You are one of many to complain about this feature of clusterrandanalysis. > Nevertheless, you do have to divide your activation period into different > segments. The reason for this has to do with the null hypothesis that is > tested when you use the activation-versus-baseline statistic. This null > hypothesis is the following: The data in the baseline period are drawn from > the same probability distribution (over the spatiotemporal domain) as the > data in the activation period. This null hypothesis only makes sense if the > spatiotemporal dimensionality of the activation and the baseline period are > equal. > > > Kind regards, > > Eric Maris > > > > > > > > > dr. Eric Maris > > NICI/Biological Psychology and > > F.C. Donders Center for Cognitive NeuroImaging > > University of Nijmegen > > P.O. Box 9104 > > 6500 HE Nijmegen > > The Netherlands > > T:+31 24 3612651 (NICI) > > T:+31 24 3610754 (FCDC) > > F:+31 24 3616066 (NICI) > > E: maris at nici.ru.nl > > MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > > > > > thanks in advance > > claudia > > > > > > -- > > 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/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From maris at NICI.RU.NL Tue Jul 31 17:57:53 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Tue, 31 Jul 2007 17:57:53 +0200 Subject: clusterrandanalysis actvsblT In-Reply-To: <002001c7d30b$eb341af0$c19c50d0$@edu> Message-ID: Dear Andre, > Yes, I understand about the pvalues not working for comparing within a trial > (from baseline to activation). But what about comparing across different > periods of time, using independent samples? Is it okay to set avgovertime = > 'yes' then? As long as you average over periods of time of equal length (in different experimental conditions), it is okay. > > For example, I am comparing two conditions in a ssvep paradigm: attend left > and attend right, for one subject. I am not quite sure what I am doing > wrong, as I am sure that there are differences between these two conditions, > although the clusters that I get are all insignificant. > > In this case, when the subject attends left they attend to 7.5 Hz, and when > they attend right they attend to 10 Hz flicker stimulus. I am expecting that > these frequencies, as well as higher harmonics will be sensitive to > attention (as previously reported in the ssvep lit). However, my clusters > all have p values above 0.2. I tried this with avgovertime set to both yes > and no, and still no sig clusters. > > Why are the insignificant clusters even returned at all, especially when > there is a parameter value for determining significant clusters, > alphathresh, which is set in the cfg but never used? I know that other > people have had the same issue before... It is a misunderstanding that cfg.alphathresh is never used. It is used to define the clusters. If you change the value of cfg.alphathresh you get different clusters. Be aware that cfg.alphathresh must be chosen independent of the data if you want to control the FA rate. Kind regards, Eric Maris > > Thanks again, > > Andre > > Here is my config (I am using just the 29 parietal and occipital electrodes > for this analysis). > > elec.pnt = elec.pnt(1:29,:); > elec.label = elec.label(1:29,:); > > cfg=[]; > cfg.statistic = 'indepsamplesT'; > cfg.alphathresh = 0.05; > cfg.makeclusters = 'yes'; > cfg.minnbchan = 2; > cfg.clusterteststat = 'maxsum'; > cfg.onetwo = 'twosided'; > cfg.alpha = 0.05; > cfg.nranddraws = 500; > cfg.channel = 'all'; %TFR(1).elec.label(1:64); %{'EEG'}; > cfg.latency = [1 5 ]; > cfg.elec = elec; > cfg.neighbourdist = 49; > cfg.avgovertime = 'no'; > > [clusrand] = clusterrandanalysis(cfg, TFR1, TFR2); > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Eric Maris > Sent: Monday, July 30, 2007 3:42 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] clusterrandanalysis actvsblT > > Dear Andre, > > > On a related note, I would like to ask about the clusterrandanalysis > option > > to set avgovertime = 'yes' > > > > In this case, as far as I am aware, the frequency-space-time-trial > quadlets > > which clusterrand analysis uses become doublets of frequency-space. In > this > > case, wouldn't it be possible to compare data periods of different > lengths, > > as clusterrandanalysis would just average across your baseline period as > set > > 1 and average across the activation period as set 2? > > > > Does the distribution of activation over time get factored in to the > > clusterrandanalysis function even when avgovertime is set to 'yes'? > > > If you try to do this, you should get an error message. Have a try, and if > you don't get an error message let me know. Anyhow, even without an error > message, the p-value that you get out of clusterrandanalysis only makes > sense if the baseline and activation periods are of equal length. > > > Good luck, > > Eric Maris > > > > dr. Eric Maris > > NICI/Biological Psychology and > > F.C. Donders Center for Cognitive NeuroImaging > > University of Nijmegen > > P.O. Box 9104 > > 6500 HE Nijmegen > > The Netherlands > > T:+31 24 3612651 (NICI) > > T:+31 24 3610754 (FCDC) > > F:+31 24 3616066 (NICI) > > E: maris at nici.ru.nl > > MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > > > > > > > > > > Thanks, > > > > -Andre > > > > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf > > Of Eric Maris > > Sent: Monday, July 30, 2007 1:50 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: Re: [FIELDTRIP] clusterrandanalysis actvsblT > > > > Dear Claudia, > > > > > > > > > i have a questions about clusteranalysis comparing baseline and > > > activation period. is it really impossible to compare two periods of > > > different length? and why? as far as i understand the mean of the > > > baseline is used and so you have only one value per frequency anyway. > > > can i avoid this problem or do i have to divide my activation period > > > into different segments because my baseline period is much shorter? > > > > > > You are one of many to complain about this feature of clusterrandanalysis. > > Nevertheless, you do have to divide your activation period into different > > segments. The reason for this has to do with the null hypothesis that is > > tested when you use the activation-versus-baseline statistic. This null > > hypothesis is the following: The data in the baseline period are drawn > from > > the same probability distribution (over the spatiotemporal domain) as the > > data in the activation period. This null hypothesis only makes sense if > the > > spatiotemporal dimensionality of the activation and the baseline period > are > > equal. > > > > > > Kind regards, > > > > Eric Maris > > > > > > > > > > > > > > > > > > dr. Eric Maris > > > > NICI/Biological Psychology and > > > > F.C. Donders Center for Cognitive NeuroImaging > > > > University of Nijmegen > > > > P.O. Box 9104 > > > > 6500 HE Nijmegen > > > > The Netherlands > > > > T:+31 24 3612651 (NICI) > > > > T:+31 24 3610754 (FCDC) > > > > F:+31 24 3616066 (NICI) > > > > E: maris at nici.ru.nl > > > > MSc Cognitive Neuroscience :www.ru.nl/master/cns/ > > > > > > > > > > > thanks in advance > > > claudia > > > > > > > > > -- > > > 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/fcdonders/fieldtrip. > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > FieldTrip > > toolbox, to share experiences and to discuss new ideas for MEG and EEG > analysis. > > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > > http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip.