From muthuraman10 at HOTMAIL.COM Fri Jun 1 11:06:44 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Fri, 1 Jun 2007 09:06:44 +0000 Subject: wavelet analysis! Message-ID: Hello Fieldtrippers, In the wavelet analysis, when calculating the coherence between a EEG and a EMG electrode the values are all 500, for this configuration. When using the multiatper analysis i get the correct values. cfg=[]; cfg.output='powandcsd'; cfg.method='wltconvol'; cfg.channel = channelselection({'all'}, data1.label); cfg.channelcmb = channelcombination({'C3','M2'}, data1.label); cfg.foi=2:1:20; numfoi=length(cfg.foi); cfg.t_ftimwin=ones(1,numfoi); cfg.t_ftimwin(:)=10; cfg.toi=5:0.05:145; cfg.width = 7; cfg.gwidth = 3; cfg.pad=150; cfg.keeptrials='no'; TFRmult=freqanalysis(cfg,data1); cfg.keeptrials='yes'; fdmtmfft=freqdescriptives(cfg,TFRmult); Is there something more needed to be in the wavelet analysis configuration, data length is 150000. Thanking you With regards M.Muthuraman. _________________________________________________________________ Fly Chn-Blr for Rs.249 only. Log on to MakeMyTrip now! http://ss1.richmedia.in/recurl.asp?pid=50 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri Jun 1 17:47:58 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 1 Jun 2007 17:47:58 +0200 Subject: matlab crash after sourceanalysis with correctm = 'cluster' Message-ID: Hi I'm doing sourceanalysis with the following settings: cfg = []; cfg.parameter = 'stat'; cfg.method = 'montecarlo'; cfg.statistic = 'pooledT' ; cfg.numrandomization = 1000; cfg.correctm = 'cluster'; cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; cfg.uvar = 2; cfg.clustercritval = [-1.96 1.96]; %because Z-values GA_source_norm_cl = sourcestatistics(cfg,source_norm{1:Nsub},pseudosource_norm{1:Nsub}); Everything goes well, but after the 1000 randomizations matlab crashes, also on the 16 GB WM mentats. I think it's caused by the multiple comparison correction 'cluster', because without that I doesn't crash (when cfg.correctm = 'no' or fi 'max' does work). Does anyone have any suggestions on how to solve this? I've attached the crashdump. Thanks, Ingrid ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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: matlab_crash_dump.14208 Type: application/octet-stream Size: 17557 bytes Desc: not available URL: From sameer at ANDREW.CMU.EDU Fri Jun 1 21:13:53 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 1 Jun 2007 15:13:53 -0400 Subject: nonparamteric statistical tests for coherence differences Message-ID: Hello, I am looking for Wiki entry or tutorial for doing nonparamteric statistical tests for coherence differences (both within trial and between trials). What I can get is http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:statistics#3_permutation_tests_for_time-frequency_representations which describes how to do the same for TFRs. I am thinking of attempting using basically the same set of commands, but substituting the correct procedure for calculating coherences etc in the steps shown is section 3. will that be proper? thanks for your help. 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 Fri Jun 1 23:17:37 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Fri, 1 Jun 2007 23:17:37 +0200 Subject: nonparamteric statistical tests for coherence differences In-Reply-To: Message-ID: Hi Sameer, > I am looking for Wiki entry or tutorial for doing nonparamteric > statistical tests for coherence differences (both within trial and > between trials). At this moment, only coherence testing between trials is implemented. > > What I can get is > http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu tori > al:statistics#3_permutation_tests_for_time-frequency_representations > which describes how to do the same for TFRs. > > I am thinking of attempting using basically the same set of commands, but > substituting the correct procedure for calculating coherences etc in the > steps shown is section 3. will that be proper? I don't know. Just have a try. My expectation is that copy-pasting will not be sufficient to get it running. On the other hand, I used the Fieldtrip-code for all the analyses on which is reported in our JNM-paper on coherence difference testing. I am aware of the fact that the tutorial could be improved with respect to the testing of coherence differences. Good luck, 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 for your help. > > 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 Jan.Schoffelen at FCDONDERS.RU.NL Sun Jun 3 16:37:53 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Sun, 3 Jun 2007 16:37:53 +0200 Subject: matlab crash after sourceanalysis with correctm = 'cluster' In-Reply-To: Message-ID: Hi Ingrid, Do you perhaps have very big functional volumes and many subjects? Typically, I downsample my volumes back to about my original grid-dimensions, after spatially smoothing the individual volumes. Normally, memory problems could occur when applying a nonparametric cluster threshold, but as far as I know, this is the default option. This therefore should not cause the problem (however it's worth checking in the code, or specifying cfg.clusterthreshold = 'parametric', of cours along with one of my favourite configuration-fields cfg.critval). Yours, Jan-M -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Ingrid Nieuwenhuis Sent: Friday, June 01, 2007 5:48 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] matlab crash after sourceanalysis with correctm = 'cluster' Hi I'm doing sourceanalysis with the following settings: cfg = []; cfg.parameter = 'stat'; cfg.method = 'montecarlo'; cfg.statistic = 'pooledT' ; cfg.numrandomization = 1000; cfg.correctm = 'cluster'; cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; cfg.uvar = 2; cfg.clustercritval = [-1.96 1.96]; %because Z-values GA_source_norm_cl = sourcestatistics(cfg,source_norm{1:Nsub},pseudosource_norm{1:Nsub}); Everything goes well, but after the 1000 randomizations matlab crashes, also on the 16 GB WM mentats. I think it's caused by the multiple comparison correction 'cluster', because without that I doesn't crash (when cfg.correctm = 'no' or fi 'max' does work). Does anyone have any suggestions on how to solve this? I've attached the crashdump. Thanks, Ingrid ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Brian.Roach at YALE.EDU Tue Jun 5 19:39:22 2007 From: Brian.Roach at YALE.EDU (Brian Roach) Date: Tue, 5 Jun 2007 13:39:22 -0400 Subject: Research Assistant Position at Yale University Message-ID: FieldTrip users, We are looking for recent graduates or experienced brain imagers wanting to work in our lab for at least one year before going on to graduate school. Please reply to: daniel.mathalon at yale.edu or judith.ford at yale.edu Research Assistant Needed for Multimodal Brain Imaging in Psychopathology The Clinical and Cognitive Neuroscience Laboratory at Yale University is looking for a research assistant to help with our multi-modal brain imaging studies of schizophrenia using fMRI and EEG/ERP data. Applicants should have a Bachelor's degree from an accredited 4-year university with experience relevant to the position. The assistant will acquire EEG data with ActiveView2 (Biosemi) and Neuroscan (Synamps). Familiarity with software such as E-Prime, STIM, or Presentation is desirable. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Tue Jun 5 20:52:13 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 5 Jun 2007 14:52:13 -0400 Subject: plotting phase lock values w.r.t. a reference channel. Message-ID: Hello, Is there a simple modification of fieldtrip plotting functions (topoplot etc) which can be used to plot phase lock values (plvspctrm)? thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Jan.Schoffelen at FCDONDERS.RU.NL Tue Jun 5 21:00:44 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Tue, 5 Jun 2007 21:00:44 +0200 Subject: plotting phase lock values w.r.t. a reference channel. In-Reply-To: Message-ID: Dear Sameer, I guess the easiest way of solving this, is to do: freq.cohspctrm = freq.plvspctrm and then proceed as if you are dealing with coherence-spectra. (don't forget to specify cfg.cohrefchannel). Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Tuesday, June 05, 2007 8:52 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] plotting phase lock values w.r.t. a reference channel. Hello, Is there a simple modification of fieldtrip plotting functions (topoplot etc) which can be used to plot phase lock values (plvspctrm)? thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Jun 5 21:07:27 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 5 Jun 2007 21:07:27 +0200 Subject: plotting phase lock values w.r.t. a reference channel. In-Reply-To: Message-ID: Hi Sameer, I think that it should be already possible to plot it with the functions as they are. If you specify cfg.zparam = 'plvspctrm', you also manually have to specify the xparam and in case of 3D data also the yparam. Did you already try this? And if it didn't work what error did you get? Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Tuesday, June 05, 2007 8:52 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] plotting phase lock values w.r.t. a reference channel. Hello, Is there a simple modification of fieldtrip plotting functions (topoplot etc) which can be used to plot phase lock values (plvspctrm)? thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Tue Jun 5 21:23:05 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 5 Jun 2007 15:23:05 -0400 Subject: plotting phase lock values w.r.t. a reference channel. In-Reply-To: <003b01c7a7a4$c1f80300$642dae83@fcdonders.nl> Message-ID: Thanks Jan-Mathijs and Ingrid, Using cfg.zparam = 'plvspctrm' was returning error essentially implying that it did not recognize this zparam. But I must have been using some wrong dataset as I just tried it to reproduce the error and it worked. Unfortuanely, it seems that the PLV is always 1?!! I expect it should be between [0 2pi] or [-pi pi]. Must look into it now. sameer On Tue, 5 Jun 2007, Ingrid Nieuwenhuis wrote: > Hi Sameer, > > I think that it should be already possible to plot it with the functions as > they are. If you specify cfg.zparam = 'plvspctrm', you also manually have to > specify the xparam and in case of 3D data also the yparam. > Did you already try this? And if it didn't work what error did you get? > > Hope this helps, > Ingrid > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Sameer Walawalkar > Sent: Tuesday, June 05, 2007 8:52 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] plotting phase lock values w.r.t. a reference channel. > > Hello, > > Is there a simple modification of fieldtrip plotting functions (topoplot > etc) which can be used to plot phase lock values (plvspctrm)? > > thanks, > sameer > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Wed Jun 6 22:59:54 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Wed, 6 Jun 2007 16:59:54 -0400 Subject: phase locking value always 1 Message-ID: Hello, I use the following setup to calculate PLVs: cfg = []; cfg.ouput='powandcsd'; cfg.method='mtmfft'; cfg.keeptrials='no'; cfg.tapsmofrq=4; cfg.foilim =[05 120]; cfg.channel = 'MEG' ; cfg.channelcmb = {'MEG' 'MEG'}; cfg.pad = 2.00 ; freq_LL_Two_pre = freqanalysis(cfg,dataLL_Two_pre); cfg = []; cfg.cohmethod = 'plv'; Phase_neg2_neg1_LL_Two_pre = freqdescriptives(cfg, freq_LL_Two_pre) The PLVs I get are uniformly 1.000. I am not sure what's going on. the coherence spectra from cfg.cohmethod = 'coh' are just fine. thanks, sameer p.s: On a side note, for coherences, if I use cfg.complex = 'angle': the phase differences I get seem to be distributed from [-2pi 2pi] rather than [-pi pi] or [0 2pi] (I have not used [] strictly in mathematical sense). How do I understand this? ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Jan.Schoffelen at FCDONDERS.RU.NL Thu Jun 7 10:02:25 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Thu, 7 Jun 2007 10:02:25 +0200 Subject: phase locking value always 1 In-Reply-To: Message-ID: Dear Sameer, cfg.keeptrials = 'no' is strictly forbidden when you want to compute the plv! The reason for this comes from the mathematics behind it: For the computation of the plv, each observation has to be normalised by its amplitude prior to averaging across all observations. The normalisation step is implemented in freqdescriptives, therefore it needs an input which still contains the single trials. I leave it as a quiz for the interested reader to reason why actually the plv becomes 1, when you only have a 'single' (that is: averaged) observation. Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Wednesday, June 06, 2007 11:00 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] phase locking value always 1 Hello, I use the following setup to calculate PLVs: cfg = []; cfg.ouput='powandcsd'; cfg.method='mtmfft'; cfg.keeptrials='no'; cfg.tapsmofrq=4; cfg.foilim =[05 120]; cfg.channel = 'MEG' ; cfg.channelcmb = {'MEG' 'MEG'}; cfg.pad = 2.00 ; freq_LL_Two_pre = freqanalysis(cfg,dataLL_Two_pre); cfg = []; cfg.cohmethod = 'plv'; Phase_neg2_neg1_LL_Two_pre = freqdescriptives(cfg, freq_LL_Two_pre) The PLVs I get are uniformly 1.000. I am not sure what's going on. the coherence spectra from cfg.cohmethod = 'coh' are just fine. thanks, sameer p.s: On a side note, for coherences, if I use cfg.complex = 'angle': the phase differences I get seem to be distributed from [-2pi 2pi] rather than [-pi pi] or [0 2pi] (I have not used [] strictly in mathematical sense). How do I understand this? ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marie at PSY.GLA.AC.UK Thu Jun 7 17:37:31 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Thu, 7 Jun 2007 16:37:31 +0100 Subject: RA job advertisement - CCNi Glasgow Message-ID: UNIVERSITY of GLASGOW DEPARTMENT OF PSYCHOLOGY Centre for Cognitive Neuroimaging (CCNi) RESEARCH ASSISTANT 3 year fixed term appointment, £23,692 - £26,666 or £29,139 - £32,796 per annum (depending on experience) REF: 13355/DPO/A3 Applications are invited for a Postdoctoral Research Assistant to work with Professor Philippe Schyns, Dr. Nial Friel (Dept of Statistics) and Dr Marie Smith in the newly established Centre for Cognitive Neuroimaging (CCNi) on a project entitled “Adaptive Sampling Algorithms for Cognitive Neuroscience Applications Using Bubbles”. 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 overall aim of the project is to develop new methods to interpret behavioural and brain signals (EEG, MEG and fMRI) with online sampling of image information. Using adaptive sampling algorithms, we will seek to circumscribe the stimulus information that optimises a particular brain response. Developments of adaptive sampling will include Hidden Markov modelling placed within a statistical decision framework. You will also have the opportunity to contribute to the development of a user-friendly, MatLab based toolbox to make these algorithms publicly available to our growing user base. You will be qualified, with a PhD, or equivalent, in Statistics or Mathematics or a closely related discipline. Advanced skills in statistical pattern recognition and/or machine learning and/or Bayesian methods are essential. Strong programming skills (Matlab, C or related) are also highly desirable. Finally, you should have a strong interest in developing your own scientific program and pursuing a research career. This post is available from 1 Aug 2007. Informal enquiries may be made to Professor P. Schyns, (+44 (0)141 330 4937; p.schyns at psy.gla.ac.uk), Dr Nial Friel (+44 (0) 141 4047 ; nial at stats.gla.ac.uk) or Dr Marie Smith (+44 (0)141 330 3987; m.smith at psy.gla.ac.uk). For further details on the department, please see our website at: http://www.ccni.gla.ac.uk/ For an application pack, please see our website at http:// www.gla.ac.uk/ or write quoting the appropriate reference number 13355/DPO/A3 to the Recruitment Section, Human Resources Department, University of Glasgow, Glasgow G12 8QQ. Closing date: 6th July 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 sameer at ANDREW.CMU.EDU Thu Jun 7 22:11:56 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 7 Jun 2007 16:11:56 -0400 Subject: cannot convert gradiometer definition back to axial, please contact Robert Message-ID: Hello Robert, I have been playing around with http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:statistics#3_permutation_tests_for_time-frequency_representations in an attempt implement non-paramteric statistical testing of coherence diferences between trials. My screen currently reads: the input is freq data with 612 channels, 18 frequencybins and 11 timebins Warning: trying to convert planar to axial gradiometers, this is experimental > In combineplanar at 280 In Auto_nonparametric_coh at 47 ??? Error using ==> combineplanar at 308 cannot convert gradiometer definition back to axial, please contact Robert Error in ==> Auto_nonparametric_coh at 47 TFR_LL_000_500_planar_cmb = combineplanar(cfg, TFR_LL_000_500_planar); So, I am getting in touch with Robert Oostenveld. 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 sameer at ANDREW.CMU.EDU Fri Jun 8 22:31:43 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 8 Jun 2007 16:31:43 -0400 Subject: channel combinations for coherene Message-ID: Hello, how can I specify cfg.channelcmb for freqanalysis_mtmfft such that it only does planar-planar combinations or mag-mag combinations? thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Sat Jun 9 10:20:59 2007 From: jan.schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Sat, 9 Jun 2007 10:20:59 +0200 Subject: channel combinations for coherene Message-ID: Dear Sameer, I am not sure whether I understood your question correctly, but couldn't you just specify: cfg.channelcmb = {'MEG' 'MEG'} ? JM ----- Original Message ----- From: Sameer Walawalkar Date: Friday, June 8, 2007 10:31 pm Subject: [FIELDTRIP] channel combinations for coherene > Hello, > > how can I specify cfg.channelcmb for freqanalysis_mtmfft such that > it only > does planar-planar combinations or mag-mag combinations? > > thanks, > sameer > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Sun Jun 10 19:58:25 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Sun, 10 Jun 2007 13:58:25 -0400 Subject: channel combinations for coherene In-Reply-To: Message-ID: Dear Jan, {'MEG' 'MEG'} is too many channel combinations. I later run into memory problems (I am trying to get Phase Lock Value and freqanalysis_mtmfft needs a matrix of dimensions [number of trials X number of channel combinations X number of frequency points]). So I am trying to do only gradiometers with gradiometers and mags with mags (though I think even that needs too much memory while computing phase lock values). thanks, sameer On Sat, 9 Jun 2007, Jan Mathijs Schoffelen wrote: > Dear Sameer, > > I am not sure whether I understood your question correctly, but couldn't you just specify: > > cfg.channelcmb = {'MEG' 'MEG'} ? > > JM > > ----- Original Message ----- > From: Sameer Walawalkar > Date: Friday, June 8, 2007 10:31 pm > Subject: [FIELDTRIP] channel combinations for coherene > >> Hello, >> >> how can I specify cfg.channelcmb for freqanalysis_mtmfft such that >> it only >> does planar-planar combinations or mag-mag combinations? >> >> thanks, >> sameer >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/fcdonders/fieldtrip. >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Mon Jun 11 10:37:06 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 11 Jun 2007 10:37:06 +0200 Subject: channel combinations for coherene In-Reply-To: Message-ID: Hi Sameer, You can just specify channel combinations by hand as a two-column cell array only for the channels you want, see the help of the function channelcombination.m Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Sunday, June 10, 2007 7:58 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] channel combinations for coherene Dear Jan, {'MEG' 'MEG'} is too many channel combinations. I later run into memory problems (I am trying to get Phase Lock Value and freqanalysis_mtmfft needs a matrix of dimensions [number of trials X number of channel combinations X number of frequency points]). So I am trying to do only gradiometers with gradiometers and mags with mags (though I think even that needs too much memory while computing phase lock values). thanks, sameer On Sat, 9 Jun 2007, Jan Mathijs Schoffelen wrote: > Dear Sameer, > > I am not sure whether I understood your question correctly, but couldn't you just specify: > > cfg.channelcmb = {'MEG' 'MEG'} ? > > JM > > ----- Original Message ----- > From: Sameer Walawalkar > Date: Friday, June 8, 2007 10:31 pm > Subject: [FIELDTRIP] channel combinations for coherene > >> Hello, >> >> how can I specify cfg.channelcmb for freqanalysis_mtmfft such that >> it only >> does planar-planar combinations or mag-mag combinations? >> >> thanks, >> sameer >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/fcdonders/fieldtrip. >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Jan.Schoffelen at FCDONDERS.RU.NL Mon Jun 11 11:14:46 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 11 Jun 2007 11:14:46 +0200 Subject: channel combinations for coherene In-Reply-To: Message-ID: Dear Sameer, I cannot cure memory problems for you. ;o) Even if you managed to achieve a reduction in the amount of chncmbs, I think that you would still run into problems. Next to this, I feel that you should be a bit more specific about your question. I assume that you would like to apply a kind of 'combineplanar' in order to reduce the amount of chancmb's (in other words I guess you would like to get rid of the _dV and _dH planar gradients, and collaps those into one number). This is not at all trivial, since in a bivariate measure such as coherence you are dealing with a cross-spectral density between 4 channels (which four and why?). In other words, you have a matrix which looks like this: Chn1_dh Chn1_dv Chn2_dh Chn2_dv Chn1_dh xx xx yx yx Chn1_dv xx xx yx yx Chn2_dh xy xy yy yy Chn2_dv xy xy yy yy The xx and yy blocks contain info about the extent at which the activity picked up by chn1 and chn2 respectively reflect a 'dipole' with fixed orientation, the xy and yx blocks containt the cross-term information, and are each other's conjugate (why was that again?). If we consider coherence (or plv for the same argument) to be a measure which quantifies the linear predictability of chn1 out of chn2 it might be easy to see why actually we need to take into account the interaction between the respective _dh and _dv gradiometers. If the _dh and _dv component are linearly independent, then they explain independent parts of the variance in the other channel. However, in practice this is of course never the case, so the two planar gradients cannot be considered independently. This means that it is generally not possible to sum the coherence values in the xy blocks. If you want to summarize the sixteen values in the matrix above, you have to come up with a clever strategy. I could think of two strategies: Either you reduce the amount of channels prior to doing the cross-spectral density computation. This results in reducing the 4x4 csd-matrix back into a 2x2 matrix, in which the off-diagonal element gives you the chncmb csd directly. This could for example be done by estimating the extent to which the activity at a planar channel can be represented as a dipole with a fixed orientation, and projecting the activity of the planar channel onto the direction of the highest variance (basically doing a pca). This should be applied to the fourier-data. Another strategy could be to compute the frequency equivalent of canonical correlation, which would yield the maximum of variance explained by an optimal linear combination of the respective two planar gradient combinations. Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Sunday, June 10, 2007 7:58 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] channel combinations for coherene Dear Jan, {'MEG' 'MEG'} is too many channel combinations. I later run into memory problems (I am trying to get Phase Lock Value and freqanalysis_mtmfft needs a matrix of dimensions [number of trials X number of channel combinations X number of frequency points]). So I am trying to do only gradiometers with gradiometers and mags with mags (though I think even that needs too much memory while computing phase lock values). thanks, sameer On Sat, 9 Jun 2007, Jan Mathijs Schoffelen wrote: > Dear Sameer, > > I am not sure whether I understood your question correctly, but couldn't you just specify: > > cfg.channelcmb = {'MEG' 'MEG'} ? > > JM > > ----- Original Message ----- > From: Sameer Walawalkar > Date: Friday, June 8, 2007 10:31 pm > Subject: [FIELDTRIP] channel combinations for coherene > >> Hello, >> >> how can I specify cfg.channelcmb for freqanalysis_mtmfft such that >> it only >> does planar-planar combinations or mag-mag combinations? >> >> thanks, >> sameer >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/fcdonders/fieldtrip. >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 r.oostenveld at FCDONDERS.RU.NL Mon Jun 11 14:57:53 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 11 Jun 2007 14:57:53 +0200 Subject: cannot convert gradiometer definition back to axial, please contact Robert In-Reply-To: Message-ID: Hi Sameer, On 7 Jun 2007, at 22:11, Sameer Walawalkar wrote: > Hello Robert, > > I have been playing around with http://www2.ru.nl/fcdonders/ > fieldtrip/doku.php? > id=fieldtrip:documentation:tutorial:statistics#3_permutation_tests_for > _time-frequency_representations > > in an attempt implement non-paramteric statistical testing of > coherence diferences between trials. My screen currently reads: > > the input is freq data with 612 channels, 18 frequencybins and 11 > timebins How did you manage to get 612 channels? Are you computing planar channels from your planar channels? Your neuromag system already has planar channels (by hardware design), hence you should not call megplanar on your data. The megplanar function is meant for computing planar gradients from a hardware magnetometer system (or a hardware axial gradiometer system, such as our CTF). After preprocessing and timelockanalysis or freqanalysis you should do combineplanar. > Warning: trying to convert planar to axial gradiometers, this is > experimental >> In combineplanar at 280 > In Auto_nonparametric_coh at 47 > ??? Error using ==> combineplanar at 308 > cannot convert gradiometer definition back to axial, please contact > Robert > > Error in ==> Auto_nonparametric_coh at 47 > TFR_LL_000_500_planar_cmb = combineplanar(cfg, TFR_LL_000_500_planar); > > > So, I am getting in touch with Robert Oostenveld. 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 a.maye at UKE.DE Thu Jun 14 11:26:09 2007 From: a.maye at UKE.DE (Alexander Maye) Date: Thu, 14 Jun 2007 11:26:09 +0200 Subject: wavelet analysis! Message-ID: Dear experts! When I compute coherence (using 'freqdescriptives') based on a frequency transform using 'freqanalysis_wltconvol', I get coherence values larger than 1. This has also been observed by Muthuraman before. The script below demonstrates this observation and also that freqanalysis_mtmconvol does everything correctly. I think the problem is pertinent to all current fieldtrip versions. While I can easily switch to mtmconvol I thought it could be useful to address this issue. Does anyone have an idea? Best, ALEX. % Construct 4 trials with a sine wave in two channels ... t=[0:1/pi:100*pi]; data.trial{1} = [sin(t);sin(t)]; data.time{1} = t/pi/10; for i = 2:4, data.trial{i}=data.trial{1};data.time{i}=data.time{1}; end data.label = {'1' '2'}; data.fsample = 10*pi; cfgmtm.method = 'mtmconvol'; cfgmtm.tapsmofrq = 10; cfgmtm.t_ftimwin = 0.2; cfgmtm.output = 'powandcsd'; cfgmtm.keeptrials = 'yes'; cfgmtm.toi = 5; cfgmtm.foi = 10; cfgwlt.method = 'wltconvol'; cfgwlt.width = 5; cfgwlt.output = 'powandcsd'; cfgwlt.keeptrials = 'yes'; cfgwlt.toi = 5; cfgwlt.foi = 10; fmtm = freqanalysis(cfgmtm,data); fwlt = freqanalysis(cfgwlt,data); cohcfg.cohmethod = 'coh'; cohcfg.complex = 'abs'; cohmtm = freqdescriptives(cohcfg,fmtm); cohwlt = freqdescriptives(cohcfg,fwlt); % ... should yield a coherence of 1 ... cohmtm % ... but this doesn't :-( cohwlt ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Jan.Schoffelen at FCDONDERS.RU.NL Thu Jun 14 14:41:06 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Thu, 14 Jun 2007 14:41:06 +0200 Subject: wavelet analysis! In-Reply-To: Message-ID: Dear Alex, >When I compute coherence (using 'freqdescriptives') based on a frequency >transform using 'freqanalysis_wltconvol', I get coherence values larger >than 1. This has also been observed by Muthuraman before. > >The script below demonstrates this observation and also that >freqanalysis_mtmconvol does everything correctly. I think the problem is >pertinent to all current fieldtrip versions. I'm very glad that you started trying out to solve the problem yourself. Solving a problem indeed always starts with finding out where it goes wrong ;) >While I can easily switch to mtmconvol I thought it could be useful to >address this issue. Does anyone have an idea? Yes, I have an idea. Regarding your suggested switch to mtmconvol I can only very much support you to do so, but let's address the issue: You construct 4 trials of surrogate data with an expected coherence of 1. What you find is a coherence of 1 with mtmconvol, but a coherence of >1 with wltconvol. Let's tackle the problem from its tail to find the cause, by looking at the mathematics to compute coherence: In pseudo-mathematics this yields: Coherence = abs(mean(csd))./sqrt(mean(pow1)*mean(pow2)). In your simulated case, you explicitly equated signal 1 and 2, which means that the csd would be: 1 real-valued 2 equivalent to the power of one of the signals (does everybody still agree?) In pseudo-mathematics: Pow1 = pow2 = csd: coherence = abs(mean(pow))./sqrt(mean(pow)*mean(pow))= p/sqrt(p^2) = 1 Apparently, wltconvol either gives back too big a csd, or too small a pow1 (and pow2). Let's have a look at the code then (of course you and Muthuraman already did): Mtmconvol line 450: powdum = 2.* abs(autspctrmacttap) .^ 2 ./ actfoinumsmp; Mtmconvol line 489: csddum = 2.* (autspctrmacttap(cutdatindcmb(:,1),:) .* conj(autspctrmacttap(cutdatindcmb(:,2),:))) ./ actfoinumsmp; So these lines compute the power (450) and the csd (489). The 2 and the actfoinumsmp are needed for a proper normalization. So far so good. Wltconvol l. 279: powdum = (2.* abs(autspctrmacttap) ./ data.fsample) .^ 2; Wltconvol l. 292: csddum = 2.* (autspctrmacttap(cutdatindcmb(:,1),:) .* conj(autspctrmacttap(cutdatindcmb(:,2),:))) ./ data.fsample; %actfoinumsmp Oooops! As you can see, the normalization of powdum is different from the normalisation of csddum. In fact there is an additional 2./data.fsample (still with me? The squaring is taken outside of the brackets), as compared to the csddum. This would even allow me to predict the (wrong) coherence outputted by your little simulation, but I leave that up to you guys. This is indeed a bug and will be fixed. Keep up the good work. J-M ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 a.maye at UKE.DE Thu Jun 14 16:33:15 2007 From: a.maye at UKE.DE (Alexander Maye) Date: Thu, 14 Jun 2007 16:33:15 +0200 Subject: read in EEProbe data Message-ID: Dear all! I just ran across the same problem reading EEProbe files like others in this thread before. Reading an EEprobe .cnt file using read_fcdc_header simply crashes my matlab (under Linux). This is due to read_eep_cnt.mexglx, which according to Robert can't be fixed until some low-level ANT functions become available. I'm talking about fieldtrip 0.9.8. Alright, here comes a very dirty but quick fix that works fine for me (and I hope that nobody from the EEGLab community is listening :-)). EEGLab (Delorme, Makeig, http://sccn.ucsd.edu/) comes with the same read_eep_cnt.mexglx function, which works surprizingly well. So, replacing read_eep_cnt.mexglx in the fieldtrip/private directory with the corresponding file from the EEGLab disribution (version 5 in my case) solved the problem. I acknowledge that from an ethical point of view this is wrong, and I hope that I will not be forced to continue this bad behavior in the near future ;-) Cheers, ALEX. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Thu Jun 14 21:22:14 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 14 Jun 2007 15:22:14 -0400 Subject: cannot convert gradiometer definition back to axial, please contact Robert In-Reply-To: Message-ID: Hi, As suggested I did freqanalysis and followd it up by trying combine planar and got similar error. cfgTFR = []; cfgTFR.output = 'pow'; cfgTFR.channel = 'MEG'; cfgTFR.method = 'mtmconvol'; cfgTFR.foi = 5 : 5 : 90; cfgTFR.t_ftimwin = 5./cfgTFR.foi; cfgTFR.tapsmofrq = 0.4 *cfgTFR.foi; cfgTFR.toi = .0 : 0.05 : .5; cfgTFR.pad = 'maxperlen'; and cfg = []; cfg.combinegrad = 'yes'; ERROR message: the input is freq data with 306 channels, 18 frequencybins and 11 timebins Warning: trying to convert planar to axial gradiometers, this is experimental > In combineplanar at 280 In Auto_nonparametric_coh at 47 ??? Error using ==> combineplanar cannot convert gradiometer definition back to axial, please contact Robert Error in ==> Auto_nonparametric_coh at 47 TFR_LL_000_500_cmb = combineplanar(cfg, TFR_LL_000_500); thanks, sameer On Mon, 11 Jun 2007, Robert Oostenveld wrote: > Hi Sameer, > > On 7 Jun 2007, at 22:11, Sameer Walawalkar wrote: > >> Hello Robert, >> >> I have been playing around with >> http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:statistics#3_permutation_tests_for_time-frequency_representations >> >> in an attempt implement non-paramteric statistical testing of coherence >> diferences between trials. My screen currently reads: >> >> the input is freq data with 612 channels, 18 frequencybins and 11 timebins > > How did you manage to get 612 channels? Are you computing planar channels > from your planar channels? Your neuromag system already has planar channels > (by hardware design), hence you should not call megplanar on your data. The > megplanar function is meant for computing planar gradients from a hardware > magnetometer system (or a hardware axial gradiometer system, such as our > CTF). > > After preprocessing and timelockanalysis or freqanalysis you should do > combineplanar. > >> Warning: trying to convert planar to axial gradiometers, this is >> experimental >>> In combineplanar at 280 >> In Auto_nonparametric_coh at 47 >> ??? Error using ==> combineplanar at 308 >> cannot convert gradiometer definition back to axial, please contact Robert >> >> Error in ==> Auto_nonparametric_coh at 47 >> TFR_LL_000_500_planar_cmb = combineplanar(cfg, TFR_LL_000_500_planar); >> >> >> So, I am getting in touch with Robert Oostenveld. > > 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. From sameer at ANDREW.CMU.EDU Sat Jun 16 03:26:54 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 15 Jun 2007 21:26:54 -0400 Subject: cannot convert gradiometer definition back to axial, please contact Robert (fwd) Message-ID: I think I was getting this message because I did not have cfg.keeptrials = 'yes' I am also trying without combineplanar as it seems that it might not be required for NM306. (Also combineplanar gives me same old error, "cant convert gradiometer to axial. this is probably because, I did not go Axial -> grad, so there is no point attempting grad->axial) The current state of affairs is cfg = channel: {306x1 cell} method: 'montecarlo' statistic: 'indepsamplesT' clusteralpha: 0.0500 clusterstatistic: 'maxsum' minnbchan: 2 tail: 0 clustertail: 0 alpha: 0.0500 numrandomization: 100 design: [1 2] ivar: 1 latency: [0.2000 -0.1000] frequency: [8 14] avgoverchan: 'no' avgovertime: 'no' avgoverfreq: 'no' channelcmb: [] precision: 'double' version: [1x1 struct] previous: {[1x1 struct] [1x1 struct]} dimord: 'chan_freq_time' dim: [306 7 1] Using the gradiometer configuration from the dataset. there are on average 17.4 neighbours per channel using "statistics_montecarlo" for the statistical testing ??? Error using ==> fieldtrip/private/statistics_wrapper at 240 the size of the design matrix does not match the number of observations in the data Error in ==> freqstatistics at 106 [stat] = statistics_wrapper(cfg, varargin{:}); Error in ==> Auto_nonparametric_coh at 86 [stat_post] = freqstatistics(cfg, TFR_LL_200_400 , TFR_LL_neg1_neg2); I shall be trying to troubleshoot this. Hope some of it makes sense. thanks for your time. best, sameer ---------- Forwarded message ---------- Date: Thu, 14 Jun 2007 15:22:14 -0400 (EDT) From: Sameer Walawalkar To: FieldTrip discussion list Subject: Re: [FIELDTRIP] cannot convert gradiometer definition back to axial, please contact Robert Hi, As suggested I did freqanalysis and followd it up by trying combine planar and got similar error. cfgTFR = []; cfgTFR.output = 'pow'; cfgTFR.channel = 'MEG'; cfgTFR.method = 'mtmconvol'; cfgTFR.foi = 5 : 5 : 90; cfgTFR.t_ftimwin = 5./cfgTFR.foi; cfgTFR.tapsmofrq = 0.4 *cfgTFR.foi; cfgTFR.toi = .0 : 0.05 : .5; cfgTFR.pad = 'maxperlen'; and cfg = []; cfg.combinegrad = 'yes'; ERROR message: the input is freq data with 306 channels, 18 frequencybins and 11 timebins Warning: trying to convert planar to axial gradiometers, this is experimental > In combineplanar at 280 In Auto_nonparametric_coh at 47 ??? Error using ==> combineplanar cannot convert gradiometer definition back to axial, please contact Robert Error in ==> Auto_nonparametric_coh at 47 TFR_LL_000_500_cmb = combineplanar(cfg, TFR_LL_000_500); thanks, sameer On Mon, 11 Jun 2007, Robert Oostenveld wrote: > Hi Sameer, > > On 7 Jun 2007, at 22:11, Sameer Walawalkar wrote: > >> Hello Robert, >> >> I have been playing around with >> http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:statistics#3_permutation_tests_for_time-frequency_representations >> >> in an attempt implement non-paramteric statistical testing of coherence >> diferences between trials. My screen currently reads: >> >> the input is freq data with 612 channels, 18 frequencybins and 11 timebins > > How did you manage to get 612 channels? Are you computing planar channels > from your planar channels? Your neuromag system already has planar channels > (by hardware design), hence you should not call megplanar on your data. The > megplanar function is meant for computing planar gradients from a hardware > magnetometer system (or a hardware axial gradiometer system, such as our > CTF). > > After preprocessing and timelockanalysis or freqanalysis you should do > combineplanar. > >> Warning: trying to convert planar to axial gradiometers, this is >> experimental >>> In combineplanar at 280 >> In Auto_nonparametric_coh at 47 >> ??? Error using ==> combineplanar at 308 >> cannot convert gradiometer definition back to axial, please contact Robert >> >> Error in ==> Auto_nonparametric_coh at 47 >> TFR_LL_000_500_planar_cmb = combineplanar(cfg, TFR_LL_000_500_planar); >> >> >> So, I am getting in touch with Robert Oostenveld. > > 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. From thomas at UCSD.EDU Sat Jun 16 22:55:09 2007 From: thomas at UCSD.EDU (Thomas Thesen) Date: Sat, 16 Jun 2007 16:55:09 -0400 Subject: freqbaseline - zscore Message-ID: Hi FieldTrippers, Hi List, I noticed that in the current release of FT, FREQBASELINE.M has a section commented out where the zscore is presumably calculated. Can anyone say what the reason is for that? Is the calculation not valid? What does it produce? A zscore comparison would, in practice, be most convenient to have. Or is there a better way to do this? Thanks, Thomas ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 t.schneider at UKE.UNI-HAMBURG.DE Mon Jun 18 13:27:14 2007 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Mon, 18 Jun 2007 13:27:14 +0200 Subject: source data on inflated surface Message-ID: Hi, I was trying to project source data to an inflated surface, but consistently got the error message: Color Data is not set for interpolated shading. The plot of the surface looks fine so far, but no functional data is plotted. I used the following config with the fieldtrip version 20070617: figure cfg = []; cfg.anaparameter = 'anatomy'; cfg.funparameter = funparameter; cfg.maskparameter = maskparameter; cfg.method = 'surface'; cfg.projmethod = 'nearest'; cfg.surfinflated = 'surface_l4_both.mat'; cfg.funcolorlim = 'zeromax'; cfg = sourceplot(cfg, sourceInterp); Has anyone experience with this error? Best, Till -- 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 t.schneider at UKE.UNI-HAMBURG.DE Mon Jun 18 13:44:52 2007 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Mon, 18 Jun 2007 13:44:52 +0200 Subject: source data on inflated surface Message-ID: Hi, I was trying to project source data to an inflated surface, but consistently got the error message:Color Data is not set for interpolated shading. The plot of the surface looks fine so far, but no functional data is plotted.I used the following config with the fieldtrip version 20070617: figure cfg = []; cfg.anaparameter = 'anatomy'; cfg.funparameter = funparameter; cfg.maskparameter = maskparameter; cfg.method = 'surface'; cfg.projmethod = 'nearest'; cfg.surfinflated = 'surface_l4_both.mat'; cfg.funcolorlim = 'zeromax'; cfg = sourceplot(cfg, sourceInterp); Has anyone experience with this error? Best, Till -- 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 ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Jun 19 15:51:54 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 19 Jun 2007 15:51:54 +0200 Subject: source data on inflated surface In-Reply-To: <46767034.30709@uke.uni-hamburg.de> Message-ID: Hi Till, I think the error is caused because the cfg is not specified correctly. If you want to plot onto an inflated surface you have to specify both cfg.surffile and cfg.surfinflated. In your case it could be: cfg.surffile = 'surface_wm_both.mat'; cfg.surfinflated = 'surface_wminf_both.mat'; The first is used to interpolate the functional data onto, the second is used for plotting. You can't use the 'surface_l4_both.mat' because there is no matching surface file with that one. Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Till Schneider Sent: Monday, June 18, 2007 1:45 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] source data on inflated surface Hi, I was trying to project source data to an inflated surface, but consistently got the error message:Color Data is not set for interpolated shading. The plot of the surface looks fine so far, but no functional data is plotted.I used the following config with the fieldtrip version 20070617: figure cfg = []; cfg.anaparameter = 'anatomy'; cfg.funparameter = funparameter; cfg.maskparameter = maskparameter; cfg.method = 'surface'; cfg.projmethod = 'nearest'; cfg.surfinflated = 'surface_l4_both.mat'; cfg.funcolorlim = 'zeromax'; cfg = sourceplot(cfg, sourceInterp); Has anyone experience with this error? Best, Till -- 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 vvw at CALTECH.EDU Tue Jun 19 20:37:30 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Tue, 19 Jun 2007 11:37:30 -0700 Subject: egi2besa2fieldtrip - topoplot layout Message-ID: Hi Fieldtripers, below find the relevant sample code I am using to plot cluster results with Fieldtrip release v. 20070514 (latest?). I have read previous posts in the discussion but I still bump into this issue (not sure how old the discussions were). The recordings were made with an egi system and preprocessed in besa. Although I am using the prepare_layout function, the layout in topoplotER (and other plotting tools) needs to be rotated by 90degrees clockwise. I have tried to use cfg.rotate (in the for loop below, commented here) but that does not change anything. Do you have any suggestions on how to overcome this problem? Thanks in advance for your help! Virginie % ==== plot results ==== cfg = []; cfg.elecfile = '\CHANNELS_specs\fieldtrip_GSN128.sfp'; egilay = prepare_layout(cfg); diff_gdav = ill_gdav; diff_gdav.av = ill_gdav.avg-noill_gdav.avg; figure; % if cfg.latency = [0.3 0.8]; in cluster analysis %j = [0:0.025:0.5]; % (s), 0 = 1st onset %m = [1:12:251]; % (samples) % if cfg.latency = 'all'; in clusteranalysis j = [0:0.05:1.1]; % (s), 0 = -300ms from1st onset m = [1:25:551]; % (samples) pos = stat.posclusterslabelmat == 1; % + clusters neg = (stat.negclusterslabelmat == 1)*(-1); % - clusters for k = 1:length(j)-1; % 20 subplots subplot(4,5,k); cfg = []; cfg.xlim=[j(k) j(k+1)]; cfg.zlim=[-3 3]; pos_int = mean(pos(:,m(k):m(k+1))')'; neg_int = mean(neg(:,m(k):m(k+1))')'; cfg.highlight = find(pos_int ==1 | neg_int == -1); cfg.comment = 'xlim'; cfg.commentpos = 'title'; cfg.layout = egilay; %cfg.rotate =[90]; % ?? rotate by 90 degrees clock-wise topoplotER(cfg,diff_gdav); end % ==================== 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. From t.schneider at UKE.UNI-HAMBURG.DE Wed Jun 20 09:44:39 2007 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Wed, 20 Jun 2007 09:44:39 +0200 Subject: source data on inflated surface In-Reply-To: <005d01c7b279$008ce890$642dae83@fcdonders.nl> Message-ID: Hi Ingrid, thanks a lot, this works fine. Till Ingrid Nieuwenhuis schrieb: > Hi Till, > > I think the error is caused because the cfg is not specified correctly. If > you want to plot onto an inflated surface you have to specify both > cfg.surffile and cfg.surfinflated. In your case it could be: > > cfg.surffile = 'surface_wm_both.mat'; > cfg.surfinflated = 'surface_wminf_both.mat'; > > The first is used to interpolate the functional data onto, the second is > used for plotting. You can't use the 'surface_l4_both.mat' because there is > no matching surface file with that one. > > Hope this helps, > Ingrid > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Till Schneider > Sent: Monday, June 18, 2007 1:45 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] source data on inflated surface > > Hi, > > I was trying to project source data to an inflated surface, but > consistently got the error message:Color Data is not set for > interpolated shading. The plot of the surface looks fine so far, but no > functional data is plotted.I used the following config with the > fieldtrip version 20070617: > > figure > cfg = []; > cfg.anaparameter = 'anatomy'; > cfg.funparameter = funparameter; > cfg.maskparameter = maskparameter; > cfg.method = 'surface'; > cfg.projmethod = 'nearest'; > cfg.surfinflated = 'surface_l4_both.mat'; > cfg.funcolorlim = 'zeromax'; > cfg = sourceplot(cfg, sourceInterp); > > Has anyone experience with this error? > Best, > Till > > > > -- Till Schneider, Dipl.Psych. Universitaetsklinikum Hamburg-Eppendorf Institut fuer Neurophysiologie und Pathophysiologie Martinistr. 52 20246 Hamburg Germany tel +49-40-42803-3188 fax +49-40-42803-7752 mobil +49-178-2834030 -- 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 olga at GRAPHICMIND.INFO Wed Jun 20 15:20:00 2007 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Wed, 20 Jun 2007 17:20:00 +0400 Subject: egi2besa2fieldtrip - topoplot layout In-Reply-To: <20070619183729.9B5AA12DEE@wood-ox.its.caltech.edu> Message-ID: Dear Virginie, I had the same problem. Actually, I not understand where the problem comes from, but solve it by multiplying the coordinates by cos (- 90) and sin (90). See the script below. It works good for my data... Best Regards, Olga. %prepare layout data.elec = read_fcdc_elec('C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'); cfg = []; cfg.rotate = 90; cfg.elecfile = 'C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'; mylay2 = prepare_layout(cfg); for i=1:69 mylay2.width (i)= 0.5 end; for i=1:69 mylay2.height (i)= 0.5 end; x=mylay.pos (:,1); y=mylay.pos (:,2); mylay2.pos (:,1)=y; mylay2.pos (:,2)=-x; -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Virginie van Wassenhove Sent: Tuesday, June 19, 2007 10:38 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] egi2besa2fieldtrip - topoplot layout Hi Fieldtripers, below find the relevant sample code I am using to plot cluster results with Fieldtrip release v. 20070514 (latest?). I have read previous posts in the discussion but I still bump into this issue (not sure how old the discussions were). The recordings were made with an egi system and preprocessed in besa. Although I am using the prepare_layout function, the layout in topoplotER (and other plotting tools) needs to be rotated by 90degrees clockwise. I have tried to use cfg.rotate (in the for loop below, commented here) but that does not change anything. Do you have any suggestions on how to overcome this problem? Thanks in advance for your help! Virginie % ==== plot results ==== cfg = []; cfg.elecfile = '\CHANNELS_specs\fieldtrip_GSN128.sfp'; egilay = prepare_layout(cfg); diff_gdav = ill_gdav; diff_gdav.av = ill_gdav.avg-noill_gdav.avg; figure; % if cfg.latency = [0.3 0.8]; in cluster analysis %j = [0:0.025:0.5]; % (s), 0 = 1st onset %m = [1:12:251]; % (samples) % if cfg.latency = 'all'; in clusteranalysis j = [0:0.05:1.1]; % (s), 0 = -300ms from1st onset m = [1:25:551]; % (samples) pos = stat.posclusterslabelmat == 1; % + clusters neg = (stat.negclusterslabelmat == 1)*(-1); % - clusters for k = 1:length(j)-1; % 20 subplots subplot(4,5,k); cfg = []; cfg.xlim=[j(k) j(k+1)]; cfg.zlim=[-3 3]; pos_int = mean(pos(:,m(k):m(k+1))')'; neg_int = mean(neg(:,m(k):m(k+1))')'; cfg.highlight = find(pos_int ==1 | neg_int == -1); cfg.comment = 'xlim'; cfg.commentpos = 'title'; cfg.layout = egilay; %cfg.rotate =[90]; % ?? rotate by 90 degrees clock-wise topoplotER(cfg,diff_gdav); end % ==================== 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. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 vvw at CALTECH.EDU Wed Jun 20 18:29:20 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Wed, 20 Jun 2007 09:29:20 -0700 Subject: egi2besa2fieldtrip - topoplot layout In-Reply-To: <200706201306.l5KD6GKX039412@l1.ihna.ru> Message-ID: Hi Olga, thanks for your help, I think I got it working now! Virginie At 06:20 AM 6/20/2007, Olga Sysoeva wrote: >Dear Virginie, > >I had the same problem. >Actually, I not understand where the problem comes from, but solve it by >multiplying the coordinates by cos (- 90) and sin (90). See the script >below. >It works good for my data... > >Best Regards, >Olga. > > >%prepare layout >data.elec = >read_fcdc_elec('C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'); >cfg = []; >cfg.rotate = 90; >cfg.elecfile = 'C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'; >mylay2 = prepare_layout(cfg); > >for i=1:69 > mylay2.width (i)= 0.5 >end; > >for i=1:69 > mylay2.height (i)= 0.5 >end; > >x=mylay.pos (:,1); >y=mylay.pos (:,2); >mylay2.pos (:,1)=y; >mylay2.pos (:,2)=-x; > > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Virginie van Wassenhove >Sent: Tuesday, June 19, 2007 10:38 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: [FIELDTRIP] egi2besa2fieldtrip - topoplot layout > >Hi Fieldtripers, > >below find the relevant sample code I am using to plot cluster >results with Fieldtrip release v. 20070514 (latest?). > >I have read previous posts in the discussion but I still bump into >this issue (not sure how old the discussions were). >The recordings were made with an egi system and preprocessed in besa. >Although I am using the prepare_layout function, the layout in >topoplotER (and other plotting tools) needs to be rotated by >90degrees clockwise. >I have tried to use cfg.rotate (in the for loop below, commented >here) but that does not change anything. > >Do you have any suggestions on how to overcome this problem? >Thanks in advance for your help! > >Virginie > >% ==== plot results ==== >cfg = []; >cfg.elecfile = '\CHANNELS_specs\fieldtrip_GSN128.sfp'; >egilay = prepare_layout(cfg); > >diff_gdav = ill_gdav; >diff_gdav.av = ill_gdav.avg-noill_gdav.avg; > >figure; >% if cfg.latency = [0.3 0.8]; in cluster analysis >%j = [0:0.025:0.5]; % (s), 0 = 1st onset >%m = [1:12:251]; % (samples) >% if cfg.latency = 'all'; in clusteranalysis >j = [0:0.05:1.1]; % (s), 0 = -300ms from1st >onset >m = [1:25:551]; % (samples) > >pos = stat.posclusterslabelmat == 1; % + clusters >neg = (stat.negclusterslabelmat == 1)*(-1); % - clusters > >for k = 1:length(j)-1; % 20 subplots > subplot(4,5,k); > cfg = []; > cfg.xlim=[j(k) j(k+1)]; > cfg.zlim=[-3 3]; > pos_int = mean(pos(:,m(k):m(k+1))')'; > neg_int = mean(neg(:,m(k):m(k+1))')'; > cfg.highlight = find(pos_int ==1 | neg_int == -1); > cfg.comment = 'xlim'; > cfg.commentpos = 'title'; > cfg.layout = egilay; > %cfg.rotate =[90]; % ?? rotate by 90 >degrees clock-wise > topoplotER(cfg,diff_gdav); >end >% ==================== > >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. > >---------------------------------- >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. See also >http://listserv.surfnet.nl/archives/fieldtrip.html and >http://www.ru.nl/fcdonders/fieldtrip. 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. From sameer at ANDREW.CMU.EDU Wed Jun 20 22:50:33 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Wed, 20 Jun 2007 16:50:33 -0400 Subject: nonparamteric statistical tests for coherence differences In-Reply-To: <018401c7a492$478f1b90$6501a8c0@fcdonders.nl> Message-ID: Dear Eric, I was trying to adapt the online tutorial for doing statistical non-parametric tests for coherence differences. After using freqstatistcs along the lines spelt out in the tutorial, when in order to generate topoplots, I use the following command: TFR_LLvsRR_050_500_cmb = TFR_LL_050_500_cmb ; TFR_LLvsRR_050_500_cmb.powspctrm = TFR_LL_050_500_cmb.powspctrm - TFR_RR_050_500_cmb.powspctrm ; I get the following Matlab error: ??? Error using ==> minus Array dimensions must match for binary array op. Clearly this is because I have unequal number of trials for the between trials case. As shown by the following. >>size(TFR_RR_050_500_cmb.powspctrm) ans = 129 204 7 10 >> size(TFR_LL_050_500_cmb.powspctrm) ans = 128 204 7 10 And; >> TFR_LL_050_500_cmb TFR_LL_050_500_cmb = label: {204x1 cell} dimord: 'rpt_chan_freq_time' freq: [8 9 10 11 12 13 14] time: [0.0500 0.1000 0.1500 0.2000 0.2500 0.3000 0.3500 0.4000 0.4500 0.5000] powspctrm: [4-D double] cumtapcnt: [128x7 double] cfg: [1x1 struct] grad: [1x1 struct] Now, from my understanding, the non-parametric statistical testing itself doesnt require equal trials (and the fact that freqstatistics worked shows that part is o.k.). So there must be a way to plot the results bypassing the error. What am I missing here? Thanks for your help. Best, sameer On Fri, 1 Jun 2007, Eric Maris wrote: > Hi Sameer, > >> I am looking for Wiki entry or tutorial for doing nonparamteric >> statistical tests for coherence differences (both within trial and >> between trials). > > At this moment, only coherence testing between trials is implemented. > >> >> What I can get is >> > http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu > tori >> al:statistics#3_permutation_tests_for_time-frequency_representations >> which describes how to do the same for TFRs. >> >> I am thinking of attempting using basically the same set of commands, but >> substituting the correct procedure for calculating coherences etc in the >> steps shown is section 3. will that be proper? > > I don't know. Just have a try. My expectation is that copy-pasting will not > be sufficient to get it running. On the other hand, I used the > Fieldtrip-code for all the analyses on which is reported in our JNM-paper on > coherence difference testing. > > I am aware of the fact that the tutorial could be improved with respect to > the testing of coherence differences. > > > Good luck, > > > 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 for your help. >> >> 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. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 vvw at CALTECH.EDU Thu Jun 21 20:44:41 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Thu, 21 Jun 2007 11:44:41 -0700 Subject: tfanalysis - NaN Message-ID: Hello again. I am finding NaN whatever method I use (multitaper and wavelet analysis), yet using a different analysis tool with similar parameters I obtain clean results. epoch length = 1.1 s baseline length = 0.3 s sampling rate = 500Hz I tried several suggestions listed in the previous message list for a similar problem, but none seem to provide reasonable results (aka always NaN). Also tried with different subjects, no particular error otherwise. I am sending a sample script in case someone has a suggestion on this... Thanks for your help once more! Virginie %% ================================================ % TF analysis - MULTITAPER cfg = []; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.output = 'powandcsd'; %cfg.channel = 'all'; cfg.channel = 'E75'; %win_length = 0.128; %win_n = floor(2.*(1.1./win_length)-1); cfg.foi = 1:5:45; %cfg.t_ftimwin = ones(1,win_n).*win_length; cfg.t_ftimwin = 4./cfg.foi; %cfg.toi = -0.3:win_length/2:0.8; cfg.toi = -0.3:0.05:0.8; % cfg.pad = 'maxperlen'; % cfg.keeptrials = 'no'; % cfg.keeptapers ='no'; s08_ill_mult = freqanalysis(cfg,s08_ill); %% ======================== % plot freq data cfg = []; cfg.baseline = [-0.3 0]; cfg.layout = egilay; cfg.zlim = [-0.00001 0.000001]; % a comparer entre participants % warning off % NaN clf %multiplotTFR(cfg,s08_ill_mult); singleplotTFR(cfg,s08_ill_mult); %% ================================================ % TF analysis - wavelet cfg = []; cfg.method = 'wltconvol'; cfg.width = 4; cfg.output = 'pow'; cfg.foi = 1:2:30; cfg.toi = -0.3:0.05:0.8; s14_ill_wvlt = freqanalysis(cfg, s14_ill); %% ======================== cfg = []; cfg.baseline = [-0.3 0]; cfg.zlim = [-1 1]; cfg.showlabels = 'yes'; cfg.layout = egilay; clf multiplotTFR(cfg, s14_ill_wvlt) %% ================================================ 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. From sameer at ANDREW.CMU.EDU Sun Jun 24 21:11:31 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Sun, 24 Jun 2007 15:11:31 -0400 Subject: could not find the statistics function "statfun_indepsamplesZcoh" Message-ID: Hello, In order to do non-parametric statistical testing for coherence differences, I call freqstatistics(cfg, CrossSpectralDensity_1, CrossSpectralDensity_2) with (among other parameters in the configuration) cfg.method = montecarlo and cfg.statistic = indepsamplesZcoh but, ??? Error using ==> statistics_montecarlo at 217 could not find the statistics function "statfun_indepsamplesZcoh" and indeed it does not exist even in the latest version of fieldtrip. Some of the other ['statfun_' cfg.statistic] functions do exist. 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 maris at NICI.RU.NL Sun Jun 24 21:35:57 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Sun, 24 Jun 2007 21:35:57 +0200 Subject: [SPAM] [FIELDTRIP] could not find the statistics function "statfun_indepsamplesZcoh" In-Reply-To: Message-ID: Dear Sameer, > In order to do non-parametric statistical testing for coherence > differences, I call > > freqstatistics(cfg, CrossSpectralDensity_1, CrossSpectralDensity_2) > > with (among other parameters in the configuration) > cfg.method = montecarlo and > cfg.statistic = indepsamplesZcoh > > but, > > ??? Error using ==> statistics_montecarlo at 217 > could not find the statistics function "statfun_indepsamplesZcoh" > > and indeed it does not exist even in the latest version of fieldtrip. You are right. I used this statfun for a paper together with Jan-Mathijs Schoffelen en Pascal Fries. I will add it to Fieldtrip, probably this week. I will send you an email when I have finished the job. 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/ > > Some of the other ['statfun_' cfg.statistic] functions do exist. > > Thanks, > sameer > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Sun Jun 24 21:37:49 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Sun, 24 Jun 2007 15:37:49 -0400 Subject: [SPAM] [FIELDTRIP] could not find the statistics function "statfun_indepsamplesZcoh" In-Reply-To: <01ad01c7b696$e3bc3320$6501a8c0@fcdonders.nl> Message-ID: thanks Eric. sameer On Sun, 24 Jun 2007, Eric Maris wrote: > Dear Sameer, > > > >> In order to do non-parametric statistical testing for coherence >> differences, I call >> >> freqstatistics(cfg, CrossSpectralDensity_1, CrossSpectralDensity_2) >> >> with (among other parameters in the configuration) >> cfg.method = montecarlo and >> cfg.statistic = indepsamplesZcoh >> >> but, >> >> ??? Error using ==> statistics_montecarlo at 217 >> could not find the statistics function "statfun_indepsamplesZcoh" >> >> and indeed it does not exist even in the latest version of fieldtrip. > > You are right. I used this statfun for a paper together with Jan-Mathijs > Schoffelen en Pascal Fries. I will add it to Fieldtrip, probably this week. > I will send you an email when I have finished the job. > > 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/ > > >> >> Some of the other ['statfun_' cfg.statistic] functions do exist. >> >> Thanks, >> sameer >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the > FieldTrip >> toolbox, to share experiences and to discuss new ideas for MEG and EEG > analysis. >> See also http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Mon Jun 25 10:19:39 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 25 Jun 2007 10:19:39 +0200 Subject: tfanalysis - NaN In-Reply-To: <20070621184447.E5FE71ABB8@earth-ox.its.caltech.edu> Message-ID: Hi Virginie, the function freqanalysis will return NaNs when a time frequency tile extends beyond a corresponding data segment. One would usually expect a "U" shaped padding of NaNs at the boundaries of any TFR which has longer time windows for lower frequencies. From the cfg options you specify below I can see that you have a data segment of 1.1 seconds length and the moving windows cfg.t_tfimwin are quite long at the low ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = 0.6666 s. Hence the NaNs seem perfectly "normal" in this case. The only way to avoid NaN in the time window of interest (using this type of time-frequency tiling) is to make your epochs longer. Hope this helps, Christian On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: > Hello again. > > I am finding NaN whatever method I use (multitaper and wavelet > analysis), yet using a different analysis tool with similar > parameters I obtain clean results. > epoch length = 1.1 s > baseline length = 0.3 s > sampling rate = 500Hz > > I tried several suggestions listed in the previous message list for > a similar problem, but none seem to provide reasonable results (aka > always NaN). > Also tried with different subjects, no particular error otherwise. > I am sending a sample script in case someone has a suggestion on > this... > Thanks for your help once more! > > Virginie > > %% ================================================ > % TF analysis - MULTITAPER > cfg = []; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.output = 'powandcsd'; > %cfg.channel = 'all'; > cfg.channel = 'E75'; > > %win_length = 0.128; > %win_n = floor(2.*(1.1./win_length)-1); > > cfg.foi = 1:5:45; > %cfg.t_ftimwin = ones(1,win_n).*win_length; > cfg.t_ftimwin = 4./cfg.foi; > %cfg.toi = -0.3:win_length/2:0.8; > cfg.toi = -0.3:0.05:0.8; > > % cfg.pad = 'maxperlen'; > % cfg.keeptrials = 'no'; > % cfg.keeptapers ='no'; > s08_ill_mult = freqanalysis(cfg,s08_ill); > > %% ======================== > % plot freq data > cfg = []; > cfg.baseline = [-0.3 0]; > cfg.layout = egilay; > cfg.zlim = [-0.00001 0.000001]; % a comparer entre > participants > % warning off % NaN > clf > %multiplotTFR(cfg,s08_ill_mult); > singleplotTFR(cfg,s08_ill_mult); > > %% ================================================ > % TF analysis - wavelet > cfg = []; > cfg.method = 'wltconvol'; > cfg.width = 4; > cfg.output = 'pow'; > cfg.foi = 1:2:30; > cfg.toi = -0.3:0.05:0.8; > s14_ill_wvlt = freqanalysis(cfg, s14_ill); > %% ======================== > cfg = []; > cfg.baseline = [-0.3 0]; > cfg.zlim = [-1 1]; > cfg.showlabels = 'yes'; > cfg.layout = egilay; > clf > multiplotTFR(cfg, s14_ill_wvlt) > > %% ================================================ > > > > > > > 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. > ---------------------------------------------------------------------- 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 vvw at CALTECH.EDU Mon Jun 25 19:38:38 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Mon, 25 Jun 2007 10:38:38 -0700 Subject: tfanalysis - NaN In-Reply-To: <6B8DAFB4-88B1-4A86-A617-6D856922821A@fcdonders.ru.nl> Message-ID: Hi Christian, thanks for your inputs. Actually, I have tried different window sizes and frequency parameters (and wavelet, tf tiling,...). I would not expect to obtain NaN for a narrow band in higher frequencies (say 35-45Hz) with 2Hz and 4 cycles resolution with the same epoch but I still do. I'll try with a longer epoch, but I find puzzling that I should still get NaN when the resolution should be sufficient for the computations. Cheers, Virgine At 01:19 AM 6/25/2007, Christian Hesse wrote: >Hi Virginie, > >the function freqanalysis will return NaNs when a time frequency >tile extends beyond a corresponding data segment. One would usually >expect a "U" shaped padding of NaNs at the boundaries of any TFR >which has longer time windows for lower frequencies. From the cfg >options you specify below I can see that you have a data segment of >1.1 seconds length and the moving windows cfg.t_tfimwin are quite >long at the low ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = 0.6666 s. >Hence the NaNs seem perfectly "normal" in this case. The only way to >avoid NaN in the time window of interest (using this type of >time-frequency tiling) is to make your epochs longer. > >Hope this helps, >Christian > > >On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: > >>Hello again. >> >>I am finding NaN whatever method I use (multitaper and wavelet >>analysis), yet using a different analysis tool with similar >>parameters I obtain clean results. >>epoch length = 1.1 s >>baseline length = 0.3 s >>sampling rate = 500Hz >> >>I tried several suggestions listed in the previous message list for >>a similar problem, but none seem to provide reasonable results (aka >>always NaN). >>Also tried with different subjects, no particular error otherwise. >>I am sending a sample script in case someone has a suggestion on this... >>Thanks for your help once more! >> >>Virginie >> >>%% ================================================ >>% TF analysis - MULTITAPER >>cfg = []; >>cfg.method = 'mtmconvol'; >>cfg.taper = 'hanning'; >>cfg.output = 'powandcsd'; >>%cfg.channel = 'all'; >>cfg.channel = 'E75'; >> >>%win_length = 0.128; >>%win_n = floor(2.*(1.1./win_length)-1); >> >>cfg.foi = 1:5:45; >>%cfg.t_ftimwin = ones(1,win_n).*win_length; >>cfg.t_ftimwin = 4./cfg.foi; >>%cfg.toi = -0.3:win_length/2:0.8; >>cfg.toi = -0.3:0.05:0.8; >> >>% cfg.pad = 'maxperlen'; >>% cfg.keeptrials = 'no'; >>% cfg.keeptapers ='no'; >>s08_ill_mult = freqanalysis(cfg,s08_ill); >> >>%% ======================== >>% plot freq data >>cfg = []; >>cfg.baseline = [-0.3 0]; >>cfg.layout = egilay; >>cfg.zlim = [-0.00001 0.000001]; % a comparer entre >>participants >>% warning off % NaN >>clf >>%multiplotTFR(cfg,s08_ill_mult); >>singleplotTFR(cfg,s08_ill_mult); >> >>%% ================================================ >>% TF analysis - wavelet >>cfg = []; >>cfg.method = 'wltconvol'; >>cfg.width = 4; >>cfg.output = 'pow'; >>cfg.foi = 1:2:30; >>cfg.toi = -0.3:0.05:0.8; >>s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>%% ======================== >>cfg = []; >>cfg.baseline = [-0.3 0]; >>cfg.zlim = [-1 1]; >>cfg.showlabels = 'yes'; >>cfg.layout = egilay; >>clf >>multiplotTFR(cfg, s14_ill_wvlt) >> >>%% ================================================ >> >> >> >> >> >> >>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. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD :::::::::::: 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. From c.hesse at FCDONDERS.RU.NL Mon Jun 25 21:49:16 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 25 Jun 2007 21:49:16 +0200 Subject: tfanalysis - NaN In-Reply-To: <20070625173838.B9F9D12CD1@fire-ox.its.caltech.edu> Message-ID: Hi Virginie, > thanks for your inputs. Actually, I have tried different window > sizes and frequency parameters (and wavelet, tf tiling,...). I > would not expect to obtain NaN for a narrow band in higher > frequencies (say 35-45Hz) with 2Hz and 4 cycles resolution with the > same epoch but I still do. > > I'll try with a longer epoch, but I find puzzling that I should > still get NaN when the resolution should be sufficient for the > computations. If these NaNs occur at the edges of the TFR then that could still be explained by the fact that the analysis time windows have been placed in such a way that some of them do not overlap 100% with the signal time axis. The time points in cfg.toi actually specify the middle of the time interval over which the spectral analysis is carried out. Therefore, if the extremes of cfg.toi coincide with the extremes of your epoch time axis then there will always be NaNs in at least the first and last windows at all frequencies. If the NaNs occur also at other points in the TFR then there may be something else going on ... is it the case that the NaNs are confined to the edges (edge regions) of your TFR? Regards, Christian >> Hi Virginie, >> >> the function freqanalysis will return NaNs when a time frequency >> tile extends beyond a corresponding data segment. One would >> usually expect a "U" shaped padding of NaNs at the boundaries of >> any TFR which has longer time windows for lower frequencies. From >> the cfg options you specify below I can see that you have a data >> segment of 1.1 seconds length and the moving windows cfg.t_tfimwin >> are quite long at the low ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = >> 0.6666 s. Hence the NaNs seem perfectly "normal" in this case. The >> only way to avoid NaN in the time window of interest (using this >> type of time-frequency tiling) is to make your epochs longer. >> >> Hope this helps, >> Christian >> >> >> On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >> >>> Hello again. >>> >>> I am finding NaN whatever method I use (multitaper and wavelet >>> analysis), yet using a different analysis tool with similar >>> parameters I obtain clean results. >>> epoch length = 1.1 s >>> baseline length = 0.3 s >>> sampling rate = 500Hz >>> >>> I tried several suggestions listed in the previous message list >>> for a similar problem, but none seem to provide reasonable >>> results (aka always NaN). >>> Also tried with different subjects, no particular error >>> otherwise. I am sending a sample script in case someone has a >>> suggestion on this... >>> Thanks for your help once more! >>> >>> Virginie >>> >>> %% ================================================ >>> % TF analysis - MULTITAPER >>> cfg = []; >>> cfg.method = 'mtmconvol'; >>> cfg.taper = 'hanning'; >>> cfg.output = 'powandcsd'; >>> %cfg.channel = 'all'; >>> cfg.channel = 'E75'; >>> >>> %win_length = 0.128; >>> %win_n = floor(2.*(1.1./win_length)-1); >>> >>> cfg.foi = 1:5:45; >>> %cfg.t_ftimwin = ones(1,win_n).*win_length; >>> cfg.t_ftimwin = 4./cfg.foi; >>> %cfg.toi = -0.3:win_length/2:0.8; >>> cfg.toi = -0.3:0.05:0.8; >>> >>> % cfg.pad = 'maxperlen'; >>> % cfg.keeptrials = 'no'; >>> % cfg.keeptapers ='no'; >>> s08_ill_mult = freqanalysis(cfg,s08_ill); >>> >>> %% ======================== >>> % plot freq data >>> cfg = []; >>> cfg.baseline = [-0.3 0]; >>> cfg.layout = egilay; >>> cfg.zlim = [-0.00001 0.000001]; % a comparer >>> entre participants >>> % warning off % NaN >>> clf >>> %multiplotTFR(cfg,s08_ill_mult); >>> singleplotTFR(cfg,s08_ill_mult); >>> >>> %% ================================================ >>> % TF analysis - wavelet >>> cfg = []; >>> cfg.method = 'wltconvol'; >>> cfg.width = 4; >>> cfg.output = 'pow'; >>> cfg.foi = 1:2:30; >>> cfg.toi = -0.3:0.05:0.8; >>> s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>> %% ======================== >>> cfg = []; >>> cfg.baseline = [-0.3 0]; >>> cfg.zlim = [-1 1]; >>> cfg.showlabels = 'yes'; >>> cfg.layout = egilay; >>> clf >>> multiplotTFR(cfg, s14_ill_wvlt) >>> >>> %% ================================================ >>> >>> >>> >>> >>> >>> >>> 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 gm >>> ail.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 >> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>> listserv.surfnet.nl/archives/fieldtrip.html and >> fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ > > Virginie van Wassenhove, PhD > > :::::::::::: 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. > ---------------------------------------------------------------------- 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 vvw at CALTECH.EDU Mon Jun 25 23:11:45 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Mon, 25 Jun 2007 14:11:45 -0700 Subject: tfanalysis - NaN In-Reply-To: <307AB957-C65C-4E4F-9BDA-28F338AACEE9@fcdonders.ru.nl> Message-ID: Hi Christian >>thanks for your inputs. Actually, I have tried different window >>sizes and frequency parameters (and wavelet, tf tiling,...). I >>would not expect to obtain NaN for a narrow band in higher >>frequencies (say 35-45Hz) with 2Hz and 4 cycles resolution with the >>same epoch but I still do. >> >>I'll try with a longer epoch, but I find puzzling that I should >>still get NaN when the resolution should be sufficient for the computations. > >If these NaNs occur at the edges of the TFR then that could still be >explained by the fact that the analysis time windows have been >placed in such a way that some of them do not overlap 100% with the >signal time axis. The time points in cfg.toi actually specify the >middle of the time interval over which the spectral analysis is >carried out. Therefore, if the extremes of cfg.toi coincide with the >extremes of your epoch time axis then there will always be NaNs in >at least the first and last windows at all frequencies. Yes, I do realize that. >If the NaNs occur also at other points in the TFR then there may be >something else going on ... is it the case that the NaNs are >confined to the edges (edge regions) of your TFR? The entire matrices (cfg.powspctrm) return NaN whether for (i)1.1 secs or 2.4 secs epochs (ii) narrow (25-50) or wide (2-50) bandwidth (iii) short or large cfg. toi (then would expect U shape) Virginie >Regards, >Christian > > >>>Hi Virginie, >>> >>>the function freqanalysis will return NaNs when a time frequency >>>tile extends beyond a corresponding data segment. One would >>>usually expect a "U" shaped padding of NaNs at the boundaries of >>>any TFR which has longer time windows for lower frequencies. From >>>the cfg options you specify below I can see that you have a data >>>segment of 1.1 seconds length and the moving windows cfg.t_tfimwin >>>are quite long at the low ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = >>>0.6666 s. Hence the NaNs seem perfectly "normal" in this case. The >>>only way to avoid NaN in the time window of interest (using this >>>type of time-frequency tiling) is to make your epochs longer. >>> >>>Hope this helps, >>>Christian >>> >>> >>>On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >>> >>>>Hello again. >>>> >>>>I am finding NaN whatever method I use (multitaper and wavelet >>>>analysis), yet using a different analysis tool with similar >>>>parameters I obtain clean results. >>>>epoch length = 1.1 s >>>>baseline length = 0.3 s >>>>sampling rate = 500Hz >>>> >>>>I tried several suggestions listed in the previous message list >>>>for a similar problem, but none seem to provide reasonable >>>>results (aka always NaN). >>>>Also tried with different subjects, no particular error >>>>otherwise. I am sending a sample script in case someone has a >>>>suggestion on this... >>>>Thanks for your help once more! >>>> >>>>Virginie >>>> >>>>%% ================================================ >>>>% TF analysis - MULTITAPER >>>>cfg = []; >>>>cfg.method = 'mtmconvol'; >>>>cfg.taper = 'hanning'; >>>>cfg.output = 'powandcsd'; >>>>%cfg.channel = 'all'; >>>>cfg.channel = 'E75'; >>>> >>>>%win_length = 0.128; >>>>%win_n = floor(2.*(1.1./win_length)-1); >>>> >>>>cfg.foi = 1:5:45; >>>>%cfg.t_ftimwin = ones(1,win_n).*win_length; >>>>cfg.t_ftimwin = 4./cfg.foi; >>>>%cfg.toi = -0.3:win_length/2:0.8; >>>>cfg.toi = -0.3:0.05:0.8; >>>> >>>>% cfg.pad = 'maxperlen'; >>>>% cfg.keeptrials = 'no'; >>>>% cfg.keeptapers ='no'; >>>>s08_ill_mult = freqanalysis(cfg,s08_ill); >>>> >>>>%% ======================== >>>>% plot freq data >>>>cfg = []; >>>>cfg.baseline = [-0.3 0]; >>>>cfg.layout = egilay; >>>>cfg.zlim = [-0.00001 0.000001]; % a comparer >>>>entre participants >>>>% warning off % NaN >>>>clf >>>>%multiplotTFR(cfg,s08_ill_mult); >>>>singleplotTFR(cfg,s08_ill_mult); >>>> >>>>%% ================================================ >>>>% TF analysis - wavelet >>>>cfg = []; >>>>cfg.method = 'wltconvol'; >>>>cfg.width = 4; >>>>cfg.output = 'pow'; >>>>cfg.foi = 1:2:30; >>>>cfg.toi = -0.3:0.05:0.8; >>>>s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>>>%% ======================== >>>>cfg = []; >>>>cfg.baseline = [-0.3 0]; >>>>cfg.zlim = [-1 1]; >>>>cfg.showlabels = 'yes'; >>>>cfg.layout = egilay; >>>>clf >>>>multiplotTFR(cfg, s14_ill_wvlt) >>>> >>>>%% ================================================ >>>> >>>> >>>> >>>> >>>> >>>> >>>>Virginie van Wassenhove, PhD >>>> >>>>:::::::::::: contact info ::::::::::::: >>>>Caltech - Division of Biology >>>>1200 E. California Blvd M/C 139-74 >>>>Pasadena CA 91125 USA >>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>><mailto:vvw at caltech.edu>vvw at caltech.edu >>>><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>W: 626.395.8959 >>>><http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>> >>>>:::::::::::::::::: extras :::::::::::::::::::: >>>><http://www.kiva.org>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>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>and >>>><http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>> >>>---------------------------------------------------------------------- >>>Christian Hesse, PhD, MIEEE >>> >>>F.C. Donders Centre for Cognitive Neuroimaging >>>P.O. Box 9101 >>>NL-6500 HB Nijmegen >>>The Netherlands >>> >>>Tel.: +31 (0)24 36 68293 >>>Fax: +31 (0)24 36 10989 >>> >>>Email: >>><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>Web: >>><http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>---------------------------------------------------------------------- >>> >>> >>> >>> >>>---------------------------------- >>> >>>The aim of this list is to facilitate the discussion between users >>>of the FieldTrip toolbox, to share experiences and to discuss new >>>ideas for MEG and EEG analysis. >>> >>>http://listserv.surfnet.nl/archives/fieldtrip.html >>> >>>http://www.ru.nl/fcdonders/fieldtrip/ >> >>Virginie van Wassenhove, PhD >> >>:::::::::::: 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. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD :::::::::::: 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. From c.hesse at FCDONDERS.RU.NL Mon Jun 25 23:30:48 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 25 Jun 2007 23:30:48 +0200 Subject: tfanalysis - NaN In-Reply-To: <20070625211145.69AEF1AA83@earth-ox.its.caltech.edu> Message-ID: Hi Virginie, >> If the NaNs occur also at other points in the TFR then there may >> be something else going on ... is it the case that the NaNs are >> confined to the edges (edge regions) of your TFR? > > The entire matrices (cfg.powspctrm) return NaN whether for > (i)1.1 secs or 2.4 secs epochs > (ii) narrow (25-50) or wide (2-50) bandwidth > (iii) short or large cfg. toi (then would expect U shape) > That's not good! Does the call to FREQANALYSIS produce any (potentially useful) warnings? Regards, Christian >>>> >>>> Hi Virginie, >>>> >>>> the function freqanalysis will return NaNs when a time frequency >>>> tile extends beyond a corresponding data segment. One would >>>> usually expect a "U" shaped padding of NaNs at the boundaries of >>>> any TFR which has longer time windows for lower frequencies. >>>> From the cfg options you specify below I can see that you have a >>>> data segment of 1.1 seconds length and the moving windows >>>> cfg.t_tfimwin are quite long at the low ffrequencies, e.g., 1 Hz >>>> = 4 s, 6 Hz = 0.6666 s. Hence the NaNs seem perfectly "normal" >>>> in this case. The only way to avoid NaN in the time window of >>>> interest (using this type of time-frequency tiling) is to make >>>> your epochs longer. >>>> >>>> Hope this helps, >>>> Christian >>>> >>>> >>>> On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >>>> >>>>> Hello again. >>>>> >>>>> I am finding NaN whatever method I use (multitaper and wavelet >>>>> analysis), yet using a different analysis tool with similar >>>>> parameters I obtain clean results. >>>>> epoch length = 1.1 s >>>>> baseline length = 0.3 s >>>>> sampling rate = 500Hz >>>>> >>>>> I tried several suggestions listed in the previous message list >>>>> for a similar problem, but none seem to provide reasonable >>>>> results (aka always NaN). >>>>> Also tried with different subjects, no particular error >>>>> otherwise. I am sending a sample script in case someone has a >>>>> suggestion on this... >>>>> Thanks for your help once more! >>>>> >>>>> Virginie >>>>> >>>>> %% ================================================ >>>>> % TF analysis - MULTITAPER >>>>> cfg = []; >>>>> cfg.method = 'mtmconvol'; >>>>> cfg.taper = 'hanning'; >>>>> cfg.output = 'powandcsd'; >>>>> %cfg.channel = 'all'; >>>>> cfg.channel = 'E75'; >>>>> >>>>> %win_length = 0.128; >>>>> %win_n = floor(2.*(1.1./win_length)-1); >>>>> >>>>> cfg.foi = 1:5:45; >>>>> %cfg.t_ftimwin = ones(1,win_n).*win_length; >>>>> cfg.t_ftimwin = 4./cfg.foi; >>>>> %cfg.toi = -0.3:win_length/2:0.8; >>>>> cfg.toi = -0.3:0.05:0.8; >>>>> >>>>> % cfg.pad = 'maxperlen'; >>>>> % cfg.keeptrials = 'no'; >>>>> % cfg.keeptapers ='no'; >>>>> s08_ill_mult = freqanalysis(cfg,s08_ill); >>>>> >>>>> %% ======================== >>>>> % plot freq data >>>>> cfg = []; >>>>> cfg.baseline = [-0.3 0]; >>>>> cfg.layout = egilay; >>>>> cfg.zlim = [-0.00001 0.000001]; % a comparer >>>>> entre participants >>>>> % warning off % NaN >>>>> clf >>>>> %multiplotTFR(cfg,s08_ill_mult); >>>>> singleplotTFR(cfg,s08_ill_mult); >>>>> >>>>> %% ================================================ >>>>> % TF analysis - wavelet >>>>> cfg = []; >>>>> cfg.method = 'wltconvol'; >>>>> cfg.width = 4; >>>>> cfg.output = 'pow'; >>>>> cfg.foi = 1:2:30; >>>>> cfg.toi = -0.3:0.05:0.8; >>>>> s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>>>> %% ======================== >>>>> cfg = []; >>>>> cfg.baseline = [-0.3 0]; >>>>> cfg.zlim = [-1 1]; >>>>> cfg.showlabels = 'yes'; >>>>> cfg.layout = egilay; >>>>> clf >>>>> multiplotTFR(cfg, s14_ill_wvlt) >>>>> >>>>> %% ================================================ >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> Virginie van Wassenhove, PhD >>>>> >>>>> :::::::::::: contact info ::::::::::::: >>>>> Caltech - Division of Biology >>>>> 1200 E. California Blvd M/C 139-74 >>>>> Pasadena CA 91125 USA >>>>> ::::::::::::::::::::::::::::::::::::::::::::::::: >>>>> <mailto:vvw at caltech.edu>>>>> h.edu>vvw at caltech.edu >>>>> <mailto:Virginie.van.Was >>>>> senhove at gmail.com>Virgin >>>>> ie.van.Wassenhove at gmail.com >>>>> W: 626.395.8959 >>>>> <http://www.its.caltech.edu/ >>>>> ~vvw>http://www.its.caltech.edu/~vvw >>>>> >>>>> :::::::::::::::::: extras :::::::::::::::::::: >>>>> <http://www.kiva.org>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 <>>>> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>>>> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>>>> listserv.surfnet.nl/archives/fieldtrip.html and <>>>> www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/ >>>>> fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> ------------------------------------------------------------------- >>>> --- >>>> Christian Hesse, PhD, MIEEE >>>> >>>> F.C. Donders Centre for Cognitive Neuroimaging >>>> P.O. Box 9101 >>>> NL-6500 HB Nijmegen >>>> The Netherlands >>>> >>>> Tel.: +31 (0)24 36 68293 >>>> Fax: +31 (0)24 36 10989 >>>> >>>> Email: >>>> <mailto:c.hesse at fcdonders.ru.nl>>>> ilto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>> Web: <http:// >>>> www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>> ------------------------------------------------------------------- >>>> --- >>>> >>>> >>>> >>>> >>>> ---------------------------------- >>>> >>>> The aim of this list is to facilitate the discussion between >>>> users of the FieldTrip toolbox, to share experiences and to >>>> discuss new ideas for MEG and EEG analysis. >>>> >>>> http:// >>>> listserv.surfnet.nl/archives/fieldtrip.html >>>> >>>> http://www.ru.nl/fcdonders/fieldtrip/ >>> >>> Virginie van Wassenhove, PhD >>> >>> :::::::::::: 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 gm >>> ail.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 >> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>> listserv.surfnet.nl/archives/fieldtrip.html and >> fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ > > Virginie van Wassenhove, PhD > > :::::::::::: 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. > ---------------------------------------------------------------------- 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 vvw at CALTECH.EDU Mon Jun 25 23:54:49 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Mon, 25 Jun 2007 14:54:49 -0700 Subject: tfanalysis - NaN In-Reply-To: Message-ID: >That's not good! Indeed! >Does the call to FREQANALYSIS produce any (potentially useful) warnings? All channels, all trials and all samples are correctly reported. Using the wavelet analysis, there is no apparent warning. Using the multitaper, the warning is that there's only 1 tapper (now the problem is that there's 1 tapper only, even when I greatly reduce the width of a window and extend the length of the epoch...) Are the tf data normalized and how are they normalized? -vv >Regards, >Christian > > > >>>>> >>>>>Hi Virginie, >>>>> >>>>>the function freqanalysis will return NaNs when a time frequency >>>>>tile extends beyond a corresponding data segment. One would >>>>>usually expect a "U" shaped padding of NaNs at the boundaries of >>>>>any TFR which has longer time windows for lower frequencies. >>>>> From the cfg options you specify below I can see that you have >>>>>a data segment of 1.1 seconds length and the moving windows >>>>>cfg.t_tfimwin are quite long at the low ffrequencies, e.g., 1 Hz >>>>>= 4 s, 6 Hz = 0.6666 s. Hence the NaNs seem perfectly "normal" >>>>>in this case. The only way to avoid NaN in the time window of >>>>>interest (using this type of time-frequency tiling) is to make >>>>>your epochs longer. >>>>> >>>>>Hope this helps, >>>>>Christian >>>>> >>>>> >>>>>On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >>>>> >>>>>>Hello again. >>>>>> >>>>>>I am finding NaN whatever method I use (multitaper and wavelet >>>>>>analysis), yet using a different analysis tool with similar >>>>>>parameters I obtain clean results. >>>>>>epoch length = 1.1 s >>>>>>baseline length = 0.3 s >>>>>>sampling rate = 500Hz >>>>>> >>>>>>I tried several suggestions listed in the previous message list >>>>>>for a similar problem, but none seem to provide reasonable >>>>>>results (aka always NaN). >>>>>>Also tried with different subjects, no particular error >>>>>>otherwise. I am sending a sample script in case someone has a >>>>>>suggestion on this... >>>>>>Thanks for your help once more! >>>>>> >>>>>>Virginie >>>>>> >>>>>>%% ================================================ >>>>>>% TF analysis - MULTITAPER >>>>>>cfg = []; >>>>>>cfg.method = 'mtmconvol'; >>>>>>cfg.taper = 'hanning'; >>>>>>cfg.output = 'powandcsd'; >>>>>>%cfg.channel = 'all'; >>>>>>cfg.channel = 'E75'; >>>>>> >>>>>>%win_length = 0.128; >>>>>>%win_n = floor(2.*(1.1./win_length)-1); >>>>>> >>>>>>cfg.foi = 1:5:45; >>>>>>%cfg.t_ftimwin = ones(1,win_n).*win_length; >>>>>>cfg.t_ftimwin = 4./cfg.foi; >>>>>>%cfg.toi = -0.3:win_length/2:0.8; >>>>>>cfg.toi = -0.3:0.05:0.8; >>>>>> >>>>>>% cfg.pad = 'maxperlen'; >>>>>>% cfg.keeptrials = 'no'; >>>>>>% cfg.keeptapers ='no'; >>>>>>s08_ill_mult = freqanalysis(cfg,s08_ill); >>>>>> >>>>>>%% ======================== >>>>>>% plot freq data >>>>>>cfg = []; >>>>>>cfg.baseline = [-0.3 0]; >>>>>>cfg.layout = egilay; >>>>>>cfg.zlim = [-0.00001 0.000001]; % a comparer >>>>>>entre participants >>>>>>% warning off % NaN >>>>>>clf >>>>>>%multiplotTFR(cfg,s08_ill_mult); >>>>>>singleplotTFR(cfg,s08_ill_mult); >>>>>> >>>>>>%% ================================================ >>>>>>% TF analysis - wavelet >>>>>>cfg = []; >>>>>>cfg.method = 'wltconvol'; >>>>>>cfg.width = 4; >>>>>>cfg.output = 'pow'; >>>>>>cfg.foi = 1:2:30; >>>>>>cfg.toi = -0.3:0.05:0.8; >>>>>>s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>>>>>%% ======================== >>>>>>cfg = []; >>>>>>cfg.baseline = [-0.3 0]; >>>>>>cfg.zlim = [-1 1]; >>>>>>cfg.showlabels = 'yes'; >>>>>>cfg.layout = egilay; >>>>>>clf >>>>>>multiplotTFR(cfg, s14_ill_wvlt) >>>>>> >>>>>>%% ================================================ >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>Virginie van Wassenhove, PhD >>>>>> >>>>>>:::::::::::: contact info ::::::::::::: >>>>>>Caltech - Division of Biology >>>>>>1200 E. California Blvd M/C 139-74 >>>>>>Pasadena CA 91125 USA >>>>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>>>><<mailto:vvw at caltech.edu>mailto:vvw at caltech.edu><mailto:vvw at caltech.edu>vvw at caltech.edu >>>>>><<mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>>>W: 626.395.8959 >>>>>><<http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>>>> >>>>>>:::::::::::::::::: extras :::::::::::::::::::: >>>>>><<http://www.kiva.org>http://www.kiva.org>http://www.kiva.org >>>>>><http://www.thehungersite.com>http://www.thehungersite.com/ >>>>>><http://www.agloco.com/r/BBBS1539>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>http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>>>and >>>>>><<http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>>>> >>>>>---------------------------------------------------------------------- >>>>>Christian Hesse, PhD, MIEEE >>>>> >>>>>F.C. Donders Centre for Cognitive Neuroimaging >>>>>P.O. Box 9101 >>>>>NL-6500 HB Nijmegen >>>>>The Netherlands >>>>> >>>>>Tel.: +31 (0)24 36 68293 >>>>>Fax: +31 (0)24 36 10989 >>>>> >>>>>Email: >>>>><<mailto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru.nl><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>>>Web: >>>>><<http://www.fcdonders.ru.nl>http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>>>---------------------------------------------------------------------- >>>>> >>>>> >>>>> >>>>> >>>>>---------------------------------- >>>>> >>>>>The aim of this list is to facilitate the discussion between >>>>>users of the FieldTrip toolbox, to share experiences and to >>>>>discuss new ideas for MEG and EEG analysis. >>>>> >>>>><http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>> >>>>>http://www.ru.nl/fcdonders/fieldtrip/ >>>> >>>>Virginie van Wassenhove, PhD >>>> >>>>:::::::::::: contact info ::::::::::::: >>>>Caltech - Division of Biology >>>>1200 E. California Blvd M/C 139-74 >>>>Pasadena CA 91125 USA >>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>><mailto:vvw at caltech.edu>vvw at caltech.edu >>>><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>W: 626.395.8959 >>>><http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>> >>>>:::::::::::::::::: extras :::::::::::::::::::: >>>><http://www.kiva.org>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>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>and >>>><http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>> >>>---------------------------------------------------------------------- >>>Christian Hesse, PhD, MIEEE >>> >>>F.C. Donders Centre for Cognitive Neuroimaging >>>P.O. Box 9101 >>>NL-6500 HB Nijmegen >>>The Netherlands >>> >>>Tel.: +31 (0)24 36 68293 >>>Fax: +31 (0)24 36 10989 >>> >>>Email: >>><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>Web: >>><http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>---------------------------------------------------------------------- >>> >>> >>> >>> >>>---------------------------------- >>> >>>The aim of this list is to facilitate the discussion between users >>>of the FieldTrip toolbox, to share experiences and to discuss new >>>ideas for MEG and EEG analysis. >>> >>>http://listserv.surfnet.nl/archives/fieldtrip.html >>> >>>http://www.ru.nl/fcdonders/fieldtrip/ >> >>Virginie van Wassenhove, PhD >> >>:::::::::::: 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. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD :::::::::::: 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. From c.hesse at FCDONDERS.RU.NL Tue Jun 26 00:19:18 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Tue, 26 Jun 2007 00:19:18 +0200 Subject: tfanalysis - NaN In-Reply-To: <20070625215511.7216A1AAA6@water-ox.its.caltech.edu> Message-ID: >> Does the call to FREQANALYSIS produce any (potentially useful) >> warnings? > > All channels, all trials and all samples are correctly reported. > Using the wavelet analysis, there is no apparent warning. > Using the multitaper, the warning is that there's only 1 tapper > (now the problem is that there's 1 tapper only, even when I greatly > reduce the width of a window and extend the length of the epoch...) In the configuration options you have specified cfg.taper = 'hanning' which will apply only one (i.e., the hanning) taper to your data. If you want to use multitapers you need to set cfg.taper = 'dpss' or just leave the field it out of the cfg (since multitapers are the default). > Are the tf data normalized and how are they normalized? I'm not really sure what you mean by normalized (the csd is obviously a density) but if there were any divide by zero issues then matlab would be chucking warnings. What happens when you set cfg.output = 'pow'; ? Christian >> >> >>>>>> >>>>>> Hi Virginie, >>>>>> >>>>>> the function freqanalysis will return NaNs when a time >>>>>> frequency tile extends beyond a corresponding data segment. >>>>>> One would usually expect a "U" shaped padding of NaNs at the >>>>>> boundaries of any TFR which has longer time windows for lower >>>>>> frequencies. From the cfg options you specify below I can see >>>>>> that you have a data segment of 1.1 seconds length and the >>>>>> moving windows cfg.t_tfimwin are quite long at the low >>>>>> ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = 0.6666 s. Hence the >>>>>> NaNs seem perfectly "normal" in this case. The only way to >>>>>> avoid NaN in the time window of interest (using this type of >>>>>> time-frequency tiling) is to make your epochs longer. >>>>>> >>>>>> Hope this helps, >>>>>> Christian >>>>>> >>>>>> >>>>>> On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >>>>>> >>>>>>> Hello again. >>>>>>> >>>>>>> I am finding NaN whatever method I use (multitaper and >>>>>>> wavelet analysis), yet using a different analysis tool with >>>>>>> similar parameters I obtain clean results. >>>>>>> epoch length = 1.1 s >>>>>>> baseline length = 0.3 s >>>>>>> sampling rate = 500Hz >>>>>>> >>>>>>> I tried several suggestions listed in the previous message >>>>>>> list for a similar problem, but none seem to provide >>>>>>> reasonable results (aka always NaN). >>>>>>> Also tried with different subjects, no particular error >>>>>>> otherwise. I am sending a sample script in case someone has a >>>>>>> suggestion on this... >>>>>>> Thanks for your help once more! >>>>>>> >>>>>>> Virginie >>>>>>> >>>>>>> %% ================================================ >>>>>>> % TF analysis - MULTITAPER >>>>>>> cfg = []; >>>>>>> cfg.method = 'mtmconvol'; >>>>>>> cfg.taper = 'hanning'; >>>>>>> cfg.output = 'powandcsd'; >>>>>>> %cfg.channel = 'all'; >>>>>>> cfg.channel = 'E75'; >>>>>>> >>>>>>> %win_length = 0.128; >>>>>>> %win_n = floor(2.*(1.1./win_length)-1); >>>>>>> >>>>>>> cfg.foi = 1:5:45; >>>>>>> %cfg.t_ftimwin = ones(1,win_n).*win_length; >>>>>>> cfg.t_ftimwin = 4./cfg.foi; >>>>>>> %cfg.toi = -0.3:win_length/2:0.8; >>>>>>> cfg.toi = -0.3:0.05:0.8; >>>>>>> >>>>>>> % cfg.pad = 'maxperlen'; >>>>>>> % cfg.keeptrials = 'no'; >>>>>>> % cfg.keeptapers ='no'; >>>>>>> s08_ill_mult = freqanalysis(cfg,s08_ill); >>>>>>> >>>>>>> %% ======================== >>>>>>> % plot freq data >>>>>>> cfg = []; >>>>>>> cfg.baseline = [-0.3 0]; >>>>>>> cfg.layout = egilay; >>>>>>> cfg.zlim = [-0.00001 0.000001]; % a comparer >>>>>>> entre participants >>>>>>> % warning off % NaN >>>>>>> clf >>>>>>> %multiplotTFR(cfg,s08_ill_mult); >>>>>>> singleplotTFR(cfg,s08_ill_mult); >>>>>>> >>>>>>> %% ================================================ >>>>>>> % TF analysis - wavelet >>>>>>> cfg = []; >>>>>>> cfg.method = 'wltconvol'; >>>>>>> cfg.width = 4; >>>>>>> cfg.output = 'pow'; >>>>>>> cfg.foi = 1:2:30; >>>>>>> cfg.toi = -0.3:0.05:0.8; >>>>>>> s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>>>>>> %% ======================== >>>>>>> cfg = []; >>>>>>> cfg.baseline = [-0.3 0]; >>>>>>> cfg.zlim = [-1 1]; >>>>>>> cfg.showlabels = 'yes'; >>>>>>> cfg.layout = egilay; >>>>>>> clf >>>>>>> multiplotTFR(cfg, s14_ill_wvlt) >>>>>>> >>>>>>> %% ================================================ >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Virginie van Wassenhove, PhD >>>>>>> >>>>>>> :::::::::::: contact info ::::::::::::: >>>>>>> Caltech - Division of Biology >>>>>>> 1200 E. California Blvd M/C 139-74 >>>>>>> Pasadena CA 91125 USA >>>>>>> ::::::::::::::::::::::::::::::::::::::::::::::::: >>>>>>> <<mailto:vvw at caltech.edu>mailto:vvw at calt >>>>>>> ech.edu><mailto:vvw at caltech.edu>>>>>>> vvw at caltech.edu>vvw at caltech.edu >>>>>>> <<mailto:Virginie.van. >>>>>>> Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><< >>>>>>> mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Was >>>>>>> senhove at gmail.com>Virg >>>>>>> inie.van.Wassenhove at gmail.com >>>>>>> W: 626.395.8959 >>>>>>> <<http://www.its.caltech.edu/ >>>>>>> ~vvw>http://www.its.caltech.edu/~vvw>http:// >>>>>>> www.its.caltech.edu/~vvw >>>>>>> >>>>>>> :::::::::::::::::: extras :::::::::::::::::::: >>>>>>> <<http://www.kiva.org>http:// >>>>>>> www.kiva.org>http://www.kiva.org >>>>>>> <http:// >>>>>>> www.thehungersite.com>http://www.thehungersite.com/ >>>>>>> <http://www.agloco.com/r/ >>>>>>> BBBS1539>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>http:// >>>>>>> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>>>>>> listserv.surfnet.nl/archives/fieldtrip.html and <<>>>>>> www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/ >>>>>>> fieldtrip>http://www.ru.nl/fcdonders/fieldtrip>http:// >>>>>>> www.ru.nl/fcdonders/fieldtrip. >>>>>> >>>>>> ----------------------------------------------------------------- >>>>>> ----- >>>>>> Christian Hesse, PhD, MIEEE >>>>>> >>>>>> F.C. Donders Centre for Cognitive Neuroimaging >>>>>> P.O. Box 9101 >>>>>> NL-6500 HB Nijmegen >>>>>> The Netherlands >>>>>> >>>>>> Tel.: +31 (0)24 36 68293 >>>>>> Fax: +31 (0)24 36 10989 >>>>>> >>>>>> Email: >>>>>> <<mailto:c.hesse at fcdonders.ru.nl> >>>>>> mailto:c.hesse at fcdonders.ru.nl><m >>>>>> ailto:c.hesse at fcdonders.ru.nl>c.h >>>>>> esse at fcdonders.ru.nl >>>>>> Web: <<http:// >>>>>> www.fcdonders.ru.nl>http:// >>>>>> www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>>>> ----------------------------------------------------------------- >>>>>> ----- >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ---------------------------------- >>>>>> >>>>>> The aim of this list is to facilitate the discussion between >>>>>> users of the FieldTrip toolbox, to share experiences and to >>>>>> discuss new ideas for MEG and EEG analysis. >>>>>> >>>>>> <http:// >>>>>> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>>>>> listserv.surfnet.nl/archives/fieldtrip.html >>>>>> >>>>>> http://www.ru.nl/ >>>>>> fcdonders/fieldtrip/ >>>>> >>>>> Virginie van Wassenhove, PhD >>>>> >>>>> :::::::::::: contact info ::::::::::::: >>>>> Caltech - Division of Biology >>>>> 1200 E. California Blvd M/C 139-74 >>>>> Pasadena CA 91125 USA >>>>> ::::::::::::::::::::::::::::::::::::::::::::::::: >>>>> <mailto:vvw at caltech.edu>>>>> h.edu>vvw at caltech.edu >>>>> <mailto:Virginie.van.Was >>>>> senhove at gmail.com>Virgin >>>>> ie.van.Wassenhove at gmail.com >>>>> W: 626.395.8959 >>>>> <http://www.its.caltech.edu/ >>>>> ~vvw>http://www.its.caltech.edu/~vvw >>>>> >>>>> :::::::::::::::::: extras :::::::::::::::::::: >>>>> <http://www.kiva.org>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 <>>>> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>>>> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>>>> listserv.surfnet.nl/archives/fieldtrip.html and <>>>> www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/ >>>>> fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> ------------------------------------------------------------------- >>>> --- >>>> Christian Hesse, PhD, MIEEE >>>> >>>> F.C. Donders Centre for Cognitive Neuroimaging >>>> P.O. Box 9101 >>>> NL-6500 HB Nijmegen >>>> The Netherlands >>>> >>>> Tel.: +31 (0)24 36 68293 >>>> Fax: +31 (0)24 36 10989 >>>> >>>> Email: >>>> <mailto:c.hesse at fcdonders.ru.nl>>>> ilto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>> Web: <http:// >>>> www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>> ------------------------------------------------------------------- >>>> --- >>>> >>>> >>>> >>>> >>>> ---------------------------------- >>>> >>>> The aim of this list is to facilitate the discussion between >>>> users of the FieldTrip toolbox, to share experiences and to >>>> discuss new ideas for MEG and EEG analysis. >>>> >>>> http:// >>>> listserv.surfnet.nl/archives/fieldtrip.html >>>> >>>> http://www.ru.nl/fcdonders/fieldtrip/ >>> >>> Virginie van Wassenhove, PhD >>> >>> :::::::::::: 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 gm >>> ail.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 >> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>> listserv.surfnet.nl/archives/fieldtrip.html and >> fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ > > Virginie van Wassenhove, PhD > > :::::::::::: 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. > ---------------------------------------------------------------------- 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 vvw at CALTECH.EDU Tue Jun 26 06:25:14 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Mon, 25 Jun 2007 21:25:14 -0700 Subject: tfanalysis - NaN In-Reply-To: <79C8D694-E710-4D43-8C7A-228A5DD69473@fcdonders.ru.nl> Message-ID: Hi Christian, >In the configuration options you have specified cfg.taper = >'hanning' which will apply only one (i.e., the hanning) taper to >your data. If you want to use multitapers you need to set cfg.taper >= 'dpss' or just leave the field it out of the cfg (since >multitapers are the default). Ah yes, sorry, I have been playing around with most parameters so both 'hanning' and 'dpss' lead to the same result (and other windows and wavelet analysis). >I'm not really sure what you mean by normalized (the csd is >obviously a density) but if there were any divide by zero issues >then matlab would be chucking warnings. What happens when you set >cfg.output = 'pow'; ? Same thing whether I use 'pow' or 'powandcsd'. So I meant 'pow' normalization (I assume it's baseline corrected on the pre-stimulus interval?). Since I imported raw data from besa (as .dat files) there might be an error in the previous specifications / preprocessing. I don't see otherwise see any major confound in the tf analysis... I will look some more into that part. Thanks for your help! -vv >>>>>>>Hi Virginie, >>>>>>> >>>>>>>the function freqanalysis will return NaNs when a time >>>>>>>frequency tile extends beyond a corresponding data segment. >>>>>>>One would usually expect a "U" shaped padding of NaNs at the >>>>>>>boundaries of any TFR which has longer time windows for lower >>>>>>>frequencies. From the cfg options you specify below I can see >>>>>>>that you have a data segment of 1.1 seconds length and the >>>>>>>moving windows cfg.t_tfimwin are quite long at the low >>>>>>>ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = 0.6666 s. Hence the >>>>>>>NaNs seem perfectly "normal" in this case. The only way to >>>>>>>avoid NaN in the time window of interest (using this type of >>>>>>>time-frequency tiling) is to make your epochs longer. >>>>>>> >>>>>>>Hope this helps, >>>>>>>Christian >>>>>>> >>>>>>> >>>>>>>On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >>>>>>> >>>>>>>>Hello again. >>>>>>>> >>>>>>>>I am finding NaN whatever method I use (multitaper and >>>>>>>>wavelet analysis), yet using a different analysis tool with >>>>>>>>similar parameters I obtain clean results. >>>>>>>>epoch length = 1.1 s >>>>>>>>baseline length = 0.3 s >>>>>>>>sampling rate = 500Hz >>>>>>>> >>>>>>>>I tried several suggestions listed in the previous message >>>>>>>>list for a similar problem, but none seem to provide >>>>>>>>reasonable results (aka always NaN). >>>>>>>>Also tried with different subjects, no particular error >>>>>>>>otherwise. I am sending a sample script in case someone has a >>>>>>>>suggestion on this... >>>>>>>>Thanks for your help once more! >>>>>>>> >>>>>>>>Virginie >>>>>>>> >>>>>>>>%% ================================================ >>>>>>>>% TF analysis - MULTITAPER >>>>>>>>cfg = []; >>>>>>>>cfg.method = 'mtmconvol'; >>>>>>>>cfg.taper = 'hanning'; >>>>>>>>cfg.output = 'powandcsd'; >>>>>>>>%cfg.channel = 'all'; >>>>>>>>cfg.channel = 'E75'; >>>>>>>> >>>>>>>>%win_length = 0.128; >>>>>>>>%win_n = floor(2.*(1.1./win_length)-1); >>>>>>>> >>>>>>>>cfg.foi = 1:5:45; >>>>>>>>%cfg.t_ftimwin = ones(1,win_n).*win_length; >>>>>>>>cfg.t_ftimwin = 4./cfg.foi; >>>>>>>>%cfg.toi = -0.3:win_length/2:0.8; >>>>>>>>cfg.toi = -0.3:0.05:0.8; >>>>>>>> >>>>>>>>% cfg.pad = 'maxperlen'; >>>>>>>>% cfg.keeptrials = 'no'; >>>>>>>>% cfg.keeptapers ='no'; >>>>>>>>s08_ill_mult = freqanalysis(cfg,s08_ill); >>>>>>>> >>>>>>>>%% ======================== >>>>>>>>% plot freq data >>>>>>>>cfg = []; >>>>>>>>cfg.baseline = [-0.3 0]; >>>>>>>>cfg.layout = egilay; >>>>>>>>cfg.zlim = [-0.00001 0.000001]; % a comparer >>>>>>>>entre participants >>>>>>>>% warning off % NaN >>>>>>>>clf >>>>>>>>%multiplotTFR(cfg,s08_ill_mult); >>>>>>>>singleplotTFR(cfg,s08_ill_mult); >>>>>>>> >>>>>>>>%% ================================================ >>>>>>>>% TF analysis - wavelet >>>>>>>>cfg = []; >>>>>>>>cfg.method = 'wltconvol'; >>>>>>>>cfg.width = 4; >>>>>>>>cfg.output = 'pow'; >>>>>>>>cfg.foi = 1:2:30; >>>>>>>>cfg.toi = -0.3:0.05:0.8; >>>>>>>>s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>>>>>>>%% ======================== >>>>>>>>cfg = []; >>>>>>>>cfg.baseline = [-0.3 0]; >>>>>>>>cfg.zlim = [-1 1]; >>>>>>>>cfg.showlabels = 'yes'; >>>>>>>>cfg.layout = egilay; >>>>>>>>clf >>>>>>>>multiplotTFR(cfg, s14_ill_wvlt) >>>>>>>> >>>>>>>>%% ================================================ >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>Virginie van Wassenhove, PhD >>>>>>>> >>>>>>>>:::::::::::: contact info ::::::::::::: >>>>>>>>Caltech - Division of Biology >>>>>>>>1200 E. California Blvd M/C 139-74 >>>>>>>>Pasadena CA 91125 USA >>>>>>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>>>>>><<<mailto:vvw at caltech.edu>mailto:vvw at caltech.edu>mailto:vvw at caltech.edu><<mailto:vvw at caltech.edu>mailto:vvw at caltech.edu><mailto:vvw at caltech.edu>vvw at caltech.edu >>>>>>>><<<mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><<mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>>>>>W: 626.395.8959 >>>>>>>><<<http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>>>>>> >>>>>>>>:::::::::::::::::: extras :::::::::::::::::::: >>>>>>>><<<http://www.kiva.org>http://www.kiva.org>http://www.kiva.org>http://www.kiva.org >>>>>>>><<http://www.thehungersite.com>http://www.thehungersite.com>http://www.thehungersite.com/ >>>>>>>><<http://www.agloco.com/r/BBBS1539>http://www.agloco.com/r/BBBS1539>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>http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>>>>>and >>>>>>>><<<http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>>>>>> >>>>>>>---------------------------------------------------------------------- >>>>>>>Christian Hesse, PhD, MIEEE >>>>>>> >>>>>>>F.C. Donders Centre for Cognitive Neuroimaging >>>>>>>P.O. Box 9101 >>>>>>>NL-6500 HB Nijmegen >>>>>>>The Netherlands >>>>>>> >>>>>>>Tel.: +31 (0)24 36 68293 >>>>>>>Fax: +31 (0)24 36 10989 >>>>>>> >>>>>>>Email: >>>>>>><<<mailto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru.nl><<mailto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru.nl><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>>>>>Web: >>>>>>><<<http://www.fcdonders.ru.nl>http://www.fcdonders.ru.nl>http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>>>>>---------------------------------------------------------------------- >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>---------------------------------- >>>>>>> >>>>>>>The aim of this list is to facilitate the discussion between >>>>>>>users of the FieldTrip toolbox, to share experiences and to >>>>>>>discuss new ideas for MEG and EEG analysis. >>>>>>> >>>>>>><<http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>>>> >>>>>>><http://www.ru.nl/fcdonders/fieldtrip/>http://www.ru.nl/fcdonders/fieldtrip/ >>>>>> >>>>>>Virginie van Wassenhove, PhD >>>>>> >>>>>>:::::::::::: contact info ::::::::::::: >>>>>>Caltech - Division of Biology >>>>>>1200 E. California Blvd M/C 139-74 >>>>>>Pasadena CA 91125 USA >>>>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>>>><<mailto:vvw at caltech.edu>mailto:vvw at caltech.edu><mailto:vvw at caltech.edu>vvw at caltech.edu >>>>>><<mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>>>W: 626.395.8959 >>>>>><<http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>>>> >>>>>>:::::::::::::::::: extras :::::::::::::::::::: >>>>>><<http://www.kiva.org>http://www.kiva.org>http://www.kiva.org >>>>>><http://www.thehungersite.com>http://www.thehungersite.com/ >>>>>><http://www.agloco.com/r/BBBS1539>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>http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>>>and >>>>>><<http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>>>> >>>>>---------------------------------------------------------------------- >>>>>Christian Hesse, PhD, MIEEE >>>>> >>>>>F.C. Donders Centre for Cognitive Neuroimaging >>>>>P.O. Box 9101 >>>>>NL-6500 HB Nijmegen >>>>>The Netherlands >>>>> >>>>>Tel.: +31 (0)24 36 68293 >>>>>Fax: +31 (0)24 36 10989 >>>>> >>>>>Email: >>>>><<mailto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru.nl><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>>>Web: >>>>><<http://www.fcdonders.ru.nl>http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>>>---------------------------------------------------------------------- >>>>> >>>>> >>>>> >>>>> >>>>>---------------------------------- >>>>> >>>>>The aim of this list is to facilitate the discussion between >>>>>users of the FieldTrip toolbox, to share experiences and to >>>>>discuss new ideas for MEG and EEG analysis. >>>>> >>>>><http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>> >>>>>http://www.ru.nl/fcdonders/fieldtrip/ >>>> >>>>Virginie van Wassenhove, PhD >>>> >>>>:::::::::::: contact info ::::::::::::: >>>>Caltech - Division of Biology >>>>1200 E. California Blvd M/C 139-74 >>>>Pasadena CA 91125 USA >>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>><mailto:vvw at caltech.edu>vvw at caltech.edu >>>><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>W: 626.395.8959 >>>><http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>> >>>>:::::::::::::::::: extras :::::::::::::::::::: >>>><http://www.kiva.org>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>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>and >>>><http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>> >>>---------------------------------------------------------------------- >>>Christian Hesse, PhD, MIEEE >>> >>>F.C. Donders Centre for Cognitive Neuroimaging >>>P.O. Box 9101 >>>NL-6500 HB Nijmegen >>>The Netherlands >>> >>>Tel.: +31 (0)24 36 68293 >>>Fax: +31 (0)24 36 10989 >>> >>>Email: >>><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>Web: >>><http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>---------------------------------------------------------------------- >>> >>> >>> >>> >>>---------------------------------- >>> >>>The aim of this list is to facilitate the discussion between users >>>of the FieldTrip toolbox, to share experiences and to discuss new >>>ideas for MEG and EEG analysis. >>> >>>http://listserv.surfnet.nl/archives/fieldtrip.html >>> >>>http://www.ru.nl/fcdonders/fieldtrip/ >> >>Virginie van Wassenhove, PhD >> >>:::::::::::: 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. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD :::::::::::: 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. From olga at GRAPHICMIND.INFO Tue Jun 26 08:43:06 2007 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Tue, 26 Jun 2007 10:43:06 +0400 Subject: clusterrandomization-alphavalue Message-ID: Dear Fieldtrippers, I'd like to clarify the output parameters of clustrandomization. What does clusrand.critvals means. How it depends on chosen alpha threshold (usually 0.05). As I looked through the script, it is the only parameters which depends on alpha. Do I need to use it somehow to choose the significant clusters? Or can I just check the clusrand.pos(neg)clusters.pval parameters to identify significant clusters? Best Regards, Olga. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Jan.Schoffelen at FCDONDERS.RU.NL Tue Jun 26 10:00:52 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Tue, 26 Jun 2007 10:00:52 +0200 Subject: tfanalysis - NaN In-Reply-To: <20070626042513.F20D712C9A@wood-ox.its.caltech.edu> Message-ID: Dear V and C, Sorry to hop in into this discussion, but did you (V) explicitly check the time-axes present in your data? In other words: there is a field in the data structure (data.time) which specifies the time axis for each trial. According to this axis, windows (cfg.t_ftimwins) are placed around the (cfg.tois) you specify in your configuration. If there is a discrepancy between cfg.toi, and data.time, NaNny things could happen. Because you imported your files from BESA, something might be going on here. Yours, Jan-M -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Virginie van Wassenhove Sent: Tuesday, June 26, 2007 6:25 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] tfanalysis - NaN Hi Christian, >In the configuration options you have specified cfg.taper = >'hanning' which will apply only one (i.e., the hanning) taper to >your data. If you want to use multitapers you need to set cfg.taper >= 'dpss' or just leave the field it out of the cfg (since >multitapers are the default). Ah yes, sorry, I have been playing around with most parameters so both 'hanning' and 'dpss' lead to the same result (and other windows and wavelet analysis). >I'm not really sure what you mean by normalized (the csd is >obviously a density) but if there were any divide by zero issues >then matlab would be chucking warnings. What happens when you set >cfg.output = 'pow'; ? Same thing whether I use 'pow' or 'powandcsd'. So I meant 'pow' normalization (I assume it's baseline corrected on the pre-stimulus interval?). Since I imported raw data from besa (as .dat files) there might be an error in the previous specifications / preprocessing. I don't see otherwise see any major confound in the tf analysis... I will look some more into that part. Thanks for your help! -vv >>>>>>>Hi Virginie, >>>>>>> >>>>>>>the function freqanalysis will return NaNs when a time >>>>>>>frequency tile extends beyond a corresponding data segment. >>>>>>>One would usually expect a "U" shaped padding of NaNs at the >>>>>>>boundaries of any TFR which has longer time windows for lower >>>>>>>frequencies. From the cfg options you specify below I can see >>>>>>>that you have a data segment of 1.1 seconds length and the >>>>>>>moving windows cfg.t_tfimwin are quite long at the low >>>>>>>ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = 0.6666 s. Hence the >>>>>>>NaNs seem perfectly "normal" in this case. The only way to >>>>>>>avoid NaN in the time window of interest (using this type of >>>>>>>time-frequency tiling) is to make your epochs longer. >>>>>>> >>>>>>>Hope this helps, >>>>>>>Christian >>>>>>> >>>>>>> >>>>>>>On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >>>>>>> >>>>>>>>Hello again. >>>>>>>> >>>>>>>>I am finding NaN whatever method I use (multitaper and >>>>>>>>wavelet analysis), yet using a different analysis tool with >>>>>>>>similar parameters I obtain clean results. >>>>>>>>epoch length = 1.1 s >>>>>>>>baseline length = 0.3 s >>>>>>>>sampling rate = 500Hz >>>>>>>> >>>>>>>>I tried several suggestions listed in the previous message >>>>>>>>list for a similar problem, but none seem to provide >>>>>>>>reasonable results (aka always NaN). >>>>>>>>Also tried with different subjects, no particular error >>>>>>>>otherwise. I am sending a sample script in case someone has a >>>>>>>>suggestion on this... >>>>>>>>Thanks for your help once more! >>>>>>>> >>>>>>>>Virginie >>>>>>>> >>>>>>>>%% ================================================ >>>>>>>>% TF analysis - MULTITAPER >>>>>>>>cfg = []; >>>>>>>>cfg.method = 'mtmconvol'; >>>>>>>>cfg.taper = 'hanning'; >>>>>>>>cfg.output = 'powandcsd'; >>>>>>>>%cfg.channel = 'all'; >>>>>>>>cfg.channel = 'E75'; >>>>>>>> >>>>>>>>%win_length = 0.128; >>>>>>>>%win_n = floor(2.*(1.1./win_length)-1); >>>>>>>> >>>>>>>>cfg.foi = 1:5:45; >>>>>>>>%cfg.t_ftimwin = ones(1,win_n).*win_length; >>>>>>>>cfg.t_ftimwin = 4./cfg.foi; >>>>>>>>%cfg.toi = -0.3:win_length/2:0.8; >>>>>>>>cfg.toi = -0.3:0.05:0.8; >>>>>>>> >>>>>>>>% cfg.pad = 'maxperlen'; >>>>>>>>% cfg.keeptrials = 'no'; >>>>>>>>% cfg.keeptapers ='no'; >>>>>>>>s08_ill_mult = freqanalysis(cfg,s08_ill); >>>>>>>> >>>>>>>>%% ======================== >>>>>>>>% plot freq data >>>>>>>>cfg = []; >>>>>>>>cfg.baseline = [-0.3 0]; >>>>>>>>cfg.layout = egilay; >>>>>>>>cfg.zlim = [-0.00001 0.000001]; % a comparer >>>>>>>>entre participants >>>>>>>>% warning off % NaN >>>>>>>>clf >>>>>>>>%multiplotTFR(cfg,s08_ill_mult); >>>>>>>>singleplotTFR(cfg,s08_ill_mult); >>>>>>>> >>>>>>>>%% ================================================ >>>>>>>>% TF analysis - wavelet >>>>>>>>cfg = []; >>>>>>>>cfg.method = 'wltconvol'; >>>>>>>>cfg.width = 4; >>>>>>>>cfg.output = 'pow'; >>>>>>>>cfg.foi = 1:2:30; >>>>>>>>cfg.toi = -0.3:0.05:0.8; >>>>>>>>s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>>>>>>>%% ======================== >>>>>>>>cfg = []; >>>>>>>>cfg.baseline = [-0.3 0]; >>>>>>>>cfg.zlim = [-1 1]; >>>>>>>>cfg.showlabels = 'yes'; >>>>>>>>cfg.layout = egilay; >>>>>>>>clf >>>>>>>>multiplotTFR(cfg, s14_ill_wvlt) >>>>>>>> >>>>>>>>%% ================================================ >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>Virginie van Wassenhove, PhD >>>>>>>> >>>>>>>>:::::::::::: contact info ::::::::::::: >>>>>>>>Caltech - Division of Biology >>>>>>>>1200 E. California Blvd M/C 139-74 >>>>>>>>Pasadena CA 91125 USA >>>>>>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>>>>>><<<mailto:vvw at caltech.edu>mailto:vvw at caltech .edu>mailto:vvw at caltech.edu><<mailto:vvw at caltech.edu >mailto:vvw at caltech.edu><mailto:vvw at caltech.edu>vvw at caltech.edu >>>>>>>><<<mailto:Virginie.van.Was senhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.v an.Wassenhove at gmail.com><<mailto:V irginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><< mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmai l.com>Virginie.van.Wassenhove at gmai l.com >>>>>>>>W: 626.395.8959 >>>>>>>><<<http://www.its.caltech.edu/~vvw> http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw>http://www.i ts.caltech.edu/~vvw >>>>>>>> >>>>>>>>:::::::::::::::::: extras :::::::::::::::::::: >>>>>>>><<<http://www.kiva.org>http://www.kiva.org>http ://www.kiva.org>http://www.kiva.org >>>>>>>><<http://www.thehungersite.com>http:// www.thehungersite.com>http://www.thehungersite.com/ >>>>>>>><<http://www.agloco.com/r/BBBS1539 >http://www.agloco.com/r/BBBS1539>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://listse rv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fi eldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html>http://lists erv.surfnet.nl/archives/fieldtrip.html >>>>>>>>and >>>>>>>><<<http://www.ru.nl/fcdonders/ fieldtrip>http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fi eldtrip>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: >>>>>>><<<mailto:c.hesse at fcdonders.ru.nl>mai lto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru.nl><<mailto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru. nl><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>>>>>Web: >>>>>>><<<http://www.fcdonders.ru.nl>http://www. fcdonders.ru.nl>http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>>>>>--------------------------------------------------------------------- - >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>---------------------------------- >>>>>>> >>>>>>>The aim of this list is to facilitate the discussion between >>>>>>>users of the FieldTrip toolbox, to share experiences and to >>>>>>>discuss new ideas for MEG and EEG analysis. >>>>>>> >>>>>>><<http://listserv .surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fiel dtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>>>> >>>>>>><http://www.ru.nl/fcdonders/fi eldtrip/>http://www.ru.nl/fcdonders/fieldtrip/ >>>>>> >>>>>>Virginie van Wassenhove, PhD >>>>>> >>>>>>:::::::::::: contact info ::::::::::::: >>>>>>Caltech - Division of Biology >>>>>>1200 E. California Blvd M/C 139-74 >>>>>>Pasadena CA 91125 USA >>>>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>>>><<mailto:vvw at caltech.edu>mailto:vvw at caltech.ed u><mailto:vvw at caltech.edu>vv w at caltech.edu >>>>>><<mailto:Virginie.van.Wassen hove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>>>W: 626.395.8959 >>>>>><<http://www.its.caltech.edu/~vvw>htt p://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>>>> >>>>>>:::::::::::::::::: extras :::::::::::::::::::: >>>>>><<http://www.kiva.org>http://www.kiva.org>http:// www.kiva.org >>>>>><http://www.thehungersite.com>http://www .thehungersite.com/ >>>>>><http://www.agloco.com/r/BBBS1539>ht tp://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>http://listserv.surfnet.nl/archives/field trip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>>>and >>>>>><<http://www.ru.nl/fcdonders/fie ldtrip>http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/field trip. >>>>> >>>>>---------------------------------------------------------------------- >>>>>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: >>>>><<mailto:c.hesse at fcdonders.ru.nl>mailto :c.hesse at fcdonders.ru.nl><mailto:c.hesse at fcd onders.ru.nl>c.hesse at fcdonders.ru.nl >>>>>Web: >>>>><<http://www.fcdonders.ru.nl>http://www.fcd onders.ru.nl>www.fcdonders.ru.nl >>>>>---------------------------------------------------------------------- >>>>> >>>>> >>>>> >>>>> >>>>>---------------------------------- >>>>> >>>>>The aim of this list is to facilitate the discussion between >>>>>users of the FieldTrip toolbox, to share experiences and to >>>>>discuss new ideas for MEG and EEG analysis. >>>>> >>>>><http://listserv.su rfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtr ip.html >>>>> >>>>>http://www.ru.nl/fcdonders/field trip/ >>>> >>>>Virginie van Wassenhove, PhD >>>> >>>>:::::::::::: contact info ::::::::::::: >>>>Caltech - Division of Biology >>>>1200 E. California Blvd M/C 139-74 >>>>Pasadena CA 91125 USA >>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>><mailto:vvw at caltech.edu> vvw at caltech.edu >>>><mailto:Virginie.van.Wassenhov e at gmail.com>Virginie.van.Wassenhov e at gmail.com >>>>W: 626.395.8959 >>>><http://www.its.caltech.edu/~vvw>http:/ /www.its.caltech.edu/~vvw >>>> >>>>:::::::::::::::::: extras :::::::::::::::::::: >>>><http://www.kiva.org>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.sur fnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtri p.html >>>>and >>>><http://www.ru.nl/fcdonders/fieldt rip>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: >>><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>Web: >>><http://www.fcdonders.ru.nl>www.fcdonders.ru. nl >>>---------------------------------------------------------------------- >>> >>> >>> >>> >>>---------------------------------- >>> >>>The aim of this list is to facilitate the discussion between users >>>of the FieldTrip toolbox, to share experiences and to discuss new >>>ideas for MEG and EEG analysis. >>> >>>http://listserv.surfn et.nl/archives/fieldtrip.html >>> >>>http://www.ru.nl/fcdonders/fieldtrip/ >> >>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.co m >>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.surfne t.nl/archives/fieldtrip.html >>and http://www.ru.nl/fcdonders/fieldtrip. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD :::::::::::: 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. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Jun 26 10:11:32 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Tue, 26 Jun 2007 10:11:32 +0200 Subject: clusterrandomization-alphavalue In-Reply-To: <00a601c7b7bd$40dd10c0$51210ad9@acer027f9640b7> Message-ID: Dear Olga, I'd like to clarify the output parameters of clustrandomization. What does clusrand.critvals means. How it depends on chosen alpha threshold (usually 0.05). As I looked through the script, it is the only parameters which depends on alpha. Do I need to use it somehow to choose the significant clusters? Or can I just check the clusrand.pos(neg)clusters.pval parameters to identify significant clusters? Yes, you can just check the clusrand.pos(neg)clusters.pvals. The two pieces of information are redundant: a clusrand.pos(neg)clusters.pval is less than alpha it the cluster-level statistic of this cluster exceeds clusrand.critval. 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/ ---------------------------------- The aim of this list 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 olga at GRAPHICMIND.INFO Tue Jun 26 10:36:55 2007 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Tue, 26 Jun 2007 12:36:55 +0400 Subject: clusterrandomization-alphavalue Message-ID: Thank you Eric, As I understand, the cfg.alpha is also redundant as input information. Yes? Best Regards, Olga ----- Original Message ----- From: Eric Maris To: FIELDTRIP at NIC.SURFNET.NL Sent: Tuesday, June 26, 2007 12:11 PM Subject: Re: [FIELDTRIP] clusterrandomization-alphavalue Dear Olga, I'd like to clarify the output parameters of clustrandomization. What does clusrand.critvals means. How it depends on chosen alpha threshold (usually 0.05). As I looked through the script, it is the only parameters which depends on alpha. Do I need to use it somehow to choose the significant clusters? Or can I just check the clusrand.pos(neg)clusters.pval parameters to identify significant clusters? Yes, you can just check the clusrand.pos(neg)clusters.pvals. The two pieces of information are redundant: a clusrand.pos(neg)clusters.pval is less than alpha it the cluster-level statistic of this cluster exceeds clusrand.critval. 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/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maris at NICI.RU.NL Tue Jun 26 11:39:38 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Tue, 26 Jun 2007 11:39:38 +0200 Subject: clusterrandomization-alphavalue In-Reply-To: <00cc01c7b7cd$27488030$51210ad9@acer027f9640b7> Message-ID: Dear Olga, As I understand, the cfg.alpha is also redundant as input information. Yes? If you omit cfg.alpha, then clusrand.critval will be computed using the default value cfg.alpha=0.05. 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/ Best Regards, Olga ----- Original Message ----- From: Eric Maris To: FIELDTRIP at NIC.SURFNET.NL Sent: Tuesday, June 26, 2007 12:11 PM Subject: Re: [FIELDTRIP] clusterrandomization-alphavalue Dear Olga, I'd like to clarify the output parameters of clustrandomization. What does clusrand.critvals means. How it depends on chosen alpha threshold (usually 0.05). As I looked through the script, it is the only parameters which depends on alpha. Do I need to use it somehow to choose the significant clusters? Or can I just check the clusrand.pos(neg)clusters.pval parameters to identify significant clusters? Yes, you can just check the clusrand.pos(neg)clusters.pvals. The two pieces of information are redundant: a clusrand.pos(neg)clusters.pval is less than alpha it the cluster-level statistic of this cluster exceeds clusrand.critval. 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/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From olga at GRAPHICMIND.INFO Tue Jun 26 11:51:27 2007 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Tue, 26 Jun 2007 13:51:27 +0400 Subject: clusterrandomization-alphavalue Message-ID: I mean it will not influence clustrand.posclusters.pval, even if I put cfg.alpha =0.5. ----- Original Message ----- From: Eric Maris To: FIELDTRIP at NIC.SURFNET.NL Sent: Tuesday, June 26, 2007 1:39 PM Subject: Re: [FIELDTRIP] clusterrandomization-alphavalue Dear Olga, As I understand, the cfg.alpha is also redundant as input information. Yes? If you omit cfg.alpha, then clusrand.critval will be computed using the default value cfg.alpha=0.05. 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/ Best Regards, Olga ----- Original Message ----- From: Eric Maris To: FIELDTRIP at NIC.SURFNET.NL Sent: Tuesday, June 26, 2007 12:11 PM Subject: Re: [FIELDTRIP] clusterrandomization-alphavalue Dear Olga, I'd like to clarify the output parameters of clustrandomization. What does clusrand.critvals means. How it depends on chosen alpha threshold (usually 0.05). As I looked through the script, it is the only parameters which depends on alpha. Do I need to use it somehow to choose the significant clusters? Or can I just check the clusrand.pos(neg)clusters.pval parameters to identify significant clusters? Yes, you can just check the clusrand.pos(neg)clusters.pvals. The two pieces of information are redundant: a clusrand.pos(neg)clusters.pval is less than alpha it the cluster-level statistic of this cluster exceeds clusrand.critval. 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/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vvw at CALTECH.EDU Wed Jun 27 04:15:00 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Tue, 26 Jun 2007 19:15:00 -0700 Subject: tfanalysis - NaN In-Reply-To: <002401c7b7c8$1e23e6c0$902dae83@fcdonders.nl> Message-ID: Hi Jan-M and Christian thanks very much for all your advice. - there was indeed a time discrepancy in that the imported files were in milliseconds (is this a usual thing when importing from BESA? If so, it may be helpful to have this piece of information on the Besa section in the website). So, converting everything in seconds did help together with... - longer epochs which of course provide more sensible results. No NaN on the horizon, clusteranalysis on the way, I might inquire some more soon on that part... Thanks again for your help! -vv >Sorry to hop in into this discussion, but did you (V) explicitly check the >time-axes present in your data? In other words: there is a field in the data >structure (data.time) which specifies the time axis for each trial. >According to this axis, windows (cfg.t_ftimwins) are placed around the >(cfg.tois) you specify in your configuration. If there is a discrepancy >between cfg.toi, and data.time, NaNny things could happen. Because you >imported your files from BESA, something might be going on here. > >Yours, > >Jan-M > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Virginie van Wassenhove >Sent: Tuesday, June 26, 2007 6:25 AM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] tfanalysis - NaN > >Hi Christian, > > >In the configuration options you have specified cfg.taper = > >'hanning' which will apply only one (i.e., the hanning) taper to > >your data. If you want to use multitapers you need to set cfg.taper > >= 'dpss' or just leave the field it out of the cfg (since > >multitapers are the default). > >Ah yes, sorry, I have been playing around with most parameters so >both 'hanning' and 'dpss' lead to the same result (and other windows >and wavelet analysis). > > >I'm not really sure what you mean by normalized (the csd is > >obviously a density) but if there were any divide by zero issues > >then matlab would be chucking warnings. What happens when you set > >cfg.output = 'pow'; ? > >Same thing whether I use 'pow' or 'powandcsd'. So I meant 'pow' >normalization (I assume it's baseline corrected on the pre-stimulus >interval?). > >Since I imported raw data from besa (as .dat files) there might be an >error in the previous specifications / preprocessing. I don't see >otherwise see any major confound in the tf analysis... I will look >some more into that part. > >Thanks for your help! >-vv > > > > > >>>>>>>Hi Virginie, > >>>>>>> > >>>>>>>the function freqanalysis will return NaNs when a time > >>>>>>>frequency tile extends beyond a corresponding data segment. > >>>>>>>One would usually expect a "U" shaped padding of NaNs at the > >>>>>>>boundaries of any TFR which has longer time windows for lower > >>>>>>>frequencies. From the cfg options you specify below I can see > >>>>>>>that you have a data segment of 1.1 seconds length and the > >>>>>>>moving windows cfg.t_tfimwin are quite long at the low > >>>>>>>ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = 0.6666 s. Hence the > >>>>>>>NaNs seem perfectly "normal" in this case. The only way to > >>>>>>>avoid NaN in the time window of interest (using this type of > >>>>>>>time-frequency tiling) is to make your epochs longer. > >>>>>>> > >>>>>>>Hope this helps, > >>>>>>>Christian > >>>>>>> > >>>>>>> > >>>>>>>On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: > >>>>>>> > >>>>>>>>Hello again. > >>>>>>>> > >>>>>>>>I am finding NaN whatever method I use (multitaper and > >>>>>>>>wavelet analysis), yet using a different analysis tool with > >>>>>>>>similar parameters I obtain clean results. > >>>>>>>>epoch length = 1.1 s > >>>>>>>>baseline length = 0.3 s > >>>>>>>>sampling rate = 500Hz > >>>>>>>> > >>>>>>>>I tried several suggestions listed in the previous message > >>>>>>>>list for a similar problem, but none seem to provide > >>>>>>>>reasonable results (aka always NaN). > >>>>>>>>Also tried with different subjects, no particular error > >>>>>>>>otherwise. I am sending a sample script in case someone has a > >>>>>>>>suggestion on this... > >>>>>>>>Thanks for your help once more! > >>>>>>>> > >>>>>>>>Virginie > >>>>>>>> > >>>>>>>>%% ================================================ > >>>>>>>>% TF analysis - MULTITAPER > >>>>>>>>cfg = []; > >>>>>>>>cfg.method = 'mtmconvol'; > >>>>>>>>cfg.taper = 'hanning'; > >>>>>>>>cfg.output = 'powandcsd'; > >>>>>>>>%cfg.channel = 'all'; > >>>>>>>>cfg.channel = 'E75'; > >>>>>>>> > >>>>>>>>%win_length = 0.128; > >>>>>>>>%win_n = floor(2.*(1.1./win_length)-1); > >>>>>>>> > >>>>>>>>cfg.foi = 1:5:45; > >>>>>>>>%cfg.t_ftimwin = ones(1,win_n).*win_length; > >>>>>>>>cfg.t_ftimwin = 4./cfg.foi; > >>>>>>>>%cfg.toi = -0.3:win_length/2:0.8; > >>>>>>>>cfg.toi = -0.3:0.05:0.8; > >>>>>>>> > >>>>>>>>% cfg.pad = 'maxperlen'; > >>>>>>>>% cfg.keeptrials = 'no'; > >>>>>>>>% cfg.keeptapers ='no'; > >>>>>>>>s08_ill_mult = freqanalysis(cfg,s08_ill); > >>>>>>>> > >>>>>>>>%% ======================== > >>>>>>>>% plot freq data > >>>>>>>>cfg = []; > >>>>>>>>cfg.baseline = [-0.3 0]; > >>>>>>>>cfg.layout = egilay; > >>>>>>>>cfg.zlim = [-0.00001 0.000001]; % a comparer > >>>>>>>>entre participants > >>>>>>>>% warning off % NaN > >>>>>>>>clf > >>>>>>>>%multiplotTFR(cfg,s08_ill_mult); > >>>>>>>>singleplotTFR(cfg,s08_ill_mult); > >>>>>>>> > >>>>>>>>%% ================================================ > >>>>>>>>% TF analysis - wavelet > >>>>>>>>cfg = []; > >>>>>>>>cfg.method = 'wltconvol'; > >>>>>>>>cfg.width = 4; > >>>>>>>>cfg.output = 'pow'; > >>>>>>>>cfg.foi = 1:2:30; > >>>>>>>>cfg.toi = -0.3:0.05:0.8; > >>>>>>>>s14_ill_wvlt = freqanalysis(cfg, s14_ill); > >>>>>>>>%% ======================== > >>>>>>>>cfg = []; > >>>>>>>>cfg.baseline = [-0.3 0]; > >>>>>>>>cfg.zlim = [-1 1]; > >>>>>>>>cfg.showlabels = 'yes'; > >>>>>>>>cfg.layout = egilay; > >>>>>>>>clf > >>>>>>>>multiplotTFR(cfg, s14_ill_wvlt) > >>>>>>>> > >>>>>>>>%% ================================================ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 soren.r.christensen at GSK.COM Wed Jun 27 05:00:29 2007 From: soren.r.christensen at GSK.COM (Soren Rahn Christensen) Date: Wed, 27 Jun 2007 04:00:29 +0100 Subject: Soren R Christensen is out of the office. Message-ID: I will be out of the office starting 27-Jun-2007 and will not return until 04-Jul-2007. Back Thursday 5th ----------------------------------------------------------- This e-mail was sent by GlaxoSmithKline Services Unlimited (registered in England and Wales No. 1047315), which is a member of the GlaxoSmithKline group of companies. The registered address of GlaxoSmithKline Services Unlimited is 980 Great West Road, Brentford, Middlesex TW8 9GS. ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 c.hesse at FCDONDERS.RU.NL Wed Jun 27 13:40:36 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Wed, 27 Jun 2007 13:40:36 +0200 Subject: egi2besa2fieldtrip - topoplot layout In-Reply-To: <20070620162922.1FC5C1ABB1@earth-ox.its.caltech.edu> Message-ID: Hi Virginie & Olga, I have just done some tests using the PREPARE_LAYOUT function and EGI files and the code seems to behave as it should. If you specify cfg.rotate = 0 then the sensor positions come out with the nose pointing upwards. Since the default specified in the code is cfg.rotate = 90, not specifying cfg.rotate or setting cfg.rotate = 90 leaves you with the nose pointing to the right. I would be grateful if you can confirm using your own files that PREPARE_LAYOUT with cfg.rotate = 0 works as described above. Many Thanks, Christian On 20 Jun 2007, at 18:29, Virginie van Wassenhove wrote: > Hi Olga, > > thanks for your help, I think I got it working now! > > Virginie > > At 06:20 AM 6/20/2007, Olga Sysoeva wrote: >> Dear Virginie, >> >> I had the same problem. >> Actually, I not understand where the problem comes from, but solve >> it by >> multiplying the coordinates by cos (- 90) and sin (90). See the >> script >> below. >> It works good for my data... >> >> Best Regards, >> Olga. >> >> >> %prepare layout >> data.elec = >> read_fcdc_elec('C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'); >> cfg = []; >> cfg.rotate = 90; >> cfg.elecfile = 'C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'; >> mylay2 = prepare_layout(cfg); >> >> for i=1:69 >> mylay2.width (i)= 0.5 >> end; >> >> for i=1:69 >> mylay2.height (i)= 0.5 >> end; >> >> x=mylay.pos (:,1); >> y=mylay.pos (:,2); >> mylay2.pos (:,1)=y; >> mylay2.pos (:,2)=-x; >> >> >> -----Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] >> On Behalf >> Of Virginie van Wassenhove >> Sent: Tuesday, June 19, 2007 10:38 PM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: [FIELDTRIP] egi2besa2fieldtrip - topoplot layout >> >> Hi Fieldtripers, >> >> below find the relevant sample code I am using to plot cluster >> results with Fieldtrip release v. 20070514 (latest?). >> >> I have read previous posts in the discussion but I still bump into >> this issue (not sure how old the discussions were). >> The recordings were made with an egi system and preprocessed in besa. >> Although I am using the prepare_layout function, the layout in >> topoplotER (and other plotting tools) needs to be rotated by >> 90degrees clockwise. >> I have tried to use cfg.rotate (in the for loop below, commented >> here) but that does not change anything. >> >> Do you have any suggestions on how to overcome this problem? >> Thanks in advance for your help! >> >> Virginie >> >> % ==== plot results ==== >> cfg = []; >> cfg.elecfile = '\CHANNELS_specs\fieldtrip_GSN128.sfp'; >> egilay = prepare_layout(cfg); >> >> diff_gdav = ill_gdav; >> diff_gdav.av = ill_gdav.avg-noill_gdav.avg; >> >> figure; >> % if cfg.latency = [0.3 0.8]; in cluster analysis >> %j = [0:0.025:0.5]; % (s), 0 = 1st onset >> %m = [1:12:251]; % (samples) >> % if cfg.latency = 'all'; in clusteranalysis >> j = [0:0.05:1.1]; % (s), 0 = -300ms >> from1st >> onset >> m = [1:25:551]; % (samples) >> >> pos = stat.posclusterslabelmat == 1; % + clusters >> neg = (stat.negclusterslabelmat == 1)*(-1); % - clusters >> >> for k = 1:length(j)-1; % 20 subplots >> subplot(4,5,k); >> cfg = []; >> cfg.xlim=[j(k) j(k+1)]; >> cfg.zlim=[-3 3]; >> pos_int = mean(pos(:,m(k):m(k+1))')'; >> neg_int = mean(neg(:,m(k):m(k+1))')'; >> cfg.highlight = find(pos_int ==1 | neg_int == -1); >> cfg.comment = 'xlim'; >> cfg.commentpos = 'title'; >> cfg.layout = egilay; >> %cfg.rotate =[90]; % ?? rotate by 90 >> degrees clock-wise >> topoplotER(cfg,diff_gdav); >> end >> % ==================== >> >> 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. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http:// >> listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/ >> fcdonders/fieldtrip. > > 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. > ---------------------------------------------------------------------- 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 vvw at CALTECH.EDU Wed Jun 27 18:11:17 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Wed, 27 Jun 2007 09:11:17 -0700 Subject: egi2besa2fieldtrip - topoplot layout In-Reply-To: Message-ID: Hi Christian, yes using cfg.rotate = 0 works fine (see below code I have been using). Basically rotating by 90 degrees from the configuration specified in fieldtrip. With this code, com and scale are added to the layout. cfg = []; cfg.rotate = 0; cfg.elecfile = 'C:\Documents and Settings\Virginie\My Documents\EEG_analysis\CHANNELS_specs\fieldtrip_GSN128.sfp'; egilay = prepare_layout(cfg); vv At 04:40 AM 6/27/2007, you wrote: >Hi Virginie & Olga, > >I have just done some tests using the PREPARE_LAYOUT function and >EGI files and the code seems to behave as it should. If you specify >cfg.rotate = 0 then the sensor positions come out with the nose >pointing upwards. Since the default specified in the code is >cfg.rotate = 90, not specifying cfg.rotate or setting cfg.rotate = >90 leaves you with the nose pointing to the right. > >I would be grateful if you can confirm using your own files that >PREPARE_LAYOUT with cfg.rotate = 0 works as described above. > >Many Thanks, >Christian > > >On 20 Jun 2007, at 18:29, Virginie van Wassenhove wrote: > >>Hi Olga, >> >>thanks for your help, I think I got it working now! >> >>Virginie >> >>At 06:20 AM 6/20/2007, Olga Sysoeva wrote: >>>Dear Virginie, >>> >>>I had the same problem. >>>Actually, I not understand where the problem comes from, but solve it by >>>multiplying the coordinates by cos (- 90) and sin (90). See the script >>>below. >>>It works good for my data... >>> >>>Best Regards, >>>Olga. >>> >>> >>>%prepare layout >>>data.elec = >>>read_fcdc_elec('C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'); >>>cfg = []; >>>cfg.rotate = 90; >>>cfg.elecfile = 'C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'; >>>mylay2 = prepare_layout(cfg); >>> >>>for i=1:69 >>> mylay2.width (i)= 0.5 >>>end; >>> >>>for i=1:69 >>> mylay2.height (i)= 0.5 >>>end; >>> >>>x=mylay.pos (:,1); >>>y=mylay.pos (:,2); >>>mylay2.pos (:,1)=y; >>>mylay2.pos (:,2)=-x; >>> >>> >>>-----Original Message----- >>>From: FieldTrip discussion list >>>[mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >>>Of Virginie van Wassenhove >>>Sent: Tuesday, June 19, 2007 10:38 PM >>>To: FIELDTRIP at NIC.SURFNET.NL >>>Subject: [FIELDTRIP] egi2besa2fieldtrip - topoplot layout >>> >>>Hi Fieldtripers, >>> >>>below find the relevant sample code I am using to plot cluster >>>results with Fieldtrip release v. 20070514 (latest?). >>> >>>I have read previous posts in the discussion but I still bump into >>>this issue (not sure how old the discussions were). >>>The recordings were made with an egi system and preprocessed in besa. >>>Although I am using the prepare_layout function, the layout in >>>topoplotER (and other plotting tools) needs to be rotated by >>>90degrees clockwise. >>>I have tried to use cfg.rotate (in the for loop below, commented >>>here) but that does not change anything. >>> >>>Do you have any suggestions on how to overcome this problem? >>>Thanks in advance for your help! >>> >>>Virginie >>> >>>% ==== plot results ==== >>>cfg = []; >>>cfg.elecfile = '\CHANNELS_specs\fieldtrip_GSN128.sfp'; >>>egilay = prepare_layout(cfg); >>> >>>diff_gdav = ill_gdav; >>>diff_gdav.av = ill_gdav.avg-noill_gdav.avg; >>> >>>figure; >>>% if cfg.latency = [0.3 0.8]; in cluster analysis >>>%j = [0:0.025:0.5]; % (s), 0 = 1st onset >>>%m = [1:12:251]; % (samples) >>>% if cfg.latency = 'all'; in clusteranalysis >>>j = [0:0.05:1.1]; % (s), 0 = -300ms from1st >>>onset >>>m = [1:25:551]; % (samples) >>> >>>pos = stat.posclusterslabelmat == 1; % + clusters >>>neg = (stat.negclusterslabelmat == 1)*(-1); % - clusters >>> >>>for k = 1:length(j)-1; % 20 subplots >>> subplot(4,5,k); >>> cfg = []; >>> cfg.xlim=[j(k) j(k+1)]; >>> cfg.zlim=[-3 3]; >>> pos_int = mean(pos(:,m(k):m(k+1))')'; >>> neg_int = mean(neg(:,m(k):m(k+1))')'; >>> cfg.highlight = find(pos_int ==1 | neg_int == -1); >>> cfg.comment = 'xlim'; >>> cfg.commentpos = 'title'; >>> cfg.layout = egilay; >>> %cfg.rotate =[90]; % ?? rotate by 90 >>>degrees clock-wise >>> topoplotER(cfg,diff_gdav); >>>end >>>% ==================== >>> >>>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. >>> >>>---------------------------------- >>>The aim of this list is to facilitate the discussion between users >>>of the FieldTrip toolbox, to share experiences and to discuss new >>>ideas for MEG and EEG analysis. See also >>>http://listserv.surfnet.nl/archives/fieldtrip.html >>>and http://www.ru.nl/fcdonders/fieldtrip. >> >>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. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD :::::::::::: 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. From kosubek at CBS.MPG.DE Thu Jun 28 00:24:11 2007 From: kosubek at CBS.MPG.DE (Lars Kosubek) Date: Thu, 28 Jun 2007 00:24:11 +0200 Subject: TFR Analysis - Plotting Problem Message-ID: Dear Fieldtrip-Team, I'm trying to use fieldtrip-toolbox since a few days. After working through the tutorials and fixing the problem of matlab crash while importing eep-probe files i tried to do tfr-analysis. Everything seems fine but if the script reaches the part of plotting i get the following fault: -------------------------------------------------------- ??? Index exceeds matrix dimensions. Error in ==> topoplotER at 289 dat = dat(:, ymin:ymax, xmin:xmax); -------------------------------------------------------- What could be the reason of this problem? Maybe used the sub functions not in the right way...? In hope someone could spend a bit time in helping me, i will add the hole analysis-script: -------------------------------------------------------- debug=1 Path='/scr/fabian1/lars/SPROD/data/EEP/sprod'; %Subjects={'01','02','03','04','06','07','10','11','12','14','15', ... % '16','17','18','19','20','21','22','23','24'}; Channels={'F3','FZ','F4','FC3','FCZ','FC4','C3','CZ', ... 'C4','CP3','CPZ','CP4','P3','PZ','P4',}; %Contrasts={ {'33','31'} {'63','33'}} Subjects={'01','02'} Contrasts={ {'33','31'} } %Channels={'all'} %% 1. Import files (select trials, reject & preprocess) for k=1:length(Contrasts), Conditions=Contrasts{k}; for j=1:length(Conditions), Condition=Conditions{j}; for i=1:length(Subjects), Subject=Subjects{i}; cfg = []; cfg.dataset = strcat(Path, Subject, '.cnt'); cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 2; cfg.trialdef.eventvalue = Condition; cfg = definetrial(cfg); cfg.rejectfile=strcat(Path, Subject, '.rej') %[cfg] = rejectartifact(cfg); nor included in preprocessing cfg.channel = Channels; %cfg.detrend = 'yes'; PreProcData{i,j,k} = preprocessing(cfg); %save PreProcData PreProcData{i,j,k} -append; end end end %% 2. TimeFrequenzyResolution per Subject an Condition for k=1:length(Contrasts), Conditions=Contrasts{k}; for j=1:length(Conditions), Condition=Conditions{j}; for i=1:length(Subjects), Subject=Subjects{i}; cfg = []; cfg.output = 'pow'; %cfg.channel = 'all'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:1:20; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; %cfg.t_ftimwin = 5./cfg.foi; % 7 cycles per time window cfg.toi = -1:0.05:2; cfg.keeptrials = 'no'; cfg.keeptapers = 'no'; TFRAvgData{i,j,k} = freqanalysis(cfg, PreProcData{i,j,k}) %save TFRAvgData TFRAvgData{i,j,k} -append; if debug==1 cfg = []; cfg.layout = 'EEG1010.lay'; cfg.zparam='powspctrm'; cfg.xparam='time'; cfg.yparam='freq'; %cfg.xlim = -0.2 : 0.1 : 1.0; % Define 12 time intervals %cfg.zlim = [-1.3e-13 1.3e-13]; % Set the 'color' limits. figure; multiplotTFR(cfg,TFRAvgData{i,j,k}) end end end end clear PreProcData; %% 3. GrandAvarage of Conditions over Subjects for k=1:length(Contrasts), Conditions=Contrasts{k}; for j=1:length(Conditions), Condition=Conditions{j}; cfg = []; cfg.keepindividual='yes'; TFRGAvgData{k,j} = freqgrandaverage(cfg, TFRAvgData{:,j,k}) %save TFRGAvgData TFRGAvgData{i,j} -append; end end clear TFRAvgData; %% 4. Cluster Based Permutation Statitic between Conditions for k=1:length(Contrasts), Conditions=Contrasts{k}; cfg = []; cfg.parameter='powspctrm' cfg.latency=[0.2 1.4]; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 100; cfg.layout = 'EEG1010.lay'; subj = length(Subjects); design=zeros(2,2*subj); for s = 1:subj design(1,s) = s; end for s = 1:subj design(1,subj+s) = s; end design(2,1:subj) = 1; design(2,subj+1:2*subj) = 2; cfg.design = design; cfg.uvar = 1; cfg.ivar = 2; [stat] = freqstatistics(cfg, TFRGAvgData{k,1}, TFRGAvgData{k,2}) %% 5. Plotting the Statistics GA_TFR_AvsB = TFRGAvgData{k,1}; GA_TFR_AvsB.powspctrm = GA_TFR_AvsB.powspctrm - TFRGAvgData{k,2}.powspctrm; figure; j = [-0.4:0.05:1.35]; foi = 10; % frequency of interest index_foi = find(stat.freq==foi);% index of frequency of interest in stat for k = 1:11; m=k+16; subplot(4,5,k); cfg = []; %cfg.baseline = [-0.5 -0.1]; cfg.xlim=[j(k) j(k)]; cfg.ylim = [foi foi]; cfg.highlight = find (stat.negclusterslabelmat(:,index_foi,m)==1); %cfg.zlim = [-2.5e-28 2.5e-28]; cfg.comment = 'xlim'; cfg.commentpos = 'title'; cfg.xparam='time'; cfg.yparam='freq'; cfg.zparam='powspctrm'; cfg.layout='EEG1010.lay'; topoplotTFR(cfg, GA_TFR_AvsB); end end ------------------------------------------------------------------ Big Thanks for taking time and reading until this point! Best Regards, Lars Kosubek ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 vvw at CALTECH.EDU Thu Jun 28 00:49:26 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Wed, 27 Jun 2007 15:49:26 -0700 Subject: TFR Analysis - Plotting Problem In-Reply-To: <63818.85.176.248.164.1182983051.squirrel@mail.cbs.mpg.de> Message-ID: Here's an attempt because I just had a similar issue when plotting the difference between 2 conditions (for 1 individual). If I set cfg.keeptrials = 'yes' (which is needed for the cluster analysis) for the freqanalysis and use the pwspctrm difference for these 2 conditions, multiplotTFR won't work and returns a similar error. I suppose because there is 1 more dimension aka 'trials'. If I use an average difference (cfg.keeptrials = 'no') for these same conditions and for illustrative purposes, then multiplotTFR works and display both the average difference and the obtained clusters... Not sure whether this is relevant to your across-individuals design but maybe it's worth trying it out. -Virginie At 03:24 PM 6/27/2007, you wrote: >Dear Fieldtrip-Team, > >I'm trying to use fieldtrip-toolbox since a few days. After working >through the tutorials and fixing the problem of matlab crash while >importing eep-probe files i tried to do tfr-analysis. Everything seems >fine but if the script reaches the part of plotting i get the following >fault: > > >-------------------------------------------------------- >??? Index exceeds matrix dimensions. > >Error in ==> topoplotER at 289 > dat = dat(:, ymin:ymax, xmin:xmax); >-------------------------------------------------------- > > > >What could be the reason of this problem? Maybe used the sub functions not >in the right way...? > >In hope someone could spend a bit time in helping me, i will add the hole >analysis-script: > > >-------------------------------------------------------- >debug=1 > >Path='/scr/fabian1/lars/SPROD/data/EEP/sprod'; > >%Subjects={'01','02','03','04','06','07','10','11','12','14','15', ... >% '16','17','18','19','20','21','22','23','24'}; > >Channels={'F3','FZ','F4','FC3','FCZ','FC4','C3','CZ', ... > 'C4','CP3','CPZ','CP4','P3','PZ','P4',}; > >%Contrasts={ {'33','31'} {'63','33'}} > >Subjects={'01','02'} > >Contrasts={ {'33','31'} } > >%Channels={'all'} > > >%% 1. Import files (select trials, reject & preprocess) > >for k=1:length(Contrasts), Conditions=Contrasts{k}; > for j=1:length(Conditions), Condition=Conditions{j}; > for i=1:length(Subjects), Subject=Subjects{i}; > cfg = []; > cfg.dataset = strcat(Path, Subject, '.cnt'); > cfg.trialdef.eventtype = 'trigger'; > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 2; > cfg.trialdef.eventvalue = Condition; > cfg = definetrial(cfg); > > cfg.rejectfile=strcat(Path, Subject, '.rej') > %[cfg] = rejectartifact(cfg); nor included in preprocessing > > cfg.channel = Channels; > %cfg.detrend = 'yes'; > PreProcData{i,j,k} = preprocessing(cfg); > %save PreProcData PreProcData{i,j,k} -append; > end > end >end > > >%% 2. TimeFrequenzyResolution per Subject an Condition > >for k=1:length(Contrasts), Conditions=Contrasts{k}; > for j=1:length(Conditions), Condition=Conditions{j}; > for i=1:length(Subjects), Subject=Subjects{i}; > cfg = []; > cfg.output = 'pow'; > %cfg.channel = 'all'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.foi = 1:1:20; > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; > %cfg.t_ftimwin = 5./cfg.foi; % 7 cycles per time window > cfg.toi = -1:0.05:2; > cfg.keeptrials = 'no'; > cfg.keeptapers = 'no'; > > TFRAvgData{i,j,k} = freqanalysis(cfg, PreProcData{i,j,k}) > %save TFRAvgData TFRAvgData{i,j,k} -append; > if debug==1 > cfg = []; > cfg.layout = 'EEG1010.lay'; > cfg.zparam='powspctrm'; > cfg.xparam='time'; > cfg.yparam='freq'; > %cfg.xlim = -0.2 : 0.1 : 1.0; % Define 12 time intervals > %cfg.zlim = [-1.3e-13 1.3e-13]; % Set the 'color' limits. > figure; multiplotTFR(cfg,TFRAvgData{i,j,k}) > end > end > end >end > > >clear PreProcData; > > >%% 3. GrandAvarage of Conditions over Subjects > >for k=1:length(Contrasts), Conditions=Contrasts{k}; > for j=1:length(Conditions), Condition=Conditions{j}; > cfg = []; > cfg.keepindividual='yes'; > TFRGAvgData{k,j} = freqgrandaverage(cfg, TFRAvgData{:,j,k}) > %save TFRGAvgData TFRGAvgData{i,j} -append; > end >end > > >clear TFRAvgData; > > > >%% 4. Cluster Based Permutation Statitic between Conditions > >for k=1:length(Contrasts), Conditions=Contrasts{k}; >cfg = []; >cfg.parameter='powspctrm' >cfg.latency=[0.2 1.4]; >cfg.method = 'montecarlo'; >cfg.statistic = 'depsamplesT'; >cfg.clusteralpha = 0.05; >cfg.clusterstatistic = 'maxsum'; >cfg.minnbchan = 2; >cfg.tail = 0; >cfg.clustertail = 0; >cfg.alpha = 0.05; >cfg.numrandomization = 100; >cfg.layout = 'EEG1010.lay'; > >subj = length(Subjects); >design=zeros(2,2*subj); >for s = 1:subj > design(1,s) = s; >end >for s = 1:subj > design(1,subj+s) = s; >end >design(2,1:subj) = 1; >design(2,subj+1:2*subj) = 2; > >cfg.design = design; >cfg.uvar = 1; >cfg.ivar = 2; > >[stat] = freqstatistics(cfg, TFRGAvgData{k,1}, TFRGAvgData{k,2}) > > > >%% 5. Plotting the Statistics > >GA_TFR_AvsB = TFRGAvgData{k,1}; >GA_TFR_AvsB.powspctrm = GA_TFR_AvsB.powspctrm - TFRGAvgData{k,2}.powspctrm; > > >figure; >j = [-0.4:0.05:1.35]; >foi = 10; % frequency of interest >index_foi = find(stat.freq==foi);% index of frequency of interest in stat >for k = 1:11; > m=k+16; > subplot(4,5,k); > cfg = []; > %cfg.baseline = [-0.5 -0.1]; > cfg.xlim=[j(k) j(k)]; > cfg.ylim = [foi foi]; > cfg.highlight = find (stat.negclusterslabelmat(:,index_foi,m)==1); > %cfg.zlim = [-2.5e-28 2.5e-28]; > cfg.comment = 'xlim'; > cfg.commentpos = 'title'; > cfg.xparam='time'; > cfg.yparam='freq'; > cfg.zparam='powspctrm'; > cfg.layout='EEG1010.lay'; > > topoplotTFR(cfg, GA_TFR_AvsB); >end > >end >------------------------------------------------------------------ > >Big Thanks for taking time and reading until this point! >Best Regards, Lars Kosubek > >---------------------------------- >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. See also >http://listserv.surfnet.nl/archives/fieldtrip.html and >http://www.ru.nl/fcdonders/fieldtrip. 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. From h.ferguson at PSY.GLA.AC.UK Thu Jun 28 11:46:38 2007 From: h.ferguson at PSY.GLA.AC.UK (heather ferguson) Date: Thu, 28 Jun 2007 10:46:38 +0100 Subject: cfg.neighbourdist unit measurement? Message-ID: Hi, Please can someone tell me whether the cfg.neighbourdist needed to define clusters is in cm or mm? (i.e. if I want a 3cm distance, should the value be 3 or 30?) Thanks, Heather ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Thu Jun 28 12:29:23 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 28 Jun 2007 12:29:23 +0200 Subject: cfg.neighbourdist unit measurement? In-Reply-To: <000901c7b969$4b812d10$cf59d182@heatherpc> Message-ID: Dear Heather, Please can someone tell me whether the cfg.neighbourdist needed to define clusters is in cm or mm? (i.e. if I want a 3cm distance, should the value be 3 or 30?) You should specify cfg.neighbourdist on the same scale as the scale in which your sensor coordinates (in the .grad or .elec field) are expressed. See the help of NEIGHBOURSELECTION. 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, Heather ---------------------------------- The aim of this list 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 h.morgan at BANGOR.AC.UK Thu Jun 28 17:05:42 2007 From: h.morgan at BANGOR.AC.UK (Helen Morgan) Date: Thu, 28 Jun 2007 17:05:42 +0200 Subject: Interpolating bad channels in EEG Message-ID: Hi, Is there a function in Fieldtrip that can replace data from a bad EEG channel using interpolation of neighbouring channels? Thanks, Helen ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Thu Jun 28 19:04:57 2007 From: abastos at BERKELEY.EDU (Andre Bastos) Date: Thu, 28 Jun 2007 10:04:57 -0700 Subject: cfg.neighbourdist unit measurement? In-Reply-To: <05f601c7b96f$36921440$6501a8c0@fcdonders.nl> Message-ID: Dear Heather, With a standard 64 channel montage, I created neighbourhood locations using neighbourdist values between 1 and 100, and then evaluated each structure to see which one specified 5 neighbors for T8, 8 for Cz, and 4 for Fp1. 48, 49, and 50 seemed to satisfy this so I just took the middle value. You may have to play around with this value depending on the size of your montage. Good Luck, -Andre From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Eric Maris Sent: Thursday, June 28, 2007 3:29 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] cfg.neighbourdist unit measurement? Dear Heather, Please can someone tell me whether the cfg.neighbourdist needed to define clusters is in cm or mm? (i.e. if I want a 3cm distance, should the value be 3 or 30?) You should specify cfg.neighbourdist on the same scale as the scale in which your sensor coordinates (in the .grad or .elec field) are expressed. See the help of NEIGHBOURSELECTION. 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, Heather ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vvw at CALTECH.EDU Thu Jun 28 21:24:14 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Thu, 28 Jun 2007 12:24:14 -0700 Subject: out of memory - window machine Message-ID: 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. From jaredvs at GMAIL.COM Fri Jun 29 03:31:32 2007 From: jaredvs at GMAIL.COM (Jared Van Snellenberg) Date: Fri, 29 Jun 2007 03:31:32 +0200 Subject: Volume conduction model for EEG DICS beamforming Message-ID: Hi all, 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). 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. 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). 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. Thank you very much, 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 jaredvs at GMAIL.COM Fri Jun 29 04:57:56 2007 From: jaredvs at GMAIL.COM (Jared Van Snellenberg) Date: Thu, 28 Jun 2007 22:57:56 -0400 Subject: out of memory - window machine In-Reply-To: <20070628192415.370CE12D6B@fire-ox.its.caltech.edu> Message-ID: 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. 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 olga at GRAPHICMIND.INFO Fri Jun 29 05:47:15 2007 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Fri, 29 Jun 2007 07:47:15 +0400 Subject: PC computer for Fieldtrip Message-ID: Dear all, It is probably a dull question, but can you specified the "good" PC Computer for analysing 64-channel data in Fieldtrip. Best Regards, Olga. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Jun 29 09:12:11 2007 From: kooijman at TIFN.NL (Valesca Kooijman) Date: Fri, 29 Jun 2007 09:12:11 +0200 Subject: eeglab2fieldtrip Message-ID: Hi all, I am trying to convert some EEGLAB data (.set files) to Fieldtrip. After loading my eeglab data file, I use the command data = eeglab2fieldtrip(EEG, preprocessing). Unfortunately I get some warnings and an error message instead of a usable file. It says: >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)); Apparantly the script cannot convert the matlab version into a number, and therefore cannot determine the correct matrix dimensions. I don't know if this is because there is a problem in my datafile or in the script. Does anyone know what to do about this? Thanks! Best, Valesca ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From c.hesse at FCDONDERS.RU.NL Fri Jun 29 09:45:31 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 29 Jun 2007 09:45:31 +0200 Subject: eeglab2fieldtrip In-Reply-To: Message-ID: Hi Valesca, which version of Matlab are you using? Christian On 29 Jun 2007, at 09:12, Valesca Kooijman wrote: > Hi all, > > I am trying to convert some EEGLAB data (.set files) to Fieldtrip. > After > loading my eeglab data file, I use the command > data = eeglab2fieldtrip(EEG, preprocessing). Unfortunately I get some > warnings and an error message instead of a usable file. > It says: > >> 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)); > > Apparantly the script cannot convert the matlab version into a > number, and > therefore cannot determine the correct matrix dimensions. I don't > know if > this is because there is a problem in my datafile or in the script. > > Does anyone know what to do about this? Thanks! > > Best, > Valesca > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kooijman at TIFN.NL Fri Jun 29 09:47:58 2007 From: Kooijman at TIFN.NL (Valesca Kooijman) Date: Fri, 29 Jun 2007 09:47:58 +0200 Subject: eeglab2fieldtrip In-Reply-To: <9DB94328-DEE7-495D-ACD1-7DD07CAD1F27@fcdonders.ru.nl> Message-ID: hi Christian, I am using matlab version 7.0.1. Valesca Christian Hesse Sent by: FieldTrip discussion list 06/29/2007 09:45 AM Please respond to FieldTrip discussion list To FIELDTRIP at NIC.SURFNET.NL cc Subject Re: [FIELDTRIP] eeglab2fieldtrip Hi Valesca, which version of Matlab are you using? Christian On 29 Jun 2007, at 09:12, Valesca Kooijman wrote: Hi all, I am trying to convert some EEGLAB data (.set files) to Fieldtrip. After loading my eeglab data file, I use the command data = eeglab2fieldtrip(EEG, preprocessing). Unfortunately I get some warnings and an error message instead of a usable file. It says: 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)); Apparantly the script cannot convert the matlab version into a number, and therefore cannot determine the correct matrix dimensions. I don't know if this is because there is a problem in my datafile or in the script. Does anyone know what to do about this? Thanks! Best, Valesca ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vvw at CALTECH.EDU Fri Jun 29 18:22:40 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Fri, 29 Jun 2007 09:22:40 -0700 Subject: out of memory - window machine In-Reply-To: <51d499680706281957v2b1c34bfx48d7a15f0ff82ca2@mail.gmail.co m> Message-ID: Hi Jared, I'll try the couple new things you suggested, thanks! vv At 07:57 PM 6/28/2007, you wrote: >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 ><vvw at caltech.edu> 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/ 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. From muthuraman10 at HOTMAIL.COM Fri Jun 1 11:06:44 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Fri, 1 Jun 2007 09:06:44 +0000 Subject: wavelet analysis! Message-ID: Hello Fieldtrippers, In the wavelet analysis, when calculating the coherence between a EEG and a EMG electrode the values are all 500, for this configuration. When using the multiatper analysis i get the correct values. cfg=[]; cfg.output='powandcsd'; cfg.method='wltconvol'; cfg.channel = channelselection({'all'}, data1.label); cfg.channelcmb = channelcombination({'C3','M2'}, data1.label); cfg.foi=2:1:20; numfoi=length(cfg.foi); cfg.t_ftimwin=ones(1,numfoi); cfg.t_ftimwin(:)=10; cfg.toi=5:0.05:145; cfg.width = 7; cfg.gwidth = 3; cfg.pad=150; cfg.keeptrials='no'; TFRmult=freqanalysis(cfg,data1); cfg.keeptrials='yes'; fdmtmfft=freqdescriptives(cfg,TFRmult); Is there something more needed to be in the wavelet analysis configuration, data length is 150000. Thanking you With regards M.Muthuraman. _________________________________________________________________ Fly Chn-Blr for Rs.249 only. Log on to MakeMyTrip now! http://ss1.richmedia.in/recurl.asp?pid=50 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri Jun 1 17:47:58 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 1 Jun 2007 17:47:58 +0200 Subject: matlab crash after sourceanalysis with correctm = 'cluster' Message-ID: Hi I'm doing sourceanalysis with the following settings: cfg = []; cfg.parameter = 'stat'; cfg.method = 'montecarlo'; cfg.statistic = 'pooledT' ; cfg.numrandomization = 1000; cfg.correctm = 'cluster'; cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; cfg.uvar = 2; cfg.clustercritval = [-1.96 1.96]; %because Z-values GA_source_norm_cl = sourcestatistics(cfg,source_norm{1:Nsub},pseudosource_norm{1:Nsub}); Everything goes well, but after the 1000 randomizations matlab crashes, also on the 16 GB WM mentats. I think it's caused by the multiple comparison correction 'cluster', because without that I doesn't crash (when cfg.correctm = 'no' or fi 'max' does work). Does anyone have any suggestions on how to solve this? I've attached the crashdump. Thanks, Ingrid ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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: matlab_crash_dump.14208 Type: application/octet-stream Size: 17557 bytes Desc: not available URL: From sameer at ANDREW.CMU.EDU Fri Jun 1 21:13:53 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 1 Jun 2007 15:13:53 -0400 Subject: nonparamteric statistical tests for coherence differences Message-ID: Hello, I am looking for Wiki entry or tutorial for doing nonparamteric statistical tests for coherence differences (both within trial and between trials). What I can get is http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:statistics#3_permutation_tests_for_time-frequency_representations which describes how to do the same for TFRs. I am thinking of attempting using basically the same set of commands, but substituting the correct procedure for calculating coherences etc in the steps shown is section 3. will that be proper? thanks for your help. 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 Fri Jun 1 23:17:37 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Fri, 1 Jun 2007 23:17:37 +0200 Subject: nonparamteric statistical tests for coherence differences In-Reply-To: Message-ID: Hi Sameer, > I am looking for Wiki entry or tutorial for doing nonparamteric > statistical tests for coherence differences (both within trial and > between trials). At this moment, only coherence testing between trials is implemented. > > What I can get is > http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu tori > al:statistics#3_permutation_tests_for_time-frequency_representations > which describes how to do the same for TFRs. > > I am thinking of attempting using basically the same set of commands, but > substituting the correct procedure for calculating coherences etc in the > steps shown is section 3. will that be proper? I don't know. Just have a try. My expectation is that copy-pasting will not be sufficient to get it running. On the other hand, I used the Fieldtrip-code for all the analyses on which is reported in our JNM-paper on coherence difference testing. I am aware of the fact that the tutorial could be improved with respect to the testing of coherence differences. Good luck, 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 for your help. > > 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 Jan.Schoffelen at FCDONDERS.RU.NL Sun Jun 3 16:37:53 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Sun, 3 Jun 2007 16:37:53 +0200 Subject: matlab crash after sourceanalysis with correctm = 'cluster' In-Reply-To: Message-ID: Hi Ingrid, Do you perhaps have very big functional volumes and many subjects? Typically, I downsample my volumes back to about my original grid-dimensions, after spatially smoothing the individual volumes. Normally, memory problems could occur when applying a nonparametric cluster threshold, but as far as I know, this is the default option. This therefore should not cause the problem (however it's worth checking in the code, or specifying cfg.clusterthreshold = 'parametric', of cours along with one of my favourite configuration-fields cfg.critval). Yours, Jan-M -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Ingrid Nieuwenhuis Sent: Friday, June 01, 2007 5:48 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] matlab crash after sourceanalysis with correctm = 'cluster' Hi I'm doing sourceanalysis with the following settings: cfg = []; cfg.parameter = 'stat'; cfg.method = 'montecarlo'; cfg.statistic = 'pooledT' ; cfg.numrandomization = 1000; cfg.correctm = 'cluster'; cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; cfg.uvar = 2; cfg.clustercritval = [-1.96 1.96]; %because Z-values GA_source_norm_cl = sourcestatistics(cfg,source_norm{1:Nsub},pseudosource_norm{1:Nsub}); Everything goes well, but after the 1000 randomizations matlab crashes, also on the 16 GB WM mentats. I think it's caused by the multiple comparison correction 'cluster', because without that I doesn't crash (when cfg.correctm = 'no' or fi 'max' does work). Does anyone have any suggestions on how to solve this? I've attached the crashdump. Thanks, Ingrid ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Brian.Roach at YALE.EDU Tue Jun 5 19:39:22 2007 From: Brian.Roach at YALE.EDU (Brian Roach) Date: Tue, 5 Jun 2007 13:39:22 -0400 Subject: Research Assistant Position at Yale University Message-ID: FieldTrip users, We are looking for recent graduates or experienced brain imagers wanting to work in our lab for at least one year before going on to graduate school. Please reply to: daniel.mathalon at yale.edu or judith.ford at yale.edu Research Assistant Needed for Multimodal Brain Imaging in Psychopathology The Clinical and Cognitive Neuroscience Laboratory at Yale University is looking for a research assistant to help with our multi-modal brain imaging studies of schizophrenia using fMRI and EEG/ERP data. Applicants should have a Bachelor's degree from an accredited 4-year university with experience relevant to the position. The assistant will acquire EEG data with ActiveView2 (Biosemi) and Neuroscan (Synamps). Familiarity with software such as E-Prime, STIM, or Presentation is desirable. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Tue Jun 5 20:52:13 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 5 Jun 2007 14:52:13 -0400 Subject: plotting phase lock values w.r.t. a reference channel. Message-ID: Hello, Is there a simple modification of fieldtrip plotting functions (topoplot etc) which can be used to plot phase lock values (plvspctrm)? thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Jan.Schoffelen at FCDONDERS.RU.NL Tue Jun 5 21:00:44 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Tue, 5 Jun 2007 21:00:44 +0200 Subject: plotting phase lock values w.r.t. a reference channel. In-Reply-To: Message-ID: Dear Sameer, I guess the easiest way of solving this, is to do: freq.cohspctrm = freq.plvspctrm and then proceed as if you are dealing with coherence-spectra. (don't forget to specify cfg.cohrefchannel). Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Tuesday, June 05, 2007 8:52 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] plotting phase lock values w.r.t. a reference channel. Hello, Is there a simple modification of fieldtrip plotting functions (topoplot etc) which can be used to plot phase lock values (plvspctrm)? thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Jun 5 21:07:27 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 5 Jun 2007 21:07:27 +0200 Subject: plotting phase lock values w.r.t. a reference channel. In-Reply-To: Message-ID: Hi Sameer, I think that it should be already possible to plot it with the functions as they are. If you specify cfg.zparam = 'plvspctrm', you also manually have to specify the xparam and in case of 3D data also the yparam. Did you already try this? And if it didn't work what error did you get? Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Tuesday, June 05, 2007 8:52 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] plotting phase lock values w.r.t. a reference channel. Hello, Is there a simple modification of fieldtrip plotting functions (topoplot etc) which can be used to plot phase lock values (plvspctrm)? thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Tue Jun 5 21:23:05 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 5 Jun 2007 15:23:05 -0400 Subject: plotting phase lock values w.r.t. a reference channel. In-Reply-To: <003b01c7a7a4$c1f80300$642dae83@fcdonders.nl> Message-ID: Thanks Jan-Mathijs and Ingrid, Using cfg.zparam = 'plvspctrm' was returning error essentially implying that it did not recognize this zparam. But I must have been using some wrong dataset as I just tried it to reproduce the error and it worked. Unfortuanely, it seems that the PLV is always 1?!! I expect it should be between [0 2pi] or [-pi pi]. Must look into it now. sameer On Tue, 5 Jun 2007, Ingrid Nieuwenhuis wrote: > Hi Sameer, > > I think that it should be already possible to plot it with the functions as > they are. If you specify cfg.zparam = 'plvspctrm', you also manually have to > specify the xparam and in case of 3D data also the yparam. > Did you already try this? And if it didn't work what error did you get? > > Hope this helps, > Ingrid > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Sameer Walawalkar > Sent: Tuesday, June 05, 2007 8:52 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] plotting phase lock values w.r.t. a reference channel. > > Hello, > > Is there a simple modification of fieldtrip plotting functions (topoplot > etc) which can be used to plot phase lock values (plvspctrm)? > > thanks, > sameer > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Wed Jun 6 22:59:54 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Wed, 6 Jun 2007 16:59:54 -0400 Subject: phase locking value always 1 Message-ID: Hello, I use the following setup to calculate PLVs: cfg = []; cfg.ouput='powandcsd'; cfg.method='mtmfft'; cfg.keeptrials='no'; cfg.tapsmofrq=4; cfg.foilim =[05 120]; cfg.channel = 'MEG' ; cfg.channelcmb = {'MEG' 'MEG'}; cfg.pad = 2.00 ; freq_LL_Two_pre = freqanalysis(cfg,dataLL_Two_pre); cfg = []; cfg.cohmethod = 'plv'; Phase_neg2_neg1_LL_Two_pre = freqdescriptives(cfg, freq_LL_Two_pre) The PLVs I get are uniformly 1.000. I am not sure what's going on. the coherence spectra from cfg.cohmethod = 'coh' are just fine. thanks, sameer p.s: On a side note, for coherences, if I use cfg.complex = 'angle': the phase differences I get seem to be distributed from [-2pi 2pi] rather than [-pi pi] or [0 2pi] (I have not used [] strictly in mathematical sense). How do I understand this? ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Jan.Schoffelen at FCDONDERS.RU.NL Thu Jun 7 10:02:25 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Thu, 7 Jun 2007 10:02:25 +0200 Subject: phase locking value always 1 In-Reply-To: Message-ID: Dear Sameer, cfg.keeptrials = 'no' is strictly forbidden when you want to compute the plv! The reason for this comes from the mathematics behind it: For the computation of the plv, each observation has to be normalised by its amplitude prior to averaging across all observations. The normalisation step is implemented in freqdescriptives, therefore it needs an input which still contains the single trials. I leave it as a quiz for the interested reader to reason why actually the plv becomes 1, when you only have a 'single' (that is: averaged) observation. Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Wednesday, June 06, 2007 11:00 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] phase locking value always 1 Hello, I use the following setup to calculate PLVs: cfg = []; cfg.ouput='powandcsd'; cfg.method='mtmfft'; cfg.keeptrials='no'; cfg.tapsmofrq=4; cfg.foilim =[05 120]; cfg.channel = 'MEG' ; cfg.channelcmb = {'MEG' 'MEG'}; cfg.pad = 2.00 ; freq_LL_Two_pre = freqanalysis(cfg,dataLL_Two_pre); cfg = []; cfg.cohmethod = 'plv'; Phase_neg2_neg1_LL_Two_pre = freqdescriptives(cfg, freq_LL_Two_pre) The PLVs I get are uniformly 1.000. I am not sure what's going on. the coherence spectra from cfg.cohmethod = 'coh' are just fine. thanks, sameer p.s: On a side note, for coherences, if I use cfg.complex = 'angle': the phase differences I get seem to be distributed from [-2pi 2pi] rather than [-pi pi] or [0 2pi] (I have not used [] strictly in mathematical sense). How do I understand this? ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marie at PSY.GLA.AC.UK Thu Jun 7 17:37:31 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Thu, 7 Jun 2007 16:37:31 +0100 Subject: RA job advertisement - CCNi Glasgow Message-ID: UNIVERSITY of GLASGOW DEPARTMENT OF PSYCHOLOGY Centre for Cognitive Neuroimaging (CCNi) RESEARCH ASSISTANT 3 year fixed term appointment, £23,692 - £26,666 or £29,139 - £32,796 per annum (depending on experience) REF: 13355/DPO/A3 Applications are invited for a Postdoctoral Research Assistant to work with Professor Philippe Schyns, Dr. Nial Friel (Dept of Statistics) and Dr Marie Smith in the newly established Centre for Cognitive Neuroimaging (CCNi) on a project entitled “Adaptive Sampling Algorithms for Cognitive Neuroscience Applications Using Bubbles”. 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 overall aim of the project is to develop new methods to interpret behavioural and brain signals (EEG, MEG and fMRI) with online sampling of image information. Using adaptive sampling algorithms, we will seek to circumscribe the stimulus information that optimises a particular brain response. Developments of adaptive sampling will include Hidden Markov modelling placed within a statistical decision framework. You will also have the opportunity to contribute to the development of a user-friendly, MatLab based toolbox to make these algorithms publicly available to our growing user base. You will be qualified, with a PhD, or equivalent, in Statistics or Mathematics or a closely related discipline. Advanced skills in statistical pattern recognition and/or machine learning and/or Bayesian methods are essential. Strong programming skills (Matlab, C or related) are also highly desirable. Finally, you should have a strong interest in developing your own scientific program and pursuing a research career. This post is available from 1 Aug 2007. Informal enquiries may be made to Professor P. Schyns, (+44 (0)141 330 4937; p.schyns at psy.gla.ac.uk), Dr Nial Friel (+44 (0) 141 4047 ; nial at stats.gla.ac.uk) or Dr Marie Smith (+44 (0)141 330 3987; m.smith at psy.gla.ac.uk). For further details on the department, please see our website at: http://www.ccni.gla.ac.uk/ For an application pack, please see our website at http:// www.gla.ac.uk/ or write quoting the appropriate reference number 13355/DPO/A3 to the Recruitment Section, Human Resources Department, University of Glasgow, Glasgow G12 8QQ. Closing date: 6th July 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 sameer at ANDREW.CMU.EDU Thu Jun 7 22:11:56 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 7 Jun 2007 16:11:56 -0400 Subject: cannot convert gradiometer definition back to axial, please contact Robert Message-ID: Hello Robert, I have been playing around with http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:statistics#3_permutation_tests_for_time-frequency_representations in an attempt implement non-paramteric statistical testing of coherence diferences between trials. My screen currently reads: the input is freq data with 612 channels, 18 frequencybins and 11 timebins Warning: trying to convert planar to axial gradiometers, this is experimental > In combineplanar at 280 In Auto_nonparametric_coh at 47 ??? Error using ==> combineplanar at 308 cannot convert gradiometer definition back to axial, please contact Robert Error in ==> Auto_nonparametric_coh at 47 TFR_LL_000_500_planar_cmb = combineplanar(cfg, TFR_LL_000_500_planar); So, I am getting in touch with Robert Oostenveld. 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 sameer at ANDREW.CMU.EDU Fri Jun 8 22:31:43 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 8 Jun 2007 16:31:43 -0400 Subject: channel combinations for coherene Message-ID: Hello, how can I specify cfg.channelcmb for freqanalysis_mtmfft such that it only does planar-planar combinations or mag-mag combinations? thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Sat Jun 9 10:20:59 2007 From: jan.schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Sat, 9 Jun 2007 10:20:59 +0200 Subject: channel combinations for coherene Message-ID: Dear Sameer, I am not sure whether I understood your question correctly, but couldn't you just specify: cfg.channelcmb = {'MEG' 'MEG'} ? JM ----- Original Message ----- From: Sameer Walawalkar Date: Friday, June 8, 2007 10:31 pm Subject: [FIELDTRIP] channel combinations for coherene > Hello, > > how can I specify cfg.channelcmb for freqanalysis_mtmfft such that > it only > does planar-planar combinations or mag-mag combinations? > > thanks, > sameer > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Sun Jun 10 19:58:25 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Sun, 10 Jun 2007 13:58:25 -0400 Subject: channel combinations for coherene In-Reply-To: Message-ID: Dear Jan, {'MEG' 'MEG'} is too many channel combinations. I later run into memory problems (I am trying to get Phase Lock Value and freqanalysis_mtmfft needs a matrix of dimensions [number of trials X number of channel combinations X number of frequency points]). So I am trying to do only gradiometers with gradiometers and mags with mags (though I think even that needs too much memory while computing phase lock values). thanks, sameer On Sat, 9 Jun 2007, Jan Mathijs Schoffelen wrote: > Dear Sameer, > > I am not sure whether I understood your question correctly, but couldn't you just specify: > > cfg.channelcmb = {'MEG' 'MEG'} ? > > JM > > ----- Original Message ----- > From: Sameer Walawalkar > Date: Friday, June 8, 2007 10:31 pm > Subject: [FIELDTRIP] channel combinations for coherene > >> Hello, >> >> how can I specify cfg.channelcmb for freqanalysis_mtmfft such that >> it only >> does planar-planar combinations or mag-mag combinations? >> >> thanks, >> sameer >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/fcdonders/fieldtrip. >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Mon Jun 11 10:37:06 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 11 Jun 2007 10:37:06 +0200 Subject: channel combinations for coherene In-Reply-To: Message-ID: Hi Sameer, You can just specify channel combinations by hand as a two-column cell array only for the channels you want, see the help of the function channelcombination.m Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Sunday, June 10, 2007 7:58 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] channel combinations for coherene Dear Jan, {'MEG' 'MEG'} is too many channel combinations. I later run into memory problems (I am trying to get Phase Lock Value and freqanalysis_mtmfft needs a matrix of dimensions [number of trials X number of channel combinations X number of frequency points]). So I am trying to do only gradiometers with gradiometers and mags with mags (though I think even that needs too much memory while computing phase lock values). thanks, sameer On Sat, 9 Jun 2007, Jan Mathijs Schoffelen wrote: > Dear Sameer, > > I am not sure whether I understood your question correctly, but couldn't you just specify: > > cfg.channelcmb = {'MEG' 'MEG'} ? > > JM > > ----- Original Message ----- > From: Sameer Walawalkar > Date: Friday, June 8, 2007 10:31 pm > Subject: [FIELDTRIP] channel combinations for coherene > >> Hello, >> >> how can I specify cfg.channelcmb for freqanalysis_mtmfft such that >> it only >> does planar-planar combinations or mag-mag combinations? >> >> thanks, >> sameer >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/fcdonders/fieldtrip. >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Jan.Schoffelen at FCDONDERS.RU.NL Mon Jun 11 11:14:46 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 11 Jun 2007 11:14:46 +0200 Subject: channel combinations for coherene In-Reply-To: Message-ID: Dear Sameer, I cannot cure memory problems for you. ;o) Even if you managed to achieve a reduction in the amount of chncmbs, I think that you would still run into problems. Next to this, I feel that you should be a bit more specific about your question. I assume that you would like to apply a kind of 'combineplanar' in order to reduce the amount of chancmb's (in other words I guess you would like to get rid of the _dV and _dH planar gradients, and collaps those into one number). This is not at all trivial, since in a bivariate measure such as coherence you are dealing with a cross-spectral density between 4 channels (which four and why?). In other words, you have a matrix which looks like this: Chn1_dh Chn1_dv Chn2_dh Chn2_dv Chn1_dh xx xx yx yx Chn1_dv xx xx yx yx Chn2_dh xy xy yy yy Chn2_dv xy xy yy yy The xx and yy blocks contain info about the extent at which the activity picked up by chn1 and chn2 respectively reflect a 'dipole' with fixed orientation, the xy and yx blocks containt the cross-term information, and are each other's conjugate (why was that again?). If we consider coherence (or plv for the same argument) to be a measure which quantifies the linear predictability of chn1 out of chn2 it might be easy to see why actually we need to take into account the interaction between the respective _dh and _dv gradiometers. If the _dh and _dv component are linearly independent, then they explain independent parts of the variance in the other channel. However, in practice this is of course never the case, so the two planar gradients cannot be considered independently. This means that it is generally not possible to sum the coherence values in the xy blocks. If you want to summarize the sixteen values in the matrix above, you have to come up with a clever strategy. I could think of two strategies: Either you reduce the amount of channels prior to doing the cross-spectral density computation. This results in reducing the 4x4 csd-matrix back into a 2x2 matrix, in which the off-diagonal element gives you the chncmb csd directly. This could for example be done by estimating the extent to which the activity at a planar channel can be represented as a dipole with a fixed orientation, and projecting the activity of the planar channel onto the direction of the highest variance (basically doing a pca). This should be applied to the fourier-data. Another strategy could be to compute the frequency equivalent of canonical correlation, which would yield the maximum of variance explained by an optimal linear combination of the respective two planar gradient combinations. Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Sunday, June 10, 2007 7:58 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] channel combinations for coherene Dear Jan, {'MEG' 'MEG'} is too many channel combinations. I later run into memory problems (I am trying to get Phase Lock Value and freqanalysis_mtmfft needs a matrix of dimensions [number of trials X number of channel combinations X number of frequency points]). So I am trying to do only gradiometers with gradiometers and mags with mags (though I think even that needs too much memory while computing phase lock values). thanks, sameer On Sat, 9 Jun 2007, Jan Mathijs Schoffelen wrote: > Dear Sameer, > > I am not sure whether I understood your question correctly, but couldn't you just specify: > > cfg.channelcmb = {'MEG' 'MEG'} ? > > JM > > ----- Original Message ----- > From: Sameer Walawalkar > Date: Friday, June 8, 2007 10:31 pm > Subject: [FIELDTRIP] channel combinations for coherene > >> Hello, >> >> how can I specify cfg.channelcmb for freqanalysis_mtmfft such that >> it only >> does planar-planar combinations or mag-mag combinations? >> >> thanks, >> sameer >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/fcdonders/fieldtrip. >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 r.oostenveld at FCDONDERS.RU.NL Mon Jun 11 14:57:53 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 11 Jun 2007 14:57:53 +0200 Subject: cannot convert gradiometer definition back to axial, please contact Robert In-Reply-To: Message-ID: Hi Sameer, On 7 Jun 2007, at 22:11, Sameer Walawalkar wrote: > Hello Robert, > > I have been playing around with http://www2.ru.nl/fcdonders/ > fieldtrip/doku.php? > id=fieldtrip:documentation:tutorial:statistics#3_permutation_tests_for > _time-frequency_representations > > in an attempt implement non-paramteric statistical testing of > coherence diferences between trials. My screen currently reads: > > the input is freq data with 612 channels, 18 frequencybins and 11 > timebins How did you manage to get 612 channels? Are you computing planar channels from your planar channels? Your neuromag system already has planar channels (by hardware design), hence you should not call megplanar on your data. The megplanar function is meant for computing planar gradients from a hardware magnetometer system (or a hardware axial gradiometer system, such as our CTF). After preprocessing and timelockanalysis or freqanalysis you should do combineplanar. > Warning: trying to convert planar to axial gradiometers, this is > experimental >> In combineplanar at 280 > In Auto_nonparametric_coh at 47 > ??? Error using ==> combineplanar at 308 > cannot convert gradiometer definition back to axial, please contact > Robert > > Error in ==> Auto_nonparametric_coh at 47 > TFR_LL_000_500_planar_cmb = combineplanar(cfg, TFR_LL_000_500_planar); > > > So, I am getting in touch with Robert Oostenveld. 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 a.maye at UKE.DE Thu Jun 14 11:26:09 2007 From: a.maye at UKE.DE (Alexander Maye) Date: Thu, 14 Jun 2007 11:26:09 +0200 Subject: wavelet analysis! Message-ID: Dear experts! When I compute coherence (using 'freqdescriptives') based on a frequency transform using 'freqanalysis_wltconvol', I get coherence values larger than 1. This has also been observed by Muthuraman before. The script below demonstrates this observation and also that freqanalysis_mtmconvol does everything correctly. I think the problem is pertinent to all current fieldtrip versions. While I can easily switch to mtmconvol I thought it could be useful to address this issue. Does anyone have an idea? Best, ALEX. % Construct 4 trials with a sine wave in two channels ... t=[0:1/pi:100*pi]; data.trial{1} = [sin(t);sin(t)]; data.time{1} = t/pi/10; for i = 2:4, data.trial{i}=data.trial{1};data.time{i}=data.time{1}; end data.label = {'1' '2'}; data.fsample = 10*pi; cfgmtm.method = 'mtmconvol'; cfgmtm.tapsmofrq = 10; cfgmtm.t_ftimwin = 0.2; cfgmtm.output = 'powandcsd'; cfgmtm.keeptrials = 'yes'; cfgmtm.toi = 5; cfgmtm.foi = 10; cfgwlt.method = 'wltconvol'; cfgwlt.width = 5; cfgwlt.output = 'powandcsd'; cfgwlt.keeptrials = 'yes'; cfgwlt.toi = 5; cfgwlt.foi = 10; fmtm = freqanalysis(cfgmtm,data); fwlt = freqanalysis(cfgwlt,data); cohcfg.cohmethod = 'coh'; cohcfg.complex = 'abs'; cohmtm = freqdescriptives(cohcfg,fmtm); cohwlt = freqdescriptives(cohcfg,fwlt); % ... should yield a coherence of 1 ... cohmtm % ... but this doesn't :-( cohwlt ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Jan.Schoffelen at FCDONDERS.RU.NL Thu Jun 14 14:41:06 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Thu, 14 Jun 2007 14:41:06 +0200 Subject: wavelet analysis! In-Reply-To: Message-ID: Dear Alex, >When I compute coherence (using 'freqdescriptives') based on a frequency >transform using 'freqanalysis_wltconvol', I get coherence values larger >than 1. This has also been observed by Muthuraman before. > >The script below demonstrates this observation and also that >freqanalysis_mtmconvol does everything correctly. I think the problem is >pertinent to all current fieldtrip versions. I'm very glad that you started trying out to solve the problem yourself. Solving a problem indeed always starts with finding out where it goes wrong ;) >While I can easily switch to mtmconvol I thought it could be useful to >address this issue. Does anyone have an idea? Yes, I have an idea. Regarding your suggested switch to mtmconvol I can only very much support you to do so, but let's address the issue: You construct 4 trials of surrogate data with an expected coherence of 1. What you find is a coherence of 1 with mtmconvol, but a coherence of >1 with wltconvol. Let's tackle the problem from its tail to find the cause, by looking at the mathematics to compute coherence: In pseudo-mathematics this yields: Coherence = abs(mean(csd))./sqrt(mean(pow1)*mean(pow2)). In your simulated case, you explicitly equated signal 1 and 2, which means that the csd would be: 1 real-valued 2 equivalent to the power of one of the signals (does everybody still agree?) In pseudo-mathematics: Pow1 = pow2 = csd: coherence = abs(mean(pow))./sqrt(mean(pow)*mean(pow))= p/sqrt(p^2) = 1 Apparently, wltconvol either gives back too big a csd, or too small a pow1 (and pow2). Let's have a look at the code then (of course you and Muthuraman already did): Mtmconvol line 450: powdum = 2.* abs(autspctrmacttap) .^ 2 ./ actfoinumsmp; Mtmconvol line 489: csddum = 2.* (autspctrmacttap(cutdatindcmb(:,1),:) .* conj(autspctrmacttap(cutdatindcmb(:,2),:))) ./ actfoinumsmp; So these lines compute the power (450) and the csd (489). The 2 and the actfoinumsmp are needed for a proper normalization. So far so good. Wltconvol l. 279: powdum = (2.* abs(autspctrmacttap) ./ data.fsample) .^ 2; Wltconvol l. 292: csddum = 2.* (autspctrmacttap(cutdatindcmb(:,1),:) .* conj(autspctrmacttap(cutdatindcmb(:,2),:))) ./ data.fsample; %actfoinumsmp Oooops! As you can see, the normalization of powdum is different from the normalisation of csddum. In fact there is an additional 2./data.fsample (still with me? The squaring is taken outside of the brackets), as compared to the csddum. This would even allow me to predict the (wrong) coherence outputted by your little simulation, but I leave that up to you guys. This is indeed a bug and will be fixed. Keep up the good work. J-M ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 a.maye at UKE.DE Thu Jun 14 16:33:15 2007 From: a.maye at UKE.DE (Alexander Maye) Date: Thu, 14 Jun 2007 16:33:15 +0200 Subject: read in EEProbe data Message-ID: Dear all! I just ran across the same problem reading EEProbe files like others in this thread before. Reading an EEprobe .cnt file using read_fcdc_header simply crashes my matlab (under Linux). This is due to read_eep_cnt.mexglx, which according to Robert can't be fixed until some low-level ANT functions become available. I'm talking about fieldtrip 0.9.8. Alright, here comes a very dirty but quick fix that works fine for me (and I hope that nobody from the EEGLab community is listening :-)). EEGLab (Delorme, Makeig, http://sccn.ucsd.edu/) comes with the same read_eep_cnt.mexglx function, which works surprizingly well. So, replacing read_eep_cnt.mexglx in the fieldtrip/private directory with the corresponding file from the EEGLab disribution (version 5 in my case) solved the problem. I acknowledge that from an ethical point of view this is wrong, and I hope that I will not be forced to continue this bad behavior in the near future ;-) Cheers, ALEX. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Thu Jun 14 21:22:14 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 14 Jun 2007 15:22:14 -0400 Subject: cannot convert gradiometer definition back to axial, please contact Robert In-Reply-To: Message-ID: Hi, As suggested I did freqanalysis and followd it up by trying combine planar and got similar error. cfgTFR = []; cfgTFR.output = 'pow'; cfgTFR.channel = 'MEG'; cfgTFR.method = 'mtmconvol'; cfgTFR.foi = 5 : 5 : 90; cfgTFR.t_ftimwin = 5./cfgTFR.foi; cfgTFR.tapsmofrq = 0.4 *cfgTFR.foi; cfgTFR.toi = .0 : 0.05 : .5; cfgTFR.pad = 'maxperlen'; and cfg = []; cfg.combinegrad = 'yes'; ERROR message: the input is freq data with 306 channels, 18 frequencybins and 11 timebins Warning: trying to convert planar to axial gradiometers, this is experimental > In combineplanar at 280 In Auto_nonparametric_coh at 47 ??? Error using ==> combineplanar cannot convert gradiometer definition back to axial, please contact Robert Error in ==> Auto_nonparametric_coh at 47 TFR_LL_000_500_cmb = combineplanar(cfg, TFR_LL_000_500); thanks, sameer On Mon, 11 Jun 2007, Robert Oostenveld wrote: > Hi Sameer, > > On 7 Jun 2007, at 22:11, Sameer Walawalkar wrote: > >> Hello Robert, >> >> I have been playing around with >> http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:statistics#3_permutation_tests_for_time-frequency_representations >> >> in an attempt implement non-paramteric statistical testing of coherence >> diferences between trials. My screen currently reads: >> >> the input is freq data with 612 channels, 18 frequencybins and 11 timebins > > How did you manage to get 612 channels? Are you computing planar channels > from your planar channels? Your neuromag system already has planar channels > (by hardware design), hence you should not call megplanar on your data. The > megplanar function is meant for computing planar gradients from a hardware > magnetometer system (or a hardware axial gradiometer system, such as our > CTF). > > After preprocessing and timelockanalysis or freqanalysis you should do > combineplanar. > >> Warning: trying to convert planar to axial gradiometers, this is >> experimental >>> In combineplanar at 280 >> In Auto_nonparametric_coh at 47 >> ??? Error using ==> combineplanar at 308 >> cannot convert gradiometer definition back to axial, please contact Robert >> >> Error in ==> Auto_nonparametric_coh at 47 >> TFR_LL_000_500_planar_cmb = combineplanar(cfg, TFR_LL_000_500_planar); >> >> >> So, I am getting in touch with Robert Oostenveld. > > 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. From sameer at ANDREW.CMU.EDU Sat Jun 16 03:26:54 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 15 Jun 2007 21:26:54 -0400 Subject: cannot convert gradiometer definition back to axial, please contact Robert (fwd) Message-ID: I think I was getting this message because I did not have cfg.keeptrials = 'yes' I am also trying without combineplanar as it seems that it might not be required for NM306. (Also combineplanar gives me same old error, "cant convert gradiometer to axial. this is probably because, I did not go Axial -> grad, so there is no point attempting grad->axial) The current state of affairs is cfg = channel: {306x1 cell} method: 'montecarlo' statistic: 'indepsamplesT' clusteralpha: 0.0500 clusterstatistic: 'maxsum' minnbchan: 2 tail: 0 clustertail: 0 alpha: 0.0500 numrandomization: 100 design: [1 2] ivar: 1 latency: [0.2000 -0.1000] frequency: [8 14] avgoverchan: 'no' avgovertime: 'no' avgoverfreq: 'no' channelcmb: [] precision: 'double' version: [1x1 struct] previous: {[1x1 struct] [1x1 struct]} dimord: 'chan_freq_time' dim: [306 7 1] Using the gradiometer configuration from the dataset. there are on average 17.4 neighbours per channel using "statistics_montecarlo" for the statistical testing ??? Error using ==> fieldtrip/private/statistics_wrapper at 240 the size of the design matrix does not match the number of observations in the data Error in ==> freqstatistics at 106 [stat] = statistics_wrapper(cfg, varargin{:}); Error in ==> Auto_nonparametric_coh at 86 [stat_post] = freqstatistics(cfg, TFR_LL_200_400 , TFR_LL_neg1_neg2); I shall be trying to troubleshoot this. Hope some of it makes sense. thanks for your time. best, sameer ---------- Forwarded message ---------- Date: Thu, 14 Jun 2007 15:22:14 -0400 (EDT) From: Sameer Walawalkar To: FieldTrip discussion list Subject: Re: [FIELDTRIP] cannot convert gradiometer definition back to axial, please contact Robert Hi, As suggested I did freqanalysis and followd it up by trying combine planar and got similar error. cfgTFR = []; cfgTFR.output = 'pow'; cfgTFR.channel = 'MEG'; cfgTFR.method = 'mtmconvol'; cfgTFR.foi = 5 : 5 : 90; cfgTFR.t_ftimwin = 5./cfgTFR.foi; cfgTFR.tapsmofrq = 0.4 *cfgTFR.foi; cfgTFR.toi = .0 : 0.05 : .5; cfgTFR.pad = 'maxperlen'; and cfg = []; cfg.combinegrad = 'yes'; ERROR message: the input is freq data with 306 channels, 18 frequencybins and 11 timebins Warning: trying to convert planar to axial gradiometers, this is experimental > In combineplanar at 280 In Auto_nonparametric_coh at 47 ??? Error using ==> combineplanar cannot convert gradiometer definition back to axial, please contact Robert Error in ==> Auto_nonparametric_coh at 47 TFR_LL_000_500_cmb = combineplanar(cfg, TFR_LL_000_500); thanks, sameer On Mon, 11 Jun 2007, Robert Oostenveld wrote: > Hi Sameer, > > On 7 Jun 2007, at 22:11, Sameer Walawalkar wrote: > >> Hello Robert, >> >> I have been playing around with >> http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:statistics#3_permutation_tests_for_time-frequency_representations >> >> in an attempt implement non-paramteric statistical testing of coherence >> diferences between trials. My screen currently reads: >> >> the input is freq data with 612 channels, 18 frequencybins and 11 timebins > > How did you manage to get 612 channels? Are you computing planar channels > from your planar channels? Your neuromag system already has planar channels > (by hardware design), hence you should not call megplanar on your data. The > megplanar function is meant for computing planar gradients from a hardware > magnetometer system (or a hardware axial gradiometer system, such as our > CTF). > > After preprocessing and timelockanalysis or freqanalysis you should do > combineplanar. > >> Warning: trying to convert planar to axial gradiometers, this is >> experimental >>> In combineplanar at 280 >> In Auto_nonparametric_coh at 47 >> ??? Error using ==> combineplanar at 308 >> cannot convert gradiometer definition back to axial, please contact Robert >> >> Error in ==> Auto_nonparametric_coh at 47 >> TFR_LL_000_500_planar_cmb = combineplanar(cfg, TFR_LL_000_500_planar); >> >> >> So, I am getting in touch with Robert Oostenveld. > > 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. From thomas at UCSD.EDU Sat Jun 16 22:55:09 2007 From: thomas at UCSD.EDU (Thomas Thesen) Date: Sat, 16 Jun 2007 16:55:09 -0400 Subject: freqbaseline - zscore Message-ID: Hi FieldTrippers, Hi List, I noticed that in the current release of FT, FREQBASELINE.M has a section commented out where the zscore is presumably calculated. Can anyone say what the reason is for that? Is the calculation not valid? What does it produce? A zscore comparison would, in practice, be most convenient to have. Or is there a better way to do this? Thanks, Thomas ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 t.schneider at UKE.UNI-HAMBURG.DE Mon Jun 18 13:27:14 2007 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Mon, 18 Jun 2007 13:27:14 +0200 Subject: source data on inflated surface Message-ID: Hi, I was trying to project source data to an inflated surface, but consistently got the error message: Color Data is not set for interpolated shading. The plot of the surface looks fine so far, but no functional data is plotted. I used the following config with the fieldtrip version 20070617: figure cfg = []; cfg.anaparameter = 'anatomy'; cfg.funparameter = funparameter; cfg.maskparameter = maskparameter; cfg.method = 'surface'; cfg.projmethod = 'nearest'; cfg.surfinflated = 'surface_l4_both.mat'; cfg.funcolorlim = 'zeromax'; cfg = sourceplot(cfg, sourceInterp); Has anyone experience with this error? Best, Till -- 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 t.schneider at UKE.UNI-HAMBURG.DE Mon Jun 18 13:44:52 2007 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Mon, 18 Jun 2007 13:44:52 +0200 Subject: source data on inflated surface Message-ID: Hi, I was trying to project source data to an inflated surface, but consistently got the error message:Color Data is not set for interpolated shading. The plot of the surface looks fine so far, but no functional data is plotted.I used the following config with the fieldtrip version 20070617: figure cfg = []; cfg.anaparameter = 'anatomy'; cfg.funparameter = funparameter; cfg.maskparameter = maskparameter; cfg.method = 'surface'; cfg.projmethod = 'nearest'; cfg.surfinflated = 'surface_l4_both.mat'; cfg.funcolorlim = 'zeromax'; cfg = sourceplot(cfg, sourceInterp); Has anyone experience with this error? Best, Till -- 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 ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Jun 19 15:51:54 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 19 Jun 2007 15:51:54 +0200 Subject: source data on inflated surface In-Reply-To: <46767034.30709@uke.uni-hamburg.de> Message-ID: Hi Till, I think the error is caused because the cfg is not specified correctly. If you want to plot onto an inflated surface you have to specify both cfg.surffile and cfg.surfinflated. In your case it could be: cfg.surffile = 'surface_wm_both.mat'; cfg.surfinflated = 'surface_wminf_both.mat'; The first is used to interpolate the functional data onto, the second is used for plotting. You can't use the 'surface_l4_both.mat' because there is no matching surface file with that one. Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Till Schneider Sent: Monday, June 18, 2007 1:45 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] source data on inflated surface Hi, I was trying to project source data to an inflated surface, but consistently got the error message:Color Data is not set for interpolated shading. The plot of the surface looks fine so far, but no functional data is plotted.I used the following config with the fieldtrip version 20070617: figure cfg = []; cfg.anaparameter = 'anatomy'; cfg.funparameter = funparameter; cfg.maskparameter = maskparameter; cfg.method = 'surface'; cfg.projmethod = 'nearest'; cfg.surfinflated = 'surface_l4_both.mat'; cfg.funcolorlim = 'zeromax'; cfg = sourceplot(cfg, sourceInterp); Has anyone experience with this error? Best, Till -- 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 vvw at CALTECH.EDU Tue Jun 19 20:37:30 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Tue, 19 Jun 2007 11:37:30 -0700 Subject: egi2besa2fieldtrip - topoplot layout Message-ID: Hi Fieldtripers, below find the relevant sample code I am using to plot cluster results with Fieldtrip release v. 20070514 (latest?). I have read previous posts in the discussion but I still bump into this issue (not sure how old the discussions were). The recordings were made with an egi system and preprocessed in besa. Although I am using the prepare_layout function, the layout in topoplotER (and other plotting tools) needs to be rotated by 90degrees clockwise. I have tried to use cfg.rotate (in the for loop below, commented here) but that does not change anything. Do you have any suggestions on how to overcome this problem? Thanks in advance for your help! Virginie % ==== plot results ==== cfg = []; cfg.elecfile = '\CHANNELS_specs\fieldtrip_GSN128.sfp'; egilay = prepare_layout(cfg); diff_gdav = ill_gdav; diff_gdav.av = ill_gdav.avg-noill_gdav.avg; figure; % if cfg.latency = [0.3 0.8]; in cluster analysis %j = [0:0.025:0.5]; % (s), 0 = 1st onset %m = [1:12:251]; % (samples) % if cfg.latency = 'all'; in clusteranalysis j = [0:0.05:1.1]; % (s), 0 = -300ms from1st onset m = [1:25:551]; % (samples) pos = stat.posclusterslabelmat == 1; % + clusters neg = (stat.negclusterslabelmat == 1)*(-1); % - clusters for k = 1:length(j)-1; % 20 subplots subplot(4,5,k); cfg = []; cfg.xlim=[j(k) j(k+1)]; cfg.zlim=[-3 3]; pos_int = mean(pos(:,m(k):m(k+1))')'; neg_int = mean(neg(:,m(k):m(k+1))')'; cfg.highlight = find(pos_int ==1 | neg_int == -1); cfg.comment = 'xlim'; cfg.commentpos = 'title'; cfg.layout = egilay; %cfg.rotate =[90]; % ?? rotate by 90 degrees clock-wise topoplotER(cfg,diff_gdav); end % ==================== 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. From t.schneider at UKE.UNI-HAMBURG.DE Wed Jun 20 09:44:39 2007 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Wed, 20 Jun 2007 09:44:39 +0200 Subject: source data on inflated surface In-Reply-To: <005d01c7b279$008ce890$642dae83@fcdonders.nl> Message-ID: Hi Ingrid, thanks a lot, this works fine. Till Ingrid Nieuwenhuis schrieb: > Hi Till, > > I think the error is caused because the cfg is not specified correctly. If > you want to plot onto an inflated surface you have to specify both > cfg.surffile and cfg.surfinflated. In your case it could be: > > cfg.surffile = 'surface_wm_both.mat'; > cfg.surfinflated = 'surface_wminf_both.mat'; > > The first is used to interpolate the functional data onto, the second is > used for plotting. You can't use the 'surface_l4_both.mat' because there is > no matching surface file with that one. > > Hope this helps, > Ingrid > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Till Schneider > Sent: Monday, June 18, 2007 1:45 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] source data on inflated surface > > Hi, > > I was trying to project source data to an inflated surface, but > consistently got the error message:Color Data is not set for > interpolated shading. The plot of the surface looks fine so far, but no > functional data is plotted.I used the following config with the > fieldtrip version 20070617: > > figure > cfg = []; > cfg.anaparameter = 'anatomy'; > cfg.funparameter = funparameter; > cfg.maskparameter = maskparameter; > cfg.method = 'surface'; > cfg.projmethod = 'nearest'; > cfg.surfinflated = 'surface_l4_both.mat'; > cfg.funcolorlim = 'zeromax'; > cfg = sourceplot(cfg, sourceInterp); > > Has anyone experience with this error? > Best, > Till > > > > -- Till Schneider, Dipl.Psych. Universitaetsklinikum Hamburg-Eppendorf Institut fuer Neurophysiologie und Pathophysiologie Martinistr. 52 20246 Hamburg Germany tel +49-40-42803-3188 fax +49-40-42803-7752 mobil +49-178-2834030 -- 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 olga at GRAPHICMIND.INFO Wed Jun 20 15:20:00 2007 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Wed, 20 Jun 2007 17:20:00 +0400 Subject: egi2besa2fieldtrip - topoplot layout In-Reply-To: <20070619183729.9B5AA12DEE@wood-ox.its.caltech.edu> Message-ID: Dear Virginie, I had the same problem. Actually, I not understand where the problem comes from, but solve it by multiplying the coordinates by cos (- 90) and sin (90). See the script below. It works good for my data... Best Regards, Olga. %prepare layout data.elec = read_fcdc_elec('C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'); cfg = []; cfg.rotate = 90; cfg.elecfile = 'C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'; mylay2 = prepare_layout(cfg); for i=1:69 mylay2.width (i)= 0.5 end; for i=1:69 mylay2.height (i)= 0.5 end; x=mylay.pos (:,1); y=mylay.pos (:,2); mylay2.pos (:,1)=y; mylay2.pos (:,2)=-x; -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Virginie van Wassenhove Sent: Tuesday, June 19, 2007 10:38 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] egi2besa2fieldtrip - topoplot layout Hi Fieldtripers, below find the relevant sample code I am using to plot cluster results with Fieldtrip release v. 20070514 (latest?). I have read previous posts in the discussion but I still bump into this issue (not sure how old the discussions were). The recordings were made with an egi system and preprocessed in besa. Although I am using the prepare_layout function, the layout in topoplotER (and other plotting tools) needs to be rotated by 90degrees clockwise. I have tried to use cfg.rotate (in the for loop below, commented here) but that does not change anything. Do you have any suggestions on how to overcome this problem? Thanks in advance for your help! Virginie % ==== plot results ==== cfg = []; cfg.elecfile = '\CHANNELS_specs\fieldtrip_GSN128.sfp'; egilay = prepare_layout(cfg); diff_gdav = ill_gdav; diff_gdav.av = ill_gdav.avg-noill_gdav.avg; figure; % if cfg.latency = [0.3 0.8]; in cluster analysis %j = [0:0.025:0.5]; % (s), 0 = 1st onset %m = [1:12:251]; % (samples) % if cfg.latency = 'all'; in clusteranalysis j = [0:0.05:1.1]; % (s), 0 = -300ms from1st onset m = [1:25:551]; % (samples) pos = stat.posclusterslabelmat == 1; % + clusters neg = (stat.negclusterslabelmat == 1)*(-1); % - clusters for k = 1:length(j)-1; % 20 subplots subplot(4,5,k); cfg = []; cfg.xlim=[j(k) j(k+1)]; cfg.zlim=[-3 3]; pos_int = mean(pos(:,m(k):m(k+1))')'; neg_int = mean(neg(:,m(k):m(k+1))')'; cfg.highlight = find(pos_int ==1 | neg_int == -1); cfg.comment = 'xlim'; cfg.commentpos = 'title'; cfg.layout = egilay; %cfg.rotate =[90]; % ?? rotate by 90 degrees clock-wise topoplotER(cfg,diff_gdav); end % ==================== 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. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 vvw at CALTECH.EDU Wed Jun 20 18:29:20 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Wed, 20 Jun 2007 09:29:20 -0700 Subject: egi2besa2fieldtrip - topoplot layout In-Reply-To: <200706201306.l5KD6GKX039412@l1.ihna.ru> Message-ID: Hi Olga, thanks for your help, I think I got it working now! Virginie At 06:20 AM 6/20/2007, Olga Sysoeva wrote: >Dear Virginie, > >I had the same problem. >Actually, I not understand where the problem comes from, but solve it by >multiplying the coordinates by cos (- 90) and sin (90). See the script >below. >It works good for my data... > >Best Regards, >Olga. > > >%prepare layout >data.elec = >read_fcdc_elec('C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'); >cfg = []; >cfg.rotate = 90; >cfg.elecfile = 'C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'; >mylay2 = prepare_layout(cfg); > >for i=1:69 > mylay2.width (i)= 0.5 >end; > >for i=1:69 > mylay2.height (i)= 0.5 >end; > >x=mylay.pos (:,1); >y=mylay.pos (:,2); >mylay2.pos (:,1)=y; >mylay2.pos (:,2)=-x; > > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Virginie van Wassenhove >Sent: Tuesday, June 19, 2007 10:38 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: [FIELDTRIP] egi2besa2fieldtrip - topoplot layout > >Hi Fieldtripers, > >below find the relevant sample code I am using to plot cluster >results with Fieldtrip release v. 20070514 (latest?). > >I have read previous posts in the discussion but I still bump into >this issue (not sure how old the discussions were). >The recordings were made with an egi system and preprocessed in besa. >Although I am using the prepare_layout function, the layout in >topoplotER (and other plotting tools) needs to be rotated by >90degrees clockwise. >I have tried to use cfg.rotate (in the for loop below, commented >here) but that does not change anything. > >Do you have any suggestions on how to overcome this problem? >Thanks in advance for your help! > >Virginie > >% ==== plot results ==== >cfg = []; >cfg.elecfile = '\CHANNELS_specs\fieldtrip_GSN128.sfp'; >egilay = prepare_layout(cfg); > >diff_gdav = ill_gdav; >diff_gdav.av = ill_gdav.avg-noill_gdav.avg; > >figure; >% if cfg.latency = [0.3 0.8]; in cluster analysis >%j = [0:0.025:0.5]; % (s), 0 = 1st onset >%m = [1:12:251]; % (samples) >% if cfg.latency = 'all'; in clusteranalysis >j = [0:0.05:1.1]; % (s), 0 = -300ms from1st >onset >m = [1:25:551]; % (samples) > >pos = stat.posclusterslabelmat == 1; % + clusters >neg = (stat.negclusterslabelmat == 1)*(-1); % - clusters > >for k = 1:length(j)-1; % 20 subplots > subplot(4,5,k); > cfg = []; > cfg.xlim=[j(k) j(k+1)]; > cfg.zlim=[-3 3]; > pos_int = mean(pos(:,m(k):m(k+1))')'; > neg_int = mean(neg(:,m(k):m(k+1))')'; > cfg.highlight = find(pos_int ==1 | neg_int == -1); > cfg.comment = 'xlim'; > cfg.commentpos = 'title'; > cfg.layout = egilay; > %cfg.rotate =[90]; % ?? rotate by 90 >degrees clock-wise > topoplotER(cfg,diff_gdav); >end >% ==================== > >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. > >---------------------------------- >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. See also >http://listserv.surfnet.nl/archives/fieldtrip.html and >http://www.ru.nl/fcdonders/fieldtrip. 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. From sameer at ANDREW.CMU.EDU Wed Jun 20 22:50:33 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Wed, 20 Jun 2007 16:50:33 -0400 Subject: nonparamteric statistical tests for coherence differences In-Reply-To: <018401c7a492$478f1b90$6501a8c0@fcdonders.nl> Message-ID: Dear Eric, I was trying to adapt the online tutorial for doing statistical non-parametric tests for coherence differences. After using freqstatistcs along the lines spelt out in the tutorial, when in order to generate topoplots, I use the following command: TFR_LLvsRR_050_500_cmb = TFR_LL_050_500_cmb ; TFR_LLvsRR_050_500_cmb.powspctrm = TFR_LL_050_500_cmb.powspctrm - TFR_RR_050_500_cmb.powspctrm ; I get the following Matlab error: ??? Error using ==> minus Array dimensions must match for binary array op. Clearly this is because I have unequal number of trials for the between trials case. As shown by the following. >>size(TFR_RR_050_500_cmb.powspctrm) ans = 129 204 7 10 >> size(TFR_LL_050_500_cmb.powspctrm) ans = 128 204 7 10 And; >> TFR_LL_050_500_cmb TFR_LL_050_500_cmb = label: {204x1 cell} dimord: 'rpt_chan_freq_time' freq: [8 9 10 11 12 13 14] time: [0.0500 0.1000 0.1500 0.2000 0.2500 0.3000 0.3500 0.4000 0.4500 0.5000] powspctrm: [4-D double] cumtapcnt: [128x7 double] cfg: [1x1 struct] grad: [1x1 struct] Now, from my understanding, the non-parametric statistical testing itself doesnt require equal trials (and the fact that freqstatistics worked shows that part is o.k.). So there must be a way to plot the results bypassing the error. What am I missing here? Thanks for your help. Best, sameer On Fri, 1 Jun 2007, Eric Maris wrote: > Hi Sameer, > >> I am looking for Wiki entry or tutorial for doing nonparamteric >> statistical tests for coherence differences (both within trial and >> between trials). > > At this moment, only coherence testing between trials is implemented. > >> >> What I can get is >> > http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu > tori >> al:statistics#3_permutation_tests_for_time-frequency_representations >> which describes how to do the same for TFRs. >> >> I am thinking of attempting using basically the same set of commands, but >> substituting the correct procedure for calculating coherences etc in the >> steps shown is section 3. will that be proper? > > I don't know. Just have a try. My expectation is that copy-pasting will not > be sufficient to get it running. On the other hand, I used the > Fieldtrip-code for all the analyses on which is reported in our JNM-paper on > coherence difference testing. > > I am aware of the fact that the tutorial could be improved with respect to > the testing of coherence differences. > > > Good luck, > > > 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 for your help. >> >> 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. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 vvw at CALTECH.EDU Thu Jun 21 20:44:41 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Thu, 21 Jun 2007 11:44:41 -0700 Subject: tfanalysis - NaN Message-ID: Hello again. I am finding NaN whatever method I use (multitaper and wavelet analysis), yet using a different analysis tool with similar parameters I obtain clean results. epoch length = 1.1 s baseline length = 0.3 s sampling rate = 500Hz I tried several suggestions listed in the previous message list for a similar problem, but none seem to provide reasonable results (aka always NaN). Also tried with different subjects, no particular error otherwise. I am sending a sample script in case someone has a suggestion on this... Thanks for your help once more! Virginie %% ================================================ % TF analysis - MULTITAPER cfg = []; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.output = 'powandcsd'; %cfg.channel = 'all'; cfg.channel = 'E75'; %win_length = 0.128; %win_n = floor(2.*(1.1./win_length)-1); cfg.foi = 1:5:45; %cfg.t_ftimwin = ones(1,win_n).*win_length; cfg.t_ftimwin = 4./cfg.foi; %cfg.toi = -0.3:win_length/2:0.8; cfg.toi = -0.3:0.05:0.8; % cfg.pad = 'maxperlen'; % cfg.keeptrials = 'no'; % cfg.keeptapers ='no'; s08_ill_mult = freqanalysis(cfg,s08_ill); %% ======================== % plot freq data cfg = []; cfg.baseline = [-0.3 0]; cfg.layout = egilay; cfg.zlim = [-0.00001 0.000001]; % a comparer entre participants % warning off % NaN clf %multiplotTFR(cfg,s08_ill_mult); singleplotTFR(cfg,s08_ill_mult); %% ================================================ % TF analysis - wavelet cfg = []; cfg.method = 'wltconvol'; cfg.width = 4; cfg.output = 'pow'; cfg.foi = 1:2:30; cfg.toi = -0.3:0.05:0.8; s14_ill_wvlt = freqanalysis(cfg, s14_ill); %% ======================== cfg = []; cfg.baseline = [-0.3 0]; cfg.zlim = [-1 1]; cfg.showlabels = 'yes'; cfg.layout = egilay; clf multiplotTFR(cfg, s14_ill_wvlt) %% ================================================ 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. From sameer at ANDREW.CMU.EDU Sun Jun 24 21:11:31 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Sun, 24 Jun 2007 15:11:31 -0400 Subject: could not find the statistics function "statfun_indepsamplesZcoh" Message-ID: Hello, In order to do non-parametric statistical testing for coherence differences, I call freqstatistics(cfg, CrossSpectralDensity_1, CrossSpectralDensity_2) with (among other parameters in the configuration) cfg.method = montecarlo and cfg.statistic = indepsamplesZcoh but, ??? Error using ==> statistics_montecarlo at 217 could not find the statistics function "statfun_indepsamplesZcoh" and indeed it does not exist even in the latest version of fieldtrip. Some of the other ['statfun_' cfg.statistic] functions do exist. 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 maris at NICI.RU.NL Sun Jun 24 21:35:57 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Sun, 24 Jun 2007 21:35:57 +0200 Subject: [SPAM] [FIELDTRIP] could not find the statistics function "statfun_indepsamplesZcoh" In-Reply-To: Message-ID: Dear Sameer, > In order to do non-parametric statistical testing for coherence > differences, I call > > freqstatistics(cfg, CrossSpectralDensity_1, CrossSpectralDensity_2) > > with (among other parameters in the configuration) > cfg.method = montecarlo and > cfg.statistic = indepsamplesZcoh > > but, > > ??? Error using ==> statistics_montecarlo at 217 > could not find the statistics function "statfun_indepsamplesZcoh" > > and indeed it does not exist even in the latest version of fieldtrip. You are right. I used this statfun for a paper together with Jan-Mathijs Schoffelen en Pascal Fries. I will add it to Fieldtrip, probably this week. I will send you an email when I have finished the job. 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/ > > Some of the other ['statfun_' cfg.statistic] functions do exist. > > Thanks, > sameer > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Sun Jun 24 21:37:49 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Sun, 24 Jun 2007 15:37:49 -0400 Subject: [SPAM] [FIELDTRIP] could not find the statistics function "statfun_indepsamplesZcoh" In-Reply-To: <01ad01c7b696$e3bc3320$6501a8c0@fcdonders.nl> Message-ID: thanks Eric. sameer On Sun, 24 Jun 2007, Eric Maris wrote: > Dear Sameer, > > > >> In order to do non-parametric statistical testing for coherence >> differences, I call >> >> freqstatistics(cfg, CrossSpectralDensity_1, CrossSpectralDensity_2) >> >> with (among other parameters in the configuration) >> cfg.method = montecarlo and >> cfg.statistic = indepsamplesZcoh >> >> but, >> >> ??? Error using ==> statistics_montecarlo at 217 >> could not find the statistics function "statfun_indepsamplesZcoh" >> >> and indeed it does not exist even in the latest version of fieldtrip. > > You are right. I used this statfun for a paper together with Jan-Mathijs > Schoffelen en Pascal Fries. I will add it to Fieldtrip, probably this week. > I will send you an email when I have finished the job. > > 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/ > > >> >> Some of the other ['statfun_' cfg.statistic] functions do exist. >> >> Thanks, >> sameer >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the > FieldTrip >> toolbox, to share experiences and to discuss new ideas for MEG and EEG > analysis. >> See also http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Mon Jun 25 10:19:39 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 25 Jun 2007 10:19:39 +0200 Subject: tfanalysis - NaN In-Reply-To: <20070621184447.E5FE71ABB8@earth-ox.its.caltech.edu> Message-ID: Hi Virginie, the function freqanalysis will return NaNs when a time frequency tile extends beyond a corresponding data segment. One would usually expect a "U" shaped padding of NaNs at the boundaries of any TFR which has longer time windows for lower frequencies. From the cfg options you specify below I can see that you have a data segment of 1.1 seconds length and the moving windows cfg.t_tfimwin are quite long at the low ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = 0.6666 s. Hence the NaNs seem perfectly "normal" in this case. The only way to avoid NaN in the time window of interest (using this type of time-frequency tiling) is to make your epochs longer. Hope this helps, Christian On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: > Hello again. > > I am finding NaN whatever method I use (multitaper and wavelet > analysis), yet using a different analysis tool with similar > parameters I obtain clean results. > epoch length = 1.1 s > baseline length = 0.3 s > sampling rate = 500Hz > > I tried several suggestions listed in the previous message list for > a similar problem, but none seem to provide reasonable results (aka > always NaN). > Also tried with different subjects, no particular error otherwise. > I am sending a sample script in case someone has a suggestion on > this... > Thanks for your help once more! > > Virginie > > %% ================================================ > % TF analysis - MULTITAPER > cfg = []; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.output = 'powandcsd'; > %cfg.channel = 'all'; > cfg.channel = 'E75'; > > %win_length = 0.128; > %win_n = floor(2.*(1.1./win_length)-1); > > cfg.foi = 1:5:45; > %cfg.t_ftimwin = ones(1,win_n).*win_length; > cfg.t_ftimwin = 4./cfg.foi; > %cfg.toi = -0.3:win_length/2:0.8; > cfg.toi = -0.3:0.05:0.8; > > % cfg.pad = 'maxperlen'; > % cfg.keeptrials = 'no'; > % cfg.keeptapers ='no'; > s08_ill_mult = freqanalysis(cfg,s08_ill); > > %% ======================== > % plot freq data > cfg = []; > cfg.baseline = [-0.3 0]; > cfg.layout = egilay; > cfg.zlim = [-0.00001 0.000001]; % a comparer entre > participants > % warning off % NaN > clf > %multiplotTFR(cfg,s08_ill_mult); > singleplotTFR(cfg,s08_ill_mult); > > %% ================================================ > % TF analysis - wavelet > cfg = []; > cfg.method = 'wltconvol'; > cfg.width = 4; > cfg.output = 'pow'; > cfg.foi = 1:2:30; > cfg.toi = -0.3:0.05:0.8; > s14_ill_wvlt = freqanalysis(cfg, s14_ill); > %% ======================== > cfg = []; > cfg.baseline = [-0.3 0]; > cfg.zlim = [-1 1]; > cfg.showlabels = 'yes'; > cfg.layout = egilay; > clf > multiplotTFR(cfg, s14_ill_wvlt) > > %% ================================================ > > > > > > > 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. > ---------------------------------------------------------------------- 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 vvw at CALTECH.EDU Mon Jun 25 19:38:38 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Mon, 25 Jun 2007 10:38:38 -0700 Subject: tfanalysis - NaN In-Reply-To: <6B8DAFB4-88B1-4A86-A617-6D856922821A@fcdonders.ru.nl> Message-ID: Hi Christian, thanks for your inputs. Actually, I have tried different window sizes and frequency parameters (and wavelet, tf tiling,...). I would not expect to obtain NaN for a narrow band in higher frequencies (say 35-45Hz) with 2Hz and 4 cycles resolution with the same epoch but I still do. I'll try with a longer epoch, but I find puzzling that I should still get NaN when the resolution should be sufficient for the computations. Cheers, Virgine At 01:19 AM 6/25/2007, Christian Hesse wrote: >Hi Virginie, > >the function freqanalysis will return NaNs when a time frequency >tile extends beyond a corresponding data segment. One would usually >expect a "U" shaped padding of NaNs at the boundaries of any TFR >which has longer time windows for lower frequencies. From the cfg >options you specify below I can see that you have a data segment of >1.1 seconds length and the moving windows cfg.t_tfimwin are quite >long at the low ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = 0.6666 s. >Hence the NaNs seem perfectly "normal" in this case. The only way to >avoid NaN in the time window of interest (using this type of >time-frequency tiling) is to make your epochs longer. > >Hope this helps, >Christian > > >On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: > >>Hello again. >> >>I am finding NaN whatever method I use (multitaper and wavelet >>analysis), yet using a different analysis tool with similar >>parameters I obtain clean results. >>epoch length = 1.1 s >>baseline length = 0.3 s >>sampling rate = 500Hz >> >>I tried several suggestions listed in the previous message list for >>a similar problem, but none seem to provide reasonable results (aka >>always NaN). >>Also tried with different subjects, no particular error otherwise. >>I am sending a sample script in case someone has a suggestion on this... >>Thanks for your help once more! >> >>Virginie >> >>%% ================================================ >>% TF analysis - MULTITAPER >>cfg = []; >>cfg.method = 'mtmconvol'; >>cfg.taper = 'hanning'; >>cfg.output = 'powandcsd'; >>%cfg.channel = 'all'; >>cfg.channel = 'E75'; >> >>%win_length = 0.128; >>%win_n = floor(2.*(1.1./win_length)-1); >> >>cfg.foi = 1:5:45; >>%cfg.t_ftimwin = ones(1,win_n).*win_length; >>cfg.t_ftimwin = 4./cfg.foi; >>%cfg.toi = -0.3:win_length/2:0.8; >>cfg.toi = -0.3:0.05:0.8; >> >>% cfg.pad = 'maxperlen'; >>% cfg.keeptrials = 'no'; >>% cfg.keeptapers ='no'; >>s08_ill_mult = freqanalysis(cfg,s08_ill); >> >>%% ======================== >>% plot freq data >>cfg = []; >>cfg.baseline = [-0.3 0]; >>cfg.layout = egilay; >>cfg.zlim = [-0.00001 0.000001]; % a comparer entre >>participants >>% warning off % NaN >>clf >>%multiplotTFR(cfg,s08_ill_mult); >>singleplotTFR(cfg,s08_ill_mult); >> >>%% ================================================ >>% TF analysis - wavelet >>cfg = []; >>cfg.method = 'wltconvol'; >>cfg.width = 4; >>cfg.output = 'pow'; >>cfg.foi = 1:2:30; >>cfg.toi = -0.3:0.05:0.8; >>s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>%% ======================== >>cfg = []; >>cfg.baseline = [-0.3 0]; >>cfg.zlim = [-1 1]; >>cfg.showlabels = 'yes'; >>cfg.layout = egilay; >>clf >>multiplotTFR(cfg, s14_ill_wvlt) >> >>%% ================================================ >> >> >> >> >> >> >>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. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD :::::::::::: 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. From c.hesse at FCDONDERS.RU.NL Mon Jun 25 21:49:16 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 25 Jun 2007 21:49:16 +0200 Subject: tfanalysis - NaN In-Reply-To: <20070625173838.B9F9D12CD1@fire-ox.its.caltech.edu> Message-ID: Hi Virginie, > thanks for your inputs. Actually, I have tried different window > sizes and frequency parameters (and wavelet, tf tiling,...). I > would not expect to obtain NaN for a narrow band in higher > frequencies (say 35-45Hz) with 2Hz and 4 cycles resolution with the > same epoch but I still do. > > I'll try with a longer epoch, but I find puzzling that I should > still get NaN when the resolution should be sufficient for the > computations. If these NaNs occur at the edges of the TFR then that could still be explained by the fact that the analysis time windows have been placed in such a way that some of them do not overlap 100% with the signal time axis. The time points in cfg.toi actually specify the middle of the time interval over which the spectral analysis is carried out. Therefore, if the extremes of cfg.toi coincide with the extremes of your epoch time axis then there will always be NaNs in at least the first and last windows at all frequencies. If the NaNs occur also at other points in the TFR then there may be something else going on ... is it the case that the NaNs are confined to the edges (edge regions) of your TFR? Regards, Christian >> Hi Virginie, >> >> the function freqanalysis will return NaNs when a time frequency >> tile extends beyond a corresponding data segment. One would >> usually expect a "U" shaped padding of NaNs at the boundaries of >> any TFR which has longer time windows for lower frequencies. From >> the cfg options you specify below I can see that you have a data >> segment of 1.1 seconds length and the moving windows cfg.t_tfimwin >> are quite long at the low ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = >> 0.6666 s. Hence the NaNs seem perfectly "normal" in this case. The >> only way to avoid NaN in the time window of interest (using this >> type of time-frequency tiling) is to make your epochs longer. >> >> Hope this helps, >> Christian >> >> >> On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >> >>> Hello again. >>> >>> I am finding NaN whatever method I use (multitaper and wavelet >>> analysis), yet using a different analysis tool with similar >>> parameters I obtain clean results. >>> epoch length = 1.1 s >>> baseline length = 0.3 s >>> sampling rate = 500Hz >>> >>> I tried several suggestions listed in the previous message list >>> for a similar problem, but none seem to provide reasonable >>> results (aka always NaN). >>> Also tried with different subjects, no particular error >>> otherwise. I am sending a sample script in case someone has a >>> suggestion on this... >>> Thanks for your help once more! >>> >>> Virginie >>> >>> %% ================================================ >>> % TF analysis - MULTITAPER >>> cfg = []; >>> cfg.method = 'mtmconvol'; >>> cfg.taper = 'hanning'; >>> cfg.output = 'powandcsd'; >>> %cfg.channel = 'all'; >>> cfg.channel = 'E75'; >>> >>> %win_length = 0.128; >>> %win_n = floor(2.*(1.1./win_length)-1); >>> >>> cfg.foi = 1:5:45; >>> %cfg.t_ftimwin = ones(1,win_n).*win_length; >>> cfg.t_ftimwin = 4./cfg.foi; >>> %cfg.toi = -0.3:win_length/2:0.8; >>> cfg.toi = -0.3:0.05:0.8; >>> >>> % cfg.pad = 'maxperlen'; >>> % cfg.keeptrials = 'no'; >>> % cfg.keeptapers ='no'; >>> s08_ill_mult = freqanalysis(cfg,s08_ill); >>> >>> %% ======================== >>> % plot freq data >>> cfg = []; >>> cfg.baseline = [-0.3 0]; >>> cfg.layout = egilay; >>> cfg.zlim = [-0.00001 0.000001]; % a comparer >>> entre participants >>> % warning off % NaN >>> clf >>> %multiplotTFR(cfg,s08_ill_mult); >>> singleplotTFR(cfg,s08_ill_mult); >>> >>> %% ================================================ >>> % TF analysis - wavelet >>> cfg = []; >>> cfg.method = 'wltconvol'; >>> cfg.width = 4; >>> cfg.output = 'pow'; >>> cfg.foi = 1:2:30; >>> cfg.toi = -0.3:0.05:0.8; >>> s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>> %% ======================== >>> cfg = []; >>> cfg.baseline = [-0.3 0]; >>> cfg.zlim = [-1 1]; >>> cfg.showlabels = 'yes'; >>> cfg.layout = egilay; >>> clf >>> multiplotTFR(cfg, s14_ill_wvlt) >>> >>> %% ================================================ >>> >>> >>> >>> >>> >>> >>> 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 gm >>> ail.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 >> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>> listserv.surfnet.nl/archives/fieldtrip.html and >> fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ > > Virginie van Wassenhove, PhD > > :::::::::::: 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. > ---------------------------------------------------------------------- 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 vvw at CALTECH.EDU Mon Jun 25 23:11:45 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Mon, 25 Jun 2007 14:11:45 -0700 Subject: tfanalysis - NaN In-Reply-To: <307AB957-C65C-4E4F-9BDA-28F338AACEE9@fcdonders.ru.nl> Message-ID: Hi Christian >>thanks for your inputs. Actually, I have tried different window >>sizes and frequency parameters (and wavelet, tf tiling,...). I >>would not expect to obtain NaN for a narrow band in higher >>frequencies (say 35-45Hz) with 2Hz and 4 cycles resolution with the >>same epoch but I still do. >> >>I'll try with a longer epoch, but I find puzzling that I should >>still get NaN when the resolution should be sufficient for the computations. > >If these NaNs occur at the edges of the TFR then that could still be >explained by the fact that the analysis time windows have been >placed in such a way that some of them do not overlap 100% with the >signal time axis. The time points in cfg.toi actually specify the >middle of the time interval over which the spectral analysis is >carried out. Therefore, if the extremes of cfg.toi coincide with the >extremes of your epoch time axis then there will always be NaNs in >at least the first and last windows at all frequencies. Yes, I do realize that. >If the NaNs occur also at other points in the TFR then there may be >something else going on ... is it the case that the NaNs are >confined to the edges (edge regions) of your TFR? The entire matrices (cfg.powspctrm) return NaN whether for (i)1.1 secs or 2.4 secs epochs (ii) narrow (25-50) or wide (2-50) bandwidth (iii) short or large cfg. toi (then would expect U shape) Virginie >Regards, >Christian > > >>>Hi Virginie, >>> >>>the function freqanalysis will return NaNs when a time frequency >>>tile extends beyond a corresponding data segment. One would >>>usually expect a "U" shaped padding of NaNs at the boundaries of >>>any TFR which has longer time windows for lower frequencies. From >>>the cfg options you specify below I can see that you have a data >>>segment of 1.1 seconds length and the moving windows cfg.t_tfimwin >>>are quite long at the low ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = >>>0.6666 s. Hence the NaNs seem perfectly "normal" in this case. The >>>only way to avoid NaN in the time window of interest (using this >>>type of time-frequency tiling) is to make your epochs longer. >>> >>>Hope this helps, >>>Christian >>> >>> >>>On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >>> >>>>Hello again. >>>> >>>>I am finding NaN whatever method I use (multitaper and wavelet >>>>analysis), yet using a different analysis tool with similar >>>>parameters I obtain clean results. >>>>epoch length = 1.1 s >>>>baseline length = 0.3 s >>>>sampling rate = 500Hz >>>> >>>>I tried several suggestions listed in the previous message list >>>>for a similar problem, but none seem to provide reasonable >>>>results (aka always NaN). >>>>Also tried with different subjects, no particular error >>>>otherwise. I am sending a sample script in case someone has a >>>>suggestion on this... >>>>Thanks for your help once more! >>>> >>>>Virginie >>>> >>>>%% ================================================ >>>>% TF analysis - MULTITAPER >>>>cfg = []; >>>>cfg.method = 'mtmconvol'; >>>>cfg.taper = 'hanning'; >>>>cfg.output = 'powandcsd'; >>>>%cfg.channel = 'all'; >>>>cfg.channel = 'E75'; >>>> >>>>%win_length = 0.128; >>>>%win_n = floor(2.*(1.1./win_length)-1); >>>> >>>>cfg.foi = 1:5:45; >>>>%cfg.t_ftimwin = ones(1,win_n).*win_length; >>>>cfg.t_ftimwin = 4./cfg.foi; >>>>%cfg.toi = -0.3:win_length/2:0.8; >>>>cfg.toi = -0.3:0.05:0.8; >>>> >>>>% cfg.pad = 'maxperlen'; >>>>% cfg.keeptrials = 'no'; >>>>% cfg.keeptapers ='no'; >>>>s08_ill_mult = freqanalysis(cfg,s08_ill); >>>> >>>>%% ======================== >>>>% plot freq data >>>>cfg = []; >>>>cfg.baseline = [-0.3 0]; >>>>cfg.layout = egilay; >>>>cfg.zlim = [-0.00001 0.000001]; % a comparer >>>>entre participants >>>>% warning off % NaN >>>>clf >>>>%multiplotTFR(cfg,s08_ill_mult); >>>>singleplotTFR(cfg,s08_ill_mult); >>>> >>>>%% ================================================ >>>>% TF analysis - wavelet >>>>cfg = []; >>>>cfg.method = 'wltconvol'; >>>>cfg.width = 4; >>>>cfg.output = 'pow'; >>>>cfg.foi = 1:2:30; >>>>cfg.toi = -0.3:0.05:0.8; >>>>s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>>>%% ======================== >>>>cfg = []; >>>>cfg.baseline = [-0.3 0]; >>>>cfg.zlim = [-1 1]; >>>>cfg.showlabels = 'yes'; >>>>cfg.layout = egilay; >>>>clf >>>>multiplotTFR(cfg, s14_ill_wvlt) >>>> >>>>%% ================================================ >>>> >>>> >>>> >>>> >>>> >>>> >>>>Virginie van Wassenhove, PhD >>>> >>>>:::::::::::: contact info ::::::::::::: >>>>Caltech - Division of Biology >>>>1200 E. California Blvd M/C 139-74 >>>>Pasadena CA 91125 USA >>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>><mailto:vvw at caltech.edu>vvw at caltech.edu >>>><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>W: 626.395.8959 >>>><http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>> >>>>:::::::::::::::::: extras :::::::::::::::::::: >>>><http://www.kiva.org>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>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>and >>>><http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>> >>>---------------------------------------------------------------------- >>>Christian Hesse, PhD, MIEEE >>> >>>F.C. Donders Centre for Cognitive Neuroimaging >>>P.O. Box 9101 >>>NL-6500 HB Nijmegen >>>The Netherlands >>> >>>Tel.: +31 (0)24 36 68293 >>>Fax: +31 (0)24 36 10989 >>> >>>Email: >>><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>Web: >>><http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>---------------------------------------------------------------------- >>> >>> >>> >>> >>>---------------------------------- >>> >>>The aim of this list is to facilitate the discussion between users >>>of the FieldTrip toolbox, to share experiences and to discuss new >>>ideas for MEG and EEG analysis. >>> >>>http://listserv.surfnet.nl/archives/fieldtrip.html >>> >>>http://www.ru.nl/fcdonders/fieldtrip/ >> >>Virginie van Wassenhove, PhD >> >>:::::::::::: 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. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD :::::::::::: 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. From c.hesse at FCDONDERS.RU.NL Mon Jun 25 23:30:48 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 25 Jun 2007 23:30:48 +0200 Subject: tfanalysis - NaN In-Reply-To: <20070625211145.69AEF1AA83@earth-ox.its.caltech.edu> Message-ID: Hi Virginie, >> If the NaNs occur also at other points in the TFR then there may >> be something else going on ... is it the case that the NaNs are >> confined to the edges (edge regions) of your TFR? > > The entire matrices (cfg.powspctrm) return NaN whether for > (i)1.1 secs or 2.4 secs epochs > (ii) narrow (25-50) or wide (2-50) bandwidth > (iii) short or large cfg. toi (then would expect U shape) > That's not good! Does the call to FREQANALYSIS produce any (potentially useful) warnings? Regards, Christian >>>> >>>> Hi Virginie, >>>> >>>> the function freqanalysis will return NaNs when a time frequency >>>> tile extends beyond a corresponding data segment. One would >>>> usually expect a "U" shaped padding of NaNs at the boundaries of >>>> any TFR which has longer time windows for lower frequencies. >>>> From the cfg options you specify below I can see that you have a >>>> data segment of 1.1 seconds length and the moving windows >>>> cfg.t_tfimwin are quite long at the low ffrequencies, e.g., 1 Hz >>>> = 4 s, 6 Hz = 0.6666 s. Hence the NaNs seem perfectly "normal" >>>> in this case. The only way to avoid NaN in the time window of >>>> interest (using this type of time-frequency tiling) is to make >>>> your epochs longer. >>>> >>>> Hope this helps, >>>> Christian >>>> >>>> >>>> On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >>>> >>>>> Hello again. >>>>> >>>>> I am finding NaN whatever method I use (multitaper and wavelet >>>>> analysis), yet using a different analysis tool with similar >>>>> parameters I obtain clean results. >>>>> epoch length = 1.1 s >>>>> baseline length = 0.3 s >>>>> sampling rate = 500Hz >>>>> >>>>> I tried several suggestions listed in the previous message list >>>>> for a similar problem, but none seem to provide reasonable >>>>> results (aka always NaN). >>>>> Also tried with different subjects, no particular error >>>>> otherwise. I am sending a sample script in case someone has a >>>>> suggestion on this... >>>>> Thanks for your help once more! >>>>> >>>>> Virginie >>>>> >>>>> %% ================================================ >>>>> % TF analysis - MULTITAPER >>>>> cfg = []; >>>>> cfg.method = 'mtmconvol'; >>>>> cfg.taper = 'hanning'; >>>>> cfg.output = 'powandcsd'; >>>>> %cfg.channel = 'all'; >>>>> cfg.channel = 'E75'; >>>>> >>>>> %win_length = 0.128; >>>>> %win_n = floor(2.*(1.1./win_length)-1); >>>>> >>>>> cfg.foi = 1:5:45; >>>>> %cfg.t_ftimwin = ones(1,win_n).*win_length; >>>>> cfg.t_ftimwin = 4./cfg.foi; >>>>> %cfg.toi = -0.3:win_length/2:0.8; >>>>> cfg.toi = -0.3:0.05:0.8; >>>>> >>>>> % cfg.pad = 'maxperlen'; >>>>> % cfg.keeptrials = 'no'; >>>>> % cfg.keeptapers ='no'; >>>>> s08_ill_mult = freqanalysis(cfg,s08_ill); >>>>> >>>>> %% ======================== >>>>> % plot freq data >>>>> cfg = []; >>>>> cfg.baseline = [-0.3 0]; >>>>> cfg.layout = egilay; >>>>> cfg.zlim = [-0.00001 0.000001]; % a comparer >>>>> entre participants >>>>> % warning off % NaN >>>>> clf >>>>> %multiplotTFR(cfg,s08_ill_mult); >>>>> singleplotTFR(cfg,s08_ill_mult); >>>>> >>>>> %% ================================================ >>>>> % TF analysis - wavelet >>>>> cfg = []; >>>>> cfg.method = 'wltconvol'; >>>>> cfg.width = 4; >>>>> cfg.output = 'pow'; >>>>> cfg.foi = 1:2:30; >>>>> cfg.toi = -0.3:0.05:0.8; >>>>> s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>>>> %% ======================== >>>>> cfg = []; >>>>> cfg.baseline = [-0.3 0]; >>>>> cfg.zlim = [-1 1]; >>>>> cfg.showlabels = 'yes'; >>>>> cfg.layout = egilay; >>>>> clf >>>>> multiplotTFR(cfg, s14_ill_wvlt) >>>>> >>>>> %% ================================================ >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> Virginie van Wassenhove, PhD >>>>> >>>>> :::::::::::: contact info ::::::::::::: >>>>> Caltech - Division of Biology >>>>> 1200 E. California Blvd M/C 139-74 >>>>> Pasadena CA 91125 USA >>>>> ::::::::::::::::::::::::::::::::::::::::::::::::: >>>>> <mailto:vvw at caltech.edu>>>>> h.edu>vvw at caltech.edu >>>>> <mailto:Virginie.van.Was >>>>> senhove at gmail.com>Virgin >>>>> ie.van.Wassenhove at gmail.com >>>>> W: 626.395.8959 >>>>> <http://www.its.caltech.edu/ >>>>> ~vvw>http://www.its.caltech.edu/~vvw >>>>> >>>>> :::::::::::::::::: extras :::::::::::::::::::: >>>>> <http://www.kiva.org>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 <>>>> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>>>> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>>>> listserv.surfnet.nl/archives/fieldtrip.html and <>>>> www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/ >>>>> fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> ------------------------------------------------------------------- >>>> --- >>>> Christian Hesse, PhD, MIEEE >>>> >>>> F.C. Donders Centre for Cognitive Neuroimaging >>>> P.O. Box 9101 >>>> NL-6500 HB Nijmegen >>>> The Netherlands >>>> >>>> Tel.: +31 (0)24 36 68293 >>>> Fax: +31 (0)24 36 10989 >>>> >>>> Email: >>>> <mailto:c.hesse at fcdonders.ru.nl>>>> ilto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>> Web: <http:// >>>> www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>> ------------------------------------------------------------------- >>>> --- >>>> >>>> >>>> >>>> >>>> ---------------------------------- >>>> >>>> The aim of this list is to facilitate the discussion between >>>> users of the FieldTrip toolbox, to share experiences and to >>>> discuss new ideas for MEG and EEG analysis. >>>> >>>> http:// >>>> listserv.surfnet.nl/archives/fieldtrip.html >>>> >>>> http://www.ru.nl/fcdonders/fieldtrip/ >>> >>> Virginie van Wassenhove, PhD >>> >>> :::::::::::: 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 gm >>> ail.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 >> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>> listserv.surfnet.nl/archives/fieldtrip.html and >> fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ > > Virginie van Wassenhove, PhD > > :::::::::::: 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. > ---------------------------------------------------------------------- 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 vvw at CALTECH.EDU Mon Jun 25 23:54:49 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Mon, 25 Jun 2007 14:54:49 -0700 Subject: tfanalysis - NaN In-Reply-To: Message-ID: >That's not good! Indeed! >Does the call to FREQANALYSIS produce any (potentially useful) warnings? All channels, all trials and all samples are correctly reported. Using the wavelet analysis, there is no apparent warning. Using the multitaper, the warning is that there's only 1 tapper (now the problem is that there's 1 tapper only, even when I greatly reduce the width of a window and extend the length of the epoch...) Are the tf data normalized and how are they normalized? -vv >Regards, >Christian > > > >>>>> >>>>>Hi Virginie, >>>>> >>>>>the function freqanalysis will return NaNs when a time frequency >>>>>tile extends beyond a corresponding data segment. One would >>>>>usually expect a "U" shaped padding of NaNs at the boundaries of >>>>>any TFR which has longer time windows for lower frequencies. >>>>> From the cfg options you specify below I can see that you have >>>>>a data segment of 1.1 seconds length and the moving windows >>>>>cfg.t_tfimwin are quite long at the low ffrequencies, e.g., 1 Hz >>>>>= 4 s, 6 Hz = 0.6666 s. Hence the NaNs seem perfectly "normal" >>>>>in this case. The only way to avoid NaN in the time window of >>>>>interest (using this type of time-frequency tiling) is to make >>>>>your epochs longer. >>>>> >>>>>Hope this helps, >>>>>Christian >>>>> >>>>> >>>>>On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >>>>> >>>>>>Hello again. >>>>>> >>>>>>I am finding NaN whatever method I use (multitaper and wavelet >>>>>>analysis), yet using a different analysis tool with similar >>>>>>parameters I obtain clean results. >>>>>>epoch length = 1.1 s >>>>>>baseline length = 0.3 s >>>>>>sampling rate = 500Hz >>>>>> >>>>>>I tried several suggestions listed in the previous message list >>>>>>for a similar problem, but none seem to provide reasonable >>>>>>results (aka always NaN). >>>>>>Also tried with different subjects, no particular error >>>>>>otherwise. I am sending a sample script in case someone has a >>>>>>suggestion on this... >>>>>>Thanks for your help once more! >>>>>> >>>>>>Virginie >>>>>> >>>>>>%% ================================================ >>>>>>% TF analysis - MULTITAPER >>>>>>cfg = []; >>>>>>cfg.method = 'mtmconvol'; >>>>>>cfg.taper = 'hanning'; >>>>>>cfg.output = 'powandcsd'; >>>>>>%cfg.channel = 'all'; >>>>>>cfg.channel = 'E75'; >>>>>> >>>>>>%win_length = 0.128; >>>>>>%win_n = floor(2.*(1.1./win_length)-1); >>>>>> >>>>>>cfg.foi = 1:5:45; >>>>>>%cfg.t_ftimwin = ones(1,win_n).*win_length; >>>>>>cfg.t_ftimwin = 4./cfg.foi; >>>>>>%cfg.toi = -0.3:win_length/2:0.8; >>>>>>cfg.toi = -0.3:0.05:0.8; >>>>>> >>>>>>% cfg.pad = 'maxperlen'; >>>>>>% cfg.keeptrials = 'no'; >>>>>>% cfg.keeptapers ='no'; >>>>>>s08_ill_mult = freqanalysis(cfg,s08_ill); >>>>>> >>>>>>%% ======================== >>>>>>% plot freq data >>>>>>cfg = []; >>>>>>cfg.baseline = [-0.3 0]; >>>>>>cfg.layout = egilay; >>>>>>cfg.zlim = [-0.00001 0.000001]; % a comparer >>>>>>entre participants >>>>>>% warning off % NaN >>>>>>clf >>>>>>%multiplotTFR(cfg,s08_ill_mult); >>>>>>singleplotTFR(cfg,s08_ill_mult); >>>>>> >>>>>>%% ================================================ >>>>>>% TF analysis - wavelet >>>>>>cfg = []; >>>>>>cfg.method = 'wltconvol'; >>>>>>cfg.width = 4; >>>>>>cfg.output = 'pow'; >>>>>>cfg.foi = 1:2:30; >>>>>>cfg.toi = -0.3:0.05:0.8; >>>>>>s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>>>>>%% ======================== >>>>>>cfg = []; >>>>>>cfg.baseline = [-0.3 0]; >>>>>>cfg.zlim = [-1 1]; >>>>>>cfg.showlabels = 'yes'; >>>>>>cfg.layout = egilay; >>>>>>clf >>>>>>multiplotTFR(cfg, s14_ill_wvlt) >>>>>> >>>>>>%% ================================================ >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>Virginie van Wassenhove, PhD >>>>>> >>>>>>:::::::::::: contact info ::::::::::::: >>>>>>Caltech - Division of Biology >>>>>>1200 E. California Blvd M/C 139-74 >>>>>>Pasadena CA 91125 USA >>>>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>>>><<mailto:vvw at caltech.edu>mailto:vvw at caltech.edu><mailto:vvw at caltech.edu>vvw at caltech.edu >>>>>><<mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>>>W: 626.395.8959 >>>>>><<http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>>>> >>>>>>:::::::::::::::::: extras :::::::::::::::::::: >>>>>><<http://www.kiva.org>http://www.kiva.org>http://www.kiva.org >>>>>><http://www.thehungersite.com>http://www.thehungersite.com/ >>>>>><http://www.agloco.com/r/BBBS1539>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>http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>>>and >>>>>><<http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>>>> >>>>>---------------------------------------------------------------------- >>>>>Christian Hesse, PhD, MIEEE >>>>> >>>>>F.C. Donders Centre for Cognitive Neuroimaging >>>>>P.O. Box 9101 >>>>>NL-6500 HB Nijmegen >>>>>The Netherlands >>>>> >>>>>Tel.: +31 (0)24 36 68293 >>>>>Fax: +31 (0)24 36 10989 >>>>> >>>>>Email: >>>>><<mailto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru.nl><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>>>Web: >>>>><<http://www.fcdonders.ru.nl>http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>>>---------------------------------------------------------------------- >>>>> >>>>> >>>>> >>>>> >>>>>---------------------------------- >>>>> >>>>>The aim of this list is to facilitate the discussion between >>>>>users of the FieldTrip toolbox, to share experiences and to >>>>>discuss new ideas for MEG and EEG analysis. >>>>> >>>>><http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>> >>>>>http://www.ru.nl/fcdonders/fieldtrip/ >>>> >>>>Virginie van Wassenhove, PhD >>>> >>>>:::::::::::: contact info ::::::::::::: >>>>Caltech - Division of Biology >>>>1200 E. California Blvd M/C 139-74 >>>>Pasadena CA 91125 USA >>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>><mailto:vvw at caltech.edu>vvw at caltech.edu >>>><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>W: 626.395.8959 >>>><http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>> >>>>:::::::::::::::::: extras :::::::::::::::::::: >>>><http://www.kiva.org>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>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>and >>>><http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>> >>>---------------------------------------------------------------------- >>>Christian Hesse, PhD, MIEEE >>> >>>F.C. Donders Centre for Cognitive Neuroimaging >>>P.O. Box 9101 >>>NL-6500 HB Nijmegen >>>The Netherlands >>> >>>Tel.: +31 (0)24 36 68293 >>>Fax: +31 (0)24 36 10989 >>> >>>Email: >>><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>Web: >>><http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>---------------------------------------------------------------------- >>> >>> >>> >>> >>>---------------------------------- >>> >>>The aim of this list is to facilitate the discussion between users >>>of the FieldTrip toolbox, to share experiences and to discuss new >>>ideas for MEG and EEG analysis. >>> >>>http://listserv.surfnet.nl/archives/fieldtrip.html >>> >>>http://www.ru.nl/fcdonders/fieldtrip/ >> >>Virginie van Wassenhove, PhD >> >>:::::::::::: 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. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD :::::::::::: 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. From c.hesse at FCDONDERS.RU.NL Tue Jun 26 00:19:18 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Tue, 26 Jun 2007 00:19:18 +0200 Subject: tfanalysis - NaN In-Reply-To: <20070625215511.7216A1AAA6@water-ox.its.caltech.edu> Message-ID: >> Does the call to FREQANALYSIS produce any (potentially useful) >> warnings? > > All channels, all trials and all samples are correctly reported. > Using the wavelet analysis, there is no apparent warning. > Using the multitaper, the warning is that there's only 1 tapper > (now the problem is that there's 1 tapper only, even when I greatly > reduce the width of a window and extend the length of the epoch...) In the configuration options you have specified cfg.taper = 'hanning' which will apply only one (i.e., the hanning) taper to your data. If you want to use multitapers you need to set cfg.taper = 'dpss' or just leave the field it out of the cfg (since multitapers are the default). > Are the tf data normalized and how are they normalized? I'm not really sure what you mean by normalized (the csd is obviously a density) but if there were any divide by zero issues then matlab would be chucking warnings. What happens when you set cfg.output = 'pow'; ? Christian >> >> >>>>>> >>>>>> Hi Virginie, >>>>>> >>>>>> the function freqanalysis will return NaNs when a time >>>>>> frequency tile extends beyond a corresponding data segment. >>>>>> One would usually expect a "U" shaped padding of NaNs at the >>>>>> boundaries of any TFR which has longer time windows for lower >>>>>> frequencies. From the cfg options you specify below I can see >>>>>> that you have a data segment of 1.1 seconds length and the >>>>>> moving windows cfg.t_tfimwin are quite long at the low >>>>>> ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = 0.6666 s. Hence the >>>>>> NaNs seem perfectly "normal" in this case. The only way to >>>>>> avoid NaN in the time window of interest (using this type of >>>>>> time-frequency tiling) is to make your epochs longer. >>>>>> >>>>>> Hope this helps, >>>>>> Christian >>>>>> >>>>>> >>>>>> On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >>>>>> >>>>>>> Hello again. >>>>>>> >>>>>>> I am finding NaN whatever method I use (multitaper and >>>>>>> wavelet analysis), yet using a different analysis tool with >>>>>>> similar parameters I obtain clean results. >>>>>>> epoch length = 1.1 s >>>>>>> baseline length = 0.3 s >>>>>>> sampling rate = 500Hz >>>>>>> >>>>>>> I tried several suggestions listed in the previous message >>>>>>> list for a similar problem, but none seem to provide >>>>>>> reasonable results (aka always NaN). >>>>>>> Also tried with different subjects, no particular error >>>>>>> otherwise. I am sending a sample script in case someone has a >>>>>>> suggestion on this... >>>>>>> Thanks for your help once more! >>>>>>> >>>>>>> Virginie >>>>>>> >>>>>>> %% ================================================ >>>>>>> % TF analysis - MULTITAPER >>>>>>> cfg = []; >>>>>>> cfg.method = 'mtmconvol'; >>>>>>> cfg.taper = 'hanning'; >>>>>>> cfg.output = 'powandcsd'; >>>>>>> %cfg.channel = 'all'; >>>>>>> cfg.channel = 'E75'; >>>>>>> >>>>>>> %win_length = 0.128; >>>>>>> %win_n = floor(2.*(1.1./win_length)-1); >>>>>>> >>>>>>> cfg.foi = 1:5:45; >>>>>>> %cfg.t_ftimwin = ones(1,win_n).*win_length; >>>>>>> cfg.t_ftimwin = 4./cfg.foi; >>>>>>> %cfg.toi = -0.3:win_length/2:0.8; >>>>>>> cfg.toi = -0.3:0.05:0.8; >>>>>>> >>>>>>> % cfg.pad = 'maxperlen'; >>>>>>> % cfg.keeptrials = 'no'; >>>>>>> % cfg.keeptapers ='no'; >>>>>>> s08_ill_mult = freqanalysis(cfg,s08_ill); >>>>>>> >>>>>>> %% ======================== >>>>>>> % plot freq data >>>>>>> cfg = []; >>>>>>> cfg.baseline = [-0.3 0]; >>>>>>> cfg.layout = egilay; >>>>>>> cfg.zlim = [-0.00001 0.000001]; % a comparer >>>>>>> entre participants >>>>>>> % warning off % NaN >>>>>>> clf >>>>>>> %multiplotTFR(cfg,s08_ill_mult); >>>>>>> singleplotTFR(cfg,s08_ill_mult); >>>>>>> >>>>>>> %% ================================================ >>>>>>> % TF analysis - wavelet >>>>>>> cfg = []; >>>>>>> cfg.method = 'wltconvol'; >>>>>>> cfg.width = 4; >>>>>>> cfg.output = 'pow'; >>>>>>> cfg.foi = 1:2:30; >>>>>>> cfg.toi = -0.3:0.05:0.8; >>>>>>> s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>>>>>> %% ======================== >>>>>>> cfg = []; >>>>>>> cfg.baseline = [-0.3 0]; >>>>>>> cfg.zlim = [-1 1]; >>>>>>> cfg.showlabels = 'yes'; >>>>>>> cfg.layout = egilay; >>>>>>> clf >>>>>>> multiplotTFR(cfg, s14_ill_wvlt) >>>>>>> >>>>>>> %% ================================================ >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Virginie van Wassenhove, PhD >>>>>>> >>>>>>> :::::::::::: contact info ::::::::::::: >>>>>>> Caltech - Division of Biology >>>>>>> 1200 E. California Blvd M/C 139-74 >>>>>>> Pasadena CA 91125 USA >>>>>>> ::::::::::::::::::::::::::::::::::::::::::::::::: >>>>>>> <<mailto:vvw at caltech.edu>mailto:vvw at calt >>>>>>> ech.edu><mailto:vvw at caltech.edu>>>>>>> vvw at caltech.edu>vvw at caltech.edu >>>>>>> <<mailto:Virginie.van. >>>>>>> Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><< >>>>>>> mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Was >>>>>>> senhove at gmail.com>Virg >>>>>>> inie.van.Wassenhove at gmail.com >>>>>>> W: 626.395.8959 >>>>>>> <<http://www.its.caltech.edu/ >>>>>>> ~vvw>http://www.its.caltech.edu/~vvw>http:// >>>>>>> www.its.caltech.edu/~vvw >>>>>>> >>>>>>> :::::::::::::::::: extras :::::::::::::::::::: >>>>>>> <<http://www.kiva.org>http:// >>>>>>> www.kiva.org>http://www.kiva.org >>>>>>> <http:// >>>>>>> www.thehungersite.com>http://www.thehungersite.com/ >>>>>>> <http://www.agloco.com/r/ >>>>>>> BBBS1539>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>http:// >>>>>>> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>>>>>> listserv.surfnet.nl/archives/fieldtrip.html and <<>>>>>> www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/ >>>>>>> fieldtrip>http://www.ru.nl/fcdonders/fieldtrip>http:// >>>>>>> www.ru.nl/fcdonders/fieldtrip. >>>>>> >>>>>> ----------------------------------------------------------------- >>>>>> ----- >>>>>> Christian Hesse, PhD, MIEEE >>>>>> >>>>>> F.C. Donders Centre for Cognitive Neuroimaging >>>>>> P.O. Box 9101 >>>>>> NL-6500 HB Nijmegen >>>>>> The Netherlands >>>>>> >>>>>> Tel.: +31 (0)24 36 68293 >>>>>> Fax: +31 (0)24 36 10989 >>>>>> >>>>>> Email: >>>>>> <<mailto:c.hesse at fcdonders.ru.nl> >>>>>> mailto:c.hesse at fcdonders.ru.nl><m >>>>>> ailto:c.hesse at fcdonders.ru.nl>c.h >>>>>> esse at fcdonders.ru.nl >>>>>> Web: <<http:// >>>>>> www.fcdonders.ru.nl>http:// >>>>>> www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>>>> ----------------------------------------------------------------- >>>>>> ----- >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ---------------------------------- >>>>>> >>>>>> The aim of this list is to facilitate the discussion between >>>>>> users of the FieldTrip toolbox, to share experiences and to >>>>>> discuss new ideas for MEG and EEG analysis. >>>>>> >>>>>> <http:// >>>>>> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>>>>> listserv.surfnet.nl/archives/fieldtrip.html >>>>>> >>>>>> http://www.ru.nl/ >>>>>> fcdonders/fieldtrip/ >>>>> >>>>> Virginie van Wassenhove, PhD >>>>> >>>>> :::::::::::: contact info ::::::::::::: >>>>> Caltech - Division of Biology >>>>> 1200 E. California Blvd M/C 139-74 >>>>> Pasadena CA 91125 USA >>>>> ::::::::::::::::::::::::::::::::::::::::::::::::: >>>>> <mailto:vvw at caltech.edu>>>>> h.edu>vvw at caltech.edu >>>>> <mailto:Virginie.van.Was >>>>> senhove at gmail.com>Virgin >>>>> ie.van.Wassenhove at gmail.com >>>>> W: 626.395.8959 >>>>> <http://www.its.caltech.edu/ >>>>> ~vvw>http://www.its.caltech.edu/~vvw >>>>> >>>>> :::::::::::::::::: extras :::::::::::::::::::: >>>>> <http://www.kiva.org>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 <>>>> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>>>> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>>>> listserv.surfnet.nl/archives/fieldtrip.html and <>>>> www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/ >>>>> fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> ------------------------------------------------------------------- >>>> --- >>>> Christian Hesse, PhD, MIEEE >>>> >>>> F.C. Donders Centre for Cognitive Neuroimaging >>>> P.O. Box 9101 >>>> NL-6500 HB Nijmegen >>>> The Netherlands >>>> >>>> Tel.: +31 (0)24 36 68293 >>>> Fax: +31 (0)24 36 10989 >>>> >>>> Email: >>>> <mailto:c.hesse at fcdonders.ru.nl>>>> ilto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>> Web: <http:// >>>> www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>> ------------------------------------------------------------------- >>>> --- >>>> >>>> >>>> >>>> >>>> ---------------------------------- >>>> >>>> The aim of this list is to facilitate the discussion between >>>> users of the FieldTrip toolbox, to share experiences and to >>>> discuss new ideas for MEG and EEG analysis. >>>> >>>> http:// >>>> listserv.surfnet.nl/archives/fieldtrip.html >>>> >>>> http://www.ru.nl/fcdonders/fieldtrip/ >>> >>> Virginie van Wassenhove, PhD >>> >>> :::::::::::: 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 gm >>> ail.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 >> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>> listserv.surfnet.nl/archives/fieldtrip.html and >> fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ > > Virginie van Wassenhove, PhD > > :::::::::::: 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. > ---------------------------------------------------------------------- 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 vvw at CALTECH.EDU Tue Jun 26 06:25:14 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Mon, 25 Jun 2007 21:25:14 -0700 Subject: tfanalysis - NaN In-Reply-To: <79C8D694-E710-4D43-8C7A-228A5DD69473@fcdonders.ru.nl> Message-ID: Hi Christian, >In the configuration options you have specified cfg.taper = >'hanning' which will apply only one (i.e., the hanning) taper to >your data. If you want to use multitapers you need to set cfg.taper >= 'dpss' or just leave the field it out of the cfg (since >multitapers are the default). Ah yes, sorry, I have been playing around with most parameters so both 'hanning' and 'dpss' lead to the same result (and other windows and wavelet analysis). >I'm not really sure what you mean by normalized (the csd is >obviously a density) but if there were any divide by zero issues >then matlab would be chucking warnings. What happens when you set >cfg.output = 'pow'; ? Same thing whether I use 'pow' or 'powandcsd'. So I meant 'pow' normalization (I assume it's baseline corrected on the pre-stimulus interval?). Since I imported raw data from besa (as .dat files) there might be an error in the previous specifications / preprocessing. I don't see otherwise see any major confound in the tf analysis... I will look some more into that part. Thanks for your help! -vv >>>>>>>Hi Virginie, >>>>>>> >>>>>>>the function freqanalysis will return NaNs when a time >>>>>>>frequency tile extends beyond a corresponding data segment. >>>>>>>One would usually expect a "U" shaped padding of NaNs at the >>>>>>>boundaries of any TFR which has longer time windows for lower >>>>>>>frequencies. From the cfg options you specify below I can see >>>>>>>that you have a data segment of 1.1 seconds length and the >>>>>>>moving windows cfg.t_tfimwin are quite long at the low >>>>>>>ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = 0.6666 s. Hence the >>>>>>>NaNs seem perfectly "normal" in this case. The only way to >>>>>>>avoid NaN in the time window of interest (using this type of >>>>>>>time-frequency tiling) is to make your epochs longer. >>>>>>> >>>>>>>Hope this helps, >>>>>>>Christian >>>>>>> >>>>>>> >>>>>>>On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >>>>>>> >>>>>>>>Hello again. >>>>>>>> >>>>>>>>I am finding NaN whatever method I use (multitaper and >>>>>>>>wavelet analysis), yet using a different analysis tool with >>>>>>>>similar parameters I obtain clean results. >>>>>>>>epoch length = 1.1 s >>>>>>>>baseline length = 0.3 s >>>>>>>>sampling rate = 500Hz >>>>>>>> >>>>>>>>I tried several suggestions listed in the previous message >>>>>>>>list for a similar problem, but none seem to provide >>>>>>>>reasonable results (aka always NaN). >>>>>>>>Also tried with different subjects, no particular error >>>>>>>>otherwise. I am sending a sample script in case someone has a >>>>>>>>suggestion on this... >>>>>>>>Thanks for your help once more! >>>>>>>> >>>>>>>>Virginie >>>>>>>> >>>>>>>>%% ================================================ >>>>>>>>% TF analysis - MULTITAPER >>>>>>>>cfg = []; >>>>>>>>cfg.method = 'mtmconvol'; >>>>>>>>cfg.taper = 'hanning'; >>>>>>>>cfg.output = 'powandcsd'; >>>>>>>>%cfg.channel = 'all'; >>>>>>>>cfg.channel = 'E75'; >>>>>>>> >>>>>>>>%win_length = 0.128; >>>>>>>>%win_n = floor(2.*(1.1./win_length)-1); >>>>>>>> >>>>>>>>cfg.foi = 1:5:45; >>>>>>>>%cfg.t_ftimwin = ones(1,win_n).*win_length; >>>>>>>>cfg.t_ftimwin = 4./cfg.foi; >>>>>>>>%cfg.toi = -0.3:win_length/2:0.8; >>>>>>>>cfg.toi = -0.3:0.05:0.8; >>>>>>>> >>>>>>>>% cfg.pad = 'maxperlen'; >>>>>>>>% cfg.keeptrials = 'no'; >>>>>>>>% cfg.keeptapers ='no'; >>>>>>>>s08_ill_mult = freqanalysis(cfg,s08_ill); >>>>>>>> >>>>>>>>%% ======================== >>>>>>>>% plot freq data >>>>>>>>cfg = []; >>>>>>>>cfg.baseline = [-0.3 0]; >>>>>>>>cfg.layout = egilay; >>>>>>>>cfg.zlim = [-0.00001 0.000001]; % a comparer >>>>>>>>entre participants >>>>>>>>% warning off % NaN >>>>>>>>clf >>>>>>>>%multiplotTFR(cfg,s08_ill_mult); >>>>>>>>singleplotTFR(cfg,s08_ill_mult); >>>>>>>> >>>>>>>>%% ================================================ >>>>>>>>% TF analysis - wavelet >>>>>>>>cfg = []; >>>>>>>>cfg.method = 'wltconvol'; >>>>>>>>cfg.width = 4; >>>>>>>>cfg.output = 'pow'; >>>>>>>>cfg.foi = 1:2:30; >>>>>>>>cfg.toi = -0.3:0.05:0.8; >>>>>>>>s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>>>>>>>%% ======================== >>>>>>>>cfg = []; >>>>>>>>cfg.baseline = [-0.3 0]; >>>>>>>>cfg.zlim = [-1 1]; >>>>>>>>cfg.showlabels = 'yes'; >>>>>>>>cfg.layout = egilay; >>>>>>>>clf >>>>>>>>multiplotTFR(cfg, s14_ill_wvlt) >>>>>>>> >>>>>>>>%% ================================================ >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>Virginie van Wassenhove, PhD >>>>>>>> >>>>>>>>:::::::::::: contact info ::::::::::::: >>>>>>>>Caltech - Division of Biology >>>>>>>>1200 E. California Blvd M/C 139-74 >>>>>>>>Pasadena CA 91125 USA >>>>>>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>>>>>><<<mailto:vvw at caltech.edu>mailto:vvw at caltech.edu>mailto:vvw at caltech.edu><<mailto:vvw at caltech.edu>mailto:vvw at caltech.edu><mailto:vvw at caltech.edu>vvw at caltech.edu >>>>>>>><<<mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><<mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>>>>>W: 626.395.8959 >>>>>>>><<<http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>>>>>> >>>>>>>>:::::::::::::::::: extras :::::::::::::::::::: >>>>>>>><<<http://www.kiva.org>http://www.kiva.org>http://www.kiva.org>http://www.kiva.org >>>>>>>><<http://www.thehungersite.com>http://www.thehungersite.com>http://www.thehungersite.com/ >>>>>>>><<http://www.agloco.com/r/BBBS1539>http://www.agloco.com/r/BBBS1539>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>http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>>>>>and >>>>>>>><<<http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>>>>>> >>>>>>>---------------------------------------------------------------------- >>>>>>>Christian Hesse, PhD, MIEEE >>>>>>> >>>>>>>F.C. Donders Centre for Cognitive Neuroimaging >>>>>>>P.O. Box 9101 >>>>>>>NL-6500 HB Nijmegen >>>>>>>The Netherlands >>>>>>> >>>>>>>Tel.: +31 (0)24 36 68293 >>>>>>>Fax: +31 (0)24 36 10989 >>>>>>> >>>>>>>Email: >>>>>>><<<mailto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru.nl><<mailto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru.nl><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>>>>>Web: >>>>>>><<<http://www.fcdonders.ru.nl>http://www.fcdonders.ru.nl>http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>>>>>---------------------------------------------------------------------- >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>---------------------------------- >>>>>>> >>>>>>>The aim of this list is to facilitate the discussion between >>>>>>>users of the FieldTrip toolbox, to share experiences and to >>>>>>>discuss new ideas for MEG and EEG analysis. >>>>>>> >>>>>>><<http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>>>> >>>>>>><http://www.ru.nl/fcdonders/fieldtrip/>http://www.ru.nl/fcdonders/fieldtrip/ >>>>>> >>>>>>Virginie van Wassenhove, PhD >>>>>> >>>>>>:::::::::::: contact info ::::::::::::: >>>>>>Caltech - Division of Biology >>>>>>1200 E. California Blvd M/C 139-74 >>>>>>Pasadena CA 91125 USA >>>>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>>>><<mailto:vvw at caltech.edu>mailto:vvw at caltech.edu><mailto:vvw at caltech.edu>vvw at caltech.edu >>>>>><<mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>>>W: 626.395.8959 >>>>>><<http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>>>> >>>>>>:::::::::::::::::: extras :::::::::::::::::::: >>>>>><<http://www.kiva.org>http://www.kiva.org>http://www.kiva.org >>>>>><http://www.thehungersite.com>http://www.thehungersite.com/ >>>>>><http://www.agloco.com/r/BBBS1539>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>http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>>>and >>>>>><<http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>>>> >>>>>---------------------------------------------------------------------- >>>>>Christian Hesse, PhD, MIEEE >>>>> >>>>>F.C. Donders Centre for Cognitive Neuroimaging >>>>>P.O. Box 9101 >>>>>NL-6500 HB Nijmegen >>>>>The Netherlands >>>>> >>>>>Tel.: +31 (0)24 36 68293 >>>>>Fax: +31 (0)24 36 10989 >>>>> >>>>>Email: >>>>><<mailto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru.nl><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>>>Web: >>>>><<http://www.fcdonders.ru.nl>http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>>>---------------------------------------------------------------------- >>>>> >>>>> >>>>> >>>>> >>>>>---------------------------------- >>>>> >>>>>The aim of this list is to facilitate the discussion between >>>>>users of the FieldTrip toolbox, to share experiences and to >>>>>discuss new ideas for MEG and EEG analysis. >>>>> >>>>><http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>> >>>>>http://www.ru.nl/fcdonders/fieldtrip/ >>>> >>>>Virginie van Wassenhove, PhD >>>> >>>>:::::::::::: contact info ::::::::::::: >>>>Caltech - Division of Biology >>>>1200 E. California Blvd M/C 139-74 >>>>Pasadena CA 91125 USA >>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>><mailto:vvw at caltech.edu>vvw at caltech.edu >>>><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>W: 626.395.8959 >>>><http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>> >>>>:::::::::::::::::: extras :::::::::::::::::::: >>>><http://www.kiva.org>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>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>and >>>><http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>> >>>---------------------------------------------------------------------- >>>Christian Hesse, PhD, MIEEE >>> >>>F.C. Donders Centre for Cognitive Neuroimaging >>>P.O. Box 9101 >>>NL-6500 HB Nijmegen >>>The Netherlands >>> >>>Tel.: +31 (0)24 36 68293 >>>Fax: +31 (0)24 36 10989 >>> >>>Email: >>><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>Web: >>><http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>---------------------------------------------------------------------- >>> >>> >>> >>> >>>---------------------------------- >>> >>>The aim of this list is to facilitate the discussion between users >>>of the FieldTrip toolbox, to share experiences and to discuss new >>>ideas for MEG and EEG analysis. >>> >>>http://listserv.surfnet.nl/archives/fieldtrip.html >>> >>>http://www.ru.nl/fcdonders/fieldtrip/ >> >>Virginie van Wassenhove, PhD >> >>:::::::::::: 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. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD :::::::::::: 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. From olga at GRAPHICMIND.INFO Tue Jun 26 08:43:06 2007 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Tue, 26 Jun 2007 10:43:06 +0400 Subject: clusterrandomization-alphavalue Message-ID: Dear Fieldtrippers, I'd like to clarify the output parameters of clustrandomization. What does clusrand.critvals means. How it depends on chosen alpha threshold (usually 0.05). As I looked through the script, it is the only parameters which depends on alpha. Do I need to use it somehow to choose the significant clusters? Or can I just check the clusrand.pos(neg)clusters.pval parameters to identify significant clusters? Best Regards, Olga. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Jan.Schoffelen at FCDONDERS.RU.NL Tue Jun 26 10:00:52 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Tue, 26 Jun 2007 10:00:52 +0200 Subject: tfanalysis - NaN In-Reply-To: <20070626042513.F20D712C9A@wood-ox.its.caltech.edu> Message-ID: Dear V and C, Sorry to hop in into this discussion, but did you (V) explicitly check the time-axes present in your data? In other words: there is a field in the data structure (data.time) which specifies the time axis for each trial. According to this axis, windows (cfg.t_ftimwins) are placed around the (cfg.tois) you specify in your configuration. If there is a discrepancy between cfg.toi, and data.time, NaNny things could happen. Because you imported your files from BESA, something might be going on here. Yours, Jan-M -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Virginie van Wassenhove Sent: Tuesday, June 26, 2007 6:25 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] tfanalysis - NaN Hi Christian, >In the configuration options you have specified cfg.taper = >'hanning' which will apply only one (i.e., the hanning) taper to >your data. If you want to use multitapers you need to set cfg.taper >= 'dpss' or just leave the field it out of the cfg (since >multitapers are the default). Ah yes, sorry, I have been playing around with most parameters so both 'hanning' and 'dpss' lead to the same result (and other windows and wavelet analysis). >I'm not really sure what you mean by normalized (the csd is >obviously a density) but if there were any divide by zero issues >then matlab would be chucking warnings. What happens when you set >cfg.output = 'pow'; ? Same thing whether I use 'pow' or 'powandcsd'. So I meant 'pow' normalization (I assume it's baseline corrected on the pre-stimulus interval?). Since I imported raw data from besa (as .dat files) there might be an error in the previous specifications / preprocessing. I don't see otherwise see any major confound in the tf analysis... I will look some more into that part. Thanks for your help! -vv >>>>>>>Hi Virginie, >>>>>>> >>>>>>>the function freqanalysis will return NaNs when a time >>>>>>>frequency tile extends beyond a corresponding data segment. >>>>>>>One would usually expect a "U" shaped padding of NaNs at the >>>>>>>boundaries of any TFR which has longer time windows for lower >>>>>>>frequencies. From the cfg options you specify below I can see >>>>>>>that you have a data segment of 1.1 seconds length and the >>>>>>>moving windows cfg.t_tfimwin are quite long at the low >>>>>>>ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = 0.6666 s. Hence the >>>>>>>NaNs seem perfectly "normal" in this case. The only way to >>>>>>>avoid NaN in the time window of interest (using this type of >>>>>>>time-frequency tiling) is to make your epochs longer. >>>>>>> >>>>>>>Hope this helps, >>>>>>>Christian >>>>>>> >>>>>>> >>>>>>>On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >>>>>>> >>>>>>>>Hello again. >>>>>>>> >>>>>>>>I am finding NaN whatever method I use (multitaper and >>>>>>>>wavelet analysis), yet using a different analysis tool with >>>>>>>>similar parameters I obtain clean results. >>>>>>>>epoch length = 1.1 s >>>>>>>>baseline length = 0.3 s >>>>>>>>sampling rate = 500Hz >>>>>>>> >>>>>>>>I tried several suggestions listed in the previous message >>>>>>>>list for a similar problem, but none seem to provide >>>>>>>>reasonable results (aka always NaN). >>>>>>>>Also tried with different subjects, no particular error >>>>>>>>otherwise. I am sending a sample script in case someone has a >>>>>>>>suggestion on this... >>>>>>>>Thanks for your help once more! >>>>>>>> >>>>>>>>Virginie >>>>>>>> >>>>>>>>%% ================================================ >>>>>>>>% TF analysis - MULTITAPER >>>>>>>>cfg = []; >>>>>>>>cfg.method = 'mtmconvol'; >>>>>>>>cfg.taper = 'hanning'; >>>>>>>>cfg.output = 'powandcsd'; >>>>>>>>%cfg.channel = 'all'; >>>>>>>>cfg.channel = 'E75'; >>>>>>>> >>>>>>>>%win_length = 0.128; >>>>>>>>%win_n = floor(2.*(1.1./win_length)-1); >>>>>>>> >>>>>>>>cfg.foi = 1:5:45; >>>>>>>>%cfg.t_ftimwin = ones(1,win_n).*win_length; >>>>>>>>cfg.t_ftimwin = 4./cfg.foi; >>>>>>>>%cfg.toi = -0.3:win_length/2:0.8; >>>>>>>>cfg.toi = -0.3:0.05:0.8; >>>>>>>> >>>>>>>>% cfg.pad = 'maxperlen'; >>>>>>>>% cfg.keeptrials = 'no'; >>>>>>>>% cfg.keeptapers ='no'; >>>>>>>>s08_ill_mult = freqanalysis(cfg,s08_ill); >>>>>>>> >>>>>>>>%% ======================== >>>>>>>>% plot freq data >>>>>>>>cfg = []; >>>>>>>>cfg.baseline = [-0.3 0]; >>>>>>>>cfg.layout = egilay; >>>>>>>>cfg.zlim = [-0.00001 0.000001]; % a comparer >>>>>>>>entre participants >>>>>>>>% warning off % NaN >>>>>>>>clf >>>>>>>>%multiplotTFR(cfg,s08_ill_mult); >>>>>>>>singleplotTFR(cfg,s08_ill_mult); >>>>>>>> >>>>>>>>%% ================================================ >>>>>>>>% TF analysis - wavelet >>>>>>>>cfg = []; >>>>>>>>cfg.method = 'wltconvol'; >>>>>>>>cfg.width = 4; >>>>>>>>cfg.output = 'pow'; >>>>>>>>cfg.foi = 1:2:30; >>>>>>>>cfg.toi = -0.3:0.05:0.8; >>>>>>>>s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>>>>>>>%% ======================== >>>>>>>>cfg = []; >>>>>>>>cfg.baseline = [-0.3 0]; >>>>>>>>cfg.zlim = [-1 1]; >>>>>>>>cfg.showlabels = 'yes'; >>>>>>>>cfg.layout = egilay; >>>>>>>>clf >>>>>>>>multiplotTFR(cfg, s14_ill_wvlt) >>>>>>>> >>>>>>>>%% ================================================ >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>Virginie van Wassenhove, PhD >>>>>>>> >>>>>>>>:::::::::::: contact info ::::::::::::: >>>>>>>>Caltech - Division of Biology >>>>>>>>1200 E. California Blvd M/C 139-74 >>>>>>>>Pasadena CA 91125 USA >>>>>>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>>>>>><<<mailto:vvw at caltech.edu>mailto:vvw at caltech .edu>mailto:vvw at caltech.edu><<mailto:vvw at caltech.edu >mailto:vvw at caltech.edu><mailto:vvw at caltech.edu>vvw at caltech.edu >>>>>>>><<<mailto:Virginie.van.Was senhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.v an.Wassenhove at gmail.com><<mailto:V irginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><< mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmai l.com>Virginie.van.Wassenhove at gmai l.com >>>>>>>>W: 626.395.8959 >>>>>>>><<<http://www.its.caltech.edu/~vvw> http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw>http://www.i ts.caltech.edu/~vvw >>>>>>>> >>>>>>>>:::::::::::::::::: extras :::::::::::::::::::: >>>>>>>><<<http://www.kiva.org>http://www.kiva.org>http ://www.kiva.org>http://www.kiva.org >>>>>>>><<http://www.thehungersite.com>http:// www.thehungersite.com>http://www.thehungersite.com/ >>>>>>>><<http://www.agloco.com/r/BBBS1539 >http://www.agloco.com/r/BBBS1539>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://listse rv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fi eldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html>http://lists erv.surfnet.nl/archives/fieldtrip.html >>>>>>>>and >>>>>>>><<<http://www.ru.nl/fcdonders/ fieldtrip>http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fi eldtrip>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: >>>>>>><<<mailto:c.hesse at fcdonders.ru.nl>mai lto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru.nl><<mailto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru. nl><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>>>>>Web: >>>>>>><<<http://www.fcdonders.ru.nl>http://www. fcdonders.ru.nl>http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>>>>>--------------------------------------------------------------------- - >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>---------------------------------- >>>>>>> >>>>>>>The aim of this list is to facilitate the discussion between >>>>>>>users of the FieldTrip toolbox, to share experiences and to >>>>>>>discuss new ideas for MEG and EEG analysis. >>>>>>> >>>>>>><<http://listserv .surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fiel dtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>>>> >>>>>>><http://www.ru.nl/fcdonders/fi eldtrip/>http://www.ru.nl/fcdonders/fieldtrip/ >>>>>> >>>>>>Virginie van Wassenhove, PhD >>>>>> >>>>>>:::::::::::: contact info ::::::::::::: >>>>>>Caltech - Division of Biology >>>>>>1200 E. California Blvd M/C 139-74 >>>>>>Pasadena CA 91125 USA >>>>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>>>><<mailto:vvw at caltech.edu>mailto:vvw at caltech.ed u><mailto:vvw at caltech.edu>vv w at caltech.edu >>>>>><<mailto:Virginie.van.Wassen hove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>>>W: 626.395.8959 >>>>>><<http://www.its.caltech.edu/~vvw>htt p://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>>>> >>>>>>:::::::::::::::::: extras :::::::::::::::::::: >>>>>><<http://www.kiva.org>http://www.kiva.org>http:// www.kiva.org >>>>>><http://www.thehungersite.com>http://www .thehungersite.com/ >>>>>><http://www.agloco.com/r/BBBS1539>ht tp://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>http://listserv.surfnet.nl/archives/field trip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>>>and >>>>>><<http://www.ru.nl/fcdonders/fie ldtrip>http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/field trip. >>>>> >>>>>---------------------------------------------------------------------- >>>>>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: >>>>><<mailto:c.hesse at fcdonders.ru.nl>mailto :c.hesse at fcdonders.ru.nl><mailto:c.hesse at fcd onders.ru.nl>c.hesse at fcdonders.ru.nl >>>>>Web: >>>>><<http://www.fcdonders.ru.nl>http://www.fcd onders.ru.nl>www.fcdonders.ru.nl >>>>>---------------------------------------------------------------------- >>>>> >>>>> >>>>> >>>>> >>>>>---------------------------------- >>>>> >>>>>The aim of this list is to facilitate the discussion between >>>>>users of the FieldTrip toolbox, to share experiences and to >>>>>discuss new ideas for MEG and EEG analysis. >>>>> >>>>><http://listserv.su rfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtr ip.html >>>>> >>>>>http://www.ru.nl/fcdonders/field trip/ >>>> >>>>Virginie van Wassenhove, PhD >>>> >>>>:::::::::::: contact info ::::::::::::: >>>>Caltech - Division of Biology >>>>1200 E. California Blvd M/C 139-74 >>>>Pasadena CA 91125 USA >>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>><mailto:vvw at caltech.edu> vvw at caltech.edu >>>><mailto:Virginie.van.Wassenhov e at gmail.com>Virginie.van.Wassenhov e at gmail.com >>>>W: 626.395.8959 >>>><http://www.its.caltech.edu/~vvw>http:/ /www.its.caltech.edu/~vvw >>>> >>>>:::::::::::::::::: extras :::::::::::::::::::: >>>><http://www.kiva.org>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.sur fnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtri p.html >>>>and >>>><http://www.ru.nl/fcdonders/fieldt rip>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: >>><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>Web: >>><http://www.fcdonders.ru.nl>www.fcdonders.ru. nl >>>---------------------------------------------------------------------- >>> >>> >>> >>> >>>---------------------------------- >>> >>>The aim of this list is to facilitate the discussion between users >>>of the FieldTrip toolbox, to share experiences and to discuss new >>>ideas for MEG and EEG analysis. >>> >>>http://listserv.surfn et.nl/archives/fieldtrip.html >>> >>>http://www.ru.nl/fcdonders/fieldtrip/ >> >>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.co m >>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.surfne t.nl/archives/fieldtrip.html >>and http://www.ru.nl/fcdonders/fieldtrip. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD :::::::::::: 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. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Jun 26 10:11:32 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Tue, 26 Jun 2007 10:11:32 +0200 Subject: clusterrandomization-alphavalue In-Reply-To: <00a601c7b7bd$40dd10c0$51210ad9@acer027f9640b7> Message-ID: Dear Olga, I'd like to clarify the output parameters of clustrandomization. What does clusrand.critvals means. How it depends on chosen alpha threshold (usually 0.05). As I looked through the script, it is the only parameters which depends on alpha. Do I need to use it somehow to choose the significant clusters? Or can I just check the clusrand.pos(neg)clusters.pval parameters to identify significant clusters? Yes, you can just check the clusrand.pos(neg)clusters.pvals. The two pieces of information are redundant: a clusrand.pos(neg)clusters.pval is less than alpha it the cluster-level statistic of this cluster exceeds clusrand.critval. 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/ ---------------------------------- The aim of this list 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 olga at GRAPHICMIND.INFO Tue Jun 26 10:36:55 2007 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Tue, 26 Jun 2007 12:36:55 +0400 Subject: clusterrandomization-alphavalue Message-ID: Thank you Eric, As I understand, the cfg.alpha is also redundant as input information. Yes? Best Regards, Olga ----- Original Message ----- From: Eric Maris To: FIELDTRIP at NIC.SURFNET.NL Sent: Tuesday, June 26, 2007 12:11 PM Subject: Re: [FIELDTRIP] clusterrandomization-alphavalue Dear Olga, I'd like to clarify the output parameters of clustrandomization. What does clusrand.critvals means. How it depends on chosen alpha threshold (usually 0.05). As I looked through the script, it is the only parameters which depends on alpha. Do I need to use it somehow to choose the significant clusters? Or can I just check the clusrand.pos(neg)clusters.pval parameters to identify significant clusters? Yes, you can just check the clusrand.pos(neg)clusters.pvals. The two pieces of information are redundant: a clusrand.pos(neg)clusters.pval is less than alpha it the cluster-level statistic of this cluster exceeds clusrand.critval. 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/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maris at NICI.RU.NL Tue Jun 26 11:39:38 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Tue, 26 Jun 2007 11:39:38 +0200 Subject: clusterrandomization-alphavalue In-Reply-To: <00cc01c7b7cd$27488030$51210ad9@acer027f9640b7> Message-ID: Dear Olga, As I understand, the cfg.alpha is also redundant as input information. Yes? If you omit cfg.alpha, then clusrand.critval will be computed using the default value cfg.alpha=0.05. 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/ Best Regards, Olga ----- Original Message ----- From: Eric Maris To: FIELDTRIP at NIC.SURFNET.NL Sent: Tuesday, June 26, 2007 12:11 PM Subject: Re: [FIELDTRIP] clusterrandomization-alphavalue Dear Olga, I'd like to clarify the output parameters of clustrandomization. What does clusrand.critvals means. How it depends on chosen alpha threshold (usually 0.05). As I looked through the script, it is the only parameters which depends on alpha. Do I need to use it somehow to choose the significant clusters? Or can I just check the clusrand.pos(neg)clusters.pval parameters to identify significant clusters? Yes, you can just check the clusrand.pos(neg)clusters.pvals. The two pieces of information are redundant: a clusrand.pos(neg)clusters.pval is less than alpha it the cluster-level statistic of this cluster exceeds clusrand.critval. 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/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From olga at GRAPHICMIND.INFO Tue Jun 26 11:51:27 2007 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Tue, 26 Jun 2007 13:51:27 +0400 Subject: clusterrandomization-alphavalue Message-ID: I mean it will not influence clustrand.posclusters.pval, even if I put cfg.alpha =0.5. ----- Original Message ----- From: Eric Maris To: FIELDTRIP at NIC.SURFNET.NL Sent: Tuesday, June 26, 2007 1:39 PM Subject: Re: [FIELDTRIP] clusterrandomization-alphavalue Dear Olga, As I understand, the cfg.alpha is also redundant as input information. Yes? If you omit cfg.alpha, then clusrand.critval will be computed using the default value cfg.alpha=0.05. 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/ Best Regards, Olga ----- Original Message ----- From: Eric Maris To: FIELDTRIP at NIC.SURFNET.NL Sent: Tuesday, June 26, 2007 12:11 PM Subject: Re: [FIELDTRIP] clusterrandomization-alphavalue Dear Olga, I'd like to clarify the output parameters of clustrandomization. What does clusrand.critvals means. How it depends on chosen alpha threshold (usually 0.05). As I looked through the script, it is the only parameters which depends on alpha. Do I need to use it somehow to choose the significant clusters? Or can I just check the clusrand.pos(neg)clusters.pval parameters to identify significant clusters? Yes, you can just check the clusrand.pos(neg)clusters.pvals. The two pieces of information are redundant: a clusrand.pos(neg)clusters.pval is less than alpha it the cluster-level statistic of this cluster exceeds clusrand.critval. 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/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vvw at CALTECH.EDU Wed Jun 27 04:15:00 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Tue, 26 Jun 2007 19:15:00 -0700 Subject: tfanalysis - NaN In-Reply-To: <002401c7b7c8$1e23e6c0$902dae83@fcdonders.nl> Message-ID: Hi Jan-M and Christian thanks very much for all your advice. - there was indeed a time discrepancy in that the imported files were in milliseconds (is this a usual thing when importing from BESA? If so, it may be helpful to have this piece of information on the Besa section in the website). So, converting everything in seconds did help together with... - longer epochs which of course provide more sensible results. No NaN on the horizon, clusteranalysis on the way, I might inquire some more soon on that part... Thanks again for your help! -vv >Sorry to hop in into this discussion, but did you (V) explicitly check the >time-axes present in your data? In other words: there is a field in the data >structure (data.time) which specifies the time axis for each trial. >According to this axis, windows (cfg.t_ftimwins) are placed around the >(cfg.tois) you specify in your configuration. If there is a discrepancy >between cfg.toi, and data.time, NaNny things could happen. Because you >imported your files from BESA, something might be going on here. > >Yours, > >Jan-M > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Virginie van Wassenhove >Sent: Tuesday, June 26, 2007 6:25 AM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] tfanalysis - NaN > >Hi Christian, > > >In the configuration options you have specified cfg.taper = > >'hanning' which will apply only one (i.e., the hanning) taper to > >your data. If you want to use multitapers you need to set cfg.taper > >= 'dpss' or just leave the field it out of the cfg (since > >multitapers are the default). > >Ah yes, sorry, I have been playing around with most parameters so >both 'hanning' and 'dpss' lead to the same result (and other windows >and wavelet analysis). > > >I'm not really sure what you mean by normalized (the csd is > >obviously a density) but if there were any divide by zero issues > >then matlab would be chucking warnings. What happens when you set > >cfg.output = 'pow'; ? > >Same thing whether I use 'pow' or 'powandcsd'. So I meant 'pow' >normalization (I assume it's baseline corrected on the pre-stimulus >interval?). > >Since I imported raw data from besa (as .dat files) there might be an >error in the previous specifications / preprocessing. I don't see >otherwise see any major confound in the tf analysis... I will look >some more into that part. > >Thanks for your help! >-vv > > > > > >>>>>>>Hi Virginie, > >>>>>>> > >>>>>>>the function freqanalysis will return NaNs when a time > >>>>>>>frequency tile extends beyond a corresponding data segment. > >>>>>>>One would usually expect a "U" shaped padding of NaNs at the > >>>>>>>boundaries of any TFR which has longer time windows for lower > >>>>>>>frequencies. From the cfg options you specify below I can see > >>>>>>>that you have a data segment of 1.1 seconds length and the > >>>>>>>moving windows cfg.t_tfimwin are quite long at the low > >>>>>>>ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = 0.6666 s. Hence the > >>>>>>>NaNs seem perfectly "normal" in this case. The only way to > >>>>>>>avoid NaN in the time window of interest (using this type of > >>>>>>>time-frequency tiling) is to make your epochs longer. > >>>>>>> > >>>>>>>Hope this helps, > >>>>>>>Christian > >>>>>>> > >>>>>>> > >>>>>>>On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: > >>>>>>> > >>>>>>>>Hello again. > >>>>>>>> > >>>>>>>>I am finding NaN whatever method I use (multitaper and > >>>>>>>>wavelet analysis), yet using a different analysis tool with > >>>>>>>>similar parameters I obtain clean results. > >>>>>>>>epoch length = 1.1 s > >>>>>>>>baseline length = 0.3 s > >>>>>>>>sampling rate = 500Hz > >>>>>>>> > >>>>>>>>I tried several suggestions listed in the previous message > >>>>>>>>list for a similar problem, but none seem to provide > >>>>>>>>reasonable results (aka always NaN). > >>>>>>>>Also tried with different subjects, no particular error > >>>>>>>>otherwise. I am sending a sample script in case someone has a > >>>>>>>>suggestion on this... > >>>>>>>>Thanks for your help once more! > >>>>>>>> > >>>>>>>>Virginie > >>>>>>>> > >>>>>>>>%% ================================================ > >>>>>>>>% TF analysis - MULTITAPER > >>>>>>>>cfg = []; > >>>>>>>>cfg.method = 'mtmconvol'; > >>>>>>>>cfg.taper = 'hanning'; > >>>>>>>>cfg.output = 'powandcsd'; > >>>>>>>>%cfg.channel = 'all'; > >>>>>>>>cfg.channel = 'E75'; > >>>>>>>> > >>>>>>>>%win_length = 0.128; > >>>>>>>>%win_n = floor(2.*(1.1./win_length)-1); > >>>>>>>> > >>>>>>>>cfg.foi = 1:5:45; > >>>>>>>>%cfg.t_ftimwin = ones(1,win_n).*win_length; > >>>>>>>>cfg.t_ftimwin = 4./cfg.foi; > >>>>>>>>%cfg.toi = -0.3:win_length/2:0.8; > >>>>>>>>cfg.toi = -0.3:0.05:0.8; > >>>>>>>> > >>>>>>>>% cfg.pad = 'maxperlen'; > >>>>>>>>% cfg.keeptrials = 'no'; > >>>>>>>>% cfg.keeptapers ='no'; > >>>>>>>>s08_ill_mult = freqanalysis(cfg,s08_ill); > >>>>>>>> > >>>>>>>>%% ======================== > >>>>>>>>% plot freq data > >>>>>>>>cfg = []; > >>>>>>>>cfg.baseline = [-0.3 0]; > >>>>>>>>cfg.layout = egilay; > >>>>>>>>cfg.zlim = [-0.00001 0.000001]; % a comparer > >>>>>>>>entre participants > >>>>>>>>% warning off % NaN > >>>>>>>>clf > >>>>>>>>%multiplotTFR(cfg,s08_ill_mult); > >>>>>>>>singleplotTFR(cfg,s08_ill_mult); > >>>>>>>> > >>>>>>>>%% ================================================ > >>>>>>>>% TF analysis - wavelet > >>>>>>>>cfg = []; > >>>>>>>>cfg.method = 'wltconvol'; > >>>>>>>>cfg.width = 4; > >>>>>>>>cfg.output = 'pow'; > >>>>>>>>cfg.foi = 1:2:30; > >>>>>>>>cfg.toi = -0.3:0.05:0.8; > >>>>>>>>s14_ill_wvlt = freqanalysis(cfg, s14_ill); > >>>>>>>>%% ======================== > >>>>>>>>cfg = []; > >>>>>>>>cfg.baseline = [-0.3 0]; > >>>>>>>>cfg.zlim = [-1 1]; > >>>>>>>>cfg.showlabels = 'yes'; > >>>>>>>>cfg.layout = egilay; > >>>>>>>>clf > >>>>>>>>multiplotTFR(cfg, s14_ill_wvlt) > >>>>>>>> > >>>>>>>>%% ================================================ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 soren.r.christensen at GSK.COM Wed Jun 27 05:00:29 2007 From: soren.r.christensen at GSK.COM (Soren Rahn Christensen) Date: Wed, 27 Jun 2007 04:00:29 +0100 Subject: Soren R Christensen is out of the office. Message-ID: I will be out of the office starting 27-Jun-2007 and will not return until 04-Jul-2007. Back Thursday 5th ----------------------------------------------------------- This e-mail was sent by GlaxoSmithKline Services Unlimited (registered in England and Wales No. 1047315), which is a member of the GlaxoSmithKline group of companies. The registered address of GlaxoSmithKline Services Unlimited is 980 Great West Road, Brentford, Middlesex TW8 9GS. ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 c.hesse at FCDONDERS.RU.NL Wed Jun 27 13:40:36 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Wed, 27 Jun 2007 13:40:36 +0200 Subject: egi2besa2fieldtrip - topoplot layout In-Reply-To: <20070620162922.1FC5C1ABB1@earth-ox.its.caltech.edu> Message-ID: Hi Virginie & Olga, I have just done some tests using the PREPARE_LAYOUT function and EGI files and the code seems to behave as it should. If you specify cfg.rotate = 0 then the sensor positions come out with the nose pointing upwards. Since the default specified in the code is cfg.rotate = 90, not specifying cfg.rotate or setting cfg.rotate = 90 leaves you with the nose pointing to the right. I would be grateful if you can confirm using your own files that PREPARE_LAYOUT with cfg.rotate = 0 works as described above. Many Thanks, Christian On 20 Jun 2007, at 18:29, Virginie van Wassenhove wrote: > Hi Olga, > > thanks for your help, I think I got it working now! > > Virginie > > At 06:20 AM 6/20/2007, Olga Sysoeva wrote: >> Dear Virginie, >> >> I had the same problem. >> Actually, I not understand where the problem comes from, but solve >> it by >> multiplying the coordinates by cos (- 90) and sin (90). See the >> script >> below. >> It works good for my data... >> >> Best Regards, >> Olga. >> >> >> %prepare layout >> data.elec = >> read_fcdc_elec('C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'); >> cfg = []; >> cfg.rotate = 90; >> cfg.elecfile = 'C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'; >> mylay2 = prepare_layout(cfg); >> >> for i=1:69 >> mylay2.width (i)= 0.5 >> end; >> >> for i=1:69 >> mylay2.height (i)= 0.5 >> end; >> >> x=mylay.pos (:,1); >> y=mylay.pos (:,2); >> mylay2.pos (:,1)=y; >> mylay2.pos (:,2)=-x; >> >> >> -----Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] >> On Behalf >> Of Virginie van Wassenhove >> Sent: Tuesday, June 19, 2007 10:38 PM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: [FIELDTRIP] egi2besa2fieldtrip - topoplot layout >> >> Hi Fieldtripers, >> >> below find the relevant sample code I am using to plot cluster >> results with Fieldtrip release v. 20070514 (latest?). >> >> I have read previous posts in the discussion but I still bump into >> this issue (not sure how old the discussions were). >> The recordings were made with an egi system and preprocessed in besa. >> Although I am using the prepare_layout function, the layout in >> topoplotER (and other plotting tools) needs to be rotated by >> 90degrees clockwise. >> I have tried to use cfg.rotate (in the for loop below, commented >> here) but that does not change anything. >> >> Do you have any suggestions on how to overcome this problem? >> Thanks in advance for your help! >> >> Virginie >> >> % ==== plot results ==== >> cfg = []; >> cfg.elecfile = '\CHANNELS_specs\fieldtrip_GSN128.sfp'; >> egilay = prepare_layout(cfg); >> >> diff_gdav = ill_gdav; >> diff_gdav.av = ill_gdav.avg-noill_gdav.avg; >> >> figure; >> % if cfg.latency = [0.3 0.8]; in cluster analysis >> %j = [0:0.025:0.5]; % (s), 0 = 1st onset >> %m = [1:12:251]; % (samples) >> % if cfg.latency = 'all'; in clusteranalysis >> j = [0:0.05:1.1]; % (s), 0 = -300ms >> from1st >> onset >> m = [1:25:551]; % (samples) >> >> pos = stat.posclusterslabelmat == 1; % + clusters >> neg = (stat.negclusterslabelmat == 1)*(-1); % - clusters >> >> for k = 1:length(j)-1; % 20 subplots >> subplot(4,5,k); >> cfg = []; >> cfg.xlim=[j(k) j(k+1)]; >> cfg.zlim=[-3 3]; >> pos_int = mean(pos(:,m(k):m(k+1))')'; >> neg_int = mean(neg(:,m(k):m(k+1))')'; >> cfg.highlight = find(pos_int ==1 | neg_int == -1); >> cfg.comment = 'xlim'; >> cfg.commentpos = 'title'; >> cfg.layout = egilay; >> %cfg.rotate =[90]; % ?? rotate by 90 >> degrees clock-wise >> topoplotER(cfg,diff_gdav); >> end >> % ==================== >> >> 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. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http:// >> listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/ >> fcdonders/fieldtrip. > > 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. > ---------------------------------------------------------------------- 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 vvw at CALTECH.EDU Wed Jun 27 18:11:17 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Wed, 27 Jun 2007 09:11:17 -0700 Subject: egi2besa2fieldtrip - topoplot layout In-Reply-To: Message-ID: Hi Christian, yes using cfg.rotate = 0 works fine (see below code I have been using). Basically rotating by 90 degrees from the configuration specified in fieldtrip. With this code, com and scale are added to the layout. cfg = []; cfg.rotate = 0; cfg.elecfile = 'C:\Documents and Settings\Virginie\My Documents\EEG_analysis\CHANNELS_specs\fieldtrip_GSN128.sfp'; egilay = prepare_layout(cfg); vv At 04:40 AM 6/27/2007, you wrote: >Hi Virginie & Olga, > >I have just done some tests using the PREPARE_LAYOUT function and >EGI files and the code seems to behave as it should. If you specify >cfg.rotate = 0 then the sensor positions come out with the nose >pointing upwards. Since the default specified in the code is >cfg.rotate = 90, not specifying cfg.rotate or setting cfg.rotate = >90 leaves you with the nose pointing to the right. > >I would be grateful if you can confirm using your own files that >PREPARE_LAYOUT with cfg.rotate = 0 works as described above. > >Many Thanks, >Christian > > >On 20 Jun 2007, at 18:29, Virginie van Wassenhove wrote: > >>Hi Olga, >> >>thanks for your help, I think I got it working now! >> >>Virginie >> >>At 06:20 AM 6/20/2007, Olga Sysoeva wrote: >>>Dear Virginie, >>> >>>I had the same problem. >>>Actually, I not understand where the problem comes from, but solve it by >>>multiplying the coordinates by cos (- 90) and sin (90). See the script >>>below. >>>It works good for my data... >>> >>>Best Regards, >>>Olga. >>> >>> >>>%prepare layout >>>data.elec = >>>read_fcdc_elec('C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'); >>>cfg = []; >>>cfg.rotate = 90; >>>cfg.elecfile = 'C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'; >>>mylay2 = prepare_layout(cfg); >>> >>>for i=1:69 >>> mylay2.width (i)= 0.5 >>>end; >>> >>>for i=1:69 >>> mylay2.height (i)= 0.5 >>>end; >>> >>>x=mylay.pos (:,1); >>>y=mylay.pos (:,2); >>>mylay2.pos (:,1)=y; >>>mylay2.pos (:,2)=-x; >>> >>> >>>-----Original Message----- >>>From: FieldTrip discussion list >>>[mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >>>Of Virginie van Wassenhove >>>Sent: Tuesday, June 19, 2007 10:38 PM >>>To: FIELDTRIP at NIC.SURFNET.NL >>>Subject: [FIELDTRIP] egi2besa2fieldtrip - topoplot layout >>> >>>Hi Fieldtripers, >>> >>>below find the relevant sample code I am using to plot cluster >>>results with Fieldtrip release v. 20070514 (latest?). >>> >>>I have read previous posts in the discussion but I still bump into >>>this issue (not sure how old the discussions were). >>>The recordings were made with an egi system and preprocessed in besa. >>>Although I am using the prepare_layout function, the layout in >>>topoplotER (and other plotting tools) needs to be rotated by >>>90degrees clockwise. >>>I have tried to use cfg.rotate (in the for loop below, commented >>>here) but that does not change anything. >>> >>>Do you have any suggestions on how to overcome this problem? >>>Thanks in advance for your help! >>> >>>Virginie >>> >>>% ==== plot results ==== >>>cfg = []; >>>cfg.elecfile = '\CHANNELS_specs\fieldtrip_GSN128.sfp'; >>>egilay = prepare_layout(cfg); >>> >>>diff_gdav = ill_gdav; >>>diff_gdav.av = ill_gdav.avg-noill_gdav.avg; >>> >>>figure; >>>% if cfg.latency = [0.3 0.8]; in cluster analysis >>>%j = [0:0.025:0.5]; % (s), 0 = 1st onset >>>%m = [1:12:251]; % (samples) >>>% if cfg.latency = 'all'; in clusteranalysis >>>j = [0:0.05:1.1]; % (s), 0 = -300ms from1st >>>onset >>>m = [1:25:551]; % (samples) >>> >>>pos = stat.posclusterslabelmat == 1; % + clusters >>>neg = (stat.negclusterslabelmat == 1)*(-1); % - clusters >>> >>>for k = 1:length(j)-1; % 20 subplots >>> subplot(4,5,k); >>> cfg = []; >>> cfg.xlim=[j(k) j(k+1)]; >>> cfg.zlim=[-3 3]; >>> pos_int = mean(pos(:,m(k):m(k+1))')'; >>> neg_int = mean(neg(:,m(k):m(k+1))')'; >>> cfg.highlight = find(pos_int ==1 | neg_int == -1); >>> cfg.comment = 'xlim'; >>> cfg.commentpos = 'title'; >>> cfg.layout = egilay; >>> %cfg.rotate =[90]; % ?? rotate by 90 >>>degrees clock-wise >>> topoplotER(cfg,diff_gdav); >>>end >>>% ==================== >>> >>>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. >>> >>>---------------------------------- >>>The aim of this list is to facilitate the discussion between users >>>of the FieldTrip toolbox, to share experiences and to discuss new >>>ideas for MEG and EEG analysis. See also >>>http://listserv.surfnet.nl/archives/fieldtrip.html >>>and http://www.ru.nl/fcdonders/fieldtrip. >> >>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. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD :::::::::::: 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. From kosubek at CBS.MPG.DE Thu Jun 28 00:24:11 2007 From: kosubek at CBS.MPG.DE (Lars Kosubek) Date: Thu, 28 Jun 2007 00:24:11 +0200 Subject: TFR Analysis - Plotting Problem Message-ID: Dear Fieldtrip-Team, I'm trying to use fieldtrip-toolbox since a few days. After working through the tutorials and fixing the problem of matlab crash while importing eep-probe files i tried to do tfr-analysis. Everything seems fine but if the script reaches the part of plotting i get the following fault: -------------------------------------------------------- ??? Index exceeds matrix dimensions. Error in ==> topoplotER at 289 dat = dat(:, ymin:ymax, xmin:xmax); -------------------------------------------------------- What could be the reason of this problem? Maybe used the sub functions not in the right way...? In hope someone could spend a bit time in helping me, i will add the hole analysis-script: -------------------------------------------------------- debug=1 Path='/scr/fabian1/lars/SPROD/data/EEP/sprod'; %Subjects={'01','02','03','04','06','07','10','11','12','14','15', ... % '16','17','18','19','20','21','22','23','24'}; Channels={'F3','FZ','F4','FC3','FCZ','FC4','C3','CZ', ... 'C4','CP3','CPZ','CP4','P3','PZ','P4',}; %Contrasts={ {'33','31'} {'63','33'}} Subjects={'01','02'} Contrasts={ {'33','31'} } %Channels={'all'} %% 1. Import files (select trials, reject & preprocess) for k=1:length(Contrasts), Conditions=Contrasts{k}; for j=1:length(Conditions), Condition=Conditions{j}; for i=1:length(Subjects), Subject=Subjects{i}; cfg = []; cfg.dataset = strcat(Path, Subject, '.cnt'); cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 2; cfg.trialdef.eventvalue = Condition; cfg = definetrial(cfg); cfg.rejectfile=strcat(Path, Subject, '.rej') %[cfg] = rejectartifact(cfg); nor included in preprocessing cfg.channel = Channels; %cfg.detrend = 'yes'; PreProcData{i,j,k} = preprocessing(cfg); %save PreProcData PreProcData{i,j,k} -append; end end end %% 2. TimeFrequenzyResolution per Subject an Condition for k=1:length(Contrasts), Conditions=Contrasts{k}; for j=1:length(Conditions), Condition=Conditions{j}; for i=1:length(Subjects), Subject=Subjects{i}; cfg = []; cfg.output = 'pow'; %cfg.channel = 'all'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:1:20; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; %cfg.t_ftimwin = 5./cfg.foi; % 7 cycles per time window cfg.toi = -1:0.05:2; cfg.keeptrials = 'no'; cfg.keeptapers = 'no'; TFRAvgData{i,j,k} = freqanalysis(cfg, PreProcData{i,j,k}) %save TFRAvgData TFRAvgData{i,j,k} -append; if debug==1 cfg = []; cfg.layout = 'EEG1010.lay'; cfg.zparam='powspctrm'; cfg.xparam='time'; cfg.yparam='freq'; %cfg.xlim = -0.2 : 0.1 : 1.0; % Define 12 time intervals %cfg.zlim = [-1.3e-13 1.3e-13]; % Set the 'color' limits. figure; multiplotTFR(cfg,TFRAvgData{i,j,k}) end end end end clear PreProcData; %% 3. GrandAvarage of Conditions over Subjects for k=1:length(Contrasts), Conditions=Contrasts{k}; for j=1:length(Conditions), Condition=Conditions{j}; cfg = []; cfg.keepindividual='yes'; TFRGAvgData{k,j} = freqgrandaverage(cfg, TFRAvgData{:,j,k}) %save TFRGAvgData TFRGAvgData{i,j} -append; end end clear TFRAvgData; %% 4. Cluster Based Permutation Statitic between Conditions for k=1:length(Contrasts), Conditions=Contrasts{k}; cfg = []; cfg.parameter='powspctrm' cfg.latency=[0.2 1.4]; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 100; cfg.layout = 'EEG1010.lay'; subj = length(Subjects); design=zeros(2,2*subj); for s = 1:subj design(1,s) = s; end for s = 1:subj design(1,subj+s) = s; end design(2,1:subj) = 1; design(2,subj+1:2*subj) = 2; cfg.design = design; cfg.uvar = 1; cfg.ivar = 2; [stat] = freqstatistics(cfg, TFRGAvgData{k,1}, TFRGAvgData{k,2}) %% 5. Plotting the Statistics GA_TFR_AvsB = TFRGAvgData{k,1}; GA_TFR_AvsB.powspctrm = GA_TFR_AvsB.powspctrm - TFRGAvgData{k,2}.powspctrm; figure; j = [-0.4:0.05:1.35]; foi = 10; % frequency of interest index_foi = find(stat.freq==foi);% index of frequency of interest in stat for k = 1:11; m=k+16; subplot(4,5,k); cfg = []; %cfg.baseline = [-0.5 -0.1]; cfg.xlim=[j(k) j(k)]; cfg.ylim = [foi foi]; cfg.highlight = find (stat.negclusterslabelmat(:,index_foi,m)==1); %cfg.zlim = [-2.5e-28 2.5e-28]; cfg.comment = 'xlim'; cfg.commentpos = 'title'; cfg.xparam='time'; cfg.yparam='freq'; cfg.zparam='powspctrm'; cfg.layout='EEG1010.lay'; topoplotTFR(cfg, GA_TFR_AvsB); end end ------------------------------------------------------------------ Big Thanks for taking time and reading until this point! Best Regards, Lars Kosubek ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 vvw at CALTECH.EDU Thu Jun 28 00:49:26 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Wed, 27 Jun 2007 15:49:26 -0700 Subject: TFR Analysis - Plotting Problem In-Reply-To: <63818.85.176.248.164.1182983051.squirrel@mail.cbs.mpg.de> Message-ID: Here's an attempt because I just had a similar issue when plotting the difference between 2 conditions (for 1 individual). If I set cfg.keeptrials = 'yes' (which is needed for the cluster analysis) for the freqanalysis and use the pwspctrm difference for these 2 conditions, multiplotTFR won't work and returns a similar error. I suppose because there is 1 more dimension aka 'trials'. If I use an average difference (cfg.keeptrials = 'no') for these same conditions and for illustrative purposes, then multiplotTFR works and display both the average difference and the obtained clusters... Not sure whether this is relevant to your across-individuals design but maybe it's worth trying it out. -Virginie At 03:24 PM 6/27/2007, you wrote: >Dear Fieldtrip-Team, > >I'm trying to use fieldtrip-toolbox since a few days. After working >through the tutorials and fixing the problem of matlab crash while >importing eep-probe files i tried to do tfr-analysis. Everything seems >fine but if the script reaches the part of plotting i get the following >fault: > > >-------------------------------------------------------- >??? Index exceeds matrix dimensions. > >Error in ==> topoplotER at 289 > dat = dat(:, ymin:ymax, xmin:xmax); >-------------------------------------------------------- > > > >What could be the reason of this problem? Maybe used the sub functions not >in the right way...? > >In hope someone could spend a bit time in helping me, i will add the hole >analysis-script: > > >-------------------------------------------------------- >debug=1 > >Path='/scr/fabian1/lars/SPROD/data/EEP/sprod'; > >%Subjects={'01','02','03','04','06','07','10','11','12','14','15', ... >% '16','17','18','19','20','21','22','23','24'}; > >Channels={'F3','FZ','F4','FC3','FCZ','FC4','C3','CZ', ... > 'C4','CP3','CPZ','CP4','P3','PZ','P4',}; > >%Contrasts={ {'33','31'} {'63','33'}} > >Subjects={'01','02'} > >Contrasts={ {'33','31'} } > >%Channels={'all'} > > >%% 1. Import files (select trials, reject & preprocess) > >for k=1:length(Contrasts), Conditions=Contrasts{k}; > for j=1:length(Conditions), Condition=Conditions{j}; > for i=1:length(Subjects), Subject=Subjects{i}; > cfg = []; > cfg.dataset = strcat(Path, Subject, '.cnt'); > cfg.trialdef.eventtype = 'trigger'; > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 2; > cfg.trialdef.eventvalue = Condition; > cfg = definetrial(cfg); > > cfg.rejectfile=strcat(Path, Subject, '.rej') > %[cfg] = rejectartifact(cfg); nor included in preprocessing > > cfg.channel = Channels; > %cfg.detrend = 'yes'; > PreProcData{i,j,k} = preprocessing(cfg); > %save PreProcData PreProcData{i,j,k} -append; > end > end >end > > >%% 2. TimeFrequenzyResolution per Subject an Condition > >for k=1:length(Contrasts), Conditions=Contrasts{k}; > for j=1:length(Conditions), Condition=Conditions{j}; > for i=1:length(Subjects), Subject=Subjects{i}; > cfg = []; > cfg.output = 'pow'; > %cfg.channel = 'all'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.foi = 1:1:20; > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; > %cfg.t_ftimwin = 5./cfg.foi; % 7 cycles per time window > cfg.toi = -1:0.05:2; > cfg.keeptrials = 'no'; > cfg.keeptapers = 'no'; > > TFRAvgData{i,j,k} = freqanalysis(cfg, PreProcData{i,j,k}) > %save TFRAvgData TFRAvgData{i,j,k} -append; > if debug==1 > cfg = []; > cfg.layout = 'EEG1010.lay'; > cfg.zparam='powspctrm'; > cfg.xparam='time'; > cfg.yparam='freq'; > %cfg.xlim = -0.2 : 0.1 : 1.0; % Define 12 time intervals > %cfg.zlim = [-1.3e-13 1.3e-13]; % Set the 'color' limits. > figure; multiplotTFR(cfg,TFRAvgData{i,j,k}) > end > end > end >end > > >clear PreProcData; > > >%% 3. GrandAvarage of Conditions over Subjects > >for k=1:length(Contrasts), Conditions=Contrasts{k}; > for j=1:length(Conditions), Condition=Conditions{j}; > cfg = []; > cfg.keepindividual='yes'; > TFRGAvgData{k,j} = freqgrandaverage(cfg, TFRAvgData{:,j,k}) > %save TFRGAvgData TFRGAvgData{i,j} -append; > end >end > > >clear TFRAvgData; > > > >%% 4. Cluster Based Permutation Statitic between Conditions > >for k=1:length(Contrasts), Conditions=Contrasts{k}; >cfg = []; >cfg.parameter='powspctrm' >cfg.latency=[0.2 1.4]; >cfg.method = 'montecarlo'; >cfg.statistic = 'depsamplesT'; >cfg.clusteralpha = 0.05; >cfg.clusterstatistic = 'maxsum'; >cfg.minnbchan = 2; >cfg.tail = 0; >cfg.clustertail = 0; >cfg.alpha = 0.05; >cfg.numrandomization = 100; >cfg.layout = 'EEG1010.lay'; > >subj = length(Subjects); >design=zeros(2,2*subj); >for s = 1:subj > design(1,s) = s; >end >for s = 1:subj > design(1,subj+s) = s; >end >design(2,1:subj) = 1; >design(2,subj+1:2*subj) = 2; > >cfg.design = design; >cfg.uvar = 1; >cfg.ivar = 2; > >[stat] = freqstatistics(cfg, TFRGAvgData{k,1}, TFRGAvgData{k,2}) > > > >%% 5. Plotting the Statistics > >GA_TFR_AvsB = TFRGAvgData{k,1}; >GA_TFR_AvsB.powspctrm = GA_TFR_AvsB.powspctrm - TFRGAvgData{k,2}.powspctrm; > > >figure; >j = [-0.4:0.05:1.35]; >foi = 10; % frequency of interest >index_foi = find(stat.freq==foi);% index of frequency of interest in stat >for k = 1:11; > m=k+16; > subplot(4,5,k); > cfg = []; > %cfg.baseline = [-0.5 -0.1]; > cfg.xlim=[j(k) j(k)]; > cfg.ylim = [foi foi]; > cfg.highlight = find (stat.negclusterslabelmat(:,index_foi,m)==1); > %cfg.zlim = [-2.5e-28 2.5e-28]; > cfg.comment = 'xlim'; > cfg.commentpos = 'title'; > cfg.xparam='time'; > cfg.yparam='freq'; > cfg.zparam='powspctrm'; > cfg.layout='EEG1010.lay'; > > topoplotTFR(cfg, GA_TFR_AvsB); >end > >end >------------------------------------------------------------------ > >Big Thanks for taking time and reading until this point! >Best Regards, Lars Kosubek > >---------------------------------- >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. See also >http://listserv.surfnet.nl/archives/fieldtrip.html and >http://www.ru.nl/fcdonders/fieldtrip. 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. From h.ferguson at PSY.GLA.AC.UK Thu Jun 28 11:46:38 2007 From: h.ferguson at PSY.GLA.AC.UK (heather ferguson) Date: Thu, 28 Jun 2007 10:46:38 +0100 Subject: cfg.neighbourdist unit measurement? Message-ID: Hi, Please can someone tell me whether the cfg.neighbourdist needed to define clusters is in cm or mm? (i.e. if I want a 3cm distance, should the value be 3 or 30?) Thanks, Heather ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Thu Jun 28 12:29:23 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 28 Jun 2007 12:29:23 +0200 Subject: cfg.neighbourdist unit measurement? In-Reply-To: <000901c7b969$4b812d10$cf59d182@heatherpc> Message-ID: Dear Heather, Please can someone tell me whether the cfg.neighbourdist needed to define clusters is in cm or mm? (i.e. if I want a 3cm distance, should the value be 3 or 30?) You should specify cfg.neighbourdist on the same scale as the scale in which your sensor coordinates (in the .grad or .elec field) are expressed. See the help of NEIGHBOURSELECTION. 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, Heather ---------------------------------- The aim of this list 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 h.morgan at BANGOR.AC.UK Thu Jun 28 17:05:42 2007 From: h.morgan at BANGOR.AC.UK (Helen Morgan) Date: Thu, 28 Jun 2007 17:05:42 +0200 Subject: Interpolating bad channels in EEG Message-ID: Hi, Is there a function in Fieldtrip that can replace data from a bad EEG channel using interpolation of neighbouring channels? Thanks, Helen ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Thu Jun 28 19:04:57 2007 From: abastos at BERKELEY.EDU (Andre Bastos) Date: Thu, 28 Jun 2007 10:04:57 -0700 Subject: cfg.neighbourdist unit measurement? In-Reply-To: <05f601c7b96f$36921440$6501a8c0@fcdonders.nl> Message-ID: Dear Heather, With a standard 64 channel montage, I created neighbourhood locations using neighbourdist values between 1 and 100, and then evaluated each structure to see which one specified 5 neighbors for T8, 8 for Cz, and 4 for Fp1. 48, 49, and 50 seemed to satisfy this so I just took the middle value. You may have to play around with this value depending on the size of your montage. Good Luck, -Andre From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Eric Maris Sent: Thursday, June 28, 2007 3:29 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] cfg.neighbourdist unit measurement? Dear Heather, Please can someone tell me whether the cfg.neighbourdist needed to define clusters is in cm or mm? (i.e. if I want a 3cm distance, should the value be 3 or 30?) You should specify cfg.neighbourdist on the same scale as the scale in which your sensor coordinates (in the .grad or .elec field) are expressed. See the help of NEIGHBOURSELECTION. 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, Heather ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vvw at CALTECH.EDU Thu Jun 28 21:24:14 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Thu, 28 Jun 2007 12:24:14 -0700 Subject: out of memory - window machine Message-ID: 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. From jaredvs at GMAIL.COM Fri Jun 29 03:31:32 2007 From: jaredvs at GMAIL.COM (Jared Van Snellenberg) Date: Fri, 29 Jun 2007 03:31:32 +0200 Subject: Volume conduction model for EEG DICS beamforming Message-ID: Hi all, 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). 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. 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). 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. Thank you very much, 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 jaredvs at GMAIL.COM Fri Jun 29 04:57:56 2007 From: jaredvs at GMAIL.COM (Jared Van Snellenberg) Date: Thu, 28 Jun 2007 22:57:56 -0400 Subject: out of memory - window machine In-Reply-To: <20070628192415.370CE12D6B@fire-ox.its.caltech.edu> Message-ID: 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. 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 olga at GRAPHICMIND.INFO Fri Jun 29 05:47:15 2007 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Fri, 29 Jun 2007 07:47:15 +0400 Subject: PC computer for Fieldtrip Message-ID: Dear all, It is probably a dull question, but can you specified the "good" PC Computer for analysing 64-channel data in Fieldtrip. Best Regards, Olga. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Jun 29 09:12:11 2007 From: kooijman at TIFN.NL (Valesca Kooijman) Date: Fri, 29 Jun 2007 09:12:11 +0200 Subject: eeglab2fieldtrip Message-ID: Hi all, I am trying to convert some EEGLAB data (.set files) to Fieldtrip. After loading my eeglab data file, I use the command data = eeglab2fieldtrip(EEG, preprocessing). Unfortunately I get some warnings and an error message instead of a usable file. It says: >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)); Apparantly the script cannot convert the matlab version into a number, and therefore cannot determine the correct matrix dimensions. I don't know if this is because there is a problem in my datafile or in the script. Does anyone know what to do about this? Thanks! Best, Valesca ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From c.hesse at FCDONDERS.RU.NL Fri Jun 29 09:45:31 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 29 Jun 2007 09:45:31 +0200 Subject: eeglab2fieldtrip In-Reply-To: Message-ID: Hi Valesca, which version of Matlab are you using? Christian On 29 Jun 2007, at 09:12, Valesca Kooijman wrote: > Hi all, > > I am trying to convert some EEGLAB data (.set files) to Fieldtrip. > After > loading my eeglab data file, I use the command > data = eeglab2fieldtrip(EEG, preprocessing). Unfortunately I get some > warnings and an error message instead of a usable file. > It says: > >> 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)); > > Apparantly the script cannot convert the matlab version into a > number, and > therefore cannot determine the correct matrix dimensions. I don't > know if > this is because there is a problem in my datafile or in the script. > > Does anyone know what to do about this? Thanks! > > Best, > Valesca > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kooijman at TIFN.NL Fri Jun 29 09:47:58 2007 From: Kooijman at TIFN.NL (Valesca Kooijman) Date: Fri, 29 Jun 2007 09:47:58 +0200 Subject: eeglab2fieldtrip In-Reply-To: <9DB94328-DEE7-495D-ACD1-7DD07CAD1F27@fcdonders.ru.nl> Message-ID: hi Christian, I am using matlab version 7.0.1. Valesca Christian Hesse Sent by: FieldTrip discussion list 06/29/2007 09:45 AM Please respond to FieldTrip discussion list To FIELDTRIP at NIC.SURFNET.NL cc Subject Re: [FIELDTRIP] eeglab2fieldtrip Hi Valesca, which version of Matlab are you using? Christian On 29 Jun 2007, at 09:12, Valesca Kooijman wrote: Hi all, I am trying to convert some EEGLAB data (.set files) to Fieldtrip. After loading my eeglab data file, I use the command data = eeglab2fieldtrip(EEG, preprocessing). Unfortunately I get some warnings and an error message instead of a usable file. It says: 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)); Apparantly the script cannot convert the matlab version into a number, and therefore cannot determine the correct matrix dimensions. I don't know if this is because there is a problem in my datafile or in the script. Does anyone know what to do about this? Thanks! Best, Valesca ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vvw at CALTECH.EDU Fri Jun 29 18:22:40 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Fri, 29 Jun 2007 09:22:40 -0700 Subject: out of memory - window machine In-Reply-To: <51d499680706281957v2b1c34bfx48d7a15f0ff82ca2@mail.gmail.co m> Message-ID: Hi Jared, I'll try the couple new things you suggested, thanks! vv At 07:57 PM 6/28/2007, you wrote: >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 ><vvw at caltech.edu> 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/ 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. From muthuraman10 at HOTMAIL.COM Fri Jun 1 11:06:44 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Fri, 1 Jun 2007 09:06:44 +0000 Subject: wavelet analysis! Message-ID: Hello Fieldtrippers, In the wavelet analysis, when calculating the coherence between a EEG and a EMG electrode the values are all 500, for this configuration. When using the multiatper analysis i get the correct values. cfg=[]; cfg.output='powandcsd'; cfg.method='wltconvol'; cfg.channel = channelselection({'all'}, data1.label); cfg.channelcmb = channelcombination({'C3','M2'}, data1.label); cfg.foi=2:1:20; numfoi=length(cfg.foi); cfg.t_ftimwin=ones(1,numfoi); cfg.t_ftimwin(:)=10; cfg.toi=5:0.05:145; cfg.width = 7; cfg.gwidth = 3; cfg.pad=150; cfg.keeptrials='no'; TFRmult=freqanalysis(cfg,data1); cfg.keeptrials='yes'; fdmtmfft=freqdescriptives(cfg,TFRmult); Is there something more needed to be in the wavelet analysis configuration, data length is 150000. Thanking you With regards M.Muthuraman. _________________________________________________________________ Fly Chn-Blr for Rs.249 only. Log on to MakeMyTrip now! http://ss1.richmedia.in/recurl.asp?pid=50 ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri Jun 1 17:47:58 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 1 Jun 2007 17:47:58 +0200 Subject: matlab crash after sourceanalysis with correctm = 'cluster' Message-ID: Hi I'm doing sourceanalysis with the following settings: cfg = []; cfg.parameter = 'stat'; cfg.method = 'montecarlo'; cfg.statistic = 'pooledT' ; cfg.numrandomization = 1000; cfg.correctm = 'cluster'; cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; cfg.uvar = 2; cfg.clustercritval = [-1.96 1.96]; %because Z-values GA_source_norm_cl = sourcestatistics(cfg,source_norm{1:Nsub},pseudosource_norm{1:Nsub}); Everything goes well, but after the 1000 randomizations matlab crashes, also on the 16 GB WM mentats. I think it's caused by the multiple comparison correction 'cluster', because without that I doesn't crash (when cfg.correctm = 'no' or fi 'max' does work). Does anyone have any suggestions on how to solve this? I've attached the crashdump. Thanks, Ingrid ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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: matlab_crash_dump.14208 Type: application/octet-stream Size: 17557 bytes Desc: not available URL: From sameer at ANDREW.CMU.EDU Fri Jun 1 21:13:53 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 1 Jun 2007 15:13:53 -0400 Subject: nonparamteric statistical tests for coherence differences Message-ID: Hello, I am looking for Wiki entry or tutorial for doing nonparamteric statistical tests for coherence differences (both within trial and between trials). What I can get is http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:statistics#3_permutation_tests_for_time-frequency_representations which describes how to do the same for TFRs. I am thinking of attempting using basically the same set of commands, but substituting the correct procedure for calculating coherences etc in the steps shown is section 3. will that be proper? thanks for your help. 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 Fri Jun 1 23:17:37 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Fri, 1 Jun 2007 23:17:37 +0200 Subject: nonparamteric statistical tests for coherence differences In-Reply-To: Message-ID: Hi Sameer, > I am looking for Wiki entry or tutorial for doing nonparamteric > statistical tests for coherence differences (both within trial and > between trials). At this moment, only coherence testing between trials is implemented. > > What I can get is > http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu tori > al:statistics#3_permutation_tests_for_time-frequency_representations > which describes how to do the same for TFRs. > > I am thinking of attempting using basically the same set of commands, but > substituting the correct procedure for calculating coherences etc in the > steps shown is section 3. will that be proper? I don't know. Just have a try. My expectation is that copy-pasting will not be sufficient to get it running. On the other hand, I used the Fieldtrip-code for all the analyses on which is reported in our JNM-paper on coherence difference testing. I am aware of the fact that the tutorial could be improved with respect to the testing of coherence differences. Good luck, 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 for your help. > > 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 Jan.Schoffelen at FCDONDERS.RU.NL Sun Jun 3 16:37:53 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Sun, 3 Jun 2007 16:37:53 +0200 Subject: matlab crash after sourceanalysis with correctm = 'cluster' In-Reply-To: Message-ID: Hi Ingrid, Do you perhaps have very big functional volumes and many subjects? Typically, I downsample my volumes back to about my original grid-dimensions, after spatially smoothing the individual volumes. Normally, memory problems could occur when applying a nonparametric cluster threshold, but as far as I know, this is the default option. This therefore should not cause the problem (however it's worth checking in the code, or specifying cfg.clusterthreshold = 'parametric', of cours along with one of my favourite configuration-fields cfg.critval). Yours, Jan-M -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Ingrid Nieuwenhuis Sent: Friday, June 01, 2007 5:48 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] matlab crash after sourceanalysis with correctm = 'cluster' Hi I'm doing sourceanalysis with the following settings: cfg = []; cfg.parameter = 'stat'; cfg.method = 'montecarlo'; cfg.statistic = 'pooledT' ; cfg.numrandomization = 1000; cfg.correctm = 'cluster'; cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; cfg.uvar = 2; cfg.clustercritval = [-1.96 1.96]; %because Z-values GA_source_norm_cl = sourcestatistics(cfg,source_norm{1:Nsub},pseudosource_norm{1:Nsub}); Everything goes well, but after the 1000 randomizations matlab crashes, also on the 16 GB WM mentats. I think it's caused by the multiple comparison correction 'cluster', because without that I doesn't crash (when cfg.correctm = 'no' or fi 'max' does work). Does anyone have any suggestions on how to solve this? I've attached the crashdump. Thanks, Ingrid ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Brian.Roach at YALE.EDU Tue Jun 5 19:39:22 2007 From: Brian.Roach at YALE.EDU (Brian Roach) Date: Tue, 5 Jun 2007 13:39:22 -0400 Subject: Research Assistant Position at Yale University Message-ID: FieldTrip users, We are looking for recent graduates or experienced brain imagers wanting to work in our lab for at least one year before going on to graduate school. Please reply to: daniel.mathalon at yale.edu or judith.ford at yale.edu Research Assistant Needed for Multimodal Brain Imaging in Psychopathology The Clinical and Cognitive Neuroscience Laboratory at Yale University is looking for a research assistant to help with our multi-modal brain imaging studies of schizophrenia using fMRI and EEG/ERP data. Applicants should have a Bachelor's degree from an accredited 4-year university with experience relevant to the position. The assistant will acquire EEG data with ActiveView2 (Biosemi) and Neuroscan (Synamps). Familiarity with software such as E-Prime, STIM, or Presentation is desirable. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Tue Jun 5 20:52:13 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 5 Jun 2007 14:52:13 -0400 Subject: plotting phase lock values w.r.t. a reference channel. Message-ID: Hello, Is there a simple modification of fieldtrip plotting functions (topoplot etc) which can be used to plot phase lock values (plvspctrm)? thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Jan.Schoffelen at FCDONDERS.RU.NL Tue Jun 5 21:00:44 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Tue, 5 Jun 2007 21:00:44 +0200 Subject: plotting phase lock values w.r.t. a reference channel. In-Reply-To: Message-ID: Dear Sameer, I guess the easiest way of solving this, is to do: freq.cohspctrm = freq.plvspctrm and then proceed as if you are dealing with coherence-spectra. (don't forget to specify cfg.cohrefchannel). Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Tuesday, June 05, 2007 8:52 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] plotting phase lock values w.r.t. a reference channel. Hello, Is there a simple modification of fieldtrip plotting functions (topoplot etc) which can be used to plot phase lock values (plvspctrm)? thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Jun 5 21:07:27 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 5 Jun 2007 21:07:27 +0200 Subject: plotting phase lock values w.r.t. a reference channel. In-Reply-To: Message-ID: Hi Sameer, I think that it should be already possible to plot it with the functions as they are. If you specify cfg.zparam = 'plvspctrm', you also manually have to specify the xparam and in case of 3D data also the yparam. Did you already try this? And if it didn't work what error did you get? Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Tuesday, June 05, 2007 8:52 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] plotting phase lock values w.r.t. a reference channel. Hello, Is there a simple modification of fieldtrip plotting functions (topoplot etc) which can be used to plot phase lock values (plvspctrm)? thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Tue Jun 5 21:23:05 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 5 Jun 2007 15:23:05 -0400 Subject: plotting phase lock values w.r.t. a reference channel. In-Reply-To: <003b01c7a7a4$c1f80300$642dae83@fcdonders.nl> Message-ID: Thanks Jan-Mathijs and Ingrid, Using cfg.zparam = 'plvspctrm' was returning error essentially implying that it did not recognize this zparam. But I must have been using some wrong dataset as I just tried it to reproduce the error and it worked. Unfortuanely, it seems that the PLV is always 1?!! I expect it should be between [0 2pi] or [-pi pi]. Must look into it now. sameer On Tue, 5 Jun 2007, Ingrid Nieuwenhuis wrote: > Hi Sameer, > > I think that it should be already possible to plot it with the functions as > they are. If you specify cfg.zparam = 'plvspctrm', you also manually have to > specify the xparam and in case of 3D data also the yparam. > Did you already try this? And if it didn't work what error did you get? > > Hope this helps, > Ingrid > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Sameer Walawalkar > Sent: Tuesday, June 05, 2007 8:52 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] plotting phase lock values w.r.t. a reference channel. > > Hello, > > Is there a simple modification of fieldtrip plotting functions (topoplot > etc) which can be used to plot phase lock values (plvspctrm)? > > thanks, > sameer > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Wed Jun 6 22:59:54 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Wed, 6 Jun 2007 16:59:54 -0400 Subject: phase locking value always 1 Message-ID: Hello, I use the following setup to calculate PLVs: cfg = []; cfg.ouput='powandcsd'; cfg.method='mtmfft'; cfg.keeptrials='no'; cfg.tapsmofrq=4; cfg.foilim =[05 120]; cfg.channel = 'MEG' ; cfg.channelcmb = {'MEG' 'MEG'}; cfg.pad = 2.00 ; freq_LL_Two_pre = freqanalysis(cfg,dataLL_Two_pre); cfg = []; cfg.cohmethod = 'plv'; Phase_neg2_neg1_LL_Two_pre = freqdescriptives(cfg, freq_LL_Two_pre) The PLVs I get are uniformly 1.000. I am not sure what's going on. the coherence spectra from cfg.cohmethod = 'coh' are just fine. thanks, sameer p.s: On a side note, for coherences, if I use cfg.complex = 'angle': the phase differences I get seem to be distributed from [-2pi 2pi] rather than [-pi pi] or [0 2pi] (I have not used [] strictly in mathematical sense). How do I understand this? ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Jan.Schoffelen at FCDONDERS.RU.NL Thu Jun 7 10:02:25 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Thu, 7 Jun 2007 10:02:25 +0200 Subject: phase locking value always 1 In-Reply-To: Message-ID: Dear Sameer, cfg.keeptrials = 'no' is strictly forbidden when you want to compute the plv! The reason for this comes from the mathematics behind it: For the computation of the plv, each observation has to be normalised by its amplitude prior to averaging across all observations. The normalisation step is implemented in freqdescriptives, therefore it needs an input which still contains the single trials. I leave it as a quiz for the interested reader to reason why actually the plv becomes 1, when you only have a 'single' (that is: averaged) observation. Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Wednesday, June 06, 2007 11:00 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] phase locking value always 1 Hello, I use the following setup to calculate PLVs: cfg = []; cfg.ouput='powandcsd'; cfg.method='mtmfft'; cfg.keeptrials='no'; cfg.tapsmofrq=4; cfg.foilim =[05 120]; cfg.channel = 'MEG' ; cfg.channelcmb = {'MEG' 'MEG'}; cfg.pad = 2.00 ; freq_LL_Two_pre = freqanalysis(cfg,dataLL_Two_pre); cfg = []; cfg.cohmethod = 'plv'; Phase_neg2_neg1_LL_Two_pre = freqdescriptives(cfg, freq_LL_Two_pre) The PLVs I get are uniformly 1.000. I am not sure what's going on. the coherence spectra from cfg.cohmethod = 'coh' are just fine. thanks, sameer p.s: On a side note, for coherences, if I use cfg.complex = 'angle': the phase differences I get seem to be distributed from [-2pi 2pi] rather than [-pi pi] or [0 2pi] (I have not used [] strictly in mathematical sense). How do I understand this? ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From marie at PSY.GLA.AC.UK Thu Jun 7 17:37:31 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Thu, 7 Jun 2007 16:37:31 +0100 Subject: RA job advertisement - CCNi Glasgow Message-ID: UNIVERSITY of GLASGOW DEPARTMENT OF PSYCHOLOGY Centre for Cognitive Neuroimaging (CCNi) RESEARCH ASSISTANT 3 year fixed term appointment, £23,692 - £26,666 or £29,139 - £32,796 per annum (depending on experience) REF: 13355/DPO/A3 Applications are invited for a Postdoctoral Research Assistant to work with Professor Philippe Schyns, Dr. Nial Friel (Dept of Statistics) and Dr Marie Smith in the newly established Centre for Cognitive Neuroimaging (CCNi) on a project entitled “Adaptive Sampling Algorithms for Cognitive Neuroscience Applications Using Bubbles”. 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 overall aim of the project is to develop new methods to interpret behavioural and brain signals (EEG, MEG and fMRI) with online sampling of image information. Using adaptive sampling algorithms, we will seek to circumscribe the stimulus information that optimises a particular brain response. Developments of adaptive sampling will include Hidden Markov modelling placed within a statistical decision framework. You will also have the opportunity to contribute to the development of a user-friendly, MatLab based toolbox to make these algorithms publicly available to our growing user base. You will be qualified, with a PhD, or equivalent, in Statistics or Mathematics or a closely related discipline. Advanced skills in statistical pattern recognition and/or machine learning and/or Bayesian methods are essential. Strong programming skills (Matlab, C or related) are also highly desirable. Finally, you should have a strong interest in developing your own scientific program and pursuing a research career. This post is available from 1 Aug 2007. Informal enquiries may be made to Professor P. Schyns, (+44 (0)141 330 4937; p.schyns at psy.gla.ac.uk), Dr Nial Friel (+44 (0) 141 4047 ; nial at stats.gla.ac.uk) or Dr Marie Smith (+44 (0)141 330 3987; m.smith at psy.gla.ac.uk). For further details on the department, please see our website at: http://www.ccni.gla.ac.uk/ For an application pack, please see our website at http:// www.gla.ac.uk/ or write quoting the appropriate reference number 13355/DPO/A3 to the Recruitment Section, Human Resources Department, University of Glasgow, Glasgow G12 8QQ. Closing date: 6th July 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 sameer at ANDREW.CMU.EDU Thu Jun 7 22:11:56 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 7 Jun 2007 16:11:56 -0400 Subject: cannot convert gradiometer definition back to axial, please contact Robert Message-ID: Hello Robert, I have been playing around with http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:statistics#3_permutation_tests_for_time-frequency_representations in an attempt implement non-paramteric statistical testing of coherence diferences between trials. My screen currently reads: the input is freq data with 612 channels, 18 frequencybins and 11 timebins Warning: trying to convert planar to axial gradiometers, this is experimental > In combineplanar at 280 In Auto_nonparametric_coh at 47 ??? Error using ==> combineplanar at 308 cannot convert gradiometer definition back to axial, please contact Robert Error in ==> Auto_nonparametric_coh at 47 TFR_LL_000_500_planar_cmb = combineplanar(cfg, TFR_LL_000_500_planar); So, I am getting in touch with Robert Oostenveld. 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 sameer at ANDREW.CMU.EDU Fri Jun 8 22:31:43 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 8 Jun 2007 16:31:43 -0400 Subject: channel combinations for coherene Message-ID: Hello, how can I specify cfg.channelcmb for freqanalysis_mtmfft such that it only does planar-planar combinations or mag-mag combinations? thanks, sameer ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From jan.schoffelen at FCDONDERS.RU.NL Sat Jun 9 10:20:59 2007 From: jan.schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Sat, 9 Jun 2007 10:20:59 +0200 Subject: channel combinations for coherene Message-ID: Dear Sameer, I am not sure whether I understood your question correctly, but couldn't you just specify: cfg.channelcmb = {'MEG' 'MEG'} ? JM ----- Original Message ----- From: Sameer Walawalkar Date: Friday, June 8, 2007 10:31 pm Subject: [FIELDTRIP] channel combinations for coherene > Hello, > > how can I specify cfg.channelcmb for freqanalysis_mtmfft such that > it only > does planar-planar combinations or mag-mag combinations? > > thanks, > sameer > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Sun Jun 10 19:58:25 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Sun, 10 Jun 2007 13:58:25 -0400 Subject: channel combinations for coherene In-Reply-To: Message-ID: Dear Jan, {'MEG' 'MEG'} is too many channel combinations. I later run into memory problems (I am trying to get Phase Lock Value and freqanalysis_mtmfft needs a matrix of dimensions [number of trials X number of channel combinations X number of frequency points]). So I am trying to do only gradiometers with gradiometers and mags with mags (though I think even that needs too much memory while computing phase lock values). thanks, sameer On Sat, 9 Jun 2007, Jan Mathijs Schoffelen wrote: > Dear Sameer, > > I am not sure whether I understood your question correctly, but couldn't you just specify: > > cfg.channelcmb = {'MEG' 'MEG'} ? > > JM > > ----- Original Message ----- > From: Sameer Walawalkar > Date: Friday, June 8, 2007 10:31 pm > Subject: [FIELDTRIP] channel combinations for coherene > >> Hello, >> >> how can I specify cfg.channelcmb for freqanalysis_mtmfft such that >> it only >> does planar-planar combinations or mag-mag combinations? >> >> thanks, >> sameer >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/fcdonders/fieldtrip. >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From ingrid.nieuwenhuis at FCDONDERS.RU.NL Mon Jun 11 10:37:06 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 11 Jun 2007 10:37:06 +0200 Subject: channel combinations for coherene In-Reply-To: Message-ID: Hi Sameer, You can just specify channel combinations by hand as a two-column cell array only for the channels you want, see the help of the function channelcombination.m Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Sunday, June 10, 2007 7:58 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] channel combinations for coherene Dear Jan, {'MEG' 'MEG'} is too many channel combinations. I later run into memory problems (I am trying to get Phase Lock Value and freqanalysis_mtmfft needs a matrix of dimensions [number of trials X number of channel combinations X number of frequency points]). So I am trying to do only gradiometers with gradiometers and mags with mags (though I think even that needs too much memory while computing phase lock values). thanks, sameer On Sat, 9 Jun 2007, Jan Mathijs Schoffelen wrote: > Dear Sameer, > > I am not sure whether I understood your question correctly, but couldn't you just specify: > > cfg.channelcmb = {'MEG' 'MEG'} ? > > JM > > ----- Original Message ----- > From: Sameer Walawalkar > Date: Friday, June 8, 2007 10:31 pm > Subject: [FIELDTRIP] channel combinations for coherene > >> Hello, >> >> how can I specify cfg.channelcmb for freqanalysis_mtmfft such that >> it only >> does planar-planar combinations or mag-mag combinations? >> >> thanks, >> sameer >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/fcdonders/fieldtrip. >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Jan.Schoffelen at FCDONDERS.RU.NL Mon Jun 11 11:14:46 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 11 Jun 2007 11:14:46 +0200 Subject: channel combinations for coherene In-Reply-To: Message-ID: Dear Sameer, I cannot cure memory problems for you. ;o) Even if you managed to achieve a reduction in the amount of chncmbs, I think that you would still run into problems. Next to this, I feel that you should be a bit more specific about your question. I assume that you would like to apply a kind of 'combineplanar' in order to reduce the amount of chancmb's (in other words I guess you would like to get rid of the _dV and _dH planar gradients, and collaps those into one number). This is not at all trivial, since in a bivariate measure such as coherence you are dealing with a cross-spectral density between 4 channels (which four and why?). In other words, you have a matrix which looks like this: Chn1_dh Chn1_dv Chn2_dh Chn2_dv Chn1_dh xx xx yx yx Chn1_dv xx xx yx yx Chn2_dh xy xy yy yy Chn2_dv xy xy yy yy The xx and yy blocks contain info about the extent at which the activity picked up by chn1 and chn2 respectively reflect a 'dipole' with fixed orientation, the xy and yx blocks containt the cross-term information, and are each other's conjugate (why was that again?). If we consider coherence (or plv for the same argument) to be a measure which quantifies the linear predictability of chn1 out of chn2 it might be easy to see why actually we need to take into account the interaction between the respective _dh and _dv gradiometers. If the _dh and _dv component are linearly independent, then they explain independent parts of the variance in the other channel. However, in practice this is of course never the case, so the two planar gradients cannot be considered independently. This means that it is generally not possible to sum the coherence values in the xy blocks. If you want to summarize the sixteen values in the matrix above, you have to come up with a clever strategy. I could think of two strategies: Either you reduce the amount of channels prior to doing the cross-spectral density computation. This results in reducing the 4x4 csd-matrix back into a 2x2 matrix, in which the off-diagonal element gives you the chncmb csd directly. This could for example be done by estimating the extent to which the activity at a planar channel can be represented as a dipole with a fixed orientation, and projecting the activity of the planar channel onto the direction of the highest variance (basically doing a pca). This should be applied to the fourier-data. Another strategy could be to compute the frequency equivalent of canonical correlation, which would yield the maximum of variance explained by an optimal linear combination of the respective two planar gradient combinations. Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Sunday, June 10, 2007 7:58 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] channel combinations for coherene Dear Jan, {'MEG' 'MEG'} is too many channel combinations. I later run into memory problems (I am trying to get Phase Lock Value and freqanalysis_mtmfft needs a matrix of dimensions [number of trials X number of channel combinations X number of frequency points]). So I am trying to do only gradiometers with gradiometers and mags with mags (though I think even that needs too much memory while computing phase lock values). thanks, sameer On Sat, 9 Jun 2007, Jan Mathijs Schoffelen wrote: > Dear Sameer, > > I am not sure whether I understood your question correctly, but couldn't you just specify: > > cfg.channelcmb = {'MEG' 'MEG'} ? > > JM > > ----- Original Message ----- > From: Sameer Walawalkar > Date: Friday, June 8, 2007 10:31 pm > Subject: [FIELDTRIP] channel combinations for coherene > >> Hello, >> >> how can I specify cfg.channelcmb for freqanalysis_mtmfft such that >> it only >> does planar-planar combinations or mag-mag combinations? >> >> thanks, >> sameer >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/fcdonders/fieldtrip. >> > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 r.oostenveld at FCDONDERS.RU.NL Mon Jun 11 14:57:53 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 11 Jun 2007 14:57:53 +0200 Subject: cannot convert gradiometer definition back to axial, please contact Robert In-Reply-To: Message-ID: Hi Sameer, On 7 Jun 2007, at 22:11, Sameer Walawalkar wrote: > Hello Robert, > > I have been playing around with http://www2.ru.nl/fcdonders/ > fieldtrip/doku.php? > id=fieldtrip:documentation:tutorial:statistics#3_permutation_tests_for > _time-frequency_representations > > in an attempt implement non-paramteric statistical testing of > coherence diferences between trials. My screen currently reads: > > the input is freq data with 612 channels, 18 frequencybins and 11 > timebins How did you manage to get 612 channels? Are you computing planar channels from your planar channels? Your neuromag system already has planar channels (by hardware design), hence you should not call megplanar on your data. The megplanar function is meant for computing planar gradients from a hardware magnetometer system (or a hardware axial gradiometer system, such as our CTF). After preprocessing and timelockanalysis or freqanalysis you should do combineplanar. > Warning: trying to convert planar to axial gradiometers, this is > experimental >> In combineplanar at 280 > In Auto_nonparametric_coh at 47 > ??? Error using ==> combineplanar at 308 > cannot convert gradiometer definition back to axial, please contact > Robert > > Error in ==> Auto_nonparametric_coh at 47 > TFR_LL_000_500_planar_cmb = combineplanar(cfg, TFR_LL_000_500_planar); > > > So, I am getting in touch with Robert Oostenveld. 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 a.maye at UKE.DE Thu Jun 14 11:26:09 2007 From: a.maye at UKE.DE (Alexander Maye) Date: Thu, 14 Jun 2007 11:26:09 +0200 Subject: wavelet analysis! Message-ID: Dear experts! When I compute coherence (using 'freqdescriptives') based on a frequency transform using 'freqanalysis_wltconvol', I get coherence values larger than 1. This has also been observed by Muthuraman before. The script below demonstrates this observation and also that freqanalysis_mtmconvol does everything correctly. I think the problem is pertinent to all current fieldtrip versions. While I can easily switch to mtmconvol I thought it could be useful to address this issue. Does anyone have an idea? Best, ALEX. % Construct 4 trials with a sine wave in two channels ... t=[0:1/pi:100*pi]; data.trial{1} = [sin(t);sin(t)]; data.time{1} = t/pi/10; for i = 2:4, data.trial{i}=data.trial{1};data.time{i}=data.time{1}; end data.label = {'1' '2'}; data.fsample = 10*pi; cfgmtm.method = 'mtmconvol'; cfgmtm.tapsmofrq = 10; cfgmtm.t_ftimwin = 0.2; cfgmtm.output = 'powandcsd'; cfgmtm.keeptrials = 'yes'; cfgmtm.toi = 5; cfgmtm.foi = 10; cfgwlt.method = 'wltconvol'; cfgwlt.width = 5; cfgwlt.output = 'powandcsd'; cfgwlt.keeptrials = 'yes'; cfgwlt.toi = 5; cfgwlt.foi = 10; fmtm = freqanalysis(cfgmtm,data); fwlt = freqanalysis(cfgwlt,data); cohcfg.cohmethod = 'coh'; cohcfg.complex = 'abs'; cohmtm = freqdescriptives(cohcfg,fmtm); cohwlt = freqdescriptives(cohcfg,fwlt); % ... should yield a coherence of 1 ... cohmtm % ... but this doesn't :-( cohwlt ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From Jan.Schoffelen at FCDONDERS.RU.NL Thu Jun 14 14:41:06 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Thu, 14 Jun 2007 14:41:06 +0200 Subject: wavelet analysis! In-Reply-To: Message-ID: Dear Alex, >When I compute coherence (using 'freqdescriptives') based on a frequency >transform using 'freqanalysis_wltconvol', I get coherence values larger >than 1. This has also been observed by Muthuraman before. > >The script below demonstrates this observation and also that >freqanalysis_mtmconvol does everything correctly. I think the problem is >pertinent to all current fieldtrip versions. I'm very glad that you started trying out to solve the problem yourself. Solving a problem indeed always starts with finding out where it goes wrong ;) >While I can easily switch to mtmconvol I thought it could be useful to >address this issue. Does anyone have an idea? Yes, I have an idea. Regarding your suggested switch to mtmconvol I can only very much support you to do so, but let's address the issue: You construct 4 trials of surrogate data with an expected coherence of 1. What you find is a coherence of 1 with mtmconvol, but a coherence of >1 with wltconvol. Let's tackle the problem from its tail to find the cause, by looking at the mathematics to compute coherence: In pseudo-mathematics this yields: Coherence = abs(mean(csd))./sqrt(mean(pow1)*mean(pow2)). In your simulated case, you explicitly equated signal 1 and 2, which means that the csd would be: 1 real-valued 2 equivalent to the power of one of the signals (does everybody still agree?) In pseudo-mathematics: Pow1 = pow2 = csd: coherence = abs(mean(pow))./sqrt(mean(pow)*mean(pow))= p/sqrt(p^2) = 1 Apparently, wltconvol either gives back too big a csd, or too small a pow1 (and pow2). Let's have a look at the code then (of course you and Muthuraman already did): Mtmconvol line 450: powdum = 2.* abs(autspctrmacttap) .^ 2 ./ actfoinumsmp; Mtmconvol line 489: csddum = 2.* (autspctrmacttap(cutdatindcmb(:,1),:) .* conj(autspctrmacttap(cutdatindcmb(:,2),:))) ./ actfoinumsmp; So these lines compute the power (450) and the csd (489). The 2 and the actfoinumsmp are needed for a proper normalization. So far so good. Wltconvol l. 279: powdum = (2.* abs(autspctrmacttap) ./ data.fsample) .^ 2; Wltconvol l. 292: csddum = 2.* (autspctrmacttap(cutdatindcmb(:,1),:) .* conj(autspctrmacttap(cutdatindcmb(:,2),:))) ./ data.fsample; %actfoinumsmp Oooops! As you can see, the normalization of powdum is different from the normalisation of csddum. In fact there is an additional 2./data.fsample (still with me? The squaring is taken outside of the brackets), as compared to the csddum. This would even allow me to predict the (wrong) coherence outputted by your little simulation, but I leave that up to you guys. This is indeed a bug and will be fixed. Keep up the good work. J-M ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 a.maye at UKE.DE Thu Jun 14 16:33:15 2007 From: a.maye at UKE.DE (Alexander Maye) Date: Thu, 14 Jun 2007 16:33:15 +0200 Subject: read in EEProbe data Message-ID: Dear all! I just ran across the same problem reading EEProbe files like others in this thread before. Reading an EEprobe .cnt file using read_fcdc_header simply crashes my matlab (under Linux). This is due to read_eep_cnt.mexglx, which according to Robert can't be fixed until some low-level ANT functions become available. I'm talking about fieldtrip 0.9.8. Alright, here comes a very dirty but quick fix that works fine for me (and I hope that nobody from the EEGLab community is listening :-)). EEGLab (Delorme, Makeig, http://sccn.ucsd.edu/) comes with the same read_eep_cnt.mexglx function, which works surprizingly well. So, replacing read_eep_cnt.mexglx in the fieldtrip/private directory with the corresponding file from the EEGLab disribution (version 5 in my case) solved the problem. I acknowledge that from an ethical point of view this is wrong, and I hope that I will not be forced to continue this bad behavior in the near future ;-) Cheers, ALEX. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Thu Jun 14 21:22:14 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 14 Jun 2007 15:22:14 -0400 Subject: cannot convert gradiometer definition back to axial, please contact Robert In-Reply-To: Message-ID: Hi, As suggested I did freqanalysis and followd it up by trying combine planar and got similar error. cfgTFR = []; cfgTFR.output = 'pow'; cfgTFR.channel = 'MEG'; cfgTFR.method = 'mtmconvol'; cfgTFR.foi = 5 : 5 : 90; cfgTFR.t_ftimwin = 5./cfgTFR.foi; cfgTFR.tapsmofrq = 0.4 *cfgTFR.foi; cfgTFR.toi = .0 : 0.05 : .5; cfgTFR.pad = 'maxperlen'; and cfg = []; cfg.combinegrad = 'yes'; ERROR message: the input is freq data with 306 channels, 18 frequencybins and 11 timebins Warning: trying to convert planar to axial gradiometers, this is experimental > In combineplanar at 280 In Auto_nonparametric_coh at 47 ??? Error using ==> combineplanar cannot convert gradiometer definition back to axial, please contact Robert Error in ==> Auto_nonparametric_coh at 47 TFR_LL_000_500_cmb = combineplanar(cfg, TFR_LL_000_500); thanks, sameer On Mon, 11 Jun 2007, Robert Oostenveld wrote: > Hi Sameer, > > On 7 Jun 2007, at 22:11, Sameer Walawalkar wrote: > >> Hello Robert, >> >> I have been playing around with >> http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:statistics#3_permutation_tests_for_time-frequency_representations >> >> in an attempt implement non-paramteric statistical testing of coherence >> diferences between trials. My screen currently reads: >> >> the input is freq data with 612 channels, 18 frequencybins and 11 timebins > > How did you manage to get 612 channels? Are you computing planar channels > from your planar channels? Your neuromag system already has planar channels > (by hardware design), hence you should not call megplanar on your data. The > megplanar function is meant for computing planar gradients from a hardware > magnetometer system (or a hardware axial gradiometer system, such as our > CTF). > > After preprocessing and timelockanalysis or freqanalysis you should do > combineplanar. > >> Warning: trying to convert planar to axial gradiometers, this is >> experimental >>> In combineplanar at 280 >> In Auto_nonparametric_coh at 47 >> ??? Error using ==> combineplanar at 308 >> cannot convert gradiometer definition back to axial, please contact Robert >> >> Error in ==> Auto_nonparametric_coh at 47 >> TFR_LL_000_500_planar_cmb = combineplanar(cfg, TFR_LL_000_500_planar); >> >> >> So, I am getting in touch with Robert Oostenveld. > > 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. From sameer at ANDREW.CMU.EDU Sat Jun 16 03:26:54 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 15 Jun 2007 21:26:54 -0400 Subject: cannot convert gradiometer definition back to axial, please contact Robert (fwd) Message-ID: I think I was getting this message because I did not have cfg.keeptrials = 'yes' I am also trying without combineplanar as it seems that it might not be required for NM306. (Also combineplanar gives me same old error, "cant convert gradiometer to axial. this is probably because, I did not go Axial -> grad, so there is no point attempting grad->axial) The current state of affairs is cfg = channel: {306x1 cell} method: 'montecarlo' statistic: 'indepsamplesT' clusteralpha: 0.0500 clusterstatistic: 'maxsum' minnbchan: 2 tail: 0 clustertail: 0 alpha: 0.0500 numrandomization: 100 design: [1 2] ivar: 1 latency: [0.2000 -0.1000] frequency: [8 14] avgoverchan: 'no' avgovertime: 'no' avgoverfreq: 'no' channelcmb: [] precision: 'double' version: [1x1 struct] previous: {[1x1 struct] [1x1 struct]} dimord: 'chan_freq_time' dim: [306 7 1] Using the gradiometer configuration from the dataset. there are on average 17.4 neighbours per channel using "statistics_montecarlo" for the statistical testing ??? Error using ==> fieldtrip/private/statistics_wrapper at 240 the size of the design matrix does not match the number of observations in the data Error in ==> freqstatistics at 106 [stat] = statistics_wrapper(cfg, varargin{:}); Error in ==> Auto_nonparametric_coh at 86 [stat_post] = freqstatistics(cfg, TFR_LL_200_400 , TFR_LL_neg1_neg2); I shall be trying to troubleshoot this. Hope some of it makes sense. thanks for your time. best, sameer ---------- Forwarded message ---------- Date: Thu, 14 Jun 2007 15:22:14 -0400 (EDT) From: Sameer Walawalkar To: FieldTrip discussion list Subject: Re: [FIELDTRIP] cannot convert gradiometer definition back to axial, please contact Robert Hi, As suggested I did freqanalysis and followd it up by trying combine planar and got similar error. cfgTFR = []; cfgTFR.output = 'pow'; cfgTFR.channel = 'MEG'; cfgTFR.method = 'mtmconvol'; cfgTFR.foi = 5 : 5 : 90; cfgTFR.t_ftimwin = 5./cfgTFR.foi; cfgTFR.tapsmofrq = 0.4 *cfgTFR.foi; cfgTFR.toi = .0 : 0.05 : .5; cfgTFR.pad = 'maxperlen'; and cfg = []; cfg.combinegrad = 'yes'; ERROR message: the input is freq data with 306 channels, 18 frequencybins and 11 timebins Warning: trying to convert planar to axial gradiometers, this is experimental > In combineplanar at 280 In Auto_nonparametric_coh at 47 ??? Error using ==> combineplanar cannot convert gradiometer definition back to axial, please contact Robert Error in ==> Auto_nonparametric_coh at 47 TFR_LL_000_500_cmb = combineplanar(cfg, TFR_LL_000_500); thanks, sameer On Mon, 11 Jun 2007, Robert Oostenveld wrote: > Hi Sameer, > > On 7 Jun 2007, at 22:11, Sameer Walawalkar wrote: > >> Hello Robert, >> >> I have been playing around with >> http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tutorial:statistics#3_permutation_tests_for_time-frequency_representations >> >> in an attempt implement non-paramteric statistical testing of coherence >> diferences between trials. My screen currently reads: >> >> the input is freq data with 612 channels, 18 frequencybins and 11 timebins > > How did you manage to get 612 channels? Are you computing planar channels > from your planar channels? Your neuromag system already has planar channels > (by hardware design), hence you should not call megplanar on your data. The > megplanar function is meant for computing planar gradients from a hardware > magnetometer system (or a hardware axial gradiometer system, such as our > CTF). > > After preprocessing and timelockanalysis or freqanalysis you should do > combineplanar. > >> Warning: trying to convert planar to axial gradiometers, this is >> experimental >>> In combineplanar at 280 >> In Auto_nonparametric_coh at 47 >> ??? Error using ==> combineplanar at 308 >> cannot convert gradiometer definition back to axial, please contact Robert >> >> Error in ==> Auto_nonparametric_coh at 47 >> TFR_LL_000_500_planar_cmb = combineplanar(cfg, TFR_LL_000_500_planar); >> >> >> So, I am getting in touch with Robert Oostenveld. > > 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. From thomas at UCSD.EDU Sat Jun 16 22:55:09 2007 From: thomas at UCSD.EDU (Thomas Thesen) Date: Sat, 16 Jun 2007 16:55:09 -0400 Subject: freqbaseline - zscore Message-ID: Hi FieldTrippers, Hi List, I noticed that in the current release of FT, FREQBASELINE.M has a section commented out where the zscore is presumably calculated. Can anyone say what the reason is for that? Is the calculation not valid? What does it produce? A zscore comparison would, in practice, be most convenient to have. Or is there a better way to do this? Thanks, Thomas ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 t.schneider at UKE.UNI-HAMBURG.DE Mon Jun 18 13:27:14 2007 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Mon, 18 Jun 2007 13:27:14 +0200 Subject: source data on inflated surface Message-ID: Hi, I was trying to project source data to an inflated surface, but consistently got the error message: Color Data is not set for interpolated shading. The plot of the surface looks fine so far, but no functional data is plotted. I used the following config with the fieldtrip version 20070617: figure cfg = []; cfg.anaparameter = 'anatomy'; cfg.funparameter = funparameter; cfg.maskparameter = maskparameter; cfg.method = 'surface'; cfg.projmethod = 'nearest'; cfg.surfinflated = 'surface_l4_both.mat'; cfg.funcolorlim = 'zeromax'; cfg = sourceplot(cfg, sourceInterp); Has anyone experience with this error? Best, Till -- 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 t.schneider at UKE.UNI-HAMBURG.DE Mon Jun 18 13:44:52 2007 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Mon, 18 Jun 2007 13:44:52 +0200 Subject: source data on inflated surface Message-ID: Hi, I was trying to project source data to an inflated surface, but consistently got the error message:Color Data is not set for interpolated shading. The plot of the surface looks fine so far, but no functional data is plotted.I used the following config with the fieldtrip version 20070617: figure cfg = []; cfg.anaparameter = 'anatomy'; cfg.funparameter = funparameter; cfg.maskparameter = maskparameter; cfg.method = 'surface'; cfg.projmethod = 'nearest'; cfg.surfinflated = 'surface_l4_both.mat'; cfg.funcolorlim = 'zeromax'; cfg = sourceplot(cfg, sourceInterp); Has anyone experience with this error? Best, Till -- 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 ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Jun 19 15:51:54 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 19 Jun 2007 15:51:54 +0200 Subject: source data on inflated surface In-Reply-To: <46767034.30709@uke.uni-hamburg.de> Message-ID: Hi Till, I think the error is caused because the cfg is not specified correctly. If you want to plot onto an inflated surface you have to specify both cfg.surffile and cfg.surfinflated. In your case it could be: cfg.surffile = 'surface_wm_both.mat'; cfg.surfinflated = 'surface_wminf_both.mat'; The first is used to interpolate the functional data onto, the second is used for plotting. You can't use the 'surface_l4_both.mat' because there is no matching surface file with that one. Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Till Schneider Sent: Monday, June 18, 2007 1:45 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] source data on inflated surface Hi, I was trying to project source data to an inflated surface, but consistently got the error message:Color Data is not set for interpolated shading. The plot of the surface looks fine so far, but no functional data is plotted.I used the following config with the fieldtrip version 20070617: figure cfg = []; cfg.anaparameter = 'anatomy'; cfg.funparameter = funparameter; cfg.maskparameter = maskparameter; cfg.method = 'surface'; cfg.projmethod = 'nearest'; cfg.surfinflated = 'surface_l4_both.mat'; cfg.funcolorlim = 'zeromax'; cfg = sourceplot(cfg, sourceInterp); Has anyone experience with this error? Best, Till -- 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 vvw at CALTECH.EDU Tue Jun 19 20:37:30 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Tue, 19 Jun 2007 11:37:30 -0700 Subject: egi2besa2fieldtrip - topoplot layout Message-ID: Hi Fieldtripers, below find the relevant sample code I am using to plot cluster results with Fieldtrip release v. 20070514 (latest?). I have read previous posts in the discussion but I still bump into this issue (not sure how old the discussions were). The recordings were made with an egi system and preprocessed in besa. Although I am using the prepare_layout function, the layout in topoplotER (and other plotting tools) needs to be rotated by 90degrees clockwise. I have tried to use cfg.rotate (in the for loop below, commented here) but that does not change anything. Do you have any suggestions on how to overcome this problem? Thanks in advance for your help! Virginie % ==== plot results ==== cfg = []; cfg.elecfile = '\CHANNELS_specs\fieldtrip_GSN128.sfp'; egilay = prepare_layout(cfg); diff_gdav = ill_gdav; diff_gdav.av = ill_gdav.avg-noill_gdav.avg; figure; % if cfg.latency = [0.3 0.8]; in cluster analysis %j = [0:0.025:0.5]; % (s), 0 = 1st onset %m = [1:12:251]; % (samples) % if cfg.latency = 'all'; in clusteranalysis j = [0:0.05:1.1]; % (s), 0 = -300ms from1st onset m = [1:25:551]; % (samples) pos = stat.posclusterslabelmat == 1; % + clusters neg = (stat.negclusterslabelmat == 1)*(-1); % - clusters for k = 1:length(j)-1; % 20 subplots subplot(4,5,k); cfg = []; cfg.xlim=[j(k) j(k+1)]; cfg.zlim=[-3 3]; pos_int = mean(pos(:,m(k):m(k+1))')'; neg_int = mean(neg(:,m(k):m(k+1))')'; cfg.highlight = find(pos_int ==1 | neg_int == -1); cfg.comment = 'xlim'; cfg.commentpos = 'title'; cfg.layout = egilay; %cfg.rotate =[90]; % ?? rotate by 90 degrees clock-wise topoplotER(cfg,diff_gdav); end % ==================== 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. From t.schneider at UKE.UNI-HAMBURG.DE Wed Jun 20 09:44:39 2007 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Wed, 20 Jun 2007 09:44:39 +0200 Subject: source data on inflated surface In-Reply-To: <005d01c7b279$008ce890$642dae83@fcdonders.nl> Message-ID: Hi Ingrid, thanks a lot, this works fine. Till Ingrid Nieuwenhuis schrieb: > Hi Till, > > I think the error is caused because the cfg is not specified correctly. If > you want to plot onto an inflated surface you have to specify both > cfg.surffile and cfg.surfinflated. In your case it could be: > > cfg.surffile = 'surface_wm_both.mat'; > cfg.surfinflated = 'surface_wminf_both.mat'; > > The first is used to interpolate the functional data onto, the second is > used for plotting. You can't use the 'surface_l4_both.mat' because there is > no matching surface file with that one. > > Hope this helps, > Ingrid > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Till Schneider > Sent: Monday, June 18, 2007 1:45 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] source data on inflated surface > > Hi, > > I was trying to project source data to an inflated surface, but > consistently got the error message:Color Data is not set for > interpolated shading. The plot of the surface looks fine so far, but no > functional data is plotted.I used the following config with the > fieldtrip version 20070617: > > figure > cfg = []; > cfg.anaparameter = 'anatomy'; > cfg.funparameter = funparameter; > cfg.maskparameter = maskparameter; > cfg.method = 'surface'; > cfg.projmethod = 'nearest'; > cfg.surfinflated = 'surface_l4_both.mat'; > cfg.funcolorlim = 'zeromax'; > cfg = sourceplot(cfg, sourceInterp); > > Has anyone experience with this error? > Best, > Till > > > > -- Till Schneider, Dipl.Psych. Universitaetsklinikum Hamburg-Eppendorf Institut fuer Neurophysiologie und Pathophysiologie Martinistr. 52 20246 Hamburg Germany tel +49-40-42803-3188 fax +49-40-42803-7752 mobil +49-178-2834030 -- 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 olga at GRAPHICMIND.INFO Wed Jun 20 15:20:00 2007 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Wed, 20 Jun 2007 17:20:00 +0400 Subject: egi2besa2fieldtrip - topoplot layout In-Reply-To: <20070619183729.9B5AA12DEE@wood-ox.its.caltech.edu> Message-ID: Dear Virginie, I had the same problem. Actually, I not understand where the problem comes from, but solve it by multiplying the coordinates by cos (- 90) and sin (90). See the script below. It works good for my data... Best Regards, Olga. %prepare layout data.elec = read_fcdc_elec('C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'); cfg = []; cfg.rotate = 90; cfg.elecfile = 'C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'; mylay2 = prepare_layout(cfg); for i=1:69 mylay2.width (i)= 0.5 end; for i=1:69 mylay2.height (i)= 0.5 end; x=mylay.pos (:,1); y=mylay.pos (:,2); mylay2.pos (:,1)=y; mylay2.pos (:,2)=-x; -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Virginie van Wassenhove Sent: Tuesday, June 19, 2007 10:38 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] egi2besa2fieldtrip - topoplot layout Hi Fieldtripers, below find the relevant sample code I am using to plot cluster results with Fieldtrip release v. 20070514 (latest?). I have read previous posts in the discussion but I still bump into this issue (not sure how old the discussions were). The recordings were made with an egi system and preprocessed in besa. Although I am using the prepare_layout function, the layout in topoplotER (and other plotting tools) needs to be rotated by 90degrees clockwise. I have tried to use cfg.rotate (in the for loop below, commented here) but that does not change anything. Do you have any suggestions on how to overcome this problem? Thanks in advance for your help! Virginie % ==== plot results ==== cfg = []; cfg.elecfile = '\CHANNELS_specs\fieldtrip_GSN128.sfp'; egilay = prepare_layout(cfg); diff_gdav = ill_gdav; diff_gdav.av = ill_gdav.avg-noill_gdav.avg; figure; % if cfg.latency = [0.3 0.8]; in cluster analysis %j = [0:0.025:0.5]; % (s), 0 = 1st onset %m = [1:12:251]; % (samples) % if cfg.latency = 'all'; in clusteranalysis j = [0:0.05:1.1]; % (s), 0 = -300ms from1st onset m = [1:25:551]; % (samples) pos = stat.posclusterslabelmat == 1; % + clusters neg = (stat.negclusterslabelmat == 1)*(-1); % - clusters for k = 1:length(j)-1; % 20 subplots subplot(4,5,k); cfg = []; cfg.xlim=[j(k) j(k+1)]; cfg.zlim=[-3 3]; pos_int = mean(pos(:,m(k):m(k+1))')'; neg_int = mean(neg(:,m(k):m(k+1))')'; cfg.highlight = find(pos_int ==1 | neg_int == -1); cfg.comment = 'xlim'; cfg.commentpos = 'title'; cfg.layout = egilay; %cfg.rotate =[90]; % ?? rotate by 90 degrees clock-wise topoplotER(cfg,diff_gdav); end % ==================== 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. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 vvw at CALTECH.EDU Wed Jun 20 18:29:20 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Wed, 20 Jun 2007 09:29:20 -0700 Subject: egi2besa2fieldtrip - topoplot layout In-Reply-To: <200706201306.l5KD6GKX039412@l1.ihna.ru> Message-ID: Hi Olga, thanks for your help, I think I got it working now! Virginie At 06:20 AM 6/20/2007, Olga Sysoeva wrote: >Dear Virginie, > >I had the same problem. >Actually, I not understand where the problem comes from, but solve it by >multiplying the coordinates by cos (- 90) and sin (90). See the script >below. >It works good for my data... > >Best Regards, >Olga. > > >%prepare layout >data.elec = >read_fcdc_elec('C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'); >cfg = []; >cfg.rotate = 90; >cfg.elecfile = 'C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'; >mylay2 = prepare_layout(cfg); > >for i=1:69 > mylay2.width (i)= 0.5 >end; > >for i=1:69 > mylay2.height (i)= 0.5 >end; > >x=mylay.pos (:,1); >y=mylay.pos (:,2); >mylay2.pos (:,1)=y; >mylay2.pos (:,2)=-x; > > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Virginie van Wassenhove >Sent: Tuesday, June 19, 2007 10:38 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: [FIELDTRIP] egi2besa2fieldtrip - topoplot layout > >Hi Fieldtripers, > >below find the relevant sample code I am using to plot cluster >results with Fieldtrip release v. 20070514 (latest?). > >I have read previous posts in the discussion but I still bump into >this issue (not sure how old the discussions were). >The recordings were made with an egi system and preprocessed in besa. >Although I am using the prepare_layout function, the layout in >topoplotER (and other plotting tools) needs to be rotated by >90degrees clockwise. >I have tried to use cfg.rotate (in the for loop below, commented >here) but that does not change anything. > >Do you have any suggestions on how to overcome this problem? >Thanks in advance for your help! > >Virginie > >% ==== plot results ==== >cfg = []; >cfg.elecfile = '\CHANNELS_specs\fieldtrip_GSN128.sfp'; >egilay = prepare_layout(cfg); > >diff_gdav = ill_gdav; >diff_gdav.av = ill_gdav.avg-noill_gdav.avg; > >figure; >% if cfg.latency = [0.3 0.8]; in cluster analysis >%j = [0:0.025:0.5]; % (s), 0 = 1st onset >%m = [1:12:251]; % (samples) >% if cfg.latency = 'all'; in clusteranalysis >j = [0:0.05:1.1]; % (s), 0 = -300ms from1st >onset >m = [1:25:551]; % (samples) > >pos = stat.posclusterslabelmat == 1; % + clusters >neg = (stat.negclusterslabelmat == 1)*(-1); % - clusters > >for k = 1:length(j)-1; % 20 subplots > subplot(4,5,k); > cfg = []; > cfg.xlim=[j(k) j(k+1)]; > cfg.zlim=[-3 3]; > pos_int = mean(pos(:,m(k):m(k+1))')'; > neg_int = mean(neg(:,m(k):m(k+1))')'; > cfg.highlight = find(pos_int ==1 | neg_int == -1); > cfg.comment = 'xlim'; > cfg.commentpos = 'title'; > cfg.layout = egilay; > %cfg.rotate =[90]; % ?? rotate by 90 >degrees clock-wise > topoplotER(cfg,diff_gdav); >end >% ==================== > >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. > >---------------------------------- >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. See also >http://listserv.surfnet.nl/archives/fieldtrip.html and >http://www.ru.nl/fcdonders/fieldtrip. 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. From sameer at ANDREW.CMU.EDU Wed Jun 20 22:50:33 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Wed, 20 Jun 2007 16:50:33 -0400 Subject: nonparamteric statistical tests for coherence differences In-Reply-To: <018401c7a492$478f1b90$6501a8c0@fcdonders.nl> Message-ID: Dear Eric, I was trying to adapt the online tutorial for doing statistical non-parametric tests for coherence differences. After using freqstatistcs along the lines spelt out in the tutorial, when in order to generate topoplots, I use the following command: TFR_LLvsRR_050_500_cmb = TFR_LL_050_500_cmb ; TFR_LLvsRR_050_500_cmb.powspctrm = TFR_LL_050_500_cmb.powspctrm - TFR_RR_050_500_cmb.powspctrm ; I get the following Matlab error: ??? Error using ==> minus Array dimensions must match for binary array op. Clearly this is because I have unequal number of trials for the between trials case. As shown by the following. >>size(TFR_RR_050_500_cmb.powspctrm) ans = 129 204 7 10 >> size(TFR_LL_050_500_cmb.powspctrm) ans = 128 204 7 10 And; >> TFR_LL_050_500_cmb TFR_LL_050_500_cmb = label: {204x1 cell} dimord: 'rpt_chan_freq_time' freq: [8 9 10 11 12 13 14] time: [0.0500 0.1000 0.1500 0.2000 0.2500 0.3000 0.3500 0.4000 0.4500 0.5000] powspctrm: [4-D double] cumtapcnt: [128x7 double] cfg: [1x1 struct] grad: [1x1 struct] Now, from my understanding, the non-parametric statistical testing itself doesnt require equal trials (and the fact that freqstatistics worked shows that part is o.k.). So there must be a way to plot the results bypassing the error. What am I missing here? Thanks for your help. Best, sameer On Fri, 1 Jun 2007, Eric Maris wrote: > Hi Sameer, > >> I am looking for Wiki entry or tutorial for doing nonparamteric >> statistical tests for coherence differences (both within trial and >> between trials). > > At this moment, only coherence testing between trials is implemented. > >> >> What I can get is >> > http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu > tori >> al:statistics#3_permutation_tests_for_time-frequency_representations >> which describes how to do the same for TFRs. >> >> I am thinking of attempting using basically the same set of commands, but >> substituting the correct procedure for calculating coherences etc in the >> steps shown is section 3. will that be proper? > > I don't know. Just have a try. My expectation is that copy-pasting will not > be sufficient to get it running. On the other hand, I used the > Fieldtrip-code for all the analyses on which is reported in our JNM-paper on > coherence difference testing. > > I am aware of the fact that the tutorial could be improved with respect to > the testing of coherence differences. > > > Good luck, > > > 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 for your help. >> >> 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. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 vvw at CALTECH.EDU Thu Jun 21 20:44:41 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Thu, 21 Jun 2007 11:44:41 -0700 Subject: tfanalysis - NaN Message-ID: Hello again. I am finding NaN whatever method I use (multitaper and wavelet analysis), yet using a different analysis tool with similar parameters I obtain clean results. epoch length = 1.1 s baseline length = 0.3 s sampling rate = 500Hz I tried several suggestions listed in the previous message list for a similar problem, but none seem to provide reasonable results (aka always NaN). Also tried with different subjects, no particular error otherwise. I am sending a sample script in case someone has a suggestion on this... Thanks for your help once more! Virginie %% ================================================ % TF analysis - MULTITAPER cfg = []; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.output = 'powandcsd'; %cfg.channel = 'all'; cfg.channel = 'E75'; %win_length = 0.128; %win_n = floor(2.*(1.1./win_length)-1); cfg.foi = 1:5:45; %cfg.t_ftimwin = ones(1,win_n).*win_length; cfg.t_ftimwin = 4./cfg.foi; %cfg.toi = -0.3:win_length/2:0.8; cfg.toi = -0.3:0.05:0.8; % cfg.pad = 'maxperlen'; % cfg.keeptrials = 'no'; % cfg.keeptapers ='no'; s08_ill_mult = freqanalysis(cfg,s08_ill); %% ======================== % plot freq data cfg = []; cfg.baseline = [-0.3 0]; cfg.layout = egilay; cfg.zlim = [-0.00001 0.000001]; % a comparer entre participants % warning off % NaN clf %multiplotTFR(cfg,s08_ill_mult); singleplotTFR(cfg,s08_ill_mult); %% ================================================ % TF analysis - wavelet cfg = []; cfg.method = 'wltconvol'; cfg.width = 4; cfg.output = 'pow'; cfg.foi = 1:2:30; cfg.toi = -0.3:0.05:0.8; s14_ill_wvlt = freqanalysis(cfg, s14_ill); %% ======================== cfg = []; cfg.baseline = [-0.3 0]; cfg.zlim = [-1 1]; cfg.showlabels = 'yes'; cfg.layout = egilay; clf multiplotTFR(cfg, s14_ill_wvlt) %% ================================================ 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. From sameer at ANDREW.CMU.EDU Sun Jun 24 21:11:31 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Sun, 24 Jun 2007 15:11:31 -0400 Subject: could not find the statistics function "statfun_indepsamplesZcoh" Message-ID: Hello, In order to do non-parametric statistical testing for coherence differences, I call freqstatistics(cfg, CrossSpectralDensity_1, CrossSpectralDensity_2) with (among other parameters in the configuration) cfg.method = montecarlo and cfg.statistic = indepsamplesZcoh but, ??? Error using ==> statistics_montecarlo at 217 could not find the statistics function "statfun_indepsamplesZcoh" and indeed it does not exist even in the latest version of fieldtrip. Some of the other ['statfun_' cfg.statistic] functions do exist. 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 maris at NICI.RU.NL Sun Jun 24 21:35:57 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Sun, 24 Jun 2007 21:35:57 +0200 Subject: [SPAM] [FIELDTRIP] could not find the statistics function "statfun_indepsamplesZcoh" In-Reply-To: Message-ID: Dear Sameer, > In order to do non-parametric statistical testing for coherence > differences, I call > > freqstatistics(cfg, CrossSpectralDensity_1, CrossSpectralDensity_2) > > with (among other parameters in the configuration) > cfg.method = montecarlo and > cfg.statistic = indepsamplesZcoh > > but, > > ??? Error using ==> statistics_montecarlo at 217 > could not find the statistics function "statfun_indepsamplesZcoh" > > and indeed it does not exist even in the latest version of fieldtrip. You are right. I used this statfun for a paper together with Jan-Mathijs Schoffelen en Pascal Fries. I will add it to Fieldtrip, probably this week. I will send you an email when I have finished the job. 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/ > > Some of the other ['statfun_' cfg.statistic] functions do exist. > > Thanks, > sameer > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip > toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. > See also http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From sameer at ANDREW.CMU.EDU Sun Jun 24 21:37:49 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Sun, 24 Jun 2007 15:37:49 -0400 Subject: [SPAM] [FIELDTRIP] could not find the statistics function "statfun_indepsamplesZcoh" In-Reply-To: <01ad01c7b696$e3bc3320$6501a8c0@fcdonders.nl> Message-ID: thanks Eric. sameer On Sun, 24 Jun 2007, Eric Maris wrote: > Dear Sameer, > > > >> In order to do non-parametric statistical testing for coherence >> differences, I call >> >> freqstatistics(cfg, CrossSpectralDensity_1, CrossSpectralDensity_2) >> >> with (among other parameters in the configuration) >> cfg.method = montecarlo and >> cfg.statistic = indepsamplesZcoh >> >> but, >> >> ??? Error using ==> statistics_montecarlo at 217 >> could not find the statistics function "statfun_indepsamplesZcoh" >> >> and indeed it does not exist even in the latest version of fieldtrip. > > You are right. I used this statfun for a paper together with Jan-Mathijs > Schoffelen en Pascal Fries. I will add it to Fieldtrip, probably this week. > I will send you an email when I have finished the job. > > 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/ > > >> >> Some of the other ['statfun_' cfg.statistic] functions do exist. >> >> Thanks, >> sameer >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the > FieldTrip >> toolbox, to share experiences and to discuss new ideas for MEG and EEG > analysis. >> See also http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > > ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Mon Jun 25 10:19:39 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 25 Jun 2007 10:19:39 +0200 Subject: tfanalysis - NaN In-Reply-To: <20070621184447.E5FE71ABB8@earth-ox.its.caltech.edu> Message-ID: Hi Virginie, the function freqanalysis will return NaNs when a time frequency tile extends beyond a corresponding data segment. One would usually expect a "U" shaped padding of NaNs at the boundaries of any TFR which has longer time windows for lower frequencies. From the cfg options you specify below I can see that you have a data segment of 1.1 seconds length and the moving windows cfg.t_tfimwin are quite long at the low ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = 0.6666 s. Hence the NaNs seem perfectly "normal" in this case. The only way to avoid NaN in the time window of interest (using this type of time-frequency tiling) is to make your epochs longer. Hope this helps, Christian On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: > Hello again. > > I am finding NaN whatever method I use (multitaper and wavelet > analysis), yet using a different analysis tool with similar > parameters I obtain clean results. > epoch length = 1.1 s > baseline length = 0.3 s > sampling rate = 500Hz > > I tried several suggestions listed in the previous message list for > a similar problem, but none seem to provide reasonable results (aka > always NaN). > Also tried with different subjects, no particular error otherwise. > I am sending a sample script in case someone has a suggestion on > this... > Thanks for your help once more! > > Virginie > > %% ================================================ > % TF analysis - MULTITAPER > cfg = []; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.output = 'powandcsd'; > %cfg.channel = 'all'; > cfg.channel = 'E75'; > > %win_length = 0.128; > %win_n = floor(2.*(1.1./win_length)-1); > > cfg.foi = 1:5:45; > %cfg.t_ftimwin = ones(1,win_n).*win_length; > cfg.t_ftimwin = 4./cfg.foi; > %cfg.toi = -0.3:win_length/2:0.8; > cfg.toi = -0.3:0.05:0.8; > > % cfg.pad = 'maxperlen'; > % cfg.keeptrials = 'no'; > % cfg.keeptapers ='no'; > s08_ill_mult = freqanalysis(cfg,s08_ill); > > %% ======================== > % plot freq data > cfg = []; > cfg.baseline = [-0.3 0]; > cfg.layout = egilay; > cfg.zlim = [-0.00001 0.000001]; % a comparer entre > participants > % warning off % NaN > clf > %multiplotTFR(cfg,s08_ill_mult); > singleplotTFR(cfg,s08_ill_mult); > > %% ================================================ > % TF analysis - wavelet > cfg = []; > cfg.method = 'wltconvol'; > cfg.width = 4; > cfg.output = 'pow'; > cfg.foi = 1:2:30; > cfg.toi = -0.3:0.05:0.8; > s14_ill_wvlt = freqanalysis(cfg, s14_ill); > %% ======================== > cfg = []; > cfg.baseline = [-0.3 0]; > cfg.zlim = [-1 1]; > cfg.showlabels = 'yes'; > cfg.layout = egilay; > clf > multiplotTFR(cfg, s14_ill_wvlt) > > %% ================================================ > > > > > > > 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. > ---------------------------------------------------------------------- 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 vvw at CALTECH.EDU Mon Jun 25 19:38:38 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Mon, 25 Jun 2007 10:38:38 -0700 Subject: tfanalysis - NaN In-Reply-To: <6B8DAFB4-88B1-4A86-A617-6D856922821A@fcdonders.ru.nl> Message-ID: Hi Christian, thanks for your inputs. Actually, I have tried different window sizes and frequency parameters (and wavelet, tf tiling,...). I would not expect to obtain NaN for a narrow band in higher frequencies (say 35-45Hz) with 2Hz and 4 cycles resolution with the same epoch but I still do. I'll try with a longer epoch, but I find puzzling that I should still get NaN when the resolution should be sufficient for the computations. Cheers, Virgine At 01:19 AM 6/25/2007, Christian Hesse wrote: >Hi Virginie, > >the function freqanalysis will return NaNs when a time frequency >tile extends beyond a corresponding data segment. One would usually >expect a "U" shaped padding of NaNs at the boundaries of any TFR >which has longer time windows for lower frequencies. From the cfg >options you specify below I can see that you have a data segment of >1.1 seconds length and the moving windows cfg.t_tfimwin are quite >long at the low ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = 0.6666 s. >Hence the NaNs seem perfectly "normal" in this case. The only way to >avoid NaN in the time window of interest (using this type of >time-frequency tiling) is to make your epochs longer. > >Hope this helps, >Christian > > >On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: > >>Hello again. >> >>I am finding NaN whatever method I use (multitaper and wavelet >>analysis), yet using a different analysis tool with similar >>parameters I obtain clean results. >>epoch length = 1.1 s >>baseline length = 0.3 s >>sampling rate = 500Hz >> >>I tried several suggestions listed in the previous message list for >>a similar problem, but none seem to provide reasonable results (aka >>always NaN). >>Also tried with different subjects, no particular error otherwise. >>I am sending a sample script in case someone has a suggestion on this... >>Thanks for your help once more! >> >>Virginie >> >>%% ================================================ >>% TF analysis - MULTITAPER >>cfg = []; >>cfg.method = 'mtmconvol'; >>cfg.taper = 'hanning'; >>cfg.output = 'powandcsd'; >>%cfg.channel = 'all'; >>cfg.channel = 'E75'; >> >>%win_length = 0.128; >>%win_n = floor(2.*(1.1./win_length)-1); >> >>cfg.foi = 1:5:45; >>%cfg.t_ftimwin = ones(1,win_n).*win_length; >>cfg.t_ftimwin = 4./cfg.foi; >>%cfg.toi = -0.3:win_length/2:0.8; >>cfg.toi = -0.3:0.05:0.8; >> >>% cfg.pad = 'maxperlen'; >>% cfg.keeptrials = 'no'; >>% cfg.keeptapers ='no'; >>s08_ill_mult = freqanalysis(cfg,s08_ill); >> >>%% ======================== >>% plot freq data >>cfg = []; >>cfg.baseline = [-0.3 0]; >>cfg.layout = egilay; >>cfg.zlim = [-0.00001 0.000001]; % a comparer entre >>participants >>% warning off % NaN >>clf >>%multiplotTFR(cfg,s08_ill_mult); >>singleplotTFR(cfg,s08_ill_mult); >> >>%% ================================================ >>% TF analysis - wavelet >>cfg = []; >>cfg.method = 'wltconvol'; >>cfg.width = 4; >>cfg.output = 'pow'; >>cfg.foi = 1:2:30; >>cfg.toi = -0.3:0.05:0.8; >>s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>%% ======================== >>cfg = []; >>cfg.baseline = [-0.3 0]; >>cfg.zlim = [-1 1]; >>cfg.showlabels = 'yes'; >>cfg.layout = egilay; >>clf >>multiplotTFR(cfg, s14_ill_wvlt) >> >>%% ================================================ >> >> >> >> >> >> >>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. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD :::::::::::: 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. From c.hesse at FCDONDERS.RU.NL Mon Jun 25 21:49:16 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 25 Jun 2007 21:49:16 +0200 Subject: tfanalysis - NaN In-Reply-To: <20070625173838.B9F9D12CD1@fire-ox.its.caltech.edu> Message-ID: Hi Virginie, > thanks for your inputs. Actually, I have tried different window > sizes and frequency parameters (and wavelet, tf tiling,...). I > would not expect to obtain NaN for a narrow band in higher > frequencies (say 35-45Hz) with 2Hz and 4 cycles resolution with the > same epoch but I still do. > > I'll try with a longer epoch, but I find puzzling that I should > still get NaN when the resolution should be sufficient for the > computations. If these NaNs occur at the edges of the TFR then that could still be explained by the fact that the analysis time windows have been placed in such a way that some of them do not overlap 100% with the signal time axis. The time points in cfg.toi actually specify the middle of the time interval over which the spectral analysis is carried out. Therefore, if the extremes of cfg.toi coincide with the extremes of your epoch time axis then there will always be NaNs in at least the first and last windows at all frequencies. If the NaNs occur also at other points in the TFR then there may be something else going on ... is it the case that the NaNs are confined to the edges (edge regions) of your TFR? Regards, Christian >> Hi Virginie, >> >> the function freqanalysis will return NaNs when a time frequency >> tile extends beyond a corresponding data segment. One would >> usually expect a "U" shaped padding of NaNs at the boundaries of >> any TFR which has longer time windows for lower frequencies. From >> the cfg options you specify below I can see that you have a data >> segment of 1.1 seconds length and the moving windows cfg.t_tfimwin >> are quite long at the low ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = >> 0.6666 s. Hence the NaNs seem perfectly "normal" in this case. The >> only way to avoid NaN in the time window of interest (using this >> type of time-frequency tiling) is to make your epochs longer. >> >> Hope this helps, >> Christian >> >> >> On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >> >>> Hello again. >>> >>> I am finding NaN whatever method I use (multitaper and wavelet >>> analysis), yet using a different analysis tool with similar >>> parameters I obtain clean results. >>> epoch length = 1.1 s >>> baseline length = 0.3 s >>> sampling rate = 500Hz >>> >>> I tried several suggestions listed in the previous message list >>> for a similar problem, but none seem to provide reasonable >>> results (aka always NaN). >>> Also tried with different subjects, no particular error >>> otherwise. I am sending a sample script in case someone has a >>> suggestion on this... >>> Thanks for your help once more! >>> >>> Virginie >>> >>> %% ================================================ >>> % TF analysis - MULTITAPER >>> cfg = []; >>> cfg.method = 'mtmconvol'; >>> cfg.taper = 'hanning'; >>> cfg.output = 'powandcsd'; >>> %cfg.channel = 'all'; >>> cfg.channel = 'E75'; >>> >>> %win_length = 0.128; >>> %win_n = floor(2.*(1.1./win_length)-1); >>> >>> cfg.foi = 1:5:45; >>> %cfg.t_ftimwin = ones(1,win_n).*win_length; >>> cfg.t_ftimwin = 4./cfg.foi; >>> %cfg.toi = -0.3:win_length/2:0.8; >>> cfg.toi = -0.3:0.05:0.8; >>> >>> % cfg.pad = 'maxperlen'; >>> % cfg.keeptrials = 'no'; >>> % cfg.keeptapers ='no'; >>> s08_ill_mult = freqanalysis(cfg,s08_ill); >>> >>> %% ======================== >>> % plot freq data >>> cfg = []; >>> cfg.baseline = [-0.3 0]; >>> cfg.layout = egilay; >>> cfg.zlim = [-0.00001 0.000001]; % a comparer >>> entre participants >>> % warning off % NaN >>> clf >>> %multiplotTFR(cfg,s08_ill_mult); >>> singleplotTFR(cfg,s08_ill_mult); >>> >>> %% ================================================ >>> % TF analysis - wavelet >>> cfg = []; >>> cfg.method = 'wltconvol'; >>> cfg.width = 4; >>> cfg.output = 'pow'; >>> cfg.foi = 1:2:30; >>> cfg.toi = -0.3:0.05:0.8; >>> s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>> %% ======================== >>> cfg = []; >>> cfg.baseline = [-0.3 0]; >>> cfg.zlim = [-1 1]; >>> cfg.showlabels = 'yes'; >>> cfg.layout = egilay; >>> clf >>> multiplotTFR(cfg, s14_ill_wvlt) >>> >>> %% ================================================ >>> >>> >>> >>> >>> >>> >>> 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 gm >>> ail.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 >> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>> listserv.surfnet.nl/archives/fieldtrip.html and >> fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ > > Virginie van Wassenhove, PhD > > :::::::::::: 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. > ---------------------------------------------------------------------- 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 vvw at CALTECH.EDU Mon Jun 25 23:11:45 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Mon, 25 Jun 2007 14:11:45 -0700 Subject: tfanalysis - NaN In-Reply-To: <307AB957-C65C-4E4F-9BDA-28F338AACEE9@fcdonders.ru.nl> Message-ID: Hi Christian >>thanks for your inputs. Actually, I have tried different window >>sizes and frequency parameters (and wavelet, tf tiling,...). I >>would not expect to obtain NaN for a narrow band in higher >>frequencies (say 35-45Hz) with 2Hz and 4 cycles resolution with the >>same epoch but I still do. >> >>I'll try with a longer epoch, but I find puzzling that I should >>still get NaN when the resolution should be sufficient for the computations. > >If these NaNs occur at the edges of the TFR then that could still be >explained by the fact that the analysis time windows have been >placed in such a way that some of them do not overlap 100% with the >signal time axis. The time points in cfg.toi actually specify the >middle of the time interval over which the spectral analysis is >carried out. Therefore, if the extremes of cfg.toi coincide with the >extremes of your epoch time axis then there will always be NaNs in >at least the first and last windows at all frequencies. Yes, I do realize that. >If the NaNs occur also at other points in the TFR then there may be >something else going on ... is it the case that the NaNs are >confined to the edges (edge regions) of your TFR? The entire matrices (cfg.powspctrm) return NaN whether for (i)1.1 secs or 2.4 secs epochs (ii) narrow (25-50) or wide (2-50) bandwidth (iii) short or large cfg. toi (then would expect U shape) Virginie >Regards, >Christian > > >>>Hi Virginie, >>> >>>the function freqanalysis will return NaNs when a time frequency >>>tile extends beyond a corresponding data segment. One would >>>usually expect a "U" shaped padding of NaNs at the boundaries of >>>any TFR which has longer time windows for lower frequencies. From >>>the cfg options you specify below I can see that you have a data >>>segment of 1.1 seconds length and the moving windows cfg.t_tfimwin >>>are quite long at the low ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = >>>0.6666 s. Hence the NaNs seem perfectly "normal" in this case. The >>>only way to avoid NaN in the time window of interest (using this >>>type of time-frequency tiling) is to make your epochs longer. >>> >>>Hope this helps, >>>Christian >>> >>> >>>On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >>> >>>>Hello again. >>>> >>>>I am finding NaN whatever method I use (multitaper and wavelet >>>>analysis), yet using a different analysis tool with similar >>>>parameters I obtain clean results. >>>>epoch length = 1.1 s >>>>baseline length = 0.3 s >>>>sampling rate = 500Hz >>>> >>>>I tried several suggestions listed in the previous message list >>>>for a similar problem, but none seem to provide reasonable >>>>results (aka always NaN). >>>>Also tried with different subjects, no particular error >>>>otherwise. I am sending a sample script in case someone has a >>>>suggestion on this... >>>>Thanks for your help once more! >>>> >>>>Virginie >>>> >>>>%% ================================================ >>>>% TF analysis - MULTITAPER >>>>cfg = []; >>>>cfg.method = 'mtmconvol'; >>>>cfg.taper = 'hanning'; >>>>cfg.output = 'powandcsd'; >>>>%cfg.channel = 'all'; >>>>cfg.channel = 'E75'; >>>> >>>>%win_length = 0.128; >>>>%win_n = floor(2.*(1.1./win_length)-1); >>>> >>>>cfg.foi = 1:5:45; >>>>%cfg.t_ftimwin = ones(1,win_n).*win_length; >>>>cfg.t_ftimwin = 4./cfg.foi; >>>>%cfg.toi = -0.3:win_length/2:0.8; >>>>cfg.toi = -0.3:0.05:0.8; >>>> >>>>% cfg.pad = 'maxperlen'; >>>>% cfg.keeptrials = 'no'; >>>>% cfg.keeptapers ='no'; >>>>s08_ill_mult = freqanalysis(cfg,s08_ill); >>>> >>>>%% ======================== >>>>% plot freq data >>>>cfg = []; >>>>cfg.baseline = [-0.3 0]; >>>>cfg.layout = egilay; >>>>cfg.zlim = [-0.00001 0.000001]; % a comparer >>>>entre participants >>>>% warning off % NaN >>>>clf >>>>%multiplotTFR(cfg,s08_ill_mult); >>>>singleplotTFR(cfg,s08_ill_mult); >>>> >>>>%% ================================================ >>>>% TF analysis - wavelet >>>>cfg = []; >>>>cfg.method = 'wltconvol'; >>>>cfg.width = 4; >>>>cfg.output = 'pow'; >>>>cfg.foi = 1:2:30; >>>>cfg.toi = -0.3:0.05:0.8; >>>>s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>>>%% ======================== >>>>cfg = []; >>>>cfg.baseline = [-0.3 0]; >>>>cfg.zlim = [-1 1]; >>>>cfg.showlabels = 'yes'; >>>>cfg.layout = egilay; >>>>clf >>>>multiplotTFR(cfg, s14_ill_wvlt) >>>> >>>>%% ================================================ >>>> >>>> >>>> >>>> >>>> >>>> >>>>Virginie van Wassenhove, PhD >>>> >>>>:::::::::::: contact info ::::::::::::: >>>>Caltech - Division of Biology >>>>1200 E. California Blvd M/C 139-74 >>>>Pasadena CA 91125 USA >>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>><mailto:vvw at caltech.edu>vvw at caltech.edu >>>><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>W: 626.395.8959 >>>><http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>> >>>>:::::::::::::::::: extras :::::::::::::::::::: >>>><http://www.kiva.org>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>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>and >>>><http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>> >>>---------------------------------------------------------------------- >>>Christian Hesse, PhD, MIEEE >>> >>>F.C. Donders Centre for Cognitive Neuroimaging >>>P.O. Box 9101 >>>NL-6500 HB Nijmegen >>>The Netherlands >>> >>>Tel.: +31 (0)24 36 68293 >>>Fax: +31 (0)24 36 10989 >>> >>>Email: >>><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>Web: >>><http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>---------------------------------------------------------------------- >>> >>> >>> >>> >>>---------------------------------- >>> >>>The aim of this list is to facilitate the discussion between users >>>of the FieldTrip toolbox, to share experiences and to discuss new >>>ideas for MEG and EEG analysis. >>> >>>http://listserv.surfnet.nl/archives/fieldtrip.html >>> >>>http://www.ru.nl/fcdonders/fieldtrip/ >> >>Virginie van Wassenhove, PhD >> >>:::::::::::: 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. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD :::::::::::: 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. From c.hesse at FCDONDERS.RU.NL Mon Jun 25 23:30:48 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 25 Jun 2007 23:30:48 +0200 Subject: tfanalysis - NaN In-Reply-To: <20070625211145.69AEF1AA83@earth-ox.its.caltech.edu> Message-ID: Hi Virginie, >> If the NaNs occur also at other points in the TFR then there may >> be something else going on ... is it the case that the NaNs are >> confined to the edges (edge regions) of your TFR? > > The entire matrices (cfg.powspctrm) return NaN whether for > (i)1.1 secs or 2.4 secs epochs > (ii) narrow (25-50) or wide (2-50) bandwidth > (iii) short or large cfg. toi (then would expect U shape) > That's not good! Does the call to FREQANALYSIS produce any (potentially useful) warnings? Regards, Christian >>>> >>>> Hi Virginie, >>>> >>>> the function freqanalysis will return NaNs when a time frequency >>>> tile extends beyond a corresponding data segment. One would >>>> usually expect a "U" shaped padding of NaNs at the boundaries of >>>> any TFR which has longer time windows for lower frequencies. >>>> From the cfg options you specify below I can see that you have a >>>> data segment of 1.1 seconds length and the moving windows >>>> cfg.t_tfimwin are quite long at the low ffrequencies, e.g., 1 Hz >>>> = 4 s, 6 Hz = 0.6666 s. Hence the NaNs seem perfectly "normal" >>>> in this case. The only way to avoid NaN in the time window of >>>> interest (using this type of time-frequency tiling) is to make >>>> your epochs longer. >>>> >>>> Hope this helps, >>>> Christian >>>> >>>> >>>> On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >>>> >>>>> Hello again. >>>>> >>>>> I am finding NaN whatever method I use (multitaper and wavelet >>>>> analysis), yet using a different analysis tool with similar >>>>> parameters I obtain clean results. >>>>> epoch length = 1.1 s >>>>> baseline length = 0.3 s >>>>> sampling rate = 500Hz >>>>> >>>>> I tried several suggestions listed in the previous message list >>>>> for a similar problem, but none seem to provide reasonable >>>>> results (aka always NaN). >>>>> Also tried with different subjects, no particular error >>>>> otherwise. I am sending a sample script in case someone has a >>>>> suggestion on this... >>>>> Thanks for your help once more! >>>>> >>>>> Virginie >>>>> >>>>> %% ================================================ >>>>> % TF analysis - MULTITAPER >>>>> cfg = []; >>>>> cfg.method = 'mtmconvol'; >>>>> cfg.taper = 'hanning'; >>>>> cfg.output = 'powandcsd'; >>>>> %cfg.channel = 'all'; >>>>> cfg.channel = 'E75'; >>>>> >>>>> %win_length = 0.128; >>>>> %win_n = floor(2.*(1.1./win_length)-1); >>>>> >>>>> cfg.foi = 1:5:45; >>>>> %cfg.t_ftimwin = ones(1,win_n).*win_length; >>>>> cfg.t_ftimwin = 4./cfg.foi; >>>>> %cfg.toi = -0.3:win_length/2:0.8; >>>>> cfg.toi = -0.3:0.05:0.8; >>>>> >>>>> % cfg.pad = 'maxperlen'; >>>>> % cfg.keeptrials = 'no'; >>>>> % cfg.keeptapers ='no'; >>>>> s08_ill_mult = freqanalysis(cfg,s08_ill); >>>>> >>>>> %% ======================== >>>>> % plot freq data >>>>> cfg = []; >>>>> cfg.baseline = [-0.3 0]; >>>>> cfg.layout = egilay; >>>>> cfg.zlim = [-0.00001 0.000001]; % a comparer >>>>> entre participants >>>>> % warning off % NaN >>>>> clf >>>>> %multiplotTFR(cfg,s08_ill_mult); >>>>> singleplotTFR(cfg,s08_ill_mult); >>>>> >>>>> %% ================================================ >>>>> % TF analysis - wavelet >>>>> cfg = []; >>>>> cfg.method = 'wltconvol'; >>>>> cfg.width = 4; >>>>> cfg.output = 'pow'; >>>>> cfg.foi = 1:2:30; >>>>> cfg.toi = -0.3:0.05:0.8; >>>>> s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>>>> %% ======================== >>>>> cfg = []; >>>>> cfg.baseline = [-0.3 0]; >>>>> cfg.zlim = [-1 1]; >>>>> cfg.showlabels = 'yes'; >>>>> cfg.layout = egilay; >>>>> clf >>>>> multiplotTFR(cfg, s14_ill_wvlt) >>>>> >>>>> %% ================================================ >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> Virginie van Wassenhove, PhD >>>>> >>>>> :::::::::::: contact info ::::::::::::: >>>>> Caltech - Division of Biology >>>>> 1200 E. California Blvd M/C 139-74 >>>>> Pasadena CA 91125 USA >>>>> ::::::::::::::::::::::::::::::::::::::::::::::::: >>>>> <mailto:vvw at caltech.edu>>>>> h.edu>vvw at caltech.edu >>>>> <mailto:Virginie.van.Was >>>>> senhove at gmail.com>Virgin >>>>> ie.van.Wassenhove at gmail.com >>>>> W: 626.395.8959 >>>>> <http://www.its.caltech.edu/ >>>>> ~vvw>http://www.its.caltech.edu/~vvw >>>>> >>>>> :::::::::::::::::: extras :::::::::::::::::::: >>>>> <http://www.kiva.org>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 <>>>> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>>>> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>>>> listserv.surfnet.nl/archives/fieldtrip.html and <>>>> www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/ >>>>> fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> ------------------------------------------------------------------- >>>> --- >>>> Christian Hesse, PhD, MIEEE >>>> >>>> F.C. Donders Centre for Cognitive Neuroimaging >>>> P.O. Box 9101 >>>> NL-6500 HB Nijmegen >>>> The Netherlands >>>> >>>> Tel.: +31 (0)24 36 68293 >>>> Fax: +31 (0)24 36 10989 >>>> >>>> Email: >>>> <mailto:c.hesse at fcdonders.ru.nl>>>> ilto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>> Web: <http:// >>>> www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>> ------------------------------------------------------------------- >>>> --- >>>> >>>> >>>> >>>> >>>> ---------------------------------- >>>> >>>> The aim of this list is to facilitate the discussion between >>>> users of the FieldTrip toolbox, to share experiences and to >>>> discuss new ideas for MEG and EEG analysis. >>>> >>>> http:// >>>> listserv.surfnet.nl/archives/fieldtrip.html >>>> >>>> http://www.ru.nl/fcdonders/fieldtrip/ >>> >>> Virginie van Wassenhove, PhD >>> >>> :::::::::::: 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 gm >>> ail.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 >> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>> listserv.surfnet.nl/archives/fieldtrip.html and >> fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ > > Virginie van Wassenhove, PhD > > :::::::::::: 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. > ---------------------------------------------------------------------- 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 vvw at CALTECH.EDU Mon Jun 25 23:54:49 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Mon, 25 Jun 2007 14:54:49 -0700 Subject: tfanalysis - NaN In-Reply-To: Message-ID: >That's not good! Indeed! >Does the call to FREQANALYSIS produce any (potentially useful) warnings? All channels, all trials and all samples are correctly reported. Using the wavelet analysis, there is no apparent warning. Using the multitaper, the warning is that there's only 1 tapper (now the problem is that there's 1 tapper only, even when I greatly reduce the width of a window and extend the length of the epoch...) Are the tf data normalized and how are they normalized? -vv >Regards, >Christian > > > >>>>> >>>>>Hi Virginie, >>>>> >>>>>the function freqanalysis will return NaNs when a time frequency >>>>>tile extends beyond a corresponding data segment. One would >>>>>usually expect a "U" shaped padding of NaNs at the boundaries of >>>>>any TFR which has longer time windows for lower frequencies. >>>>> From the cfg options you specify below I can see that you have >>>>>a data segment of 1.1 seconds length and the moving windows >>>>>cfg.t_tfimwin are quite long at the low ffrequencies, e.g., 1 Hz >>>>>= 4 s, 6 Hz = 0.6666 s. Hence the NaNs seem perfectly "normal" >>>>>in this case. The only way to avoid NaN in the time window of >>>>>interest (using this type of time-frequency tiling) is to make >>>>>your epochs longer. >>>>> >>>>>Hope this helps, >>>>>Christian >>>>> >>>>> >>>>>On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >>>>> >>>>>>Hello again. >>>>>> >>>>>>I am finding NaN whatever method I use (multitaper and wavelet >>>>>>analysis), yet using a different analysis tool with similar >>>>>>parameters I obtain clean results. >>>>>>epoch length = 1.1 s >>>>>>baseline length = 0.3 s >>>>>>sampling rate = 500Hz >>>>>> >>>>>>I tried several suggestions listed in the previous message list >>>>>>for a similar problem, but none seem to provide reasonable >>>>>>results (aka always NaN). >>>>>>Also tried with different subjects, no particular error >>>>>>otherwise. I am sending a sample script in case someone has a >>>>>>suggestion on this... >>>>>>Thanks for your help once more! >>>>>> >>>>>>Virginie >>>>>> >>>>>>%% ================================================ >>>>>>% TF analysis - MULTITAPER >>>>>>cfg = []; >>>>>>cfg.method = 'mtmconvol'; >>>>>>cfg.taper = 'hanning'; >>>>>>cfg.output = 'powandcsd'; >>>>>>%cfg.channel = 'all'; >>>>>>cfg.channel = 'E75'; >>>>>> >>>>>>%win_length = 0.128; >>>>>>%win_n = floor(2.*(1.1./win_length)-1); >>>>>> >>>>>>cfg.foi = 1:5:45; >>>>>>%cfg.t_ftimwin = ones(1,win_n).*win_length; >>>>>>cfg.t_ftimwin = 4./cfg.foi; >>>>>>%cfg.toi = -0.3:win_length/2:0.8; >>>>>>cfg.toi = -0.3:0.05:0.8; >>>>>> >>>>>>% cfg.pad = 'maxperlen'; >>>>>>% cfg.keeptrials = 'no'; >>>>>>% cfg.keeptapers ='no'; >>>>>>s08_ill_mult = freqanalysis(cfg,s08_ill); >>>>>> >>>>>>%% ======================== >>>>>>% plot freq data >>>>>>cfg = []; >>>>>>cfg.baseline = [-0.3 0]; >>>>>>cfg.layout = egilay; >>>>>>cfg.zlim = [-0.00001 0.000001]; % a comparer >>>>>>entre participants >>>>>>% warning off % NaN >>>>>>clf >>>>>>%multiplotTFR(cfg,s08_ill_mult); >>>>>>singleplotTFR(cfg,s08_ill_mult); >>>>>> >>>>>>%% ================================================ >>>>>>% TF analysis - wavelet >>>>>>cfg = []; >>>>>>cfg.method = 'wltconvol'; >>>>>>cfg.width = 4; >>>>>>cfg.output = 'pow'; >>>>>>cfg.foi = 1:2:30; >>>>>>cfg.toi = -0.3:0.05:0.8; >>>>>>s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>>>>>%% ======================== >>>>>>cfg = []; >>>>>>cfg.baseline = [-0.3 0]; >>>>>>cfg.zlim = [-1 1]; >>>>>>cfg.showlabels = 'yes'; >>>>>>cfg.layout = egilay; >>>>>>clf >>>>>>multiplotTFR(cfg, s14_ill_wvlt) >>>>>> >>>>>>%% ================================================ >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>Virginie van Wassenhove, PhD >>>>>> >>>>>>:::::::::::: contact info ::::::::::::: >>>>>>Caltech - Division of Biology >>>>>>1200 E. California Blvd M/C 139-74 >>>>>>Pasadena CA 91125 USA >>>>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>>>><<mailto:vvw at caltech.edu>mailto:vvw at caltech.edu><mailto:vvw at caltech.edu>vvw at caltech.edu >>>>>><<mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>>>W: 626.395.8959 >>>>>><<http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>>>> >>>>>>:::::::::::::::::: extras :::::::::::::::::::: >>>>>><<http://www.kiva.org>http://www.kiva.org>http://www.kiva.org >>>>>><http://www.thehungersite.com>http://www.thehungersite.com/ >>>>>><http://www.agloco.com/r/BBBS1539>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>http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>>>and >>>>>><<http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>>>> >>>>>---------------------------------------------------------------------- >>>>>Christian Hesse, PhD, MIEEE >>>>> >>>>>F.C. Donders Centre for Cognitive Neuroimaging >>>>>P.O. Box 9101 >>>>>NL-6500 HB Nijmegen >>>>>The Netherlands >>>>> >>>>>Tel.: +31 (0)24 36 68293 >>>>>Fax: +31 (0)24 36 10989 >>>>> >>>>>Email: >>>>><<mailto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru.nl><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>>>Web: >>>>><<http://www.fcdonders.ru.nl>http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>>>---------------------------------------------------------------------- >>>>> >>>>> >>>>> >>>>> >>>>>---------------------------------- >>>>> >>>>>The aim of this list is to facilitate the discussion between >>>>>users of the FieldTrip toolbox, to share experiences and to >>>>>discuss new ideas for MEG and EEG analysis. >>>>> >>>>><http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>> >>>>>http://www.ru.nl/fcdonders/fieldtrip/ >>>> >>>>Virginie van Wassenhove, PhD >>>> >>>>:::::::::::: contact info ::::::::::::: >>>>Caltech - Division of Biology >>>>1200 E. California Blvd M/C 139-74 >>>>Pasadena CA 91125 USA >>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>><mailto:vvw at caltech.edu>vvw at caltech.edu >>>><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>W: 626.395.8959 >>>><http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>> >>>>:::::::::::::::::: extras :::::::::::::::::::: >>>><http://www.kiva.org>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>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>and >>>><http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>> >>>---------------------------------------------------------------------- >>>Christian Hesse, PhD, MIEEE >>> >>>F.C. Donders Centre for Cognitive Neuroimaging >>>P.O. Box 9101 >>>NL-6500 HB Nijmegen >>>The Netherlands >>> >>>Tel.: +31 (0)24 36 68293 >>>Fax: +31 (0)24 36 10989 >>> >>>Email: >>><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>Web: >>><http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>---------------------------------------------------------------------- >>> >>> >>> >>> >>>---------------------------------- >>> >>>The aim of this list is to facilitate the discussion between users >>>of the FieldTrip toolbox, to share experiences and to discuss new >>>ideas for MEG and EEG analysis. >>> >>>http://listserv.surfnet.nl/archives/fieldtrip.html >>> >>>http://www.ru.nl/fcdonders/fieldtrip/ >> >>Virginie van Wassenhove, PhD >> >>:::::::::::: 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. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD :::::::::::: 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. From c.hesse at FCDONDERS.RU.NL Tue Jun 26 00:19:18 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Tue, 26 Jun 2007 00:19:18 +0200 Subject: tfanalysis - NaN In-Reply-To: <20070625215511.7216A1AAA6@water-ox.its.caltech.edu> Message-ID: >> Does the call to FREQANALYSIS produce any (potentially useful) >> warnings? > > All channels, all trials and all samples are correctly reported. > Using the wavelet analysis, there is no apparent warning. > Using the multitaper, the warning is that there's only 1 tapper > (now the problem is that there's 1 tapper only, even when I greatly > reduce the width of a window and extend the length of the epoch...) In the configuration options you have specified cfg.taper = 'hanning' which will apply only one (i.e., the hanning) taper to your data. If you want to use multitapers you need to set cfg.taper = 'dpss' or just leave the field it out of the cfg (since multitapers are the default). > Are the tf data normalized and how are they normalized? I'm not really sure what you mean by normalized (the csd is obviously a density) but if there were any divide by zero issues then matlab would be chucking warnings. What happens when you set cfg.output = 'pow'; ? Christian >> >> >>>>>> >>>>>> Hi Virginie, >>>>>> >>>>>> the function freqanalysis will return NaNs when a time >>>>>> frequency tile extends beyond a corresponding data segment. >>>>>> One would usually expect a "U" shaped padding of NaNs at the >>>>>> boundaries of any TFR which has longer time windows for lower >>>>>> frequencies. From the cfg options you specify below I can see >>>>>> that you have a data segment of 1.1 seconds length and the >>>>>> moving windows cfg.t_tfimwin are quite long at the low >>>>>> ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = 0.6666 s. Hence the >>>>>> NaNs seem perfectly "normal" in this case. The only way to >>>>>> avoid NaN in the time window of interest (using this type of >>>>>> time-frequency tiling) is to make your epochs longer. >>>>>> >>>>>> Hope this helps, >>>>>> Christian >>>>>> >>>>>> >>>>>> On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >>>>>> >>>>>>> Hello again. >>>>>>> >>>>>>> I am finding NaN whatever method I use (multitaper and >>>>>>> wavelet analysis), yet using a different analysis tool with >>>>>>> similar parameters I obtain clean results. >>>>>>> epoch length = 1.1 s >>>>>>> baseline length = 0.3 s >>>>>>> sampling rate = 500Hz >>>>>>> >>>>>>> I tried several suggestions listed in the previous message >>>>>>> list for a similar problem, but none seem to provide >>>>>>> reasonable results (aka always NaN). >>>>>>> Also tried with different subjects, no particular error >>>>>>> otherwise. I am sending a sample script in case someone has a >>>>>>> suggestion on this... >>>>>>> Thanks for your help once more! >>>>>>> >>>>>>> Virginie >>>>>>> >>>>>>> %% ================================================ >>>>>>> % TF analysis - MULTITAPER >>>>>>> cfg = []; >>>>>>> cfg.method = 'mtmconvol'; >>>>>>> cfg.taper = 'hanning'; >>>>>>> cfg.output = 'powandcsd'; >>>>>>> %cfg.channel = 'all'; >>>>>>> cfg.channel = 'E75'; >>>>>>> >>>>>>> %win_length = 0.128; >>>>>>> %win_n = floor(2.*(1.1./win_length)-1); >>>>>>> >>>>>>> cfg.foi = 1:5:45; >>>>>>> %cfg.t_ftimwin = ones(1,win_n).*win_length; >>>>>>> cfg.t_ftimwin = 4./cfg.foi; >>>>>>> %cfg.toi = -0.3:win_length/2:0.8; >>>>>>> cfg.toi = -0.3:0.05:0.8; >>>>>>> >>>>>>> % cfg.pad = 'maxperlen'; >>>>>>> % cfg.keeptrials = 'no'; >>>>>>> % cfg.keeptapers ='no'; >>>>>>> s08_ill_mult = freqanalysis(cfg,s08_ill); >>>>>>> >>>>>>> %% ======================== >>>>>>> % plot freq data >>>>>>> cfg = []; >>>>>>> cfg.baseline = [-0.3 0]; >>>>>>> cfg.layout = egilay; >>>>>>> cfg.zlim = [-0.00001 0.000001]; % a comparer >>>>>>> entre participants >>>>>>> % warning off % NaN >>>>>>> clf >>>>>>> %multiplotTFR(cfg,s08_ill_mult); >>>>>>> singleplotTFR(cfg,s08_ill_mult); >>>>>>> >>>>>>> %% ================================================ >>>>>>> % TF analysis - wavelet >>>>>>> cfg = []; >>>>>>> cfg.method = 'wltconvol'; >>>>>>> cfg.width = 4; >>>>>>> cfg.output = 'pow'; >>>>>>> cfg.foi = 1:2:30; >>>>>>> cfg.toi = -0.3:0.05:0.8; >>>>>>> s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>>>>>> %% ======================== >>>>>>> cfg = []; >>>>>>> cfg.baseline = [-0.3 0]; >>>>>>> cfg.zlim = [-1 1]; >>>>>>> cfg.showlabels = 'yes'; >>>>>>> cfg.layout = egilay; >>>>>>> clf >>>>>>> multiplotTFR(cfg, s14_ill_wvlt) >>>>>>> >>>>>>> %% ================================================ >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Virginie van Wassenhove, PhD >>>>>>> >>>>>>> :::::::::::: contact info ::::::::::::: >>>>>>> Caltech - Division of Biology >>>>>>> 1200 E. California Blvd M/C 139-74 >>>>>>> Pasadena CA 91125 USA >>>>>>> ::::::::::::::::::::::::::::::::::::::::::::::::: >>>>>>> <<mailto:vvw at caltech.edu>mailto:vvw at calt >>>>>>> ech.edu><mailto:vvw at caltech.edu>>>>>>> vvw at caltech.edu>vvw at caltech.edu >>>>>>> <<mailto:Virginie.van. >>>>>>> Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><< >>>>>>> mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Was >>>>>>> senhove at gmail.com>Virg >>>>>>> inie.van.Wassenhove at gmail.com >>>>>>> W: 626.395.8959 >>>>>>> <<http://www.its.caltech.edu/ >>>>>>> ~vvw>http://www.its.caltech.edu/~vvw>http:// >>>>>>> www.its.caltech.edu/~vvw >>>>>>> >>>>>>> :::::::::::::::::: extras :::::::::::::::::::: >>>>>>> <<http://www.kiva.org>http:// >>>>>>> www.kiva.org>http://www.kiva.org >>>>>>> <http:// >>>>>>> www.thehungersite.com>http://www.thehungersite.com/ >>>>>>> <http://www.agloco.com/r/ >>>>>>> BBBS1539>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>http:// >>>>>>> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>>>>>> listserv.surfnet.nl/archives/fieldtrip.html and <<>>>>>> www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/ >>>>>>> fieldtrip>http://www.ru.nl/fcdonders/fieldtrip>http:// >>>>>>> www.ru.nl/fcdonders/fieldtrip. >>>>>> >>>>>> ----------------------------------------------------------------- >>>>>> ----- >>>>>> Christian Hesse, PhD, MIEEE >>>>>> >>>>>> F.C. Donders Centre for Cognitive Neuroimaging >>>>>> P.O. Box 9101 >>>>>> NL-6500 HB Nijmegen >>>>>> The Netherlands >>>>>> >>>>>> Tel.: +31 (0)24 36 68293 >>>>>> Fax: +31 (0)24 36 10989 >>>>>> >>>>>> Email: >>>>>> <<mailto:c.hesse at fcdonders.ru.nl> >>>>>> mailto:c.hesse at fcdonders.ru.nl><m >>>>>> ailto:c.hesse at fcdonders.ru.nl>c.h >>>>>> esse at fcdonders.ru.nl >>>>>> Web: <<http:// >>>>>> www.fcdonders.ru.nl>http:// >>>>>> www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>>>> ----------------------------------------------------------------- >>>>>> ----- >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ---------------------------------- >>>>>> >>>>>> The aim of this list is to facilitate the discussion between >>>>>> users of the FieldTrip toolbox, to share experiences and to >>>>>> discuss new ideas for MEG and EEG analysis. >>>>>> >>>>>> <http:// >>>>>> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>>>>> listserv.surfnet.nl/archives/fieldtrip.html >>>>>> >>>>>> http://www.ru.nl/ >>>>>> fcdonders/fieldtrip/ >>>>> >>>>> Virginie van Wassenhove, PhD >>>>> >>>>> :::::::::::: contact info ::::::::::::: >>>>> Caltech - Division of Biology >>>>> 1200 E. California Blvd M/C 139-74 >>>>> Pasadena CA 91125 USA >>>>> ::::::::::::::::::::::::::::::::::::::::::::::::: >>>>> <mailto:vvw at caltech.edu>>>>> h.edu>vvw at caltech.edu >>>>> <mailto:Virginie.van.Was >>>>> senhove at gmail.com>Virgin >>>>> ie.van.Wassenhove at gmail.com >>>>> W: 626.395.8959 >>>>> <http://www.its.caltech.edu/ >>>>> ~vvw>http://www.its.caltech.edu/~vvw >>>>> >>>>> :::::::::::::::::: extras :::::::::::::::::::: >>>>> <http://www.kiva.org>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 <>>>> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>>>> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>>>> listserv.surfnet.nl/archives/fieldtrip.html and <>>>> www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/ >>>>> fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>>> >>>> ------------------------------------------------------------------- >>>> --- >>>> Christian Hesse, PhD, MIEEE >>>> >>>> F.C. Donders Centre for Cognitive Neuroimaging >>>> P.O. Box 9101 >>>> NL-6500 HB Nijmegen >>>> The Netherlands >>>> >>>> Tel.: +31 (0)24 36 68293 >>>> Fax: +31 (0)24 36 10989 >>>> >>>> Email: >>>> <mailto:c.hesse at fcdonders.ru.nl>>>> ilto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>> Web: <http:// >>>> www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>> ------------------------------------------------------------------- >>>> --- >>>> >>>> >>>> >>>> >>>> ---------------------------------- >>>> >>>> The aim of this list is to facilitate the discussion between >>>> users of the FieldTrip toolbox, to share experiences and to >>>> discuss new ideas for MEG and EEG analysis. >>>> >>>> http:// >>>> listserv.surfnet.nl/archives/fieldtrip.html >>>> >>>> http://www.ru.nl/fcdonders/fieldtrip/ >>> >>> Virginie van Wassenhove, PhD >>> >>> :::::::::::: 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 gm >>> ail.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 >> listserv.surfnet.nl/archives/fieldtrip.html>http:// >>> listserv.surfnet.nl/archives/fieldtrip.html and >> fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. >> >> http://listserv.surfnet.nl/archives/fieldtrip.html >> >> http://www.ru.nl/fcdonders/fieldtrip/ > > Virginie van Wassenhove, PhD > > :::::::::::: 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. > ---------------------------------------------------------------------- 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 vvw at CALTECH.EDU Tue Jun 26 06:25:14 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Mon, 25 Jun 2007 21:25:14 -0700 Subject: tfanalysis - NaN In-Reply-To: <79C8D694-E710-4D43-8C7A-228A5DD69473@fcdonders.ru.nl> Message-ID: Hi Christian, >In the configuration options you have specified cfg.taper = >'hanning' which will apply only one (i.e., the hanning) taper to >your data. If you want to use multitapers you need to set cfg.taper >= 'dpss' or just leave the field it out of the cfg (since >multitapers are the default). Ah yes, sorry, I have been playing around with most parameters so both 'hanning' and 'dpss' lead to the same result (and other windows and wavelet analysis). >I'm not really sure what you mean by normalized (the csd is >obviously a density) but if there were any divide by zero issues >then matlab would be chucking warnings. What happens when you set >cfg.output = 'pow'; ? Same thing whether I use 'pow' or 'powandcsd'. So I meant 'pow' normalization (I assume it's baseline corrected on the pre-stimulus interval?). Since I imported raw data from besa (as .dat files) there might be an error in the previous specifications / preprocessing. I don't see otherwise see any major confound in the tf analysis... I will look some more into that part. Thanks for your help! -vv >>>>>>>Hi Virginie, >>>>>>> >>>>>>>the function freqanalysis will return NaNs when a time >>>>>>>frequency tile extends beyond a corresponding data segment. >>>>>>>One would usually expect a "U" shaped padding of NaNs at the >>>>>>>boundaries of any TFR which has longer time windows for lower >>>>>>>frequencies. From the cfg options you specify below I can see >>>>>>>that you have a data segment of 1.1 seconds length and the >>>>>>>moving windows cfg.t_tfimwin are quite long at the low >>>>>>>ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = 0.6666 s. Hence the >>>>>>>NaNs seem perfectly "normal" in this case. The only way to >>>>>>>avoid NaN in the time window of interest (using this type of >>>>>>>time-frequency tiling) is to make your epochs longer. >>>>>>> >>>>>>>Hope this helps, >>>>>>>Christian >>>>>>> >>>>>>> >>>>>>>On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >>>>>>> >>>>>>>>Hello again. >>>>>>>> >>>>>>>>I am finding NaN whatever method I use (multitaper and >>>>>>>>wavelet analysis), yet using a different analysis tool with >>>>>>>>similar parameters I obtain clean results. >>>>>>>>epoch length = 1.1 s >>>>>>>>baseline length = 0.3 s >>>>>>>>sampling rate = 500Hz >>>>>>>> >>>>>>>>I tried several suggestions listed in the previous message >>>>>>>>list for a similar problem, but none seem to provide >>>>>>>>reasonable results (aka always NaN). >>>>>>>>Also tried with different subjects, no particular error >>>>>>>>otherwise. I am sending a sample script in case someone has a >>>>>>>>suggestion on this... >>>>>>>>Thanks for your help once more! >>>>>>>> >>>>>>>>Virginie >>>>>>>> >>>>>>>>%% ================================================ >>>>>>>>% TF analysis - MULTITAPER >>>>>>>>cfg = []; >>>>>>>>cfg.method = 'mtmconvol'; >>>>>>>>cfg.taper = 'hanning'; >>>>>>>>cfg.output = 'powandcsd'; >>>>>>>>%cfg.channel = 'all'; >>>>>>>>cfg.channel = 'E75'; >>>>>>>> >>>>>>>>%win_length = 0.128; >>>>>>>>%win_n = floor(2.*(1.1./win_length)-1); >>>>>>>> >>>>>>>>cfg.foi = 1:5:45; >>>>>>>>%cfg.t_ftimwin = ones(1,win_n).*win_length; >>>>>>>>cfg.t_ftimwin = 4./cfg.foi; >>>>>>>>%cfg.toi = -0.3:win_length/2:0.8; >>>>>>>>cfg.toi = -0.3:0.05:0.8; >>>>>>>> >>>>>>>>% cfg.pad = 'maxperlen'; >>>>>>>>% cfg.keeptrials = 'no'; >>>>>>>>% cfg.keeptapers ='no'; >>>>>>>>s08_ill_mult = freqanalysis(cfg,s08_ill); >>>>>>>> >>>>>>>>%% ======================== >>>>>>>>% plot freq data >>>>>>>>cfg = []; >>>>>>>>cfg.baseline = [-0.3 0]; >>>>>>>>cfg.layout = egilay; >>>>>>>>cfg.zlim = [-0.00001 0.000001]; % a comparer >>>>>>>>entre participants >>>>>>>>% warning off % NaN >>>>>>>>clf >>>>>>>>%multiplotTFR(cfg,s08_ill_mult); >>>>>>>>singleplotTFR(cfg,s08_ill_mult); >>>>>>>> >>>>>>>>%% ================================================ >>>>>>>>% TF analysis - wavelet >>>>>>>>cfg = []; >>>>>>>>cfg.method = 'wltconvol'; >>>>>>>>cfg.width = 4; >>>>>>>>cfg.output = 'pow'; >>>>>>>>cfg.foi = 1:2:30; >>>>>>>>cfg.toi = -0.3:0.05:0.8; >>>>>>>>s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>>>>>>>%% ======================== >>>>>>>>cfg = []; >>>>>>>>cfg.baseline = [-0.3 0]; >>>>>>>>cfg.zlim = [-1 1]; >>>>>>>>cfg.showlabels = 'yes'; >>>>>>>>cfg.layout = egilay; >>>>>>>>clf >>>>>>>>multiplotTFR(cfg, s14_ill_wvlt) >>>>>>>> >>>>>>>>%% ================================================ >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>Virginie van Wassenhove, PhD >>>>>>>> >>>>>>>>:::::::::::: contact info ::::::::::::: >>>>>>>>Caltech - Division of Biology >>>>>>>>1200 E. California Blvd M/C 139-74 >>>>>>>>Pasadena CA 91125 USA >>>>>>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>>>>>><<<mailto:vvw at caltech.edu>mailto:vvw at caltech.edu>mailto:vvw at caltech.edu><<mailto:vvw at caltech.edu>mailto:vvw at caltech.edu><mailto:vvw at caltech.edu>vvw at caltech.edu >>>>>>>><<<mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><<mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>>>>>W: 626.395.8959 >>>>>>>><<<http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>>>>>> >>>>>>>>:::::::::::::::::: extras :::::::::::::::::::: >>>>>>>><<<http://www.kiva.org>http://www.kiva.org>http://www.kiva.org>http://www.kiva.org >>>>>>>><<http://www.thehungersite.com>http://www.thehungersite.com>http://www.thehungersite.com/ >>>>>>>><<http://www.agloco.com/r/BBBS1539>http://www.agloco.com/r/BBBS1539>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>http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>>>>>and >>>>>>>><<<http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>>>>>> >>>>>>>---------------------------------------------------------------------- >>>>>>>Christian Hesse, PhD, MIEEE >>>>>>> >>>>>>>F.C. Donders Centre for Cognitive Neuroimaging >>>>>>>P.O. Box 9101 >>>>>>>NL-6500 HB Nijmegen >>>>>>>The Netherlands >>>>>>> >>>>>>>Tel.: +31 (0)24 36 68293 >>>>>>>Fax: +31 (0)24 36 10989 >>>>>>> >>>>>>>Email: >>>>>>><<<mailto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru.nl><<mailto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru.nl><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>>>>>Web: >>>>>>><<<http://www.fcdonders.ru.nl>http://www.fcdonders.ru.nl>http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>>>>>---------------------------------------------------------------------- >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>---------------------------------- >>>>>>> >>>>>>>The aim of this list is to facilitate the discussion between >>>>>>>users of the FieldTrip toolbox, to share experiences and to >>>>>>>discuss new ideas for MEG and EEG analysis. >>>>>>> >>>>>>><<http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>>>> >>>>>>><http://www.ru.nl/fcdonders/fieldtrip/>http://www.ru.nl/fcdonders/fieldtrip/ >>>>>> >>>>>>Virginie van Wassenhove, PhD >>>>>> >>>>>>:::::::::::: contact info ::::::::::::: >>>>>>Caltech - Division of Biology >>>>>>1200 E. California Blvd M/C 139-74 >>>>>>Pasadena CA 91125 USA >>>>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>>>><<mailto:vvw at caltech.edu>mailto:vvw at caltech.edu><mailto:vvw at caltech.edu>vvw at caltech.edu >>>>>><<mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>>>W: 626.395.8959 >>>>>><<http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>>>> >>>>>>:::::::::::::::::: extras :::::::::::::::::::: >>>>>><<http://www.kiva.org>http://www.kiva.org>http://www.kiva.org >>>>>><http://www.thehungersite.com>http://www.thehungersite.com/ >>>>>><http://www.agloco.com/r/BBBS1539>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>http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>>>and >>>>>><<http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>>>> >>>>>---------------------------------------------------------------------- >>>>>Christian Hesse, PhD, MIEEE >>>>> >>>>>F.C. Donders Centre for Cognitive Neuroimaging >>>>>P.O. Box 9101 >>>>>NL-6500 HB Nijmegen >>>>>The Netherlands >>>>> >>>>>Tel.: +31 (0)24 36 68293 >>>>>Fax: +31 (0)24 36 10989 >>>>> >>>>>Email: >>>>><<mailto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru.nl><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>>>Web: >>>>><<http://www.fcdonders.ru.nl>http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>>>---------------------------------------------------------------------- >>>>> >>>>> >>>>> >>>>> >>>>>---------------------------------- >>>>> >>>>>The aim of this list is to facilitate the discussion between >>>>>users of the FieldTrip toolbox, to share experiences and to >>>>>discuss new ideas for MEG and EEG analysis. >>>>> >>>>><http://listserv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>> >>>>>http://www.ru.nl/fcdonders/fieldtrip/ >>>> >>>>Virginie van Wassenhove, PhD >>>> >>>>:::::::::::: contact info ::::::::::::: >>>>Caltech - Division of Biology >>>>1200 E. California Blvd M/C 139-74 >>>>Pasadena CA 91125 USA >>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>><mailto:vvw at caltech.edu>vvw at caltech.edu >>>><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>W: 626.395.8959 >>>><http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>> >>>>:::::::::::::::::: extras :::::::::::::::::::: >>>><http://www.kiva.org>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>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>and >>>><http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fieldtrip. >>> >>>---------------------------------------------------------------------- >>>Christian Hesse, PhD, MIEEE >>> >>>F.C. Donders Centre for Cognitive Neuroimaging >>>P.O. Box 9101 >>>NL-6500 HB Nijmegen >>>The Netherlands >>> >>>Tel.: +31 (0)24 36 68293 >>>Fax: +31 (0)24 36 10989 >>> >>>Email: >>><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>Web: >>><http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>---------------------------------------------------------------------- >>> >>> >>> >>> >>>---------------------------------- >>> >>>The aim of this list is to facilitate the discussion between users >>>of the FieldTrip toolbox, to share experiences and to discuss new >>>ideas for MEG and EEG analysis. >>> >>>http://listserv.surfnet.nl/archives/fieldtrip.html >>> >>>http://www.ru.nl/fcdonders/fieldtrip/ >> >>Virginie van Wassenhove, PhD >> >>:::::::::::: 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. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD :::::::::::: 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. From olga at GRAPHICMIND.INFO Tue Jun 26 08:43:06 2007 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Tue, 26 Jun 2007 10:43:06 +0400 Subject: clusterrandomization-alphavalue Message-ID: Dear Fieldtrippers, I'd like to clarify the output parameters of clustrandomization. What does clusrand.critvals means. How it depends on chosen alpha threshold (usually 0.05). As I looked through the script, it is the only parameters which depends on alpha. Do I need to use it somehow to choose the significant clusters? Or can I just check the clusrand.pos(neg)clusters.pval parameters to identify significant clusters? Best Regards, Olga. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Jan.Schoffelen at FCDONDERS.RU.NL Tue Jun 26 10:00:52 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Tue, 26 Jun 2007 10:00:52 +0200 Subject: tfanalysis - NaN In-Reply-To: <20070626042513.F20D712C9A@wood-ox.its.caltech.edu> Message-ID: Dear V and C, Sorry to hop in into this discussion, but did you (V) explicitly check the time-axes present in your data? In other words: there is a field in the data structure (data.time) which specifies the time axis for each trial. According to this axis, windows (cfg.t_ftimwins) are placed around the (cfg.tois) you specify in your configuration. If there is a discrepancy between cfg.toi, and data.time, NaNny things could happen. Because you imported your files from BESA, something might be going on here. Yours, Jan-M -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Virginie van Wassenhove Sent: Tuesday, June 26, 2007 6:25 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] tfanalysis - NaN Hi Christian, >In the configuration options you have specified cfg.taper = >'hanning' which will apply only one (i.e., the hanning) taper to >your data. If you want to use multitapers you need to set cfg.taper >= 'dpss' or just leave the field it out of the cfg (since >multitapers are the default). Ah yes, sorry, I have been playing around with most parameters so both 'hanning' and 'dpss' lead to the same result (and other windows and wavelet analysis). >I'm not really sure what you mean by normalized (the csd is >obviously a density) but if there were any divide by zero issues >then matlab would be chucking warnings. What happens when you set >cfg.output = 'pow'; ? Same thing whether I use 'pow' or 'powandcsd'. So I meant 'pow' normalization (I assume it's baseline corrected on the pre-stimulus interval?). Since I imported raw data from besa (as .dat files) there might be an error in the previous specifications / preprocessing. I don't see otherwise see any major confound in the tf analysis... I will look some more into that part. Thanks for your help! -vv >>>>>>>Hi Virginie, >>>>>>> >>>>>>>the function freqanalysis will return NaNs when a time >>>>>>>frequency tile extends beyond a corresponding data segment. >>>>>>>One would usually expect a "U" shaped padding of NaNs at the >>>>>>>boundaries of any TFR which has longer time windows for lower >>>>>>>frequencies. From the cfg options you specify below I can see >>>>>>>that you have a data segment of 1.1 seconds length and the >>>>>>>moving windows cfg.t_tfimwin are quite long at the low >>>>>>>ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = 0.6666 s. Hence the >>>>>>>NaNs seem perfectly "normal" in this case. The only way to >>>>>>>avoid NaN in the time window of interest (using this type of >>>>>>>time-frequency tiling) is to make your epochs longer. >>>>>>> >>>>>>>Hope this helps, >>>>>>>Christian >>>>>>> >>>>>>> >>>>>>>On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: >>>>>>> >>>>>>>>Hello again. >>>>>>>> >>>>>>>>I am finding NaN whatever method I use (multitaper and >>>>>>>>wavelet analysis), yet using a different analysis tool with >>>>>>>>similar parameters I obtain clean results. >>>>>>>>epoch length = 1.1 s >>>>>>>>baseline length = 0.3 s >>>>>>>>sampling rate = 500Hz >>>>>>>> >>>>>>>>I tried several suggestions listed in the previous message >>>>>>>>list for a similar problem, but none seem to provide >>>>>>>>reasonable results (aka always NaN). >>>>>>>>Also tried with different subjects, no particular error >>>>>>>>otherwise. I am sending a sample script in case someone has a >>>>>>>>suggestion on this... >>>>>>>>Thanks for your help once more! >>>>>>>> >>>>>>>>Virginie >>>>>>>> >>>>>>>>%% ================================================ >>>>>>>>% TF analysis - MULTITAPER >>>>>>>>cfg = []; >>>>>>>>cfg.method = 'mtmconvol'; >>>>>>>>cfg.taper = 'hanning'; >>>>>>>>cfg.output = 'powandcsd'; >>>>>>>>%cfg.channel = 'all'; >>>>>>>>cfg.channel = 'E75'; >>>>>>>> >>>>>>>>%win_length = 0.128; >>>>>>>>%win_n = floor(2.*(1.1./win_length)-1); >>>>>>>> >>>>>>>>cfg.foi = 1:5:45; >>>>>>>>%cfg.t_ftimwin = ones(1,win_n).*win_length; >>>>>>>>cfg.t_ftimwin = 4./cfg.foi; >>>>>>>>%cfg.toi = -0.3:win_length/2:0.8; >>>>>>>>cfg.toi = -0.3:0.05:0.8; >>>>>>>> >>>>>>>>% cfg.pad = 'maxperlen'; >>>>>>>>% cfg.keeptrials = 'no'; >>>>>>>>% cfg.keeptapers ='no'; >>>>>>>>s08_ill_mult = freqanalysis(cfg,s08_ill); >>>>>>>> >>>>>>>>%% ======================== >>>>>>>>% plot freq data >>>>>>>>cfg = []; >>>>>>>>cfg.baseline = [-0.3 0]; >>>>>>>>cfg.layout = egilay; >>>>>>>>cfg.zlim = [-0.00001 0.000001]; % a comparer >>>>>>>>entre participants >>>>>>>>% warning off % NaN >>>>>>>>clf >>>>>>>>%multiplotTFR(cfg,s08_ill_mult); >>>>>>>>singleplotTFR(cfg,s08_ill_mult); >>>>>>>> >>>>>>>>%% ================================================ >>>>>>>>% TF analysis - wavelet >>>>>>>>cfg = []; >>>>>>>>cfg.method = 'wltconvol'; >>>>>>>>cfg.width = 4; >>>>>>>>cfg.output = 'pow'; >>>>>>>>cfg.foi = 1:2:30; >>>>>>>>cfg.toi = -0.3:0.05:0.8; >>>>>>>>s14_ill_wvlt = freqanalysis(cfg, s14_ill); >>>>>>>>%% ======================== >>>>>>>>cfg = []; >>>>>>>>cfg.baseline = [-0.3 0]; >>>>>>>>cfg.zlim = [-1 1]; >>>>>>>>cfg.showlabels = 'yes'; >>>>>>>>cfg.layout = egilay; >>>>>>>>clf >>>>>>>>multiplotTFR(cfg, s14_ill_wvlt) >>>>>>>> >>>>>>>>%% ================================================ >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>Virginie van Wassenhove, PhD >>>>>>>> >>>>>>>>:::::::::::: contact info ::::::::::::: >>>>>>>>Caltech - Division of Biology >>>>>>>>1200 E. California Blvd M/C 139-74 >>>>>>>>Pasadena CA 91125 USA >>>>>>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>>>>>><<<mailto:vvw at caltech.edu>mailto:vvw at caltech .edu>mailto:vvw at caltech.edu><<mailto:vvw at caltech.edu >mailto:vvw at caltech.edu><mailto:vvw at caltech.edu>vvw at caltech.edu >>>>>>>><<<mailto:Virginie.van.Was senhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.v an.Wassenhove at gmail.com><<mailto:V irginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><< mailto:Virginie.van.Wassenhove at gmail.com>mailto:Virginie.van.Wassenhove at gmai l.com>Virginie.van.Wassenhove at gmai l.com >>>>>>>>W: 626.395.8959 >>>>>>>><<<http://www.its.caltech.edu/~vvw> http://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw>http://www.i ts.caltech.edu/~vvw >>>>>>>> >>>>>>>>:::::::::::::::::: extras :::::::::::::::::::: >>>>>>>><<<http://www.kiva.org>http://www.kiva.org>http ://www.kiva.org>http://www.kiva.org >>>>>>>><<http://www.thehungersite.com>http:// www.thehungersite.com>http://www.thehungersite.com/ >>>>>>>><<http://www.agloco.com/r/BBBS1539 >http://www.agloco.com/r/BBBS1539>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://listse rv.surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fi eldtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html>http://lists erv.surfnet.nl/archives/fieldtrip.html >>>>>>>>and >>>>>>>><<<http://www.ru.nl/fcdonders/ fieldtrip>http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/fi eldtrip>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: >>>>>>><<<mailto:c.hesse at fcdonders.ru.nl>mai lto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru.nl><<mailto:c.hesse at fcdonders.ru.nl>mailto:c.hesse at fcdonders.ru. nl><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>>>>>Web: >>>>>>><<<http://www.fcdonders.ru.nl>http://www. fcdonders.ru.nl>http://www.fcdonders.ru.nl>www.fcdonders.ru.nl >>>>>>>--------------------------------------------------------------------- - >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>---------------------------------- >>>>>>> >>>>>>>The aim of this list is to facilitate the discussion between >>>>>>>users of the FieldTrip toolbox, to share experiences and to >>>>>>>discuss new ideas for MEG and EEG analysis. >>>>>>> >>>>>>><<http://listserv .surfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fiel dtrip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>>>> >>>>>>><http://www.ru.nl/fcdonders/fi eldtrip/>http://www.ru.nl/fcdonders/fieldtrip/ >>>>>> >>>>>>Virginie van Wassenhove, PhD >>>>>> >>>>>>:::::::::::: contact info ::::::::::::: >>>>>>Caltech - Division of Biology >>>>>>1200 E. California Blvd M/C 139-74 >>>>>>Pasadena CA 91125 USA >>>>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>>>><<mailto:vvw at caltech.edu>mailto:vvw at caltech.ed u><mailto:vvw at caltech.edu>vv w at caltech.edu >>>>>><<mailto:Virginie.van.Wassen hove at gmail.com>mailto:Virginie.van.Wassenhove at gmail.com><mailto:Virginie.van.Wassenhove at gmail.com>Virginie.van.Wassenhove at gmail.com >>>>>>W: 626.395.8959 >>>>>><<http://www.its.caltech.edu/~vvw>htt p://www.its.caltech.edu/~vvw>http://www.its.caltech.edu/~vvw >>>>>> >>>>>>:::::::::::::::::: extras :::::::::::::::::::: >>>>>><<http://www.kiva.org>http://www.kiva.org>http:// www.kiva.org >>>>>><http://www.thehungersite.com>http://www .thehungersite.com/ >>>>>><http://www.agloco.com/r/BBBS1539>ht tp://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>http://listserv.surfnet.nl/archives/field trip.html>http://listserv.surfnet.nl/archives/fieldtrip.html >>>>>>and >>>>>><<http://www.ru.nl/fcdonders/fie ldtrip>http://www.ru.nl/fcdonders/fieldtrip>http://www.ru.nl/fcdonders/field trip. >>>>> >>>>>---------------------------------------------------------------------- >>>>>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: >>>>><<mailto:c.hesse at fcdonders.ru.nl>mailto :c.hesse at fcdonders.ru.nl><mailto:c.hesse at fcd onders.ru.nl>c.hesse at fcdonders.ru.nl >>>>>Web: >>>>><<http://www.fcdonders.ru.nl>http://www.fcd onders.ru.nl>www.fcdonders.ru.nl >>>>>---------------------------------------------------------------------- >>>>> >>>>> >>>>> >>>>> >>>>>---------------------------------- >>>>> >>>>>The aim of this list is to facilitate the discussion between >>>>>users of the FieldTrip toolbox, to share experiences and to >>>>>discuss new ideas for MEG and EEG analysis. >>>>> >>>>><http://listserv.su rfnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtr ip.html >>>>> >>>>>http://www.ru.nl/fcdonders/field trip/ >>>> >>>>Virginie van Wassenhove, PhD >>>> >>>>:::::::::::: contact info ::::::::::::: >>>>Caltech - Division of Biology >>>>1200 E. California Blvd M/C 139-74 >>>>Pasadena CA 91125 USA >>>>::::::::::::::::::::::::::::::::::::::::::::::::: >>>><mailto:vvw at caltech.edu> vvw at caltech.edu >>>><mailto:Virginie.van.Wassenhov e at gmail.com>Virginie.van.Wassenhov e at gmail.com >>>>W: 626.395.8959 >>>><http://www.its.caltech.edu/~vvw>http:/ /www.its.caltech.edu/~vvw >>>> >>>>:::::::::::::::::: extras :::::::::::::::::::: >>>><http://www.kiva.org>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.sur fnet.nl/archives/fieldtrip.html>http://listserv.surfnet.nl/archives/fieldtri p.html >>>>and >>>><http://www.ru.nl/fcdonders/fieldt rip>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: >>><mailto:c.hesse at fcdonders.ru.nl>c.hesse at fcdonders.ru.nl >>>Web: >>><http://www.fcdonders.ru.nl>www.fcdonders.ru. nl >>>---------------------------------------------------------------------- >>> >>> >>> >>> >>>---------------------------------- >>> >>>The aim of this list is to facilitate the discussion between users >>>of the FieldTrip toolbox, to share experiences and to discuss new >>>ideas for MEG and EEG analysis. >>> >>>http://listserv.surfn et.nl/archives/fieldtrip.html >>> >>>http://www.ru.nl/fcdonders/fieldtrip/ >> >>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.co m >>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.surfne t.nl/archives/fieldtrip.html >>and http://www.ru.nl/fcdonders/fieldtrip. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD :::::::::::: 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. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Jun 26 10:11:32 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Tue, 26 Jun 2007 10:11:32 +0200 Subject: clusterrandomization-alphavalue In-Reply-To: <00a601c7b7bd$40dd10c0$51210ad9@acer027f9640b7> Message-ID: Dear Olga, I'd like to clarify the output parameters of clustrandomization. What does clusrand.critvals means. How it depends on chosen alpha threshold (usually 0.05). As I looked through the script, it is the only parameters which depends on alpha. Do I need to use it somehow to choose the significant clusters? Or can I just check the clusrand.pos(neg)clusters.pval parameters to identify significant clusters? Yes, you can just check the clusrand.pos(neg)clusters.pvals. The two pieces of information are redundant: a clusrand.pos(neg)clusters.pval is less than alpha it the cluster-level statistic of this cluster exceeds clusrand.critval. 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/ ---------------------------------- The aim of this list 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 olga at GRAPHICMIND.INFO Tue Jun 26 10:36:55 2007 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Tue, 26 Jun 2007 12:36:55 +0400 Subject: clusterrandomization-alphavalue Message-ID: Thank you Eric, As I understand, the cfg.alpha is also redundant as input information. Yes? Best Regards, Olga ----- Original Message ----- From: Eric Maris To: FIELDTRIP at NIC.SURFNET.NL Sent: Tuesday, June 26, 2007 12:11 PM Subject: Re: [FIELDTRIP] clusterrandomization-alphavalue Dear Olga, I'd like to clarify the output parameters of clustrandomization. What does clusrand.critvals means. How it depends on chosen alpha threshold (usually 0.05). As I looked through the script, it is the only parameters which depends on alpha. Do I need to use it somehow to choose the significant clusters? Or can I just check the clusrand.pos(neg)clusters.pval parameters to identify significant clusters? Yes, you can just check the clusrand.pos(neg)clusters.pvals. The two pieces of information are redundant: a clusrand.pos(neg)clusters.pval is less than alpha it the cluster-level statistic of this cluster exceeds clusrand.critval. 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/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maris at NICI.RU.NL Tue Jun 26 11:39:38 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Tue, 26 Jun 2007 11:39:38 +0200 Subject: clusterrandomization-alphavalue In-Reply-To: <00cc01c7b7cd$27488030$51210ad9@acer027f9640b7> Message-ID: Dear Olga, As I understand, the cfg.alpha is also redundant as input information. Yes? If you omit cfg.alpha, then clusrand.critval will be computed using the default value cfg.alpha=0.05. 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/ Best Regards, Olga ----- Original Message ----- From: Eric Maris To: FIELDTRIP at NIC.SURFNET.NL Sent: Tuesday, June 26, 2007 12:11 PM Subject: Re: [FIELDTRIP] clusterrandomization-alphavalue Dear Olga, I'd like to clarify the output parameters of clustrandomization. What does clusrand.critvals means. How it depends on chosen alpha threshold (usually 0.05). As I looked through the script, it is the only parameters which depends on alpha. Do I need to use it somehow to choose the significant clusters? Or can I just check the clusrand.pos(neg)clusters.pval parameters to identify significant clusters? Yes, you can just check the clusrand.pos(neg)clusters.pvals. The two pieces of information are redundant: a clusrand.pos(neg)clusters.pval is less than alpha it the cluster-level statistic of this cluster exceeds clusrand.critval. 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/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From olga at GRAPHICMIND.INFO Tue Jun 26 11:51:27 2007 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Tue, 26 Jun 2007 13:51:27 +0400 Subject: clusterrandomization-alphavalue Message-ID: I mean it will not influence clustrand.posclusters.pval, even if I put cfg.alpha =0.5. ----- Original Message ----- From: Eric Maris To: FIELDTRIP at NIC.SURFNET.NL Sent: Tuesday, June 26, 2007 1:39 PM Subject: Re: [FIELDTRIP] clusterrandomization-alphavalue Dear Olga, As I understand, the cfg.alpha is also redundant as input information. Yes? If you omit cfg.alpha, then clusrand.critval will be computed using the default value cfg.alpha=0.05. 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/ Best Regards, Olga ----- Original Message ----- From: Eric Maris To: FIELDTRIP at NIC.SURFNET.NL Sent: Tuesday, June 26, 2007 12:11 PM Subject: Re: [FIELDTRIP] clusterrandomization-alphavalue Dear Olga, I'd like to clarify the output parameters of clustrandomization. What does clusrand.critvals means. How it depends on chosen alpha threshold (usually 0.05). As I looked through the script, it is the only parameters which depends on alpha. Do I need to use it somehow to choose the significant clusters? Or can I just check the clusrand.pos(neg)clusters.pval parameters to identify significant clusters? Yes, you can just check the clusrand.pos(neg)clusters.pvals. The two pieces of information are redundant: a clusrand.pos(neg)clusters.pval is less than alpha it the cluster-level statistic of this cluster exceeds clusrand.critval. 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/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vvw at CALTECH.EDU Wed Jun 27 04:15:00 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Tue, 26 Jun 2007 19:15:00 -0700 Subject: tfanalysis - NaN In-Reply-To: <002401c7b7c8$1e23e6c0$902dae83@fcdonders.nl> Message-ID: Hi Jan-M and Christian thanks very much for all your advice. - there was indeed a time discrepancy in that the imported files were in milliseconds (is this a usual thing when importing from BESA? If so, it may be helpful to have this piece of information on the Besa section in the website). So, converting everything in seconds did help together with... - longer epochs which of course provide more sensible results. No NaN on the horizon, clusteranalysis on the way, I might inquire some more soon on that part... Thanks again for your help! -vv >Sorry to hop in into this discussion, but did you (V) explicitly check the >time-axes present in your data? In other words: there is a field in the data >structure (data.time) which specifies the time axis for each trial. >According to this axis, windows (cfg.t_ftimwins) are placed around the >(cfg.tois) you specify in your configuration. If there is a discrepancy >between cfg.toi, and data.time, NaNny things could happen. Because you >imported your files from BESA, something might be going on here. > >Yours, > >Jan-M > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Virginie van Wassenhove >Sent: Tuesday, June 26, 2007 6:25 AM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] tfanalysis - NaN > >Hi Christian, > > >In the configuration options you have specified cfg.taper = > >'hanning' which will apply only one (i.e., the hanning) taper to > >your data. If you want to use multitapers you need to set cfg.taper > >= 'dpss' or just leave the field it out of the cfg (since > >multitapers are the default). > >Ah yes, sorry, I have been playing around with most parameters so >both 'hanning' and 'dpss' lead to the same result (and other windows >and wavelet analysis). > > >I'm not really sure what you mean by normalized (the csd is > >obviously a density) but if there were any divide by zero issues > >then matlab would be chucking warnings. What happens when you set > >cfg.output = 'pow'; ? > >Same thing whether I use 'pow' or 'powandcsd'. So I meant 'pow' >normalization (I assume it's baseline corrected on the pre-stimulus >interval?). > >Since I imported raw data from besa (as .dat files) there might be an >error in the previous specifications / preprocessing. I don't see >otherwise see any major confound in the tf analysis... I will look >some more into that part. > >Thanks for your help! >-vv > > > > > >>>>>>>Hi Virginie, > >>>>>>> > >>>>>>>the function freqanalysis will return NaNs when a time > >>>>>>>frequency tile extends beyond a corresponding data segment. > >>>>>>>One would usually expect a "U" shaped padding of NaNs at the > >>>>>>>boundaries of any TFR which has longer time windows for lower > >>>>>>>frequencies. From the cfg options you specify below I can see > >>>>>>>that you have a data segment of 1.1 seconds length and the > >>>>>>>moving windows cfg.t_tfimwin are quite long at the low > >>>>>>>ffrequencies, e.g., 1 Hz = 4 s, 6 Hz = 0.6666 s. Hence the > >>>>>>>NaNs seem perfectly "normal" in this case. The only way to > >>>>>>>avoid NaN in the time window of interest (using this type of > >>>>>>>time-frequency tiling) is to make your epochs longer. > >>>>>>> > >>>>>>>Hope this helps, > >>>>>>>Christian > >>>>>>> > >>>>>>> > >>>>>>>On 21 Jun 2007, at 20:44, Virginie van Wassenhove wrote: > >>>>>>> > >>>>>>>>Hello again. > >>>>>>>> > >>>>>>>>I am finding NaN whatever method I use (multitaper and > >>>>>>>>wavelet analysis), yet using a different analysis tool with > >>>>>>>>similar parameters I obtain clean results. > >>>>>>>>epoch length = 1.1 s > >>>>>>>>baseline length = 0.3 s > >>>>>>>>sampling rate = 500Hz > >>>>>>>> > >>>>>>>>I tried several suggestions listed in the previous message > >>>>>>>>list for a similar problem, but none seem to provide > >>>>>>>>reasonable results (aka always NaN). > >>>>>>>>Also tried with different subjects, no particular error > >>>>>>>>otherwise. I am sending a sample script in case someone has a > >>>>>>>>suggestion on this... > >>>>>>>>Thanks for your help once more! > >>>>>>>> > >>>>>>>>Virginie > >>>>>>>> > >>>>>>>>%% ================================================ > >>>>>>>>% TF analysis - MULTITAPER > >>>>>>>>cfg = []; > >>>>>>>>cfg.method = 'mtmconvol'; > >>>>>>>>cfg.taper = 'hanning'; > >>>>>>>>cfg.output = 'powandcsd'; > >>>>>>>>%cfg.channel = 'all'; > >>>>>>>>cfg.channel = 'E75'; > >>>>>>>> > >>>>>>>>%win_length = 0.128; > >>>>>>>>%win_n = floor(2.*(1.1./win_length)-1); > >>>>>>>> > >>>>>>>>cfg.foi = 1:5:45; > >>>>>>>>%cfg.t_ftimwin = ones(1,win_n).*win_length; > >>>>>>>>cfg.t_ftimwin = 4./cfg.foi; > >>>>>>>>%cfg.toi = -0.3:win_length/2:0.8; > >>>>>>>>cfg.toi = -0.3:0.05:0.8; > >>>>>>>> > >>>>>>>>% cfg.pad = 'maxperlen'; > >>>>>>>>% cfg.keeptrials = 'no'; > >>>>>>>>% cfg.keeptapers ='no'; > >>>>>>>>s08_ill_mult = freqanalysis(cfg,s08_ill); > >>>>>>>> > >>>>>>>>%% ======================== > >>>>>>>>% plot freq data > >>>>>>>>cfg = []; > >>>>>>>>cfg.baseline = [-0.3 0]; > >>>>>>>>cfg.layout = egilay; > >>>>>>>>cfg.zlim = [-0.00001 0.000001]; % a comparer > >>>>>>>>entre participants > >>>>>>>>% warning off % NaN > >>>>>>>>clf > >>>>>>>>%multiplotTFR(cfg,s08_ill_mult); > >>>>>>>>singleplotTFR(cfg,s08_ill_mult); > >>>>>>>> > >>>>>>>>%% ================================================ > >>>>>>>>% TF analysis - wavelet > >>>>>>>>cfg = []; > >>>>>>>>cfg.method = 'wltconvol'; > >>>>>>>>cfg.width = 4; > >>>>>>>>cfg.output = 'pow'; > >>>>>>>>cfg.foi = 1:2:30; > >>>>>>>>cfg.toi = -0.3:0.05:0.8; > >>>>>>>>s14_ill_wvlt = freqanalysis(cfg, s14_ill); > >>>>>>>>%% ======================== > >>>>>>>>cfg = []; > >>>>>>>>cfg.baseline = [-0.3 0]; > >>>>>>>>cfg.zlim = [-1 1]; > >>>>>>>>cfg.showlabels = 'yes'; > >>>>>>>>cfg.layout = egilay; > >>>>>>>>clf > >>>>>>>>multiplotTFR(cfg, s14_ill_wvlt) > >>>>>>>> > >>>>>>>>%% ================================================ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 soren.r.christensen at GSK.COM Wed Jun 27 05:00:29 2007 From: soren.r.christensen at GSK.COM (Soren Rahn Christensen) Date: Wed, 27 Jun 2007 04:00:29 +0100 Subject: Soren R Christensen is out of the office. Message-ID: I will be out of the office starting 27-Jun-2007 and will not return until 04-Jul-2007. Back Thursday 5th ----------------------------------------------------------- This e-mail was sent by GlaxoSmithKline Services Unlimited (registered in England and Wales No. 1047315), which is a member of the GlaxoSmithKline group of companies. The registered address of GlaxoSmithKline Services Unlimited is 980 Great West Road, Brentford, Middlesex TW8 9GS. ----------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 c.hesse at FCDONDERS.RU.NL Wed Jun 27 13:40:36 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Wed, 27 Jun 2007 13:40:36 +0200 Subject: egi2besa2fieldtrip - topoplot layout In-Reply-To: <20070620162922.1FC5C1ABB1@earth-ox.its.caltech.edu> Message-ID: Hi Virginie & Olga, I have just done some tests using the PREPARE_LAYOUT function and EGI files and the code seems to behave as it should. If you specify cfg.rotate = 0 then the sensor positions come out with the nose pointing upwards. Since the default specified in the code is cfg.rotate = 90, not specifying cfg.rotate or setting cfg.rotate = 90 leaves you with the nose pointing to the right. I would be grateful if you can confirm using your own files that PREPARE_LAYOUT with cfg.rotate = 0 works as described above. Many Thanks, Christian On 20 Jun 2007, at 18:29, Virginie van Wassenhove wrote: > Hi Olga, > > thanks for your help, I think I got it working now! > > Virginie > > At 06:20 AM 6/20/2007, Olga Sysoeva wrote: >> Dear Virginie, >> >> I had the same problem. >> Actually, I not understand where the problem comes from, but solve >> it by >> multiplying the coordinates by cos (- 90) and sin (90). See the >> script >> below. >> It works good for my data... >> >> Best Regards, >> Olga. >> >> >> %prepare layout >> data.elec = >> read_fcdc_elec('C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'); >> cfg = []; >> cfg.rotate = 90; >> cfg.elecfile = 'C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'; >> mylay2 = prepare_layout(cfg); >> >> for i=1:69 >> mylay2.width (i)= 0.5 >> end; >> >> for i=1:69 >> mylay2.height (i)= 0.5 >> end; >> >> x=mylay.pos (:,1); >> y=mylay.pos (:,2); >> mylay2.pos (:,1)=y; >> mylay2.pos (:,2)=-x; >> >> >> -----Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] >> On Behalf >> Of Virginie van Wassenhove >> Sent: Tuesday, June 19, 2007 10:38 PM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: [FIELDTRIP] egi2besa2fieldtrip - topoplot layout >> >> Hi Fieldtripers, >> >> below find the relevant sample code I am using to plot cluster >> results with Fieldtrip release v. 20070514 (latest?). >> >> I have read previous posts in the discussion but I still bump into >> this issue (not sure how old the discussions were). >> The recordings were made with an egi system and preprocessed in besa. >> Although I am using the prepare_layout function, the layout in >> topoplotER (and other plotting tools) needs to be rotated by >> 90degrees clockwise. >> I have tried to use cfg.rotate (in the for loop below, commented >> here) but that does not change anything. >> >> Do you have any suggestions on how to overcome this problem? >> Thanks in advance for your help! >> >> Virginie >> >> % ==== plot results ==== >> cfg = []; >> cfg.elecfile = '\CHANNELS_specs\fieldtrip_GSN128.sfp'; >> egilay = prepare_layout(cfg); >> >> diff_gdav = ill_gdav; >> diff_gdav.av = ill_gdav.avg-noill_gdav.avg; >> >> figure; >> % if cfg.latency = [0.3 0.8]; in cluster analysis >> %j = [0:0.025:0.5]; % (s), 0 = 1st onset >> %m = [1:12:251]; % (samples) >> % if cfg.latency = 'all'; in clusteranalysis >> j = [0:0.05:1.1]; % (s), 0 = -300ms >> from1st >> onset >> m = [1:25:551]; % (samples) >> >> pos = stat.posclusterslabelmat == 1; % + clusters >> neg = (stat.negclusterslabelmat == 1)*(-1); % - clusters >> >> for k = 1:length(j)-1; % 20 subplots >> subplot(4,5,k); >> cfg = []; >> cfg.xlim=[j(k) j(k+1)]; >> cfg.zlim=[-3 3]; >> pos_int = mean(pos(:,m(k):m(k+1))')'; >> neg_int = mean(neg(:,m(k):m(k+1))')'; >> cfg.highlight = find(pos_int ==1 | neg_int == -1); >> cfg.comment = 'xlim'; >> cfg.commentpos = 'title'; >> cfg.layout = egilay; >> %cfg.rotate =[90]; % ?? rotate by 90 >> degrees clock-wise >> topoplotER(cfg,diff_gdav); >> end >> % ==================== >> >> 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. >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users >> of the FieldTrip toolbox, to share experiences and to discuss new >> ideas for MEG and EEG analysis. See also http:// >> listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/ >> fcdonders/fieldtrip. > > 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. > ---------------------------------------------------------------------- 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 vvw at CALTECH.EDU Wed Jun 27 18:11:17 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Wed, 27 Jun 2007 09:11:17 -0700 Subject: egi2besa2fieldtrip - topoplot layout In-Reply-To: Message-ID: Hi Christian, yes using cfg.rotate = 0 works fine (see below code I have been using). Basically rotating by 90 degrees from the configuration specified in fieldtrip. With this code, com and scale are added to the layout. cfg = []; cfg.rotate = 0; cfg.elecfile = 'C:\Documents and Settings\Virginie\My Documents\EEG_analysis\CHANNELS_specs\fieldtrip_GSN128.sfp'; egilay = prepare_layout(cfg); vv At 04:40 AM 6/27/2007, you wrote: >Hi Virginie & Olga, > >I have just done some tests using the PREPARE_LAYOUT function and >EGI files and the code seems to behave as it should. If you specify >cfg.rotate = 0 then the sensor positions come out with the nose >pointing upwards. Since the default specified in the code is >cfg.rotate = 90, not specifying cfg.rotate or setting cfg.rotate = >90 leaves you with the nose pointing to the right. > >I would be grateful if you can confirm using your own files that >PREPARE_LAYOUT with cfg.rotate = 0 works as described above. > >Many Thanks, >Christian > > >On 20 Jun 2007, at 18:29, Virginie van Wassenhove wrote: > >>Hi Olga, >> >>thanks for your help, I think I got it working now! >> >>Virginie >> >>At 06:20 AM 6/20/2007, Olga Sysoeva wrote: >>>Dear Virginie, >>> >>>I had the same problem. >>>Actually, I not understand where the problem comes from, but solve it by >>>multiplying the coordinates by cos (- 90) and sin (90). See the script >>>below. >>>It works good for my data... >>> >>>Best Regards, >>>Olga. >>> >>> >>>%prepare layout >>>data.elec = >>>read_fcdc_elec('C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'); >>>cfg = []; >>>cfg.rotate = 90; >>>cfg.elecfile = 'C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp'; >>>mylay2 = prepare_layout(cfg); >>> >>>for i=1:69 >>> mylay2.width (i)= 0.5 >>>end; >>> >>>for i=1:69 >>> mylay2.height (i)= 0.5 >>>end; >>> >>>x=mylay.pos (:,1); >>>y=mylay.pos (:,2); >>>mylay2.pos (:,1)=y; >>>mylay2.pos (:,2)=-x; >>> >>> >>>-----Original Message----- >>>From: FieldTrip discussion list >>>[mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >>>Of Virginie van Wassenhove >>>Sent: Tuesday, June 19, 2007 10:38 PM >>>To: FIELDTRIP at NIC.SURFNET.NL >>>Subject: [FIELDTRIP] egi2besa2fieldtrip - topoplot layout >>> >>>Hi Fieldtripers, >>> >>>below find the relevant sample code I am using to plot cluster >>>results with Fieldtrip release v. 20070514 (latest?). >>> >>>I have read previous posts in the discussion but I still bump into >>>this issue (not sure how old the discussions were). >>>The recordings were made with an egi system and preprocessed in besa. >>>Although I am using the prepare_layout function, the layout in >>>topoplotER (and other plotting tools) needs to be rotated by >>>90degrees clockwise. >>>I have tried to use cfg.rotate (in the for loop below, commented >>>here) but that does not change anything. >>> >>>Do you have any suggestions on how to overcome this problem? >>>Thanks in advance for your help! >>> >>>Virginie >>> >>>% ==== plot results ==== >>>cfg = []; >>>cfg.elecfile = '\CHANNELS_specs\fieldtrip_GSN128.sfp'; >>>egilay = prepare_layout(cfg); >>> >>>diff_gdav = ill_gdav; >>>diff_gdav.av = ill_gdav.avg-noill_gdav.avg; >>> >>>figure; >>>% if cfg.latency = [0.3 0.8]; in cluster analysis >>>%j = [0:0.025:0.5]; % (s), 0 = 1st onset >>>%m = [1:12:251]; % (samples) >>>% if cfg.latency = 'all'; in clusteranalysis >>>j = [0:0.05:1.1]; % (s), 0 = -300ms from1st >>>onset >>>m = [1:25:551]; % (samples) >>> >>>pos = stat.posclusterslabelmat == 1; % + clusters >>>neg = (stat.negclusterslabelmat == 1)*(-1); % - clusters >>> >>>for k = 1:length(j)-1; % 20 subplots >>> subplot(4,5,k); >>> cfg = []; >>> cfg.xlim=[j(k) j(k+1)]; >>> cfg.zlim=[-3 3]; >>> pos_int = mean(pos(:,m(k):m(k+1))')'; >>> neg_int = mean(neg(:,m(k):m(k+1))')'; >>> cfg.highlight = find(pos_int ==1 | neg_int == -1); >>> cfg.comment = 'xlim'; >>> cfg.commentpos = 'title'; >>> cfg.layout = egilay; >>> %cfg.rotate =[90]; % ?? rotate by 90 >>>degrees clock-wise >>> topoplotER(cfg,diff_gdav); >>>end >>>% ==================== >>> >>>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. >>> >>>---------------------------------- >>>The aim of this list is to facilitate the discussion between users >>>of the FieldTrip toolbox, to share experiences and to discuss new >>>ideas for MEG and EEG analysis. See also >>>http://listserv.surfnet.nl/archives/fieldtrip.html >>>and http://www.ru.nl/fcdonders/fieldtrip. >> >>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. > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > >---------------------------------- > >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. > >http://listserv.surfnet.nl/archives/fieldtrip.html > >http://www.ru.nl/fcdonders/fieldtrip/ Virginie van Wassenhove, PhD :::::::::::: 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. From kosubek at CBS.MPG.DE Thu Jun 28 00:24:11 2007 From: kosubek at CBS.MPG.DE (Lars Kosubek) Date: Thu, 28 Jun 2007 00:24:11 +0200 Subject: TFR Analysis - Plotting Problem Message-ID: Dear Fieldtrip-Team, I'm trying to use fieldtrip-toolbox since a few days. After working through the tutorials and fixing the problem of matlab crash while importing eep-probe files i tried to do tfr-analysis. Everything seems fine but if the script reaches the part of plotting i get the following fault: -------------------------------------------------------- ??? Index exceeds matrix dimensions. Error in ==> topoplotER at 289 dat = dat(:, ymin:ymax, xmin:xmax); -------------------------------------------------------- What could be the reason of this problem? Maybe used the sub functions not in the right way...? In hope someone could spend a bit time in helping me, i will add the hole analysis-script: -------------------------------------------------------- debug=1 Path='/scr/fabian1/lars/SPROD/data/EEP/sprod'; %Subjects={'01','02','03','04','06','07','10','11','12','14','15', ... % '16','17','18','19','20','21','22','23','24'}; Channels={'F3','FZ','F4','FC3','FCZ','FC4','C3','CZ', ... 'C4','CP3','CPZ','CP4','P3','PZ','P4',}; %Contrasts={ {'33','31'} {'63','33'}} Subjects={'01','02'} Contrasts={ {'33','31'} } %Channels={'all'} %% 1. Import files (select trials, reject & preprocess) for k=1:length(Contrasts), Conditions=Contrasts{k}; for j=1:length(Conditions), Condition=Conditions{j}; for i=1:length(Subjects), Subject=Subjects{i}; cfg = []; cfg.dataset = strcat(Path, Subject, '.cnt'); cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 2; cfg.trialdef.eventvalue = Condition; cfg = definetrial(cfg); cfg.rejectfile=strcat(Path, Subject, '.rej') %[cfg] = rejectartifact(cfg); nor included in preprocessing cfg.channel = Channels; %cfg.detrend = 'yes'; PreProcData{i,j,k} = preprocessing(cfg); %save PreProcData PreProcData{i,j,k} -append; end end end %% 2. TimeFrequenzyResolution per Subject an Condition for k=1:length(Contrasts), Conditions=Contrasts{k}; for j=1:length(Conditions), Condition=Conditions{j}; for i=1:length(Subjects), Subject=Subjects{i}; cfg = []; cfg.output = 'pow'; %cfg.channel = 'all'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:1:20; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; %cfg.t_ftimwin = 5./cfg.foi; % 7 cycles per time window cfg.toi = -1:0.05:2; cfg.keeptrials = 'no'; cfg.keeptapers = 'no'; TFRAvgData{i,j,k} = freqanalysis(cfg, PreProcData{i,j,k}) %save TFRAvgData TFRAvgData{i,j,k} -append; if debug==1 cfg = []; cfg.layout = 'EEG1010.lay'; cfg.zparam='powspctrm'; cfg.xparam='time'; cfg.yparam='freq'; %cfg.xlim = -0.2 : 0.1 : 1.0; % Define 12 time intervals %cfg.zlim = [-1.3e-13 1.3e-13]; % Set the 'color' limits. figure; multiplotTFR(cfg,TFRAvgData{i,j,k}) end end end end clear PreProcData; %% 3. GrandAvarage of Conditions over Subjects for k=1:length(Contrasts), Conditions=Contrasts{k}; for j=1:length(Conditions), Condition=Conditions{j}; cfg = []; cfg.keepindividual='yes'; TFRGAvgData{k,j} = freqgrandaverage(cfg, TFRAvgData{:,j,k}) %save TFRGAvgData TFRGAvgData{i,j} -append; end end clear TFRAvgData; %% 4. Cluster Based Permutation Statitic between Conditions for k=1:length(Contrasts), Conditions=Contrasts{k}; cfg = []; cfg.parameter='powspctrm' cfg.latency=[0.2 1.4]; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.05; cfg.numrandomization = 100; cfg.layout = 'EEG1010.lay'; subj = length(Subjects); design=zeros(2,2*subj); for s = 1:subj design(1,s) = s; end for s = 1:subj design(1,subj+s) = s; end design(2,1:subj) = 1; design(2,subj+1:2*subj) = 2; cfg.design = design; cfg.uvar = 1; cfg.ivar = 2; [stat] = freqstatistics(cfg, TFRGAvgData{k,1}, TFRGAvgData{k,2}) %% 5. Plotting the Statistics GA_TFR_AvsB = TFRGAvgData{k,1}; GA_TFR_AvsB.powspctrm = GA_TFR_AvsB.powspctrm - TFRGAvgData{k,2}.powspctrm; figure; j = [-0.4:0.05:1.35]; foi = 10; % frequency of interest index_foi = find(stat.freq==foi);% index of frequency of interest in stat for k = 1:11; m=k+16; subplot(4,5,k); cfg = []; %cfg.baseline = [-0.5 -0.1]; cfg.xlim=[j(k) j(k)]; cfg.ylim = [foi foi]; cfg.highlight = find (stat.negclusterslabelmat(:,index_foi,m)==1); %cfg.zlim = [-2.5e-28 2.5e-28]; cfg.comment = 'xlim'; cfg.commentpos = 'title'; cfg.xparam='time'; cfg.yparam='freq'; cfg.zparam='powspctrm'; cfg.layout='EEG1010.lay'; topoplotTFR(cfg, GA_TFR_AvsB); end end ------------------------------------------------------------------ Big Thanks for taking time and reading until this point! Best Regards, Lars Kosubek ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 vvw at CALTECH.EDU Thu Jun 28 00:49:26 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Wed, 27 Jun 2007 15:49:26 -0700 Subject: TFR Analysis - Plotting Problem In-Reply-To: <63818.85.176.248.164.1182983051.squirrel@mail.cbs.mpg.de> Message-ID: Here's an attempt because I just had a similar issue when plotting the difference between 2 conditions (for 1 individual). If I set cfg.keeptrials = 'yes' (which is needed for the cluster analysis) for the freqanalysis and use the pwspctrm difference for these 2 conditions, multiplotTFR won't work and returns a similar error. I suppose because there is 1 more dimension aka 'trials'. If I use an average difference (cfg.keeptrials = 'no') for these same conditions and for illustrative purposes, then multiplotTFR works and display both the average difference and the obtained clusters... Not sure whether this is relevant to your across-individuals design but maybe it's worth trying it out. -Virginie At 03:24 PM 6/27/2007, you wrote: >Dear Fieldtrip-Team, > >I'm trying to use fieldtrip-toolbox since a few days. After working >through the tutorials and fixing the problem of matlab crash while >importing eep-probe files i tried to do tfr-analysis. Everything seems >fine but if the script reaches the part of plotting i get the following >fault: > > >-------------------------------------------------------- >??? Index exceeds matrix dimensions. > >Error in ==> topoplotER at 289 > dat = dat(:, ymin:ymax, xmin:xmax); >-------------------------------------------------------- > > > >What could be the reason of this problem? Maybe used the sub functions not >in the right way...? > >In hope someone could spend a bit time in helping me, i will add the hole >analysis-script: > > >-------------------------------------------------------- >debug=1 > >Path='/scr/fabian1/lars/SPROD/data/EEP/sprod'; > >%Subjects={'01','02','03','04','06','07','10','11','12','14','15', ... >% '16','17','18','19','20','21','22','23','24'}; > >Channels={'F3','FZ','F4','FC3','FCZ','FC4','C3','CZ', ... > 'C4','CP3','CPZ','CP4','P3','PZ','P4',}; > >%Contrasts={ {'33','31'} {'63','33'}} > >Subjects={'01','02'} > >Contrasts={ {'33','31'} } > >%Channels={'all'} > > >%% 1. Import files (select trials, reject & preprocess) > >for k=1:length(Contrasts), Conditions=Contrasts{k}; > for j=1:length(Conditions), Condition=Conditions{j}; > for i=1:length(Subjects), Subject=Subjects{i}; > cfg = []; > cfg.dataset = strcat(Path, Subject, '.cnt'); > cfg.trialdef.eventtype = 'trigger'; > cfg.trialdef.prestim = 1; > cfg.trialdef.poststim = 2; > cfg.trialdef.eventvalue = Condition; > cfg = definetrial(cfg); > > cfg.rejectfile=strcat(Path, Subject, '.rej') > %[cfg] = rejectartifact(cfg); nor included in preprocessing > > cfg.channel = Channels; > %cfg.detrend = 'yes'; > PreProcData{i,j,k} = preprocessing(cfg); > %save PreProcData PreProcData{i,j,k} -append; > end > end >end > > >%% 2. TimeFrequenzyResolution per Subject an Condition > >for k=1:length(Contrasts), Conditions=Contrasts{k}; > for j=1:length(Conditions), Condition=Conditions{j}; > for i=1:length(Subjects), Subject=Subjects{i}; > cfg = []; > cfg.output = 'pow'; > %cfg.channel = 'all'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.foi = 1:1:20; > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; > %cfg.t_ftimwin = 5./cfg.foi; % 7 cycles per time window > cfg.toi = -1:0.05:2; > cfg.keeptrials = 'no'; > cfg.keeptapers = 'no'; > > TFRAvgData{i,j,k} = freqanalysis(cfg, PreProcData{i,j,k}) > %save TFRAvgData TFRAvgData{i,j,k} -append; > if debug==1 > cfg = []; > cfg.layout = 'EEG1010.lay'; > cfg.zparam='powspctrm'; > cfg.xparam='time'; > cfg.yparam='freq'; > %cfg.xlim = -0.2 : 0.1 : 1.0; % Define 12 time intervals > %cfg.zlim = [-1.3e-13 1.3e-13]; % Set the 'color' limits. > figure; multiplotTFR(cfg,TFRAvgData{i,j,k}) > end > end > end >end > > >clear PreProcData; > > >%% 3. GrandAvarage of Conditions over Subjects > >for k=1:length(Contrasts), Conditions=Contrasts{k}; > for j=1:length(Conditions), Condition=Conditions{j}; > cfg = []; > cfg.keepindividual='yes'; > TFRGAvgData{k,j} = freqgrandaverage(cfg, TFRAvgData{:,j,k}) > %save TFRGAvgData TFRGAvgData{i,j} -append; > end >end > > >clear TFRAvgData; > > > >%% 4. Cluster Based Permutation Statitic between Conditions > >for k=1:length(Contrasts), Conditions=Contrasts{k}; >cfg = []; >cfg.parameter='powspctrm' >cfg.latency=[0.2 1.4]; >cfg.method = 'montecarlo'; >cfg.statistic = 'depsamplesT'; >cfg.clusteralpha = 0.05; >cfg.clusterstatistic = 'maxsum'; >cfg.minnbchan = 2; >cfg.tail = 0; >cfg.clustertail = 0; >cfg.alpha = 0.05; >cfg.numrandomization = 100; >cfg.layout = 'EEG1010.lay'; > >subj = length(Subjects); >design=zeros(2,2*subj); >for s = 1:subj > design(1,s) = s; >end >for s = 1:subj > design(1,subj+s) = s; >end >design(2,1:subj) = 1; >design(2,subj+1:2*subj) = 2; > >cfg.design = design; >cfg.uvar = 1; >cfg.ivar = 2; > >[stat] = freqstatistics(cfg, TFRGAvgData{k,1}, TFRGAvgData{k,2}) > > > >%% 5. Plotting the Statistics > >GA_TFR_AvsB = TFRGAvgData{k,1}; >GA_TFR_AvsB.powspctrm = GA_TFR_AvsB.powspctrm - TFRGAvgData{k,2}.powspctrm; > > >figure; >j = [-0.4:0.05:1.35]; >foi = 10; % frequency of interest >index_foi = find(stat.freq==foi);% index of frequency of interest in stat >for k = 1:11; > m=k+16; > subplot(4,5,k); > cfg = []; > %cfg.baseline = [-0.5 -0.1]; > cfg.xlim=[j(k) j(k)]; > cfg.ylim = [foi foi]; > cfg.highlight = find (stat.negclusterslabelmat(:,index_foi,m)==1); > %cfg.zlim = [-2.5e-28 2.5e-28]; > cfg.comment = 'xlim'; > cfg.commentpos = 'title'; > cfg.xparam='time'; > cfg.yparam='freq'; > cfg.zparam='powspctrm'; > cfg.layout='EEG1010.lay'; > > topoplotTFR(cfg, GA_TFR_AvsB); >end > >end >------------------------------------------------------------------ > >Big Thanks for taking time and reading until this point! >Best Regards, Lars Kosubek > >---------------------------------- >The aim of this list is to facilitate the discussion between users >of the FieldTrip toolbox, to share experiences and to discuss new >ideas for MEG and EEG analysis. See also >http://listserv.surfnet.nl/archives/fieldtrip.html and >http://www.ru.nl/fcdonders/fieldtrip. 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. From h.ferguson at PSY.GLA.AC.UK Thu Jun 28 11:46:38 2007 From: h.ferguson at PSY.GLA.AC.UK (heather ferguson) Date: Thu, 28 Jun 2007 10:46:38 +0100 Subject: cfg.neighbourdist unit measurement? Message-ID: Hi, Please can someone tell me whether the cfg.neighbourdist needed to define clusters is in cm or mm? (i.e. if I want a 3cm distance, should the value be 3 or 30?) Thanks, Heather ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Thu Jun 28 12:29:23 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 28 Jun 2007 12:29:23 +0200 Subject: cfg.neighbourdist unit measurement? In-Reply-To: <000901c7b969$4b812d10$cf59d182@heatherpc> Message-ID: Dear Heather, Please can someone tell me whether the cfg.neighbourdist needed to define clusters is in cm or mm? (i.e. if I want a 3cm distance, should the value be 3 or 30?) You should specify cfg.neighbourdist on the same scale as the scale in which your sensor coordinates (in the .grad or .elec field) are expressed. See the help of NEIGHBOURSELECTION. 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, Heather ---------------------------------- The aim of this list 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 h.morgan at BANGOR.AC.UK Thu Jun 28 17:05:42 2007 From: h.morgan at BANGOR.AC.UK (Helen Morgan) Date: Thu, 28 Jun 2007 17:05:42 +0200 Subject: Interpolating bad channels in EEG Message-ID: Hi, Is there a function in Fieldtrip that can replace data from a bad EEG channel using interpolation of neighbouring channels? Thanks, Helen ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Thu Jun 28 19:04:57 2007 From: abastos at BERKELEY.EDU (Andre Bastos) Date: Thu, 28 Jun 2007 10:04:57 -0700 Subject: cfg.neighbourdist unit measurement? In-Reply-To: <05f601c7b96f$36921440$6501a8c0@fcdonders.nl> Message-ID: Dear Heather, With a standard 64 channel montage, I created neighbourhood locations using neighbourdist values between 1 and 100, and then evaluated each structure to see which one specified 5 neighbors for T8, 8 for Cz, and 4 for Fp1. 48, 49, and 50 seemed to satisfy this so I just took the middle value. You may have to play around with this value depending on the size of your montage. Good Luck, -Andre From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Eric Maris Sent: Thursday, June 28, 2007 3:29 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] cfg.neighbourdist unit measurement? Dear Heather, Please can someone tell me whether the cfg.neighbourdist needed to define clusters is in cm or mm? (i.e. if I want a 3cm distance, should the value be 3 or 30?) You should specify cfg.neighbourdist on the same scale as the scale in which your sensor coordinates (in the .grad or .elec field) are expressed. See the help of NEIGHBOURSELECTION. 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, Heather ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vvw at CALTECH.EDU Thu Jun 28 21:24:14 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Thu, 28 Jun 2007 12:24:14 -0700 Subject: out of memory - window machine Message-ID: 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. From jaredvs at GMAIL.COM Fri Jun 29 03:31:32 2007 From: jaredvs at GMAIL.COM (Jared Van Snellenberg) Date: Fri, 29 Jun 2007 03:31:32 +0200 Subject: Volume conduction model for EEG DICS beamforming Message-ID: Hi all, 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). 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. 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). 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. Thank you very much, 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 jaredvs at GMAIL.COM Fri Jun 29 04:57:56 2007 From: jaredvs at GMAIL.COM (Jared Van Snellenberg) Date: Thu, 28 Jun 2007 22:57:56 -0400 Subject: out of memory - window machine In-Reply-To: <20070628192415.370CE12D6B@fire-ox.its.caltech.edu> Message-ID: 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. 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 olga at GRAPHICMIND.INFO Fri Jun 29 05:47:15 2007 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Fri, 29 Jun 2007 07:47:15 +0400 Subject: PC computer for Fieldtrip Message-ID: Dear all, It is probably a dull question, but can you specified the "good" PC Computer for analysing 64-channel data in Fieldtrip. Best Regards, Olga. ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to 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 Jun 29 09:12:11 2007 From: kooijman at TIFN.NL (Valesca Kooijman) Date: Fri, 29 Jun 2007 09:12:11 +0200 Subject: eeglab2fieldtrip Message-ID: Hi all, I am trying to convert some EEGLAB data (.set files) to Fieldtrip. After loading my eeglab data file, I use the command data = eeglab2fieldtrip(EEG, preprocessing). Unfortunately I get some warnings and an error message instead of a usable file. It says: >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)); Apparantly the script cannot convert the matlab version into a number, and therefore cannot determine the correct matrix dimensions. I don't know if this is because there is a problem in my datafile or in the script. Does anyone know what to do about this? Thanks! Best, Valesca ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. From c.hesse at FCDONDERS.RU.NL Fri Jun 29 09:45:31 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 29 Jun 2007 09:45:31 +0200 Subject: eeglab2fieldtrip In-Reply-To: Message-ID: Hi Valesca, which version of Matlab are you using? Christian On 29 Jun 2007, at 09:12, Valesca Kooijman wrote: > Hi all, > > I am trying to convert some EEGLAB data (.set files) to Fieldtrip. > After > loading my eeglab data file, I use the command > data = eeglab2fieldtrip(EEG, preprocessing). Unfortunately I get some > warnings and an error message instead of a usable file. > It says: > >> 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)); > > Apparantly the script cannot convert the matlab version into a > number, and > therefore cannot determine the correct matrix dimensions. I don't > know if > this is because there is a problem in my datafile or in the script. > > Does anyone know what to do about this? Thanks! > > Best, > Valesca > > ---------------------------------- > The aim of this list is to facilitate the discussion between users > of the FieldTrip toolbox, to share experiences and to discuss new > ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/ > archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kooijman at TIFN.NL Fri Jun 29 09:47:58 2007 From: Kooijman at TIFN.NL (Valesca Kooijman) Date: Fri, 29 Jun 2007 09:47:58 +0200 Subject: eeglab2fieldtrip In-Reply-To: <9DB94328-DEE7-495D-ACD1-7DD07CAD1F27@fcdonders.ru.nl> Message-ID: hi Christian, I am using matlab version 7.0.1. Valesca Christian Hesse Sent by: FieldTrip discussion list 06/29/2007 09:45 AM Please respond to FieldTrip discussion list To FIELDTRIP at NIC.SURFNET.NL cc Subject Re: [FIELDTRIP] eeglab2fieldtrip Hi Valesca, which version of Matlab are you using? Christian On 29 Jun 2007, at 09:12, Valesca Kooijman wrote: Hi all, I am trying to convert some EEGLAB data (.set files) to Fieldtrip. After loading my eeglab data file, I use the command data = eeglab2fieldtrip(EEG, preprocessing). Unfortunately I get some warnings and an error message instead of a usable file. It says: 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)); Apparantly the script cannot convert the matlab version into a number, and therefore cannot determine the correct matrix dimensions. I don't know if this is because there is a problem in my datafile or in the script. Does anyone know what to do about this? Thanks! Best, Valesca ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/fieldtrip/ ---------------------------------- The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vvw at CALTECH.EDU Fri Jun 29 18:22:40 2007 From: vvw at CALTECH.EDU (Virginie van Wassenhove) Date: Fri, 29 Jun 2007 09:22:40 -0700 Subject: out of memory - window machine In-Reply-To: <51d499680706281957v2b1c34bfx48d7a15f0ff82ca2@mail.gmail.co m> Message-ID: Hi Jared, I'll try the couple new things you suggested, thanks! vv At 07:57 PM 6/28/2007, you wrote: >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 ><vvw at caltech.edu> 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/ 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.