From martina.postorino at gmail.com Tue Jul 1 10:58:42 2014 From: martina.postorino at gmail.com (Martina Postorino) Date: Tue, 1 Jul 2014 10:58:42 +0200 Subject: [FieldTrip] ft_selectdata - automatic channels sorting In-Reply-To: <78332B65-2F5C-4638-B15C-D8448950D479@donders.ru.nl> References: <78332B65-2F5C-4638-B15C-D8448950D479@donders.ru.nl> Message-ID: Dear Jan-Mathijs, thanks for your quick reply. I did not apply the ft_selectdata to the 'stat' output (there the channels were selected in the cfg.channel field of the ft_timelockstatistics function). I only apply that function to my ERP dataset to select a subset of channel on which I wanted the information stored in stat.mask to be plotted, this is why the order of channels was inconsistent (I am sorry, I know it is a bit hard to explain). By the way, I am following this issue on the Bugzilla website. Thanks again, best regards. *__________________* Martina Postorino, M.Sc Phd program in Medical Life Science and Technology Neuroimaging Center (TUM-NIC) Technische Universität München, Klinikum Rechts der Isar 2014-06-25 8:55 GMT+02:00 jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl>: > Hi Martina, > > I agree that the sorting of the channels is somewhat annoying, and an > unexpected feature in the coding. Presently we are looking into how to > address this. > > Yet, the sorting that is applied to the list of channels is consistently > applied to all fields that contain numeric data. In your case I don’t > understand your statement that the mask stays unsorted. Is there any way > you are able to verify that? If I run the following simple simulation > everything is reordered, also the ‘mask’-field. > > stat.label={‘B’;’A’;’C’}; > stat.stat=repmat([1:3]’,[1 2]); > stat.mask=stat.stat; > stat.prob=stat.stat; > stat.time=[1 2]; > stat.dimord=‘chan_time’; > > stat2=ft_selectdata([],stat); > > If I now do: > > stat2.label > > I get > > ans = > > ‘A’ > ‘B’ > ‘C’ > > and when I do: > > stat2.stat > > I get > > ans = > > 2 2 > 1 1 > 3 3 > > and when I do: > > stat2.mask > > I get > > ans = > > 2 2 > 1 1 > 3 3 > > Conslusion: the mask is also re-ordered. In other words, the rows in the > numeric data fields are still consistent with respect to one another. > > If you want to stay informed about this issue, I suggest you to create an > account on bugzilla.fcdonders.nl, and add yourself to the cc-list of bug > #2597. > > > Best wishes, > Jan-Mathijs > > > On Jun 23, 2014, at 4:14 PM, Martina Postorino < > martina.postorino at gmail.com> wrote: > > Dear all, > > I recently encountered a problem using the function ft_selectdata to > select a subset of channels from my EEG dataset. > > I found out that in the output of the function ft_selectdata, channels are > sorted alphabetically. For me, that represents a problem since I would like > to plot the results from a cluster based permutation test using the > information stored in stat.mask (in which the order of channels is in line > with the original order of channels, i.e. not alphabetically) on the ERP > grandaverage of specific electrodes selected with ft_selectdata, to see > which time points are significantly different between my experimental > conditions. Due to the different orders of the channels, the mask is > plotted over the wrong channels. > > Is there a way to avoid that the function automatically sorts the labels > of the channels alphabetically? > > I have already tried the different versions of ft_selectdata > (ft_selectdata, ft_selectdata_old, ft_selectdata_new) and updated my > Fieldtrip version to the last one available. Nothing changed. > > This is the code I use: > > [stat] = ft_timelockstatistics(cfg, ERP_pain_bp_GA, ERP_buttonpress_GA); > > %plotting > > cfgp = []; > cfgp.channel = {'Cz'; 'CPz', 'Pz', 'CP1'. 'CP3', 'CP2', 'CP4'}; > cfgp.avgoverchan = 'no'; > cfgp.latency = [-1 1]; > ERP_pain_bp_GA_red = ft_selectdata_new(cfgp, ERP_pain_bp_GA); > ERP_buttonpress_GA_red = ft_selectdata_new(cfgp, ERP_buttonpress_GA); > > % average data across subjects > > cfgp = []; > cfgp.keepindividual = 'no'; > ERP_pain_bp_GA_avg = ft_timelockanalysis (cfgp, ERP_pain_bp_GA_red); > ERP_buttonpress_GA_avg = ft_timelockanalysis (cfgp, > ERP_buttonpress_GA_red); > % ERP_pain_GA_avg = ft_timelockanalysis (cfg, ERP_pain_GA_red); > > ERP_pain_bp_GA_avg.mask = stat.mask; > ERP_buttonpress_GA_avg.mask = stat.mask; > % ERP_pain_GA_avg.mask = stat.mask; > > % do the plotting > > cfgp = []; > cfgp.maskparameter = 'mask'; > cfgp.maskstyle = 'box'; > cfgp.layout = layout_easycap_painlabmunich; > > ft_multiplotER(cfgp,ERP_pain_bp_GA_avg, ERP_buttonpress_GA_avg); > > Thanks in advance! > > ___________________________________________ > > Martina Postorino, M.Sc > Phd program in Medical Life Science and Technology > > Neuroimaging Center (TUM-NIC) > Technische Universität München, Klinikum Rechts der Isar > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jul 1 12:27:49 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 1 Jul 2014 10:27:49 +0000 Subject: [FieldTrip] Beamformer confusion (still) Message-ID: <1404210469377.62409@flinders.edu.au> Hello everyone, So with absolutely no luck with the other methods I was trying, I tried to just use template files as I dont actually have any real mri data at this point. I ran the following code to warp electrodes to the surface of the template standard_bem file. I made sure that vol, timelock.elec and sourcemodel were all in centimetres. timelock.elec = ft_convert_units( timelock.elec, 'cm'); ?cfg = []; cfg.method = 'headshape'; cfg.headshape = vol.bnd( 1); timelock.elec = ft_sensorrealign( cfg, timelock.elec); The attached is vol, sourcemodel and the electrodes plotted (from the following code) figure; hold on ft_plot_vol( vol, 'edgecolor', 'none'); alpha 0.4 hatlas = ft_plot_mesh( sourcemodel.pos( sourcemodel.inside, :)); set( hatlas, 'Color', [ 0 1 0]); hsens = ft_plot_sens( timelock.elec, 'style', 'sk'); set( hsens, 'Color', [ 1 0 0]); As they dont line up, Im wondering what I am doing wrong? ?Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: template_lineup.fig Type: application/octet-stream Size: 197493 bytes Desc: template_lineup.fig URL: From mcantor at umich.edu Wed Jul 2 16:10:02 2014 From: mcantor at umich.edu (Max Cantor) Date: Wed, 2 Jul 2014 10:10:02 -0400 Subject: [FieldTrip] Beamformers: SAM vs LCMV vs LCMV fixedori Message-ID: Hi Fieldtrip, We are currently using the SAM beamformer for source localization, but are thinking of switching to LCMV. Given the research I've read, the vector beamformer approach should, for our purposes, be more efficient and be as, if not more accurate than scalar. However, other than the vector/scalar difference, I don't have a great understanding of what other differences exist between the two beamformers. To test the differences, I've run SAM, LCMV, and LCMV with fixed orientation (making it scalar), with both our real data and with simulated data, and while SAM and LCMV fixedori are more similar to each other than either are when compared to LCMV without fixedori (particularly with the simulation, less so with our real data), they are still visibly different from each other. This suggests to me that there are other potentially meaningful differences between SAM and LCMV besides the scalar/vector difference, and I want to make sure I have at least some idea of what those differences are before I commit to the change. That being said, I get the feeling that these differences may be more nuanced than I can decipher on my own, so if anyone can explain to me what these differences are and if they are important, I would greatly appreciate it. Thanks, Max -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg at think-now.com Thu Jul 3 02:00:23 2014 From: greg at think-now.com (Greg Simpson) Date: Wed, 2 Jul 2014 17:00:23 -0700 Subject: [FieldTrip] Research Associate Position Available In-Reply-To: References: Message-ID: Dear Colleagues - This position has been filled. Thank you, Greg Gregory V. Simpson, Ph.D. Founder & CSO Think Now, Inc. On Thu, May 8, 2014 at 10:52 AM, Greg Simpson wrote: > Dear Colleagues - please note our job opening below and spread the word to > those that might be interested. Thank you! Greg > > EEG Research Associate (Data Analysis) > > > > Think Now Inc. has a Research Associate opening for an EEG data analyst > for 2 NIH-funded studies being conducted with UCLA on the > neurophysiological bases of sustained attention, its deficits in ADHD and > the effects of computerized brain training. We are seeking candidates with > direct hands-on experience in EEG data analysis. MatLab programming skills > are required. We prefer strongly self-directed individuals to take on this > work. > > > > The successful candidate will report directly to Gregory V. Simpson, > Ph.D., Chief Scientific Officer of Think Now and will collaborate with Mark > Cohen, Ph.D., Agatha Lenartowicz, Ph.D. and the team at UCLA. Think Now is > located in San Francisco, so the successful candidate can be located in > either San Francisco or Los Angeles. > > > > Think Now is creating EEG and mobile-app based solutions for the diagnosis > and amelioration of neurological disorders with a focus on attention and > its control. Please send your CV and a description of your prior > experience with EEG data analysis and MatLab to *jobs at think-now.com > *. > > > Gregory V. Simpson, Ph.D. > Founder & CSO > Think Now, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From giulia.rizza at tiscali.it Thu Jul 3 10:41:52 2014 From: giulia.rizza at tiscali.it (giulia.rizza at tiscali.it) Date: Thu, 03 Jul 2014 10:41:52 +0200 Subject: [FieldTrip] Fw: Call for Application Prospective Ph.D. Students Message-ID: <52c2358f49dd84c58551e90fbd2d0c4a@tiscali.it> Dear FieldTrip users I would like to announce this opportunity for an international PhD in PSYCHOLOGY AND SOCIAL NEUROSCIENCE IN ITALY (Rome and Udine) Feel free to share this information with people could be interested. Thanks for your attention Giulia 2014-07-03 10:23 GMT+02:00 Maria Serena Panasiti : > CALL FOR APPLICATION FOR PROSPECTIVE PH.D. STUDENTS > > Code: 16167 - PSYCHOLOGY AND SOCIAL NEUROSCIENCE > > curriculum in COGNITIVE SOCIAL AND AFFECTIVE NEUROSCIENCES (COSAN) > > WHAT: > > Four three-year funded PHD POSITIONS IN COGNITIVE, SOCIAL AND AFFECTIVE NEUROSCIENCE (COSAN) program (http://www.cosanphd.com/ [1]) > > WHO: HIGH-MOTIVATED APPLICANTS WITH A STRONG INTEREST IN SYSTEMS NEUROSCIENCE AND HIGHER ORDER COGNITIVE FUNCTIONS ARE ENCOURAGED TO APPLY. > > Applications are invited from candidates who: > > v hold an Italian diploma di laurea / laurea specialistica / laurea magistrale, or an equivalent second-level degree (generally equivalent to a Master's Degree) obtained abroad > > v expect to receive their degree award by October 31, 2014 > > WHERE: > > v DEPARTMENT OF PSYCHOLOGY, SAPIENZA UNIVERSITY OF ROME http://dippsi.psi.uniroma1.it [2] > > v IRCCS FONDAZIONE SANTA LUCIA, Rome http://www.hsantalucia.it [3] > > SUPERVISOR: > > PROF. SALVATORE MARIA AGLIOTI, Director of the Social and Cognitive Neuroscience Laboratory, Sapienza University of Rome http://agliotilab.org/ [4] > > STIPEND: > > EURO 13.638,47 PER YEAR > > RESEARCH TOPICS: > > Neural correlates of cognitive, social and affective processes including: > > v Empathy > > v Intention, action and emotion understanding > > v Joint attention and joint action. > > v Intergroup processing, stereotype and prejudice. > > v Body awareness and Self-Other distinction > > v Social decision making > > v Virtual reality and Brain control of artificial agents > > v Existential neuroscience > > RESEARCH TECHNIQUES: > > v Electroencephalography (EEG), including: > > o Somatosensory Evoked Potentials (SEP) > > o Laser Evoked Potentials (LEP) > > v Transcranial Magnetic Stimulation (TMS) > > v transcranial Direct Current Stimulation (tDCS) > > v infrared Eye-tracking and Motion-tracking > > v Thermal Imaging > > v Lesion Mapping analysis > > v CAVE -Virtual Reality > > v fMRI. > > HOW: Admission is based on an evaluation of the skills and aptitude of the candidate, and the selection procedure includes two steps: > > Phase 1. Evaluation of qualifications > > Phase 2. On site (or video-conference) interview > > WHEN: > > APPLICATION DEADLINE: 01/08/2013 11:59 11.59 PM CET HOW TO APPLY: > See http://www.cosanphd.com/ [5] and http://www.uniroma1.it/sites/default/files/call%20for%20application_30_0.pdf [6] > > PHASE 1. The outcome of the evaluation will be published by 16/09/2014. > > Phase 2. On site interviews will start from 29/09/2014 09:00 AM at the Department of Psychology. It is POSSIBLE, following motivated requests, to conduct Phase 2 interview using VIDEO-CONFERENCING facilities. > > INFO: > > http://www.cosanphd.com/ [7] > > http://agliotilab.org/ [8] > > http://www.uniroma1.it/sites/default/files/call%20for%20application_30_0.pdf [9] > > http://www.uniroma1.it/sites/default/files/Annex%20A_2.pdf [10] > > CONTACT INFO: > > Paola Trussardi (organizational manager) - paola.trussardi at uniroma1.it [11] (administrative requests) > > Salvatore M. Aglioti - salvatoremaria.aglioti at uniroma1.it [12] (scientific requests) -- > Maria Serena Panasiti, Ph.D > > Cognitive Social and Affective Neuroscience Lab > Department of Psychology. > University of Rome "La Sapienza". > Via dei Marsi 78 - 00185 - Roma. > Phone: (+39) 06-49917635 [13]. Fax: (+39) 06-49917635 [14] > > School of Psychology & Clinical Language Sciences > University of Reading > Reading, United Kingdom Scopri istella, il nuovo motore per il web italiano. Istella garantisce risultati di qualità e la possibilità di condividere, in modo semplice e veloce, documenti, immagini, audio e video. Usa istella, vai su http://www.istella.it?wtk=amc138614816829636 -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Thu Jul 3 12:14:13 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Thu, 3 Jul 2014 03:14:13 -0700 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates Message-ID: <1404382453.26194.YahooMailNeo@web124905.mail.ne1.yahoo.com> Dear fieldtrip experts, Im trying to do source localization for simulated EEG data, for this I followed the tutorial in page: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate I was trying to use the mri image provided by fieldtrip (Subject01.mri) and EEG template (standard_1020.elc) in my work. The mri image need to be re-aliened to the Talairach space for coregistration with EEG space. In the tutorial you use (ft_volumerealien) to do that using interactive method. I have two questions: First, how can I do the coregistration using fixed coordinates of the 3 fiducials (nasion, left pr, right pr), in other words how can I get the coordinates of the fiducials in both Talairach and EEG spaces to do the coregistration using the script only not manually. Second, I tried to use the mri image provided by the spm toolbox because its already aliened to Talairach space, but when I try to do segmentation I get error that coordinates field does not exist: ??? Reference to non-existent field 'coordsys'. Error in ==> ft_volumesegment at 284   original.coordsys  = mri.coordsys; Error in ==> segmentation_spm_mri at 24 seg           = ft_volumesegment(cfg, mrirs); I read the image using (ft_read_mri) function, I don't find the field specified for the coordinates: disp(mri)           dim: [177 240 256]       anatomy: [177x240x256 double]           hdr: [1x1 struct]     transform: [4x4 double]          unit: 'mm' How can I solve this problem so I can use the mri image in SPM for further analysing in fieldtrip? Sorry for the long email I would be thankful for any help. Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From akiko.ikkai at gmail.com Thu Jul 3 20:11:44 2014 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Thu, 3 Jul 2014 14:11:44 -0400 Subject: [FieldTrip] error message when using dml.crossvalidator with "resample" option Message-ID: Dear Fieldtrippers, I'm trying to run a multivariate analysis to see if my data could classify trial types correctly. I'd like to use 'resample' option in dml.crossvalidator, since number of trials are sometimes quite different between trial types. When I feed in cfg.mva (at the end of this message), I get an error message: "No appropriate method, property, or field test for class dml.crossvalidator. Error in dml.analysis/test (line 65) Y = obj.method{c}.test(Y); Error in dml.crossvalidator/train (line 159) obj.result{f} = tproc.test(testX);" I think it's because the inputs to dml.crossvalidator are not properly entered. Could someone suggest a good way to format the inputs? Here is what I'm running: cfg=[]; % perform classification on the two TFRs cfg.channel = 'Fp1'; cfg.frequency = [4 8]; cfg.latency = [.4 4.6]; cfg.method='crossvalidate'; cfg.design=[ones(size(TFRcond1.powspctrm,1), 1); 2.*ones(size(TFRcond2.powspctrm,1), 1)]'; cfg.statistic = {'accuracy' 'binomial' 'contingency'}; cfg.mva = dml.crossvalidator('mva',{dml.standardizer() dml.svm()},'resample',true); stat=ft_freqstatistics(cfg, TFRcond1, TFRcond2); Thanks in advance! Akiko -- Akiko Ikkai, Ph.D. -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Fri Jul 4 08:23:28 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Thu, 3 Jul 2014 23:23:28 -0700 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates Message-ID: <1404455008.12862.YahooMailNeo@web124903.mail.ne1.yahoo.com> Dear fieldtrip experts, Im trying to do source localization for simulated EEG data, for this I followed the tutorial in page: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate I was trying to use the mri image provided by fieldtrip (Subject01.mri) and EEG template (standard_1020.elc) in my work. The mri image need to be re-aliened to the Talairach space for coregistration with EEG space. In the tutorial you use (ft_volumerealien) to do that using interactive method. I have two questions: First, how can I do the coregistration using fixed coordinates of the 3 fiducials (nasion, left pr, right pr), in other words how can I get the coordinates of the fiducials in both Talairach and EEG spaces to do the coregistration using the script only not manually. Second, I tried to use the mri image provided by the spm toolbox because its already aliened to Talairach space, but when I try to do segmentation I get error that coordinates field does not exist: ??? Reference to non-existent field 'coordsys'. Error in ==> ft_volumesegment at 284   original.coordsys  = mri.coordsys; Error in ==> segmentation_spm_mri at 24 seg           = ft_volumesegment(cfg, mrirs); I read the image using (ft_read_mri) function, I don't find the field specified for the coordinates: disp(mri)           dim: [177 240 256]       anatomy: [177x240x256 double]           hdr: [1x1 struct]     transform: [4x4 double]          unit: 'mm' How can I solve this problem so I can use the mri image in SPM for further analysing in fieldtrip? Sorry for the long email I would be thankful for any help. Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Fri Jul 4 08:35:25 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Thu, 3 Jul 2014 23:35:25 -0700 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates Message-ID: <1404455725.61933.YahooMailNeo@web124901.mail.ne1.yahoo.com> Dear fieldtrip experts, Im trying to do source localization for simulated EEG data, for this I followed the tutorial in page: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate I was trying to use the mri image provided by fieldtrip (Subject01.mri) and EEG template (standard_1020.elc) in my work. The mri image need to be re-aliened to the Talairach space for coregistration with EEG space. In the tutorial you use (ft_volumerealien) to do that using interactive method. I have two questions: First, how can I do the coregistration using fixed coordinates of the 3 fiducials (nasion, left pr, right pr), in other words how can I get the coordinates of the fiducials in both Talairach and EEG spaces to do the coregistration using the script only not manually. Second, I tried to use the mri image provided by the spm toolbox because its already aliened to Talairach space, but when I try to do segmentation I get error that coordinates field does not exist: ??? Reference to non-existent field 'coordsys'. Error in ==> ft_volumesegment at 284   original.coordsys  = mri.coordsys; Error in ==> segmentation_spm_mri at 24 seg           = ft_volumesegment(cfg, mrirs); I read the image using (ft_read_mri) function, I don't find the field specified for the coordinates: disp(mri)           dim: [177 240 256]       anatomy: [177x240x256 double]           hdr: [1x1 struct]     transform: [4x4 double]          unit: 'mm' How can I solve this problem so I can use the mri image in SPM for further analysing in fieldtrip? Sorry for the long email I would be thankful for any help. Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Fri Jul 4 08:50:38 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Thu, 3 Jul 2014 23:50:38 -0700 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates Message-ID: <1404456638.56273.YahooMailNeo@web124904.mail.ne1.yahoo.com> Dear fieldtrip experts, Im trying to do source localization for simulated EEG data, for this I followed the tutorial in page: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate I was trying to use the mri image provided by fieldtrip (Subject01.mri) and EEG template (standard_1020.elc) in my work. The mri image need to be re-aliened to the Talairach space for coregistration with EEG space. In the tutorial you use (ft_volumerealien) to do that using interactive method. I have two questions: First, how can I do the coregistration using fixed coordinates of the 3 fiducials (nasion, left pr, right pr), in other words how can I get the coordinates of the fiducials in both Talairach and EEG spaces to do the coregistration using the script only not manually. Second, I tried to use the mri image provided by the spm toolbox because its already aliened to Talairach space, but when I try to do segmentation I get error that coordinates field does not exist: ??? Reference to non-existent field 'coordsys'. Error in ==> ft_volumesegment at 284   original.coordsys  = mri.coordsys; Error in ==> segmentation_spm_mri at 24 seg           = ft_volumesegment(cfg, mrirs); I read the image using (ft_read_mri) function, I don't find the field specified for the coordinates: disp(mri)           dim: [177 240 256]       anatomy: [177x240x256 double]           hdr: [1x1 struct]     transform: [4x4 double]          unit: 'mm' How can I solve this problem so I can use the mri image in SPM for further analysing in fieldtrip? Sorry for the long email I would be thankful for any help. Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Jul 4 09:31:07 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 4 Jul 2014 09:31:07 +0200 Subject: [FieldTrip] error message when using dml.crossvalidator with "resample" option In-Reply-To: References: Message-ID: Dear Akiko, You should not specify an instance of dml.crossvalidator as the cfg.mva. Instead, ft_statistics_crossvalidate (which is called by timelock/freqstatistics) will construct its own dml.crossvalidator, wrapping whichever analysis you specify in cfg.mva. So, in your case, this would result in a crossvalidator wrapping another crossvalidator, leading to the error (since crossvalidator does not specify a test() function). Considering this problem, it used to be impossible to specify resample=true when using dml with FieldTrip. However, I have just committed a minor change to the code which allows you to specify cfg.resample = true/false in the call to ft_freq/timelockstatistics. So in your case you would specify: cfg.mva = {dml.standardizer() dml.svm()}; cfg.resample = true; The change is available on SVN and will be in tonight's FTP release. Best, Eelke On 3 July 2014 20:11, Akiko Ikkai wrote: > Dear Fieldtrippers, > > I'm trying to run a multivariate analysis to see if my data could classify > trial types correctly. I'd like to use 'resample' option in > dml.crossvalidator, since number of trials are sometimes quite different > between trial types. > > When I feed in cfg.mva (at the end of this message), I get an error message: > "No appropriate method, property, or field test for class > dml.crossvalidator. > > Error in dml.analysis/test (line 65) > Y = obj.method{c}.test(Y); > > Error in dml.crossvalidator/train (line 159) > obj.result{f} = tproc.test(testX);" > > > I think it's because the inputs to dml.crossvalidator are not properly > entered. Could someone suggest a good way to format the inputs? > > Here is what I'm running: > cfg=[]; % perform classification on the two TFRs > cfg.channel = 'Fp1'; > cfg.frequency = [4 8]; > cfg.latency = [.4 4.6]; > cfg.method='crossvalidate'; > cfg.design=[ones(size(TFRcond1.powspctrm,1), 1); > 2.*ones(size(TFRcond2.powspctrm,1), 1)]'; > cfg.statistic = {'accuracy' 'binomial' 'contingency'}; > cfg.mva = dml.crossvalidator('mva',{dml.standardizer() > dml.svm()},'resample',true); > stat=ft_freqstatistics(cfg, TFRcond1, TFRcond2); > > Thanks in advance! > Akiko > > -- > Akiko Ikkai, Ph.D. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tyler.grummett at flinders.edu.au Sat Jul 5 14:40:00 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Sat, 5 Jul 2014 12:40:00 +0000 Subject: [FieldTrip] possible bug: ft_sensorrealign Message-ID: <1404563999389.99277@flinders.edu.au> Hello fieldtrip, I just wanted to report a potential bug, I dont know whether it is a bug or if I am using it incorrectly. On line 323 to 329 of ft_sensorrealign is the following code: ft_plot_sens(elec, 'r*'); % plot all electrodes after warping ft_plot_sens(norm, 'm.', 'label', 'label'); % plot the template electrode locations ft_plot_sens(average, 'b.'); It throws the error: Error using ft_getopt the first input should contain key-value pairs Error in ft_plot_sens (line 47) style = ft_getopt(varargin, 'style', 'k.'); I think it should be: ?ft_plot_sens(elec, 'style', 'r*'); % plot all electrodes after warping ft_plot_sens(norm, 'style', 'm.', 'label', 'label'); % plot the template electrode locations ft_plot_sens(average, 'style', 'b.'); Hopefully this helps, Kind regards, Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Sun Jul 6 10:43:42 2014 From: a.stolk at fcdonders.ru.nl (Stolk, A. (Arjen)) Date: Sun, 6 Jul 2014 10:43:42 +0200 (CEST) Subject: [FieldTrip] Symposium : Towards a neuroscience of mutual understanding In-Reply-To: <732740966.7786680.1404636012987.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1118228088.7786691.1404636222882.JavaMail.root@sculptor.zimbra.ru.nl> Dear all, Here's a symposium I'd like to advertise. For program and registration, see: http://www.ru.nl/donders/agenda-news/symposium-towards/ Yours, Arjen Symposium : Towards a neuroscience of mutual understanding When : 1 September 2014 Where : Max Planck Institute for Psycholinguistics, Wundtlaan 1, Nijmegen, The Netherlands Organizers: Arjen Stolk, Peter Hagoort, and Ivan Toni Human sociality is built on our capacity for mutual understanding, but the principles and mechanisms of this capacity remain poorly understood. Progress might be limited because it is hard to capture the flexibility of mutual understanding with controlled experiments. More importantly, progress might also be limited because the mechanisms of mutual understanding lie in an interdisciplinary no-man’s land, with several theories pulling partial empirical observations in quite different directions. This symposium is concerned with bridging this interdisciplinary gap, fostering interactions between theoretical and experimental approaches on mutual understanding during human social interactions. The discussion will focus on mechanisms of mutual understanding, studied at different levels of organization, from cognitive systems to neuronal ensembles. -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From mahjoory86 at gmail.com Sun Jul 6 18:49:30 2014 From: mahjoory86 at gmail.com (Keyvan Mahjoory) Date: Sun, 6 Jul 2014 18:49:30 +0200 Subject: [FieldTrip] Remove Cerebellum Message-ID: Dear All, I've used standard_mri and standard_bem and I want to exclude cerebellum for source analysis. How can I do that? Best, Keyvan -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.chella at unich.it Mon Jul 7 11:34:57 2014 From: f.chella at unich.it (f.chella at unich.it) Date: Mon, 07 Jul 2014 11:34:57 +0200 Subject: [FieldTrip] Error while using ft_sensorrealign Message-ID: <20140707113457.373753g7giltvkch@webmail.unich.it> Hi everyone, I am getting an error when I use ft_sensorrealign to align my MEG sensor (i.e., ITAB MEG sensor) with the subject mri using fiducials. Below is the code I am using. I first specified the fiducial location in the sensor space in the field sens.fid: sens.fid.pnt(1,:) = [0 101.5 0] ; sens.fid.pnt(2,:) = [-69.9 -0.6 0.8]; sens.fid.pnt(3,:) = [69.9 0.6 -0.8]; sens.fid.label{1} = 'nasion'; sens.fid.label{2} = 'left'; sens.fid.label{3} = 'right'; and then I called ft_sensorrealign: cfg = []; cfg.method = 'fiducial'; cfg.fiducial = {'nasion', 'left', 'right'}; cfg.target.pnt(1,:) = [-0.5 86.5 -15.5]; cfg.target.pnt(2,:) = [-73.5 -7.5 -43.5]; cfg.target.pnt(3,:) = [69.5 -16.5 -44.5]; cfg.target.label = {'nasion', 'left', 'right'}; sens_realigned = ft_sensorrealign(cfg,sens); Now, I get the following error: ??? Subscripted assignment between dissimilar structures. Error in ==> ft_sensorrealign at 235 tmp(i) = ft_convert_units(template(i), elec.unit); % ensure that the units are consistent with the electrodes Does anyone know why this would be occurring and how to fix it? Thanks in advance for the help. Federico Chella, Ph.D. Dept. of Neuroscience, Imaging and Clinical Sciences ITAB ? Institute for advanced Biomedical Technologies ?G. d'Annunzio? University of Chieti-Pescara, Chieti, Italy From eelke.spaak at donders.ru.nl Mon Jul 7 11:49:15 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 7 Jul 2014 11:49:15 +0200 Subject: [FieldTrip] Error while using ft_sensorrealign In-Reply-To: <20140707113457.373753g7giltvkch@webmail.unich.it> References: <20140707113457.373753g7giltvkch@webmail.unich.it> Message-ID: Hi Federico, No idea whether this matters (haven't tested it), but perhaps the error is due to sens.fid.label being a column cell array (3x1) and cfg.target.label being a row (1x3)? Best, Eelke Op 7 jul. 2014 11:38 schreef : > Hi everyone, > > I am getting an error when I use ft_sensorrealign to align my MEG sensor > (i.e., ITAB MEG sensor) with the subject mri using fiducials. > > Below is the code I am using. > I first specified the fiducial location in the sensor space in the field > sens.fid: > sens.fid.pnt(1,:) = [0 101.5 0] ; > sens.fid.pnt(2,:) = [-69.9 -0.6 0.8]; > sens.fid.pnt(3,:) = [69.9 0.6 -0.8]; > sens.fid.label{1} = 'nasion'; > sens.fid.label{2} = 'left'; > sens.fid.label{3} = 'right'; > > and then I called ft_sensorrealign: > cfg = []; > cfg.method = 'fiducial'; > cfg.fiducial = {'nasion', 'left', 'right'}; > cfg.target.pnt(1,:) = [-0.5 86.5 -15.5]; > cfg.target.pnt(2,:) = [-73.5 -7.5 -43.5]; > cfg.target.pnt(3,:) = [69.5 -16.5 -44.5]; > cfg.target.label = {'nasion', 'left', 'right'}; > sens_realigned = ft_sensorrealign(cfg,sens); > > Now, I get the following error: > > ??? Subscripted assignment between dissimilar structures. > Error in ==> ft_sensorrealign at 235 > tmp(i) = ft_convert_units(template(i), elec.unit); % ensure that the > units are consistent with the electrodes > > Does anyone know why this would be occurring and how to fix it? > Thanks in advance for the help. > > > Federico Chella, Ph.D. > Dept. of Neuroscience, Imaging and Clinical Sciences > ITAB ? Institute for advanced Biomedical Technologies > ?G. d'Annunzio? University of Chieti-Pescara, Chieti, Italy > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.chella at unich.it Mon Jul 7 12:11:32 2014 From: f.chella at unich.it (f.chella at unich.it) Date: Mon, 07 Jul 2014 12:11:32 +0200 Subject: [FieldTrip] Error while using ft_sensorrealign In-Reply-To: References: <20140707113457.373753g7giltvkch@webmail.unich.it> Message-ID: <20140707121132.106815j962reywd0@webmail.unich.it> Hi Eelke, thanks for pointing out this oversight, but it seems not to depend on that. Now, I specified both as column cell array (3x1). However, the error is still occurring. Federico Def. Quota Eelke Spaak : > Hi Federico, > > No idea whether this matters (haven't tested it), but perhaps the error is > due to sens.fid.label being a column cell array (3x1) and cfg.target.label > being a row (1x3)? > > Best, > Eelke > Op 7 jul. 2014 11:38 schreef : > >> Hi everyone, >> >> I am getting an error when I use ft_sensorrealign to align my MEG sensor >> (i.e., ITAB MEG sensor) with the subject mri using fiducials. >> >> Below is the code I am using. >> I first specified the fiducial location in the sensor space in the field >> sens.fid: >> sens.fid.pnt(1,:) = [0 101.5 0] ; >> sens.fid.pnt(2,:) = [-69.9 -0.6 0.8]; >> sens.fid.pnt(3,:) = [69.9 0.6 -0.8]; >> sens.fid.label{1} = 'nasion'; >> sens.fid.label{2} = 'left'; >> sens.fid.label{3} = 'right'; >> >> and then I called ft_sensorrealign: >> cfg = []; >> cfg.method = 'fiducial'; >> cfg.fiducial = {'nasion', 'left', 'right'}; >> cfg.target.pnt(1,:) = [-0.5 86.5 -15.5]; >> cfg.target.pnt(2,:) = [-73.5 -7.5 -43.5]; >> cfg.target.pnt(3,:) = [69.5 -16.5 -44.5]; >> cfg.target.label = {'nasion', 'left', 'right'}; >> sens_realigned = ft_sensorrealign(cfg,sens); >> >> Now, I get the following error: >> >> ??? Subscripted assignment between dissimilar structures. >> Error in ==> ft_sensorrealign at 235 >> tmp(i) = ft_convert_units(template(i), elec.unit); % ensure that the >> units are consistent with the electrodes >> >> Does anyone know why this would be occurring and how to fix it? >> Thanks in advance for the help. >> >> >> Federico Chella, Ph.D. >> Dept. of Neuroscience, Imaging and Clinical Sciences >> ITAB ? Institute for advanced Biomedical Technologies >> ?G. d'Annunzio? University of Chieti-Pescara, Chieti, Italy >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > From jm.horschig at donders.ru.nl Mon Jul 7 14:12:05 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 07 Jul 2014 14:12:05 +0200 Subject: [FieldTrip] Error while using ft_sensorrealign In-Reply-To: <20140707121132.106815j962reywd0@webmail.unich.it> References: <20140707113457.373753g7giltvkch@webmail.unich.it> <20140707121132.106815j962reywd0@webmail.unich.it> Message-ID: <53BA8E95.1020304@donders.ru.nl> Hey, maybe we should look at that function more closely. Tyler Grummett also reported an issue with ft_sensorrealign a few days back, when specifying cfg.target as a file. His error was related to a missing field template.pnt. This could be since we recently changed the sensor-structures to contain .chanpos instead of .pnt. Here, I could imagine that the existence of template.pnt and absence of template.chanpos and .elecpos are also part of this problem. Best, Jörn On 7/7/2014 12:11 PM, f.chella at unich.it wrote: > Hi Eelke, > thanks for pointing out this oversight, but it seems not to depend on > that. > > Now, I specified both as column cell array (3x1). > However, the error is still occurring. > > Federico > > > > Def. Quota Eelke Spaak : > >> Hi Federico, >> >> No idea whether this matters (haven't tested it), but perhaps the >> error is >> due to sens.fid.label being a column cell array (3x1) and >> cfg.target.label >> being a row (1x3)? >> >> Best, >> Eelke >> Op 7 jul. 2014 11:38 schreef : >> >>> Hi everyone, >>> >>> I am getting an error when I use ft_sensorrealign to align my MEG >>> sensor >>> (i.e., ITAB MEG sensor) with the subject mri using fiducials. >>> >>> Below is the code I am using. >>> I first specified the fiducial location in the sensor space in the >>> field >>> sens.fid: >>> sens.fid.pnt(1,:) = [0 101.5 0] ; >>> sens.fid.pnt(2,:) = [-69.9 -0.6 0.8]; >>> sens.fid.pnt(3,:) = [69.9 0.6 -0.8]; >>> sens.fid.label{1} = 'nasion'; >>> sens.fid.label{2} = 'left'; >>> sens.fid.label{3} = 'right'; >>> >>> and then I called ft_sensorrealign: >>> cfg = []; >>> cfg.method = 'fiducial'; >>> cfg.fiducial = {'nasion', 'left', 'right'}; >>> cfg.target.pnt(1,:) = [-0.5 86.5 -15.5]; >>> cfg.target.pnt(2,:) = [-73.5 -7.5 -43.5]; >>> cfg.target.pnt(3,:) = [69.5 -16.5 -44.5]; >>> cfg.target.label = {'nasion', 'left', 'right'}; >>> sens_realigned = ft_sensorrealign(cfg,sens); >>> >>> Now, I get the following error: >>> >>> ??? Subscripted assignment between dissimilar structures. >>> Error in ==> ft_sensorrealign at 235 >>> tmp(i) = ft_convert_units(template(i), elec.unit); % ensure >>> that the >>> units are consistent with the electrodes >>> >>> Does anyone know why this would be occurring and how to fix it? >>> Thanks in advance for the help. >>> >>> >>> Federico Chella, Ph.D. >>> Dept. of Neuroscience, Imaging and Clinical Sciences >>> ITAB ? Institute for advanced Biomedical Technologies >>> ?G. d'Annunzio? University of Chieti-Pescara, Chieti, Italy >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From ctesche at unm.edu Tue Jul 8 03:44:49 2014 From: ctesche at unm.edu (Claudia Tesche) Date: Tue, 8 Jul 2014 01:44:49 +0000 Subject: [FieldTrip] Remove Cerebellum In-Reply-To: References: Message-ID: <1404783893509.40104@unm.edu> ?Dear Keyvan Why? Best, Claudia ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Keyvan Mahjoory Sent: Sunday, July 06, 2014 10:49 AM To: FieldTrip discussion list Subject: [FieldTrip] Remove Cerebellum Dear All, I've used standard_mri and standard_bem and I want to exclude cerebellum for source analysis. How can I do that? Best, Keyvan -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Tue Jul 8 06:44:54 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Mon, 7 Jul 2014 21:44:54 -0700 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates Message-ID: <1404794694.74187.YahooMailNeo@web124901.mail.ne1.yahoo.com> Dear fieldtrip experts, Im trying to do source localization for simulated EEG data, for this I followed the tutorial in page: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate I was trying to use the mri image provided by fieldtrip (Subject01.mri) and EEG template (standard_1020.elc) in my work. The mri image need to be re-aliened to the Talairach space for coregistration with EEG space. In the tutorial you use (ft_volumerealien) to do that using interactive method. I have two questions: First, how can I do the coregistration using fixed coordinates of the 3 fiducials (nasion, left pr, right pr), in other words how can I get the coordinates of the fiducials in both Talairach and EEG spaces to do the coregistration using the script only not manually. Second, I tried to use the mri image provided by the spm toolbox because its already aliened to Talairach space, but when I try to do segmentation I get error that coordinates field does not exist: ??? Reference to non-existent field 'coordsys'. Error in ==> ft_volumesegment at 284   original.coordsys  = mri.coordsys; Error in ==> segmentation_spm_mri at 24 seg           = ft_volumesegment(cfg, mrirs); I read the image using (ft_read_mri) function, I don't find the field specified for the coordinates: disp(mri)           dim: [177 240 256]       anatomy: [177x240x256 double]           hdr: [1x1 struct]     transform: [4x4 double]          unit: 'mm' How can I solve this problem so I can use the mri image in SPM for further analysing in fieldtrip? Sorry for the long email I would be thankful for any help. Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Jul 8 10:00:07 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 08 Jul 2014 10:00:07 +0200 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates In-Reply-To: <1404794694.74187.YahooMailNeo@web124901.mail.ne1.yahoo.com> References: <1404794694.74187.YahooMailNeo@web124901.mail.ne1.yahoo.com> Message-ID: <53BBA507.8060402@donders.ru.nl> Hi Rasha, you can call ft_determine_coordsys, or set the field manually if you what coordinate system the MRI is in. You could have also used the search function of the fieldtrip wiki (on the upper right on the page), e.g. by searching for coordinate system: http://fieldtrip.fcdonders.nl/?do=search&id=coordinate+system This leads to a page that lists all pages on which the term coordinate system occur. You can see that the first match links to a FAQ, which also hints to ft_determine_coordsys. FAQs can also be found when navigating to "User documentation" and then "Frequently asked questions". We spent quite some time to list a number of questions and detailled answers there. The answers are mostly more extensive than the question alone, so any question that might be remotely related to your actual question might be of interest there. However, please don't be afraid to ask any further questions, just notice that we're all doing this here besides our research, so sometimes it might take a bit longer for us to respond than within a few hours. Any search that you do in advance on the FT wiki is time that we do not have to spend ;) So, please don't send the same message five times within not even a week, once a week should be enough ;) Best, Jörn On 7/8/2014 6:44 AM, Rasha Haider wrote: > Dear fieldtrip experts, > Im trying to do source localization for simulated EEG data, for this I > followed the tutorial in page: > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate > > I was trying to use the mri image provided by fieldtrip > (Subject01.mri) and EEG template (standard_1020.elc) in my work. > The mri image need to be re-aliened to the Talairach space for > coregistration with EEG space. In the tutorial you use > (ft_volumerealien) to do that using interactive method. > I have two questions: > > First, how can I do the coregistration using fixed coordinates of the > 3 fiducials (nasion, left pr, right pr), in other words how can I get > the coordinates of the fiducials in both Talairach and EEG spaces to > do the coregistration using the script only not manually. > > Second, I tried to use the mri image provided by the spm toolbox > because its already aliened to Talairach space, but when I try to do > segmentation I get error that coordinates field does not exist: > > ??? Reference to non-existent field 'coordsys'. > > Error in ==> ft_volumesegment at 284 > original.coordsys = mri.coordsys; > > Error in ==> segmentation_spm_mri at 24 > seg = ft_volumesegment(cfg, mrirs); > > I read the image using (ft_read_mri) function, I don't find the field > specified for the coordinates: > > disp(mri) > dim: [177 240 256] > anatomy: [177x240x256 double] > hdr: [1x1 struct] > transform: [4x4 double] > unit: 'mm' > > How can I solve this problem so I can use the mri image in SPM for > further analysing in fieldtrip? > > Sorry for the long email I would be thankful for any help. > Regards > Rasha > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From r.oostenveld at donders.ru.nl Tue Jul 8 17:41:24 2014 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 8 Jul 2014 17:41:24 +0200 Subject: [FieldTrip] Fwd: Job opening: 7 PhD positions in Dutch Research Consortium "Language in Interaction" References: <787977264.3752891.1404822317386.JavaMail.root@draco.zimbra.ru.nl> Message-ID: Begin forwarded message: > From: "Lorenz, C.M." > Subject: Job opening: 7 PhD positions in Dutch Research Consortium "Language in Interaction" > > Seven PhD Positions in the Dutch Research Consortium 'Language in Interaction' > > > Closing date: 30 September 2014 > For more information: http://www.languageininteraction.nl/jobs/id-2nd-phd-call-general.html > > We are looking for highly motivated PhD candidates to enrich a unique consortium of researchers that aims to unravel the neurocognitive mechanisms of language at multiple levels. The goal is to understand both the universality and the variability of the human language faculty from genes to behaviour. > > The Netherlands has an outstanding track record in the language sciences. This research consortium sponsored by a large grant from the Netherlands Organization for Scientific research (NWO) brings together many of the excellent research groups in the Netherlands with a research programme on the foundations of language. The research team consists of 43 Principal Investigators. In addition to the excellence in the domain of language and related relevant fields of cognition, our consortium provides state-of-the-art research facilities and a research team with ample experience in the complex research methods that will be invoked to address the scientific questions at the highest level of methodological sophistication. These include methods from genetics, neuroimaging, computational modelling, and patient-related research. This consortium realizes both quality and critical mass for studying human language at a scale not easily found anywhere else. > > Currently, the consortium advertises seven PhD positions for a period of 4 years. Depending on the PhD position applied for, candidates will be appointed at one of the home institutions of the consortium. These positions provide the opportunity for conducting world-class research as a member of an interdisciplinary team. > > Click for more information on the PhD positions and how to apply: > http://www.languageininteraction.nl/jobs/id-2nd-phd-call-general.html > > > Carolin Lorenz > Secretary - Language in Interaction Consortium > Radboud University | Donders Centre for Cognitive Neuroimaging (DCCN) | room 0.78 > Kapittelweg 29, 6525 EN Nijmegen, The Netherlands | P.O. Box 9101, 6500 HB, Nijmegen, The Netherlands | > T: +31 (0)24 3666272 | E: C.Lorenz at donders.ru.nl| Office hours: 8.30-14 hr on Mon, Tue, Thur, Fri -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Wed Jul 9 01:49:06 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Tue, 8 Jul 2014 23:49:06 +0000 Subject: [FieldTrip] Problems with Scalp Model Message-ID: <238FF095-5F42-491C-8B2F-1C552E6A7CE3@dartmouth.edu> Hello, I am trying to produce the volume conduction model of some MRI data that I have, and I am having a problem with the production of the Scalp Model (Attached Below). I believe the problem may be stemming from the segmentation process, but I am not completely sure. Is there any option that will allow me to get rid of the extraneous figures in the scalp model? Help is greatly appreciated. Isaiah Smith -------------- next part -------------- A non-text attachment was scrubbed... Name: Scalp FieldTrip Model .fig Type: application/x-matlab-figure Size: 15139 bytes Desc: Scalp FieldTrip Model .fig URL: From haiderrasha at yahoo.com Wed Jul 9 07:59:44 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Tue, 8 Jul 2014 22:59:44 -0700 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates In-Reply-To: <53BBA507.8060402@donders.ru.nl> References: <1404794694.74187.YahooMailNeo@web124901.mail.ne1.yahoo.com> <53BBA507.8060402@donders.ru.nl> Message-ID: <1404885584.48607.YahooMailNeo@web124902.mail.ne1.yahoo.com> Dear Jörn, thank you for your reply, actually I didn't send many emails because I didn't receive any reply directly, the problem was that each time I sent the email I received a failure email mentioning that my email was not delivered so I had to resent it again. My apologies for this I don't know what was the problem. I will follow your advise hoping to get some results. Regards Rasha ________________________________ From: Jörn M. Horschig To: FieldTrip discussion list Sent: Tuesday, July 8, 2014 4:00 PM Subject: Re: [FieldTrip] Coregistration using fixed fiducials coordinates Hi Rasha, you can call ft_determine_coordsys, or set the field manually if you what coordinate system the MRI is in. You could have also used the search function of the fieldtrip wiki (on the upper right on the page), e.g. by searching for coordinate system: http://fieldtrip.fcdonders.nl/?do=search&id=coordinate+system This leads to a page that lists all pages on which the term coordinate system occur. You can see that the first match links to a FAQ, which also hints to ft_determine_coordsys. FAQs can also be found when navigating to "User documentation" and then "Frequently asked questions". We spent quite some time to list a number of questions and detailled answers there. The answers are mostly more extensive than the question alone, so any question that might be remotely related to your actual question might be of interest there. However, please don't be afraid to ask any further questions, just notice that we're all doing this here besides our research, so sometimes it might take a bit longer for us to respond than within a few hours. Any search that you do in advance on the FT wiki is time that we do not have to spend ;) So, please don't send the same message five times within not even a week, once a week should be enough ;) Best, Jörn On 7/8/2014 6:44 AM, Rasha Haider wrote: > Dear fieldtrip experts, > Im trying to do source localization for simulated EEG data, for this I > followed the tutorial in page: > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate > > I was trying to use the mri image provided by fieldtrip > (Subject01.mri) and EEG template (standard_1020.elc) in my work. > The mri image need to be re-aliened to the Talairach space for > coregistration with EEG space. In the tutorial you use > (ft_volumerealien) to do that using interactive method. > I have two questions: > > First, how can I do the coregistration using fixed coordinates of the > 3 fiducials (nasion, left pr, right pr), in other words how can I get > the coordinates of the fiducials in both Talairach and EEG spaces to > do the coregistration using the script only not manually. > > Second, I tried to use the mri image provided by the spm toolbox > because its already aliened to Talairach space, but when I try to do > segmentation I get error that coordinates field does not exist: > > ??? Reference to non-existent field 'coordsys'. > > Error in ==> ft_volumesegment at 284 >  original.coordsys  = mri.coordsys; > > Error in ==> segmentation_spm_mri at 24 > seg          = ft_volumesegment(cfg, mrirs); > > I read the image using (ft_read_mri) function, I don't find the field > specified for the coordinates: > > disp(mri) >          dim: [177 240 256] >      anatomy: [177x240x256 double] >          hdr: [1x1 struct] >    transform: [4x4 double] >          unit: 'mm' > > How can I solve this problem so I can use the mri image in SPM for > further analysing in fieldtrip? > > Sorry for the long email I would be thankful for any help. > Regards > Rasha > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel:    +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From elisa.filevich at gmail.com Wed Jul 9 10:23:49 2014 From: elisa.filevich at gmail.com (elisa filevich) Date: Wed, 9 Jul 2014 10:23:49 +0200 Subject: [FieldTrip] Deadline extended for Frontiers in Psychology research topic: Awareness of intentional processes and its relationship to theories of consciousness Message-ID: <59DF1A32-CA31-4918-BFBC-5BBF2D7732FC@gmail.com> Dear all, We have extended the deadline for submission of manuscripts to our Frontiers in Psychology Research Topic on Awareness of intentional processes and its relationship to theories of consciousness to the 31st of December, 2014. For more information see the following link, or the description below http://www.frontiersin.org/Consciousness_Research/researchtopics/Awareness_of_intentional_proce/2762 Best wishes Elisa Filevich ---------- Awareness of intentional processes and its relationship to theories of consciousness Stimuli present ‘in the world’, external to the brain, can elicit a direct neural response, and eventually access consciousness. Behavioral and neurophysiological experiments have used these external stimuli to build, test and refine theories of how conscious perception might occur. But perceptual processes are not the only ones capable of accessing consciousness. We can become aware of internally generated intentions, urges and emotional states. Importantly, these signals are ‘internally generated’ in the sense that they do not depend directly on afferent signals. Despite the strong parallelisms between the conscious perception of externally- and internally-generated information, theories of consciousness have rarely incorporated data from awareness of intentions. This is perhaps due to the difficulties in reliably manipulating internally generated processes. However, and for example, a growing body of data on topics such as awareness of agency, and metacognitive monitoring of intentions shows that research on the awareness of intentions is indeed possible. Importantly, each paradigm and method has specific strengths, and exploring multiple kinds of data can often lead to a rich span of competing theories to explain them. For example, subliminal priming experiments have been used to develop the Global Workspace theory, whilst tasks including subjective reports of awareness have informed Higher Order theories, and brain functional connectivity data have offered possible implementations for the Information Integration theory. Including the often-neglected conscious perception of internally generated processes may enrich, or strengthen, some of the existing theories of consciousness. We therefore welcome both theoretical and empirical contributions, in the hope to explore the feasibility of incorporating the awareness of internal processes into theories of consciousness. We encourage submissions reporting novel experimental paradigms that may help advance in this direction. Specifically, we ask whether this research program can offer any novel insights, or raise any new challenges, for theories of consciousness. --- Elisa Filevich Postdoctoral Fellow E-Mail: filevich at mpib-berlin.mpg.de http://www.mpib-berlin.mpg.de/de/mitarbeiter/elisa-filevich Max-Planck-Institut für Bildungsforschung Max Planck Institute for Human Development Lentzeallee 94 14195 Berlin -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 5443 bytes Desc: not available URL: From niccol000 at yahoo.it Wed Jul 9 16:35:57 2014 From: niccol000 at yahoo.it (=?iso-8859-1?Q?Niccol=C3=B2_Pescetelli?=) Date: Wed, 9 Jul 2014 15:35:57 +0100 Subject: [FieldTrip] Conflicting pca functions in Matlab and FT Message-ID: <1404916557.89645.YahooMailNeo@web171605.mail.ir2.yahoo.com> Hi! I just noted that fieldtrip has a function called pca.m to perform principal component analysis. The problem with this is that also the standard MATLAB toolbox contains a pca.m function to perform PCA, but the two functions are not compatible with each other and cause unwanted calls depending on the position in your search path. For example at the moment I want to use the MATLAB pca function to analyse behavioural data, but at some point I might need the FT pca one ot analyse MEG data. How can I fix this bug? I think changing the name to the function in FT is going to be risky Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Jul 9 16:45:18 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 9 Jul 2014 16:45:18 +0200 Subject: [FieldTrip] Conflicting pca functions in Matlab and FT In-Reply-To: <1404916557.89645.YahooMailNeo@web171605.mail.ir2.yahoo.com> References: <1404916557.89645.YahooMailNeo@web171605.mail.ir2.yahoo.com> Message-ID: Hi, To my knowledge, the only pca.m is included in /external/dmlt/external/murphy/. This is rarely used. The PCA analysis performed by ft_componentanalysis is implemented inline in that function (as it is a very straightforward algorithm). The /external/dmlt/ is, I believe, not added to the path by ft_defaults, so it should not conflict if you add FieldTrip to your path properly (i.e. by *not* using addpath(genpath( wrote: > Hi! > > I just noted that fieldtrip has a function called pca.m to perform principal > component analysis. > The problem with this is that also the standard MATLAB toolbox contains a > pca.m function to perform PCA, but the two functions are not compatible with > each other and cause unwanted calls depending on the position in your search > path. For example at the moment I want to use the MATLAB pca function to > analyse behavioural data, but at some point I might need the FT pca one ot > analyse MEG data. > > How can I fix this bug? I think changing the name to the function in FT is > going to be risky > > > Thanks! > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From marc.lalancette at sickkids.ca Wed Jul 9 17:50:42 2014 From: marc.lalancette at sickkids.ca (Marc Lalancette) Date: Wed, 9 Jul 2014 15:50:42 +0000 Subject: [FieldTrip] Beamformers: SAM vs LCMV vs LCMV fixedori Message-ID: <2A2B6A5B8C4C174CBCCE0B45E548DEB229F967A1@SKMBXX01.sickkids.ca> Hi Max, The formulae are different even when using LCMV with the same fixed orientation as the one found by SAM. For example, the power formulae, with hopefully clear enough notation (o is orientation vector), and assuming unit-gain weight normalization for simplicity: scalar: w(o)' R w(o) = 1 / [o' L' R^-1 L o] 1-d vector: o' W' R W o = o' [L' R^-1 L]^-1 o Of course, if using different software, there might also be differences in what weight normalization is used, how the data is filtered, whether or not a baseline or "DC offset" is subtracted, etc. Note of potential interest: I'm preparing a poster for Biomag with information on scalar and vector beamformers, with emphasis on the issue of rotational invariance since it is a common issue in the literature and in some software: that some formulae are not rotationally invariant, i.e. the results depend on how the coordinate system is defined/oriented. This is obviously not acceptable for any physically significant measure. Regarding Fieldtrip itself, the only such issue I found is the (mostly hidden, thus probably not typically used) option to normalize lead fields by column. Cheers, Marc Lalancette Lab Research Project Manager The Hospital for Sick Children, Department of Diagnostic Imaging, Program in Neurosciences and Mental Health Research MEG lab, Room S742, 555 University Avenue, Toronto, ON, M5G 1X8 416-813-7654 x201535 Date: Wed, 2 Jul 2014 10:10:02 -0400 From: Max Cantor To: FieldTrip discussion list Subject: [FieldTrip] Beamformers: SAM vs LCMV vs LCMV fixedori Message-ID: Content-Type: text/plain; charset="utf-8" Hi Fieldtrip, We are currently using the SAM beamformer for source localization, but are thinking of switching to LCMV. Given the research I've read, the vector beamformer approach should, for our purposes, be more efficient and be as, if not more accurate than scalar. However, other than the vector/scalar difference, I don't have a great understanding of what other differences exist between the two beamformers. To test the differences, I've run SAM, LCMV, and LCMV with fixed orientation (making it scalar), with both our real data and with simulated data, and while SAM and LCMV fixedori are more similar to each other than either are when compared to LCMV without fixedori (particularly with the simulation, less so with our real data), they are still visibly different from each other. This suggests to me that there are other potentially meaningful differences between SAM and LCMV besides the scalar/vector difference, and I want to make sure I have at least some idea of what those differences are before I commit to the change. That being said, I get the feeling that these differences may be more nuanced than I can decipher on my own, so if anyone can explain to me what these differences are and if they are important, I would greatly appreciate it. Thanks, Max -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan ________________________________ This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. From mcantor at umich.edu Wed Jul 9 20:05:26 2014 From: mcantor at umich.edu (Max Cantor) Date: Wed, 9 Jul 2014 14:05:26 -0400 Subject: [FieldTrip] Beamformers: SAM vs LCMV vs LCMV fixedori In-Reply-To: <2A2B6A5B8C4C174CBCCE0B45E548DEB229F967A1@SKMBXX01.sickkids.ca> References: <2A2B6A5B8C4C174CBCCE0B45E548DEB229F967A1@SKMBXX01.sickkids.ca> Message-ID: Thanks Marc, Hopefully this can explain some of the differences I'm seeing between the beamformers with our data and help me determine if they are significant for our purposes. Good luck with the poster! I'm not sure if this is what you were getting at, but if it is made publicly available online I would certainly be interested in reading it, thank you. On Wed, Jul 9, 2014 at 11:50 AM, Marc Lalancette < marc.lalancette at sickkids.ca> wrote: > Hi Max, > > The formulae are different even when using LCMV with the same fixed > orientation as the one found by SAM. > For example, the power formulae, with hopefully clear enough notation (o > is orientation vector), and assuming unit-gain weight normalization for > simplicity: > scalar: w(o)' R w(o) = 1 / [o' L' R^-1 L o] > 1-d vector: o' W' R W o = o' [L' R^-1 L]^-1 o > > Of course, if using different software, there might also be differences in > what weight normalization is used, how the data is filtered, whether or not > a baseline or "DC offset" is subtracted, etc. > > Note of potential interest: I'm preparing a poster for Biomag with > information on scalar and vector beamformers, with emphasis on the issue of > rotational invariance since it is a common issue in the literature and in > some software: that some formulae are not rotationally invariant, i.e. the > results depend on how the coordinate system is defined/oriented. This is > obviously not acceptable for any physically significant measure. Regarding > Fieldtrip itself, the only such issue I found is the (mostly hidden, thus > probably not typically used) option to normalize lead fields by column. > > Cheers, > > Marc Lalancette > Lab Research Project Manager > The Hospital for Sick Children, Department of Diagnostic Imaging, Program > in Neurosciences and Mental Health > Research MEG lab, Room S742, 555 University Avenue, Toronto, ON, M5G 1X8 > 416-813-7654 x201535 > > > Date: Wed, 2 Jul 2014 10:10:02 -0400 > From: Max Cantor > To: FieldTrip discussion list > Subject: [FieldTrip] Beamformers: SAM vs LCMV vs LCMV fixedori > Message-ID: > q_pm9wFB5FZ-_L0A at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi Fieldtrip, > > We are currently using the SAM beamformer for source localization, but are > thinking of switching to LCMV. Given the research I've read, the vector > beamformer approach should, for our purposes, be more efficient and be as, > if not more accurate than scalar. > > However, other than the vector/scalar difference, I don't have a great > understanding of what other differences exist between the two beamformers. > To test the differences, I've run SAM, LCMV, and LCMV with fixed > orientation (making it scalar), with both our real data and with simulated > data, and while SAM and LCMV fixedori are more similar to each other than > either are when compared to LCMV without fixedori (particularly with the > simulation, less so with our real data), they are still visibly different > from each other. This suggests to me that there are other potentially > meaningful differences between SAM and LCMV besides the scalar/vector > difference, and I want to make sure I have at least some idea of what those > differences are before I commit to the change. > > That being said, I get the feeling that these differences may be more > nuanced than I can decipher on my own, so if anyone can explain to me what > these differences are and if they are important, I would greatly appreciate > it. > > Thanks, > > Max > > -- > Max Cantor > Lab Manager > Computational Neurolinguistics Lab > University of Michigan > > ________________________________ > > This e-mail may contain confidential, personal and/or health > information(information which may be subject to legal restrictions on use, > retention and/or disclosure) for the sole use of the intended recipient. > Any review or distribution by anyone other than the person for whom it was > originally intended is strictly prohibited. If you have received this > e-mail in error, please contact the sender and delete all copies. > -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From lid.mijas at gmail.com Wed Jul 9 20:18:23 2014 From: lid.mijas at gmail.com (Lidia Mijas) Date: Wed, 9 Jul 2014 19:18:23 +0100 Subject: [FieldTrip] surrogates for Phase lag index Message-ID: Hi all, I am wondering if fieldtrip has any options for computing surrogates? I am tryng to assess confidence level for my Phase Lag Index results ( to determine whether it is significantly larger then 0) But maybe someone has a better idea how to do it? Not sure if it matters so just to mentioned that my PLI was computed at the source level on beamformed signals. Many thanks for any suggestion. Lidia -------------- next part -------------- An HTML attachment was scrubbed... URL: From rikkert.hindriks at upf.edu Wed Jul 9 20:39:41 2014 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Wed, 9 Jul 2014 20:39:41 +0200 Subject: [FieldTrip] surrogates for Phase lag index In-Reply-To: References: Message-ID: Hi Lidia, I have the same question and I don't think the answer is trivial: one would have to construct pairs of surrogate time-series under the nullhypothesis of zero phase-lag-index. With other words: construct pairs of time-series who's instantaneous phases are coupled to the same extent as the recorded time-series but with zero lag. In my case, the question is how to test for a significant lag via the cross-correlation function. Kind regards, Rikkert On Wed, Jul 9, 2014 at 8:18 PM, Lidia Mijas wrote: > Hi all, > > I am wondering if fieldtrip has any options for computing surrogates? > I am tryng to assess confidence level for my Phase Lag Index results ( to > determine whether it is significantly larger then 0) > > But maybe someone has a better idea how to do it? > Not sure if it matters so just to mentioned that my PLI was computed at > the source level on beamformed signals. > > Many thanks for any suggestion. > > Lidia > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bastien.b1 at gmail.com Wed Jul 9 21:01:35 2014 From: bastien.b1 at gmail.com (Bastien Boutonnet) Date: Wed, 9 Jul 2014 14:01:35 -0500 Subject: [FieldTrip] surrogates for Phase lag index In-Reply-To: References: Message-ID: I guess I will tag along to this discussion, in saying that I have been having the same burning question for a while. My issues have been along those lines: when I run some kinds of connectivity analyses (be it PLI, wPLI or PLV), how do I make sure the values I obtain are "legal" (or different from 0). B – Bastien Boutonnet, Ph. D. Postdoctoral Research Associate Department of Psychology University of Wisconsin, Madison bastienboutonnet.com On 9 July 2014 13:39, HINDRIKS, RIKKERT wrote: > Hi Lidia, > > I have the same question and I don't think the answer is trivial: one > would have to construct pairs of surrogate time-series under the > nullhypothesis of zero phase-lag-index. With other words: construct pairs > of time-series who's instantaneous phases are coupled > to the same extent as the recorded time-series but with zero lag. In my > case, the question is how to test for a significant lag via the > cross-correlation function. > > > Kind regards, > Rikkert > > > On Wed, Jul 9, 2014 at 8:18 PM, Lidia Mijas wrote: > >> Hi all, >> >> I am wondering if fieldtrip has any options for computing surrogates? >> I am tryng to assess confidence level for my Phase Lag Index results ( to >> determine whether it is significantly larger then 0) >> >> But maybe someone has a better idea how to do it? >> Not sure if it matters so just to mentioned that my PLI was computed at >> the source level on beamformed signals. >> >> Many thanks for any suggestion. >> >> Lidia >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rikkert.hindriks at upf.edu Wed Jul 9 21:42:04 2014 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Wed, 9 Jul 2014 21:42:04 +0200 Subject: [FieldTrip] surrogates for Phase lag index In-Reply-To: References: Message-ID: Constructing surrogate time-series for PLV is more straightforward since, in this case, the nullhypothesis is the absence of phase-locking. Surrogate pairs of time-series can be constructed for example by phase-randomization in the Fourier domain. Rikkert On Wed, Jul 9, 2014 at 9:01 PM, Bastien Boutonnet wrote: > I guess I will tag along to this discussion, in saying that I have been > having the same burning question for a while. > > My issues have been along those lines: when I run some kinds of > connectivity analyses (be it PLI, wPLI or PLV), how do I make sure the > values I obtain are "legal" (or different from 0). > > B > > – > Bastien Boutonnet, Ph. D. > Postdoctoral Research Associate > Department of Psychology > University of Wisconsin, Madison > bastienboutonnet.com > > > On 9 July 2014 13:39, HINDRIKS, RIKKERT wrote: > >> Hi Lidia, >> >> I have the same question and I don't think the answer is trivial: one >> would have to construct pairs of surrogate time-series under the >> nullhypothesis of zero phase-lag-index. With other words: construct pairs >> of time-series who's instantaneous phases are coupled >> to the same extent as the recorded time-series but with zero lag. In my >> case, the question is how to test for a significant lag via the >> cross-correlation function. >> >> >> Kind regards, >> Rikkert >> >> >> On Wed, Jul 9, 2014 at 8:18 PM, Lidia Mijas wrote: >> >>> Hi all, >>> >>> I am wondering if fieldtrip has any options for computing surrogates? >>> I am tryng to assess confidence level for my Phase Lag Index results ( >>> to determine whether it is significantly larger then 0) >>> >>> But maybe someone has a better idea how to do it? >>> Not sure if it matters so just to mentioned that my PLI was computed at >>> the source level on beamformed signals. >>> >>> Many thanks for any suggestion. >>> >>> Lidia >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bastien.b1 at gmail.com Wed Jul 9 22:10:38 2014 From: bastien.b1 at gmail.com (Bastien Boutonnet) Date: Wed, 9 Jul 2014 15:10:38 -0500 Subject: [FieldTrip] surrogates for Phase lag index In-Reply-To: References: Message-ID: That makes sense. How would you implement phase-randomisation? Is it similar to estimating the connectivity between the same pairs of electrodes but with data coming from different trials? Or even simpler? My interest to know about PLI/wPLI however still holds. B – Bastien Boutonnet, Ph. D. Postdoctoral Research Associate Department of Psychology University of Wisconsin, Madison bastienboutonnet.com On 9 July 2014 14:42, HINDRIKS, RIKKERT wrote: > Constructing surrogate time-series for PLV is more straightforward since, > in this case, the nullhypothesis is the absence of phase-locking. > Surrogate pairs of time-series can be constructed for example by > phase-randomization in the Fourier domain. > > Rikkert > > > On Wed, Jul 9, 2014 at 9:01 PM, Bastien Boutonnet > wrote: > >> I guess I will tag along to this discussion, in saying that I have been >> having the same burning question for a while. >> >> My issues have been along those lines: when I run some kinds of >> connectivity analyses (be it PLI, wPLI or PLV), how do I make sure the >> values I obtain are "legal" (or different from 0). >> >> B >> >> – >> Bastien Boutonnet, Ph. D. >> Postdoctoral Research Associate >> Department of Psychology >> University of Wisconsin, Madison >> bastienboutonnet.com >> >> >> On 9 July 2014 13:39, HINDRIKS, RIKKERT wrote: >> >>> Hi Lidia, >>> >>> I have the same question and I don't think the answer is trivial: one >>> would have to construct pairs of surrogate time-series under the >>> nullhypothesis of zero phase-lag-index. With other words: construct >>> pairs of time-series who's instantaneous phases are coupled >>> to the same extent as the recorded time-series but with zero lag. In my >>> case, the question is how to test for a significant lag via the >>> cross-correlation function. >>> >>> >>> Kind regards, >>> Rikkert >>> >>> >>> On Wed, Jul 9, 2014 at 8:18 PM, Lidia Mijas wrote: >>> >>>> Hi all, >>>> >>>> I am wondering if fieldtrip has any options for computing surrogates? >>>> I am tryng to assess confidence level for my Phase Lag Index results ( >>>> to determine whether it is significantly larger then 0) >>>> >>>> But maybe someone has a better idea how to do it? >>>> Not sure if it matters so just to mentioned that my PLI was computed at >>>> the source level on beamformed signals. >>>> >>>> Many thanks for any suggestion. >>>> >>>> Lidia >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Thu Jul 10 00:55:18 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Wed, 9 Jul 2014 22:55:18 +0000 Subject: [FieldTrip] Problems with Scalp Model Message-ID: <73A7ED2B-6B6F-49C8-BF36-EEDA80B054A3@dartmouth.edu> Hello, I am trying to produce the volume conduction model of some MRI data that I have, and I am having a problem with the production of the Scalp Model (Attached Below). I believe the problem may be stemming from the segmentation process, but I am not completely sure. Is there any option that will allow me to get rid of the extraneous figures in the scalp model? Help is greatly appreciated. Isaiah Smith -------------- next part -------------- A non-text attachment was scrubbed... Name: Scalp FieldTrip Model .fig Type: application/x-matlab-figure Size: 15139 bytes Desc: Scalp FieldTrip Model .fig URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ATT00001.txt URL: From Isaiah.C.Smith.17 at dartmouth.edu Thu Jul 10 09:50:09 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Thu, 10 Jul 2014 07:50:09 +0000 Subject: [FieldTrip] Help with Volume Conduction Model Message-ID: <77D42DF8-54FB-4629-BEA4-1A008DAE687D@dartmouth.edu> Hello, I am having trouble with a specific tissue output in the segmentation process. How do I explore the output of the segmentation and look at the voxel-by-voxel assignment of a specific tissue type? Then how do I tweak the parameters and/or edit manually segmentation before making a mesh model? Isaiah Smith From thomas.wunderle at esi-frankfurt.de Thu Jul 10 11:14:08 2014 From: thomas.wunderle at esi-frankfurt.de (Wunderle, Thomas) Date: Thu, 10 Jul 2014 09:14:08 +0000 Subject: [FieldTrip] Problem in ft_checkconfig Message-ID: <27E5CAD9145EEC41BB9B34C01716A1987131AFEA@UM-EXCDAG-A01.um.gwdg.de> Hi all, apparently there was a change in "ft_checkconfig" which makes a problem when using functions related to spike analysis. When running "ft_spiketriggeredspectrum", there comes the following error message (FieldTrip version r9719): ??? Error using ==> ft_checkconfig at 205 The field cfg.progress is not allowed I put the whole code into bugzilla: Bug 2641 - Error in ft_checkconfig using ft_spiketriggeredspectrum Using FieldTrip version r8941 does not produce the error. I'm running Matlab R2011a on Linux. Best, Thomas ----- Dr. Thomas Wunderle Ernst Strüngmann Institute (ESI) for Neuroscience in Cooperation with Max Planck Society Deutschordenstrasse 46 60528 Frankfurt am Main, Germany www.esi-frankfurt.de thomas.wunderle at esi-frankfurt.de Tel: +49 69 96769 516 Fax: +49 69 96769 555 Sitz der Gesellschaft: Frankfurt am Main Registergericht: Amtsgericht Frankfurt - HRB 84266 Geschäftsführer: Prof. Dr. Pascal Fries -------------- next part -------------- An HTML attachment was scrubbed... URL: From paymandomorientes at yahoo.com Thu Jul 10 13:22:35 2014 From: paymandomorientes at yahoo.com (paymando- morientes) Date: Thu, 10 Jul 2014 04:22:35 -0700 Subject: [FieldTrip] variable "abort" Message-ID: <1404991355.38752.YahooMailNeo@web141606.mail.bf1.yahoo.com> Dear all I have a problem starting with field trip. When I call "ft_definevarible" function, it throws an error that "abort" variable is not defined. I checked the ".m file" for the function and it says that abort is set by "ft_preamble" function. So where is the problem? Should I change something in my script? or "ft_preamble" function is not doing its job? by the way i hope I am sending this message to the right e-mail. thanks in advance payman -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Thu Jul 10 13:40:12 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 10 Jul 2014 13:40:12 +0200 (CEST) Subject: [FieldTrip] variable "abort" In-Reply-To: <1404991355.38752.YahooMailNeo@web141606.mail.bf1.yahoo.com> References: <1404991355.38752.YahooMailNeo@web141606.mail.bf1.yahoo.com> Message-ID: <015201cf9c33$b5a9e830$20fdb890$@herring@fcdonders.ru.nl> Dear Payman, As far as I can tell there is no function called ft_definevarible, could you please recheck which function is given you problems? Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of paymando- morientes Sent: donderdag 10 juli 2014 13:23 To: fieldtrip at science.ru.nl Subject: [FieldTrip] variable "abort" Dear all I have a problem starting with field trip. When I call "ft_definevarible" function, it throws an error that "abort" variable is not defined. I checked the ".m file" for the function and it says that abort is set by "ft_preamble" function. So where is the problem? Should I change something in my script? or "ft_preamble" function is not doing its job? by the way i hope I am sending this message to the right e-mail. thanks in advance payman -------------- next part -------------- An HTML attachment was scrubbed... URL: From rikkert.hindriks at upf.edu Thu Jul 10 16:41:04 2014 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Thu, 10 Jul 2014 16:41:04 +0200 Subject: [FieldTrip] surrogates for Phase lag index In-Reply-To: References: Message-ID: http://www.vis.caltech.edu/~rodri/papers/PNB.pdf On Wed, Jul 9, 2014 at 10:10 PM, Bastien Boutonnet wrote: > That makes sense. How would you implement phase-randomisation? Is it > similar to estimating the connectivity between the same pairs of electrodes > but with data coming from different trials? Or even simpler? > > My interest to know about PLI/wPLI however still holds. > > B > > – > Bastien Boutonnet, Ph. D. > Postdoctoral Research Associate > Department of Psychology > University of Wisconsin, Madison > bastienboutonnet.com > > > On 9 July 2014 14:42, HINDRIKS, RIKKERT wrote: > >> Constructing surrogate time-series for PLV is more straightforward since, >> in this case, the nullhypothesis is the absence of phase-locking. >> Surrogate pairs of time-series can be constructed for example by >> phase-randomization in the Fourier domain. >> >> Rikkert >> >> >> On Wed, Jul 9, 2014 at 9:01 PM, Bastien Boutonnet >> wrote: >> >>> I guess I will tag along to this discussion, in saying that I have been >>> having the same burning question for a while. >>> >>> My issues have been along those lines: when I run some kinds of >>> connectivity analyses (be it PLI, wPLI or PLV), how do I make sure the >>> values I obtain are "legal" (or different from 0). >>> >>> B >>> >>> – >>> Bastien Boutonnet, Ph. D. >>> Postdoctoral Research Associate >>> Department of Psychology >>> University of Wisconsin, Madison >>> bastienboutonnet.com >>> >>> >>> On 9 July 2014 13:39, HINDRIKS, RIKKERT >>> wrote: >>> >>>> Hi Lidia, >>>> >>>> I have the same question and I don't think the answer is trivial: one >>>> would have to construct pairs of surrogate time-series under the >>>> nullhypothesis of zero phase-lag-index. With other words: construct >>>> pairs of time-series who's instantaneous phases are coupled >>>> to the same extent as the recorded time-series but with zero lag. In my >>>> case, the question is how to test for a significant lag via the >>>> cross-correlation function. >>>> >>>> >>>> Kind regards, >>>> Rikkert >>>> >>>> >>>> On Wed, Jul 9, 2014 at 8:18 PM, Lidia Mijas >>>> wrote: >>>> >>>>> Hi all, >>>>> >>>>> I am wondering if fieldtrip has any options for computing surrogates? >>>>> I am tryng to assess confidence level for my Phase Lag Index results ( >>>>> to determine whether it is significantly larger then 0) >>>>> >>>>> But maybe someone has a better idea how to do it? >>>>> Not sure if it matters so just to mentioned that my PLI was computed >>>>> at the source level on beamformed signals. >>>>> >>>>> Many thanks for any suggestion. >>>>> >>>>> Lidia >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bastien.b1 at gmail.com Thu Jul 10 16:58:13 2014 From: bastien.b1 at gmail.com (Bastien Boutonnet) Date: Thu, 10 Jul 2014 09:58:13 -0500 Subject: [FieldTrip] surrogates for Phase lag index In-Reply-To: References: Message-ID: This doesn't seem to be mentioning PLI related stuff. Any more descriptive help? B – Bastien Boutonnet, Ph. D. Postdoctoral Research Associate Department of Psychology University of Wisconsin, Madison bastienboutonnet.com On 10 July 2014 09:41, HINDRIKS, RIKKERT wrote: > http://www.vis.caltech.edu/~rodri/papers/PNB.pdf > > > On Wed, Jul 9, 2014 at 10:10 PM, Bastien Boutonnet > wrote: > >> That makes sense. How would you implement phase-randomisation? Is it >> similar to estimating the connectivity between the same pairs of electrodes >> but with data coming from different trials? Or even simpler? >> >> My interest to know about PLI/wPLI however still holds. >> >> B >> >> – >> Bastien Boutonnet, Ph. D. >> Postdoctoral Research Associate >> Department of Psychology >> University of Wisconsin, Madison >> bastienboutonnet.com >> >> >> On 9 July 2014 14:42, HINDRIKS, RIKKERT wrote: >> >>> Constructing surrogate time-series for PLV is more straightforward >>> since, in this case, the nullhypothesis is the absence of phase-locking. >>> Surrogate pairs of time-series can be constructed for example by >>> phase-randomization in the Fourier domain. >>> >>> Rikkert >>> >>> >>> On Wed, Jul 9, 2014 at 9:01 PM, Bastien Boutonnet >>> wrote: >>> >>>> I guess I will tag along to this discussion, in saying that I have been >>>> having the same burning question for a while. >>>> >>>> My issues have been along those lines: when I run some kinds of >>>> connectivity analyses (be it PLI, wPLI or PLV), how do I make sure the >>>> values I obtain are "legal" (or different from 0). >>>> >>>> B >>>> >>>> – >>>> Bastien Boutonnet, Ph. D. >>>> Postdoctoral Research Associate >>>> Department of Psychology >>>> University of Wisconsin, Madison >>>> bastienboutonnet.com >>>> >>>> >>>> On 9 July 2014 13:39, HINDRIKS, RIKKERT >>>> wrote: >>>> >>>>> Hi Lidia, >>>>> >>>>> I have the same question and I don't think the answer is trivial: one >>>>> would have to construct pairs of surrogate time-series under the >>>>> nullhypothesis of zero phase-lag-index. With other words: construct >>>>> pairs of time-series who's instantaneous phases are coupled >>>>> to the same extent as the recorded time-series but with zero lag. In >>>>> my case, the question is how to test for a significant lag via the >>>>> cross-correlation function. >>>>> >>>>> >>>>> Kind regards, >>>>> Rikkert >>>>> >>>>> >>>>> On Wed, Jul 9, 2014 at 8:18 PM, Lidia Mijas >>>>> wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> I am wondering if fieldtrip has any options for computing surrogates? >>>>>> I am tryng to assess confidence level for my Phase Lag Index results >>>>>> ( to determine whether it is significantly larger then 0) >>>>>> >>>>>> But maybe someone has a better idea how to do it? >>>>>> Not sure if it matters so just to mentioned that my PLI was computed >>>>>> at the source level on beamformed signals. >>>>>> >>>>>> Many thanks for any suggestion. >>>>>> >>>>>> Lidia >>>>>> >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paymandomorientes at yahoo.com Thu Jul 10 20:23:50 2014 From: paymandomorientes at yahoo.com (paymando- morientes) Date: Thu, 10 Jul 2014 11:23:50 -0700 Subject: [FieldTrip] variable "abort" In-Reply-To: <015201cf9c33$b5a9e830$20fdb890$@herring@fcdonders.ru.nl> References: <1404991355.38752.YahooMailNeo@web141606.mail.bf1.yahoo.com> <015201cf9c33$b5a9e830$20fdb890$@herring@fcdonders.ru.nl> Message-ID: <1405016630.51075.YahooMailNeo@web141604.mail.bf1.yahoo.com> oh sorry  I mistyped it. I meant ft_definetrial. thanks for your help On Thursday, 10 July 2014, 13:40, "Herring, J.D. (Jim)" wrote: Dear Payman,   As far as I can tell there is no function called ft_definevarible, could you please recheck which function is given you problems?   Best,   Jim   From:fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of paymando- morientes Sent: donderdag 10 juli 2014 13:23 To: fieldtrip at science.ru.nl Subject: [FieldTrip] variable "abort"   Dear all I have a problem starting with field trip. When I call "ft_definevarible" function, it throws an error that "abort" variable is not defined. I checked the ".m file" for the function and it says that abort is set by "ft_preamble" function. So where is the problem? Should I change something in my script? or "ft_preamble" function is not doing its job? by the way i hope I am sending this message to the right e-mail.   thanks in advance payman -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Fri Jul 11 02:10:43 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Fri, 11 Jul 2014 00:10:43 +0000 Subject: [FieldTrip] Help with Volume Conduction Model Message-ID: <03FFEDF1-2980-493F-AE57-5FD329D625AF@dartmouth.edu> Hello, I am having trouble with a specific tissue output in the segmentation process. How do I explore the output of the segmentation and look at the voxel-by-voxel assignment of a specific tissue type? Then how do I tweak the parameters and/or edit manually segmentation before making a mesh model? Isaiah Smith From tyler.grummett at flinders.edu.au Fri Jul 11 03:31:11 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Fri, 11 Jul 2014 01:31:11 +0000 Subject: [FieldTrip] Thank you for beamformer help Message-ID: <1405042271282.5143@flinders.edu.au> Hello fieldtrip, I just wanted to thank the following people for helping me with my beamformer issues: Eelke Spaak, Roey Schurr, Matt craddock, Julian Keil and of course Jorn Horschig. For the sake of helping other, I want to collate the help so that it is all in one place. -------------------------------------- With the help of Roey Schurr and Matt craddock I calculated the headmodel as follows: % % load in template files temp = load( fullfile( matlabrootpath, 'Matlab', 'fieldtrip', ... 'template', 'headmodel', 'standard_mri.mat')); mri = temp.mri; clear temp % segment MRI (return probabilistic tissue maps of gray/white/csf % compartments cfg = []; cfg.write = 'no'; cfg.coordsys = 'spm'; cfg.output = { 'scalp', 'skull', 'brain'}; segmentedmri = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'iso2mesh'; cfg.numvertices = 10000; bnd = ft_prepare_mesh( cfg, segmentedmri); % fix mesh [ bnd( 1).pnt, bnd( 1).tri] = meshresample( bnd( 1).pnt, bnd( 1).tri, 1000/size( bnd( 1).pnt, 1)); [ bnd( 2).pnt, bnd( 2).tri] = meshresample( bnd( 2).pnt, bnd( 2).tri, 2000/size( bnd( 2).pnt, 1)); [ bnd( 3).pnt, bnd( 3).tri] = meshresample( bnd( 3).pnt, bnd( 3).tri, 3000/size( bnd( 3).pnt, 1)); for ii = 1:size( bnd), [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'dup'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'isolated'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'deep'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'meshfix'); end % calculate headmodel % reordered to brain skull scalp cfg = []; cfg.method = 'bemcp'; vol = ft_prepare_headmodel(cfg, bnd); clear bnd -------------------------------------- The electrode positions were fixed from literally taking the electrode positions from the template, at first I interpreted Matt's suggestions as using a function to do it. It is very clear that just copying the positions are the way to go. % Get electrode positions from template temp_electrodes = ft_read_sens( fullfile( matlabrootpath, 'Matlab', 'fieldtrip', ... 'template', 'electrode', 'standard_1005.elc')); match = ismember( temp_electrodes.label, data.elec.label); temp_pos = temp_electrodes.chanpos( match, :); data.elec.label = temp_electrodes.label( match); data.elec.chanpos = temp_pos; data.elec.elecpos = data.elec.chanpos; % add LPA RPA and Nasian labels data.elec.label{ end+1} = temp_electrodes.label{ 1}; data.elec.label{ end+1} = temp_electrodes.label{ 2}; data.elec.label{ end+1} = temp_electrodes.label{ 3}; % add LPA RPA and Nasian positions data.elec.chanpos( end+1, :) = temp_electrodes.chanpos( 1, :); data.elec.chanpos( end+1, :) = temp_electrodes.chanpos( 2, :); data.elec.chanpos( end+1, :) = temp_electrodes.chanpos( 3, :); data.elec.elecpos = data.elec.chanpos; -------------------------------------- Then finally the sourcemodel can be calculated: % calculate sourcemodel cfg = []; cfg.mri = mri; cfg.vol = vol; cfg.grid.warpmni = 'yes'; cfg.grid.template = template.sourcemodel; cfg.grid.nonlinear = 'yes'; cfg.moveinward = 1; % actually uses vol mesh cfg.inwardshift = 0; % needs to be expressed to work with moveinward cfg.elec = timelock.elec; sourcemodel = ft_prepare_sourcemodel( cfg); -------------------------------------- Thank you to everyone that has helped me. I gladly appreciate it. Im really sorry for all the emails as well. There will be another coming because the beamformer technique works for 2 datasets (out of four) and I cant work out why it isnt working for two datasets. Kind regards, Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Fri Jul 11 04:17:27 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Fri, 11 Jul 2014 02:17:27 +0000 Subject: [FieldTrip] Beamformer and two different datasets Message-ID: <1405045047076.88142@flinders.edu.au> Hello fieldtrip, As mentioned in my previous email, I had success at calculating beamformer with one dataset but not with another. The dropbox link to dataset1 is: https://www.dropbox.com/s/2nyps8pph7xszf0/Dataset1.mat The dropbox link to dataset2 is: https://www.dropbox.com/s/pkmkdv871y4w67z/Dataset2.mat In the datasets are structured in the following way: datasetx.data datasetx.timelock datasetx.vol datasetx.sourcemodel datasetx.grid datasetx.virtualchans datasetx.sourcemodel2 source wasnt included as it will make the file too big. The following code was used: ------------------------------------------------------------- %% timelock data cfg = []; cfg.channel = 'EEG'; cfg.vartrllength = 2; cfg.covariance = 'yes'; cfg.covariancewindow = 'all'; cfg.keeptrials = 'yes'; timelock = ft_timelockanalysis(cfg, data); ------------------------------------------------------------- %% create headmodel % segment MRI (return probabilistic tissue maps of gray/white/csf % compartments cfg = []; cfg.write = 'no'; cfg.coordsys = 'spm'; cfg.output = { 'scalp', 'skull', 'brain'}; segmentedmri = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'iso2mesh'; cfg.numvertices = 10000; bnd = ft_prepare_mesh( cfg, segmentedmri); % fix mesh [ bnd( 1).pnt, bnd( 1).tri] = meshresample( bnd( 1).pnt, bnd( 1).tri, 1000/size( bnd( 1).pnt, 1)); [ bnd( 2).pnt, bnd( 2).tri] = meshresample( bnd( 2).pnt, bnd( 2).tri, 2000/size( bnd( 2).pnt, 1)); [ bnd( 3).pnt, bnd( 3).tri] = meshresample( bnd( 3).pnt, bnd( 3).tri, 3000/size( bnd( 3).pnt, 1)); for ii = 1:size( bnd), [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'dup'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'isolated'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'deep'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'meshfix'); end % calculate headmodel % reordered to brain skull scalp cfg = []; cfg.method = 'bemcp'; %openmeeg doesnt work with multiple output from ft_volumesegment vol = ft_prepare_headmodel(cfg, bnd); clear bnd ------------------------------------------------------------- %% calculate sourcemodel cfg = []; cfg.mri = mri; cfg.vol = vol; cfg.grid.warpmni = 'yes'; cfg.grid.template = template.sourcemodel; cfg.grid.nonlinear = 'yes'; cfg.moveinward = 1; % actually uses vol mesh cfg.inwardshift = 0; % needs to be expressed to work with moveinward ​cfg.elec = timelock.elec; sourcemodel = ft_prepare_sourcemodel( cfg); ------------------------------------------------------------- %% beamformer calculation % compute lead field cfg = []; cfg.elec = timelock.elec; cfg.vol = vol; cfg.grid = sourcemodel; cfg.reducerank = 3; % 3 for EEG, 2 for MEG cfg.backproject = 'yes'; cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window grid = ft_prepare_leadfield( cfg, timelock); % Source Analysis: without contrasting condition cfg = []; cfg.channel = 'EEG'; cfg.method = 'lcmv'; cfg.grid = grid; cfg.vol = vol; cfg.keepfilter = 'yes'; cfg.lcmv.fixedori = 'yes'; % project on axis of most variance using SVD source = ft_sourceanalysis( cfg, timelock); ------------------------------------------------------------- %% map beamformer source locations onto an anatomical label in an atlas cfg = []; cfg.interpmethod = 'nearest'; cfg.parameter = 'tissue'; sourcemodel2 = ft_sourceinterpolate( cfg, atlas, sourcemodel); ------------------------------------------------------------- %% compute virtual channels % start building vchan vchan = []; label = lower( atlas.tissuelabel); label = label( 1:90); vchan.time = data.time; vchan.fsample = data.fsample; Ntr = numel( data.trial); vchan.trial = cell( 1, Ntr); % find sensor names and indices chans = ft_channelselection( 'EEG', data.label); chans = match_str( data.label, chans); count = 1; tic for i = 1:numel( label), atlas_sources = find( sourcemodel2.tissue == i); ai = ismember( atlas_sources, find( sourcemodel.inside)); bregion_sources = atlas_sources( ai); clear atlas_sources if isempty( bregion_sources), continue; end for f = 1:numel( bregion_sources), source_inx = bregion_sources( f); dipole_data = cell( 1, Ntr); % multiply spatial filter (3,Nchan) by the original data if isempty( source.avg.filter{ source_inx}), continue; end for tr = 1:Ntr, dipole_data{ tr} = source.avg.filter{ source_inx} * data.trial{ tr}(chans,:); end % concatenate data, run svd on data, multiple data by the % orientation of the dipole in which it is strongest time_series = cat( 2, dipole_data{ :}); [ U1, ~, ~] = svd( time_series, 'econ'); % u is the spatial decomposition, v the temporal and s the eigenvalues along diagonal for tr = 1:Ntr, % tt.trial{ tr}( f, :) = U1( :, 1)' * dipole_data{ tr}; tt.trial{ tr}( f, :) = dipole_data{ tr}; end clear source_inx dipole_data U1 timeseries end % mean channels with brain region for tr = 1:Ntr, vchan.trial{ tr}( i, :) = mean( tt.trial{ tr}); end % include position and power for each source vchan.label( count) = label( i); fprintf( 'created virtual channel %d\n', count); count = count + 1; clear tt U S sv si temp_data bregion_sources bregion_source end cfg = []; vchan = ft_preprocessing( cfg, vchan); -------------------------------------------------------------​ I will greatly appreciate the help once again. As beamformer is the basically the key element of my Phd I really want it to get it working. Kind regards, Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ali.b.sharif at gmail.com Fri Jul 11 11:43:41 2014 From: ali.b.sharif at gmail.com (Ali Bahramisharif) Date: Fri, 11 Jul 2014 11:43:41 +0200 Subject: [FieldTrip] problem with ft_checkconfig Message-ID: Hi , I have a problem with ft_spike_waveform. When I run it, it gives me the following error: Error using ==> ft_checkconfig at 205 The field cfg.progress is not allowed I debuged the code a bit and it seems to me that 'progress' should be added to the list of 'allowed' in line 192-200 of ft_checkconfing. Would this be a solution? The point is that the global variable 'ft_default' does have a field called 'progress'. I do not know where it is initiated, but it looks like it should be allowed. Ali -------------- next part -------------- An HTML attachment was scrubbed... URL: From deadala at freenet.de Fri Jul 11 16:54:36 2014 From: deadala at freenet.de (deadala at freenet.de) Date: Fri, 11 Jul 2014 16:54:36 +0200 Subject: [FieldTrip] LCMV beamformer Message-ID: <5d4dceb1960c51cebf30bf52824209fd@email.freenet.de> Dear all   I am currently using the LCMV beamformer (beamformer_lcmv.m) with my own data.   Your function: beamformer_lcmv(dip, grad, vol, dat, Cy, varargin)   My input:   dip  - structure array, with fields:   - pos            Nx3 array (N- sources)                                                   - inside         1xN array                                                   - outside       empty (all sources inside)                                                   - leadfield     1xN cell array with 1xM arrays (M- channels)   grad  - empty  -> because I am using my own leadfield vol  -  empty  -> because I am using my own leadfield dat  - MxS array (S- samples) Cy  -  MxM array   The problem:   I want to check my own implementation of LCMV beamformer against MNE (software) an your LCMV beamformer with similar data ( measurement, leadfield, data covariance). The MNE and my own beamformer show the same activity of sources. But your LCMV beamformer calculates activities on other places in the brain.   My question: What I am doing wrong? Are the input arguments false or the numbers of sources change?   Thanks in advance for the help. Diana   --- Alle Postfächer an einem Ort. Jetzt wechseln und E-Mail-Adresse mitnehmen! Rundum glücklich mit freenetMail -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Fri Jul 11 21:30:55 2014 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Fri, 11 Jul 2014 21:30:55 +0200 Subject: [FieldTrip] Job in Glasgow Message-ID: dear all, please find below a job-ad from peter uhlhaas at the university of glasgow. best, andreas Anfang der weitergeleiteten E‑Mail: University of Glasgow College of Medical, Veterinary and Life Sciences Research Institute of Neuroscience and Psychology Research Assistant / Associate Ref: M00563 Grade 6/7: £26,527 - £29,837 / £32,590 - £36,661 per annum You will contribute to a project entitled “Magnetoencephalography and Clinical Research in Schizophrenia”. Specifically, the job requires the analysis and acquisition of MEG-data sets and implementation of novel analytic tools, contributing to the design and programming of MEG experiments, recruiting and running the participants, assisting in analysing the results, and participating in the writing up of the results. With extensive, up-to-date practical knowledge in MEG or EEG, you will have excellent knowledge of source-localization, Matlab and experimental control software. This post is funded for 2 years Informal enquires to Dr Peter Uhlhaas (Email: Peter.Uhlhaas at glasgow.ac.uk< mailto:Peter.Uhlhaas at glasgow.ac.uk >; Tel: 0141 330 8730) Apply online at: www.gla.ac.uk/jobs Closing date: 11st of August 2014 The University has recently been awarded the Athena SWAN Institutional Bronze Award The University is committed to equality of opportunity in employment. The University of Glasgow, charity number SC004401. Dr. Peter J. Uhlhaas Reader Institute for Neuroscience and Psychology University of Glasgow 58 Hillhead Street Glasgow G12 8QB Telephone +44 (0)141 330 8730 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Mon Jul 14 23:28:59 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Mon, 14 Jul 2014 21:28:59 +0000 Subject: [FieldTrip] Editing Vertices of Scalp Manually or Automatically Message-ID: <4B7DB9E9-8F86-4323-8C32-C444ED97F84C@dartmouth.edu> Hello Everyone, I am having a problem with noise appearing in my volume conduction model. There are a few horn-like images on the head, and a cluster of vertices in the area where a neck would normally appear but the MRI was only of the upper half of someone's head so it should not be appearing either. I am running into a wall when I try to edit manually because the data so large I cannot view it. Please, I have been trying to fix this for a while does anyone have any ideas on how to get rid of these extraneous points: whether manually or by shifting parameters in the segmentation process? Your help would be extremely helpful and greatly appreciated. This is an image of the problem described. [cid:22E46479-BCE2-415D-B591-A53EE4F23A57] Kind Regards, Isaiah *************************** Isaiah Smith ( Dartmouth Undergraduate) UCLA California NanoSystems Institute Summer Intern University of California Los Angeles Dr. Wentai Liu’s Biomimetics Lab Rm 5311 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-14 at 2.21.48 PM.png Type: image/png Size: 163254 bytes Desc: Screen Shot 2014-07-14 at 2.21.48 PM.png URL: From a.stolk at fcdonders.ru.nl Mon Jul 14 23:46:34 2014 From: a.stolk at fcdonders.ru.nl (Stolk, A. (Arjen)) Date: Mon, 14 Jul 2014 23:46:34 +0200 (CEST) Subject: [FieldTrip] Editing Vertices of Scalp Manually or Automatically In-Reply-To: <4B7DB9E9-8F86-4323-8C32-C444ED97F84C@dartmouth.edu> Message-ID: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> Hi Isaiah, It could be that your problem is caused by your structural scan containing voxels outside the head but with levels of intensity falling in the range of that attributed to, say, csf. One way to check is by plotting the respective segmented brain mask, e.g. mri.pow = seg.csf cfg.funparameter = 'pow' ft_sourceplot(cfg,mri) You could then try and manually include certain voxels by playing with the inclusion threshold (e.g. set seg.csf with voxelvalues smaller than .99 to 0). This would allow to work around that problem, unless those voxels have exactly the same intensity as csf. Hope this helps narrowing the origin of your problem, Arjen ----- Oorspronkelijk bericht ----- > Van: "Isaiah C. Smith" > Aan: fieldtrip at science.ru.nl > Verzonden: Maandag 14 juli 2014 23:28:59 > Onderwerp: [FieldTrip] Editing Vertices of Scalp Manually or > Automatically > Hello Everyone, > I am having a problem with noise appearing in my volume conduction > model. There are a few horn-like images on the head, and a cluster of > vertices in the area where a neck would normally appear but the MRI > was only of the upper half of someone's head so it should not be > appearing either. I am running into a wall when I try to edit manually > because the data so large I cannot view it. Please, I have been trying > to fix this for a while does anyone have any ideas on how to get rid > of these extraneous points: whether manually or by shifting parameters > in the segmentation process? Your help would be extremely helpful and > greatly appreciated. > This is an image of the problem described. > Kind Regards, > Isaiah > *************************** > Isaiah Smith ( Dartmouth Undergraduate) > UCLA California NanoSystems Institute Summer Intern > University of California Los Angeles > Dr. Wentai Liu’s Biomimetics Lab > Rm 5311 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-14 at 2.21.48 PM.png Type: image/png Size: 163254 bytes Desc: Screen Shot 2014-07-14 at 2.21.48 PM.png URL: From Isaiah.C.Smith.17 at dartmouth.edu Tue Jul 15 00:47:58 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Mon, 14 Jul 2014 22:47:58 +0000 Subject: [FieldTrip] Editing Vertices of Scalp Manually or Automatically In-Reply-To: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> References: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <12B921FB-8A45-4640-A179-91FEB53EAFCD@dartmouth.edu> Thanks Arjen, I was able to bring up the source plot of the the scalp using: >> cfg.funparameter=‘scalp'; >> ft_sourceplot(cfg,segmentedmri) Results: [cid:FDB296FB-69C3-4B3E-A19D-214F52DDE76E] Could you please explain how to create/adjust the inclusion threshold? Sorry, I am a little new to the fieldtrip functions. Isaiah On Jul 14, 2014, at 2:46 PM, Stolk, A. (Arjen) > wrote: Hi Isaiah, It could be that your problem is caused by your structural scan containing voxels outside the head but with levels of intensity falling in the range of that attributed to, say, csf. One way to check is by plotting the respective segmented brain mask, e.g. mri.pow = seg.csf cfg.funparameter = 'pow' ft_sourceplot(cfg,mri) You could then try and manually include certain voxels by playing with the inclusion threshold (e.g. set seg.csf with voxelvalues smaller than .99 to 0). This would allow to work around that problem, unless those voxels have exactly the same intensity as csf. Hope this helps narrowing the origin of your problem, Arjen ________________________________ Van: "Isaiah C. Smith" > Aan: fieldtrip at science.ru.nl Verzonden: Maandag 14 juli 2014 23:28:59 Onderwerp: [FieldTrip] Editing Vertices of Scalp Manually or Automatically Hello Everyone, I am having a problem with noise appearing in my volume conduction model. There are a few horn-like images on the head, and a cluster of vertices in the area where a neck would normally appear but the MRI was only of the upper half of someone's head so it should not be appearing either. I am running into a wall when I try to edit manually because the data so large I cannot view it. Please, I have been trying to fix this for a while does anyone have any ideas on how to get rid of these extraneous points: whether manually or by shifting parameters in the segmentation process? Your help would be extremely helpful and greatly appreciated. This is an image of the problem described. Kind Regards, Isaiah *************************** Isaiah Smith ( Dartmouth Undergraduate) UCLA California NanoSystems Institute Summer Intern University of California Los Angeles Dr. Wentai Liu’s Biomimetics Lab Rm 5311 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-14 at 3.44.14 PM.png Type: image/png Size: 51597 bytes Desc: Screen Shot 2014-07-14 at 3.44.14 PM.png URL: From Isaiah.C.Smith.17 at dartmouth.edu Tue Jul 15 03:39:47 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Tue, 15 Jul 2014 01:39:47 +0000 Subject: [FieldTrip] Inclusion Threshold Message-ID: <038F985A-6BFB-43EB-AD9A-AECC295A3834@dartmouth.edu> Hello Everyone, Could someone please explain how to create/adjust the inclusion threshold in the segmentation process? It would be greatly appreciated. Isaiah Smith From jan.schoffelen at donders.ru.nl Tue Jul 15 09:34:23 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 15 Jul 2014 09:34:23 +0200 Subject: [FieldTrip] Editing Vertices of Scalp Manually or Automatically In-Reply-To: <12B921FB-8A45-4640-A179-91FEB53EAFCD@dartmouth.edu> References: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> <12B921FB-8A45-4640-A179-91FEB53EAFCD@dartmouth.edu> Message-ID: <1F212744-34A2-474F-8AAE-F23A498240D0@donders.ru.nl> Isaiah, Image segmentation algorithms work by thresholding an image (which has optionally been subjected to a sequence of image processing steps) at a sensible threshold, creating a binary image (i.e. consisting only of 0 and 1s). Then, in order to generate a surface description of e.g. the scalp, a triangulation is created that describes the boundary from 0 to 1, assuming the voxels with a value of 1 to lie within a single compartment. In your scalp mesh, the ‘horns’ are most likely caused by voxels with a supra threshold intensity value. After thresholding, the binary volume consists of multiple disconnected ‘blobs’, and the triangulation algorithm connects the points at the boundaries of these individual islands. Thus, in your case, the default image processing steps (which actually aim at generating a single compartment (by keeping the largest connected compartment, and throwing away the smaller islands) have failed. This may be caused by the fact that these islands lie at the edge of your image. If you don’t feel comfortable with editing the volumetric image yourself I suggest that you play with the cfg.scalpsmooth and cfg.scalpthreshold parameters prior to calling ft_volumesegment. I would start by increasing the scalpthreshold (the default value is 0.1, but you can try 0.3, or 0.5, or any value you fancy). Finally, please note that everybody who spends his/her valuable time on answering questions on this discussion list is doing so on a voluntary basis. Be aware that multiple postings of the same question does not necessary enhance people’s inclination to answer, although I realize fully well that it may be frustrating if you are stuck. Best wishes, Jan-Mathijs On Jul 15, 2014, at 12:47 AM, Isaiah C. Smith wrote: > Thanks Arjen, > > I was able to bring up the source plot of the the scalp using: > >> cfg.funparameter=‘scalp'; > >> ft_sourceplot(cfg,segmentedmri) > Results: > > Could you please explain how to create/adjust the inclusion threshold? Sorry, I am a little new to the fieldtrip functions. > > Isaiah > > On Jul 14, 2014, at 2:46 PM, Stolk, A. (Arjen) wrote: > >> Hi Isaiah, >> >> It could be that your problem is caused by your structural scan containing voxels outside the head but with levels of intensity falling in the range of that attributed to, say, csf. One way to check is by plotting the respective segmented brain mask, e.g. >> >> mri.pow = seg.csf >> cfg.funparameter = 'pow' >> ft_sourceplot(cfg,mri) >> >> You could then try and manually include certain voxels by playing with the inclusion threshold (e.g. set seg.csf with voxelvalues smaller than .99 to 0). This would allow to work around that problem, unless those voxels have exactly the same intensity as csf. >> >> Hope this helps narrowing the origin of your problem, >> Arjen >> >> >> >> Van: "Isaiah C. Smith" >> Aan: fieldtrip at science.ru.nl >> Verzonden: Maandag 14 juli 2014 23:28:59 >> Onderwerp: [FieldTrip] Editing Vertices of Scalp Manually or Automatically >> >> Hello Everyone, >> >> I am having a problem with noise appearing in my volume conduction model. There are a few horn-like images on the head, and a cluster of vertices in the area where a neck would normally appear but the MRI was only of the upper half of someone's head so it should not be appearing either. I am running into a wall when I try to edit manually because the data so large I cannot view it. Please, I have been trying to fix this for a while does anyone have any ideas on how to get rid of these extraneous points: whether manually or by shifting parameters in the segmentation process? Your help would be extremely helpful and greatly appreciated. >> >> This is an image of the problem described. >> >> >> Kind Regards, >> >> Isaiah >> >> *************************** >> Isaiah Smith ( Dartmouth Undergraduate) >> UCLA California NanoSystems Institute Summer Intern >> University of California Los Angeles >> Dr. Wentai Liu’s Biomimetics Lab >> Rm 5311 >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> -- >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> >> Email: a.stolk at donders.ru.nl >> Phone: +31(0)243 68294 >> Web: www.arjenstolk.nl >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jul 15 12:18:37 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 15 Jul 2014 10:18:37 +0000 Subject: [FieldTrip] Pop_cleanline (eeglab) and beamformer Message-ID: Hello fieldtrippers who use eeglab, If you're planning on beamformer your data, ensure that the data hasn't been cleanlined (pop_cleanline by Tim Mullen). Trust me when I say that it will not prove your results if you cleanline beforehand, it makes life a lot worse. Once again a thank you to the beamformer helpers mentioned in a previous email. Please disregard my old email if any of you were trying to solve it (I appreciate it though). The reason for it not working is the aforementioned cleanline. Kind regards, Tyler From f.roux at bcbl.eu Tue Jul 15 17:40:50 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Tue, 15 Jul 2014 17:40:50 +0200 (CEST) Subject: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data Message-ID: <468321985.2552096.1405438850636.JavaMail.root@bcbl.eu> Dear all, I would like to ask if anyone has ever tried to speed up the ft_statistics_montecarlo function by using Matlab's parallel computing toolbox ? I would like to run clusterstatistics on time-frequency data, but as a result of the large number of time and frequency bins, the function runs very slowly. So I was thinking to try and modify the code by running the loops over the frequency bins in parallel and see if that could save some time. Before starting to adapt the code on my own, however, I wanted to ask if anyone had ever tried that and also if there could be any possible reasons which would make that this is not a feasible project. Any thoughts or suggestions would be highly appreciated. Best, Fred --------------------------------------------------------------------------- From mcantor at umich.edu Tue Jul 15 19:26:33 2014 From: mcantor at umich.edu (Max Cantor) Date: Tue, 15 Jul 2014 13:26:33 -0400 Subject: [FieldTrip] Common Filters Question Message-ID: In the main beamformer tutorial ( http://fieldtrip.fcdonders.nl/tutorial/beamformer), the common filter is computed as follows: cfg.grid.filter = sourceAll.avg.filter; sourcePre_con = ft_sourceanalysis(cfg, freqPre ); sourcePost_con = ft_sourceanalysis(cfg, freqPost); However, in the separate common filters example script ( http://fieldtrip.fcdonders.nl/example/common_filters_in_beamforming), the common filter is much more complex. I've created working versions of both common filters for DICS, as well as a working version of the 'simple' common filter for LCMV. I have a version of the 'complex' common filter that should work, but it usually chews up my computer's RAM (I have 16gb) and crashes matlab. The DICS one is also slow, but not so bad that it crashes. However, I couldn't imagine running it on all my datasets and being able to do any stats on the data without my computer crashing. Before I post the code to see if maybe there is something wrong with it causing the memory overloads, I was wondering if anyone could explain to me what exactly the differences between the two methods are, and if it is even necessary for me to get the more complex common filter working? The simple common filters seem to work fine, but they could be affecting the data in ways that are not obvious, so I want to make sure. As always, thank you Fieldtrippers -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Tue Jul 15 23:57:29 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Tue, 15 Jul 2014 21:57:29 +0000 Subject: [FieldTrip] Editing Vertices of Scalp Manually or Automatically In-Reply-To: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> References: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <208DD306-6B0F-480E-9A15-9D925FE7B4F6@dartmouth.edu> Thank you so much for your reply Arjen, I was wondering if there is there any solution in the interface where we can automatically exclude some unwanted point? In the segmentation process? Or in a later process? When I change the threshold I get an error message concerning the final steps in creating the head model. Isaiah Smith On Jul 14, 2014, at 2:46 PM, Stolk, A. (Arjen) > wrote: Hi Isaiah, It could be that your problem is caused by your structural scan containing voxels outside the head but with levels of intensity falling in the range of that attributed to, say, csf. One way to check is by plotting the respective segmented brain mask, e.g. mri.pow = seg.csf cfg.funparameter = 'pow' ft_sourceplot(cfg,mri) You could then try and manually include certain voxels by playing with the inclusion threshold (e.g. set seg.csf with voxelvalues smaller than .99 to 0). This would allow to work around that problem, unless those voxels have exactly the same intensity as csf. Hope this helps narrowing the origin of your problem, Arjen ________________________________ Van: "Isaiah C. Smith" > Aan: fieldtrip at science.ru.nl Verzonden: Maandag 14 juli 2014 23:28:59 Onderwerp: [FieldTrip] Editing Vertices of Scalp Manually or Automatically Hello Everyone, I am having a problem with noise appearing in my volume conduction model. There are a few horn-like images on the head, and a cluster of vertices in the area where a neck would normally appear but the MRI was only of the upper half of someone's head so it should not be appearing either. I am running into a wall when I try to edit manually because the data so large I cannot view it. Please, I have been trying to fix this for a while does anyone have any ideas on how to get rid of these extraneous points: whether manually or by shifting parameters in the segmentation process? Your help would be extremely helpful and greatly appreciated. This is an image of the problem described. Kind Regards, Isaiah *************************** Isaiah Smith ( Dartmouth Undergraduate) UCLA California NanoSystems Institute Summer Intern University of California Los Angeles Dr. Wentai Liu’s Biomimetics Lab Rm 5311 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Wed Jul 16 00:13:13 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Tue, 15 Jul 2014 22:13:13 +0000 Subject: [FieldTrip] Editing Vertices of Scalp Manually or Automatically In-Reply-To: <208DD306-6B0F-480E-9A15-9D925FE7B4F6@dartmouth.edu> References: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> <208DD306-6B0F-480E-9A15-9D925FE7B4F6@dartmouth.edu> Message-ID: <37138409-0293-4095-9F81-43FF91B6398A@dartmouth.edu> [cid:6DCD99BF-1FEB-4B85-90B8-E1368132E32C at host.ucla.edu]On I should probably show you the MRI as well. The reason as to why I am so confused is that there are no points below and still the neck-like image shows up. I cannot find any variation in intensity at all. Is there any explanation for this occurrence? Thanks once again. Isaiah Jul 15, 2014, at 2:57 PM, Isaiah C. Smith > wrote: Thank you so much for your reply Arjen, I was wondering if there is there any solution in the interface where we can automatically exclude some unwanted point? In the segmentation process? Or in a later process? When I change the threshold I get an error message concerning the final steps in creating the head model. Isaiah Smith On Jul 14, 2014, at 2:46 PM, Stolk, A. (Arjen) > wrote: Hi Isaiah, It could be that your problem is caused by your structural scan containing voxels outside the head but with levels of intensity falling in the range of that attributed to, say, csf. One way to check is by plotting the respective segmented brain mask, e.g. mri.pow = seg.csf cfg.funparameter = 'pow' ft_sourceplot(cfg,mri) You could then try and manually include certain voxels by playing with the inclusion threshold (e.g. set seg.csf with voxelvalues smaller than .99 to 0). This would allow to work around that problem, unless those voxels have exactly the same intensity as csf. Hope this helps narrowing the origin of your problem, Arjen ________________________________ Van: "Isaiah C. Smith" > Aan: fieldtrip at science.ru.nl Verzonden: Maandag 14 juli 2014 23:28:59 Onderwerp: [FieldTrip] Editing Vertices of Scalp Manually or Automatically Hello Everyone, I am having a problem with noise appearing in my volume conduction model. There are a few horn-like images on the head, and a cluster of vertices in the area where a neck would normally appear but the MRI was only of the upper half of someone's head so it should not be appearing either. I am running into a wall when I try to edit manually because the data so large I cannot view it. Please, I have been trying to fix this for a while does anyone have any ideas on how to get rid of these extraneous points: whether manually or by shifting parameters in the segmentation process? Your help would be extremely helpful and greatly appreciated. This is an image of the problem described. Kind Regards, Isaiah *************************** Isaiah Smith ( Dartmouth Undergraduate) UCLA California NanoSystems Institute Summer Intern University of California Los Angeles Dr. Wentai Liu’s Biomimetics Lab Rm 5311 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-15 at 3.05.07 PM.png Type: image/png Size: 180396 bytes Desc: Screen Shot 2014-07-15 at 3.05.07 PM.png URL: From jan.schoffelen at donders.ru.nl Wed Jul 16 09:12:59 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 16 Jul 2014 09:12:59 +0200 Subject: [FieldTrip] Common Filters Question In-Reply-To: References: Message-ID: Dear Max, I checked out both snippets of code (on the tutorial page and on the example page), and to me it seems that you should be able to get away with what you call the ‘simple common filter’. The code on the example page to me looks unnecessarily complicated (apart from the fact that it is incomplete), and seems to be designed to first create a single trial representation of the data in source space, before averaging across the trials that pertain to a certain experimental condition. If, as I suspect it to be so in your case, one is only interested in computing a per condition average in source space (in order to be able to do statistical inference across a group of subjects), computing and using the common spatial filter as per the tutorial should do the trick. I guess that the person who wrote the example code for some reason wanted to have access to the single trial source data (as per point 3 in the section ‘how to do this in fieldtrip’ on the example script page). Projection of single trial data to the source level indeed blows up memory requirements, and may only be necessary in certain non-standard cases. I think it would be good to make this more explicit on the example page (thanks for spotting it!). Would you mind helping out with this? It’s a wiki after all ;-), and the example code is allowed to be adjusted/extended. I suggest that we adjust the page a bit so that we make explicit that we can reconstruct single trial data if needed (for this we only need to make the example code correct), but that in most cases we can work with averages across trials (for this we need to add a section that more or less duplicates the creation of the ‘simple’ complex filter). The way we usually tackle this is by creating a ‘bug’ out of this (or rather an issue) on our bugzilla.fcdonders.nl issue-tracking system to make an action list and to keep track of who’s doing what. Best wishes, Jan-Mathijs On Jul 15, 2014, at 7:26 PM, Max Cantor wrote: > In the main beamformer tutorial (http://fieldtrip.fcdonders.nl/tutorial/beamformer), the common filter is computed as follows: > > cfg.grid.filter = sourceAll.avg.filter; > sourcePre_con = ft_sourceanalysis(cfg, freqPre ); > sourcePost_con = ft_sourceanalysis(cfg, freqPost); > However, in the separate common filters example script (http://fieldtrip.fcdonders.nl/example/common_filters_in_beamforming), the common filter is much more complex. > > I've created working versions of both common filters for DICS, as well as a working version of the 'simple' common filter for LCMV. I have a version of the 'complex' common filter that should work, but it usually chews up my computer's RAM (I have 16gb) and crashes matlab. The DICS one is also slow, but not so bad that it crashes. However, I couldn't imagine running it on all my datasets and being able to do any stats on the data without my computer crashing. > > Before I post the code to see if maybe there is something wrong with it causing the memory overloads, I was wondering if anyone could explain to me what exactly the differences between the two methods are, and if it is even necessary for me to get the more complex common filter working? The simple common filters seem to work fine, but they could be affecting the data in ways that are not obvious, so I want to make sure. > > As always, thank you Fieldtrippers > > -- > Max Cantor > Lab Manager > Computational Neurolinguistics Lab > University of Michigan > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Jul 16 09:39:03 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 16 Jul 2014 09:39:03 +0200 Subject: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data In-Reply-To: <468321985.2552096.1405438850636.JavaMail.root@bcbl.eu> References: <468321985.2552096.1405438850636.JavaMail.root@bcbl.eu> Message-ID: Hi Fred, Some time ago, I replaced parts of the clustering routine with a mex-file. For me this greatly sped up the cluster stats. I guess you are using a fairly recent (<1yr old) FT version? The platform you're using might also be relevant, I just noticed that the mex-file (private/combineClusters.mex*) is distributed in compiled form only for Linux 64 and Windows 32/64 bit. If you're e.g. on a Macintosh, you could compile it yourself from the src/combineClusters.cpp source file. I know of no attempts to parallelise the clustering code. Best, Eelke On 15 July 2014 17:40, Frédéric Roux wrote: > Dear all, > > I would like to ask if anyone has ever tried to speed up the ft_statistics_montecarlo function > by using Matlab's parallel computing toolbox ? > > I would like to run clusterstatistics on time-frequency data, but as a result of the large number > of time and frequency bins, the function runs very slowly. So I was thinking to try and modify > the code by running the loops over the frequency bins in parallel and see if that could save > some time. > > Before starting to adapt the code on my own, however, I wanted to ask if anyone had ever tried that > and also if there could be any possible reasons which would make that this is not a feasible project. > > Any thoughts or suggestions would be highly appreciated. > > Best, > Fred > > > --------------------------------------------------------------------------- > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eijlers at rsm.nl Wed Jul 16 13:38:17 2014 From: eijlers at rsm.nl (Esther Eijlers) Date: Wed, 16 Jul 2014 11:38:17 +0000 Subject: [FieldTrip] Effect size measure for cluster-based permutation tests Message-ID: Dear all, I’m using the cluster-based permutation tests (on time-frequency data), and was wondering if it makes sense and how to come up with an effect size measure that is easy to evaluate. Maybe the clusterstat is giving an indication; but I guess it’s not a standardised measure and therefore hard to evaluate? Thank you in advance. Best, Esther -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Wed Jul 16 15:06:04 2014 From: mcantor at umich.edu (Max Cantor) Date: Wed, 16 Jul 2014 09:06:04 -0400 Subject: [FieldTrip] Common Filters Question In-Reply-To: References: Message-ID: Ok, I thought something along those lines might be the case, but I just wanted to make sure. I've never used bugzilla before but I'm sure I can figure it out, and I'd be glad to help! Thanks Jan-Mathijs, Max On Wed, Jul 16, 2014 at 3:12 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Dear Max, > > I checked out both snippets of code (on the tutorial page and on the > example page), and to me it seems that you should be able to get away with > what you call the ‘simple common filter’. The code on the example page to > me looks unnecessarily complicated (apart from the fact that it is > incomplete), and seems to be designed to first create a single trial > representation of the data in source space, before averaging across the > trials that pertain to a certain experimental condition. If, as I suspect > it to be so in your case, one is only interested in computing a per > condition average in source space (in order to be able to do statistical > inference across a group of subjects), computing and using the common > spatial filter as per the tutorial should do the trick. > I guess that the person who wrote the example code for some reason wanted > to have access to the single trial source data (as per point 3 in the > section ‘how to do this in fieldtrip’ on the example script page). > Projection of single trial data to the source level indeed blows up memory > requirements, and may only be necessary in certain non-standard cases. I > think it would be good to make this more explicit on the example page > (thanks for spotting it!). Would you mind helping out with this? It’s a > wiki after all ;-), and the example code is allowed to be > adjusted/extended. I suggest that we adjust the page a bit so that we make > explicit that we can reconstruct single trial data if needed (for this we > only need to make the example code correct), but that in most cases we can > work with averages across trials (for this we need to add a section that > more or less duplicates the creation of the ‘simple’ complex filter). The > way we usually tackle this is by creating a ‘bug’ out of this (or rather an > issue) on our bugzilla.fcdonders.nl issue-tracking system to make an > action list and to keep track of who’s doing what. > > Best wishes, > Jan-Mathijs > > > On Jul 15, 2014, at 7:26 PM, Max Cantor wrote: > > In the main beamformer tutorial ( > http://fieldtrip.fcdonders.nl/tutorial/beamformer), the common filter is > computed as follows: > > cfg.grid.filter = sourceAll.avg.filter; > sourcePre_con = ft_sourceanalysis(cfg, freqPre ); > sourcePost_con = ft_sourceanalysis(cfg, freqPost); > > However, in the separate common filters example script ( > http://fieldtrip.fcdonders.nl/example/common_filters_in_beamforming), the > common filter is much more complex. > > I've created working versions of both common filters for DICS, as well as > a working version of the 'simple' common filter for LCMV. I have a version > of the 'complex' common filter that should work, but it usually chews up my > computer's RAM (I have 16gb) and crashes matlab. The DICS one is also slow, > but not so bad that it crashes. However, I couldn't imagine running it on > all my datasets and being able to do any stats on the data without my > computer crashing. > > Before I post the code to see if maybe there is something wrong with it > causing the memory overloads, I was wondering if anyone could explain to me > what exactly the differences between the two methods are, and if it is even > necessary for me to get the more complex common filter working? The simple > common filters seem to work fine, but they could be affecting the data in > ways that are not obvious, so I want to make sure. > > As always, thank you Fieldtrippers > > -- > Max Cantor > Lab Manager > Computational Neurolinguistics Lab > University of Michigan > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Wed Jul 16 15:07:36 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Wed, 16 Jul 2014 15:07:36 +0200 (CEST) Subject: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data In-Reply-To: Message-ID: <171511570.2562741.1405516056153.JavaMail.root@bcbl.eu> Hi Eelke, thanks for your response - that sounds promising. I am running fieldtrip-20140527 on a 64 bit Linux server, so I'd be keen to give your suggestion a try. This is actually the first time I am calling mex-files using Matlab, but I assume that the way to go is to comment out the part of the code in ft_findcluster that combines the cluster and to call the mex-file instead? If yes, here is what I did: I copied the combineClusters.mexa64 file into a spearate folder and added that folder to my Matlab path. % combine clusters that are connected in neighbouring channel(s) % (combinations). Convert inputs to uint32 as that is required by the mex % file (and the values will be positive integers anyway). addpath('/path2home/mex/'); cluster = combineClusters(uint32(labelmat), logical(spatdimneighbstructmat), uint32(total)); I am not sure however how to call the mex function. Is this done automatically or do I need to add some further steps? May I ask you which approach you are using? Best, Fred Frédéric Roux ----- Original Message ----- From: "Eelke Spaak" To: "FieldTrip discussion list" Sent: Wednesday, July 16, 2014 9:39:03 AM Subject: Re: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data Hi Fred, Some time ago, I replaced parts of the clustering routine with a mex-file. For me this greatly sped up the cluster stats. I guess you are using a fairly recent (<1yr old) FT version? The platform you're using might also be relevant, I just noticed that the mex-file (private/combineClusters.mex*) is distributed in compiled form only for Linux 64 and Windows 32/64 bit. If you're e.g. on a Macintosh, you could compile it yourself from the src/combineClusters.cpp source file. I know of no attempts to parallelise the clustering code. Best, Eelke On 15 July 2014 17:40, Frédéric Roux wrote: > Dear all, > > I would like to ask if anyone has ever tried to speed up the ft_statistics_montecarlo function > by using Matlab's parallel computing toolbox ? > > I would like to run clusterstatistics on time-frequency data, but as a result of the large number > of time and frequency bins, the function runs very slowly. So I was thinking to try and modify > the code by running the loops over the frequency bins in parallel and see if that could save > some time. > > Before starting to adapt the code on my own, however, I wanted to ask if anyone had ever tried that > and also if there could be any possible reasons which would make that this is not a feasible project. > > Any thoughts or suggestions would be highly appreciated. > > Best, > Fred > > > --------------------------------------------------------------------------- > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hweeling.lee at gmail.com Thu Jul 17 13:26:59 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 17 Jul 2014 13:26:59 +0200 Subject: [FieldTrip] testing if power is significantly different from zero Message-ID: Hi all, I have a naive question regarding cluster statistics in fieldtrip. Is it possible to run a statistical analysis to test if power is significantly different from zero? If so, how do I build the design matrix for this case? Thanks. Cheers, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.lam at fcdonders.ru.nl Thu Jul 17 13:56:35 2014 From: n.lam at fcdonders.ru.nl (Lam, Nietzsche) Date: Thu, 17 Jul 2014 13:56:35 +0200 (CEST) Subject: [FieldTrip] testing if power is significantly different from zero In-Reply-To: Message-ID: <613650745.758220.1405598195481.JavaMail.root@indus.zimbra.ru.nl> Hi Hweeling, I think the approach is similar to testing two different conditions. I have a suggestion below, but I think some people would argue that this is not a good way to do the test. You can keep the design matrix the same as comparing two conditions, but for the "zero" condition, you will turn this all into zeros. dat1.powspctrm = %power from your condition of interest dat2 = dat1 % your "zero" condition" dat2.powspctrm(:) = 0; % making the data structure identical to condition of interest but everything is zero. Then call your statistics function as before. Perhaps someone else can give you more detail on this. Nietzsche ----- Original Message ----- > From: "Hwee Ling Lee" > To: "FieldTrip discussion list" > Sent: Thursday, 17 July, 2014 1:26:59 PM > Subject: [FieldTrip] testing if power is significantly different from zero > Hi all, > > > I have a naive question regarding cluster statistics in fieldtrip. > > > Is it possible to run a statistical analysis to test if power is > significantly different from zero? If so, how do I build the design > matrix for this case? > > > Thanks. > > > Cheers, > Hweeling > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Nietzsche H.L. Lam, MSc PhD Candidate Max Planck Institute for Psycholinguistics Wundtlaan 1, 6525 XD Nijmegen, The Netherlands Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Kapittelweg 29, 6525EN Nijmegen, The Netherlands n.lam at fcdonders.ru.nl +31-24-3668219 neurobiologyoflanguage.com From jm.horschig at donders.ru.nl Thu Jul 17 15:38:54 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Thu, 17 Jul 2014 15:38:54 +0200 Subject: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data In-Reply-To: <171511570.2562741.1405516056153.JavaMail.root@bcbl.eu> References: <171511570.2562741.1405516056153.JavaMail.root@bcbl.eu> Message-ID: <53C7D1EE.8040007@donders.ru.nl> Hi Fred, Matlab is giving mex-files precedence over .m file as long as the mex-file is on the path. The easiest ways to check whether Matlab uses the mex-file is to type >> which combineClusters that should point to the mex file. Another way to check is to put a breakpoint in the beginning of the .m-file, and then call combineClusters or run your code. If the mex-file is executed, Matlab will not enter the .m-file and thus not arrive and not stop at the breakpoint. However, the files are also in FieldTrip/private, and this is the place where other functions that FieldTrip uses are stored. So, actually there is no need for you to copy the files over to a separate folder. FieldTrip/Matlab should execute the mex-files all by itself already. Best, Jörn On 7/16/2014 3:07 PM, Frédéric Roux wrote: > Hi Eelke, > > thanks for your response - that sounds promising. > > I am running fieldtrip-20140527 on a 64 bit Linux server, so I'd > be keen to give your suggestion a try. > > This is actually the first time I am calling mex-files using Matlab, > but I assume that the way to go is to comment out the part of the code > in ft_findcluster that combines the cluster and to call the mex-file instead? > > If yes, here is what I did: I copied the combineClusters.mexa64 file into > a spearate folder and added that folder to my Matlab path. > > % combine clusters that are connected in neighbouring channel(s) > % (combinations). Convert inputs to uint32 as that is required by the mex > % file (and the values will be positive integers anyway). > addpath('/path2home/mex/'); > cluster = combineClusters(uint32(labelmat), logical(spatdimneighbstructmat), uint32(total)); > > I am not sure however how to call the mex function. Is this done automatically or do > I need to add some further steps? May I ask you which approach you are using? > > Best, > Fred > > > > Frédéric Roux > > ----- Original Message ----- > From: "Eelke Spaak" > To: "FieldTrip discussion list" > Sent: Wednesday, July 16, 2014 9:39:03 AM > Subject: Re: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data > > Hi Fred, > > Some time ago, I replaced parts of the clustering routine with a > mex-file. For me this greatly sped up the cluster stats. I guess you > are using a fairly recent (<1yr old) FT version? The platform you're > using might also be relevant, I just noticed that the mex-file > (private/combineClusters.mex*) is distributed in compiled form only > for Linux 64 and Windows 32/64 bit. If you're e.g. on a Macintosh, you > could compile it yourself from the src/combineClusters.cpp source > file. > > I know of no attempts to parallelise the clustering code. > > Best, > Eelke > > On 15 July 2014 17:40, Frédéric Roux wrote: >> Dear all, >> >> I would like to ask if anyone has ever tried to speed up the ft_statistics_montecarlo function >> by using Matlab's parallel computing toolbox ? >> >> I would like to run clusterstatistics on time-frequency data, but as a result of the large number >> of time and frequency bins, the function runs very slowly. So I was thinking to try and modify >> the code by running the loops over the frequency bins in parallel and see if that could save >> some time. >> >> Before starting to adapt the code on my own, however, I wanted to ask if anyone had ever tried that >> and also if there could be any possible reasons which would make that this is not a feasible project. >> >> Any thoughts or suggestions would be highly appreciated. >> >> Best, >> Fred >> >> >> --------------------------------------------------------------------------- >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From constantino.mendezbertolo at ctb.upm.es Thu Jul 17 15:45:24 2014 From: constantino.mendezbertolo at ctb.upm.es (=?UTF-8?Q?Constantino_M=C3=A9ndez_B=C3=A9rtolo?=) Date: Thu, 17 Jul 2014 15:45:24 +0200 Subject: [FieldTrip] testing if power is significantly different from zero In-Reply-To: <613650745.758220.1405598195481.JavaMail.root@indus.zimbra.ru.nl> References: <613650745.758220.1405598195481.JavaMail.root@indus.zimbra.ru.nl> Message-ID: Bump, wishing that some sage fieldtripper either back-up the "t-test against homologue data filled with zeros method" or suggests a better approach, thx 2014-07-17 13:56 GMT+02:00 Lam, Nietzsche : > Hi Hweeling, > > I think the approach is similar to testing two different conditions. I > have a suggestion below, but I think some people would argue that this is > not a good way to do the test. > > You can keep the design matrix the same as comparing two conditions, but > for the "zero" condition, you will turn this all into zeros. > dat1.powspctrm = %power from your condition of interest > dat2 = dat1 % your "zero" condition" > dat2.powspctrm(:) = 0; % making the data structure identical to condition > of interest but everything is zero. > Then call your statistics function as before. > > Perhaps someone else can give you more detail on this. > > Nietzsche > > ----- Original Message ----- > > From: "Hwee Ling Lee" > > To: "FieldTrip discussion list" > > Sent: Thursday, 17 July, 2014 1:26:59 PM > > Subject: [FieldTrip] testing if power is significantly different from > zero > > Hi all, > > > > > > I have a naive question regarding cluster statistics in fieldtrip. > > > > > > Is it possible to run a statistical analysis to test if power is > > significantly different from zero? If so, how do I build the design > > matrix for this case? > > > > > > Thanks. > > > > > > Cheers, > > Hweeling > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Nietzsche H.L. Lam, MSc > PhD Candidate > > Max Planck Institute for Psycholinguistics > Wundtlaan 1, 6525 XD Nijmegen, The Netherlands > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Kapittelweg 29, 6525EN Nijmegen, The Netherlands > > n.lam at fcdonders.ru.nl > +31-24-3668219 > > > neurobiologyoflanguage.com > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Constantino Méndez-Bértolo Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) Parque Científico y Tecnológico de la UPM, Campus de Montegancedo 28223 Pozuelo de Alarcón, Madrid, SPAIN -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Jul 17 16:43:34 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 17 Jul 2014 16:43:34 +0200 Subject: [FieldTrip] testing if power is significantly different from zero In-Reply-To: References: <613650745.758220.1405598195481.JavaMail.root@indus.zimbra.ru.nl> Message-ID: <53C7E116.6000009@donders.ru.nl> Hey, I actually wouldn't advise to test power against 0. Since power is a positive measure (bound to 0), noise will cumulatatively add up and your test against 0 will effectively check whether you recorded something (aka noise) or not. But, as Nietzsche said, you can ask whether your measured powered is significantly different from 0 using her approach. It's just not a very clever question to ask... ;) Best, Jörn On 7/17/2014 3:45 PM, Constantino Méndez Bértolo wrote: > Bump, > wishing that some sage fieldtripper either back-up the "t-test against > homologue data filled with zeros method" or suggests a better approach, > thx > > > 2014-07-17 13:56 GMT+02:00 Lam, Nietzsche >: > > Hi Hweeling, > > I think the approach is similar to testing two different > conditions. I have a suggestion below, but I think some people > would argue that this is not a good way to do the test. > > You can keep the design matrix the same as comparing two > conditions, but for the "zero" condition, you will turn this all > into zeros. > dat1.powspctrm = %power from your condition of interest > dat2 = dat1 % your "zero" condition" > dat2.powspctrm(:) = 0; % making the data structure identical to > condition of interest but everything is zero. > Then call your statistics function as before. > > Perhaps someone else can give you more detail on this. > > Nietzsche > > ----- Original Message ----- > > From: "Hwee Ling Lee" > > > To: "FieldTrip discussion list" > > > Sent: Thursday, 17 July, 2014 1:26:59 PM > > Subject: [FieldTrip] testing if power is significantly different > from zero > > Hi all, > > > > > > I have a naive question regarding cluster statistics in fieldtrip. > > > > > > Is it possible to run a statistical analysis to test if power is > > significantly different from zero? If so, how do I build the design > > matrix for this case? > > > > > > Thanks. > > > > > > Cheers, > > Hweeling > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Nietzsche H.L. Lam, MSc > PhD Candidate > > Max Planck Institute for Psycholinguistics > Wundtlaan 1, 6525 XD Nijmegen, The Netherlands > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Kapittelweg 29, 6525EN Nijmegen, The Netherlands > > n.lam at fcdonders.ru.nl > +31-24-3668219 > > > neurobiologyoflanguage.com > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Constantino Méndez-Bértolo > Laboratorio de Neurociencia Clínica,Centro de Tecnología Biomédica (CTB) > > Parque Científico y Tecnológico de la UPM, Campus de Montegancedo > > 28223 Pozuelo deAlarcón, Madrid, SPAIN > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From hweeling.lee at gmail.com Thu Jul 17 17:44:53 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 17 Jul 2014 17:44:53 +0200 Subject: [FieldTrip] testing if power is significantly different from zero In-Reply-To: <53C7E116.6000009@donders.ru.nl> References: <613650745.758220.1405598195481.JavaMail.root@indus.zimbra.ru.nl> <53C7E116.6000009@donders.ru.nl> Message-ID: Hi, Thanks for all the input. The reason I wanted to test if power is significantly different from 0 is to check if the power in condition 1 resembles to what is reported in the literature. This is just to ensure that the changes observed in condition 2 relative to condition 1 makes sense. Cheers, Hweeling On 17 July 2014 16:43, "Jörn M. Horschig" wrote: > Hey, > > I actually wouldn't advise to test power against 0. Since power is a > positive measure (bound to 0), noise will cumulatatively add up and your > test against 0 will effectively check whether you recorded something (aka > noise) or not. But, as Nietzsche said, you can ask whether your measured > powered is significantly different from 0 using her approach. It's just not > a very clever question to ask... ;) > > Best, > Jörn > > > > On 7/17/2014 3:45 PM, Constantino Méndez Bértolo wrote: > >> Bump, >> wishing that some sage fieldtripper either back-up the "t-test against >> homologue data filled with zeros method" or suggests a better approach, >> thx >> >> >> 2014-07-17 13:56 GMT+02:00 Lam, Nietzsche > n.lam at fcdonders.ru.nl>>: >> >> >> Hi Hweeling, >> >> I think the approach is similar to testing two different >> conditions. I have a suggestion below, but I think some people >> would argue that this is not a good way to do the test. >> >> You can keep the design matrix the same as comparing two >> conditions, but for the "zero" condition, you will turn this all >> into zeros. >> dat1.powspctrm = %power from your condition of interest >> dat2 = dat1 % your "zero" condition" >> dat2.powspctrm(:) = 0; % making the data structure identical to >> condition of interest but everything is zero. >> Then call your statistics function as before. >> >> Perhaps someone else can give you more detail on this. >> >> Nietzsche >> >> ----- Original Message ----- >> > From: "Hwee Ling Lee" > > >> > To: "FieldTrip discussion list" > > >> > Sent: Thursday, 17 July, 2014 1:26:59 PM >> > Subject: [FieldTrip] testing if power is significantly different >> from zero >> > Hi all, >> > >> > >> > I have a naive question regarding cluster statistics in fieldtrip. >> > >> > >> > Is it possible to run a statistical analysis to test if power is >> > significantly different from zero? If so, how do I build the design >> > matrix for this case? >> > >> > >> > Thanks. >> > >> > >> > Cheers, >> > Hweeling >> > >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -- >> Nietzsche H.L. Lam, MSc >> PhD Candidate >> >> Max Planck Institute for Psycholinguistics >> Wundtlaan 1, 6525 XD Nijmegen, The Netherlands >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Kapittelweg 29, 6525EN Nijmegen, The Netherlands >> >> n.lam at fcdonders.ru.nl >> +31-24-3668219 >> >> >> neurobiologyoflanguage.com >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> Constantino Méndez-Bértolo >> Laboratorio de Neurociencia Clínica,Centro de Tecnología Biomédica (CTB) >> >> >> Parque Científico y Tecnológico de la UPM, Campus de Montegancedo >> >> 28223 Pozuelo deAlarcón, Madrid, SPAIN >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- > Jörn M. Horschig > PhD Student > > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.heusser at gmail.com Thu Jul 17 20:15:54 2014 From: andrew.heusser at gmail.com (Andrew Heusser) Date: Thu, 17 Jul 2014 14:15:54 -0400 Subject: [FieldTrip] Computing cluster sizes on group-level topographic maps without using built in monte carlo statistics Message-ID: Dear Fieldtrippers, I am working on an MEG analysis where I compute average oscillatory power for a given band for each trial in my experiment, and then perform a parametric regression over trials to obtain a t-statistic representing the fit to the model at each sensor and for each subject (for a given band). This leaves me with a topographic map of t-statistics for each subject for a given frequency band. Then, to compute reliability across subjects, I perform a one-sample t-test on the model fits across subjects for a given sensor to get a group-level topographic map of significance values. I would like to cluster correct these group-level maps by iteratively shuffling trials within subject and recomputing model fits, recomputing the group maps, and then finding the size of clusters to build a null distribution of cluster sizes. 1) Using the Fieldtrip functions (i.e. ft_freqstatistics), is there a simple way to grab cluster sizes from these 'shuffled' group-level statistical maps so that I can build a null distribution of cluster sizes and find a cluster threshold? Rather, is it possible to obtain cluster sizes on any statistical map without using the monte carlo statistics? 2) Does this approach logically make sense, or is there maybe another way to achieve this that I haven't thought of? Thank you in advance for you help! -- Andy Graduate Student at NYU -------------- next part -------------- An HTML attachment was scrubbed... URL: From fiebach at psych.uni-frankfurt.de Fri Jul 18 00:25:33 2014 From: fiebach at psych.uni-frankfurt.de (Christian Fiebach) Date: Fri, 18 Jul 2014 00:25:33 +0200 Subject: [FieldTrip] 1 PostDoc position, 2 PhD positions, Language & Predictive Coding, Frankfurt/Germany Message-ID: <3C1EE673-44B3-40ED-A6F8-189A1BF256F5@psych.uni-frankfurt.de> Dear colleagues, I would be thankful if you could forward this to interested colleagues and students. Thanks in advance, Christian Fiebeach __________________________________________________________________ The Cognitive Neuroscience Lab (Prof. Christian Fiebach) at the Department of Psychology of Goethe University Frankfurt offers three research positions as part of an ERC consolidator project that investigates neurophysiological mechanisms of language processing from a predictive coding perspective: Postdoctoral Researcher (German Salary Level E13, 100%) in Cognitive and Computational Neuroscience of Language We seek a colleague with a strong background in EEG/MEG, fMRI, and/or neuro-computational modeling, and an interest in brain mechanisms underlying language processing. You should have skills in signal processing, data analysis, and/or computational modeling, programming skills (e.g., Matlab, Python), and willingness to acquire expertise in all three methods. The successful candidate will be involved in all aspects of the project and should be motivated to further develop this topic. The position is offered initially for two years. However, an extension for up to five years is possible. Two PhD positions (German Salary Level E13, 65%) in Cognitive Neuroscience of Language The PhD projects involve fMRI and MEG/EEG experiments in the field of language processing. We encourage applications from excellent and enthusiastic candidates with MSc or equivalent degrees from Psychology, Neuroscience, Computational Neuroscience, Biology, Physics, or related areas, who share our interest in understanding investigating the neural bases of language processing. Programming skills (e.g., Matlab, Python) are appreciated. Tasks involve the design, acquisition, and analysis of fMRI and MEG/EEG experiments, as well as the publication of research findings. The PhD positions involve funding for three years. Our lab is at the Department of Psychology and is part of Frankfurt’s vibrant neuroscience community (Interdisciplinary Center for Neurosciences Frankfurt) and the larger Rhein-Main area (Rhein Main Neuroscience Network Frankfurt/Mainz). We have access to state of the art facilities involving the Frankfurt Brain Imaging Center with two 3T MR scanners and a 275 channel MEG, as well as EEG, fNIRS and eye tracking. The positions are available from September 1, 2014, and available until filled. Further information can be obtained directly from Christian Fiebach. Please send your complete application (including CV, certificates, as well as names of two referees) electronically to Prof. Christian Fiebach, Department of Psychology, Goethe University Frankfurt, Grüneburgplatz 1, D-60323 Frankfurt am Main (fiebach at psych.uni-frankfurt.de). -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: FiebachLabFrankfurt_1PostDoc_2PhD_ERCproject.pdf Type: application/pdf Size: 138583 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Jul 18 08:48:31 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 18 Jul 2014 08:48:31 +0200 Subject: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data In-Reply-To: <53C7D1EE.8040007@donders.ru.nl> References: <171511570.2562741.1405516056153.JavaMail.root@bcbl.eu> <53C7D1EE.8040007@donders.ru.nl> Message-ID: Hi Fred, Just to add to Jörn's comment, to be entirely clear: you should not need to edit FT code to enable using the combineClusters mex-file; the default code should be calling it already. If it isn't, either something is wrong, or the mex-file has not been compiled for your platform (but I guess the latter is not the case since you're on Linux 64). Note that the 'which combineClusters' on the default command window won't work as combineClusters is a private function. Hope that helps. Best, Eelke On 17 July 2014 15:38, "Jörn M. Horschig" wrote: > Hi Fred, > > Matlab is giving mex-files precedence over .m file as long as the mex-file > is on the path. The easiest ways to check whether Matlab uses the mex-file > is to type >>> which combineClusters > that should point to the mex file. Another way to check is to put a > breakpoint in the beginning of the .m-file, and then call combineClusters or > run your code. If the mex-file is executed, Matlab will not enter the > .m-file and thus not arrive and not stop at the breakpoint. > > However, the files are also in FieldTrip/private, and this is the place > where other functions that FieldTrip uses are stored. So, actually there is > no need for you to copy the files over to a separate folder. > FieldTrip/Matlab should execute the mex-files all by itself already. > > Best, > Jörn > > > On 7/16/2014 3:07 PM, Frédéric Roux wrote: >> >> Hi Eelke, >> >> thanks for your response - that sounds promising. >> >> I am running fieldtrip-20140527 on a 64 bit Linux server, so I'd >> be keen to give your suggestion a try. >> >> This is actually the first time I am calling mex-files using Matlab, >> but I assume that the way to go is to comment out the part of the code >> in ft_findcluster that combines the cluster and to call the mex-file >> instead? >> >> If yes, here is what I did: I copied the combineClusters.mexa64 file into >> a spearate folder and added that folder to my Matlab path. >> >> % combine clusters that are connected in neighbouring channel(s) >> % (combinations). Convert inputs to uint32 as that is required by the mex >> % file (and the values will be positive integers anyway). >> addpath('/path2home/mex/'); >> cluster = combineClusters(uint32(labelmat), >> logical(spatdimneighbstructmat), uint32(total)); >> >> I am not sure however how to call the mex function. Is this done >> automatically or do >> I need to add some further steps? May I ask you which approach you are >> using? >> >> Best, >> Fred >> >> >> >> Frédéric Roux >> >> ----- Original Message ----- >> From: "Eelke Spaak" >> To: "FieldTrip discussion list" >> Sent: Wednesday, July 16, 2014 9:39:03 AM >> Subject: Re: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance >> computation speed for time-frequency data >> >> Hi Fred, >> >> Some time ago, I replaced parts of the clustering routine with a >> mex-file. For me this greatly sped up the cluster stats. I guess you >> are using a fairly recent (<1yr old) FT version? The platform you're >> using might also be relevant, I just noticed that the mex-file >> (private/combineClusters.mex*) is distributed in compiled form only >> for Linux 64 and Windows 32/64 bit. If you're e.g. on a Macintosh, you >> could compile it yourself from the src/combineClusters.cpp source >> file. >> >> I know of no attempts to parallelise the clustering code. >> >> Best, >> Eelke >> >> On 15 July 2014 17:40, Frédéric Roux wrote: >>> >>> Dear all, >>> >>> I would like to ask if anyone has ever tried to speed up the >>> ft_statistics_montecarlo function >>> by using Matlab's parallel computing toolbox ? >>> >>> I would like to run clusterstatistics on time-frequency data, but as a >>> result of the large number >>> of time and frequency bins, the function runs very slowly. So I was >>> thinking to try and modify >>> the code by running the loops over the frequency bins in parallel and see >>> if that could save >>> some time. >>> >>> Before starting to adapt the code on my own, however, I wanted to ask if >>> anyone had ever tried that >>> and also if there could be any possible reasons which would make that >>> this is not a feasible project. >>> >>> Any thoughts or suggestions would be highly appreciated. >>> >>> Best, >>> Fred >>> >>> >>> >>> --------------------------------------------------------------------------- >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From j.herring at fcdonders.ru.nl Fri Jul 18 15:06:40 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Fri, 18 Jul 2014 15:06:40 +0200 (CEST) Subject: [FieldTrip] Fwd: variable "abort" In-Reply-To: <1405337932.32621.YahooMailNeo@web141605.mail.bf1.yahoo.com> Message-ID: <68127070.3916400.1405688800801.JavaMail.root@draco.zimbra.ru.nl> Dear Payman, I'm forwarding this e-mail to the mailinglist as the solution might be useful for others. Best, Jim ----- Doorgestuurd bericht ----- > Van: "paymando- morientes" > Aan: "J.D. Herring (Jim)" > Verzonden: Maandag 14 juli 2014 13:38:52 > Onderwerp: Re: [FieldTrip] variable "abort" > Thanks for your help. I found where the problem was. I had two > versions of FieldTrip installed . I removed the older one and the > problem was solved. > regards > payman > On Monday, 14 July 2014, 9:15, "Herring, J.D. (Jim)" > wrote: > Hi Payman, > ‘abort’ is indeed set by ft_preamble_init, which is called by > ft_definetrial through ft_preamble. This function is located in > fieldtrip/utilities. Could it be that your paths are not correctly > set? Did you run ft_defaults before running your script? > Best, > Jim > From: paymando- morientes [mailto:paymandomorientes at yahoo.com] > Sent: donderdag 10 juli 2014 20:24 > To: Herring, J.D. (Jim); 'FieldTrip discussion list' > Subject: Re: [FieldTrip] variable "abort" > oh sorry I mistyped it. I meant ft_definetrial. > thanks for your help > On Thursday, 10 July 2014, 13:40, "Herring, J.D. (Jim)" < > j.herring at fcdonders.ru.nl > wrote: > Dear Payman, > As far as I can tell there is no function called ft_definevarible, > could you please recheck which function is given you problems? > Best, > Jim > From: fieldtrip-bounces at science.ru.nl [ > mailto:fieldtrip-bounces at science.ru.nl ] On Behalf Of paymando- > morientes > Sent: donderdag 10 juli 2014 13:23 > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] variable "abort" > Dear all > I have a problem starting with field trip. When I call > "ft_definevarible" function, it throws an error that "abort" variable > is not defined. I checked the ".m file" for the function and it says > that abort is set by "ft_preamble" function. So where is the problem? > Should I change something in my script? or "ft_preamble" function is > not doing its job? > by the way i hope I am sending this message to the right e-mail. > thanks in advance > payman -- Jim Herring, MSc. Neuronal Oscillations Group Centre for Cognitive Neuroimaging Donders Institute for Brain, Cognition and Behaviour Radboud University Nijmegen -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Fri Jul 18 23:54:05 2014 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Fri, 18 Jul 2014 21:54:05 +0000 Subject: [FieldTrip] ft_volumerealign always producing coordsys 'ctf'. Message-ID: Hi all, I had understood, that using ft_volumerealign, and manually marking fiducials, should produce a new structure (mri_real) with a cfg.coordsys matching the actual MEG system you are using- in my case neuromag. However, no mater how much I play around with the ft_volumerealign, I always end up with a structure with mri_real.coordsys='ctf'. Later down the track, my volume conduction model is not properly aligned to my sensors. Currently I am just using the following basic code: cfg=[]; cfg.method = 'interactive'; mri_real = ft_volumerealign(cfg, mri); Does anyone know what I am doing wrong here? Cheers, Kaelasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From azadehh at uvic.ca Sat Jul 19 00:26:06 2014 From: azadehh at uvic.ca (Azadeh Hajihosseini) Date: Fri, 18 Jul 2014 15:26:06 -0700 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices Message-ID: Hello FieldTrip members, I am trying to source localize EEG oscillatory activity and have a few problems in constructing the forward model and eventually running the source analysis. I think the problems are related to each other. Here is what happens: 1- When I run the source analysis, I get this error message: *??? Error using ==> svd* *Input to SVD must not contain NaN or Inf.* *Error in ==> beamformer_dics>pinv at 650* * [U,S,V] = svd(A,0);* *Error in ==> beamformer_dics at 339* * filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross eqn. 3, use PINV/SVD to cover rank* * deficient leadfield* *Error in ==> ft_sourceanalysis at 572* * dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:});* *Error in ==> test_sourceanalysis at 12* *sourceTF = ft_sourceanalysis(cfg, data_TF);* 2- Checking the leadfiled matrices, I see there are a lot of NaN values. 3- When I visualize the head model I have created, the plots don't look right. The third field, *vol.bnd(3),* which is supposed to be the brain tissue, looks like a cube. And here are my code lines: *% CONSTRUCT A HEAD MODEL from the template mri in FT's template/anatomy* *mri = ft_read_mri('template\anatomy\single_subj_T1.nii');* *mri.coordsys = 'spm';* *%SEGMENTATION:* *cfg = [];* *cfg.output = {'brain','skull','scalp'};* *segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT resliced data* *save segmentedmri_template segmentedmri_template* *%CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL)* *cfg = [];* *cfg.method ='bemcp';* *cfg.tissue ={'brain','skull','scalp'};* *% cfg.outputfile = 'template_';* *vol = ft_prepare_headmodel(cfg, segmentedmri_template);* *save vol vol* *%Visualization of the head model* *figure;* *ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp * *figure;* *ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull* *figure;* *ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks like a cube* *% Align electrodes * *elec = ft_read_sens('template\electrode\standard_1020.elc'); * *% load volume conduction model* *% load vol; * *%interactive allignment* *cfg = [];* *cfg.method = 'interactive';* *cfg.elec = elec;* *cfg.headshape = vol.bnd(1);* *elec_aligned = ft_electroderealign(cfg);* *save elec_aligned elec_aligned* *% Prepare leadfield* *load data_TF* *cfg=[];* *cfg.vol = vol; %structure with volume conduction model* *cfg.elec = elec_aligned;%structure with electrode positions* *[grid] = ft_prepare_leadfield(cfg, data_TF);* *% Find source* *cfg = []; * *cfg.method = 'dics';* *cfg.frequency = 25; * *cfg.grid = grid; * *cfg.vol = vol;* *cfg.latency = .4;%single number in seconds, for time-frequency analysis* *cfg.dics.projectnoise = 'yes';* *cfg.dics.lambda = 0;* *cfg.elec = elec_aligned;%structure with electrode positions* *sourceTF = ft_sourceanalysis(cfg, data_TF);* I am using *wavelet *with a *fourier* output for the time-frequency analysis (*data_TF)*. Do you have any idea what might be wrong here? I also have a more general question. What type of time-frequency data can be input to source analysis? *ft_freqanalysis* provides power, power and cross-spectra, and complex fourier outputs. But is source-localization based on only power data correct? I couldn't find any explanations regarding this issue in the tutorial. I look forward to hearing from anyone who might have ideas about any of these issues! Many thanks, -- Azadeh HajiHosseini -------------- next part -------------- An HTML attachment was scrubbed... URL: From jinghua1227 at gmail.com Sat Jul 19 05:48:36 2014 From: jinghua1227 at gmail.com (Jinghua OU) Date: Sat, 19 Jul 2014 11:48:36 +0800 Subject: [FieldTrip] Problems with ft_resampledata Message-ID: Hello, I am using ft_resampledata to downsize my data and the code is as follows: cfg = []; cfg.resamplefs = 500; cfg.detrend = 'no'; data_resample = ft_resampledata(cfg, data_AR_bc); however, some errors occur as follows: ??? Undefined function or method 'resample' for input arguments of type 'double'. Error in ==> ft_resampledata at 182 data.trial{itr} = transpose(resample(transpose(data.trial{itr}),fsres,fsorig)); Is there something I'm missing? Thank you very much for your help in advacne. Best, Jinghua -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Sat Jul 19 08:45:51 2014 From: roeysc at gmail.com (Roey Schurr) Date: Sat, 19 Jul 2014 09:45:51 +0300 Subject: [FieldTrip] ft_volumerealign always producing coordsys 'ctf'. In-Reply-To: References: Message-ID: Dear Kaelasha, If I understand correctly (and as describes in the function's code), ft_realign has a default coordinate system that is used when using the different methods of realigning. When using 'interactive', this default is indeed ctf. Please try the following (specifying the coordinate system yourself) and tell us how it goes: cfg=[]; cfg.method = 'interactive'; cfg.coordsys = 'neurmag'; mri_real = ft_volumerealign(cfg, mri); Best, Roey On Sat, Jul 19, 2014 at 12:54 AM, Kaelasha Tyler wrote: > Hi all, > > I had understood, that using ft_volumerealign, and manually marking > fiducials, should produce a new structure (mri_real) with a cfg.coordsys > matching the actual MEG system you are using- in my case neuromag. > > However, no mater how much I play around with the ft_volumerealign, I > always end up with a structure with mri_real.coordsys='ctf'. > > Later down the track, my volume conduction model is not properly aligned > to my sensors. > > Currently I am just using the following basic code: > > > cfg=[]; > > cfg.method = 'interactive'; > > mri_real = ft_volumerealign(cfg, mri); > > Does anyone know what I am doing wrong here? > > Cheers, > Kaelasha > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Sun Jul 20 08:35:23 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Sun, 20 Jul 2014 06:35:23 +0000 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: References: Message-ID: <4C11F599-521E-49EA-B84D-6F46BF24A201@flinders.edu.au> I don't know if this advice is at all correct but I usually get that error if I've got a relatively small number of electrodes (~29) or a small data set (30 seconds of data). Does that sound familiar? I usually clear all and run it again and it will work eventually haha Sent from my iPad On 19 Jul 2014, at 8:01 am, "Azadeh Hajihosseini" > wrote: Hello FieldTrip members, I am trying to source localize EEG oscillatory activity and have a few problems in constructing the forward model and eventually running the source analysis. I think the problems are related to each other. Here is what happens: 1- When I run the source analysis, I get this error message: ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> beamformer_dics>pinv at 650 [U,S,V] = svd(A,0); Error in ==> beamformer_dics at 339 filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross eqn. 3, use PINV/SVD to cover rank deficient leadfield Error in ==> ft_sourceanalysis at 572 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); Error in ==> test_sourceanalysis at 12 sourceTF = ft_sourceanalysis(cfg, data_TF); 2- Checking the leadfiled matrices, I see there are a lot of NaN values. 3- When I visualize the head model I have created, the plots don't look right. The third field, vol.bnd(3), which is supposed to be the brain tissue, looks like a cube. And here are my code lines: % CONSTRUCT A HEAD MODEL from the template mri in FT's template/anatomy mri = ft_read_mri('template\anatomy\single_subj_T1.nii'); mri.coordsys = 'spm'; %SEGMENTATION: cfg = []; cfg.output = {'brain','skull','scalp'}; segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT resliced data save segmentedmri_template segmentedmri_template %CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL) cfg = []; cfg.method ='bemcp'; cfg.tissue ={'brain','skull','scalp'}; % cfg.outputfile = 'template_'; vol = ft_prepare_headmodel(cfg, segmentedmri_template); save vol vol %Visualization of the head model figure; ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp figure; ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull figure; ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks like a cube % Align electrodes elec = ft_read_sens('template\electrode\standard_1020.elc'); % load volume conduction model % load vol; %interactive allignment cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_aligned = ft_electroderealign(cfg); save elec_aligned elec_aligned % Prepare leadfield load data_TF cfg=[]; cfg.vol = vol; %structure with volume conduction model cfg.elec = elec_aligned;%structure with electrode positions [grid] = ft_prepare_leadfield(cfg, data_TF); % Find source cfg = []; cfg.method = 'dics'; cfg.frequency = 25; cfg.grid = grid; cfg.vol = vol; cfg.latency = .4;%single number in seconds, for time-frequency analysis cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = 0; cfg.elec = elec_aligned;%structure with electrode positions sourceTF = ft_sourceanalysis(cfg, data_TF); I am using wavelet with a fourier output for the time-frequency analysis (data_TF). Do you have any idea what might be wrong here? I also have a more general question. What type of time-frequency data can be input to source analysis? ft_freqanalysis provides power, power and cross-spectra, and complex fourier outputs. But is source-localization based on only power data correct? I couldn't find any explanations regarding this issue in the tutorial. I look forward to hearing from anyone who might have ideas about any of these issues! Many thanks, -- Azadeh HajiHosseini _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Sun Jul 20 11:14:25 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Sun, 20 Jul 2014 09:14:25 +0000 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: <4C11F599-521E-49EA-B84D-6F46BF24A201@flinders.edu.au> References: <4C11F599-521E-49EA-B84D-6F46BF24A201@flinders.edu.au> Message-ID: <1E693A08-6073-49AE-BDAD-D028B3F73BA3@flinders.edu.au> Also are the units the same for your Headmodel, electrodes and sourcemodel(?) Sent from my iPad On 20 Jul 2014, at 4:08 pm, "Tyler Grummett" > wrote: I don't know if this advice is at all correct but I usually get that error if I've got a relatively small number of electrodes (~29) or a small data set (30 seconds of data). Does that sound familiar? I usually clear all and run it again and it will work eventually haha Sent from my iPad On 19 Jul 2014, at 8:01 am, "Azadeh Hajihosseini" > wrote: Hello FieldTrip members, I am trying to source localize EEG oscillatory activity and have a few problems in constructing the forward model and eventually running the source analysis. I think the problems are related to each other. Here is what happens: 1- When I run the source analysis, I get this error message: ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> beamformer_dics>pinv at 650 [U,S,V] = svd(A,0); Error in ==> beamformer_dics at 339 filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross eqn. 3, use PINV/SVD to cover rank deficient leadfield Error in ==> ft_sourceanalysis at 572 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); Error in ==> test_sourceanalysis at 12 sourceTF = ft_sourceanalysis(cfg, data_TF); 2- Checking the leadfiled matrices, I see there are a lot of NaN values. 3- When I visualize the head model I have created, the plots don't look right. The third field, vol.bnd(3), which is supposed to be the brain tissue, looks like a cube. And here are my code lines: % CONSTRUCT A HEAD MODEL from the template mri in FT's template/anatomy mri = ft_read_mri('template\anatomy\single_subj_T1.nii'); mri.coordsys = 'spm'; %SEGMENTATION: cfg = []; cfg.output = {'brain','skull','scalp'}; segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT resliced data save segmentedmri_template segmentedmri_template %CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL) cfg = []; cfg.method ='bemcp'; cfg.tissue ={'brain','skull','scalp'}; % cfg.outputfile = 'template_'; vol = ft_prepare_headmodel(cfg, segmentedmri_template); save vol vol %Visualization of the head model figure; ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp figure; ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull figure; ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks like a cube % Align electrodes elec = ft_read_sens('template\electrode\standard_1020.elc'); % load volume conduction model % load vol; %interactive allignment cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_aligned = ft_electroderealign(cfg); save elec_aligned elec_aligned % Prepare leadfield load data_TF cfg=[]; cfg.vol = vol; %structure with volume conduction model cfg.elec = elec_aligned;%structure with electrode positions [grid] = ft_prepare_leadfield(cfg, data_TF); % Find source cfg = []; cfg.method = 'dics'; cfg.frequency = 25; cfg.grid = grid; cfg.vol = vol; cfg.latency = .4;%single number in seconds, for time-frequency analysis cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = 0; cfg.elec = elec_aligned;%structure with electrode positions sourceTF = ft_sourceanalysis(cfg, data_TF); I am using wavelet with a fourier output for the time-frequency analysis (data_TF). Do you have any idea what might be wrong here? I also have a more general question. What type of time-frequency data can be input to source analysis? ft_freqanalysis provides power, power and cross-spectra, and complex fourier outputs. But is source-localization based on only power data correct? I couldn't find any explanations regarding this issue in the tutorial. I look forward to hearing from anyone who might have ideas about any of these issues! Many thanks, -- Azadeh HajiHosseini _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From author at example.com Mon Jul 21 09:19:36 2014 From: author at example.com (Author Name Removed) Date: Mon, 21 Jul 2014 09:19:36 +0200 Subject: [Subject Removed] In-Reply-To: References: Message-ID: <119C5BD5-2DC7-42B4-A4C4-A3B9B74DB762@gmail.com> A non-text attachment was scrubbed... Name: not available Type: multipart/alternative Size: 216 bytes Desc: not available URL: From eelke.spaak at donders.ru.nl Mon Jul 21 09:58:30 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 21 Jul 2014 09:58:30 +0200 Subject: [FieldTrip] Problems with ft_resampledata In-Reply-To: References: Message-ID: Hi Jinghua, The function 'resample' is part of Mathworks' Signal Processing Toolbox. Currently, unfortunately, this toolbox is a requirement for certain FieldTrip functionality, including ft_resampledata. Best, Eelke On 19 July 2014 05:48, Jinghua OU wrote: > Hello, > > I am using ft_resampledata to downsize my data and the code is as follows: > > cfg = []; > cfg.resamplefs = 500; > cfg.detrend = 'no'; > data_resample = ft_resampledata(cfg, data_AR_bc); > > however, some errors occur as follows: > > ??? Undefined function or method 'resample' for input arguments of type > 'double'. > > Error in ==> ft_resampledata at 182 > data.trial{itr} = > transpose(resample(transpose(data.trial{itr}),fsres,fsorig)); > > Is there something I'm missing? > Thank you very much for your help in advacne. > > Best, > Jinghua > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From roeysc at gmail.com Mon Jul 21 11:21:32 2014 From: roeysc at gmail.com (Roey Schurr) Date: Mon, 21 Jul 2014 12:21:32 +0300 Subject: [FieldTrip] MNE Source Reconstruction Sanity Check Message-ID: Dear fieldtrippers, I want to do a sanity check on mne source reconstruction. I'm working on continuous EEG recordings (19 electrodes), estimating the source reconstruction activity using the *mne* (minimum norm estimate) method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As a sanity check for the source reconstruction itself, I wanted to compare conditions in which I could estimate the loci of significant changes, e.g.: rest vs movement of the hand, moving the right hand vs the left hand, etc. I have about 60 seconds of recording for each condition. What I did was: 1) Segment the recording of each condition into many "trials" of 2 seconds each. 2) For each trial, average the activity in each of the 90 ROIs of the aal atlas (I excluded the cerebellum from the source reconstruction). I was wondering what comparison would be best in this case. Since this is not Evoked Responses data, I find it hard to find relevant ideas, and would like to hear your thoughts. 1) I did a frequency analysis (mtmfft) in conventional bands of interest and ran ft_freqstatistics on the resulting structures (using ttest2 and the bonferoni correction for the multiple comparison problem). This gave some results, however for most conditions they are not very encouraging (the ROIs that showed significant differences were not close to those that I have assumed). *QUESTION 1*: do you think this is a proper method? Note that I did not use a frequency based source reconstruction in the first place, because I'm ultimately interested in the time course in the source space. 2) I was wondering if a cluster based permutation test is impossible to use here, since this is a continuous recording, so clustering according to time adjacency seems irrelevant. *QUESTION 2*: is it possible to use a cluster based statistical test here? If so, it could be better than a-priori averaging the source activity in the atlas ROIs, which could mask some of the effects, if they are located in a small area. 3) Another possibility is looking at the data itself. Unfortunately I encountered some problems using ft_sourcemovie, though this is a subject for a different thread. Any thoughts and advice are highly appreciated! Thank you for taking the time, roey -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Mon Jul 21 15:11:19 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Mon, 21 Jul 2014 15:11:19 +0200 Subject: [FieldTrip] phase synchronisation Message-ID: Dear all, I'm a bit confused with the computation of phase synchronisation. What I'm interested is to compute the phase synchronisation changes in the second session (i.e. 1 year later) with respect to the first session. There are 64 EEG channels in my data. I'm interested to compute the mean phase coherence index. >From the tutorial on 'analysis of sensor and source level connectivity, it seems to me one has to first compute the multivariate autoregressive model, follow by the spectral density function, follow by non-parametric computation of the cross spectral density function and finally the connectivity measures. However, when I tried to compute the multivariate autoregressive model as suggested, I get an error message: Error using chol Matrix must be positive definite. Error in armorf (line 40) ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); Error in ft_mvaranalysis (line 395) [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), size(tmpdata.trial{1},2), cfg.order); Can someone help me? Thanks! Cheers, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From khangsile at gmail.com Mon Jul 21 17:21:47 2014 From: khangsile at gmail.com (Khang Le) Date: Mon, 21 Jul 2014 17:21:47 +0200 Subject: [FieldTrip] Using real time field trip buffer on separate machines Message-ID: Hi everyone, I am currently attempting to use the field trip buffer, and I have been able to have it running on a single computer with two matlab instances, but for complicated reasons, I must use it with two computers. So the setup that I need to produce is to have one computer acquire data and write it to a remote server/virtual machine while my vm on the remote server reads the data and subsequently processes it. For right now, I am having trouble figuring out how to point my acquisition computer to write data to the buffer on the remote server. I know there is a possibility that I may have to change a little of the source code. If anyone has done this before or can assist, I would greatly appreciate it! Thanks, Khang -------------- next part -------------- An HTML attachment was scrubbed... URL: From nabra005 at odu.edu Mon Jul 21 19:10:15 2014 From: nabra005 at odu.edu (Nijo Abraham) Date: Mon, 21 Jul 2014 13:10:15 -0400 Subject: [FieldTrip] Event Type in own .mat structure Message-ID: Hi everyone. This question might sound trivial to many. However, since I just started using Fieldtrip I am having a tough time figuring how to input my own event types, start and end time for each event etc into the modified matlab data structure. I have a matlab structure with 4 EEG channels, obtained from Simulink. My ultimate goal is to convert this structure into a format with event types and event values that can be read by SPM. However, I am not able to find any tutorial that explain how one can add event types into own matlab data structure. (All the tutorials assume that the .ds or .vhr etc files already have event types assigned to them.) Can anyone help me out ? (P.S. I was successful in breaking down the .mat structure into trial, including adding the trialinfo attribute. However, the trialinfo cannot be read as an event in SPM. Only eventtypes and event values are asked as inputs in SPM, it seems) Neo -------------- next part -------------- An HTML attachment was scrubbed... URL: From azadehh at uvic.ca Mon Jul 21 20:12:56 2014 From: azadehh at uvic.ca (Azadeh Hajihosseini) Date: Mon, 21 Jul 2014 11:12:56 -0700 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: References: <4C11F599-521E-49EA-B84D-6F46BF24A201@flinders.edu.au> <1E693A08-6073-49AE-BDAD-D028B3F73BA3@flinders.edu.au> Message-ID: Hi Tyler, Thanks for responding! Actually, I have 51 electrodes. I also checked the units again and they are all 'mm'. It looks like there is a problem in preparing the head model because when I call the line: *vol = ft_prepare_headmodel(cfg, segmentedmri_template), * there is this warning: *Warning: Matrix is singular, close to singular or badly scaled.* * Results may be inaccurate. RCOND = NaN. * coming from *ft_headmodel_bemcp. *Any idea about this? Thanks again!! Azadeh > On Sun, Jul 20, 2014 at 2:14 AM, Tyler Grummett < > tyler.grummett at flinders.edu.au> wrote: > >> Also are the units the same for your Headmodel, electrodes and >> sourcemodel(?) >> >> Sent from my iPad >> >> On 20 Jul 2014, at 4:08 pm, "Tyler Grummett" < >> tyler.grummett at flinders.edu.au> wrote: >> >> I don't know if this advice is at all correct but I usually get that >> error if I've got a relatively small number of electrodes (~29) or a small >> data set (30 seconds of data). >> >> Does that sound familiar? >> >> I usually clear all and run it again and it will work eventually haha >> >> Sent from my iPad >> >> On 19 Jul 2014, at 8:01 am, "Azadeh Hajihosseini" >> wrote: >> >> Hello FieldTrip members, >> >> I am trying to source localize EEG oscillatory activity and have a few >> problems in constructing the forward model and eventually running the >> source analysis. I think the problems are related to each other. Here is >> what happens: >> >> 1- When I run the source analysis, I get this error message: >> >> *??? Error using ==> svd* >> *Input to SVD must not contain NaN or Inf.* >> >> *Error in ==> beamformer_dics>pinv at 650* >> * [U,S,V] = svd(A,0);* >> >> *Error in ==> beamformer_dics at 339* >> * filt = pinv(lf' * invCf * lf) * lf' * invCf; % >> Gross eqn. 3, use PINV/SVD to cover rank* >> * deficient leadfield* >> >> *Error in ==> ft_sourceanalysis at 572* >> * dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), >> optarg{:});* >> >> *Error in ==> test_sourceanalysis at 12* >> *sourceTF = ft_sourceanalysis(cfg, data_TF);* >> >> >> 2- Checking the leadfiled matrices, I see there are a lot of NaN values. >> 3- When I visualize the head model I have created, the plots don't look >> right. The third field, *vol.bnd(3),* which is supposed to be the brain >> tissue, looks like a cube. >> >> And here are my code lines: >> >> *% CONSTRUCT A HEAD MODEL from the template mri in FT's >> template/anatomy* >> *mri = ft_read_mri('template\anatomy\single_subj_T1.nii');* >> *mri.coordsys = 'spm';* >> >> *%SEGMENTATION:* >> *cfg = [];* >> *cfg.output = {'brain','skull','scalp'};* >> *segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT >> resliced data* >> *save segmentedmri_template segmentedmri_template* >> >> >> *%CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL)* >> *cfg = [];* >> *cfg.method ='bemcp';* >> *cfg.tissue ={'brain','skull','scalp'};* >> *% cfg.outputfile = 'template_';* >> *vol = ft_prepare_headmodel(cfg, segmentedmri_template);* >> *save vol vol* >> >> *%Visualization of the head model* >> *figure;* >> *ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp * >> *figure;* >> *ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull* >> *figure;* >> *ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks like >> a cube* >> >> *% Align electrodes * >> *elec = ft_read_sens('template\electrode\standard_1020.elc'); * >> *% load volume conduction model* >> *% load vol; * >> >> *%interactive allignment* >> *cfg = [];* >> *cfg.method = 'interactive';* >> *cfg.elec = elec;* >> *cfg.headshape = vol.bnd(1);* >> *elec_aligned = ft_electroderealign(cfg);* >> >> *save elec_aligned elec_aligned* >> >> *% Prepare leadfield* >> *load data_TF* >> *cfg=[];* >> *cfg.vol = vol; %structure with volume conduction model* >> *cfg.elec = elec_aligned;%structure with electrode positions* >> *[grid] = ft_prepare_leadfield(cfg, data_TF);* >> >> *% Find source* >> *cfg = []; * >> *cfg.method = 'dics';* >> *cfg.frequency = 25; * >> *cfg.grid = grid; * >> *cfg.vol = vol;* >> *cfg.latency = .4;%single number in seconds, for time-frequency >> analysis* >> *cfg.dics.projectnoise = 'yes';* >> *cfg.dics.lambda = 0;* >> *cfg.elec = elec_aligned;%structure with electrode positions* >> >> *sourceTF = ft_sourceanalysis(cfg, data_TF);* >> >> >> I am using *wavelet *with a *fourier* output for the time-frequency >> analysis (*data_TF)*. Do you have any idea what might be wrong here? >> >> I also have a more general question. What type of time-frequency data >> can be input to source analysis? *ft_freqanalysis* provides power, power >> and cross-spectra, and complex fourier outputs. But is source-localization >> based on only power data correct? I couldn't find any explanations >> regarding this issue in the tutorial. >> >> I look forward to hearing from anyone who might have ideas about any of >> these issues! >> >> Many thanks, >> >> -- >> Azadeh HajiHosseini >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laszlo.Grand at libd.org Tue Jul 22 02:09:48 2014 From: Laszlo.Grand at libd.org (Laszlo Grand) Date: Tue, 22 Jul 2014 00:09:48 +0000 Subject: [FieldTrip] Preprocessing and analysis of spike and local field potential data - issue with calling certain functions Message-ID: <3284EAED-05DE-4B52-843A-4A4D6437F7D4@libd.org> Hi, I am a new FieldTrip user with advanced Matlab programming skills. I would like to use FieldTrip for analyzing multichannel local field potentials (EEG) and spike data recorded from rats. As I go throughout the ‘Preprocessing and analysis of spike and local field potential data’ tutorial (http://fieldtrip.fcdonders.nl/tutorial/spikefield), I get the following error message after calling the ft_spiketriggeredaverage function in the ‘Computing the spike triggered average LFP’ section: staPost = ft_spiketriggeredaverage(cfg, data_all); the input is raw data with 6 channels and 600 trials Error using ft_checkconfig (line 205) The field cfg.progress is not allowed Error in ft_spiketriggeredaverage (line 72) cfg = ft_checkconfig(cfg, 'allowed', {'timwin', 'spikechannel', 'channel', 'keeptrials', 'feedback', 'latency', 'trials', 'warning'}); In the ‘Computing the phases of spikes relative to the ongoing LFP ‘ section I receive the same error msg after calling the ft_spiketriggeredspectrum function. stsConvol = ft_spiketriggeredspectrum(cfg, data_all); the input is raw data with 6 channels and 600 trials Error using ft_checkconfig (line 205) The field cfg.progress is not allowed Error in ft_spiketriggeredspectrum_convol (line 135) cfg = ft_checkconfig(cfg, 'allowed', {'taper', 'borderspikes', 't_ftimwin', 'foi', 'spikechannel', 'channel', 'taperopt', 'rejectsaturation','tapsmofrq', 'warning'}); Error in ft_spiketriggeredspectrum (line 106) sts = ft_spiketriggeredspectrum_convol(cfg,data); Can anyone help me to understand the cause and resolving this issue? Thank you, LG -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jul 22 03:50:14 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 22 Jul 2014 01:50:14 +0000 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: References: <4C11F599-521E-49EA-B84D-6F46BF24A201@flinders.edu.au> <1E693A08-6073-49AE-BDAD-D028B3F73BA3@flinders.edu.au> , Message-ID: <1405993814469.56866@flinders.edu.au> Hello Azadeh, Again, fieldtrip experts please let me know if I am wrong, I dont want to lead azadeh or myself astray. The code I use to create my headmodel is the following: cfg = []; cfg.write = 'no'; cfg.coordsys = 'spm'; cfg.output = { 'scalp', 'skull', 'brain'}; segmentedmri = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'iso2mesh'; cfg.numvertices = 10000; bnd = ft_prepare_mesh( cfg, segmentedmri); % fix mesh [ bnd( 1).pnt, bnd( 1).tri] = meshresample( bnd( 1).pnt, bnd( 1).tri, 1000/size( bnd( 1).pnt, 1)); [ bnd( 2).pnt, bnd( 2).tri] = meshresample( bnd( 2).pnt, bnd( 2).tri, 2000/size( bnd( 2).pnt, 1)); [ bnd( 3).pnt, bnd( 3).tri] = meshresample( bnd( 3).pnt, bnd( 3).tri, 3000/size( bnd( 3).pnt, 1)); for ii = 1:size( bnd), [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'dup'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'isolated'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'deep'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'meshfix'); end % calculate headmodel % reordered to brain skull scalp cfg = []; cfg.method = 'bemcp'; %openmeeg doesnt work with multiple output from ft_volumesegment vol = ft_prepare_headmodel(cfg, bnd); clear bnd Also with your previous issue: ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> beamformer_dics>pinv at 650 [U,S,V] = svd(A,0); Error in ==> beamformer_dics at 339 filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross eqn. 3, use PINV/SVD to cover rank deficient leadfield Error in ==> ft_sourceanalysis at 572 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); Error in ==> test_sourceanalysis at 12 sourceTF = ft_sourceanalysis(cfg, data_TF);​ Can you check the variables lf invCf lf should be: number of channels x 3 invCf should be: number of channels x number of channels Previously I would get an error if the number of channels didnt match up because when I select only EEG channels, it doesnt update the data.elec field. So you may need to check that also. Hopefully this works. tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Azadeh Hajihosseini Sent: Tuesday, 22 July 2014 3:42 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices Hi Tyler, Thanks for responding! Actually, I have 51 electrodes. I also checked the units again and they are all 'mm'. It looks like there is a problem in preparing the head model because when I call the line: vol = ft_prepare_headmodel(cfg, segmentedmri_template), there is this warning: Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN. coming from ft_headmodel_bemcp. Any idea about this? Thanks again!! Azadeh On Sun, Jul 20, 2014 at 2:14 AM, Tyler Grummett > wrote: Also are the units the same for your Headmodel, electrodes and sourcemodel(?) Sent from my iPad On 20 Jul 2014, at 4:08 pm, "Tyler Grummett" > wrote: I don't know if this advice is at all correct but I usually get that error if I've got a relatively small number of electrodes (~29) or a small data set (30 seconds of data). Does that sound familiar? I usually clear all and run it again and it will work eventually haha Sent from my iPad On 19 Jul 2014, at 8:01 am, "Azadeh Hajihosseini" > wrote: Hello FieldTrip members, I am trying to source localize EEG oscillatory activity and have a few problems in constructing the forward model and eventually running the source analysis. I think the problems are related to each other. Here is what happens: 1- When I run the source analysis, I get this error message: ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> beamformer_dics>pinv at 650 [U,S,V] = svd(A,0); Error in ==> beamformer_dics at 339 filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross eqn. 3, use PINV/SVD to cover rank deficient leadfield Error in ==> ft_sourceanalysis at 572 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); Error in ==> test_sourceanalysis at 12 sourceTF = ft_sourceanalysis(cfg, data_TF); 2- Checking the leadfiled matrices, I see there are a lot of NaN values. 3- When I visualize the head model I have created, the plots don't look right. The third field, vol.bnd(3), which is supposed to be the brain tissue, looks like a cube. And here are my code lines: % CONSTRUCT A HEAD MODEL from the template mri in FT's template/anatomy mri = ft_read_mri('template\anatomy\single_subj_T1.nii'); mri.coordsys = 'spm'; %SEGMENTATION: cfg = []; cfg.output = {'brain','skull','scalp'}; segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT resliced data save segmentedmri_template segmentedmri_template %CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL) cfg = []; cfg.method ='bemcp'; cfg.tissue ={'brain','skull','scalp'}; % cfg.outputfile = 'template_'; vol = ft_prepare_headmodel(cfg, segmentedmri_template); save vol vol %Visualization of the head model figure; ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp figure; ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull figure; ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks like a cube % Align electrodes elec = ft_read_sens('template\electrode\standard_1020.elc'); % load volume conduction model % load vol; %interactive allignment cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_aligned = ft_electroderealign(cfg); save elec_aligned elec_aligned % Prepare leadfield load data_TF cfg=[]; cfg.vol = vol; %structure with volume conduction model cfg.elec = elec_aligned;%structure with electrode positions [grid] = ft_prepare_leadfield(cfg, data_TF); % Find source cfg = []; cfg.method = 'dics'; cfg.frequency = 25; cfg.grid = grid; cfg.vol = vol; cfg.latency = .4;%single number in seconds, for time-frequency analysis cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = 0; cfg.elec = elec_aligned;%structure with electrode positions sourceTF = ft_sourceanalysis(cfg, data_TF); I am using wavelet with a fourier output for the time-frequency analysis (data_TF). Do you have any idea what might be wrong here? I also have a more general question. What type of time-frequency data can be input to source analysis? ft_freqanalysis provides power, power and cross-spectra, and complex fourier outputs. But is source-localization based on only power data correct? I couldn't find any explanations regarding this issue in the tutorial. I look forward to hearing from anyone who might have ideas about any of these issues! Many thanks, -- Azadeh HajiHosseini _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Jul 22 14:08:25 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 22 Jul 2014 14:08:25 +0200 Subject: [FieldTrip] phase synchronisation In-Reply-To: References: Message-ID: <53CE5439.2030906@donders.ru.nl> Dear Hwee Ling, this error most likely occurs because your data is rank-deficient. You can check this with the rank-function in Matlab. However, when you are interested in phase synchronisation, there is no need to go down the path you are pursuing. You can just compute nonparametric measures, such as coherence, weighted phase lag index or the like. These work entirely on the cross-spectral density. Check out the help of ft_connectivityanalysis for more information. Best, Jörn On 7/21/2014 3:11 PM, Hwee Ling Lee wrote: > Dear all, > > I'm a bit confused with the computation of phase synchronisation. > > What I'm interested is to compute the phase synchronisation changes in > the second session (i.e. 1 year later) with respect to the first > session. There are 64 EEG channels in my data. I'm interested to > compute the mean phase coherence index. > > From the tutorial on 'analysis of sensor and source level > connectivity, it seems to me one has to first compute the multivariate > autoregressive model, follow by the spectral density function, follow > by non-parametric computation of the cross spectral density function > and finally the connectivity measures. However, when I tried to > compute the multivariate autoregressive model as suggested, I get an > error message: > > Error using chol > Matrix must be positive definite. > > Error in armorf (line 40) > ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); > > Error in ft_mvaranalysis (line 395) > [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), > size(tmpdata.trial{1},2), cfg.order); > Can someone help me? > > Thanks! > > Cheers, > Hweeling > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Tue Jul 22 14:11:11 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 22 Jul 2014 14:11:11 +0200 Subject: [FieldTrip] Using real time field trip buffer on separate machines In-Reply-To: References: Message-ID: <53CE54DF.7000200@donders.ru.nl> Hi Khang Le, writing to the buffer depends solely in the acqusition software you are using. We created a summary page of different software that are able to communicate with the FieldTrip buffer: http://fieldtrip.fcdonders.nl/development/realtime/implementation I hope this helps. Otherwise, please be more specific in what acquisition software you are using. Best, Jörn On 7/21/2014 5:21 PM, Khang Le wrote: > Hi everyone, > > I am currently attempting to use the field trip buffer, and I have > been able to have it running on a single computer with two matlab > instances, but for complicated reasons, I must use it with two computers. > > So the setup that I need to produce is to have one computer acquire > data and write it to a remote server/virtual machine while my vm on > the remote server reads the data and subsequently processes it. > > For right now, I am having trouble figuring out how to point my > acquisition computer to write data to the buffer on the remote server. > I know there is a possibility that I may have to change a little of > the source code. If anyone has done this before or can assist, I would > greatly appreciate it! > > Thanks, > > Khang > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Tue Jul 22 14:26:27 2014 From: jm.horschig at donders.ru.nl (=?windows-1252?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 22 Jul 2014 14:26:27 +0200 Subject: [FieldTrip] Preprocessing and analysis of spike and local field potential data - issue with calling certain functions In-Reply-To: <3284EAED-05DE-4B52-843A-4A4D6437F7D4@libd.org> References: <3284EAED-05DE-4B52-843A-4A4D6437F7D4@libd.org> Message-ID: <53CE5873.9010101@donders.ru.nl> Hi Laszlo, this is a bug in the spike-toolbox, because we made some changes to FieldTrip. The spike toolbox explicitly checks what fields are in the cfg and whether the cfg are used in that function - however after FieldTrip has modified the cfg itself already. Thus, in this case, some other FieldTrip function has added cfg.progress, and the program code in ft_spikeXXX was not updated to account for that. As the functions are all open source, you can easily modify them yourself so that the function will work in the presence cfg.progress. Apart from that, we have a bugzilla system: http://bugzilla.fcdonders.nl/ Would you mind registering and posting your mail as a bug? Then we (aka Martin Vinck) can fix this bug, and won't forget this issue any time soon ;) Best, Jörn On 7/22/2014 2:09 AM, Laszlo Grand wrote: > Hi, > > I am a new FieldTrip user with advanced Matlab programming skills. I > would like to use FieldTrip for analyzing multichannel local field > potentials (EEG) and spike data recorded from rats. > As I go throughout the ‘Preprocessing and analysis of spike and local > field potential data’ tutorial > (http://fieldtrip.fcdonders.nl/tutorial/spikefield), I get the > following error message after calling the ft_spiketriggeredaverage > function in the ‘Computing the spike triggered average LFP’ section: > > *staPost = ft_spiketriggeredaverage(cfg, data_all);* > the input is raw data with 6 channels and 600 trials > Error using ft_checkconfig (line 205) > The field cfg.progress is not allowed > > > Error in ft_spiketriggeredaverage (line 72) > cfg = ft_checkconfig(cfg, 'allowed', {'timwin', 'spikechannel', 'channel', > 'keeptrials', 'feedback', 'latency', 'trials', 'warning'}); > > > > In the ‘Computing the phases of spikes relative to the ongoing LFP ‘ > section I receive the same error msg after calling the > ft_spiketriggeredspectrum function. > * > * > *stsConvol = ft_spiketriggeredspectrum(cfg, data_all);* > > the input is raw data with 6 channels and 600 trials > Error using ft_checkconfig (line 205) > The field cfg.progress is not allowed > > > Error in ft_spiketriggeredspectrum_convol (line 135) > cfg = ft_checkconfig(cfg, 'allowed', {'taper', 'borderspikes', > 't_ftimwin', > 'foi', 'spikechannel', 'channel', 'taperopt', > 'rejectsaturation','tapsmofrq', 'warning'}); > > Error in ft_spiketriggeredspectrum (line 106) > sts = ft_spiketriggeredspectrum_convol(cfg,data); > > > Can anyone help me to understand the cause and resolving this issue? > > Thank you, > > LG > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From thomas.wunderle at esi-frankfurt.de Tue Jul 22 17:01:38 2014 From: thomas.wunderle at esi-frankfurt.de (Thomas Wunderle) Date: Tue, 22 Jul 2014 17:01:38 +0200 Subject: [FieldTrip] Preprocessing and analysis of spike and local field potential data - issue with calling certain functions In-Reply-To: <53CE5873.9010101@donders.ru.nl> References: <3284EAED-05DE-4B52-843A-4A4D6437F7D4@libd.org> <53CE5873.9010101@donders.ru.nl> Message-ID: <53CE7CD2.4040400@esi-frankfurt.de> Hi all, I put that bug already two weeks ago into the bugzilla, see http://bugzilla.fcdonders.nl/show_bug.cgi?id=2641 You can add the line 'progress' in ft_checkconfig to make it work again. Best, Thomas Am 22.07.2014 14:26, schrieb "Jörn M. Horschig": > Hi Laszlo, > > this is a bug in the spike-toolbox, because we made some changes to > FieldTrip. The spike toolbox explicitly checks what fields are in the > cfg and whether the cfg are used in that function - however after > FieldTrip has modified the cfg itself already. Thus, in this case, > some other FieldTrip function has added cfg.progress, and the program > code in ft_spikeXXX was not updated to account for that. As the > functions are all open source, you can easily modify them yourself so > that the function will work in the presence cfg.progress. > > Apart from that, we have a bugzilla system: > http://bugzilla.fcdonders.nl/ > Would you mind registering and posting your mail as a bug? Then we > (aka Martin Vinck) can fix this bug, and won't forget this issue any > time soon ;) > > Best, > Jörn > > On 7/22/2014 2:09 AM, Laszlo Grand wrote: >> Hi, >> >> I am a new FieldTrip user with advanced Matlab programming skills. I >> would like to use FieldTrip for analyzing multichannel local field >> potentials (EEG) and spike data recorded from rats. >> As I go throughout the ‘Preprocessing and analysis of spike and local >> field potential data’ tutorial >> (http://fieldtrip.fcdonders.nl/tutorial/spikefield), I get the >> following error message after calling the ft_spiketriggeredaverage >> function in the ‘Computing the spike triggered average LFP’ section: >> >> *staPost = ft_spiketriggeredaverage(cfg, data_all);* >> the input is raw data with 6 channels and 600 trials >> Error using ft_checkconfig (line 205) >> The field cfg.progress is not allowed >> >> >> Error in ft_spiketriggeredaverage (line 72) >> cfg = ft_checkconfig(cfg, 'allowed', {'timwin', 'spikechannel', >> 'channel', >> 'keeptrials', 'feedback', 'latency', 'trials', 'warning'}); >> >> >> >> In the ‘Computing the phases of spikes relative to the ongoing LFP ‘ >> section I receive the same error msg after calling the >> ft_spiketriggeredspectrum function. >> * >> * >> *stsConvol = ft_spiketriggeredspectrum(cfg, data_all);* >> >> the input is raw data with 6 channels and 600 trials >> Error using ft_checkconfig (line 205) >> The field cfg.progress is not allowed >> >> >> Error in ft_spiketriggeredspectrum_convol (line 135) >> cfg = ft_checkconfig(cfg, 'allowed', {'taper', 'borderspikes', >> 't_ftimwin', >> 'foi', 'spikechannel', 'channel', 'taperopt', >> 'rejectsaturation','tapsmofrq', 'warning'}); >> >> Error in ft_spiketriggeredspectrum (line 106) >> sts = ft_spiketriggeredspectrum_convol(cfg,data); >> >> >> Can anyone help me to understand the cause and resolving this issue? >> >> Thank you, >> >> LG >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- ----- Dr. Thomas Wunderle Ernst Strüngmann Institute (ESI) for Neuroscience in Cooperation with Max Planck Society Deutschordenstrasse 46 60528 Frankfurt am Main, Germany www.esi-frankfurt.de thomas.wunderle at esi-frankfurt.de Tel: +49 69 96769 516 Fax: +49 69 96769 555 Sitz der Gesellschaft: Frankfurt am Main Registergericht: Amtsgericht Frankfurt - HRB 84266 Geschäftsführer: Prof. Dr. Pascal Fries From khangsile at gmail.com Wed Jul 23 09:56:03 2014 From: khangsile at gmail.com (Khang Le) Date: Wed, 23 Jul 2014 09:56:03 +0200 Subject: [FieldTrip] Using real time field trip buffer on separate machines In-Reply-To: <53CE54DF.7000200@donders.ru.nl> References: <53CE54DF.7000200@donders.ru.nl> Message-ID: Hi Jörn, The current system I am using is an in-house made NIRS system. We acquire the data from the NIRS device through a simple matlab script. Since I need to do real time analysis on it and since Matlab is single-threaded I was planning on modifying the acquisition matlab script to write to the buffer as it is acquiring data by using the ft_write_data function given in the fileio folder. Thanks, Khang On Tue, Jul 22, 2014 at 2:11 PM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Hi Khang Le, > > writing to the buffer depends solely in the acqusition software you are > using. We created a summary page of different software that are able to > communicate with the FieldTrip buffer: > http://fieldtrip.fcdonders.nl/development/realtime/implementation > I hope this helps. Otherwise, please be more specific in what acquisition > software you are using. > > Best, > Jörn > > > > On 7/21/2014 5:21 PM, Khang Le wrote: > >> Hi everyone, >> >> I am currently attempting to use the field trip buffer, and I have been >> able to have it running on a single computer with two matlab instances, but >> for complicated reasons, I must use it with two computers. >> >> So the setup that I need to produce is to have one computer acquire data >> and write it to a remote server/virtual machine while my vm on the remote >> server reads the data and subsequently processes it. >> >> For right now, I am having trouble figuring out how to point my >> acquisition computer to write data to the buffer on the remote server. I >> know there is a possibility that I may have to change a little of the >> source code. If anyone has done this before or can assist, I would greatly >> appreciate it! >> >> Thanks, >> >> Khang >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jul 23 10:24:00 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 23 Jul 2014 10:24:00 +0200 Subject: [FieldTrip] Using real time field trip buffer on separate machines In-Reply-To: References: <53CE54DF.7000200@donders.ru.nl> Message-ID: <53CF7120.6070608@donders.ru.nl> Hi Khang Le, then maybe the ft_realtime_signalproxy can serve as a template to write data from the matlab script directly into the buffer: http://fieldtrip.fcdonders.nl/reference/ft_realtime_signalproxy Best, Jörn On 7/23/2014 9:56 AM, Khang Le wrote: > Hi Jörn, > > The current system I am using is an in-house made NIRS system. We > acquire the data from the NIRS device through a simple matlab script. > Since I need to do real time analysis on it and since Matlab is > single-threaded I was planning on modifying the acquisition matlab > script to write to the buffer as it is acquiring data by using the > ft_write_data function given in the fileio folder. > > Thanks, > Khang > > > On Tue, Jul 22, 2014 at 2:11 PM, "Jörn M. Horschig" > > wrote: > > Hi Khang Le, > > writing to the buffer depends solely in the acqusition software > you are using. We created a summary page of different software > that are able to communicate with the FieldTrip buffer: > http://fieldtrip.fcdonders.nl/development/realtime/implementation > I hope this helps. Otherwise, please be more specific in what > acquisition software you are using. > > Best, > Jörn > > > > On 7/21/2014 5:21 PM, Khang Le wrote: > > Hi everyone, > > I am currently attempting to use the field trip buffer, and I > have been able to have it running on a single computer with > two matlab instances, but for complicated reasons, I must use > it with two computers. > > So the setup that I need to produce is to have one computer > acquire data and write it to a remote server/virtual machine > while my vm on the remote server reads the data and > subsequently processes it. > > For right now, I am having trouble figuring out how to point > my acquisition computer to write data to the buffer on the > remote server. I know there is a possibility that I may have > to change a little of the source code. If anyone has done this > before or can assist, I would greatly appreciate it! > > Thanks, > > Khang > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From d.lozanosoldevilla at fcdonders.ru.nl Wed Jul 23 16:35:23 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Wed, 23 Jul 2014 16:35:23 +0200 (CEST) Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: <178175387.8004228.1406124800670.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> Dear Roey, In my opinion it's definitely not a good idea to compute MNE using 19 sensors. There are studies that have found a drastic localization precision from 31 to 63 electrodes and further improvements till 123: http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) http://www.ncbi.nlm.nih.gov/pubmed/12495765 Although it's very difficult to know the "minimum" number of electrodes needed to accurately localize a given source (it depends on the strength of the source you want to localize, source reconstruction algorithm, data noise...), 19 electrodes are too low to trust the results you can get. best, Diego ----- Original Message ----- >From roeysc at gmail.com Mon Jul 21 11:21:32 2014From: roeysc at gmail.com (Roey Schurr)Date: Mon, 21 Jul 2014 12:21:32 +0300Subject: [FieldTrip] MNE Source Reconstruction Sanity CheckMessage-ID: Dear fieldtrippers,I want to do a sanity check on mne source reconstruction.I'm working on continuous EEG recordings (19 electrodes), estimating thesource reconstruction activity using the *mne* (minimum norm estimate)method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As asanity check for the source reconstruction itself, I wanted to compareconditions in which I could estimate the loci of significant changes, e.g.:rest vs movement of the hand, moving the right hand vs the left hand, etc.I have about 60 seconds of recording for each condition.What I did was:1) Segment the recording of each condition into many "trials" of 2 secondseach.2) For each trial, average the activity in each of the 90 ROIs of the aalatlas (I excluded the cerebellum from the source reconstruction).I was wondering what comparison would be best in this case. Since this isnot Evoked Responses data, I find it hard to find relevant ideas, and wouldlike to hear your thoughts.1) I did a frequency analysis (mtmfft) in conventional bands of interestand ran ft_freqstatistics on the resulting structures (using ttest2 and thebonferoni correction for the multiple comparison problem). This gave someresults, however for most conditions they are not very encouraging (theROIs that showed significant differences were not close to those that Ihave assumed).*QUESTION 1*: do you think this is a proper method? Note that I did not usea frequency based source reconstruction in the first place, because I'multimately interested in the time course in the source space.2) I was wondering if a cluster based permutation test is impossible to usehere, since this is a continuous recording, so clustering according to timeadjacency seems irrelevant.*QUESTION 2*: is it possible to use a cluster based statistical test here?If so, it could be better than a-priori averaging the source activity inthe atlas ROIs, which could mask some of the effects, if they are locatedin a small area.3) Another possibility is looking at the data itself. Unfortunately Iencountered some problems using ft_sourcemovie, though this is a subjectfor a different thread.Any thoughts and advice are highly appreciated!Thank you for taking the time,roey -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Thu Jul 24 10:07:17 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 24 Jul 2014 08:07:17 +0000 Subject: [FieldTrip] interpolating source then using sourceplot Message-ID: <1406189237804.86816@flinders.edu.au> Hello fieldtrip experts, I just have a question about source interpolation and sourceplot. For some reason or another, my data appears to generate a lot of power at cerebellar regions and some that dont correspond to any brain regions at all. So what I tried was to NaN the power that correspond to the cerebellar regions too see if other brain regions would light up and I still appear to get power at those positions in sourceplot. Ive made sure that all variables are the same coordinate system and have the same units (spm, mm). My code is as follows: % read in mri file template_mri = ft_read_mri( fullfile( matlabrootpath, 'Matlab', 'fieldtrip', ... 'template', 'headmodel', 'standard_mri.mat')); template_mri = ft_convert_coordsys( template_mri, 'spm'); template_mri = ft_volumenormalise( [], template_mri); template_mri = ft_volumereslice( [], template_mri); % map beamformer source locations onto an anatomical label in an atlas cfg = []; cfg.interpmethod = 'nearest'; cfg.parameter = 'tissue'; sourcemodel2 = ft_sourceinterpolate( cfg, atlas, sourcemodel); % NaN power at cerebellar regions temp_source = source; label = lower( atlas.tissuelabel); for iii = 91:numel( label), atlas_sources = find( sourcemodel2.tissue == iii); temp_source.avg.pow( atlas_sources) = NaN; end % interpolate source to mri parameter = 'avg.pow'; cfg = []; % cfg.voxelcoord = 'no'; cfg.downsample = 2; cfg.parameter = parameter; cfg.interpmethod = 'nearest'; sourceInt = ft_sourceinterpolate( cfg, temp_source, template_mri); % Plot interpolated data plot_method = 'slice'; cfg = []; cfg.method = plot_method; % slice ortho surface cfg.funparameter = parameter; cfg.atlas = atlas; cfg.crosshair = 'yes'; ft_sourceplot( cfg, sourceInt); Attached is the sourceplot figure that results Kind regards, Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sourceplot example.png Type: image/png Size: 46707 bytes Desc: sourceplot example.png URL: From pierpaolo12croce at gmail.com Thu Jul 24 12:32:56 2014 From: pierpaolo12croce at gmail.com (Pierpaolo Croce) Date: Thu, 24 Jul 2014 12:32:56 +0200 Subject: [FieldTrip] ft_prepare_mesh Message-ID: Hi all, my question is about "ft_prepare_mesh" function. can i use this function to create a mesh for a different part of body (for example an arm)? or it run only for headmodels? best -- PC -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Thu Jul 24 17:34:39 2014 From: j.herring at fcdonders.ru.nl (E688205) Date: Thu, 24 Jul 2014 17:34:39 +0200 (CEST) Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> References: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <790E6AB9-6372-4F70-9B98-2DE6E084F552@donders.ru.nl> Dear Roey, To add to Diego's comments, since you are dealing with EEG data a single sphere headmodel is not a good idea because it does not take into account the differences in conductivity between the skull, scalp, and brain. This is not a problem for MEG but is important for EEG. Therefore it is better to use, for example, a BEM head model. Best, Jim > On 23 jul. 2014, at 16:38, "Lozano Soldevilla, D. (Diego)" wrote: > > Dear Roey, > > In my opinion it's definitely not a good idea to compute MNE using 19 sensors. There are studies that have found a drastic localization precision from 31 to 63 electrodes and further improvements till 123: > > http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) > http://www.ncbi.nlm.nih.gov/pubmed/12495765 > > Although it's very difficult to know the "minimum" number of electrodes needed to accurately localize a given source (it depends on the strength of the source you want to localize, source reconstruction algorithm, data noise...), 19 electrodes are too low to trust the results you can get. > > best, > > Diego > > > From roeysc at gmail.com Mon Jul 21 11:21:32 2014 > From: roeysc at gmail.com (Roey Schurr) > Date: Mon, 21 Jul 2014 12:21:32 +0300 > Subject: [FieldTrip] MNE Source Reconstruction Sanity Check > Message-ID: > > Dear fieldtrippers, > > > > I want to do a sanity check on mne source reconstruction. > > I'm working on continuous EEG recordings (19 electrodes), estimating the > source reconstruction activity using the *mne* (minimum norm estimate) > method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As a > sanity check for the source reconstruction itself, I wanted to compare > conditions in which I could estimate the loci of significant changes, e.g.: > rest vs movement of the hand, moving the right hand vs the left hand, etc. > I have about 60 seconds of recording for each condition. > > > > What I did was: > > 1) Segment the recording of each condition into many "trials" of 2 seconds > each. > > 2) For each trial, average the activity in each of the 90 ROIs of the aal > atlas (I excluded the cerebellum from the source reconstruction). > > > > I was wondering what comparison would be best in this case. Since this is > not Evoked Responses data, I find it hard to find relevant ideas, and would > like to hear your thoughts. > > > > 1) I did a frequency analysis (mtmfft) in conventional bands of interest > and ran ft_freqstatistics on the resulting structures (using ttest2 and the > bonferoni correction for the multiple comparison problem). This gave some > results, however for most conditions they are not very encouraging (the > ROIs that showed significant differences were not close to those that I > have assumed). > > > > *QUESTION 1*: do you think this is a proper method? Note that I did not use > a frequency based source reconstruction in the first place, because I'm > ultimately interested in the time course in the source space. > > > > 2) I was wondering if a cluster based permutation test is impossible to use > here, since this is a continuous recording, so clustering according to time > adjacency seems irrelevant. > > > > *QUESTION 2*: is it possible to use a cluster based statistical test here? > If so, it could be better than a-priori averaging the source activity in > the atlas ROIs, which could mask some of the effects, if they are located > in a small area. > > > > 3) Another possibility is looking at the data itself. Unfortunately I > encountered some problems using ft_sourcemovie, though this is a subject > for a different thread. > > > > Any thoughts and advice are highly appreciated! > > Thank you for taking the time, > > roey > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laura.Rueda at faber.kuleuven.be Thu Jul 24 17:36:59 2014 From: Laura.Rueda at faber.kuleuven.be (Laura Rueda Delgado) Date: Thu, 24 Jul 2014 15:36:59 +0000 Subject: [FieldTrip] Group analysis at source level Message-ID: Dear fieldtrip users, I'm working with source estimations of EEG data. At the moment, I have estimated the sources at the individual level with individual MRIs. I've used ft_sourceinterpolate and ft_volumenormalise to transform the resulting estimation maps into a template for comparison, and I do this for every subject: cfg = []; cfg.parameter = 'avg.pow'; source = ft_sourceinterpolate(cfg, source, mri); cfg = []; cfg.template = '\spm8\templates\T1.nii'; cfg.parameter = 'all'; cfg.nonlinear = 'yes'; cfg.coordsys = 'spm'; source = ft_volumenormalise(cfg, source); Once I have the estimated sources for all the subjects, I use ft_sourcestatistics: cfg = []; cfg.dim = sourcePre_con{1}.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'avg.pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 'all'; cfg.alpha = 0.05; cfg.tail = 0; cfg.design(1,:) = [1:num 1:num]; cfg.design(2,:) = [ones(1,num) ones(1,num)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg,sourcePost_con{:}, sourcePre_con{:}); And I get this error: Reference to non-existent field 'pos'. Error in statistics_wrapper>get_source_avg (line 643) fprintf('only selecting voxels inside the brain for statistics (%.1f%%)\n', 100*length(varargin{1}.inside)/size(varargin{1}.pos,1)); Error in statistics_wrapper (line 206) [dat, cfg] = get_source_avg(cfg, varargin{:}); Error in ft_sourcestatistics (line 107) [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I check the data structure and the structure of the sources at the individual level, before interpolating and normalising has the pos field, but after these steps, it's gone. How can I work around this error? Do I have to keep the pos field and transform it according to the template? Thank you in advance for your help. Best regards, Laura Rueda -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Thu Jul 24 18:28:41 2014 From: roeysc at gmail.com (Roey Schurr) Date: Thu, 24 Jul 2014 19:28:41 +0300 Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> References: <178175387.8004228.1406124800670.JavaMail.root@sculptor.zimbra.ru.nl> <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Dear Diego, Thank you very much for your reply! I am familiar with these two studies (which I came to know through the wonderful Electrical Neuroimaging book by Cristoph Michel. Unfortunately, the data I have is clinical data that was recorded using only 19 electrodes. Localization precision is indeed too low in that case, but I am hoping it would suffice for analyzing certain aspects of the signal (e.g. power spectrum) on a large enough ROI, or a network of ROIs that covers a large portion of the brain. Thank you once again, roey On Wed, Jul 23, 2014 at 5:35 PM, Lozano Soldevilla, D. (Diego) < d.lozanosoldevilla at fcdonders.ru.nl> wrote: > Dear Roey, > > In my opinion it's definitely not a good idea to compute MNE using 19 > sensors. There are studies that have found a drastic localization precision > from 31 to 63 electrodes and further improvements till 123: > > http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) > http://www.ncbi.nlm.nih.gov/pubmed/12495765 > > Although it's very difficult to know the "minimum" number of electrodes > needed to accurately localize a given source (it depends on the strength of > the source you want to localize, source reconstruction algorithm, data > noise...), 19 electrodes are too low to trust the results you can get. > > best, > > Diego > > > ------------------------------ > > From roeysc at gmail.com Mon Jul 21 11:21:32 2014 > From: roeysc at gmail.com (Roey Schurr) > Date: Mon, 21 Jul 2014 12:21:32 +0300 > Subject: [FieldTrip] MNE Source Reconstruction Sanity Check > Message-ID: > > Dear fieldtrippers, > > > > I want to do a sanity check on mne source reconstruction. > > I'm working on continuous EEG recordings (19 electrodes), estimating the > source reconstruction activity using the *mne* (minimum norm estimate) > method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As a > sanity check for the source reconstruction itself, I wanted to compare > conditions in which I could estimate the loci of significant changes, e.g.: > rest vs movement of the hand, moving the right hand vs the left hand, etc. > I have about 60 seconds of recording for each condition. > > > > What I did was: > > 1) Segment the recording of each condition into many "trials" of 2 seconds > each. > > 2) For each trial, average the activity in each of the 90 ROIs of the aal > atlas (I excluded the cerebellum from the source reconstruction). > > > > I was wondering what comparison would be best in this case. Since this is > not Evoked Responses data, I find it hard to find relevant ideas, and would > like to hear your thoughts. > > > > 1) I did a frequency analysis (mtmfft) in conventional bands of interest > and ran ft_freqstatistics on the resulting structures (using ttest2 and the > bonferoni correction for the multiple comparison problem). This gave some > results, however for most conditions they are not very encouraging (the > ROIs that showed significant differences were not close to those that I > have assumed). > > > > *QUESTION 1*: do you think this is a proper method? Note that I did not use > a frequency based source reconstruction in the first place, because I'm > ultimately interested in the time course in the source space. > > > > 2) I was wondering if a cluster based permutation test is impossible to use > here, since this is a continuous recording, so clustering according to time > adjacency seems irrelevant. > > > > *QUESTION 2*: is it possible to use a cluster based statistical test here? > If so, it could be better than a-priori averaging the source activity in > the atlas ROIs, which could mask some of the effects, if they are located > in a small area. > > > > 3) Another possibility is looking at the data itself. Unfortunately I > encountered some problems using ft_sourcemovie, though this is a subject > for a different thread. > > > > Any thoughts and advice are highly appreciated! > > Thank you for taking the time, > > roey > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Thu Jul 24 20:50:25 2014 From: roeysc at gmail.com (Roey Schurr) Date: Thu, 24 Jul 2014 21:50:25 +0300 Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: <790E6AB9-6372-4F70-9B98-2DE6E084F552@donders.ru.nl> References: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> <790E6AB9-6372-4F70-9B98-2DE6E084F552@donders.ru.nl> Message-ID: Dear Jim, Thank you for drawing my attention to this problem. I have actually tried building a realistic head model using OPENMEG but encountered some compitability problems since our lab does not use Linux. This is indeed one of the most important (short) future tasks - being able to use such realistic head models. Best, roey On Thu, Jul 24, 2014 at 6:34 PM, E688205 wrote: > Dear Roey, > > To add to Diego's comments, since you are dealing with EEG data a single > sphere headmodel is not a good idea because it does not take into account > the differences in conductivity between the skull, scalp, and brain. This > is not a problem for MEG but is important for EEG. Therefore it is better > to use, for example, a BEM head model. > > Best, > > Jim > > On 23 jul. 2014, at 16:38, "Lozano Soldevilla, D. (Diego)" < > d.lozanosoldevilla at fcdonders.ru.nl> wrote: > > Dear Roey, > > In my opinion it's definitely not a good idea to compute MNE using 19 > sensors. There are studies that have found a drastic localization precision > from 31 to 63 electrodes and further improvements till 123: > > http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) > http://www.ncbi.nlm.nih.gov/pubmed/12495765 > > Although it's very difficult to know the "minimum" number of electrodes > needed to accurately localize a given source (it depends on the strength of > the source you want to localize, source reconstruction algorithm, data > noise...), 19 electrodes are too low to trust the results you can get. > > best, > > Diego > > > ------------------------------ > > From roeysc at gmail.com Mon Jul 21 11:21:32 2014 > From: roeysc at gmail.com (Roey Schurr) > Date: Mon, 21 Jul 2014 12:21:32 +0300 > Subject: [FieldTrip] MNE Source Reconstruction Sanity Check > Message-ID: > > Dear fieldtrippers, > > > > I want to do a sanity check on mne source reconstruction. > > I'm working on continuous EEG recordings (19 electrodes), estimating the > source reconstruction activity using the *mne* (minimum norm estimate) > method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As a > sanity check for the source reconstruction itself, I wanted to compare > conditions in which I could estimate the loci of significant changes, e.g.: > rest vs movement of the hand, moving the right hand vs the left hand, etc. > I have about 60 seconds of recording for each condition. > > > > What I did was: > > 1) Segment the recording of each condition into many "trials" of 2 seconds > each. > > 2) For each trial, average the activity in each of the 90 ROIs of the aal > atlas (I excluded the cerebellum from the source reconstruction). > > > > I was wondering what comparison would be best in this case. Since this is > not Evoked Responses data, I find it hard to find relevant ideas, and would > like to hear your thoughts. > > > > 1) I did a frequency analysis (mtmfft) in conventional bands of interest > and ran ft_freqstatistics on the resulting structures (using ttest2 and the > bonferoni correction for the multiple comparison problem). This gave some > results, however for most conditions they are not very encouraging (the > ROIs that showed significant differences were not close to those that I > have assumed). > > > > *QUESTION 1*: do you think this is a proper method? Note that I did not use > a frequency based source reconstruction in the first place, because I'm > ultimately interested in the time course in the source space. > > > > 2) I was wondering if a cluster based permutation test is impossible to use > here, since this is a continuous recording, so clustering according to time > adjacency seems irrelevant. > > > > *QUESTION 2*: is it possible to use a cluster based statistical test here? > If so, it could be better than a-priori averaging the source activity in > the atlas ROIs, which could mask some of the effects, if they are located > in a small area. > > > > 3) Another possibility is looking at the data itself. Unfortunately I > encountered some problems using ft_sourcemovie, though this is a subject > for a different thread. > > > > Any thoughts and advice are highly appreciated! > > Thank you for taking the time, > > roey > > _______________________________________________ > > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Fri Jul 25 02:20:18 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Fri, 25 Jul 2014 00:20:18 +0000 Subject: [FieldTrip] Group analysis at source level In-Reply-To: References: Message-ID: <1406247611055.41098@flinders.edu.au> Hey laura, Im not 100% sure of what I am about to tell you, as I am not an expert, but I think ft_sourceinterpolate is used in tutorials to display results on an mri model basically. One such tutorial is: http://fieldtrip.fcdonders.nl/tutorial/beamformingextended If you want to be consistent over subjects, I would use a sourcemodel when calculating your source variable, like in: http://fieldtrip.fcdonders.nl/faq/how_can_i_map_source_locations_between_two_different_representations?s[]=atlas and: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=subject&s[]=grid&s[]=mni? I really hope this helps, it helped me :) Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Laura Rueda Delgado Sent: Friday, 25 July 2014 1:06 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Group analysis at source level Dear fieldtrip users, I'm working with source estimations of EEG data. At the moment, I have estimated the sources at the individual level with individual MRIs. I've used ft_sourceinterpolate and ft_volumenormalise to transform the resulting estimation maps into a template for comparison, and I do this for every subject: cfg = []; cfg.parameter = 'avg.pow'; source = ft_sourceinterpolate(cfg, source, mri); cfg = []; cfg.template = '\spm8\templates\T1.nii'; cfg.parameter = 'all'; cfg.nonlinear = 'yes'; cfg.coordsys = 'spm'; source = ft_volumenormalise(cfg, source); Once I have the estimated sources for all the subjects, I use ft_sourcestatistics: cfg = []; cfg.dim = sourcePre_con{1}.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'avg.pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 'all'; cfg.alpha = 0.05; cfg.tail = 0; cfg.design(1,:) = [1:num 1:num]; cfg.design(2,:) = [ones(1,num) ones(1,num)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg,sourcePost_con{:}, sourcePre_con{:}); And I get this error: Reference to non-existent field 'pos'. Error in statistics_wrapper>get_source_avg (line 643) fprintf('only selecting voxels inside the brain for statistics (%.1f%%)\n', 100*length(varargin{1}.inside)/size(varargin{1}.pos,1)); Error in statistics_wrapper (line 206) [dat, cfg] = get_source_avg(cfg, varargin{:}); Error in ft_sourcestatistics (line 107) [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I check the data structure and the structure of the sources at the individual level, before interpolating and normalising has the pos field, but after these steps, it's gone. How can I work around this error? Do I have to keep the pos field and transform it according to the template? Thank you in advance for your help. Best regards, Laura Rueda -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jul 25 08:46:19 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 25 Jul 2014 08:46:19 +0200 Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: References: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> <790E6AB9-6372-4F70-9B98-2DE6E084F552@donders.ru.nl> Message-ID: <53D1FD3B.7040600@donders.ru.nl> Dear Roey, I agreet that this is a bad idea - independently of what result you will get, the error is just too big to draw any reliable conclusions. Imho, you can better try using ICA to decompose your data into components. Concerning the headmodel, there is a standard BEM headmodel template available in FieldTrip. Best, Jörn On 7/24/2014 8:50 PM, Roey Schurr wrote: > Dear Jim, > Thank you for drawing my attention to this problem. I have actually > tried building a realistic head model using OPENMEG but encountered > some compitability problems since our lab does not use Linux. This is > indeed one of the most important (short) future tasks - being able to > use such realistic head models. > Best, > roey > > > On Thu, Jul 24, 2014 at 6:34 PM, E688205 > wrote: > > Dear Roey, > > To add to Diego's comments, since you are dealing with EEG data a > single sphere headmodel is not a good idea because it does not > take into account the differences in conductivity between the > skull, scalp, and brain. This is not a problem for MEG but is > important for EEG. Therefore it is better to use, for example, a > BEM head model. > > Best, > > Jim > > On 23 jul. 2014, at 16:38, "Lozano Soldevilla, D. (Diego)" > > wrote: > >> Dear Roey, >> >> In my opinion it's definitely not a good idea to compute MNE >> using 19 sensors. There are studies that have found a drastic >> localization precision from 31 to 63 electrodes and further >> improvements till 123: >> >> http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) >> http://www.ncbi.nlm.nih.gov/pubmed/12495765 >> >> Although it's very difficult to know the "minimum" number of >> electrodes needed to accurately localize a given source (it >> depends on the strength of the source you want to localize, >> source reconstruction algorithm, data noise...), 19 electrodes >> are too low to trust the results you can get. >> >> best, >> >> Diego >> >> >> ------------------------------------------------------------------------ >> From roeysc atgmail.com Mon Jul 21 11:21:32 2014 >> From: roeysc atgmail.com (Roey Schurr) >> Date: Mon, 21 Jul 2014 12:21:32 +0300 >> Subject: [FieldTrip] MNE Source Reconstruction Sanity Check >> Message-ID: > >> >> Dear fieldtrippers, >> >> >> >> I want to do a sanity check on mne source reconstruction. >> >> I'm working on continuous EEG recordings (19 electrodes), estimating the >> source reconstruction activity using the *mne* (minimum norm estimate) >> method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As a >> sanity check for the source reconstruction itself, I wanted to compare >> conditions in which I could estimate the loci of significant changes, e.g.: >> rest vs movement of the hand, moving the right hand vs the left hand, etc. >> I have about 60 seconds of recording for each condition. >> >> >> >> What I did was: >> >> 1) Segment the recording of each condition into many "trials" of 2 seconds >> each. >> >> 2) For each trial, average the activity in each of the 90 ROIs of the aal >> atlas (I excluded the cerebellum from the source reconstruction). >> >> >> >> I was wondering what comparison would be best in this case. Since this is >> not Evoked Responses data, I find it hard to find relevant ideas, and would >> like to hear your thoughts. >> >> >> >> 1) I did a frequency analysis (mtmfft) in conventional bands of interest >> and ran ft_freqstatistics on the resulting structures (using ttest2 and the >> bonferoni correction for the multiple comparison problem). This gave some >> results, however for most conditions they are not very encouraging (the >> ROIs that showed significant differences were not close to those that I >> have assumed). >> >> >> >> *QUESTION 1*: do you think this is a proper method? Note that I did not use >> a frequency based source reconstruction in the first place, because I'm >> ultimately interested in the time course in the source space. >> >> >> >> 2) I was wondering if a cluster based permutation test is impossible to use >> here, since this is a continuous recording, so clustering according to time >> adjacency seems irrelevant. >> >> >> >> *QUESTION 2*: is it possible to use a cluster based statistical test here? >> If so, it could be better than a-priori averaging the source activity in >> the atlas ROIs, which could mask some of the effects, if they are located >> in a small area. >> >> >> >> 3) Another possibility is looking at the data itself. Unfortunately I >> encountered some problems using ft_sourcemovie, though this is a subject >> for a different thread. >> >> >> >> Any thoughts and advice are highly appreciated! >> >> Thank you for taking the time, >> >> roey >> _______________________________________________ >> >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From roeysc at gmail.com Fri Jul 25 09:04:29 2014 From: roeysc at gmail.com (Roey Schurr) Date: Fri, 25 Jul 2014 10:04:29 +0300 Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: <53D1FD3B.7040600@donders.ru.nl> References: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> <790E6AB9-6372-4F70-9B98-2DE6E084F552@donders.ru.nl> <53D1FD3B.7040600@donders.ru.nl> Message-ID: Dear Jörn, Thank you very much for your input! Indeed, since I'm now using template MRIs and not individual ones (for the time being), using the template BEM headodel makes perfect sense. Thank you. Regarding the ICA decomposition, as long as I use this 19 electrodes data, this could be a good compromise. The original goal is being able to get some anatomically significant results. Even though interpolated scalp maps (and microstates) are anatomical in a sense, networks based on the inverse solution are still the final goal. For this it seems like I will indeed need a different data set. Best, roey On Fri, Jul 25, 2014 at 9:46 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Roey, > > I agreet that this is a bad idea - independently of what result you will > get, the error is just too big to draw any reliable conclusions. Imho, you > can better try using ICA to decompose your data into components. > > Concerning the headmodel, there is a standard BEM headmodel template > available in FieldTrip. > > Best, > Jörn > > > On 7/24/2014 8:50 PM, Roey Schurr wrote: > >> Dear Jim, >> Thank you for drawing my attention to this problem. I have actually tried >> building a realistic head model using OPENMEG but encountered some >> compitability problems since our lab does not use Linux. This is indeed one >> of the most important (short) future tasks - being able to use such >> realistic head models. >> Best, >> roey >> >> >> On Thu, Jul 24, 2014 at 6:34 PM, E688205 > > wrote: >> >> Dear Roey, >> >> To add to Diego's comments, since you are dealing with EEG data a >> single sphere headmodel is not a good idea because it does not >> take into account the differences in conductivity between the >> skull, scalp, and brain. This is not a problem for MEG but is >> important for EEG. Therefore it is better to use, for example, a >> BEM head model. >> >> Best, >> >> Jim >> >> On 23 jul. 2014, at 16:38, "Lozano Soldevilla, D. (Diego)" >> > > wrote: >> >> Dear Roey, >>> >>> In my opinion it's definitely not a good idea to compute MNE >>> using 19 sensors. There are studies that have found a drastic >>> localization precision from 31 to 63 electrodes and further >>> improvements till 123: >>> >>> http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) >>> http://www.ncbi.nlm.nih.gov/pubmed/12495765 >>> >>> Although it's very difficult to know the "minimum" number of >>> electrodes needed to accurately localize a given source (it >>> depends on the strength of the source you want to localize, >>> source reconstruction algorithm, data noise...), 19 electrodes >>> are too low to trust the results you can get. >>> >>> best, >>> >>> Diego >>> >>> >>> ------------------------------------------------------------ >>> ------------ >>> From roeysc atgmail.com Mon Jul 21 11:21:32 >>> 2014 >>> From: roeysc atgmail.com (Roey Schurr) >>> >>> Date: Mon, 21 Jul 2014 12:21:32 +0300 >>> Subject: [FieldTrip] MNE Source Reconstruction Sanity Check >>> Message-ID: >> mail.gmail.com >> AQ_W43cHF_8J2b+rNyzd55x4aRviw at mail.gmail.com>> >>> >>> >>> Dear fieldtrippers, >>> >>> >>> >>> I want to do a sanity check on mne source reconstruction. >>> >>> I'm working on continuous EEG recordings (19 electrodes), estimating >>> the >>> source reconstruction activity using the *mne* (minimum norm >>> estimate) >>> method, a *template MRI* (Colin27) and a *singlesphere* headmodel. >>> As a >>> sanity check for the source reconstruction itself, I wanted to >>> compare >>> conditions in which I could estimate the loci of significant >>> changes, e.g.: >>> rest vs movement of the hand, moving the right hand vs the left >>> hand, etc. >>> I have about 60 seconds of recording for each condition. >>> >>> >>> >>> What I did was: >>> >>> 1) Segment the recording of each condition into many "trials" of 2 >>> seconds >>> each. >>> >>> 2) For each trial, average the activity in each of the 90 ROIs of >>> the aal >>> atlas (I excluded the cerebellum from the source reconstruction). >>> >>> >>> >>> I was wondering what comparison would be best in this case. Since >>> this is >>> not Evoked Responses data, I find it hard to find relevant ideas, >>> and would >>> like to hear your thoughts. >>> >>> >>> >>> 1) I did a frequency analysis (mtmfft) in conventional bands of >>> interest >>> and ran ft_freqstatistics on the resulting structures (using ttest2 >>> and the >>> bonferoni correction for the multiple comparison problem). This gave >>> some >>> results, however for most conditions they are not very encouraging >>> (the >>> ROIs that showed significant differences were not close to those >>> that I >>> have assumed). >>> >>> >>> >>> *QUESTION 1*: do you think this is a proper method? Note that I did >>> not use >>> a frequency based source reconstruction in the first place, because >>> I'm >>> ultimately interested in the time course in the source space. >>> >>> >>> >>> 2) I was wondering if a cluster based permutation test is impossible >>> to use >>> here, since this is a continuous recording, so clustering according >>> to time >>> adjacency seems irrelevant. >>> >>> >>> >>> *QUESTION 2*: is it possible to use a cluster based statistical test >>> here? >>> If so, it could be better than a-priori averaging the source >>> activity in >>> the atlas ROIs, which could mask some of the effects, if they are >>> located >>> in a small area. >>> >>> >>> >>> 3) Another possibility is looking at the data itself. Unfortunately I >>> encountered some problems using ft_sourcemovie, though this is a >>> subject >>> for a different thread. >>> >>> >>> >>> Any thoughts and advice are highly appreciated! >>> >>> Thank you for taking the time, >>> >>> roey >>> _______________________________________________ >>> >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Fri Jul 25 09:29:55 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Fri, 25 Jul 2014 09:29:55 +0200 (CEST) Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: References: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> <790E6AB9-6372-4F70-9B98-2DE6E084F552@donders.ru.nl> Message-ID: <008b01cfa7da$3bd9eac0$b38dc040$@herring@fcdonders.ru.nl> Hi Roey, Since you do not have the subject’s anatomical MRI and are using the colin27 standard brain, you can just use the template BEM headmodel in fieldtrip/template/headmodel (see for example, http://fieldtrip.fcdonders.nl/template/headmodel) . This head model is based on the colin27 brain. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Roey Schurr Sent: donderdag 24 juli 2014 20:50 To: FieldTrip discussion list Subject: Re: [FieldTrip] MNE Source Reconstruction Sanity Check Dear Jim, Thank you for drawing my attention to this problem. I have actually tried building a realistic head model using OPENMEG but encountered some compitability problems since our lab does not use Linux. This is indeed one of the most important (short) future tasks - being able to use such realistic head models. Best, roey On Thu, Jul 24, 2014 at 6:34 PM, E688205 wrote: Dear Roey, To add to Diego's comments, since you are dealing with EEG data a single sphere headmodel is not a good idea because it does not take into account the differences in conductivity between the skull, scalp, and brain. This is not a problem for MEG but is important for EEG. Therefore it is better to use, for example, a BEM head model. Best, Jim On 23 jul. 2014, at 16:38, "Lozano Soldevilla, D. (Diego)" wrote: Dear Roey, In my opinion it's definitely not a good idea to compute MNE using 19 sensors. There are studies that have found a drastic localization precision from 31 to 63 electrodes and further improvements till 123: http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) http://www.ncbi.nlm.nih.gov/pubmed/12495765 Although it's very difficult to know the "minimum" number of electrodes needed to accurately localize a given source (it depends on the strength of the source you want to localize, source reconstruction algorithm, data noise...), 19 electrodes are too low to trust the results you can get. best, Diego _____ >From roeysc at gmail.com Mon Jul 21 11:21:32 2014 From: roeysc at gmail.com (Roey Schurr) Date: Mon, 21 Jul 2014 12:21:32 +0300 Subject: [FieldTrip] MNE Source Reconstruction Sanity Check Message-ID: Dear fieldtrippers, I want to do a sanity check on mne source reconstruction. I'm working on continuous EEG recordings (19 electrodes), estimating the source reconstruction activity using the *mne* (minimum norm estimate) method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As a sanity check for the source reconstruction itself, I wanted to compare conditions in which I could estimate the loci of significant changes, e.g.: rest vs movement of the hand, moving the right hand vs the left hand, etc. I have about 60 seconds of recording for each condition. What I did was: 1) Segment the recording of each condition into many "trials" of 2 seconds each. 2) For each trial, average the activity in each of the 90 ROIs of the aal atlas (I excluded the cerebellum from the source reconstruction). I was wondering what comparison would be best in this case. Since this is not Evoked Responses data, I find it hard to find relevant ideas, and would like to hear your thoughts. 1) I did a frequency analysis (mtmfft) in conventional bands of interest and ran ft_freqstatistics on the resulting structures (using ttest2 and the bonferoni correction for the multiple comparison problem). This gave some results, however for most conditions they are not very encouraging (the ROIs that showed significant differences were not close to those that I have assumed). *QUESTION 1*: do you think this is a proper method? Note that I did not use a frequency based source reconstruction in the first place, because I'm ultimately interested in the time course in the source space. 2) I was wondering if a cluster based permutation test is impossible to use here, since this is a continuous recording, so clustering according to time adjacency seems irrelevant. *QUESTION 2*: is it possible to use a cluster based statistical test here? If so, it could be better than a-priori averaging the source activity in the atlas ROIs, which could mask some of the effects, if they are located in a small area. 3) Another possibility is looking at the data itself. Unfortunately I encountered some problems using ft_sourcemovie, though this is a subject for a different thread. Any thoughts and advice are highly appreciated! Thank you for taking the time, roey _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laura.Rueda at faber.kuleuven.be Fri Jul 25 12:00:21 2014 From: Laura.Rueda at faber.kuleuven.be (Laura Rueda Delgado) Date: Fri, 25 Jul 2014 10:00:21 +0000 Subject: [FieldTrip] Group analysis at source level In-Reply-To: <1406247611055.41098@flinders.edu.au> References: , <1406247611055.41098@flinders.edu.au> Message-ID: Dear Tyler, Thank you for your suggestion. I had checked the option of warping the individual grid to the template grid, but I discarded it, maybe for wrong reasons. From the tutorial, I understand that warping is done via the individual MRI. I have done the segmentation, mesh creation and grid preparation at the individual level. So the warping of grids seems to redo this segmentation and mesh creation from the individual MRI to get the individual grid and warp it. The function ft_prepare_sourcemodel does not have the option to include the headmodel that I've already created (in my case, a 3-shell BEM), and that's why I excluded this option. However, maybe I can use the template grid with the BEM like this: cfg = []; cfg.grid = template_grid; cfg.inwardshift = 0; cfg.vol = individual_vol; %result from segmentation and mesh creation warped_grid = ft_prepare_sourcemodel(cfg); And then create the headmodel: cfg = []; cfg.vol = individual_vol; cfg.elec = individual_sens; cfg.grid = warped_grid; cfg.grid.tight = 'yes'; cfg.reducerank = 'no'; % cfg.normalize = 'no'; leadfield = ft_prepare_leadfield(cfg); My question is whether this is correct given that warped_grid would be in MNI coordinates, and individual_vol and individual_sens would not. And also, would this mean that the points of the grid would all be the same for all subjects? Best regards, Laura From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Tyler Grummett [tyler.grummett at flinders.edu.au] Sent: 25 July 2014 02:20 To: FieldTrip discussion list Subject: Re: [FieldTrip] Group analysis at source level Hey laura, Im not 100% sure of what I am about to tell you, as I am not an expert, but I think ft_sourceinterpolate is used in tutorials to display results on an mri model basically. One such tutorial is: http://fieldtrip.fcdonders.nl/tutorial/beamformingextended If you want to be consistent over subjects, I would use a sourcemodel when calculating your source variable, like in: http://fieldtrip.fcdonders.nl/faq/how_can_i_map_source_locations_between_two_different_representations?s[]=atlas and: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=subject&s[]=grid&s[]=mni​ I really hope this helps, it helped me :) Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Laura Rueda Delgado Sent: Friday, 25 July 2014 1:06 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Group analysis at source level Dear fieldtrip users, I'm working with source estimations of EEG data. At the moment, I have estimated the sources at the individual level with individual MRIs. I've used ft_sourceinterpolate and ft_volumenormalise to transform the resulting estimation maps into a template for comparison, and I do this for every subject: cfg = []; cfg.parameter = 'avg.pow'; source = ft_sourceinterpolate(cfg, source, mri); cfg = []; cfg.template = '\spm8\templates\T1.nii'; cfg.parameter = 'all'; cfg.nonlinear = 'yes'; cfg.coordsys = 'spm'; source = ft_volumenormalise(cfg, source); Once I have the estimated sources for all the subjects, I use ft_sourcestatistics: cfg = []; cfg.dim = sourcePre_con{1}.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'avg.pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 'all'; cfg.alpha = 0.05; cfg.tail = 0; cfg.design(1,:) = [1:num 1:num]; cfg.design(2,:) = [ones(1,num) ones(1,num)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg,sourcePost_con{:}, sourcePre_con{:}); And I get this error: Reference to non-existent field 'pos'. Error in statistics_wrapper>get_source_avg (line 643) fprintf('only selecting voxels inside the brain for statistics (%.1f%%)\n', 100*length(varargin{1}.inside)/size(varargin{1}.pos,1)); Error in statistics_wrapper (line 206) [dat, cfg] = get_source_avg(cfg, varargin{:}); Error in ft_sourcestatistics (line 107) [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I check the data structure and the structure of the sources at the individual level, before interpolating and normalising has the pos field, but after these steps, it's gone. How can I work around this error? Do I have to keep the pos field and transform it according to the template? Thank you in advance for your help. Best regards, Laura Rueda -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Fri Jul 25 13:31:32 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Fri, 25 Jul 2014 13:31:32 +0200 (CEST) Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: <153325407.8009026.1406190552110.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <2077847771.8023108.1406287892841.JavaMail.root@sculptor.zimbra.ru.nl> Hi Azadeh, The problem is originated during the segmentation processing. Basically the default cfg values that you applied to template/anatomy/single_subj_T1.nii gave you the attached segmentation: the scalp is poorly defined as you can see. Then you end up with the wrong headmodel. I noticed that the single_subj_T1.nii has very low resolution. I used the single_subj_T1_1mm.nii instead with the following cfg parameters (by trial and error...) and they gave me sensitive binary representations: mri = ft_read_mri('/home/common/matlab/fieldtrip/template/anatomy/single_subj_T1_1mm.nii'); mri.coordsys = 'spm'; cfg                = []; cfg.brainsmooth    = 5%(default = 5) cfg.scalpsmooth    = 5%(default = 5) cfg.brainthreshold = 0.25%(default = 0.5) cfg.scalpthreshold = 0.25%(default = 0.1) cfg.output    = {'brain','skull','scalp'}; seg  = ft_volumesegment(cfg, mri); cfg              = []; cfg.funparameter = 'scalp'; ft_sourceplot(cfg,seg); The ft_volumesegment documentation mentions the fieldtrip/external/spm8/templates/T1.nii Unfortunately I'm not sure what this T1 is (MNI152 might be?) and its advantages or disadvantatges. If you use the T1.nii with the following cfg, you'll get a segmentation that makes sense to me: mri = ft_read_mri('/home/common/matlab/fieldtrip/external/spm8/templates/T1.nii'); mri.coordsys = 'spm'; cfg                = []; cfg.brainsmooth    = 2%(default = 5) cfg.scalpsmooth    = 2%(default = 5) cfg.brainthreshold = 0.25%(default = 0.5) cfg.scalpthreshold = 0.15%(default = 0.1) cfg.output    = {'brain','skull','scalp'}; seg  = ft_volumesegment(cfg, mri); cfg              = []; cfg.funparameter = 'scalp';%check the brain and skull too ft_sourceplot(cfg,seg); My source modeling experience is restricted to MEG using individual T1s (not a template). I'm sure a lot of people in the list have experience in the EEG/source modeling business using template anatomical scans. Could somedoby provide us a bit of advice?: Which anatomical template should one use (T1.nii, single_subj_T1_1mm.nii other?) and which cfg parameters make sense for the segmentation? It would be very nice if we could establish a kind of default and share them in the fieldtrip wiki ;) (I could do it if somebody share his/her knowledge/experience) Thanks in advance, Diego ----- Original Message ----- > From azadehh at uvic.ca Sat Jul 19 00:26:06 2014 > From: azadehh at uvic.ca (Azadeh Hajihosseini) > Date: Fri, 18 Jul 2014 15:26:06 -0700 > Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN > values > in the leadfield matrices > Message-ID: > > > Hello FieldTrip members, > > I am trying to source localize EEG oscillatory activity and have a few > problems in constructing the forward model and eventually running the > source analysis. I think the problems are related to each other. Here > is > what happens: > > 1- When I run the source analysis, I get this error message: > > *??? Error using ==> svd* > *Input to SVD must not contain NaN or Inf.* > > *Error in ==> beamformer_dics>pinv at 650* > * [U,S,V] = svd(A,0);* > > *Error in ==> beamformer_dics at 339* > * filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross > eqn. 3, use PINV/SVD to cover rank* > * deficient leadfield* > > *Error in ==> ft_sourceanalysis at 572* > * dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:});* > > *Error in ==> test_sourceanalysis at 12* > *sourceTF = ft_sourceanalysis(cfg, data_TF);* > > > 2- Checking the leadfiled matrices, I see there are a lot of NaN > values. > 3- When I visualize the head model I have created, the plots don't > look > right. The third field, *vol.bnd(3),* which is supposed to be the > brain > tissue, looks like a cube. > > And here are my code lines: > > *% CONSTRUCT A HEAD MODEL from the template mri in FT's > template/anatomy* > *mri = ft_read_mri('template\anatomy\single_subj_T1.nii');* > *mri.coordsys = 'spm';* > > *%SEGMENTATION:* > *cfg = [];* > *cfg.output = {'brain','skull','scalp'};* > *segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT > resliced > data* > *save segmentedmri_template segmentedmri_template* > > > *%CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL)* > *cfg = [];* > *cfg.method ='bemcp';* > *cfg.tissue ={'brain','skull','scalp'};* > *% cfg.outputfile = 'template_';* > *vol = ft_prepare_headmodel(cfg, segmentedmri_template);* > *save vol vol* > > *%Visualization of the head model* > *figure;* > *ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp * > *figure;* > *ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull* > *figure;* > *ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks > like a > cube* > > *% Align electrodes * > *elec = ft_read_sens('template\electrode\standard_1020.elc'); * > *% load volume conduction model* > *% load vol; * > > *%interactive allignment* > *cfg = [];* > *cfg.method = 'interactive';* > *cfg.elec = elec;* > *cfg.headshape = vol.bnd(1);* > *elec_aligned = ft_electroderealign(cfg);* > > *save elec_aligned elec_aligned* > > *% Prepare leadfield* > *load data_TF* > *cfg=[];* > *cfg.vol = vol; %structure with volume conduction model* > *cfg.elec = elec_aligned;%structure with electrode positions* > *[grid] = ft_prepare_leadfield(cfg, data_TF);* > > *% Find source* > *cfg = []; * > *cfg.method = 'dics';* > *cfg.frequency = 25; * > *cfg.grid = grid; * > *cfg.vol = vol;* > *cfg.latency = .4;%single number in seconds, for time-frequency > analysis* > *cfg.dics.projectnoise = 'yes';* > *cfg.dics.lambda = 0;* > *cfg.elec = elec_aligned;%structure with electrode positions* > > *sourceTF = ft_sourceanalysis(cfg, data_TF);* > > > I am using *wavelet *with a *fourier* output for the time-frequency > analysis (*data_TF)*. Do you have any idea what might be wrong here? > > I also have a more general question. What type of time-frequency data > can > be input to source analysis? *ft_freqanalysis* provides power, power > and > cross-spectra, and complex fourier outputs. But is source-localization > based on only power data correct? I couldn't find any explanations > regarding this issue in the tutorial. > > I look forward to hearing from anyone who might have ideas about any > of > these issues! > > Many thanks, > > -- > Azadeh HajiHosseini -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ -------------- next part -------------- A non-text attachment was scrubbed... Name: bad_segmentation.png Type: image/png Size: 43911 bytes Desc: not available URL: From azadehh at uvic.ca Fri Jul 25 20:03:38 2014 From: azadehh at uvic.ca (Azadeh Hajihosseini) Date: Fri, 25 Jul 2014 11:03:38 -0700 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: <2077847771.8023108.1406287892841.JavaMail.root@sculptor.zimbra.ru.nl> References: <153325407.8009026.1406190552110.JavaMail.root@sculptor.zimbra.ru.nl> <2077847771.8023108.1406287892841.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Hi Diego, Thanks so much for looking into this and finding the problem! I am going to try the other two templates you suggested and see what I can make of them. As you mentioned, it would be great to know other people's experience on using mri templates for EEG source localization. I look forward to hearing from anyone who has this experience! Thanks in advance :) Bests, On Fri, Jul 25, 2014 at 4:31 AM, Lozano Soldevilla, D. (Diego) < d.lozanosoldevilla at fcdonders.ru.nl> wrote: > Hi Azadeh, > > The problem is originated during the segmentation processing. Basically > the default cfg values that you applied to > template/anatomy/single_subj_T1.nii gave you the attached segmentation: the > scalp is poorly defined as you can see. Then you end up with the wrong > headmodel. > > I noticed that the single_subj_T1.nii has very low resolution. I used the > single_subj_T1_1mm.nii instead with the following cfg parameters (by trial > and error...) and they gave me sensitive binary representations: > > mri = > ft_read_mri('/home/common/matlab/fieldtrip/template/anatomy/single_subj_T1_1mm.nii'); > mri.coordsys = 'spm'; > > cfg = []; > cfg.brainsmooth = 5%(default = 5) > cfg.scalpsmooth = 5%(default = 5) > cfg.brainthreshold = 0.25%(default = 0.5) > cfg.scalpthreshold = 0.25%(default = 0.1) > > cfg.output = {'brain','skull','scalp'}; > seg = ft_volumesegment(cfg, mri); > > cfg = []; > cfg.funparameter = 'scalp'; > ft_sourceplot(cfg,seg); > > > The ft_volumesegment documentation mentions the > fieldtrip/external/spm8/templates/T1.nii Unfortunately I'm not sure what > this T1 is (MNI152 might be?) and its advantages or disadvantatges. If you > use the T1.nii with the following cfg, you'll get a segmentation that makes > sense to me: > > mri = > ft_read_mri('/home/common/matlab/fieldtrip/external/spm8/templates/T1.nii'); > mri.coordsys = 'spm'; > > cfg = []; > cfg.brainsmooth = 2%(default = 5) > cfg.scalpsmooth = 2%(default = 5) > cfg.brainthreshold = 0.25%(default = 0.5) > cfg.scalpthreshold = 0.15%(default = 0.1) > > cfg.output = {'brain','skull','scalp'}; > seg = ft_volumesegment(cfg, mri); > > cfg = []; > cfg.funparameter = 'scalp';%check the brain and skull too > ft_sourceplot(cfg,seg); > > > My source modeling experience is restricted to MEG using individual T1s > (not a template). I'm sure a lot of people in the list have experience in > the EEG/source modeling business using template anatomical scans. Could > somedoby provide us a bit of advice?: > > Which anatomical template should one use (T1.nii, single_subj_T1_1mm.nii > other?) and which cfg parameters make sense for the segmentation? It would > be very nice if we could establish a kind of default and share them in the > fieldtrip wiki ;) (I could do it if somebody share his/her > knowledge/experience) > > Thanks in advance, > > Diego > > > ----- Original Message ----- > > From azadehh at uvic.ca Sat Jul 19 00:26:06 2014 > > From: azadehh at uvic.ca (Azadeh Hajihosseini) > > Date: Fri, 18 Jul 2014 15:26:06 -0700 > > Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN > > values > > in the leadfield matrices > > Message-ID: > > > > > > Hello FieldTrip members, > > > > I am trying to source localize EEG oscillatory activity and have a few > > problems in constructing the forward model and eventually running the > > source analysis. I think the problems are related to each other. Here > > is > > what happens: > > > > 1- When I run the source analysis, I get this error message: > > > > *??? Error using ==> svd* > > *Input to SVD must not contain NaN or Inf.* > > > > *Error in ==> beamformer_dics>pinv at 650* > > * [U,S,V] = svd(A,0);* > > > > *Error in ==> beamformer_dics at 339* > > * filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross > > eqn. 3, use PINV/SVD to cover rank* > > * deficient leadfield* > > > > *Error in ==> ft_sourceanalysis at 572* > > * dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > > optarg{:});* > > > > *Error in ==> test_sourceanalysis at 12* > > *sourceTF = ft_sourceanalysis(cfg, data_TF);* > > > > > > 2- Checking the leadfiled matrices, I see there are a lot of NaN > > values. > > 3- When I visualize the head model I have created, the plots don't > > look > > right. The third field, *vol.bnd(3),* which is supposed to be the > > brain > > tissue, looks like a cube. > > > > And here are my code lines: > > > > *% CONSTRUCT A HEAD MODEL from the template mri in FT's > > template/anatomy* > > *mri = ft_read_mri('template\anatomy\single_subj_T1.nii');* > > *mri.coordsys = 'spm';* > > > > *%SEGMENTATION:* > > *cfg = [];* > > *cfg.output = {'brain','skull','scalp'};* > > *segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT > > resliced > > data* > > *save segmentedmri_template segmentedmri_template* > > > > > > *%CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL)* > > *cfg = [];* > > *cfg.method ='bemcp';* > > *cfg.tissue ={'brain','skull','scalp'};* > > *% cfg.outputfile = 'template_';* > > *vol = ft_prepare_headmodel(cfg, segmentedmri_template);* > > *save vol vol* > > > > *%Visualization of the head model* > > *figure;* > > *ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp * > > *figure;* > > *ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull* > > *figure;* > > *ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks > > like a > > cube* > > > > *% Align electrodes * > > *elec = ft_read_sens('template\electrode\standard_1020.elc'); * > > *% load volume conduction model* > > *% load vol; * > > > > *%interactive allignment* > > *cfg = [];* > > *cfg.method = 'interactive';* > > *cfg.elec = elec;* > > *cfg.headshape = vol.bnd(1);* > > *elec_aligned = ft_electroderealign(cfg);* > > > > *save elec_aligned elec_aligned* > > > > *% Prepare leadfield* > > *load data_TF* > > *cfg=[];* > > *cfg.vol = vol; %structure with volume conduction model* > > *cfg.elec = elec_aligned;%structure with electrode positions* > > *[grid] = ft_prepare_leadfield(cfg, data_TF);* > > > > *% Find source* > > *cfg = []; * > > *cfg.method = 'dics';* > > *cfg.frequency = 25; * > > *cfg.grid = grid; * > > *cfg.vol = vol;* > > *cfg.latency = .4;%single number in seconds, for time-frequency > > analysis* > > *cfg.dics.projectnoise = 'yes';* > > *cfg.dics.lambda = 0;* > > *cfg.elec = elec_aligned;%structure with electrode positions* > > > > *sourceTF = ft_sourceanalysis(cfg, data_TF);* > > > > > > I am using *wavelet *with a *fourier* output for the time-frequency > > analysis (*data_TF)*. Do you have any idea what might be wrong here? > > > > I also have a more general question. What type of time-frequency data > > can > > be input to source analysis? *ft_freqanalysis* provides power, power > > and > > cross-spectra, and complex fourier outputs. But is source-localization > > based on only power data correct? I couldn't find any explanations > > regarding this issue in the tutorial. > > > > I look forward to hearing from anyone who might have ideas about any > > of > > these issues! > > > > Many thanks, > > > > -- > > Azadeh HajiHosseini > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Azadeh HajiHosseini Graduate student Department of Psychology University of Victoria http://web.uvic.ca/~lccl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From paymandomorientes at yahoo.com Fri Jul 25 21:05:28 2014 From: paymandomorientes at yahoo.com (paymando- morientes) Date: Fri, 25 Jul 2014 12:05:28 -0700 Subject: [FieldTrip] simulating realtime analysis Message-ID: <1406315128.99700.YahooMailNeo@web141606.mail.bf1.yahoo.com> Dear all I want to simulate an online processing with a recorded brainvision data using "ft_realtime_fileproxy". But I wonder how can I "write to" and "read from" buffer simultaneously in matlab?  How is it possible to start the simulation from a script and then analyze it from another script in the same time? As far as I know it is impossible in matlab. Do I have to use to computers? thank you all for your helps -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Mon Jul 28 03:40:16 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Mon, 28 Jul 2014 01:40:16 +0000 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: <2077847771.8023108.1406287892841.JavaMail.root@sculptor.zimbra.ru.nl> References: <153325407.8009026.1406190552110.JavaMail.root@sculptor.zimbra.ru.nl>, <2077847771.8023108.1406287892841.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1406511600163.1705@flinders.edu.au> Hello Diego, Im still having trouble, particularly with ft_prepare_headmodel. After running the code that you used, I ran the following code: cfg = []; cfg.method = 'bemcp'; %openmeeg bemcp vol = ft_prepare_headmodel(cfg, segmentedmri); vol.mat is full of NaNs though, so the leadfield creates NaNs ect. I tried running the following code to fix it: % prepare mesh cfg = []; cfg.method = 'iso2mesh'; cfg.numvertices = 10000; bnd = ft_prepare_mesh( cfg, segmentedmri); % fix mesh [ bnd( 1).pnt, bnd( 1).tri] = meshresample( bnd( 1).pnt, bnd( 1).tri, 1000/size( bnd( 1).pnt, 1)); [ bnd( 2).pnt, bnd( 2).tri] = meshresample( bnd( 2).pnt, bnd( 2).tri, 2000/size( bnd( 2).pnt, 1)); [ bnd( 3).pnt, bnd( 3).tri] = meshresample( bnd( 3).pnt, bnd( 3).tri, 3000/size( bnd( 3).pnt, 1)); for ii = 1:size( bnd), [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'dup'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'isolated'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'deep'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'meshfix'); end However it crashes with the following message: Error using surface_nesting (line 26) the compartment nesting cannot be determined Error in ft_headmodel_bemcp (line 66) order = surface_nesting(vol.bnd, 'insidefirst'); Error in ft_prepare_headmodel (line 262) vol = ft_headmodel_bemcp(geometry, 'conductivity', cfg.conductivity); I dont have enough experience with this code to work out why this isnt working, previously I had been working with the template MRI inside the template folder 'standard_mri', and this process had worked for me. However I was getting really strange results after beamforming (the cerebellum would light up for every task). So I have been using the methods expressed in your email but it hasnt been working for me, can you see if you get the same result? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Lozano Soldevilla, D. (Diego) Sent: Friday, 25 July 2014 9:01 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices Hi Azadeh, The problem is originated during the segmentation processing. Basically the default cfg values that you applied to template/anatomy/single_subj_T1.nii gave you the attached segmentation: the scalp is poorly defined as you can see. Then you end up with the wrong headmodel. I noticed that the single_subj_T1.nii has very low resolution. I used the single_subj_T1_1mm.nii instead with the following cfg parameters (by trial and error...) and they gave me sensitive binary representations: mri = ft_read_mri('/home/common/matlab/fieldtrip/template/anatomy/single_subj_T1_1mm.nii'); mri.coordsys = 'spm'; cfg = []; cfg.brainsmooth = 5%(default = 5) cfg.scalpsmooth = 5%(default = 5) cfg.brainthreshold = 0.25%(default = 0.5) cfg.scalpthreshold = 0.25%(default = 0.1) cfg.output = {'brain','skull','scalp'}; seg = ft_volumesegment(cfg, mri); cfg = []; cfg.funparameter = 'scalp'; ft_sourceplot(cfg,seg); The ft_volumesegment documentation mentions the fieldtrip/external/spm8/templates/T1.nii Unfortunately I'm not sure what this T1 is (MNI152 might be?) and its advantages or disadvantatges. If you use the T1.nii with the following cfg, you'll get a segmentation that makes sense to me: mri = ft_read_mri('/home/common/matlab/fieldtrip/external/spm8/templates/T1.nii'); mri.coordsys = 'spm'; cfg = []; cfg.brainsmooth = 2%(default = 5) cfg.scalpsmooth = 2%(default = 5) cfg.brainthreshold = 0.25%(default = 0.5) cfg.scalpthreshold = 0.15%(default = 0.1) cfg.output = {'brain','skull','scalp'}; seg = ft_volumesegment(cfg, mri); cfg = []; cfg.funparameter = 'scalp';%check the brain and skull too ft_sourceplot(cfg,seg); My source modeling experience is restricted to MEG using individual T1s (not a template). I'm sure a lot of people in the list have experience in the EEG/source modeling business using template anatomical scans. Could somedoby provide us a bit of advice?: Which anatomical template should one use (T1.nii, single_subj_T1_1mm.nii other?) and which cfg parameters make sense for the segmentation? It would be very nice if we could establish a kind of default and share them in the fieldtrip wiki ;) (I could do it if somebody share his/her knowledge/experience) Thanks in advance, Diego ----- Original Message ----- > From azadehh at uvic.ca Sat Jul 19 00:26:06 2014 > From: azadehh at uvic.ca (Azadeh Hajihosseini) > Date: Fri, 18 Jul 2014 15:26:06 -0700 > Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN > values > in the leadfield matrices > Message-ID: > > > Hello FieldTrip members, > > I am trying to source localize EEG oscillatory activity and have a few > problems in constructing the forward model and eventually running the > source analysis. I think the problems are related to each other. Here > is > what happens: > > 1- When I run the source analysis, I get this error message: > > *??? Error using ==> svd* > *Input to SVD must not contain NaN or Inf.* > > *Error in ==> beamformer_dics>pinv at 650* > * [U,S,V] = svd(A,0);* > > *Error in ==> beamformer_dics at 339* > * filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross > eqn. 3, use PINV/SVD to cover rank* > * deficient leadfield* > > *Error in ==> ft_sourceanalysis at 572* > * dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:});* > > *Error in ==> test_sourceanalysis at 12* > *sourceTF = ft_sourceanalysis(cfg, data_TF);* > > > 2- Checking the leadfiled matrices, I see there are a lot of NaN > values. > 3- When I visualize the head model I have created, the plots don't > look > right. The third field, *vol.bnd(3),* which is supposed to be the > brain > tissue, looks like a cube. > > And here are my code lines: > > *% CONSTRUCT A HEAD MODEL from the template mri in FT's > template/anatomy* > *mri = ft_read_mri('template\anatomy\single_subj_T1.nii');* > *mri.coordsys = 'spm';* > > *%SEGMENTATION:* > *cfg = [];* > *cfg.output = {'brain','skull','scalp'};* > *segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT > resliced > data* > *save segmentedmri_template segmentedmri_template* > > > *%CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL)* > *cfg = [];* > *cfg.method ='bemcp';* > *cfg.tissue ={'brain','skull','scalp'};* > *% cfg.outputfile = 'template_';* > *vol = ft_prepare_headmodel(cfg, segmentedmri_template);* > *save vol vol* > > *%Visualization of the head model* > *figure;* > *ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp * > *figure;* > *ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull* > *figure;* > *ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks > like a > cube* > > *% Align electrodes * > *elec = ft_read_sens('template\electrode\standard_1020.elc'); * > *% load volume conduction model* > *% load vol; * > > *%interactive allignment* > *cfg = [];* > *cfg.method = 'interactive';* > *cfg.elec = elec;* > *cfg.headshape = vol.bnd(1);* > *elec_aligned = ft_electroderealign(cfg);* > > *save elec_aligned elec_aligned* > > *% Prepare leadfield* > *load data_TF* > *cfg=[];* > *cfg.vol = vol; %structure with volume conduction model* > *cfg.elec = elec_aligned;%structure with electrode positions* > *[grid] = ft_prepare_leadfield(cfg, data_TF);* > > *% Find source* > *cfg = []; * > *cfg.method = 'dics';* > *cfg.frequency = 25; * > *cfg.grid = grid; * > *cfg.vol = vol;* > *cfg.latency = .4;%single number in seconds, for time-frequency > analysis* > *cfg.dics.projectnoise = 'yes';* > *cfg.dics.lambda = 0;* > *cfg.elec = elec_aligned;%structure with electrode positions* > > *sourceTF = ft_sourceanalysis(cfg, data_TF);* > > > I am using *wavelet *with a *fourier* output for the time-frequency > analysis (*data_TF)*. Do you have any idea what might be wrong here? > > I also have a more general question. What type of time-frequency data > can > be input to source analysis? *ft_freqanalysis* provides power, power > and > cross-spectra, and complex fourier outputs. But is source-localization > based on only power data correct? I couldn't find any explanations > regarding this issue in the tutorial. > > I look forward to hearing from anyone who might have ideas about any > of > these issues! > > Many thanks, > > -- > Azadeh HajiHosseini -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ From jm.horschig at donders.ru.nl Mon Jul 28 10:23:29 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 28 Jul 2014 10:23:29 +0200 Subject: [FieldTrip] simulating realtime analysis In-Reply-To: <1406315128.99700.YahooMailNeo@web141606.mail.bf1.yahoo.com> References: <1406315128.99700.YahooMailNeo@web141606.mail.bf1.yahoo.com> Message-ID: <53D60881.3000805@donders.ru.nl> Hi, have you you tried opening two matlab sessions on one computer? Best, Jörn On 7/25/2014 9:05 PM, paymando- morientes wrote: > Dear all > I want to simulate an online processing with a recorded brainvision > data using "ft_realtime_fileproxy". But I wonder how can I "write to" > and "read from" buffer simultaneously in matlab? > How is it possible to start the simulation from a script and then > analyze it from another script in the same time? > As far as I know it is impossible in matlab. Do I have to use to > computers? > > thank you all for your helps > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From dragos at example.com Wed Jul 30 01:18:36 2014 From: dragos at example.com (Dragos Stanciu) Date: Wed, 30 Jul 2014 00:18:36 +0100 Subject: [FieldTrip] Connectivity analysis after applying Welch's method Message-ID: Dear FieldTrippers, I'm Dragos Stanciu and I'm working on my MSc in Neuroinformatics dissertation at the University of Edinburgh. My project involves analysis of resting-state functional connectivity using graph theory in Alzheimer's disease based on MEG data. Each of my subjects has a number of 10s epochs (trials) associated with him/her. I was able to compute the coherence and weighted phase lag index measures (with *ft_freqanalysis *and *ft_connectivityanalysis) *by treating my 10s epochs as trials, but now I would like to reduce the amount of noise in the estimation of the frequency spectrum by employing Welch's method. For this, I split each 10s epoch in 2s segments (minitrials) with 50% overlap: > [sep_epoch_data] = ft_redefinetrial(cfg_cut, single_epoch_data)*. * I then apply *ft_preprocessing *on the minitrials: > [processed_single_epoch] = ft_preprocessing(cfg, sep_epoch_data); I then do frequency analysis on the preprocessed segmented data: > [single_epoch_freq] = ft_freqanalysis(cfg_freq, processed_single_epoch); where > display(cfg_freq) > method: 'mtmfft' > taper: 'hanning' > foilim: [0.5000 4] > output: 'powandcsd' > channel: {148x1 cell} % 148 channels labelled from A1 to A148 > keeptrial: 'no' % don't keep the minitrials, as we want to > average them > keeptapers: 'no' Please note that I average the minitrials (*keeptrial = 'no'*) as I want to get an average of the frequencies. The resulting *single_epoch_freq* structure looks like: > display(single_epoch_freq) > label: {148x1 cell} > dimord: 'chan_freq' > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 4.0009] > powspctrm: [148x8 double] > labelcmb: {10878x2 cell} % channel combinations (148*147/2) > crsspctrm: [10878x8 double] > cfg: [1x1 struct] The last step is to append the averaged frequency structures of each 10s epoch together and perform connectivity analysis on the main 10s epochs. I do the concatenation like so: freq_avgs_powspctrm = [freq_avgs_powspctrm; permute(single_epoch_freq.powspctrm, [3,1,2])]; freq_avgs_crsspctrm = [freq_avgs_crsspctrm; permute(single_epoch_freq.crsspctrm, [3,1,2])]; The idea behind *permute(..., [3, 1, 2])* is that I want the first dimension to represent trials, the second dimension channel combinations and the third dimension frequencies, as this is needed for the input of *ft_connectivity_wpli *(Repetitions x Channelcombination (x Frequency)). I then call stat_conn = ft_connectivityanalysis(cfg_conn, freq_avgs); where: > display(cfg_conn) > method: 'wpli_debiased' > channel: {148x1 cell} and > display(freq_avgs) > powspctrm: [4x148x8 double] % as I have 4 ten second epochs > crsspctrm: [4x10878x8 double] % as I have 4 ten second epochs > label: {148x1 cell} > dimord: 'chan_freq' > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 4.0009] > labelcmb: {10878x2 cell} > cfg: [1x1 struct] The error that I get when running *ft_connectivityanalysis* is: > Error using cat > CAT arguments dimensions are not consistent. > Error in ft_checkdata>fixcsd (line 1170) > data.crsspctrm = cat(catdim, data.powspctrm, data.crsspctrm); When debugging, *catdim* is equal to 1. The error occurs because the 2nd dimension of data.powspctrm and data.crsspctrm are not equal (former is 148, latter is 10878). Do you have any suggestions on getting around this problem? Should I construct *freq_avgs *(data input to ft_connectivityanalysis) differently? I'm also open to different approaches to working out Welch's method in FieldTrip. Please download this archive that contains my test script and 4 example 10s epochs of a subject: https://www.dropbox.com/s/js7pztai02f5p27/Welch_fieldtrip.zip The code should make things clearer (or the opposite). Observations: I thought about using *ft_freqanalysis_mtmwelch*, but apparently it's deprecated. Thank you all in advance for your feedback. Kind regards, Dragos Stanciu -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jul 30 10:28:50 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 30 Jul 2014 10:28:50 +0200 Subject: [FieldTrip] Connectivity analysis after applying Welch's method In-Reply-To: References: Message-ID: <53D8ACC2.9050109@donders.ru.nl> Hi Dragos, while quickly browisng through your mail, it appears to me that you simply need to set single_epoch_freq.dimord = 'rpt_chan_freq'. FieldTrip is using the dimord field to infer the order of the dimensions (*dim*ension *ord*er). The actual dimensions of powspctrm and crsspctrm are now inconsistent with the dimord specifications. Best, Jörn On 7/30/2014 1:18 AM, Dragos Stanciu wrote: > Dear FieldTrippers, > > I'm Dragos Stanciu and I'm working on my MSc in Neuroinformatics > dissertation at the University of Edinburgh. My project involves > analysis of resting-state functional connectivity using graph theory > in Alzheimer's disease based on MEG data. > > Each of my subjects has a number of 10s epochs (trials) associated > with him/her. I was able to compute the coherence and weighted phase > lag index measures (with /ft_freqanalysis /and > /ft_connectivityanalysis) /by treating my 10s epochs as trials, but > now I would like to reduce the amount of noise in the estimation of > the frequency spectrum by employing Welch's method. > > For this, I split each 10s epoch in 2s segments (minitrials) with 50% > overlap: > > [sep_epoch_data] = ft_redefinetrial(cfg_cut, single_epoch_data)/. / > > > I then apply /ft_preprocessing /on the minitrials: > > [processed_single_epoch] = ft_preprocessing(cfg, sep_epoch_data); > > I then do frequency analysis on the preprocessed segmented data: > > [single_epoch_freq] = ft_freqanalysis(cfg_freq, > processed_single_epoch); > > where > > display(cfg_freq) > method: 'mtmfft' > taper: 'hanning' > foilim: [0.5000 4] > output: 'powandcsd' > channel: {148x1 cell} % 148 channels labelled from A1 to > A148 > keeptrial: 'no' % don't keep the minitrials, as we want > to average them > keeptapers: 'no' > > Please note that I average the minitrials (/keeptrial = 'no'/) as I > want to get an average of the frequencies. > > The resulting /single_epoch_freq/ structure looks like: > > display(single_epoch_freq) > label: {148x1 cell} > dimord: 'chan_freq' > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > 4.0009] > powspctrm: [148x8 double] > labelcmb: {10878x2 cell} % channel combinations (148*147/2) > crsspctrm: [10878x8 double] > cfg: [1x1 struct] > > > The last step is to append the averaged frequency structures of each > 10s epoch together and perform connectivity analysis on the main 10s > epochs. I do the concatenation like so: > freq_avgs_powspctrm = [freq_avgs_powspctrm; > permute(single_epoch_freq.powspctrm, [3,1,2])]; > > freq_avgs_crsspctrm = [freq_avgs_crsspctrm; > permute(single_epoch_freq.crsspctrm, [3,1,2])]; > > The idea behind /permute(..., [3, 1, 2])/ is that I want the first > dimension to represent trials, the second dimension channel > combinations and the third dimension frequencies, as this is needed > for the input of /ft_connectivity_wpli /(Repetitions x > Channelcombination (x Frequency)). > > I then call stat_conn = ft_connectivityanalysis(cfg_conn, freq_avgs); > where: > > display(cfg_conn) > method: 'wpli_debiased' > channel: {148x1 cell} > > and > > display(freq_avgs) > powspctrm: [4x148x8 double] % as I have 4 ten second epochs > crsspctrm: [4x10878x8 double] % as I have 4 ten second epochs > label: {148x1 cell} > dimord: 'chan_freq' > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > 4.0009] > labelcmb: {10878x2 cell} > cfg: [1x1 struct] > > > The error that I get when running /ft_connectivityanalysis/ is: > > Error using cat > CAT arguments dimensions are not consistent. > Error in ft_checkdata>fixcsd (line 1170) > data.crsspctrm = cat(catdim, data.powspctrm, data.crsspctrm); > > > When debugging, /catdim/ is equal to 1. The error occurs because the > 2nd dimension of data.powspctrm and data.crsspctrm are not equal > (former is 148, latter is 10878). Do you have any suggestions on > getting around this problem? Should I construct /freq_avgs /(data > input to ft_connectivityanalysis) differently? I'm also open to > different approaches to working out Welch's method in FieldTrip. > > Please download this archive that contains my test script and 4 > example 10s epochs of a subject: > https://www.dropbox.com/s/js7pztai02f5p27/Welch_fieldtrip.zip The code > should make things clearer (or the opposite). > Observations: I thought about using /ft_freqanalysis_mtmwelch/, but > apparently it's deprecated. > > Thank you all in advance for your feedback. > > Kind regards, > Dragos Stanciu > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Wed Jul 30 10:30:22 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 30 Jul 2014 10:30:22 +0200 Subject: [FieldTrip] Connectivity analysis after applying Welch's method In-Reply-To: References: Message-ID: <53D8AD1E.9090801@donders.ru.nl> oh and, maybe use cfg_freq.output = 'fourier', that circumvents the concatenation issue On 7/30/2014 1:18 AM, Dragos Stanciu wrote: > Dear FieldTrippers, > > I'm Dragos Stanciu and I'm working on my MSc in Neuroinformatics > dissertation at the University of Edinburgh. My project involves > analysis of resting-state functional connectivity using graph theory > in Alzheimer's disease based on MEG data. > > Each of my subjects has a number of 10s epochs (trials) associated > with him/her. I was able to compute the coherence and weighted phase > lag index measures (with /ft_freqanalysis /and > /ft_connectivityanalysis) /by treating my 10s epochs as trials, but > now I would like to reduce the amount of noise in the estimation of > the frequency spectrum by employing Welch's method. > > For this, I split each 10s epoch in 2s segments (minitrials) with 50% > overlap: > > [sep_epoch_data] = ft_redefinetrial(cfg_cut, single_epoch_data)/. / > > > I then apply /ft_preprocessing /on the minitrials: > > [processed_single_epoch] = ft_preprocessing(cfg, sep_epoch_data); > > I then do frequency analysis on the preprocessed segmented data: > > [single_epoch_freq] = ft_freqanalysis(cfg_freq, > processed_single_epoch); > > where > > display(cfg_freq) > method: 'mtmfft' > taper: 'hanning' > foilim: [0.5000 4] > output: 'powandcsd' > channel: {148x1 cell} % 148 channels labelled from A1 to > A148 > keeptrial: 'no' % don't keep the minitrials, as we want > to average them > keeptapers: 'no' > > Please note that I average the minitrials (/keeptrial = 'no'/) as I > want to get an average of the frequencies. > > The resulting /single_epoch_freq/ structure looks like: > > display(single_epoch_freq) > label: {148x1 cell} > dimord: 'chan_freq' > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > 4.0009] > powspctrm: [148x8 double] > labelcmb: {10878x2 cell} % channel combinations (148*147/2) > crsspctrm: [10878x8 double] > cfg: [1x1 struct] > > > The last step is to append the averaged frequency structures of each > 10s epoch together and perform connectivity analysis on the main 10s > epochs. I do the concatenation like so: > freq_avgs_powspctrm = [freq_avgs_powspctrm; > permute(single_epoch_freq.powspctrm, [3,1,2])]; > > freq_avgs_crsspctrm = [freq_avgs_crsspctrm; > permute(single_epoch_freq.crsspctrm, [3,1,2])]; > > The idea behind /permute(..., [3, 1, 2])/ is that I want the first > dimension to represent trials, the second dimension channel > combinations and the third dimension frequencies, as this is needed > for the input of /ft_connectivity_wpli /(Repetitions x > Channelcombination (x Frequency)). > > I then call stat_conn = ft_connectivityanalysis(cfg_conn, freq_avgs); > where: > > display(cfg_conn) > method: 'wpli_debiased' > channel: {148x1 cell} > > and > > display(freq_avgs) > powspctrm: [4x148x8 double] % as I have 4 ten second epochs > crsspctrm: [4x10878x8 double] % as I have 4 ten second epochs > label: {148x1 cell} > dimord: 'chan_freq' > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > 4.0009] > labelcmb: {10878x2 cell} > cfg: [1x1 struct] > > > The error that I get when running /ft_connectivityanalysis/ is: > > Error using cat > CAT arguments dimensions are not consistent. > Error in ft_checkdata>fixcsd (line 1170) > data.crsspctrm = cat(catdim, data.powspctrm, data.crsspctrm); > > > When debugging, /catdim/ is equal to 1. The error occurs because the > 2nd dimension of data.powspctrm and data.crsspctrm are not equal > (former is 148, latter is 10878). Do you have any suggestions on > getting around this problem? Should I construct /freq_avgs /(data > input to ft_connectivityanalysis) differently? I'm also open to > different approaches to working out Welch's method in FieldTrip. > > Please download this archive that contains my test script and 4 > example 10s epochs of a subject: > https://www.dropbox.com/s/js7pztai02f5p27/Welch_fieldtrip.zip The code > should make things clearer (or the opposite). > Observations: I thought about using /ft_freqanalysis_mtmwelch/, but > apparently it's deprecated. > > Thank you all in advance for your feedback. > > Kind regards, > Dragos Stanciu > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From paymandomorientes at yahoo.com Wed Jul 30 13:26:32 2014 From: paymandomorientes at yahoo.com (paymando- morientes) Date: Wed, 30 Jul 2014 04:26:32 -0700 Subject: [FieldTrip] problem with buffer simulation Message-ID: <1406719592.38804.YahooMailNeo@web141606.mail.bf1.yahoo.com> Dear field trippers I have encountered a problem simulating the buffer by  using the function "ft_realtime_fileproxy". When I start writing to the buffer, it works normally but when I stop it by "ctrl + c"  matlab stopps working and I have to terminate it from task manager. Does anyone know where the problem is? what should I change in the buffer or function's settings? thank you all! payman -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jul 30 13:34:06 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 30 Jul 2014 13:34:06 +0200 Subject: [FieldTrip] problem with buffer simulation In-Reply-To: <1406719592.38804.YahooMailNeo@web141606.mail.bf1.yahoo.com> References: <1406719592.38804.YahooMailNeo@web141606.mail.bf1.yahoo.com> Message-ID: <53D8D82E.6010808@donders.ru.nl> Hi Payman, I think what you describe is related to this bug: http://bugzilla.fcdonders.nl/show_bug.cgi?id=934 I am afraid that there is no easy fix for this, and we did not continue investigating this further. Best, Jörn On 7/30/2014 1:26 PM, paymando- morientes wrote: > Dear field trippers > I have encountered a problem simulating the buffer by using the > function "ft_realtime_fileproxy". > When I start writing to the buffer, it works normally but when I stop > it by "ctrl + c" matlab stopps working and I have to terminate it > from task manager. > Does anyone know where the problem is? what should I change in the > buffer or function's settings? > > thank you all! > payman > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From roeysc at gmail.com Wed Jul 30 22:24:53 2014 From: roeysc at gmail.com (Roey Schurr) Date: Wed, 30 Jul 2014 23:24:53 +0300 Subject: [FieldTrip] A datatype error in ft_sourceanalysis (Reference to non-existent field 'topo') Message-ID: Dear fieldtrippers, I'm writing you regarding an error I encountered upon computing an inverse solution in mne method: Reference to non-existent field 'topo'. Error in ft_datatype_comp (line 92) if size(comp.topo,1)==size(comp.topo,2) Error in ft_checkdata (line 342) data = ft_datatype_comp(data); Error in ft_sourceanalysis (line 161) data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'}, 'feedback', 'yes'); The problem stems from a change (made in 2014-05-27) in "ft_sourceanalysis", and can be bypassed by changing the order of data types in line 161 of "ft_sourceanalysis": instead of data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'}, 'feedback', 'yes'); write data = ft_checkdata(data, 'datatype', {*'timelock', 'freq', 'comp'*}, 'feedback', 'yes'); Now, I am sure there was a good reason for making this change, so I am guessing the fault is mine in the way I try computing the inverse solution (which did work until this change of ft_sourceanalysis). The relevant piece of code is: cfg = struct; cfg.method = 'mne'; cfg.elec = elec; cfg.grid = gridVar; cfg.vol = vol; cfg.rawtrial = 'yes'; cfg.hdmfile = headModelPath; cfg.mne.lambda = '5%'; cfg.keepfilter = 'yes'; cfg.rawtrial = 'no'; cfg.singletrial = 'no'; cfg.keeptrials = 'yes'; source = ft_sourceanalysis(cfg, data) I am also not sure why the data is thought to be a "comp" data. A possible cause for the problem is that the raw EEG records I work with are in TRC format which has to be transformed into a fieldtrip compatible format. So the "data" struct in the code has the following fields: data = label: {1x19 cell} fsample: 256 trial: {1x12 cell} time: {1x12 cell} interpolatedElectrodes: {1x12 cell} Any ideas regarding the suggested bypass or the deeper cause of the error will be greatly appreciated. Thank you for your time, Best, roey -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Wed Jul 30 22:39:12 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Wed, 30 Jul 2014 20:39:12 +0000 Subject: [FieldTrip] Extra Noise Message-ID: <851EC985-AEE4-483C-841F-9BF04CD1AC66@dartmouth.edu> Hello All, I have been trying to get rid of the noise when I create the mesh for this image in the neck area and the areas above the scalp. The MR Images have nothing below the nose area and there seems to be no contrast change in the image backgrounds to cause this result. [cid:9CC3E462-A99E-4540-9D53-E4519F967028 at socal.rr.com] [cid:F80D2CB7-391E-4688-95CF-A18E4425E8C4 at socal.rr.com] I am really stumped as to how to change this, These different results were gotten by changing the threshold and the mesh number slightly. However, each time I redo the process from the original images the chances of “horn” being in front or on top of the head seem to shift. In some cases, there are both. If anyone could help. It would be greatly appreciated. Is there some automated way to get rid of these extra vertices? Isaiah -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-18 at 3.42.39 PM.png Type: image/png Size: 126938 bytes Desc: Screen Shot 2014-07-18 at 3.42.39 PM.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-15 at 6.10.55 PM.png Type: image/png Size: 162431 bytes Desc: Screen Shot 2014-07-15 at 6.10.55 PM.png URL: From dragos at example.com Thu Jul 31 00:06:25 2014 From: dragos at example.com (Dragos Stanciu) Date: Wed, 30 Jul 2014 23:06:25 +0100 Subject: [FieldTrip] Connectivity analysis after applying Welch's method Message-ID: Hello Jörn, Thank you so much for responding. The suggested changes were spot on and ft_connectivityanalysis executed successfully. In the end, I went with the approach of redefining the 10s epoch in 2s minitrials and performing ft_freqanalysis on these minitrials with *cfg.output='fourier'* and *keeptrial='yes'. *I then did ft_connectivityanalysis on the frequency structures resulted from processing the segmented data. This would give me connectivity matrices for each 10s epoch, which I then average to get one connectivity matrix for the subject (technically, I have a connectivity matrix for each frequency bin, but I can again average across the frequency spectrum). I have a question on the debiased weighted phase lag index measure. The values in the matrix vary between -1 and 1 (depending if the relative phase lags or leads). When I construct the adjacency matrices, is it just a matter of taking the absolute value of these values? I would also like some advice on plotting connectivity matrices. I was able to plot one matrix with ft_plot_matrix, but it would be really nice if I could plot a connectivity graph where the thickness of the edges correspond to the strength of the connectivity measure. I tried ft_topoplotER with 4D148.lay as the layout file and 'gui' as refchannel, but I didn't get anything interesting. As my data is MEG, it doesn't make sense to me to choose a reference channel... Ideally, I would like to combine the layout (4D148.lay) with the connectivity matrix for plotting the graph. Do you have any ideas for this? Also, do you have any other suggestions on what other plotting functions can be used with these connectivity matrices? I've looked through the tutorial, but the functions don't seem very relevant to my type of data. Thank you for your help. Regards, Dragos Stanciu > Message: 9 > Date: Wed, 30 Jul 2014 10:28:50 +0200 > From: "J?rn M. Horschig" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Connectivity analysis after applying Welch's > method > > Hi Dragos, > > while quickly browisng through your mail, it appears to me that you > simply need to set single_epoch_freq.dimord = 'rpt_chan_freq'. FieldTrip > is using the dimord field to infer the order of the dimensions > (*dim*ension *ord*er). The actual dimensions of powspctrm and crsspctrm > are now inconsistent with the dimord specifications. > > Best, > J?rn > > > On 7/30/2014 1:18 AM, Dragos Stanciu wrote: > > Dear FieldTrippers, > > > > I'm Dragos Stanciu and I'm working on my MSc in Neuroinformatics > > dissertation at the University of Edinburgh. My project involves > > analysis of resting-state functional connectivity using graph theory > > in Alzheimer's disease based on MEG data. > > > > Each of my subjects has a number of 10s epochs (trials) associated > > with him/her. I was able to compute the coherence and weighted phase > > lag index measures (with /ft_freqanalysis /and > > /ft_connectivityanalysis) /by treating my 10s epochs as trials, but > > now I would like to reduce the amount of noise in the estimation of > > the frequency spectrum by employing Welch's method. > > > > For this, I split each 10s epoch in 2s segments (minitrials) with 50% > > overlap: > > > > [sep_epoch_data] = ft_redefinetrial(cfg_cut, single_epoch_data)/. / > > > > > > I then apply /ft_preprocessing /on the minitrials: > > > > [processed_single_epoch] = ft_preprocessing(cfg, sep_epoch_data); > > > > I then do frequency analysis on the preprocessed segmented data: > > > > [single_epoch_freq] = ft_freqanalysis(cfg_freq, > > processed_single_epoch); > > > > where > > > > display(cfg_freq) > > method: 'mtmfft' > > taper: 'hanning' > > foilim: [0.5000 4] > > output: 'powandcsd' > > channel: {148x1 cell} % 148 channels labelled from A1 to > > A148 > > keeptrial: 'no' % don't keep the minitrials, as we want > > to average them > > keeptapers: 'no' > > > > Please note that I average the minitrials (/keeptrial = 'no'/) as I > > want to get an average of the frequencies. > > > > The resulting /single_epoch_freq/ structure looks like: > > > > display(single_epoch_freq) > > label: {148x1 cell} > > dimord: 'chan_freq' > > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > > 4.0009] > > powspctrm: [148x8 double] > > labelcmb: {10878x2 cell} % channel combinations (148*147/2) > > crsspctrm: [10878x8 double] > > cfg: [1x1 struct] > > > > > > The last step is to append the averaged frequency structures of each > > 10s epoch together and perform connectivity analysis on the main 10s > > epochs. I do the concatenation like so: > > freq_avgs_powspctrm = [freq_avgs_powspctrm; > > permute(single_epoch_freq.powspctrm, [3,1,2])]; > > > > freq_avgs_crsspctrm = [freq_avgs_crsspctrm; > > permute(single_epoch_freq.crsspctrm, [3,1,2])]; > > > > The idea behind /permute(..., [3, 1, 2])/ is that I want the first > > dimension to represent trials, the second dimension channel > > combinations and the third dimension frequencies, as this is needed > > for the input of /ft_connectivity_wpli /(Repetitions x > > Channelcombination (x Frequency)). > > > > I then call stat_conn = ft_connectivityanalysis(cfg_conn, freq_avgs); > > where: > > > > display(cfg_conn) > > method: 'wpli_debiased' > > channel: {148x1 cell} > > > > and > > > > display(freq_avgs) > > powspctrm: [4x148x8 double] % as I have 4 ten second epochs > > crsspctrm: [4x10878x8 double] % as I have 4 ten second epochs > > label: {148x1 cell} > > dimord: 'chan_freq' > > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > > 4.0009] > > labelcmb: {10878x2 cell} > > cfg: [1x1 struct] > > > > > > The error that I get when running /ft_connectivityanalysis/ is: > > > > Error using cat > > CAT arguments dimensions are not consistent. > > Error in ft_checkdata>fixcsd (line 1170) > > data.crsspctrm = cat(catdim, data.powspctrm, data.crsspctrm); > > > > > > When debugging, /catdim/ is equal to 1. The error occurs because the > > 2nd dimension of data.powspctrm and data.crsspctrm are not equal > > (former is 148, latter is 10878). Do you have any suggestions on > > getting around this problem? Should I construct /freq_avgs /(data > > input to ft_connectivityanalysis) differently? I'm also open to > > different approaches to working out Welch's method in FieldTrip. > > > > Please download this archive that contains my test script and 4 > > example 10s epochs of a subject: > > https://www.dropbox.com/s/js7pztai02f5p27/Welch_fieldtrip.zip The code > > should make things clearer (or the opposite). > > Observations: I thought about using /ft_freqanalysis_mtmwelch/, but > > apparently it's deprecated. > > > > Thank you all in advance for your feedback. > > > > Kind regards, > > Dragos Stanciu > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Jul 31 09:00:26 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 31 Jul 2014 09:00:26 +0200 Subject: [FieldTrip] A datatype error in ft_sourceanalysis (Reference to non-existent field 'topo') In-Reply-To: References: Message-ID: Hi Roey, That sounds like a bug to me. I added this on our bugzilla: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2664 . You should be on the cc list for that bug. Best, Eelke On 30 July 2014 22:24, Roey Schurr wrote: > Dear fieldtrippers, > > I'm writing you regarding an error I encountered upon computing an inverse > solution in mne method: > > Reference to non-existent field 'topo'. > > Error in ft_datatype_comp (line 92) > if size(comp.topo,1)==size(comp.topo,2) > > Error in ft_checkdata (line 342) > data = ft_datatype_comp(data); > > Error in ft_sourceanalysis (line 161) > data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'}, > 'feedback', > 'yes'); > > The problem stems from a change (made in 2014-05-27) in "ft_sourceanalysis", > and can be bypassed by changing the order of data types in line 161 of > "ft_sourceanalysis": > > instead of > data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'}, > 'feedback', 'yes'); > write > data = ft_checkdata(data, 'datatype', {'timelock', 'freq', 'comp'}, > 'feedback', 'yes'); > > Now, I am sure there was a good reason for making this change, so I am > guessing the fault is mine in the way I try computing the inverse solution > (which did work until this change of ft_sourceanalysis). The relevant piece > of code is: > > cfg = struct; > cfg.method = 'mne'; > cfg.elec = elec; > cfg.grid = gridVar; > cfg.vol = vol; > cfg.rawtrial = 'yes'; > cfg.hdmfile = headModelPath; > cfg.mne.lambda = '5%'; > cfg.keepfilter = 'yes'; > cfg.rawtrial = 'no'; > cfg.singletrial = 'no'; > cfg.keeptrials = 'yes'; > source = ft_sourceanalysis(cfg, data) > > I am also not sure why the data is thought to be a "comp" data. A possible > cause for the problem is that the raw EEG records I work with are in TRC > format which has to be transformed into a fieldtrip compatible format. So > the "data" struct in the code has the following fields: > > data = > label: {1x19 cell} > fsample: 256 > trial: {1x12 cell} > time: {1x12 cell} > interpolatedElectrodes: {1x12 cell} > > Any ideas regarding the suggested bypass or the deeper cause of the error > will be greatly appreciated. > > Thank you for your time, > Best, > > roey > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From matt.gerhold at gmail.com Wed Jul 30 18:05:27 2014 From: matt.gerhold at gmail.com (Matt Gerhold) Date: Wed, 30 Jul 2014 09:05:27 -0700 Subject: [FieldTrip] Granger Causality Questions Message-ID: Hi, Given the data provided, the non-parametric granger causality test yields results which suggest no directional influence when all channels are used. The data is current source densities, they have not been scaled according to head circumference (fs=512). The subject is in an eyes-open condition. Any suggestions or comments on the resultant solution? Matthew -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CSD_Data_Eyes_Open.mat Type: application/octet-stream Size: 3542373 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Grange_Causality_Test_My_Data_Example.m Type: application/octet-stream Size: 2182 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Channel_Locs_20_Chans.jpg Type: image/jpeg Size: 31550 bytes Desc: not available URL: From d.lozanosoldevilla at fcdonders.ru.nl Thu Jul 31 10:31:19 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Thu, 31 Jul 2014 10:31:19 +0200 (CEST) Subject: [FieldTrip] Extra Noise In-Reply-To: <851EC985-AEE4-483C-841F-9BF04CD1AC66@dartmouth.edu> Message-ID: <2127891963.8064221.1406795479657.JavaMail.root@sculptor.zimbra.ru.nl> Hi Isaiah, Recently we answered a similar issue here: http ://mailman.science. ru . nl / pipermail / fieldtrip /2014-July/008273. html best, Diego ----- Original Message ----- > From: "Isaiah C. Smith" > To: " FieldTrip discussion list" < fieldtrip @science. ru . nl > > Sent: Wednesday, 30 July, 2014 10:39:12 PM > Subject: [ FieldTrip ] Extra Noise > Hello All, > I have been trying to get rid of the noise when I create the mesh for > this image in the neck area and the areas above the scalp. The MR > Images have nothing below the nose area and there seems to be no > contrast change in the image backgrounds to cause this result. > I am really stumped as to how to change this, These different results > were gotten by changing the threshold and the mesh number slightly. > However, each time I redo the process from the original images the > chances of “horn” being in front or on top of the head seem to shift. > In some cases, there are both. If anyone could help. It would be > greatly appreciated. Is there some automated way to get rid of these > extra vertices ? > Isaiah > _______________________________________________ > fieldtrip mailing list > fieldtrip @ donders . ru . nl > http ://mailman.science. ru . nl /mailman/ listinfo / fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http :// www . ru . nl /people/ donders /lozano-soldevilla-d/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-18 at 3.42.39 PM.png Type: image/png Size: 126938 bytes Desc: Screen Shot 2014-07-18 at 3.42.39 PM.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-15 at 6.10.55 PM.png Type: image/png Size: 162431 bytes Desc: Screen Shot 2014-07-15 at 6.10.55 PM.png URL: From s.rombetto at cib.na.cnr.it Thu Jul 31 12:22:28 2014 From: s.rombetto at cib.na.cnr.it (s.rombetto at cib.na.cnr.it) Date: Thu, 31 Jul 2014 12:22:28 +0200 Subject: [FieldTrip] source reconstruction Message-ID: <20140731122228.qingclalck0ooo4g@arco.cib.na.cnr.it> Dear all, I'm working on source reconstruction using the following steps: - I construct a forward model from a segmented individual mri - I prepare the head model from the segmented brain surface (option singleshell) - I compute lead field with ft_prepare_leadfield (is this correct? Or should I use ft_compute_leadfield? I cannot understand the differences between them) After this I do source reconstruction with dipole fit methods (as implemented in ft_dipolefitting) Is this sequence correct according to you? I'm in trouble because I find that the source sometimes is located outside the brain. Any suggestion? Sara ------------------------- Dott.ssa Sara Rombetto Istituto di Cibernetica "E. Caianiello" Via Campi Flegrei, 34 80078 Pozzuoli (NA) Italy mob +39 3401689815 tel +39 0818675361 fax +39 0818675128 Lab MEG 0817483511 -------------------------- "I disapprove of what you say, but I will defend to the death your right to say it." [Evelyn Beatrice Hall, The Friends Of Voltaire] ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From hweeling.lee at gmail.com Thu Jul 31 13:29:40 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 31 Jul 2014 13:29:40 +0200 Subject: [FieldTrip] sLoreta Message-ID: Dear all, I'm interested to apply sLoreta to my EEG data, as implemented by Babiloni et al., in http://www.ncbi.nlm.nih.gov/pubmed/20930306. >From Fieldtrip website, I read that it is possible to read the output generated by Loreta and read it in Fieldtrip. However, I wonder if it's possible to convert the preprocessed fieldtrip data to Loreta and then generate the sLoreta output. Can someone please help and share his/her experience with this? Thank you very much! Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Jul 31 15:17:05 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 31 Jul 2014 15:17:05 +0200 Subject: [FieldTrip] Connectivity analysis after applying Welch's method In-Reply-To: References: Message-ID: <53DA41D1.7080604@donders.ru.nl> Hi Dragos, have yoi checked ft_topoplotCC? Best, Jörn On 7/31/2014 12:06 AM, Dragos Stanciu wrote: > Hello Jörn, > > Thank you so much for responding. The suggested changes were spot on > and ft_connectivityanalysis executed successfully. > In the end, I went with the approach of redefining the 10s epoch in 2s > minitrials and performing ft_freqanalysis on these minitrials with > /cfg.output='fourier'/ and /keeptrial='yes'. /I then did > ft_connectivityanalysis on the frequency structures resulted from > processing the segmented data. This would give me connectivity > matrices for each 10s epoch, which I then average to get one > connectivity matrix for the subject (technically, I have a > connectivity matrix for each frequency bin, but I can again average > across the frequency spectrum). > > I have a question on the debiased weighted phase lag index measure. > The values in the matrix vary between -1 and 1 (depending if the > relative phase lags or leads). When I construct the adjacency > matrices, is it just a matter of taking the absolute value of these > values? > > I would also like some advice on plotting connectivity matrices. I was > able to plot one matrix with ft_plot_matrix, but it would be really > nice if I could plot a connectivity graph where the thickness of the > edges correspond to the strength of the connectivity measure. I tried > ft_topoplotER with 4D148.lay as the layout file and 'gui' as > refchannel, but I didn't get anything interesting. As my data is MEG, > it doesn't make sense to me to choose a reference channel... > Ideally, I would like to combine the layout (4D148.lay) with the > connectivity matrix for plotting the graph. Do you have any ideas for > this? Also, do you have any other suggestions on what other plotting > functions can be used with these connectivity matrices? I've looked > through the tutorial, but the functions don't seem very relevant to my > type of data. > > Thank you for your help. > > Regards, > Dragos Stanciu > > Message: 9 > Date: Wed, 30 Jul 2014 10:28:50 +0200 > From: "J?rn M. Horschig" > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Connectivity analysis after applying Welch's > method > > Hi Dragos, > > while quickly browisng through your mail, it appears to me that you > simply need to set single_epoch_freq.dimord = 'rpt_chan_freq'. > FieldTrip > is using the dimord field to infer the order of the dimensions > (*dim*ension *ord*er). The actual dimensions of powspctrm and > crsspctrm > are now inconsistent with the dimord specifications. > > Best, > J?rn > > > On 7/30/2014 1:18 AM, Dragos Stanciu wrote: > > Dear FieldTrippers, > > > > I'm Dragos Stanciu and I'm working on my MSc in Neuroinformatics > > dissertation at the University of Edinburgh. My project involves > > analysis of resting-state functional connectivity using graph theory > > in Alzheimer's disease based on MEG data. > > > > Each of my subjects has a number of 10s epochs (trials) associated > > with him/her. I was able to compute the coherence and weighted phase > > lag index measures (with /ft_freqanalysis /and > > /ft_connectivityanalysis) /by treating my 10s epochs as trials, but > > now I would like to reduce the amount of noise in the estimation of > > the frequency spectrum by employing Welch's method. > > > > For this, I split each 10s epoch in 2s segments (minitrials) > with 50% > > overlap: > > > > [sep_epoch_data] = ft_redefinetrial(cfg_cut, > single_epoch_data)/. / > > > > > > I then apply /ft_preprocessing /on the minitrials: > > > > [processed_single_epoch] = ft_preprocessing(cfg, > sep_epoch_data); > > > > I then do frequency analysis on the preprocessed segmented data: > > > > [single_epoch_freq] = ft_freqanalysis(cfg_freq, > > processed_single_epoch); > > > > where > > > > display(cfg_freq) > > method: 'mtmfft' > > taper: 'hanning' > > foilim: [0.5000 4] > > output: 'powandcsd' > > channel: {148x1 cell} % 148 channels labelled from > A1 to > > A148 > > keeptrial: 'no' % don't keep the minitrials, as we want > > to average them > > keeptapers: 'no' > > > > Please note that I average the minitrials (/keeptrial = 'no'/) as I > > want to get an average of the frequencies. > > > > The resulting /single_epoch_freq/ structure looks like: > > > > display(single_epoch_freq) > > label: {148x1 cell} > > dimord: 'chan_freq' > > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > > 4.0009] > > powspctrm: [148x8 double] > > labelcmb: {10878x2 cell} % channel combinations > (148*147/2) > > crsspctrm: [10878x8 double] > > cfg: [1x1 struct] > > > > > > The last step is to append the averaged frequency structures of each > > 10s epoch together and perform connectivity analysis on the main 10s > > epochs. I do the concatenation like so: > > freq_avgs_powspctrm = [freq_avgs_powspctrm; > > permute(single_epoch_freq.powspctrm, [3,1,2])]; > > > > freq_avgs_crsspctrm = [freq_avgs_crsspctrm; > > permute(single_epoch_freq.crsspctrm, [3,1,2])]; > > > > The idea behind /permute(..., [3, 1, 2])/ is that I want the first > > dimension to represent trials, the second dimension channel > > combinations and the third dimension frequencies, as this is needed > > for the input of /ft_connectivity_wpli /(Repetitions x > > Channelcombination (x Frequency)). > > > > I then call stat_conn = ft_connectivityanalysis(cfg_conn, > freq_avgs); > > where: > > > > display(cfg_conn) > > method: 'wpli_debiased' > > channel: {148x1 cell} > > > > and > > > > display(freq_avgs) > > powspctrm: [4x148x8 double] % as I have 4 ten > second epochs > > crsspctrm: [4x10878x8 double] % as I have 4 ten > second epochs > > label: {148x1 cell} > > dimord: 'chan_freq' > > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > > 4.0009] > > labelcmb: {10878x2 cell} > > cfg: [1x1 struct] > > > > > > The error that I get when running /ft_connectivityanalysis/ is: > > > > Error using cat > > CAT arguments dimensions are not consistent. > > Error in ft_checkdata>fixcsd (line 1170) > > data.crsspctrm = cat(catdim, data.powspctrm, > data.crsspctrm); > > > > > > When debugging, /catdim/ is equal to 1. The error occurs because the > > 2nd dimension of data.powspctrm and data.crsspctrm are not equal > > (former is 148, latter is 10878). Do you have any suggestions on > > getting around this problem? Should I construct /freq_avgs /(data > > input to ft_connectivityanalysis) differently? I'm also open to > > different approaches to working out Welch's method in FieldTrip. > > > > Please download this archive that contains my test script and 4 > > example 10s epochs of a subject: > > https://www.dropbox.com/s/js7pztai02f5p27/Welch_fieldtrip.zip > The code > > should make things clearer (or the opposite). > > Observations: I thought about using /ft_freqanalysis_mtmwelch/, but > > apparently it's deprecated. > > > > Thank you all in advance for your feedback. > > > > Kind regards, > > Dragos Stanciu > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From paymandomorientes at yahoo.com Thu Jul 31 20:54:33 2014 From: paymandomorientes at yahoo.com (paymando- morientes) Date: Thu, 31 Jul 2014 11:54:33 -0700 Subject: [FieldTrip] Artifact rejection in realtime analysis Message-ID: <1406832873.91684.YahooMailNeo@web141602.mail.bf1.yahoo.com> Dear field trippers I am trying to design my first real time loop for an EEG experiment. The question that I have now is that how should I deal with artifacts such as eye blinks. Firstly, I think rejecting data segments in real time analysis is pointless because if an epoch is artifactual and can not represent the classified features,  it could simply get the label (epoch rejected) in the classification section and the script then moves to the next segment.  Secondly, ICA is too slow to be implemented in an online loop. So how should artifacts be dealt with inside a real time analysis? Are there any ways for correcting eye blinks other than ICA?  Can you give me any suggestions? THANK YOU ALL! payman -------------- next part -------------- An HTML attachment was scrubbed... URL: From martina.postorino at gmail.com Tue Jul 1 10:58:42 2014 From: martina.postorino at gmail.com (Martina Postorino) Date: Tue, 1 Jul 2014 10:58:42 +0200 Subject: [FieldTrip] ft_selectdata - automatic channels sorting In-Reply-To: <78332B65-2F5C-4638-B15C-D8448950D479@donders.ru.nl> References: <78332B65-2F5C-4638-B15C-D8448950D479@donders.ru.nl> Message-ID: Dear Jan-Mathijs, thanks for your quick reply. I did not apply the ft_selectdata to the 'stat' output (there the channels were selected in the cfg.channel field of the ft_timelockstatistics function). I only apply that function to my ERP dataset to select a subset of channel on which I wanted the information stored in stat.mask to be plotted, this is why the order of channels was inconsistent (I am sorry, I know it is a bit hard to explain). By the way, I am following this issue on the Bugzilla website. Thanks again, best regards. *__________________* Martina Postorino, M.Sc Phd program in Medical Life Science and Technology Neuroimaging Center (TUM-NIC) Technische Universität München, Klinikum Rechts der Isar 2014-06-25 8:55 GMT+02:00 jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl>: > Hi Martina, > > I agree that the sorting of the channels is somewhat annoying, and an > unexpected feature in the coding. Presently we are looking into how to > address this. > > Yet, the sorting that is applied to the list of channels is consistently > applied to all fields that contain numeric data. In your case I don’t > understand your statement that the mask stays unsorted. Is there any way > you are able to verify that? If I run the following simple simulation > everything is reordered, also the ‘mask’-field. > > stat.label={‘B’;’A’;’C’}; > stat.stat=repmat([1:3]’,[1 2]); > stat.mask=stat.stat; > stat.prob=stat.stat; > stat.time=[1 2]; > stat.dimord=‘chan_time’; > > stat2=ft_selectdata([],stat); > > If I now do: > > stat2.label > > I get > > ans = > > ‘A’ > ‘B’ > ‘C’ > > and when I do: > > stat2.stat > > I get > > ans = > > 2 2 > 1 1 > 3 3 > > and when I do: > > stat2.mask > > I get > > ans = > > 2 2 > 1 1 > 3 3 > > Conslusion: the mask is also re-ordered. In other words, the rows in the > numeric data fields are still consistent with respect to one another. > > If you want to stay informed about this issue, I suggest you to create an > account on bugzilla.fcdonders.nl, and add yourself to the cc-list of bug > #2597. > > > Best wishes, > Jan-Mathijs > > > On Jun 23, 2014, at 4:14 PM, Martina Postorino < > martina.postorino at gmail.com> wrote: > > Dear all, > > I recently encountered a problem using the function ft_selectdata to > select a subset of channels from my EEG dataset. > > I found out that in the output of the function ft_selectdata, channels are > sorted alphabetically. For me, that represents a problem since I would like > to plot the results from a cluster based permutation test using the > information stored in stat.mask (in which the order of channels is in line > with the original order of channels, i.e. not alphabetically) on the ERP > grandaverage of specific electrodes selected with ft_selectdata, to see > which time points are significantly different between my experimental > conditions. Due to the different orders of the channels, the mask is > plotted over the wrong channels. > > Is there a way to avoid that the function automatically sorts the labels > of the channels alphabetically? > > I have already tried the different versions of ft_selectdata > (ft_selectdata, ft_selectdata_old, ft_selectdata_new) and updated my > Fieldtrip version to the last one available. Nothing changed. > > This is the code I use: > > [stat] = ft_timelockstatistics(cfg, ERP_pain_bp_GA, ERP_buttonpress_GA); > > %plotting > > cfgp = []; > cfgp.channel = {'Cz'; 'CPz', 'Pz', 'CP1'. 'CP3', 'CP2', 'CP4'}; > cfgp.avgoverchan = 'no'; > cfgp.latency = [-1 1]; > ERP_pain_bp_GA_red = ft_selectdata_new(cfgp, ERP_pain_bp_GA); > ERP_buttonpress_GA_red = ft_selectdata_new(cfgp, ERP_buttonpress_GA); > > % average data across subjects > > cfgp = []; > cfgp.keepindividual = 'no'; > ERP_pain_bp_GA_avg = ft_timelockanalysis (cfgp, ERP_pain_bp_GA_red); > ERP_buttonpress_GA_avg = ft_timelockanalysis (cfgp, > ERP_buttonpress_GA_red); > % ERP_pain_GA_avg = ft_timelockanalysis (cfg, ERP_pain_GA_red); > > ERP_pain_bp_GA_avg.mask = stat.mask; > ERP_buttonpress_GA_avg.mask = stat.mask; > % ERP_pain_GA_avg.mask = stat.mask; > > % do the plotting > > cfgp = []; > cfgp.maskparameter = 'mask'; > cfgp.maskstyle = 'box'; > cfgp.layout = layout_easycap_painlabmunich; > > ft_multiplotER(cfgp,ERP_pain_bp_GA_avg, ERP_buttonpress_GA_avg); > > Thanks in advance! > > ___________________________________________ > > Martina Postorino, M.Sc > Phd program in Medical Life Science and Technology > > Neuroimaging Center (TUM-NIC) > Technische Universität München, Klinikum Rechts der Isar > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jul 1 12:27:49 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 1 Jul 2014 10:27:49 +0000 Subject: [FieldTrip] Beamformer confusion (still) Message-ID: <1404210469377.62409@flinders.edu.au> Hello everyone, So with absolutely no luck with the other methods I was trying, I tried to just use template files as I dont actually have any real mri data at this point. I ran the following code to warp electrodes to the surface of the template standard_bem file. I made sure that vol, timelock.elec and sourcemodel were all in centimetres. timelock.elec = ft_convert_units( timelock.elec, 'cm'); ?cfg = []; cfg.method = 'headshape'; cfg.headshape = vol.bnd( 1); timelock.elec = ft_sensorrealign( cfg, timelock.elec); The attached is vol, sourcemodel and the electrodes plotted (from the following code) figure; hold on ft_plot_vol( vol, 'edgecolor', 'none'); alpha 0.4 hatlas = ft_plot_mesh( sourcemodel.pos( sourcemodel.inside, :)); set( hatlas, 'Color', [ 0 1 0]); hsens = ft_plot_sens( timelock.elec, 'style', 'sk'); set( hsens, 'Color', [ 1 0 0]); As they dont line up, Im wondering what I am doing wrong? ?Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: template_lineup.fig Type: application/octet-stream Size: 197493 bytes Desc: template_lineup.fig URL: From mcantor at umich.edu Wed Jul 2 16:10:02 2014 From: mcantor at umich.edu (Max Cantor) Date: Wed, 2 Jul 2014 10:10:02 -0400 Subject: [FieldTrip] Beamformers: SAM vs LCMV vs LCMV fixedori Message-ID: Hi Fieldtrip, We are currently using the SAM beamformer for source localization, but are thinking of switching to LCMV. Given the research I've read, the vector beamformer approach should, for our purposes, be more efficient and be as, if not more accurate than scalar. However, other than the vector/scalar difference, I don't have a great understanding of what other differences exist between the two beamformers. To test the differences, I've run SAM, LCMV, and LCMV with fixed orientation (making it scalar), with both our real data and with simulated data, and while SAM and LCMV fixedori are more similar to each other than either are when compared to LCMV without fixedori (particularly with the simulation, less so with our real data), they are still visibly different from each other. This suggests to me that there are other potentially meaningful differences between SAM and LCMV besides the scalar/vector difference, and I want to make sure I have at least some idea of what those differences are before I commit to the change. That being said, I get the feeling that these differences may be more nuanced than I can decipher on my own, so if anyone can explain to me what these differences are and if they are important, I would greatly appreciate it. Thanks, Max -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg at think-now.com Thu Jul 3 02:00:23 2014 From: greg at think-now.com (Greg Simpson) Date: Wed, 2 Jul 2014 17:00:23 -0700 Subject: [FieldTrip] Research Associate Position Available In-Reply-To: References: Message-ID: Dear Colleagues - This position has been filled. Thank you, Greg Gregory V. Simpson, Ph.D. Founder & CSO Think Now, Inc. On Thu, May 8, 2014 at 10:52 AM, Greg Simpson wrote: > Dear Colleagues - please note our job opening below and spread the word to > those that might be interested. Thank you! Greg > > EEG Research Associate (Data Analysis) > > > > Think Now Inc. has a Research Associate opening for an EEG data analyst > for 2 NIH-funded studies being conducted with UCLA on the > neurophysiological bases of sustained attention, its deficits in ADHD and > the effects of computerized brain training. We are seeking candidates with > direct hands-on experience in EEG data analysis. MatLab programming skills > are required. We prefer strongly self-directed individuals to take on this > work. > > > > The successful candidate will report directly to Gregory V. Simpson, > Ph.D., Chief Scientific Officer of Think Now and will collaborate with Mark > Cohen, Ph.D., Agatha Lenartowicz, Ph.D. and the team at UCLA. Think Now is > located in San Francisco, so the successful candidate can be located in > either San Francisco or Los Angeles. > > > > Think Now is creating EEG and mobile-app based solutions for the diagnosis > and amelioration of neurological disorders with a focus on attention and > its control. Please send your CV and a description of your prior > experience with EEG data analysis and MatLab to *jobs at think-now.com > *. > > > Gregory V. Simpson, Ph.D. > Founder & CSO > Think Now, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From giulia.rizza at tiscali.it Thu Jul 3 10:41:52 2014 From: giulia.rizza at tiscali.it (giulia.rizza at tiscali.it) Date: Thu, 03 Jul 2014 10:41:52 +0200 Subject: [FieldTrip] Fw: Call for Application Prospective Ph.D. Students Message-ID: <52c2358f49dd84c58551e90fbd2d0c4a@tiscali.it> Dear FieldTrip users I would like to announce this opportunity for an international PhD in PSYCHOLOGY AND SOCIAL NEUROSCIENCE IN ITALY (Rome and Udine) Feel free to share this information with people could be interested. Thanks for your attention Giulia 2014-07-03 10:23 GMT+02:00 Maria Serena Panasiti : > CALL FOR APPLICATION FOR PROSPECTIVE PH.D. STUDENTS > > Code: 16167 - PSYCHOLOGY AND SOCIAL NEUROSCIENCE > > curriculum in COGNITIVE SOCIAL AND AFFECTIVE NEUROSCIENCES (COSAN) > > WHAT: > > Four three-year funded PHD POSITIONS IN COGNITIVE, SOCIAL AND AFFECTIVE NEUROSCIENCE (COSAN) program (http://www.cosanphd.com/ [1]) > > WHO: HIGH-MOTIVATED APPLICANTS WITH A STRONG INTEREST IN SYSTEMS NEUROSCIENCE AND HIGHER ORDER COGNITIVE FUNCTIONS ARE ENCOURAGED TO APPLY. > > Applications are invited from candidates who: > > v hold an Italian diploma di laurea / laurea specialistica / laurea magistrale, or an equivalent second-level degree (generally equivalent to a Master's Degree) obtained abroad > > v expect to receive their degree award by October 31, 2014 > > WHERE: > > v DEPARTMENT OF PSYCHOLOGY, SAPIENZA UNIVERSITY OF ROME http://dippsi.psi.uniroma1.it [2] > > v IRCCS FONDAZIONE SANTA LUCIA, Rome http://www.hsantalucia.it [3] > > SUPERVISOR: > > PROF. SALVATORE MARIA AGLIOTI, Director of the Social and Cognitive Neuroscience Laboratory, Sapienza University of Rome http://agliotilab.org/ [4] > > STIPEND: > > EURO 13.638,47 PER YEAR > > RESEARCH TOPICS: > > Neural correlates of cognitive, social and affective processes including: > > v Empathy > > v Intention, action and emotion understanding > > v Joint attention and joint action. > > v Intergroup processing, stereotype and prejudice. > > v Body awareness and Self-Other distinction > > v Social decision making > > v Virtual reality and Brain control of artificial agents > > v Existential neuroscience > > RESEARCH TECHNIQUES: > > v Electroencephalography (EEG), including: > > o Somatosensory Evoked Potentials (SEP) > > o Laser Evoked Potentials (LEP) > > v Transcranial Magnetic Stimulation (TMS) > > v transcranial Direct Current Stimulation (tDCS) > > v infrared Eye-tracking and Motion-tracking > > v Thermal Imaging > > v Lesion Mapping analysis > > v CAVE -Virtual Reality > > v fMRI. > > HOW: Admission is based on an evaluation of the skills and aptitude of the candidate, and the selection procedure includes two steps: > > Phase 1. Evaluation of qualifications > > Phase 2. On site (or video-conference) interview > > WHEN: > > APPLICATION DEADLINE: 01/08/2013 11:59 11.59 PM CET HOW TO APPLY: > See http://www.cosanphd.com/ [5] and http://www.uniroma1.it/sites/default/files/call%20for%20application_30_0.pdf [6] > > PHASE 1. The outcome of the evaluation will be published by 16/09/2014. > > Phase 2. On site interviews will start from 29/09/2014 09:00 AM at the Department of Psychology. It is POSSIBLE, following motivated requests, to conduct Phase 2 interview using VIDEO-CONFERENCING facilities. > > INFO: > > http://www.cosanphd.com/ [7] > > http://agliotilab.org/ [8] > > http://www.uniroma1.it/sites/default/files/call%20for%20application_30_0.pdf [9] > > http://www.uniroma1.it/sites/default/files/Annex%20A_2.pdf [10] > > CONTACT INFO: > > Paola Trussardi (organizational manager) - paola.trussardi at uniroma1.it [11] (administrative requests) > > Salvatore M. Aglioti - salvatoremaria.aglioti at uniroma1.it [12] (scientific requests) -- > Maria Serena Panasiti, Ph.D > > Cognitive Social and Affective Neuroscience Lab > Department of Psychology. > University of Rome "La Sapienza". > Via dei Marsi 78 - 00185 - Roma. > Phone: (+39) 06-49917635 [13]. Fax: (+39) 06-49917635 [14] > > School of Psychology & Clinical Language Sciences > University of Reading > Reading, United Kingdom Scopri istella, il nuovo motore per il web italiano. Istella garantisce risultati di qualità e la possibilità di condividere, in modo semplice e veloce, documenti, immagini, audio e video. Usa istella, vai su http://www.istella.it?wtk=amc138614816829636 -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Thu Jul 3 12:14:13 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Thu, 3 Jul 2014 03:14:13 -0700 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates Message-ID: <1404382453.26194.YahooMailNeo@web124905.mail.ne1.yahoo.com> Dear fieldtrip experts, Im trying to do source localization for simulated EEG data, for this I followed the tutorial in page: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate I was trying to use the mri image provided by fieldtrip (Subject01.mri) and EEG template (standard_1020.elc) in my work. The mri image need to be re-aliened to the Talairach space for coregistration with EEG space. In the tutorial you use (ft_volumerealien) to do that using interactive method. I have two questions: First, how can I do the coregistration using fixed coordinates of the 3 fiducials (nasion, left pr, right pr), in other words how can I get the coordinates of the fiducials in both Talairach and EEG spaces to do the coregistration using the script only not manually. Second, I tried to use the mri image provided by the spm toolbox because its already aliened to Talairach space, but when I try to do segmentation I get error that coordinates field does not exist: ??? Reference to non-existent field 'coordsys'. Error in ==> ft_volumesegment at 284   original.coordsys  = mri.coordsys; Error in ==> segmentation_spm_mri at 24 seg           = ft_volumesegment(cfg, mrirs); I read the image using (ft_read_mri) function, I don't find the field specified for the coordinates: disp(mri)           dim: [177 240 256]       anatomy: [177x240x256 double]           hdr: [1x1 struct]     transform: [4x4 double]          unit: 'mm' How can I solve this problem so I can use the mri image in SPM for further analysing in fieldtrip? Sorry for the long email I would be thankful for any help. Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From akiko.ikkai at gmail.com Thu Jul 3 20:11:44 2014 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Thu, 3 Jul 2014 14:11:44 -0400 Subject: [FieldTrip] error message when using dml.crossvalidator with "resample" option Message-ID: Dear Fieldtrippers, I'm trying to run a multivariate analysis to see if my data could classify trial types correctly. I'd like to use 'resample' option in dml.crossvalidator, since number of trials are sometimes quite different between trial types. When I feed in cfg.mva (at the end of this message), I get an error message: "No appropriate method, property, or field test for class dml.crossvalidator. Error in dml.analysis/test (line 65) Y = obj.method{c}.test(Y); Error in dml.crossvalidator/train (line 159) obj.result{f} = tproc.test(testX);" I think it's because the inputs to dml.crossvalidator are not properly entered. Could someone suggest a good way to format the inputs? Here is what I'm running: cfg=[]; % perform classification on the two TFRs cfg.channel = 'Fp1'; cfg.frequency = [4 8]; cfg.latency = [.4 4.6]; cfg.method='crossvalidate'; cfg.design=[ones(size(TFRcond1.powspctrm,1), 1); 2.*ones(size(TFRcond2.powspctrm,1), 1)]'; cfg.statistic = {'accuracy' 'binomial' 'contingency'}; cfg.mva = dml.crossvalidator('mva',{dml.standardizer() dml.svm()},'resample',true); stat=ft_freqstatistics(cfg, TFRcond1, TFRcond2); Thanks in advance! Akiko -- Akiko Ikkai, Ph.D. -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Fri Jul 4 08:23:28 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Thu, 3 Jul 2014 23:23:28 -0700 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates Message-ID: <1404455008.12862.YahooMailNeo@web124903.mail.ne1.yahoo.com> Dear fieldtrip experts, Im trying to do source localization for simulated EEG data, for this I followed the tutorial in page: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate I was trying to use the mri image provided by fieldtrip (Subject01.mri) and EEG template (standard_1020.elc) in my work. The mri image need to be re-aliened to the Talairach space for coregistration with EEG space. In the tutorial you use (ft_volumerealien) to do that using interactive method. I have two questions: First, how can I do the coregistration using fixed coordinates of the 3 fiducials (nasion, left pr, right pr), in other words how can I get the coordinates of the fiducials in both Talairach and EEG spaces to do the coregistration using the script only not manually. Second, I tried to use the mri image provided by the spm toolbox because its already aliened to Talairach space, but when I try to do segmentation I get error that coordinates field does not exist: ??? Reference to non-existent field 'coordsys'. Error in ==> ft_volumesegment at 284   original.coordsys  = mri.coordsys; Error in ==> segmentation_spm_mri at 24 seg           = ft_volumesegment(cfg, mrirs); I read the image using (ft_read_mri) function, I don't find the field specified for the coordinates: disp(mri)           dim: [177 240 256]       anatomy: [177x240x256 double]           hdr: [1x1 struct]     transform: [4x4 double]          unit: 'mm' How can I solve this problem so I can use the mri image in SPM for further analysing in fieldtrip? Sorry for the long email I would be thankful for any help. Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Fri Jul 4 08:35:25 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Thu, 3 Jul 2014 23:35:25 -0700 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates Message-ID: <1404455725.61933.YahooMailNeo@web124901.mail.ne1.yahoo.com> Dear fieldtrip experts, Im trying to do source localization for simulated EEG data, for this I followed the tutorial in page: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate I was trying to use the mri image provided by fieldtrip (Subject01.mri) and EEG template (standard_1020.elc) in my work. The mri image need to be re-aliened to the Talairach space for coregistration with EEG space. In the tutorial you use (ft_volumerealien) to do that using interactive method. I have two questions: First, how can I do the coregistration using fixed coordinates of the 3 fiducials (nasion, left pr, right pr), in other words how can I get the coordinates of the fiducials in both Talairach and EEG spaces to do the coregistration using the script only not manually. Second, I tried to use the mri image provided by the spm toolbox because its already aliened to Talairach space, but when I try to do segmentation I get error that coordinates field does not exist: ??? Reference to non-existent field 'coordsys'. Error in ==> ft_volumesegment at 284   original.coordsys  = mri.coordsys; Error in ==> segmentation_spm_mri at 24 seg           = ft_volumesegment(cfg, mrirs); I read the image using (ft_read_mri) function, I don't find the field specified for the coordinates: disp(mri)           dim: [177 240 256]       anatomy: [177x240x256 double]           hdr: [1x1 struct]     transform: [4x4 double]          unit: 'mm' How can I solve this problem so I can use the mri image in SPM for further analysing in fieldtrip? Sorry for the long email I would be thankful for any help. Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Fri Jul 4 08:50:38 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Thu, 3 Jul 2014 23:50:38 -0700 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates Message-ID: <1404456638.56273.YahooMailNeo@web124904.mail.ne1.yahoo.com> Dear fieldtrip experts, Im trying to do source localization for simulated EEG data, for this I followed the tutorial in page: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate I was trying to use the mri image provided by fieldtrip (Subject01.mri) and EEG template (standard_1020.elc) in my work. The mri image need to be re-aliened to the Talairach space for coregistration with EEG space. In the tutorial you use (ft_volumerealien) to do that using interactive method. I have two questions: First, how can I do the coregistration using fixed coordinates of the 3 fiducials (nasion, left pr, right pr), in other words how can I get the coordinates of the fiducials in both Talairach and EEG spaces to do the coregistration using the script only not manually. Second, I tried to use the mri image provided by the spm toolbox because its already aliened to Talairach space, but when I try to do segmentation I get error that coordinates field does not exist: ??? Reference to non-existent field 'coordsys'. Error in ==> ft_volumesegment at 284   original.coordsys  = mri.coordsys; Error in ==> segmentation_spm_mri at 24 seg           = ft_volumesegment(cfg, mrirs); I read the image using (ft_read_mri) function, I don't find the field specified for the coordinates: disp(mri)           dim: [177 240 256]       anatomy: [177x240x256 double]           hdr: [1x1 struct]     transform: [4x4 double]          unit: 'mm' How can I solve this problem so I can use the mri image in SPM for further analysing in fieldtrip? Sorry for the long email I would be thankful for any help. Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Jul 4 09:31:07 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 4 Jul 2014 09:31:07 +0200 Subject: [FieldTrip] error message when using dml.crossvalidator with "resample" option In-Reply-To: References: Message-ID: Dear Akiko, You should not specify an instance of dml.crossvalidator as the cfg.mva. Instead, ft_statistics_crossvalidate (which is called by timelock/freqstatistics) will construct its own dml.crossvalidator, wrapping whichever analysis you specify in cfg.mva. So, in your case, this would result in a crossvalidator wrapping another crossvalidator, leading to the error (since crossvalidator does not specify a test() function). Considering this problem, it used to be impossible to specify resample=true when using dml with FieldTrip. However, I have just committed a minor change to the code which allows you to specify cfg.resample = true/false in the call to ft_freq/timelockstatistics. So in your case you would specify: cfg.mva = {dml.standardizer() dml.svm()}; cfg.resample = true; The change is available on SVN and will be in tonight's FTP release. Best, Eelke On 3 July 2014 20:11, Akiko Ikkai wrote: > Dear Fieldtrippers, > > I'm trying to run a multivariate analysis to see if my data could classify > trial types correctly. I'd like to use 'resample' option in > dml.crossvalidator, since number of trials are sometimes quite different > between trial types. > > When I feed in cfg.mva (at the end of this message), I get an error message: > "No appropriate method, property, or field test for class > dml.crossvalidator. > > Error in dml.analysis/test (line 65) > Y = obj.method{c}.test(Y); > > Error in dml.crossvalidator/train (line 159) > obj.result{f} = tproc.test(testX);" > > > I think it's because the inputs to dml.crossvalidator are not properly > entered. Could someone suggest a good way to format the inputs? > > Here is what I'm running: > cfg=[]; % perform classification on the two TFRs > cfg.channel = 'Fp1'; > cfg.frequency = [4 8]; > cfg.latency = [.4 4.6]; > cfg.method='crossvalidate'; > cfg.design=[ones(size(TFRcond1.powspctrm,1), 1); > 2.*ones(size(TFRcond2.powspctrm,1), 1)]'; > cfg.statistic = {'accuracy' 'binomial' 'contingency'}; > cfg.mva = dml.crossvalidator('mva',{dml.standardizer() > dml.svm()},'resample',true); > stat=ft_freqstatistics(cfg, TFRcond1, TFRcond2); > > Thanks in advance! > Akiko > > -- > Akiko Ikkai, Ph.D. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tyler.grummett at flinders.edu.au Sat Jul 5 14:40:00 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Sat, 5 Jul 2014 12:40:00 +0000 Subject: [FieldTrip] possible bug: ft_sensorrealign Message-ID: <1404563999389.99277@flinders.edu.au> Hello fieldtrip, I just wanted to report a potential bug, I dont know whether it is a bug or if I am using it incorrectly. On line 323 to 329 of ft_sensorrealign is the following code: ft_plot_sens(elec, 'r*'); % plot all electrodes after warping ft_plot_sens(norm, 'm.', 'label', 'label'); % plot the template electrode locations ft_plot_sens(average, 'b.'); It throws the error: Error using ft_getopt the first input should contain key-value pairs Error in ft_plot_sens (line 47) style = ft_getopt(varargin, 'style', 'k.'); I think it should be: ?ft_plot_sens(elec, 'style', 'r*'); % plot all electrodes after warping ft_plot_sens(norm, 'style', 'm.', 'label', 'label'); % plot the template electrode locations ft_plot_sens(average, 'style', 'b.'); Hopefully this helps, Kind regards, Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Sun Jul 6 10:43:42 2014 From: a.stolk at fcdonders.ru.nl (Stolk, A. (Arjen)) Date: Sun, 6 Jul 2014 10:43:42 +0200 (CEST) Subject: [FieldTrip] Symposium : Towards a neuroscience of mutual understanding In-Reply-To: <732740966.7786680.1404636012987.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1118228088.7786691.1404636222882.JavaMail.root@sculptor.zimbra.ru.nl> Dear all, Here's a symposium I'd like to advertise. For program and registration, see: http://www.ru.nl/donders/agenda-news/symposium-towards/ Yours, Arjen Symposium : Towards a neuroscience of mutual understanding When : 1 September 2014 Where : Max Planck Institute for Psycholinguistics, Wundtlaan 1, Nijmegen, The Netherlands Organizers: Arjen Stolk, Peter Hagoort, and Ivan Toni Human sociality is built on our capacity for mutual understanding, but the principles and mechanisms of this capacity remain poorly understood. Progress might be limited because it is hard to capture the flexibility of mutual understanding with controlled experiments. More importantly, progress might also be limited because the mechanisms of mutual understanding lie in an interdisciplinary no-man’s land, with several theories pulling partial empirical observations in quite different directions. This symposium is concerned with bridging this interdisciplinary gap, fostering interactions between theoretical and experimental approaches on mutual understanding during human social interactions. The discussion will focus on mechanisms of mutual understanding, studied at different levels of organization, from cognitive systems to neuronal ensembles. -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From mahjoory86 at gmail.com Sun Jul 6 18:49:30 2014 From: mahjoory86 at gmail.com (Keyvan Mahjoory) Date: Sun, 6 Jul 2014 18:49:30 +0200 Subject: [FieldTrip] Remove Cerebellum Message-ID: Dear All, I've used standard_mri and standard_bem and I want to exclude cerebellum for source analysis. How can I do that? Best, Keyvan -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.chella at unich.it Mon Jul 7 11:34:57 2014 From: f.chella at unich.it (f.chella at unich.it) Date: Mon, 07 Jul 2014 11:34:57 +0200 Subject: [FieldTrip] Error while using ft_sensorrealign Message-ID: <20140707113457.373753g7giltvkch@webmail.unich.it> Hi everyone, I am getting an error when I use ft_sensorrealign to align my MEG sensor (i.e., ITAB MEG sensor) with the subject mri using fiducials. Below is the code I am using. I first specified the fiducial location in the sensor space in the field sens.fid: sens.fid.pnt(1,:) = [0 101.5 0] ; sens.fid.pnt(2,:) = [-69.9 -0.6 0.8]; sens.fid.pnt(3,:) = [69.9 0.6 -0.8]; sens.fid.label{1} = 'nasion'; sens.fid.label{2} = 'left'; sens.fid.label{3} = 'right'; and then I called ft_sensorrealign: cfg = []; cfg.method = 'fiducial'; cfg.fiducial = {'nasion', 'left', 'right'}; cfg.target.pnt(1,:) = [-0.5 86.5 -15.5]; cfg.target.pnt(2,:) = [-73.5 -7.5 -43.5]; cfg.target.pnt(3,:) = [69.5 -16.5 -44.5]; cfg.target.label = {'nasion', 'left', 'right'}; sens_realigned = ft_sensorrealign(cfg,sens); Now, I get the following error: ??? Subscripted assignment between dissimilar structures. Error in ==> ft_sensorrealign at 235 tmp(i) = ft_convert_units(template(i), elec.unit); % ensure that the units are consistent with the electrodes Does anyone know why this would be occurring and how to fix it? Thanks in advance for the help. Federico Chella, Ph.D. Dept. of Neuroscience, Imaging and Clinical Sciences ITAB ? Institute for advanced Biomedical Technologies ?G. d'Annunzio? University of Chieti-Pescara, Chieti, Italy From eelke.spaak at donders.ru.nl Mon Jul 7 11:49:15 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 7 Jul 2014 11:49:15 +0200 Subject: [FieldTrip] Error while using ft_sensorrealign In-Reply-To: <20140707113457.373753g7giltvkch@webmail.unich.it> References: <20140707113457.373753g7giltvkch@webmail.unich.it> Message-ID: Hi Federico, No idea whether this matters (haven't tested it), but perhaps the error is due to sens.fid.label being a column cell array (3x1) and cfg.target.label being a row (1x3)? Best, Eelke Op 7 jul. 2014 11:38 schreef : > Hi everyone, > > I am getting an error when I use ft_sensorrealign to align my MEG sensor > (i.e., ITAB MEG sensor) with the subject mri using fiducials. > > Below is the code I am using. > I first specified the fiducial location in the sensor space in the field > sens.fid: > sens.fid.pnt(1,:) = [0 101.5 0] ; > sens.fid.pnt(2,:) = [-69.9 -0.6 0.8]; > sens.fid.pnt(3,:) = [69.9 0.6 -0.8]; > sens.fid.label{1} = 'nasion'; > sens.fid.label{2} = 'left'; > sens.fid.label{3} = 'right'; > > and then I called ft_sensorrealign: > cfg = []; > cfg.method = 'fiducial'; > cfg.fiducial = {'nasion', 'left', 'right'}; > cfg.target.pnt(1,:) = [-0.5 86.5 -15.5]; > cfg.target.pnt(2,:) = [-73.5 -7.5 -43.5]; > cfg.target.pnt(3,:) = [69.5 -16.5 -44.5]; > cfg.target.label = {'nasion', 'left', 'right'}; > sens_realigned = ft_sensorrealign(cfg,sens); > > Now, I get the following error: > > ??? Subscripted assignment between dissimilar structures. > Error in ==> ft_sensorrealign at 235 > tmp(i) = ft_convert_units(template(i), elec.unit); % ensure that the > units are consistent with the electrodes > > Does anyone know why this would be occurring and how to fix it? > Thanks in advance for the help. > > > Federico Chella, Ph.D. > Dept. of Neuroscience, Imaging and Clinical Sciences > ITAB ? Institute for advanced Biomedical Technologies > ?G. d'Annunzio? University of Chieti-Pescara, Chieti, Italy > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.chella at unich.it Mon Jul 7 12:11:32 2014 From: f.chella at unich.it (f.chella at unich.it) Date: Mon, 07 Jul 2014 12:11:32 +0200 Subject: [FieldTrip] Error while using ft_sensorrealign In-Reply-To: References: <20140707113457.373753g7giltvkch@webmail.unich.it> Message-ID: <20140707121132.106815j962reywd0@webmail.unich.it> Hi Eelke, thanks for pointing out this oversight, but it seems not to depend on that. Now, I specified both as column cell array (3x1). However, the error is still occurring. Federico Def. Quota Eelke Spaak : > Hi Federico, > > No idea whether this matters (haven't tested it), but perhaps the error is > due to sens.fid.label being a column cell array (3x1) and cfg.target.label > being a row (1x3)? > > Best, > Eelke > Op 7 jul. 2014 11:38 schreef : > >> Hi everyone, >> >> I am getting an error when I use ft_sensorrealign to align my MEG sensor >> (i.e., ITAB MEG sensor) with the subject mri using fiducials. >> >> Below is the code I am using. >> I first specified the fiducial location in the sensor space in the field >> sens.fid: >> sens.fid.pnt(1,:) = [0 101.5 0] ; >> sens.fid.pnt(2,:) = [-69.9 -0.6 0.8]; >> sens.fid.pnt(3,:) = [69.9 0.6 -0.8]; >> sens.fid.label{1} = 'nasion'; >> sens.fid.label{2} = 'left'; >> sens.fid.label{3} = 'right'; >> >> and then I called ft_sensorrealign: >> cfg = []; >> cfg.method = 'fiducial'; >> cfg.fiducial = {'nasion', 'left', 'right'}; >> cfg.target.pnt(1,:) = [-0.5 86.5 -15.5]; >> cfg.target.pnt(2,:) = [-73.5 -7.5 -43.5]; >> cfg.target.pnt(3,:) = [69.5 -16.5 -44.5]; >> cfg.target.label = {'nasion', 'left', 'right'}; >> sens_realigned = ft_sensorrealign(cfg,sens); >> >> Now, I get the following error: >> >> ??? Subscripted assignment between dissimilar structures. >> Error in ==> ft_sensorrealign at 235 >> tmp(i) = ft_convert_units(template(i), elec.unit); % ensure that the >> units are consistent with the electrodes >> >> Does anyone know why this would be occurring and how to fix it? >> Thanks in advance for the help. >> >> >> Federico Chella, Ph.D. >> Dept. of Neuroscience, Imaging and Clinical Sciences >> ITAB ? Institute for advanced Biomedical Technologies >> ?G. d'Annunzio? University of Chieti-Pescara, Chieti, Italy >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > From jm.horschig at donders.ru.nl Mon Jul 7 14:12:05 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 07 Jul 2014 14:12:05 +0200 Subject: [FieldTrip] Error while using ft_sensorrealign In-Reply-To: <20140707121132.106815j962reywd0@webmail.unich.it> References: <20140707113457.373753g7giltvkch@webmail.unich.it> <20140707121132.106815j962reywd0@webmail.unich.it> Message-ID: <53BA8E95.1020304@donders.ru.nl> Hey, maybe we should look at that function more closely. Tyler Grummett also reported an issue with ft_sensorrealign a few days back, when specifying cfg.target as a file. His error was related to a missing field template.pnt. This could be since we recently changed the sensor-structures to contain .chanpos instead of .pnt. Here, I could imagine that the existence of template.pnt and absence of template.chanpos and .elecpos are also part of this problem. Best, Jörn On 7/7/2014 12:11 PM, f.chella at unich.it wrote: > Hi Eelke, > thanks for pointing out this oversight, but it seems not to depend on > that. > > Now, I specified both as column cell array (3x1). > However, the error is still occurring. > > Federico > > > > Def. Quota Eelke Spaak : > >> Hi Federico, >> >> No idea whether this matters (haven't tested it), but perhaps the >> error is >> due to sens.fid.label being a column cell array (3x1) and >> cfg.target.label >> being a row (1x3)? >> >> Best, >> Eelke >> Op 7 jul. 2014 11:38 schreef : >> >>> Hi everyone, >>> >>> I am getting an error when I use ft_sensorrealign to align my MEG >>> sensor >>> (i.e., ITAB MEG sensor) with the subject mri using fiducials. >>> >>> Below is the code I am using. >>> I first specified the fiducial location in the sensor space in the >>> field >>> sens.fid: >>> sens.fid.pnt(1,:) = [0 101.5 0] ; >>> sens.fid.pnt(2,:) = [-69.9 -0.6 0.8]; >>> sens.fid.pnt(3,:) = [69.9 0.6 -0.8]; >>> sens.fid.label{1} = 'nasion'; >>> sens.fid.label{2} = 'left'; >>> sens.fid.label{3} = 'right'; >>> >>> and then I called ft_sensorrealign: >>> cfg = []; >>> cfg.method = 'fiducial'; >>> cfg.fiducial = {'nasion', 'left', 'right'}; >>> cfg.target.pnt(1,:) = [-0.5 86.5 -15.5]; >>> cfg.target.pnt(2,:) = [-73.5 -7.5 -43.5]; >>> cfg.target.pnt(3,:) = [69.5 -16.5 -44.5]; >>> cfg.target.label = {'nasion', 'left', 'right'}; >>> sens_realigned = ft_sensorrealign(cfg,sens); >>> >>> Now, I get the following error: >>> >>> ??? Subscripted assignment between dissimilar structures. >>> Error in ==> ft_sensorrealign at 235 >>> tmp(i) = ft_convert_units(template(i), elec.unit); % ensure >>> that the >>> units are consistent with the electrodes >>> >>> Does anyone know why this would be occurring and how to fix it? >>> Thanks in advance for the help. >>> >>> >>> Federico Chella, Ph.D. >>> Dept. of Neuroscience, Imaging and Clinical Sciences >>> ITAB ? Institute for advanced Biomedical Technologies >>> ?G. d'Annunzio? University of Chieti-Pescara, Chieti, Italy >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From ctesche at unm.edu Tue Jul 8 03:44:49 2014 From: ctesche at unm.edu (Claudia Tesche) Date: Tue, 8 Jul 2014 01:44:49 +0000 Subject: [FieldTrip] Remove Cerebellum In-Reply-To: References: Message-ID: <1404783893509.40104@unm.edu> ?Dear Keyvan Why? Best, Claudia ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Keyvan Mahjoory Sent: Sunday, July 06, 2014 10:49 AM To: FieldTrip discussion list Subject: [FieldTrip] Remove Cerebellum Dear All, I've used standard_mri and standard_bem and I want to exclude cerebellum for source analysis. How can I do that? Best, Keyvan -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Tue Jul 8 06:44:54 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Mon, 7 Jul 2014 21:44:54 -0700 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates Message-ID: <1404794694.74187.YahooMailNeo@web124901.mail.ne1.yahoo.com> Dear fieldtrip experts, Im trying to do source localization for simulated EEG data, for this I followed the tutorial in page: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate I was trying to use the mri image provided by fieldtrip (Subject01.mri) and EEG template (standard_1020.elc) in my work. The mri image need to be re-aliened to the Talairach space for coregistration with EEG space. In the tutorial you use (ft_volumerealien) to do that using interactive method. I have two questions: First, how can I do the coregistration using fixed coordinates of the 3 fiducials (nasion, left pr, right pr), in other words how can I get the coordinates of the fiducials in both Talairach and EEG spaces to do the coregistration using the script only not manually. Second, I tried to use the mri image provided by the spm toolbox because its already aliened to Talairach space, but when I try to do segmentation I get error that coordinates field does not exist: ??? Reference to non-existent field 'coordsys'. Error in ==> ft_volumesegment at 284   original.coordsys  = mri.coordsys; Error in ==> segmentation_spm_mri at 24 seg           = ft_volumesegment(cfg, mrirs); I read the image using (ft_read_mri) function, I don't find the field specified for the coordinates: disp(mri)           dim: [177 240 256]       anatomy: [177x240x256 double]           hdr: [1x1 struct]     transform: [4x4 double]          unit: 'mm' How can I solve this problem so I can use the mri image in SPM for further analysing in fieldtrip? Sorry for the long email I would be thankful for any help. Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Jul 8 10:00:07 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 08 Jul 2014 10:00:07 +0200 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates In-Reply-To: <1404794694.74187.YahooMailNeo@web124901.mail.ne1.yahoo.com> References: <1404794694.74187.YahooMailNeo@web124901.mail.ne1.yahoo.com> Message-ID: <53BBA507.8060402@donders.ru.nl> Hi Rasha, you can call ft_determine_coordsys, or set the field manually if you what coordinate system the MRI is in. You could have also used the search function of the fieldtrip wiki (on the upper right on the page), e.g. by searching for coordinate system: http://fieldtrip.fcdonders.nl/?do=search&id=coordinate+system This leads to a page that lists all pages on which the term coordinate system occur. You can see that the first match links to a FAQ, which also hints to ft_determine_coordsys. FAQs can also be found when navigating to "User documentation" and then "Frequently asked questions". We spent quite some time to list a number of questions and detailled answers there. The answers are mostly more extensive than the question alone, so any question that might be remotely related to your actual question might be of interest there. However, please don't be afraid to ask any further questions, just notice that we're all doing this here besides our research, so sometimes it might take a bit longer for us to respond than within a few hours. Any search that you do in advance on the FT wiki is time that we do not have to spend ;) So, please don't send the same message five times within not even a week, once a week should be enough ;) Best, Jörn On 7/8/2014 6:44 AM, Rasha Haider wrote: > Dear fieldtrip experts, > Im trying to do source localization for simulated EEG data, for this I > followed the tutorial in page: > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate > > I was trying to use the mri image provided by fieldtrip > (Subject01.mri) and EEG template (standard_1020.elc) in my work. > The mri image need to be re-aliened to the Talairach space for > coregistration with EEG space. In the tutorial you use > (ft_volumerealien) to do that using interactive method. > I have two questions: > > First, how can I do the coregistration using fixed coordinates of the > 3 fiducials (nasion, left pr, right pr), in other words how can I get > the coordinates of the fiducials in both Talairach and EEG spaces to > do the coregistration using the script only not manually. > > Second, I tried to use the mri image provided by the spm toolbox > because its already aliened to Talairach space, but when I try to do > segmentation I get error that coordinates field does not exist: > > ??? Reference to non-existent field 'coordsys'. > > Error in ==> ft_volumesegment at 284 > original.coordsys = mri.coordsys; > > Error in ==> segmentation_spm_mri at 24 > seg = ft_volumesegment(cfg, mrirs); > > I read the image using (ft_read_mri) function, I don't find the field > specified for the coordinates: > > disp(mri) > dim: [177 240 256] > anatomy: [177x240x256 double] > hdr: [1x1 struct] > transform: [4x4 double] > unit: 'mm' > > How can I solve this problem so I can use the mri image in SPM for > further analysing in fieldtrip? > > Sorry for the long email I would be thankful for any help. > Regards > Rasha > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From r.oostenveld at donders.ru.nl Tue Jul 8 17:41:24 2014 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 8 Jul 2014 17:41:24 +0200 Subject: [FieldTrip] Fwd: Job opening: 7 PhD positions in Dutch Research Consortium "Language in Interaction" References: <787977264.3752891.1404822317386.JavaMail.root@draco.zimbra.ru.nl> Message-ID: Begin forwarded message: > From: "Lorenz, C.M." > Subject: Job opening: 7 PhD positions in Dutch Research Consortium "Language in Interaction" > > Seven PhD Positions in the Dutch Research Consortium 'Language in Interaction' > > > Closing date: 30 September 2014 > For more information: http://www.languageininteraction.nl/jobs/id-2nd-phd-call-general.html > > We are looking for highly motivated PhD candidates to enrich a unique consortium of researchers that aims to unravel the neurocognitive mechanisms of language at multiple levels. The goal is to understand both the universality and the variability of the human language faculty from genes to behaviour. > > The Netherlands has an outstanding track record in the language sciences. This research consortium sponsored by a large grant from the Netherlands Organization for Scientific research (NWO) brings together many of the excellent research groups in the Netherlands with a research programme on the foundations of language. The research team consists of 43 Principal Investigators. In addition to the excellence in the domain of language and related relevant fields of cognition, our consortium provides state-of-the-art research facilities and a research team with ample experience in the complex research methods that will be invoked to address the scientific questions at the highest level of methodological sophistication. These include methods from genetics, neuroimaging, computational modelling, and patient-related research. This consortium realizes both quality and critical mass for studying human language at a scale not easily found anywhere else. > > Currently, the consortium advertises seven PhD positions for a period of 4 years. Depending on the PhD position applied for, candidates will be appointed at one of the home institutions of the consortium. These positions provide the opportunity for conducting world-class research as a member of an interdisciplinary team. > > Click for more information on the PhD positions and how to apply: > http://www.languageininteraction.nl/jobs/id-2nd-phd-call-general.html > > > Carolin Lorenz > Secretary - Language in Interaction Consortium > Radboud University | Donders Centre for Cognitive Neuroimaging (DCCN) | room 0.78 > Kapittelweg 29, 6525 EN Nijmegen, The Netherlands | P.O. Box 9101, 6500 HB, Nijmegen, The Netherlands | > T: +31 (0)24 3666272 | E: C.Lorenz at donders.ru.nl| Office hours: 8.30-14 hr on Mon, Tue, Thur, Fri -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Wed Jul 9 01:49:06 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Tue, 8 Jul 2014 23:49:06 +0000 Subject: [FieldTrip] Problems with Scalp Model Message-ID: <238FF095-5F42-491C-8B2F-1C552E6A7CE3@dartmouth.edu> Hello, I am trying to produce the volume conduction model of some MRI data that I have, and I am having a problem with the production of the Scalp Model (Attached Below). I believe the problem may be stemming from the segmentation process, but I am not completely sure. Is there any option that will allow me to get rid of the extraneous figures in the scalp model? Help is greatly appreciated. Isaiah Smith -------------- next part -------------- A non-text attachment was scrubbed... Name: Scalp FieldTrip Model .fig Type: application/x-matlab-figure Size: 15139 bytes Desc: Scalp FieldTrip Model .fig URL: From haiderrasha at yahoo.com Wed Jul 9 07:59:44 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Tue, 8 Jul 2014 22:59:44 -0700 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates In-Reply-To: <53BBA507.8060402@donders.ru.nl> References: <1404794694.74187.YahooMailNeo@web124901.mail.ne1.yahoo.com> <53BBA507.8060402@donders.ru.nl> Message-ID: <1404885584.48607.YahooMailNeo@web124902.mail.ne1.yahoo.com> Dear Jörn, thank you for your reply, actually I didn't send many emails because I didn't receive any reply directly, the problem was that each time I sent the email I received a failure email mentioning that my email was not delivered so I had to resent it again. My apologies for this I don't know what was the problem. I will follow your advise hoping to get some results. Regards Rasha ________________________________ From: Jörn M. Horschig To: FieldTrip discussion list Sent: Tuesday, July 8, 2014 4:00 PM Subject: Re: [FieldTrip] Coregistration using fixed fiducials coordinates Hi Rasha, you can call ft_determine_coordsys, or set the field manually if you what coordinate system the MRI is in. You could have also used the search function of the fieldtrip wiki (on the upper right on the page), e.g. by searching for coordinate system: http://fieldtrip.fcdonders.nl/?do=search&id=coordinate+system This leads to a page that lists all pages on which the term coordinate system occur. You can see that the first match links to a FAQ, which also hints to ft_determine_coordsys. FAQs can also be found when navigating to "User documentation" and then "Frequently asked questions". We spent quite some time to list a number of questions and detailled answers there. The answers are mostly more extensive than the question alone, so any question that might be remotely related to your actual question might be of interest there. However, please don't be afraid to ask any further questions, just notice that we're all doing this here besides our research, so sometimes it might take a bit longer for us to respond than within a few hours. Any search that you do in advance on the FT wiki is time that we do not have to spend ;) So, please don't send the same message five times within not even a week, once a week should be enough ;) Best, Jörn On 7/8/2014 6:44 AM, Rasha Haider wrote: > Dear fieldtrip experts, > Im trying to do source localization for simulated EEG data, for this I > followed the tutorial in page: > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate > > I was trying to use the mri image provided by fieldtrip > (Subject01.mri) and EEG template (standard_1020.elc) in my work. > The mri image need to be re-aliened to the Talairach space for > coregistration with EEG space. In the tutorial you use > (ft_volumerealien) to do that using interactive method. > I have two questions: > > First, how can I do the coregistration using fixed coordinates of the > 3 fiducials (nasion, left pr, right pr), in other words how can I get > the coordinates of the fiducials in both Talairach and EEG spaces to > do the coregistration using the script only not manually. > > Second, I tried to use the mri image provided by the spm toolbox > because its already aliened to Talairach space, but when I try to do > segmentation I get error that coordinates field does not exist: > > ??? Reference to non-existent field 'coordsys'. > > Error in ==> ft_volumesegment at 284 >  original.coordsys  = mri.coordsys; > > Error in ==> segmentation_spm_mri at 24 > seg          = ft_volumesegment(cfg, mrirs); > > I read the image using (ft_read_mri) function, I don't find the field > specified for the coordinates: > > disp(mri) >          dim: [177 240 256] >      anatomy: [177x240x256 double] >          hdr: [1x1 struct] >    transform: [4x4 double] >          unit: 'mm' > > How can I solve this problem so I can use the mri image in SPM for > further analysing in fieldtrip? > > Sorry for the long email I would be thankful for any help. > Regards > Rasha > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel:    +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From elisa.filevich at gmail.com Wed Jul 9 10:23:49 2014 From: elisa.filevich at gmail.com (elisa filevich) Date: Wed, 9 Jul 2014 10:23:49 +0200 Subject: [FieldTrip] Deadline extended for Frontiers in Psychology research topic: Awareness of intentional processes and its relationship to theories of consciousness Message-ID: <59DF1A32-CA31-4918-BFBC-5BBF2D7732FC@gmail.com> Dear all, We have extended the deadline for submission of manuscripts to our Frontiers in Psychology Research Topic on Awareness of intentional processes and its relationship to theories of consciousness to the 31st of December, 2014. For more information see the following link, or the description below http://www.frontiersin.org/Consciousness_Research/researchtopics/Awareness_of_intentional_proce/2762 Best wishes Elisa Filevich ---------- Awareness of intentional processes and its relationship to theories of consciousness Stimuli present ‘in the world’, external to the brain, can elicit a direct neural response, and eventually access consciousness. Behavioral and neurophysiological experiments have used these external stimuli to build, test and refine theories of how conscious perception might occur. But perceptual processes are not the only ones capable of accessing consciousness. We can become aware of internally generated intentions, urges and emotional states. Importantly, these signals are ‘internally generated’ in the sense that they do not depend directly on afferent signals. Despite the strong parallelisms between the conscious perception of externally- and internally-generated information, theories of consciousness have rarely incorporated data from awareness of intentions. This is perhaps due to the difficulties in reliably manipulating internally generated processes. However, and for example, a growing body of data on topics such as awareness of agency, and metacognitive monitoring of intentions shows that research on the awareness of intentions is indeed possible. Importantly, each paradigm and method has specific strengths, and exploring multiple kinds of data can often lead to a rich span of competing theories to explain them. For example, subliminal priming experiments have been used to develop the Global Workspace theory, whilst tasks including subjective reports of awareness have informed Higher Order theories, and brain functional connectivity data have offered possible implementations for the Information Integration theory. Including the often-neglected conscious perception of internally generated processes may enrich, or strengthen, some of the existing theories of consciousness. We therefore welcome both theoretical and empirical contributions, in the hope to explore the feasibility of incorporating the awareness of internal processes into theories of consciousness. We encourage submissions reporting novel experimental paradigms that may help advance in this direction. Specifically, we ask whether this research program can offer any novel insights, or raise any new challenges, for theories of consciousness. --- Elisa Filevich Postdoctoral Fellow E-Mail: filevich at mpib-berlin.mpg.de http://www.mpib-berlin.mpg.de/de/mitarbeiter/elisa-filevich Max-Planck-Institut für Bildungsforschung Max Planck Institute for Human Development Lentzeallee 94 14195 Berlin -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 5443 bytes Desc: not available URL: From niccol000 at yahoo.it Wed Jul 9 16:35:57 2014 From: niccol000 at yahoo.it (=?iso-8859-1?Q?Niccol=C3=B2_Pescetelli?=) Date: Wed, 9 Jul 2014 15:35:57 +0100 Subject: [FieldTrip] Conflicting pca functions in Matlab and FT Message-ID: <1404916557.89645.YahooMailNeo@web171605.mail.ir2.yahoo.com> Hi! I just noted that fieldtrip has a function called pca.m to perform principal component analysis. The problem with this is that also the standard MATLAB toolbox contains a pca.m function to perform PCA, but the two functions are not compatible with each other and cause unwanted calls depending on the position in your search path. For example at the moment I want to use the MATLAB pca function to analyse behavioural data, but at some point I might need the FT pca one ot analyse MEG data. How can I fix this bug? I think changing the name to the function in FT is going to be risky Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Jul 9 16:45:18 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 9 Jul 2014 16:45:18 +0200 Subject: [FieldTrip] Conflicting pca functions in Matlab and FT In-Reply-To: <1404916557.89645.YahooMailNeo@web171605.mail.ir2.yahoo.com> References: <1404916557.89645.YahooMailNeo@web171605.mail.ir2.yahoo.com> Message-ID: Hi, To my knowledge, the only pca.m is included in /external/dmlt/external/murphy/. This is rarely used. The PCA analysis performed by ft_componentanalysis is implemented inline in that function (as it is a very straightforward algorithm). The /external/dmlt/ is, I believe, not added to the path by ft_defaults, so it should not conflict if you add FieldTrip to your path properly (i.e. by *not* using addpath(genpath( wrote: > Hi! > > I just noted that fieldtrip has a function called pca.m to perform principal > component analysis. > The problem with this is that also the standard MATLAB toolbox contains a > pca.m function to perform PCA, but the two functions are not compatible with > each other and cause unwanted calls depending on the position in your search > path. For example at the moment I want to use the MATLAB pca function to > analyse behavioural data, but at some point I might need the FT pca one ot > analyse MEG data. > > How can I fix this bug? I think changing the name to the function in FT is > going to be risky > > > Thanks! > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From marc.lalancette at sickkids.ca Wed Jul 9 17:50:42 2014 From: marc.lalancette at sickkids.ca (Marc Lalancette) Date: Wed, 9 Jul 2014 15:50:42 +0000 Subject: [FieldTrip] Beamformers: SAM vs LCMV vs LCMV fixedori Message-ID: <2A2B6A5B8C4C174CBCCE0B45E548DEB229F967A1@SKMBXX01.sickkids.ca> Hi Max, The formulae are different even when using LCMV with the same fixed orientation as the one found by SAM. For example, the power formulae, with hopefully clear enough notation (o is orientation vector), and assuming unit-gain weight normalization for simplicity: scalar: w(o)' R w(o) = 1 / [o' L' R^-1 L o] 1-d vector: o' W' R W o = o' [L' R^-1 L]^-1 o Of course, if using different software, there might also be differences in what weight normalization is used, how the data is filtered, whether or not a baseline or "DC offset" is subtracted, etc. Note of potential interest: I'm preparing a poster for Biomag with information on scalar and vector beamformers, with emphasis on the issue of rotational invariance since it is a common issue in the literature and in some software: that some formulae are not rotationally invariant, i.e. the results depend on how the coordinate system is defined/oriented. This is obviously not acceptable for any physically significant measure. Regarding Fieldtrip itself, the only such issue I found is the (mostly hidden, thus probably not typically used) option to normalize lead fields by column. Cheers, Marc Lalancette Lab Research Project Manager The Hospital for Sick Children, Department of Diagnostic Imaging, Program in Neurosciences and Mental Health Research MEG lab, Room S742, 555 University Avenue, Toronto, ON, M5G 1X8 416-813-7654 x201535 Date: Wed, 2 Jul 2014 10:10:02 -0400 From: Max Cantor To: FieldTrip discussion list Subject: [FieldTrip] Beamformers: SAM vs LCMV vs LCMV fixedori Message-ID: Content-Type: text/plain; charset="utf-8" Hi Fieldtrip, We are currently using the SAM beamformer for source localization, but are thinking of switching to LCMV. Given the research I've read, the vector beamformer approach should, for our purposes, be more efficient and be as, if not more accurate than scalar. However, other than the vector/scalar difference, I don't have a great understanding of what other differences exist between the two beamformers. To test the differences, I've run SAM, LCMV, and LCMV with fixed orientation (making it scalar), with both our real data and with simulated data, and while SAM and LCMV fixedori are more similar to each other than either are when compared to LCMV without fixedori (particularly with the simulation, less so with our real data), they are still visibly different from each other. This suggests to me that there are other potentially meaningful differences between SAM and LCMV besides the scalar/vector difference, and I want to make sure I have at least some idea of what those differences are before I commit to the change. That being said, I get the feeling that these differences may be more nuanced than I can decipher on my own, so if anyone can explain to me what these differences are and if they are important, I would greatly appreciate it. Thanks, Max -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan ________________________________ This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. From mcantor at umich.edu Wed Jul 9 20:05:26 2014 From: mcantor at umich.edu (Max Cantor) Date: Wed, 9 Jul 2014 14:05:26 -0400 Subject: [FieldTrip] Beamformers: SAM vs LCMV vs LCMV fixedori In-Reply-To: <2A2B6A5B8C4C174CBCCE0B45E548DEB229F967A1@SKMBXX01.sickkids.ca> References: <2A2B6A5B8C4C174CBCCE0B45E548DEB229F967A1@SKMBXX01.sickkids.ca> Message-ID: Thanks Marc, Hopefully this can explain some of the differences I'm seeing between the beamformers with our data and help me determine if they are significant for our purposes. Good luck with the poster! I'm not sure if this is what you were getting at, but if it is made publicly available online I would certainly be interested in reading it, thank you. On Wed, Jul 9, 2014 at 11:50 AM, Marc Lalancette < marc.lalancette at sickkids.ca> wrote: > Hi Max, > > The formulae are different even when using LCMV with the same fixed > orientation as the one found by SAM. > For example, the power formulae, with hopefully clear enough notation (o > is orientation vector), and assuming unit-gain weight normalization for > simplicity: > scalar: w(o)' R w(o) = 1 / [o' L' R^-1 L o] > 1-d vector: o' W' R W o = o' [L' R^-1 L]^-1 o > > Of course, if using different software, there might also be differences in > what weight normalization is used, how the data is filtered, whether or not > a baseline or "DC offset" is subtracted, etc. > > Note of potential interest: I'm preparing a poster for Biomag with > information on scalar and vector beamformers, with emphasis on the issue of > rotational invariance since it is a common issue in the literature and in > some software: that some formulae are not rotationally invariant, i.e. the > results depend on how the coordinate system is defined/oriented. This is > obviously not acceptable for any physically significant measure. Regarding > Fieldtrip itself, the only such issue I found is the (mostly hidden, thus > probably not typically used) option to normalize lead fields by column. > > Cheers, > > Marc Lalancette > Lab Research Project Manager > The Hospital for Sick Children, Department of Diagnostic Imaging, Program > in Neurosciences and Mental Health > Research MEG lab, Room S742, 555 University Avenue, Toronto, ON, M5G 1X8 > 416-813-7654 x201535 > > > Date: Wed, 2 Jul 2014 10:10:02 -0400 > From: Max Cantor > To: FieldTrip discussion list > Subject: [FieldTrip] Beamformers: SAM vs LCMV vs LCMV fixedori > Message-ID: > q_pm9wFB5FZ-_L0A at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi Fieldtrip, > > We are currently using the SAM beamformer for source localization, but are > thinking of switching to LCMV. Given the research I've read, the vector > beamformer approach should, for our purposes, be more efficient and be as, > if not more accurate than scalar. > > However, other than the vector/scalar difference, I don't have a great > understanding of what other differences exist between the two beamformers. > To test the differences, I've run SAM, LCMV, and LCMV with fixed > orientation (making it scalar), with both our real data and with simulated > data, and while SAM and LCMV fixedori are more similar to each other than > either are when compared to LCMV without fixedori (particularly with the > simulation, less so with our real data), they are still visibly different > from each other. This suggests to me that there are other potentially > meaningful differences between SAM and LCMV besides the scalar/vector > difference, and I want to make sure I have at least some idea of what those > differences are before I commit to the change. > > That being said, I get the feeling that these differences may be more > nuanced than I can decipher on my own, so if anyone can explain to me what > these differences are and if they are important, I would greatly appreciate > it. > > Thanks, > > Max > > -- > Max Cantor > Lab Manager > Computational Neurolinguistics Lab > University of Michigan > > ________________________________ > > This e-mail may contain confidential, personal and/or health > information(information which may be subject to legal restrictions on use, > retention and/or disclosure) for the sole use of the intended recipient. > Any review or distribution by anyone other than the person for whom it was > originally intended is strictly prohibited. If you have received this > e-mail in error, please contact the sender and delete all copies. > -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From lid.mijas at gmail.com Wed Jul 9 20:18:23 2014 From: lid.mijas at gmail.com (Lidia Mijas) Date: Wed, 9 Jul 2014 19:18:23 +0100 Subject: [FieldTrip] surrogates for Phase lag index Message-ID: Hi all, I am wondering if fieldtrip has any options for computing surrogates? I am tryng to assess confidence level for my Phase Lag Index results ( to determine whether it is significantly larger then 0) But maybe someone has a better idea how to do it? Not sure if it matters so just to mentioned that my PLI was computed at the source level on beamformed signals. Many thanks for any suggestion. Lidia -------------- next part -------------- An HTML attachment was scrubbed... URL: From rikkert.hindriks at upf.edu Wed Jul 9 20:39:41 2014 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Wed, 9 Jul 2014 20:39:41 +0200 Subject: [FieldTrip] surrogates for Phase lag index In-Reply-To: References: Message-ID: Hi Lidia, I have the same question and I don't think the answer is trivial: one would have to construct pairs of surrogate time-series under the nullhypothesis of zero phase-lag-index. With other words: construct pairs of time-series who's instantaneous phases are coupled to the same extent as the recorded time-series but with zero lag. In my case, the question is how to test for a significant lag via the cross-correlation function. Kind regards, Rikkert On Wed, Jul 9, 2014 at 8:18 PM, Lidia Mijas wrote: > Hi all, > > I am wondering if fieldtrip has any options for computing surrogates? > I am tryng to assess confidence level for my Phase Lag Index results ( to > determine whether it is significantly larger then 0) > > But maybe someone has a better idea how to do it? > Not sure if it matters so just to mentioned that my PLI was computed at > the source level on beamformed signals. > > Many thanks for any suggestion. > > Lidia > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bastien.b1 at gmail.com Wed Jul 9 21:01:35 2014 From: bastien.b1 at gmail.com (Bastien Boutonnet) Date: Wed, 9 Jul 2014 14:01:35 -0500 Subject: [FieldTrip] surrogates for Phase lag index In-Reply-To: References: Message-ID: I guess I will tag along to this discussion, in saying that I have been having the same burning question for a while. My issues have been along those lines: when I run some kinds of connectivity analyses (be it PLI, wPLI or PLV), how do I make sure the values I obtain are "legal" (or different from 0). B – Bastien Boutonnet, Ph. D. Postdoctoral Research Associate Department of Psychology University of Wisconsin, Madison bastienboutonnet.com On 9 July 2014 13:39, HINDRIKS, RIKKERT wrote: > Hi Lidia, > > I have the same question and I don't think the answer is trivial: one > would have to construct pairs of surrogate time-series under the > nullhypothesis of zero phase-lag-index. With other words: construct pairs > of time-series who's instantaneous phases are coupled > to the same extent as the recorded time-series but with zero lag. In my > case, the question is how to test for a significant lag via the > cross-correlation function. > > > Kind regards, > Rikkert > > > On Wed, Jul 9, 2014 at 8:18 PM, Lidia Mijas wrote: > >> Hi all, >> >> I am wondering if fieldtrip has any options for computing surrogates? >> I am tryng to assess confidence level for my Phase Lag Index results ( to >> determine whether it is significantly larger then 0) >> >> But maybe someone has a better idea how to do it? >> Not sure if it matters so just to mentioned that my PLI was computed at >> the source level on beamformed signals. >> >> Many thanks for any suggestion. >> >> Lidia >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rikkert.hindriks at upf.edu Wed Jul 9 21:42:04 2014 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Wed, 9 Jul 2014 21:42:04 +0200 Subject: [FieldTrip] surrogates for Phase lag index In-Reply-To: References: Message-ID: Constructing surrogate time-series for PLV is more straightforward since, in this case, the nullhypothesis is the absence of phase-locking. Surrogate pairs of time-series can be constructed for example by phase-randomization in the Fourier domain. Rikkert On Wed, Jul 9, 2014 at 9:01 PM, Bastien Boutonnet wrote: > I guess I will tag along to this discussion, in saying that I have been > having the same burning question for a while. > > My issues have been along those lines: when I run some kinds of > connectivity analyses (be it PLI, wPLI or PLV), how do I make sure the > values I obtain are "legal" (or different from 0). > > B > > – > Bastien Boutonnet, Ph. D. > Postdoctoral Research Associate > Department of Psychology > University of Wisconsin, Madison > bastienboutonnet.com > > > On 9 July 2014 13:39, HINDRIKS, RIKKERT wrote: > >> Hi Lidia, >> >> I have the same question and I don't think the answer is trivial: one >> would have to construct pairs of surrogate time-series under the >> nullhypothesis of zero phase-lag-index. With other words: construct pairs >> of time-series who's instantaneous phases are coupled >> to the same extent as the recorded time-series but with zero lag. In my >> case, the question is how to test for a significant lag via the >> cross-correlation function. >> >> >> Kind regards, >> Rikkert >> >> >> On Wed, Jul 9, 2014 at 8:18 PM, Lidia Mijas wrote: >> >>> Hi all, >>> >>> I am wondering if fieldtrip has any options for computing surrogates? >>> I am tryng to assess confidence level for my Phase Lag Index results ( >>> to determine whether it is significantly larger then 0) >>> >>> But maybe someone has a better idea how to do it? >>> Not sure if it matters so just to mentioned that my PLI was computed at >>> the source level on beamformed signals. >>> >>> Many thanks for any suggestion. >>> >>> Lidia >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bastien.b1 at gmail.com Wed Jul 9 22:10:38 2014 From: bastien.b1 at gmail.com (Bastien Boutonnet) Date: Wed, 9 Jul 2014 15:10:38 -0500 Subject: [FieldTrip] surrogates for Phase lag index In-Reply-To: References: Message-ID: That makes sense. How would you implement phase-randomisation? Is it similar to estimating the connectivity between the same pairs of electrodes but with data coming from different trials? Or even simpler? My interest to know about PLI/wPLI however still holds. B – Bastien Boutonnet, Ph. D. Postdoctoral Research Associate Department of Psychology University of Wisconsin, Madison bastienboutonnet.com On 9 July 2014 14:42, HINDRIKS, RIKKERT wrote: > Constructing surrogate time-series for PLV is more straightforward since, > in this case, the nullhypothesis is the absence of phase-locking. > Surrogate pairs of time-series can be constructed for example by > phase-randomization in the Fourier domain. > > Rikkert > > > On Wed, Jul 9, 2014 at 9:01 PM, Bastien Boutonnet > wrote: > >> I guess I will tag along to this discussion, in saying that I have been >> having the same burning question for a while. >> >> My issues have been along those lines: when I run some kinds of >> connectivity analyses (be it PLI, wPLI or PLV), how do I make sure the >> values I obtain are "legal" (or different from 0). >> >> B >> >> – >> Bastien Boutonnet, Ph. D. >> Postdoctoral Research Associate >> Department of Psychology >> University of Wisconsin, Madison >> bastienboutonnet.com >> >> >> On 9 July 2014 13:39, HINDRIKS, RIKKERT wrote: >> >>> Hi Lidia, >>> >>> I have the same question and I don't think the answer is trivial: one >>> would have to construct pairs of surrogate time-series under the >>> nullhypothesis of zero phase-lag-index. With other words: construct >>> pairs of time-series who's instantaneous phases are coupled >>> to the same extent as the recorded time-series but with zero lag. In my >>> case, the question is how to test for a significant lag via the >>> cross-correlation function. >>> >>> >>> Kind regards, >>> Rikkert >>> >>> >>> On Wed, Jul 9, 2014 at 8:18 PM, Lidia Mijas wrote: >>> >>>> Hi all, >>>> >>>> I am wondering if fieldtrip has any options for computing surrogates? >>>> I am tryng to assess confidence level for my Phase Lag Index results ( >>>> to determine whether it is significantly larger then 0) >>>> >>>> But maybe someone has a better idea how to do it? >>>> Not sure if it matters so just to mentioned that my PLI was computed at >>>> the source level on beamformed signals. >>>> >>>> Many thanks for any suggestion. >>>> >>>> Lidia >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Thu Jul 10 00:55:18 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Wed, 9 Jul 2014 22:55:18 +0000 Subject: [FieldTrip] Problems with Scalp Model Message-ID: <73A7ED2B-6B6F-49C8-BF36-EEDA80B054A3@dartmouth.edu> Hello, I am trying to produce the volume conduction model of some MRI data that I have, and I am having a problem with the production of the Scalp Model (Attached Below). I believe the problem may be stemming from the segmentation process, but I am not completely sure. Is there any option that will allow me to get rid of the extraneous figures in the scalp model? Help is greatly appreciated. Isaiah Smith -------------- next part -------------- A non-text attachment was scrubbed... Name: Scalp FieldTrip Model .fig Type: application/x-matlab-figure Size: 15139 bytes Desc: Scalp FieldTrip Model .fig URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ATT00001.txt URL: From Isaiah.C.Smith.17 at dartmouth.edu Thu Jul 10 09:50:09 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Thu, 10 Jul 2014 07:50:09 +0000 Subject: [FieldTrip] Help with Volume Conduction Model Message-ID: <77D42DF8-54FB-4629-BEA4-1A008DAE687D@dartmouth.edu> Hello, I am having trouble with a specific tissue output in the segmentation process. How do I explore the output of the segmentation and look at the voxel-by-voxel assignment of a specific tissue type? Then how do I tweak the parameters and/or edit manually segmentation before making a mesh model? Isaiah Smith From thomas.wunderle at esi-frankfurt.de Thu Jul 10 11:14:08 2014 From: thomas.wunderle at esi-frankfurt.de (Wunderle, Thomas) Date: Thu, 10 Jul 2014 09:14:08 +0000 Subject: [FieldTrip] Problem in ft_checkconfig Message-ID: <27E5CAD9145EEC41BB9B34C01716A1987131AFEA@UM-EXCDAG-A01.um.gwdg.de> Hi all, apparently there was a change in "ft_checkconfig" which makes a problem when using functions related to spike analysis. When running "ft_spiketriggeredspectrum", there comes the following error message (FieldTrip version r9719): ??? Error using ==> ft_checkconfig at 205 The field cfg.progress is not allowed I put the whole code into bugzilla: Bug 2641 - Error in ft_checkconfig using ft_spiketriggeredspectrum Using FieldTrip version r8941 does not produce the error. I'm running Matlab R2011a on Linux. Best, Thomas ----- Dr. Thomas Wunderle Ernst Strüngmann Institute (ESI) for Neuroscience in Cooperation with Max Planck Society Deutschordenstrasse 46 60528 Frankfurt am Main, Germany www.esi-frankfurt.de thomas.wunderle at esi-frankfurt.de Tel: +49 69 96769 516 Fax: +49 69 96769 555 Sitz der Gesellschaft: Frankfurt am Main Registergericht: Amtsgericht Frankfurt - HRB 84266 Geschäftsführer: Prof. Dr. Pascal Fries -------------- next part -------------- An HTML attachment was scrubbed... URL: From paymandomorientes at yahoo.com Thu Jul 10 13:22:35 2014 From: paymandomorientes at yahoo.com (paymando- morientes) Date: Thu, 10 Jul 2014 04:22:35 -0700 Subject: [FieldTrip] variable "abort" Message-ID: <1404991355.38752.YahooMailNeo@web141606.mail.bf1.yahoo.com> Dear all I have a problem starting with field trip. When I call "ft_definevarible" function, it throws an error that "abort" variable is not defined. I checked the ".m file" for the function and it says that abort is set by "ft_preamble" function. So where is the problem? Should I change something in my script? or "ft_preamble" function is not doing its job? by the way i hope I am sending this message to the right e-mail. thanks in advance payman -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Thu Jul 10 13:40:12 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 10 Jul 2014 13:40:12 +0200 (CEST) Subject: [FieldTrip] variable "abort" In-Reply-To: <1404991355.38752.YahooMailNeo@web141606.mail.bf1.yahoo.com> References: <1404991355.38752.YahooMailNeo@web141606.mail.bf1.yahoo.com> Message-ID: <015201cf9c33$b5a9e830$20fdb890$@herring@fcdonders.ru.nl> Dear Payman, As far as I can tell there is no function called ft_definevarible, could you please recheck which function is given you problems? Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of paymando- morientes Sent: donderdag 10 juli 2014 13:23 To: fieldtrip at science.ru.nl Subject: [FieldTrip] variable "abort" Dear all I have a problem starting with field trip. When I call "ft_definevarible" function, it throws an error that "abort" variable is not defined. I checked the ".m file" for the function and it says that abort is set by "ft_preamble" function. So where is the problem? Should I change something in my script? or "ft_preamble" function is not doing its job? by the way i hope I am sending this message to the right e-mail. thanks in advance payman -------------- next part -------------- An HTML attachment was scrubbed... URL: From rikkert.hindriks at upf.edu Thu Jul 10 16:41:04 2014 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Thu, 10 Jul 2014 16:41:04 +0200 Subject: [FieldTrip] surrogates for Phase lag index In-Reply-To: References: Message-ID: http://www.vis.caltech.edu/~rodri/papers/PNB.pdf On Wed, Jul 9, 2014 at 10:10 PM, Bastien Boutonnet wrote: > That makes sense. How would you implement phase-randomisation? Is it > similar to estimating the connectivity between the same pairs of electrodes > but with data coming from different trials? Or even simpler? > > My interest to know about PLI/wPLI however still holds. > > B > > – > Bastien Boutonnet, Ph. D. > Postdoctoral Research Associate > Department of Psychology > University of Wisconsin, Madison > bastienboutonnet.com > > > On 9 July 2014 14:42, HINDRIKS, RIKKERT wrote: > >> Constructing surrogate time-series for PLV is more straightforward since, >> in this case, the nullhypothesis is the absence of phase-locking. >> Surrogate pairs of time-series can be constructed for example by >> phase-randomization in the Fourier domain. >> >> Rikkert >> >> >> On Wed, Jul 9, 2014 at 9:01 PM, Bastien Boutonnet >> wrote: >> >>> I guess I will tag along to this discussion, in saying that I have been >>> having the same burning question for a while. >>> >>> My issues have been along those lines: when I run some kinds of >>> connectivity analyses (be it PLI, wPLI or PLV), how do I make sure the >>> values I obtain are "legal" (or different from 0). >>> >>> B >>> >>> – >>> Bastien Boutonnet, Ph. D. >>> Postdoctoral Research Associate >>> Department of Psychology >>> University of Wisconsin, Madison >>> bastienboutonnet.com >>> >>> >>> On 9 July 2014 13:39, HINDRIKS, RIKKERT >>> wrote: >>> >>>> Hi Lidia, >>>> >>>> I have the same question and I don't think the answer is trivial: one >>>> would have to construct pairs of surrogate time-series under the >>>> nullhypothesis of zero phase-lag-index. With other words: construct >>>> pairs of time-series who's instantaneous phases are coupled >>>> to the same extent as the recorded time-series but with zero lag. In my >>>> case, the question is how to test for a significant lag via the >>>> cross-correlation function. >>>> >>>> >>>> Kind regards, >>>> Rikkert >>>> >>>> >>>> On Wed, Jul 9, 2014 at 8:18 PM, Lidia Mijas >>>> wrote: >>>> >>>>> Hi all, >>>>> >>>>> I am wondering if fieldtrip has any options for computing surrogates? >>>>> I am tryng to assess confidence level for my Phase Lag Index results ( >>>>> to determine whether it is significantly larger then 0) >>>>> >>>>> But maybe someone has a better idea how to do it? >>>>> Not sure if it matters so just to mentioned that my PLI was computed >>>>> at the source level on beamformed signals. >>>>> >>>>> Many thanks for any suggestion. >>>>> >>>>> Lidia >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bastien.b1 at gmail.com Thu Jul 10 16:58:13 2014 From: bastien.b1 at gmail.com (Bastien Boutonnet) Date: Thu, 10 Jul 2014 09:58:13 -0500 Subject: [FieldTrip] surrogates for Phase lag index In-Reply-To: References: Message-ID: This doesn't seem to be mentioning PLI related stuff. Any more descriptive help? B – Bastien Boutonnet, Ph. D. Postdoctoral Research Associate Department of Psychology University of Wisconsin, Madison bastienboutonnet.com On 10 July 2014 09:41, HINDRIKS, RIKKERT wrote: > http://www.vis.caltech.edu/~rodri/papers/PNB.pdf > > > On Wed, Jul 9, 2014 at 10:10 PM, Bastien Boutonnet > wrote: > >> That makes sense. How would you implement phase-randomisation? Is it >> similar to estimating the connectivity between the same pairs of electrodes >> but with data coming from different trials? Or even simpler? >> >> My interest to know about PLI/wPLI however still holds. >> >> B >> >> – >> Bastien Boutonnet, Ph. D. >> Postdoctoral Research Associate >> Department of Psychology >> University of Wisconsin, Madison >> bastienboutonnet.com >> >> >> On 9 July 2014 14:42, HINDRIKS, RIKKERT wrote: >> >>> Constructing surrogate time-series for PLV is more straightforward >>> since, in this case, the nullhypothesis is the absence of phase-locking. >>> Surrogate pairs of time-series can be constructed for example by >>> phase-randomization in the Fourier domain. >>> >>> Rikkert >>> >>> >>> On Wed, Jul 9, 2014 at 9:01 PM, Bastien Boutonnet >>> wrote: >>> >>>> I guess I will tag along to this discussion, in saying that I have been >>>> having the same burning question for a while. >>>> >>>> My issues have been along those lines: when I run some kinds of >>>> connectivity analyses (be it PLI, wPLI or PLV), how do I make sure the >>>> values I obtain are "legal" (or different from 0). >>>> >>>> B >>>> >>>> – >>>> Bastien Boutonnet, Ph. D. >>>> Postdoctoral Research Associate >>>> Department of Psychology >>>> University of Wisconsin, Madison >>>> bastienboutonnet.com >>>> >>>> >>>> On 9 July 2014 13:39, HINDRIKS, RIKKERT >>>> wrote: >>>> >>>>> Hi Lidia, >>>>> >>>>> I have the same question and I don't think the answer is trivial: one >>>>> would have to construct pairs of surrogate time-series under the >>>>> nullhypothesis of zero phase-lag-index. With other words: construct >>>>> pairs of time-series who's instantaneous phases are coupled >>>>> to the same extent as the recorded time-series but with zero lag. In >>>>> my case, the question is how to test for a significant lag via the >>>>> cross-correlation function. >>>>> >>>>> >>>>> Kind regards, >>>>> Rikkert >>>>> >>>>> >>>>> On Wed, Jul 9, 2014 at 8:18 PM, Lidia Mijas >>>>> wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> I am wondering if fieldtrip has any options for computing surrogates? >>>>>> I am tryng to assess confidence level for my Phase Lag Index results >>>>>> ( to determine whether it is significantly larger then 0) >>>>>> >>>>>> But maybe someone has a better idea how to do it? >>>>>> Not sure if it matters so just to mentioned that my PLI was computed >>>>>> at the source level on beamformed signals. >>>>>> >>>>>> Many thanks for any suggestion. >>>>>> >>>>>> Lidia >>>>>> >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paymandomorientes at yahoo.com Thu Jul 10 20:23:50 2014 From: paymandomorientes at yahoo.com (paymando- morientes) Date: Thu, 10 Jul 2014 11:23:50 -0700 Subject: [FieldTrip] variable "abort" In-Reply-To: <015201cf9c33$b5a9e830$20fdb890$@herring@fcdonders.ru.nl> References: <1404991355.38752.YahooMailNeo@web141606.mail.bf1.yahoo.com> <015201cf9c33$b5a9e830$20fdb890$@herring@fcdonders.ru.nl> Message-ID: <1405016630.51075.YahooMailNeo@web141604.mail.bf1.yahoo.com> oh sorry  I mistyped it. I meant ft_definetrial. thanks for your help On Thursday, 10 July 2014, 13:40, "Herring, J.D. (Jim)" wrote: Dear Payman,   As far as I can tell there is no function called ft_definevarible, could you please recheck which function is given you problems?   Best,   Jim   From:fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of paymando- morientes Sent: donderdag 10 juli 2014 13:23 To: fieldtrip at science.ru.nl Subject: [FieldTrip] variable "abort"   Dear all I have a problem starting with field trip. When I call "ft_definevarible" function, it throws an error that "abort" variable is not defined. I checked the ".m file" for the function and it says that abort is set by "ft_preamble" function. So where is the problem? Should I change something in my script? or "ft_preamble" function is not doing its job? by the way i hope I am sending this message to the right e-mail.   thanks in advance payman -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Fri Jul 11 02:10:43 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Fri, 11 Jul 2014 00:10:43 +0000 Subject: [FieldTrip] Help with Volume Conduction Model Message-ID: <03FFEDF1-2980-493F-AE57-5FD329D625AF@dartmouth.edu> Hello, I am having trouble with a specific tissue output in the segmentation process. How do I explore the output of the segmentation and look at the voxel-by-voxel assignment of a specific tissue type? Then how do I tweak the parameters and/or edit manually segmentation before making a mesh model? Isaiah Smith From tyler.grummett at flinders.edu.au Fri Jul 11 03:31:11 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Fri, 11 Jul 2014 01:31:11 +0000 Subject: [FieldTrip] Thank you for beamformer help Message-ID: <1405042271282.5143@flinders.edu.au> Hello fieldtrip, I just wanted to thank the following people for helping me with my beamformer issues: Eelke Spaak, Roey Schurr, Matt craddock, Julian Keil and of course Jorn Horschig. For the sake of helping other, I want to collate the help so that it is all in one place. -------------------------------------- With the help of Roey Schurr and Matt craddock I calculated the headmodel as follows: % % load in template files temp = load( fullfile( matlabrootpath, 'Matlab', 'fieldtrip', ... 'template', 'headmodel', 'standard_mri.mat')); mri = temp.mri; clear temp % segment MRI (return probabilistic tissue maps of gray/white/csf % compartments cfg = []; cfg.write = 'no'; cfg.coordsys = 'spm'; cfg.output = { 'scalp', 'skull', 'brain'}; segmentedmri = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'iso2mesh'; cfg.numvertices = 10000; bnd = ft_prepare_mesh( cfg, segmentedmri); % fix mesh [ bnd( 1).pnt, bnd( 1).tri] = meshresample( bnd( 1).pnt, bnd( 1).tri, 1000/size( bnd( 1).pnt, 1)); [ bnd( 2).pnt, bnd( 2).tri] = meshresample( bnd( 2).pnt, bnd( 2).tri, 2000/size( bnd( 2).pnt, 1)); [ bnd( 3).pnt, bnd( 3).tri] = meshresample( bnd( 3).pnt, bnd( 3).tri, 3000/size( bnd( 3).pnt, 1)); for ii = 1:size( bnd), [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'dup'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'isolated'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'deep'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'meshfix'); end % calculate headmodel % reordered to brain skull scalp cfg = []; cfg.method = 'bemcp'; vol = ft_prepare_headmodel(cfg, bnd); clear bnd -------------------------------------- The electrode positions were fixed from literally taking the electrode positions from the template, at first I interpreted Matt's suggestions as using a function to do it. It is very clear that just copying the positions are the way to go. % Get electrode positions from template temp_electrodes = ft_read_sens( fullfile( matlabrootpath, 'Matlab', 'fieldtrip', ... 'template', 'electrode', 'standard_1005.elc')); match = ismember( temp_electrodes.label, data.elec.label); temp_pos = temp_electrodes.chanpos( match, :); data.elec.label = temp_electrodes.label( match); data.elec.chanpos = temp_pos; data.elec.elecpos = data.elec.chanpos; % add LPA RPA and Nasian labels data.elec.label{ end+1} = temp_electrodes.label{ 1}; data.elec.label{ end+1} = temp_electrodes.label{ 2}; data.elec.label{ end+1} = temp_electrodes.label{ 3}; % add LPA RPA and Nasian positions data.elec.chanpos( end+1, :) = temp_electrodes.chanpos( 1, :); data.elec.chanpos( end+1, :) = temp_electrodes.chanpos( 2, :); data.elec.chanpos( end+1, :) = temp_electrodes.chanpos( 3, :); data.elec.elecpos = data.elec.chanpos; -------------------------------------- Then finally the sourcemodel can be calculated: % calculate sourcemodel cfg = []; cfg.mri = mri; cfg.vol = vol; cfg.grid.warpmni = 'yes'; cfg.grid.template = template.sourcemodel; cfg.grid.nonlinear = 'yes'; cfg.moveinward = 1; % actually uses vol mesh cfg.inwardshift = 0; % needs to be expressed to work with moveinward cfg.elec = timelock.elec; sourcemodel = ft_prepare_sourcemodel( cfg); -------------------------------------- Thank you to everyone that has helped me. I gladly appreciate it. Im really sorry for all the emails as well. There will be another coming because the beamformer technique works for 2 datasets (out of four) and I cant work out why it isnt working for two datasets. Kind regards, Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Fri Jul 11 04:17:27 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Fri, 11 Jul 2014 02:17:27 +0000 Subject: [FieldTrip] Beamformer and two different datasets Message-ID: <1405045047076.88142@flinders.edu.au> Hello fieldtrip, As mentioned in my previous email, I had success at calculating beamformer with one dataset but not with another. The dropbox link to dataset1 is: https://www.dropbox.com/s/2nyps8pph7xszf0/Dataset1.mat The dropbox link to dataset2 is: https://www.dropbox.com/s/pkmkdv871y4w67z/Dataset2.mat In the datasets are structured in the following way: datasetx.data datasetx.timelock datasetx.vol datasetx.sourcemodel datasetx.grid datasetx.virtualchans datasetx.sourcemodel2 source wasnt included as it will make the file too big. The following code was used: ------------------------------------------------------------- %% timelock data cfg = []; cfg.channel = 'EEG'; cfg.vartrllength = 2; cfg.covariance = 'yes'; cfg.covariancewindow = 'all'; cfg.keeptrials = 'yes'; timelock = ft_timelockanalysis(cfg, data); ------------------------------------------------------------- %% create headmodel % segment MRI (return probabilistic tissue maps of gray/white/csf % compartments cfg = []; cfg.write = 'no'; cfg.coordsys = 'spm'; cfg.output = { 'scalp', 'skull', 'brain'}; segmentedmri = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'iso2mesh'; cfg.numvertices = 10000; bnd = ft_prepare_mesh( cfg, segmentedmri); % fix mesh [ bnd( 1).pnt, bnd( 1).tri] = meshresample( bnd( 1).pnt, bnd( 1).tri, 1000/size( bnd( 1).pnt, 1)); [ bnd( 2).pnt, bnd( 2).tri] = meshresample( bnd( 2).pnt, bnd( 2).tri, 2000/size( bnd( 2).pnt, 1)); [ bnd( 3).pnt, bnd( 3).tri] = meshresample( bnd( 3).pnt, bnd( 3).tri, 3000/size( bnd( 3).pnt, 1)); for ii = 1:size( bnd), [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'dup'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'isolated'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'deep'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'meshfix'); end % calculate headmodel % reordered to brain skull scalp cfg = []; cfg.method = 'bemcp'; %openmeeg doesnt work with multiple output from ft_volumesegment vol = ft_prepare_headmodel(cfg, bnd); clear bnd ------------------------------------------------------------- %% calculate sourcemodel cfg = []; cfg.mri = mri; cfg.vol = vol; cfg.grid.warpmni = 'yes'; cfg.grid.template = template.sourcemodel; cfg.grid.nonlinear = 'yes'; cfg.moveinward = 1; % actually uses vol mesh cfg.inwardshift = 0; % needs to be expressed to work with moveinward ​cfg.elec = timelock.elec; sourcemodel = ft_prepare_sourcemodel( cfg); ------------------------------------------------------------- %% beamformer calculation % compute lead field cfg = []; cfg.elec = timelock.elec; cfg.vol = vol; cfg.grid = sourcemodel; cfg.reducerank = 3; % 3 for EEG, 2 for MEG cfg.backproject = 'yes'; cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window grid = ft_prepare_leadfield( cfg, timelock); % Source Analysis: without contrasting condition cfg = []; cfg.channel = 'EEG'; cfg.method = 'lcmv'; cfg.grid = grid; cfg.vol = vol; cfg.keepfilter = 'yes'; cfg.lcmv.fixedori = 'yes'; % project on axis of most variance using SVD source = ft_sourceanalysis( cfg, timelock); ------------------------------------------------------------- %% map beamformer source locations onto an anatomical label in an atlas cfg = []; cfg.interpmethod = 'nearest'; cfg.parameter = 'tissue'; sourcemodel2 = ft_sourceinterpolate( cfg, atlas, sourcemodel); ------------------------------------------------------------- %% compute virtual channels % start building vchan vchan = []; label = lower( atlas.tissuelabel); label = label( 1:90); vchan.time = data.time; vchan.fsample = data.fsample; Ntr = numel( data.trial); vchan.trial = cell( 1, Ntr); % find sensor names and indices chans = ft_channelselection( 'EEG', data.label); chans = match_str( data.label, chans); count = 1; tic for i = 1:numel( label), atlas_sources = find( sourcemodel2.tissue == i); ai = ismember( atlas_sources, find( sourcemodel.inside)); bregion_sources = atlas_sources( ai); clear atlas_sources if isempty( bregion_sources), continue; end for f = 1:numel( bregion_sources), source_inx = bregion_sources( f); dipole_data = cell( 1, Ntr); % multiply spatial filter (3,Nchan) by the original data if isempty( source.avg.filter{ source_inx}), continue; end for tr = 1:Ntr, dipole_data{ tr} = source.avg.filter{ source_inx} * data.trial{ tr}(chans,:); end % concatenate data, run svd on data, multiple data by the % orientation of the dipole in which it is strongest time_series = cat( 2, dipole_data{ :}); [ U1, ~, ~] = svd( time_series, 'econ'); % u is the spatial decomposition, v the temporal and s the eigenvalues along diagonal for tr = 1:Ntr, % tt.trial{ tr}( f, :) = U1( :, 1)' * dipole_data{ tr}; tt.trial{ tr}( f, :) = dipole_data{ tr}; end clear source_inx dipole_data U1 timeseries end % mean channels with brain region for tr = 1:Ntr, vchan.trial{ tr}( i, :) = mean( tt.trial{ tr}); end % include position and power for each source vchan.label( count) = label( i); fprintf( 'created virtual channel %d\n', count); count = count + 1; clear tt U S sv si temp_data bregion_sources bregion_source end cfg = []; vchan = ft_preprocessing( cfg, vchan); -------------------------------------------------------------​ I will greatly appreciate the help once again. As beamformer is the basically the key element of my Phd I really want it to get it working. Kind regards, Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ali.b.sharif at gmail.com Fri Jul 11 11:43:41 2014 From: ali.b.sharif at gmail.com (Ali Bahramisharif) Date: Fri, 11 Jul 2014 11:43:41 +0200 Subject: [FieldTrip] problem with ft_checkconfig Message-ID: Hi , I have a problem with ft_spike_waveform. When I run it, it gives me the following error: Error using ==> ft_checkconfig at 205 The field cfg.progress is not allowed I debuged the code a bit and it seems to me that 'progress' should be added to the list of 'allowed' in line 192-200 of ft_checkconfing. Would this be a solution? The point is that the global variable 'ft_default' does have a field called 'progress'. I do not know where it is initiated, but it looks like it should be allowed. Ali -------------- next part -------------- An HTML attachment was scrubbed... URL: From deadala at freenet.de Fri Jul 11 16:54:36 2014 From: deadala at freenet.de (deadala at freenet.de) Date: Fri, 11 Jul 2014 16:54:36 +0200 Subject: [FieldTrip] LCMV beamformer Message-ID: <5d4dceb1960c51cebf30bf52824209fd@email.freenet.de> Dear all   I am currently using the LCMV beamformer (beamformer_lcmv.m) with my own data.   Your function: beamformer_lcmv(dip, grad, vol, dat, Cy, varargin)   My input:   dip  - structure array, with fields:   - pos            Nx3 array (N- sources)                                                   - inside         1xN array                                                   - outside       empty (all sources inside)                                                   - leadfield     1xN cell array with 1xM arrays (M- channels)   grad  - empty  -> because I am using my own leadfield vol  -  empty  -> because I am using my own leadfield dat  - MxS array (S- samples) Cy  -  MxM array   The problem:   I want to check my own implementation of LCMV beamformer against MNE (software) an your LCMV beamformer with similar data ( measurement, leadfield, data covariance). The MNE and my own beamformer show the same activity of sources. But your LCMV beamformer calculates activities on other places in the brain.   My question: What I am doing wrong? Are the input arguments false or the numbers of sources change?   Thanks in advance for the help. Diana   --- Alle Postfächer an einem Ort. Jetzt wechseln und E-Mail-Adresse mitnehmen! Rundum glücklich mit freenetMail -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Fri Jul 11 21:30:55 2014 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Fri, 11 Jul 2014 21:30:55 +0200 Subject: [FieldTrip] Job in Glasgow Message-ID: dear all, please find below a job-ad from peter uhlhaas at the university of glasgow. best, andreas Anfang der weitergeleiteten E‑Mail: University of Glasgow College of Medical, Veterinary and Life Sciences Research Institute of Neuroscience and Psychology Research Assistant / Associate Ref: M00563 Grade 6/7: £26,527 - £29,837 / £32,590 - £36,661 per annum You will contribute to a project entitled “Magnetoencephalography and Clinical Research in Schizophrenia”. Specifically, the job requires the analysis and acquisition of MEG-data sets and implementation of novel analytic tools, contributing to the design and programming of MEG experiments, recruiting and running the participants, assisting in analysing the results, and participating in the writing up of the results. With extensive, up-to-date practical knowledge in MEG or EEG, you will have excellent knowledge of source-localization, Matlab and experimental control software. This post is funded for 2 years Informal enquires to Dr Peter Uhlhaas (Email: Peter.Uhlhaas at glasgow.ac.uk< mailto:Peter.Uhlhaas at glasgow.ac.uk >; Tel: 0141 330 8730) Apply online at: www.gla.ac.uk/jobs Closing date: 11st of August 2014 The University has recently been awarded the Athena SWAN Institutional Bronze Award The University is committed to equality of opportunity in employment. The University of Glasgow, charity number SC004401. Dr. Peter J. Uhlhaas Reader Institute for Neuroscience and Psychology University of Glasgow 58 Hillhead Street Glasgow G12 8QB Telephone +44 (0)141 330 8730 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Mon Jul 14 23:28:59 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Mon, 14 Jul 2014 21:28:59 +0000 Subject: [FieldTrip] Editing Vertices of Scalp Manually or Automatically Message-ID: <4B7DB9E9-8F86-4323-8C32-C444ED97F84C@dartmouth.edu> Hello Everyone, I am having a problem with noise appearing in my volume conduction model. There are a few horn-like images on the head, and a cluster of vertices in the area where a neck would normally appear but the MRI was only of the upper half of someone's head so it should not be appearing either. I am running into a wall when I try to edit manually because the data so large I cannot view it. Please, I have been trying to fix this for a while does anyone have any ideas on how to get rid of these extraneous points: whether manually or by shifting parameters in the segmentation process? Your help would be extremely helpful and greatly appreciated. This is an image of the problem described. [cid:22E46479-BCE2-415D-B591-A53EE4F23A57] Kind Regards, Isaiah *************************** Isaiah Smith ( Dartmouth Undergraduate) UCLA California NanoSystems Institute Summer Intern University of California Los Angeles Dr. Wentai Liu’s Biomimetics Lab Rm 5311 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-14 at 2.21.48 PM.png Type: image/png Size: 163254 bytes Desc: Screen Shot 2014-07-14 at 2.21.48 PM.png URL: From a.stolk at fcdonders.ru.nl Mon Jul 14 23:46:34 2014 From: a.stolk at fcdonders.ru.nl (Stolk, A. (Arjen)) Date: Mon, 14 Jul 2014 23:46:34 +0200 (CEST) Subject: [FieldTrip] Editing Vertices of Scalp Manually or Automatically In-Reply-To: <4B7DB9E9-8F86-4323-8C32-C444ED97F84C@dartmouth.edu> Message-ID: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> Hi Isaiah, It could be that your problem is caused by your structural scan containing voxels outside the head but with levels of intensity falling in the range of that attributed to, say, csf. One way to check is by plotting the respective segmented brain mask, e.g. mri.pow = seg.csf cfg.funparameter = 'pow' ft_sourceplot(cfg,mri) You could then try and manually include certain voxels by playing with the inclusion threshold (e.g. set seg.csf with voxelvalues smaller than .99 to 0). This would allow to work around that problem, unless those voxels have exactly the same intensity as csf. Hope this helps narrowing the origin of your problem, Arjen ----- Oorspronkelijk bericht ----- > Van: "Isaiah C. Smith" > Aan: fieldtrip at science.ru.nl > Verzonden: Maandag 14 juli 2014 23:28:59 > Onderwerp: [FieldTrip] Editing Vertices of Scalp Manually or > Automatically > Hello Everyone, > I am having a problem with noise appearing in my volume conduction > model. There are a few horn-like images on the head, and a cluster of > vertices in the area where a neck would normally appear but the MRI > was only of the upper half of someone's head so it should not be > appearing either. I am running into a wall when I try to edit manually > because the data so large I cannot view it. Please, I have been trying > to fix this for a while does anyone have any ideas on how to get rid > of these extraneous points: whether manually or by shifting parameters > in the segmentation process? Your help would be extremely helpful and > greatly appreciated. > This is an image of the problem described. > Kind Regards, > Isaiah > *************************** > Isaiah Smith ( Dartmouth Undergraduate) > UCLA California NanoSystems Institute Summer Intern > University of California Los Angeles > Dr. Wentai Liu’s Biomimetics Lab > Rm 5311 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-14 at 2.21.48 PM.png Type: image/png Size: 163254 bytes Desc: Screen Shot 2014-07-14 at 2.21.48 PM.png URL: From Isaiah.C.Smith.17 at dartmouth.edu Tue Jul 15 00:47:58 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Mon, 14 Jul 2014 22:47:58 +0000 Subject: [FieldTrip] Editing Vertices of Scalp Manually or Automatically In-Reply-To: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> References: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <12B921FB-8A45-4640-A179-91FEB53EAFCD@dartmouth.edu> Thanks Arjen, I was able to bring up the source plot of the the scalp using: >> cfg.funparameter=‘scalp'; >> ft_sourceplot(cfg,segmentedmri) Results: [cid:FDB296FB-69C3-4B3E-A19D-214F52DDE76E] Could you please explain how to create/adjust the inclusion threshold? Sorry, I am a little new to the fieldtrip functions. Isaiah On Jul 14, 2014, at 2:46 PM, Stolk, A. (Arjen) > wrote: Hi Isaiah, It could be that your problem is caused by your structural scan containing voxels outside the head but with levels of intensity falling in the range of that attributed to, say, csf. One way to check is by plotting the respective segmented brain mask, e.g. mri.pow = seg.csf cfg.funparameter = 'pow' ft_sourceplot(cfg,mri) You could then try and manually include certain voxels by playing with the inclusion threshold (e.g. set seg.csf with voxelvalues smaller than .99 to 0). This would allow to work around that problem, unless those voxels have exactly the same intensity as csf. Hope this helps narrowing the origin of your problem, Arjen ________________________________ Van: "Isaiah C. Smith" > Aan: fieldtrip at science.ru.nl Verzonden: Maandag 14 juli 2014 23:28:59 Onderwerp: [FieldTrip] Editing Vertices of Scalp Manually or Automatically Hello Everyone, I am having a problem with noise appearing in my volume conduction model. There are a few horn-like images on the head, and a cluster of vertices in the area where a neck would normally appear but the MRI was only of the upper half of someone's head so it should not be appearing either. I am running into a wall when I try to edit manually because the data so large I cannot view it. Please, I have been trying to fix this for a while does anyone have any ideas on how to get rid of these extraneous points: whether manually or by shifting parameters in the segmentation process? Your help would be extremely helpful and greatly appreciated. This is an image of the problem described. Kind Regards, Isaiah *************************** Isaiah Smith ( Dartmouth Undergraduate) UCLA California NanoSystems Institute Summer Intern University of California Los Angeles Dr. Wentai Liu’s Biomimetics Lab Rm 5311 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-14 at 3.44.14 PM.png Type: image/png Size: 51597 bytes Desc: Screen Shot 2014-07-14 at 3.44.14 PM.png URL: From Isaiah.C.Smith.17 at dartmouth.edu Tue Jul 15 03:39:47 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Tue, 15 Jul 2014 01:39:47 +0000 Subject: [FieldTrip] Inclusion Threshold Message-ID: <038F985A-6BFB-43EB-AD9A-AECC295A3834@dartmouth.edu> Hello Everyone, Could someone please explain how to create/adjust the inclusion threshold in the segmentation process? It would be greatly appreciated. Isaiah Smith From jan.schoffelen at donders.ru.nl Tue Jul 15 09:34:23 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 15 Jul 2014 09:34:23 +0200 Subject: [FieldTrip] Editing Vertices of Scalp Manually or Automatically In-Reply-To: <12B921FB-8A45-4640-A179-91FEB53EAFCD@dartmouth.edu> References: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> <12B921FB-8A45-4640-A179-91FEB53EAFCD@dartmouth.edu> Message-ID: <1F212744-34A2-474F-8AAE-F23A498240D0@donders.ru.nl> Isaiah, Image segmentation algorithms work by thresholding an image (which has optionally been subjected to a sequence of image processing steps) at a sensible threshold, creating a binary image (i.e. consisting only of 0 and 1s). Then, in order to generate a surface description of e.g. the scalp, a triangulation is created that describes the boundary from 0 to 1, assuming the voxels with a value of 1 to lie within a single compartment. In your scalp mesh, the ‘horns’ are most likely caused by voxels with a supra threshold intensity value. After thresholding, the binary volume consists of multiple disconnected ‘blobs’, and the triangulation algorithm connects the points at the boundaries of these individual islands. Thus, in your case, the default image processing steps (which actually aim at generating a single compartment (by keeping the largest connected compartment, and throwing away the smaller islands) have failed. This may be caused by the fact that these islands lie at the edge of your image. If you don’t feel comfortable with editing the volumetric image yourself I suggest that you play with the cfg.scalpsmooth and cfg.scalpthreshold parameters prior to calling ft_volumesegment. I would start by increasing the scalpthreshold (the default value is 0.1, but you can try 0.3, or 0.5, or any value you fancy). Finally, please note that everybody who spends his/her valuable time on answering questions on this discussion list is doing so on a voluntary basis. Be aware that multiple postings of the same question does not necessary enhance people’s inclination to answer, although I realize fully well that it may be frustrating if you are stuck. Best wishes, Jan-Mathijs On Jul 15, 2014, at 12:47 AM, Isaiah C. Smith wrote: > Thanks Arjen, > > I was able to bring up the source plot of the the scalp using: > >> cfg.funparameter=‘scalp'; > >> ft_sourceplot(cfg,segmentedmri) > Results: > > Could you please explain how to create/adjust the inclusion threshold? Sorry, I am a little new to the fieldtrip functions. > > Isaiah > > On Jul 14, 2014, at 2:46 PM, Stolk, A. (Arjen) wrote: > >> Hi Isaiah, >> >> It could be that your problem is caused by your structural scan containing voxels outside the head but with levels of intensity falling in the range of that attributed to, say, csf. One way to check is by plotting the respective segmented brain mask, e.g. >> >> mri.pow = seg.csf >> cfg.funparameter = 'pow' >> ft_sourceplot(cfg,mri) >> >> You could then try and manually include certain voxels by playing with the inclusion threshold (e.g. set seg.csf with voxelvalues smaller than .99 to 0). This would allow to work around that problem, unless those voxels have exactly the same intensity as csf. >> >> Hope this helps narrowing the origin of your problem, >> Arjen >> >> >> >> Van: "Isaiah C. Smith" >> Aan: fieldtrip at science.ru.nl >> Verzonden: Maandag 14 juli 2014 23:28:59 >> Onderwerp: [FieldTrip] Editing Vertices of Scalp Manually or Automatically >> >> Hello Everyone, >> >> I am having a problem with noise appearing in my volume conduction model. There are a few horn-like images on the head, and a cluster of vertices in the area where a neck would normally appear but the MRI was only of the upper half of someone's head so it should not be appearing either. I am running into a wall when I try to edit manually because the data so large I cannot view it. Please, I have been trying to fix this for a while does anyone have any ideas on how to get rid of these extraneous points: whether manually or by shifting parameters in the segmentation process? Your help would be extremely helpful and greatly appreciated. >> >> This is an image of the problem described. >> >> >> Kind Regards, >> >> Isaiah >> >> *************************** >> Isaiah Smith ( Dartmouth Undergraduate) >> UCLA California NanoSystems Institute Summer Intern >> University of California Los Angeles >> Dr. Wentai Liu’s Biomimetics Lab >> Rm 5311 >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> -- >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> >> Email: a.stolk at donders.ru.nl >> Phone: +31(0)243 68294 >> Web: www.arjenstolk.nl >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jul 15 12:18:37 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 15 Jul 2014 10:18:37 +0000 Subject: [FieldTrip] Pop_cleanline (eeglab) and beamformer Message-ID: Hello fieldtrippers who use eeglab, If you're planning on beamformer your data, ensure that the data hasn't been cleanlined (pop_cleanline by Tim Mullen). Trust me when I say that it will not prove your results if you cleanline beforehand, it makes life a lot worse. Once again a thank you to the beamformer helpers mentioned in a previous email. Please disregard my old email if any of you were trying to solve it (I appreciate it though). The reason for it not working is the aforementioned cleanline. Kind regards, Tyler From f.roux at bcbl.eu Tue Jul 15 17:40:50 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Tue, 15 Jul 2014 17:40:50 +0200 (CEST) Subject: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data Message-ID: <468321985.2552096.1405438850636.JavaMail.root@bcbl.eu> Dear all, I would like to ask if anyone has ever tried to speed up the ft_statistics_montecarlo function by using Matlab's parallel computing toolbox ? I would like to run clusterstatistics on time-frequency data, but as a result of the large number of time and frequency bins, the function runs very slowly. So I was thinking to try and modify the code by running the loops over the frequency bins in parallel and see if that could save some time. Before starting to adapt the code on my own, however, I wanted to ask if anyone had ever tried that and also if there could be any possible reasons which would make that this is not a feasible project. Any thoughts or suggestions would be highly appreciated. Best, Fred --------------------------------------------------------------------------- From mcantor at umich.edu Tue Jul 15 19:26:33 2014 From: mcantor at umich.edu (Max Cantor) Date: Tue, 15 Jul 2014 13:26:33 -0400 Subject: [FieldTrip] Common Filters Question Message-ID: In the main beamformer tutorial ( http://fieldtrip.fcdonders.nl/tutorial/beamformer), the common filter is computed as follows: cfg.grid.filter = sourceAll.avg.filter; sourcePre_con = ft_sourceanalysis(cfg, freqPre ); sourcePost_con = ft_sourceanalysis(cfg, freqPost); However, in the separate common filters example script ( http://fieldtrip.fcdonders.nl/example/common_filters_in_beamforming), the common filter is much more complex. I've created working versions of both common filters for DICS, as well as a working version of the 'simple' common filter for LCMV. I have a version of the 'complex' common filter that should work, but it usually chews up my computer's RAM (I have 16gb) and crashes matlab. The DICS one is also slow, but not so bad that it crashes. However, I couldn't imagine running it on all my datasets and being able to do any stats on the data without my computer crashing. Before I post the code to see if maybe there is something wrong with it causing the memory overloads, I was wondering if anyone could explain to me what exactly the differences between the two methods are, and if it is even necessary for me to get the more complex common filter working? The simple common filters seem to work fine, but they could be affecting the data in ways that are not obvious, so I want to make sure. As always, thank you Fieldtrippers -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Tue Jul 15 23:57:29 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Tue, 15 Jul 2014 21:57:29 +0000 Subject: [FieldTrip] Editing Vertices of Scalp Manually or Automatically In-Reply-To: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> References: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <208DD306-6B0F-480E-9A15-9D925FE7B4F6@dartmouth.edu> Thank you so much for your reply Arjen, I was wondering if there is there any solution in the interface where we can automatically exclude some unwanted point? In the segmentation process? Or in a later process? When I change the threshold I get an error message concerning the final steps in creating the head model. Isaiah Smith On Jul 14, 2014, at 2:46 PM, Stolk, A. (Arjen) > wrote: Hi Isaiah, It could be that your problem is caused by your structural scan containing voxels outside the head but with levels of intensity falling in the range of that attributed to, say, csf. One way to check is by plotting the respective segmented brain mask, e.g. mri.pow = seg.csf cfg.funparameter = 'pow' ft_sourceplot(cfg,mri) You could then try and manually include certain voxels by playing with the inclusion threshold (e.g. set seg.csf with voxelvalues smaller than .99 to 0). This would allow to work around that problem, unless those voxels have exactly the same intensity as csf. Hope this helps narrowing the origin of your problem, Arjen ________________________________ Van: "Isaiah C. Smith" > Aan: fieldtrip at science.ru.nl Verzonden: Maandag 14 juli 2014 23:28:59 Onderwerp: [FieldTrip] Editing Vertices of Scalp Manually or Automatically Hello Everyone, I am having a problem with noise appearing in my volume conduction model. There are a few horn-like images on the head, and a cluster of vertices in the area where a neck would normally appear but the MRI was only of the upper half of someone's head so it should not be appearing either. I am running into a wall when I try to edit manually because the data so large I cannot view it. Please, I have been trying to fix this for a while does anyone have any ideas on how to get rid of these extraneous points: whether manually or by shifting parameters in the segmentation process? Your help would be extremely helpful and greatly appreciated. This is an image of the problem described. Kind Regards, Isaiah *************************** Isaiah Smith ( Dartmouth Undergraduate) UCLA California NanoSystems Institute Summer Intern University of California Los Angeles Dr. Wentai Liu’s Biomimetics Lab Rm 5311 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Wed Jul 16 00:13:13 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Tue, 15 Jul 2014 22:13:13 +0000 Subject: [FieldTrip] Editing Vertices of Scalp Manually or Automatically In-Reply-To: <208DD306-6B0F-480E-9A15-9D925FE7B4F6@dartmouth.edu> References: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> <208DD306-6B0F-480E-9A15-9D925FE7B4F6@dartmouth.edu> Message-ID: <37138409-0293-4095-9F81-43FF91B6398A@dartmouth.edu> [cid:6DCD99BF-1FEB-4B85-90B8-E1368132E32C at host.ucla.edu]On I should probably show you the MRI as well. The reason as to why I am so confused is that there are no points below and still the neck-like image shows up. I cannot find any variation in intensity at all. Is there any explanation for this occurrence? Thanks once again. Isaiah Jul 15, 2014, at 2:57 PM, Isaiah C. Smith > wrote: Thank you so much for your reply Arjen, I was wondering if there is there any solution in the interface where we can automatically exclude some unwanted point? In the segmentation process? Or in a later process? When I change the threshold I get an error message concerning the final steps in creating the head model. Isaiah Smith On Jul 14, 2014, at 2:46 PM, Stolk, A. (Arjen) > wrote: Hi Isaiah, It could be that your problem is caused by your structural scan containing voxels outside the head but with levels of intensity falling in the range of that attributed to, say, csf. One way to check is by plotting the respective segmented brain mask, e.g. mri.pow = seg.csf cfg.funparameter = 'pow' ft_sourceplot(cfg,mri) You could then try and manually include certain voxels by playing with the inclusion threshold (e.g. set seg.csf with voxelvalues smaller than .99 to 0). This would allow to work around that problem, unless those voxels have exactly the same intensity as csf. Hope this helps narrowing the origin of your problem, Arjen ________________________________ Van: "Isaiah C. Smith" > Aan: fieldtrip at science.ru.nl Verzonden: Maandag 14 juli 2014 23:28:59 Onderwerp: [FieldTrip] Editing Vertices of Scalp Manually or Automatically Hello Everyone, I am having a problem with noise appearing in my volume conduction model. There are a few horn-like images on the head, and a cluster of vertices in the area where a neck would normally appear but the MRI was only of the upper half of someone's head so it should not be appearing either. I am running into a wall when I try to edit manually because the data so large I cannot view it. Please, I have been trying to fix this for a while does anyone have any ideas on how to get rid of these extraneous points: whether manually or by shifting parameters in the segmentation process? Your help would be extremely helpful and greatly appreciated. This is an image of the problem described. Kind Regards, Isaiah *************************** Isaiah Smith ( Dartmouth Undergraduate) UCLA California NanoSystems Institute Summer Intern University of California Los Angeles Dr. Wentai Liu’s Biomimetics Lab Rm 5311 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-15 at 3.05.07 PM.png Type: image/png Size: 180396 bytes Desc: Screen Shot 2014-07-15 at 3.05.07 PM.png URL: From jan.schoffelen at donders.ru.nl Wed Jul 16 09:12:59 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 16 Jul 2014 09:12:59 +0200 Subject: [FieldTrip] Common Filters Question In-Reply-To: References: Message-ID: Dear Max, I checked out both snippets of code (on the tutorial page and on the example page), and to me it seems that you should be able to get away with what you call the ‘simple common filter’. The code on the example page to me looks unnecessarily complicated (apart from the fact that it is incomplete), and seems to be designed to first create a single trial representation of the data in source space, before averaging across the trials that pertain to a certain experimental condition. If, as I suspect it to be so in your case, one is only interested in computing a per condition average in source space (in order to be able to do statistical inference across a group of subjects), computing and using the common spatial filter as per the tutorial should do the trick. I guess that the person who wrote the example code for some reason wanted to have access to the single trial source data (as per point 3 in the section ‘how to do this in fieldtrip’ on the example script page). Projection of single trial data to the source level indeed blows up memory requirements, and may only be necessary in certain non-standard cases. I think it would be good to make this more explicit on the example page (thanks for spotting it!). Would you mind helping out with this? It’s a wiki after all ;-), and the example code is allowed to be adjusted/extended. I suggest that we adjust the page a bit so that we make explicit that we can reconstruct single trial data if needed (for this we only need to make the example code correct), but that in most cases we can work with averages across trials (for this we need to add a section that more or less duplicates the creation of the ‘simple’ complex filter). The way we usually tackle this is by creating a ‘bug’ out of this (or rather an issue) on our bugzilla.fcdonders.nl issue-tracking system to make an action list and to keep track of who’s doing what. Best wishes, Jan-Mathijs On Jul 15, 2014, at 7:26 PM, Max Cantor wrote: > In the main beamformer tutorial (http://fieldtrip.fcdonders.nl/tutorial/beamformer), the common filter is computed as follows: > > cfg.grid.filter = sourceAll.avg.filter; > sourcePre_con = ft_sourceanalysis(cfg, freqPre ); > sourcePost_con = ft_sourceanalysis(cfg, freqPost); > However, in the separate common filters example script (http://fieldtrip.fcdonders.nl/example/common_filters_in_beamforming), the common filter is much more complex. > > I've created working versions of both common filters for DICS, as well as a working version of the 'simple' common filter for LCMV. I have a version of the 'complex' common filter that should work, but it usually chews up my computer's RAM (I have 16gb) and crashes matlab. The DICS one is also slow, but not so bad that it crashes. However, I couldn't imagine running it on all my datasets and being able to do any stats on the data without my computer crashing. > > Before I post the code to see if maybe there is something wrong with it causing the memory overloads, I was wondering if anyone could explain to me what exactly the differences between the two methods are, and if it is even necessary for me to get the more complex common filter working? The simple common filters seem to work fine, but they could be affecting the data in ways that are not obvious, so I want to make sure. > > As always, thank you Fieldtrippers > > -- > Max Cantor > Lab Manager > Computational Neurolinguistics Lab > University of Michigan > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Jul 16 09:39:03 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 16 Jul 2014 09:39:03 +0200 Subject: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data In-Reply-To: <468321985.2552096.1405438850636.JavaMail.root@bcbl.eu> References: <468321985.2552096.1405438850636.JavaMail.root@bcbl.eu> Message-ID: Hi Fred, Some time ago, I replaced parts of the clustering routine with a mex-file. For me this greatly sped up the cluster stats. I guess you are using a fairly recent (<1yr old) FT version? The platform you're using might also be relevant, I just noticed that the mex-file (private/combineClusters.mex*) is distributed in compiled form only for Linux 64 and Windows 32/64 bit. If you're e.g. on a Macintosh, you could compile it yourself from the src/combineClusters.cpp source file. I know of no attempts to parallelise the clustering code. Best, Eelke On 15 July 2014 17:40, Frédéric Roux wrote: > Dear all, > > I would like to ask if anyone has ever tried to speed up the ft_statistics_montecarlo function > by using Matlab's parallel computing toolbox ? > > I would like to run clusterstatistics on time-frequency data, but as a result of the large number > of time and frequency bins, the function runs very slowly. So I was thinking to try and modify > the code by running the loops over the frequency bins in parallel and see if that could save > some time. > > Before starting to adapt the code on my own, however, I wanted to ask if anyone had ever tried that > and also if there could be any possible reasons which would make that this is not a feasible project. > > Any thoughts or suggestions would be highly appreciated. > > Best, > Fred > > > --------------------------------------------------------------------------- > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eijlers at rsm.nl Wed Jul 16 13:38:17 2014 From: eijlers at rsm.nl (Esther Eijlers) Date: Wed, 16 Jul 2014 11:38:17 +0000 Subject: [FieldTrip] Effect size measure for cluster-based permutation tests Message-ID: Dear all, I’m using the cluster-based permutation tests (on time-frequency data), and was wondering if it makes sense and how to come up with an effect size measure that is easy to evaluate. Maybe the clusterstat is giving an indication; but I guess it’s not a standardised measure and therefore hard to evaluate? Thank you in advance. Best, Esther -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Wed Jul 16 15:06:04 2014 From: mcantor at umich.edu (Max Cantor) Date: Wed, 16 Jul 2014 09:06:04 -0400 Subject: [FieldTrip] Common Filters Question In-Reply-To: References: Message-ID: Ok, I thought something along those lines might be the case, but I just wanted to make sure. I've never used bugzilla before but I'm sure I can figure it out, and I'd be glad to help! Thanks Jan-Mathijs, Max On Wed, Jul 16, 2014 at 3:12 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Dear Max, > > I checked out both snippets of code (on the tutorial page and on the > example page), and to me it seems that you should be able to get away with > what you call the ‘simple common filter’. The code on the example page to > me looks unnecessarily complicated (apart from the fact that it is > incomplete), and seems to be designed to first create a single trial > representation of the data in source space, before averaging across the > trials that pertain to a certain experimental condition. If, as I suspect > it to be so in your case, one is only interested in computing a per > condition average in source space (in order to be able to do statistical > inference across a group of subjects), computing and using the common > spatial filter as per the tutorial should do the trick. > I guess that the person who wrote the example code for some reason wanted > to have access to the single trial source data (as per point 3 in the > section ‘how to do this in fieldtrip’ on the example script page). > Projection of single trial data to the source level indeed blows up memory > requirements, and may only be necessary in certain non-standard cases. I > think it would be good to make this more explicit on the example page > (thanks for spotting it!). Would you mind helping out with this? It’s a > wiki after all ;-), and the example code is allowed to be > adjusted/extended. I suggest that we adjust the page a bit so that we make > explicit that we can reconstruct single trial data if needed (for this we > only need to make the example code correct), but that in most cases we can > work with averages across trials (for this we need to add a section that > more or less duplicates the creation of the ‘simple’ complex filter). The > way we usually tackle this is by creating a ‘bug’ out of this (or rather an > issue) on our bugzilla.fcdonders.nl issue-tracking system to make an > action list and to keep track of who’s doing what. > > Best wishes, > Jan-Mathijs > > > On Jul 15, 2014, at 7:26 PM, Max Cantor wrote: > > In the main beamformer tutorial ( > http://fieldtrip.fcdonders.nl/tutorial/beamformer), the common filter is > computed as follows: > > cfg.grid.filter = sourceAll.avg.filter; > sourcePre_con = ft_sourceanalysis(cfg, freqPre ); > sourcePost_con = ft_sourceanalysis(cfg, freqPost); > > However, in the separate common filters example script ( > http://fieldtrip.fcdonders.nl/example/common_filters_in_beamforming), the > common filter is much more complex. > > I've created working versions of both common filters for DICS, as well as > a working version of the 'simple' common filter for LCMV. I have a version > of the 'complex' common filter that should work, but it usually chews up my > computer's RAM (I have 16gb) and crashes matlab. The DICS one is also slow, > but not so bad that it crashes. However, I couldn't imagine running it on > all my datasets and being able to do any stats on the data without my > computer crashing. > > Before I post the code to see if maybe there is something wrong with it > causing the memory overloads, I was wondering if anyone could explain to me > what exactly the differences between the two methods are, and if it is even > necessary for me to get the more complex common filter working? The simple > common filters seem to work fine, but they could be affecting the data in > ways that are not obvious, so I want to make sure. > > As always, thank you Fieldtrippers > > -- > Max Cantor > Lab Manager > Computational Neurolinguistics Lab > University of Michigan > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Wed Jul 16 15:07:36 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Wed, 16 Jul 2014 15:07:36 +0200 (CEST) Subject: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data In-Reply-To: Message-ID: <171511570.2562741.1405516056153.JavaMail.root@bcbl.eu> Hi Eelke, thanks for your response - that sounds promising. I am running fieldtrip-20140527 on a 64 bit Linux server, so I'd be keen to give your suggestion a try. This is actually the first time I am calling mex-files using Matlab, but I assume that the way to go is to comment out the part of the code in ft_findcluster that combines the cluster and to call the mex-file instead? If yes, here is what I did: I copied the combineClusters.mexa64 file into a spearate folder and added that folder to my Matlab path. % combine clusters that are connected in neighbouring channel(s) % (combinations). Convert inputs to uint32 as that is required by the mex % file (and the values will be positive integers anyway). addpath('/path2home/mex/'); cluster = combineClusters(uint32(labelmat), logical(spatdimneighbstructmat), uint32(total)); I am not sure however how to call the mex function. Is this done automatically or do I need to add some further steps? May I ask you which approach you are using? Best, Fred Frédéric Roux ----- Original Message ----- From: "Eelke Spaak" To: "FieldTrip discussion list" Sent: Wednesday, July 16, 2014 9:39:03 AM Subject: Re: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data Hi Fred, Some time ago, I replaced parts of the clustering routine with a mex-file. For me this greatly sped up the cluster stats. I guess you are using a fairly recent (<1yr old) FT version? The platform you're using might also be relevant, I just noticed that the mex-file (private/combineClusters.mex*) is distributed in compiled form only for Linux 64 and Windows 32/64 bit. If you're e.g. on a Macintosh, you could compile it yourself from the src/combineClusters.cpp source file. I know of no attempts to parallelise the clustering code. Best, Eelke On 15 July 2014 17:40, Frédéric Roux wrote: > Dear all, > > I would like to ask if anyone has ever tried to speed up the ft_statistics_montecarlo function > by using Matlab's parallel computing toolbox ? > > I would like to run clusterstatistics on time-frequency data, but as a result of the large number > of time and frequency bins, the function runs very slowly. So I was thinking to try and modify > the code by running the loops over the frequency bins in parallel and see if that could save > some time. > > Before starting to adapt the code on my own, however, I wanted to ask if anyone had ever tried that > and also if there could be any possible reasons which would make that this is not a feasible project. > > Any thoughts or suggestions would be highly appreciated. > > Best, > Fred > > > --------------------------------------------------------------------------- > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hweeling.lee at gmail.com Thu Jul 17 13:26:59 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 17 Jul 2014 13:26:59 +0200 Subject: [FieldTrip] testing if power is significantly different from zero Message-ID: Hi all, I have a naive question regarding cluster statistics in fieldtrip. Is it possible to run a statistical analysis to test if power is significantly different from zero? If so, how do I build the design matrix for this case? Thanks. Cheers, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.lam at fcdonders.ru.nl Thu Jul 17 13:56:35 2014 From: n.lam at fcdonders.ru.nl (Lam, Nietzsche) Date: Thu, 17 Jul 2014 13:56:35 +0200 (CEST) Subject: [FieldTrip] testing if power is significantly different from zero In-Reply-To: Message-ID: <613650745.758220.1405598195481.JavaMail.root@indus.zimbra.ru.nl> Hi Hweeling, I think the approach is similar to testing two different conditions. I have a suggestion below, but I think some people would argue that this is not a good way to do the test. You can keep the design matrix the same as comparing two conditions, but for the "zero" condition, you will turn this all into zeros. dat1.powspctrm = %power from your condition of interest dat2 = dat1 % your "zero" condition" dat2.powspctrm(:) = 0; % making the data structure identical to condition of interest but everything is zero. Then call your statistics function as before. Perhaps someone else can give you more detail on this. Nietzsche ----- Original Message ----- > From: "Hwee Ling Lee" > To: "FieldTrip discussion list" > Sent: Thursday, 17 July, 2014 1:26:59 PM > Subject: [FieldTrip] testing if power is significantly different from zero > Hi all, > > > I have a naive question regarding cluster statistics in fieldtrip. > > > Is it possible to run a statistical analysis to test if power is > significantly different from zero? If so, how do I build the design > matrix for this case? > > > Thanks. > > > Cheers, > Hweeling > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Nietzsche H.L. Lam, MSc PhD Candidate Max Planck Institute for Psycholinguistics Wundtlaan 1, 6525 XD Nijmegen, The Netherlands Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Kapittelweg 29, 6525EN Nijmegen, The Netherlands n.lam at fcdonders.ru.nl +31-24-3668219 neurobiologyoflanguage.com From jm.horschig at donders.ru.nl Thu Jul 17 15:38:54 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Thu, 17 Jul 2014 15:38:54 +0200 Subject: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data In-Reply-To: <171511570.2562741.1405516056153.JavaMail.root@bcbl.eu> References: <171511570.2562741.1405516056153.JavaMail.root@bcbl.eu> Message-ID: <53C7D1EE.8040007@donders.ru.nl> Hi Fred, Matlab is giving mex-files precedence over .m file as long as the mex-file is on the path. The easiest ways to check whether Matlab uses the mex-file is to type >> which combineClusters that should point to the mex file. Another way to check is to put a breakpoint in the beginning of the .m-file, and then call combineClusters or run your code. If the mex-file is executed, Matlab will not enter the .m-file and thus not arrive and not stop at the breakpoint. However, the files are also in FieldTrip/private, and this is the place where other functions that FieldTrip uses are stored. So, actually there is no need for you to copy the files over to a separate folder. FieldTrip/Matlab should execute the mex-files all by itself already. Best, Jörn On 7/16/2014 3:07 PM, Frédéric Roux wrote: > Hi Eelke, > > thanks for your response - that sounds promising. > > I am running fieldtrip-20140527 on a 64 bit Linux server, so I'd > be keen to give your suggestion a try. > > This is actually the first time I am calling mex-files using Matlab, > but I assume that the way to go is to comment out the part of the code > in ft_findcluster that combines the cluster and to call the mex-file instead? > > If yes, here is what I did: I copied the combineClusters.mexa64 file into > a spearate folder and added that folder to my Matlab path. > > % combine clusters that are connected in neighbouring channel(s) > % (combinations). Convert inputs to uint32 as that is required by the mex > % file (and the values will be positive integers anyway). > addpath('/path2home/mex/'); > cluster = combineClusters(uint32(labelmat), logical(spatdimneighbstructmat), uint32(total)); > > I am not sure however how to call the mex function. Is this done automatically or do > I need to add some further steps? May I ask you which approach you are using? > > Best, > Fred > > > > Frédéric Roux > > ----- Original Message ----- > From: "Eelke Spaak" > To: "FieldTrip discussion list" > Sent: Wednesday, July 16, 2014 9:39:03 AM > Subject: Re: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data > > Hi Fred, > > Some time ago, I replaced parts of the clustering routine with a > mex-file. For me this greatly sped up the cluster stats. I guess you > are using a fairly recent (<1yr old) FT version? The platform you're > using might also be relevant, I just noticed that the mex-file > (private/combineClusters.mex*) is distributed in compiled form only > for Linux 64 and Windows 32/64 bit. If you're e.g. on a Macintosh, you > could compile it yourself from the src/combineClusters.cpp source > file. > > I know of no attempts to parallelise the clustering code. > > Best, > Eelke > > On 15 July 2014 17:40, Frédéric Roux wrote: >> Dear all, >> >> I would like to ask if anyone has ever tried to speed up the ft_statistics_montecarlo function >> by using Matlab's parallel computing toolbox ? >> >> I would like to run clusterstatistics on time-frequency data, but as a result of the large number >> of time and frequency bins, the function runs very slowly. So I was thinking to try and modify >> the code by running the loops over the frequency bins in parallel and see if that could save >> some time. >> >> Before starting to adapt the code on my own, however, I wanted to ask if anyone had ever tried that >> and also if there could be any possible reasons which would make that this is not a feasible project. >> >> Any thoughts or suggestions would be highly appreciated. >> >> Best, >> Fred >> >> >> --------------------------------------------------------------------------- >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From constantino.mendezbertolo at ctb.upm.es Thu Jul 17 15:45:24 2014 From: constantino.mendezbertolo at ctb.upm.es (=?UTF-8?Q?Constantino_M=C3=A9ndez_B=C3=A9rtolo?=) Date: Thu, 17 Jul 2014 15:45:24 +0200 Subject: [FieldTrip] testing if power is significantly different from zero In-Reply-To: <613650745.758220.1405598195481.JavaMail.root@indus.zimbra.ru.nl> References: <613650745.758220.1405598195481.JavaMail.root@indus.zimbra.ru.nl> Message-ID: Bump, wishing that some sage fieldtripper either back-up the "t-test against homologue data filled with zeros method" or suggests a better approach, thx 2014-07-17 13:56 GMT+02:00 Lam, Nietzsche : > Hi Hweeling, > > I think the approach is similar to testing two different conditions. I > have a suggestion below, but I think some people would argue that this is > not a good way to do the test. > > You can keep the design matrix the same as comparing two conditions, but > for the "zero" condition, you will turn this all into zeros. > dat1.powspctrm = %power from your condition of interest > dat2 = dat1 % your "zero" condition" > dat2.powspctrm(:) = 0; % making the data structure identical to condition > of interest but everything is zero. > Then call your statistics function as before. > > Perhaps someone else can give you more detail on this. > > Nietzsche > > ----- Original Message ----- > > From: "Hwee Ling Lee" > > To: "FieldTrip discussion list" > > Sent: Thursday, 17 July, 2014 1:26:59 PM > > Subject: [FieldTrip] testing if power is significantly different from > zero > > Hi all, > > > > > > I have a naive question regarding cluster statistics in fieldtrip. > > > > > > Is it possible to run a statistical analysis to test if power is > > significantly different from zero? If so, how do I build the design > > matrix for this case? > > > > > > Thanks. > > > > > > Cheers, > > Hweeling > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Nietzsche H.L. Lam, MSc > PhD Candidate > > Max Planck Institute for Psycholinguistics > Wundtlaan 1, 6525 XD Nijmegen, The Netherlands > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Kapittelweg 29, 6525EN Nijmegen, The Netherlands > > n.lam at fcdonders.ru.nl > +31-24-3668219 > > > neurobiologyoflanguage.com > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Constantino Méndez-Bértolo Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) Parque Científico y Tecnológico de la UPM, Campus de Montegancedo 28223 Pozuelo de Alarcón, Madrid, SPAIN -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Jul 17 16:43:34 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 17 Jul 2014 16:43:34 +0200 Subject: [FieldTrip] testing if power is significantly different from zero In-Reply-To: References: <613650745.758220.1405598195481.JavaMail.root@indus.zimbra.ru.nl> Message-ID: <53C7E116.6000009@donders.ru.nl> Hey, I actually wouldn't advise to test power against 0. Since power is a positive measure (bound to 0), noise will cumulatatively add up and your test against 0 will effectively check whether you recorded something (aka noise) or not. But, as Nietzsche said, you can ask whether your measured powered is significantly different from 0 using her approach. It's just not a very clever question to ask... ;) Best, Jörn On 7/17/2014 3:45 PM, Constantino Méndez Bértolo wrote: > Bump, > wishing that some sage fieldtripper either back-up the "t-test against > homologue data filled with zeros method" or suggests a better approach, > thx > > > 2014-07-17 13:56 GMT+02:00 Lam, Nietzsche >: > > Hi Hweeling, > > I think the approach is similar to testing two different > conditions. I have a suggestion below, but I think some people > would argue that this is not a good way to do the test. > > You can keep the design matrix the same as comparing two > conditions, but for the "zero" condition, you will turn this all > into zeros. > dat1.powspctrm = %power from your condition of interest > dat2 = dat1 % your "zero" condition" > dat2.powspctrm(:) = 0; % making the data structure identical to > condition of interest but everything is zero. > Then call your statistics function as before. > > Perhaps someone else can give you more detail on this. > > Nietzsche > > ----- Original Message ----- > > From: "Hwee Ling Lee" > > > To: "FieldTrip discussion list" > > > Sent: Thursday, 17 July, 2014 1:26:59 PM > > Subject: [FieldTrip] testing if power is significantly different > from zero > > Hi all, > > > > > > I have a naive question regarding cluster statistics in fieldtrip. > > > > > > Is it possible to run a statistical analysis to test if power is > > significantly different from zero? If so, how do I build the design > > matrix for this case? > > > > > > Thanks. > > > > > > Cheers, > > Hweeling > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Nietzsche H.L. Lam, MSc > PhD Candidate > > Max Planck Institute for Psycholinguistics > Wundtlaan 1, 6525 XD Nijmegen, The Netherlands > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Kapittelweg 29, 6525EN Nijmegen, The Netherlands > > n.lam at fcdonders.ru.nl > +31-24-3668219 > > > neurobiologyoflanguage.com > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Constantino Méndez-Bértolo > Laboratorio de Neurociencia Clínica,Centro de Tecnología Biomédica (CTB) > > Parque Científico y Tecnológico de la UPM, Campus de Montegancedo > > 28223 Pozuelo deAlarcón, Madrid, SPAIN > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From hweeling.lee at gmail.com Thu Jul 17 17:44:53 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 17 Jul 2014 17:44:53 +0200 Subject: [FieldTrip] testing if power is significantly different from zero In-Reply-To: <53C7E116.6000009@donders.ru.nl> References: <613650745.758220.1405598195481.JavaMail.root@indus.zimbra.ru.nl> <53C7E116.6000009@donders.ru.nl> Message-ID: Hi, Thanks for all the input. The reason I wanted to test if power is significantly different from 0 is to check if the power in condition 1 resembles to what is reported in the literature. This is just to ensure that the changes observed in condition 2 relative to condition 1 makes sense. Cheers, Hweeling On 17 July 2014 16:43, "Jörn M. Horschig" wrote: > Hey, > > I actually wouldn't advise to test power against 0. Since power is a > positive measure (bound to 0), noise will cumulatatively add up and your > test against 0 will effectively check whether you recorded something (aka > noise) or not. But, as Nietzsche said, you can ask whether your measured > powered is significantly different from 0 using her approach. It's just not > a very clever question to ask... ;) > > Best, > Jörn > > > > On 7/17/2014 3:45 PM, Constantino Méndez Bértolo wrote: > >> Bump, >> wishing that some sage fieldtripper either back-up the "t-test against >> homologue data filled with zeros method" or suggests a better approach, >> thx >> >> >> 2014-07-17 13:56 GMT+02:00 Lam, Nietzsche > n.lam at fcdonders.ru.nl>>: >> >> >> Hi Hweeling, >> >> I think the approach is similar to testing two different >> conditions. I have a suggestion below, but I think some people >> would argue that this is not a good way to do the test. >> >> You can keep the design matrix the same as comparing two >> conditions, but for the "zero" condition, you will turn this all >> into zeros. >> dat1.powspctrm = %power from your condition of interest >> dat2 = dat1 % your "zero" condition" >> dat2.powspctrm(:) = 0; % making the data structure identical to >> condition of interest but everything is zero. >> Then call your statistics function as before. >> >> Perhaps someone else can give you more detail on this. >> >> Nietzsche >> >> ----- Original Message ----- >> > From: "Hwee Ling Lee" > > >> > To: "FieldTrip discussion list" > > >> > Sent: Thursday, 17 July, 2014 1:26:59 PM >> > Subject: [FieldTrip] testing if power is significantly different >> from zero >> > Hi all, >> > >> > >> > I have a naive question regarding cluster statistics in fieldtrip. >> > >> > >> > Is it possible to run a statistical analysis to test if power is >> > significantly different from zero? If so, how do I build the design >> > matrix for this case? >> > >> > >> > Thanks. >> > >> > >> > Cheers, >> > Hweeling >> > >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -- >> Nietzsche H.L. Lam, MSc >> PhD Candidate >> >> Max Planck Institute for Psycholinguistics >> Wundtlaan 1, 6525 XD Nijmegen, The Netherlands >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Kapittelweg 29, 6525EN Nijmegen, The Netherlands >> >> n.lam at fcdonders.ru.nl >> +31-24-3668219 >> >> >> neurobiologyoflanguage.com >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> Constantino Méndez-Bértolo >> Laboratorio de Neurociencia Clínica,Centro de Tecnología Biomédica (CTB) >> >> >> Parque Científico y Tecnológico de la UPM, Campus de Montegancedo >> >> 28223 Pozuelo deAlarcón, Madrid, SPAIN >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- > Jörn M. Horschig > PhD Student > > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.heusser at gmail.com Thu Jul 17 20:15:54 2014 From: andrew.heusser at gmail.com (Andrew Heusser) Date: Thu, 17 Jul 2014 14:15:54 -0400 Subject: [FieldTrip] Computing cluster sizes on group-level topographic maps without using built in monte carlo statistics Message-ID: Dear Fieldtrippers, I am working on an MEG analysis where I compute average oscillatory power for a given band for each trial in my experiment, and then perform a parametric regression over trials to obtain a t-statistic representing the fit to the model at each sensor and for each subject (for a given band). This leaves me with a topographic map of t-statistics for each subject for a given frequency band. Then, to compute reliability across subjects, I perform a one-sample t-test on the model fits across subjects for a given sensor to get a group-level topographic map of significance values. I would like to cluster correct these group-level maps by iteratively shuffling trials within subject and recomputing model fits, recomputing the group maps, and then finding the size of clusters to build a null distribution of cluster sizes. 1) Using the Fieldtrip functions (i.e. ft_freqstatistics), is there a simple way to grab cluster sizes from these 'shuffled' group-level statistical maps so that I can build a null distribution of cluster sizes and find a cluster threshold? Rather, is it possible to obtain cluster sizes on any statistical map without using the monte carlo statistics? 2) Does this approach logically make sense, or is there maybe another way to achieve this that I haven't thought of? Thank you in advance for you help! -- Andy Graduate Student at NYU -------------- next part -------------- An HTML attachment was scrubbed... URL: From fiebach at psych.uni-frankfurt.de Fri Jul 18 00:25:33 2014 From: fiebach at psych.uni-frankfurt.de (Christian Fiebach) Date: Fri, 18 Jul 2014 00:25:33 +0200 Subject: [FieldTrip] 1 PostDoc position, 2 PhD positions, Language & Predictive Coding, Frankfurt/Germany Message-ID: <3C1EE673-44B3-40ED-A6F8-189A1BF256F5@psych.uni-frankfurt.de> Dear colleagues, I would be thankful if you could forward this to interested colleagues and students. Thanks in advance, Christian Fiebeach __________________________________________________________________ The Cognitive Neuroscience Lab (Prof. Christian Fiebach) at the Department of Psychology of Goethe University Frankfurt offers three research positions as part of an ERC consolidator project that investigates neurophysiological mechanisms of language processing from a predictive coding perspective: Postdoctoral Researcher (German Salary Level E13, 100%) in Cognitive and Computational Neuroscience of Language We seek a colleague with a strong background in EEG/MEG, fMRI, and/or neuro-computational modeling, and an interest in brain mechanisms underlying language processing. You should have skills in signal processing, data analysis, and/or computational modeling, programming skills (e.g., Matlab, Python), and willingness to acquire expertise in all three methods. The successful candidate will be involved in all aspects of the project and should be motivated to further develop this topic. The position is offered initially for two years. However, an extension for up to five years is possible. Two PhD positions (German Salary Level E13, 65%) in Cognitive Neuroscience of Language The PhD projects involve fMRI and MEG/EEG experiments in the field of language processing. We encourage applications from excellent and enthusiastic candidates with MSc or equivalent degrees from Psychology, Neuroscience, Computational Neuroscience, Biology, Physics, or related areas, who share our interest in understanding investigating the neural bases of language processing. Programming skills (e.g., Matlab, Python) are appreciated. Tasks involve the design, acquisition, and analysis of fMRI and MEG/EEG experiments, as well as the publication of research findings. The PhD positions involve funding for three years. Our lab is at the Department of Psychology and is part of Frankfurt’s vibrant neuroscience community (Interdisciplinary Center for Neurosciences Frankfurt) and the larger Rhein-Main area (Rhein Main Neuroscience Network Frankfurt/Mainz). We have access to state of the art facilities involving the Frankfurt Brain Imaging Center with two 3T MR scanners and a 275 channel MEG, as well as EEG, fNIRS and eye tracking. The positions are available from September 1, 2014, and available until filled. Further information can be obtained directly from Christian Fiebach. Please send your complete application (including CV, certificates, as well as names of two referees) electronically to Prof. Christian Fiebach, Department of Psychology, Goethe University Frankfurt, Grüneburgplatz 1, D-60323 Frankfurt am Main (fiebach at psych.uni-frankfurt.de). -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: FiebachLabFrankfurt_1PostDoc_2PhD_ERCproject.pdf Type: application/pdf Size: 138583 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Jul 18 08:48:31 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 18 Jul 2014 08:48:31 +0200 Subject: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data In-Reply-To: <53C7D1EE.8040007@donders.ru.nl> References: <171511570.2562741.1405516056153.JavaMail.root@bcbl.eu> <53C7D1EE.8040007@donders.ru.nl> Message-ID: Hi Fred, Just to add to Jörn's comment, to be entirely clear: you should not need to edit FT code to enable using the combineClusters mex-file; the default code should be calling it already. If it isn't, either something is wrong, or the mex-file has not been compiled for your platform (but I guess the latter is not the case since you're on Linux 64). Note that the 'which combineClusters' on the default command window won't work as combineClusters is a private function. Hope that helps. Best, Eelke On 17 July 2014 15:38, "Jörn M. Horschig" wrote: > Hi Fred, > > Matlab is giving mex-files precedence over .m file as long as the mex-file > is on the path. The easiest ways to check whether Matlab uses the mex-file > is to type >>> which combineClusters > that should point to the mex file. Another way to check is to put a > breakpoint in the beginning of the .m-file, and then call combineClusters or > run your code. If the mex-file is executed, Matlab will not enter the > .m-file and thus not arrive and not stop at the breakpoint. > > However, the files are also in FieldTrip/private, and this is the place > where other functions that FieldTrip uses are stored. So, actually there is > no need for you to copy the files over to a separate folder. > FieldTrip/Matlab should execute the mex-files all by itself already. > > Best, > Jörn > > > On 7/16/2014 3:07 PM, Frédéric Roux wrote: >> >> Hi Eelke, >> >> thanks for your response - that sounds promising. >> >> I am running fieldtrip-20140527 on a 64 bit Linux server, so I'd >> be keen to give your suggestion a try. >> >> This is actually the first time I am calling mex-files using Matlab, >> but I assume that the way to go is to comment out the part of the code >> in ft_findcluster that combines the cluster and to call the mex-file >> instead? >> >> If yes, here is what I did: I copied the combineClusters.mexa64 file into >> a spearate folder and added that folder to my Matlab path. >> >> % combine clusters that are connected in neighbouring channel(s) >> % (combinations). Convert inputs to uint32 as that is required by the mex >> % file (and the values will be positive integers anyway). >> addpath('/path2home/mex/'); >> cluster = combineClusters(uint32(labelmat), >> logical(spatdimneighbstructmat), uint32(total)); >> >> I am not sure however how to call the mex function. Is this done >> automatically or do >> I need to add some further steps? May I ask you which approach you are >> using? >> >> Best, >> Fred >> >> >> >> Frédéric Roux >> >> ----- Original Message ----- >> From: "Eelke Spaak" >> To: "FieldTrip discussion list" >> Sent: Wednesday, July 16, 2014 9:39:03 AM >> Subject: Re: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance >> computation speed for time-frequency data >> >> Hi Fred, >> >> Some time ago, I replaced parts of the clustering routine with a >> mex-file. For me this greatly sped up the cluster stats. I guess you >> are using a fairly recent (<1yr old) FT version? The platform you're >> using might also be relevant, I just noticed that the mex-file >> (private/combineClusters.mex*) is distributed in compiled form only >> for Linux 64 and Windows 32/64 bit. If you're e.g. on a Macintosh, you >> could compile it yourself from the src/combineClusters.cpp source >> file. >> >> I know of no attempts to parallelise the clustering code. >> >> Best, >> Eelke >> >> On 15 July 2014 17:40, Frédéric Roux wrote: >>> >>> Dear all, >>> >>> I would like to ask if anyone has ever tried to speed up the >>> ft_statistics_montecarlo function >>> by using Matlab's parallel computing toolbox ? >>> >>> I would like to run clusterstatistics on time-frequency data, but as a >>> result of the large number >>> of time and frequency bins, the function runs very slowly. So I was >>> thinking to try and modify >>> the code by running the loops over the frequency bins in parallel and see >>> if that could save >>> some time. >>> >>> Before starting to adapt the code on my own, however, I wanted to ask if >>> anyone had ever tried that >>> and also if there could be any possible reasons which would make that >>> this is not a feasible project. >>> >>> Any thoughts or suggestions would be highly appreciated. >>> >>> Best, >>> Fred >>> >>> >>> >>> --------------------------------------------------------------------------- >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From j.herring at fcdonders.ru.nl Fri Jul 18 15:06:40 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Fri, 18 Jul 2014 15:06:40 +0200 (CEST) Subject: [FieldTrip] Fwd: variable "abort" In-Reply-To: <1405337932.32621.YahooMailNeo@web141605.mail.bf1.yahoo.com> Message-ID: <68127070.3916400.1405688800801.JavaMail.root@draco.zimbra.ru.nl> Dear Payman, I'm forwarding this e-mail to the mailinglist as the solution might be useful for others. Best, Jim ----- Doorgestuurd bericht ----- > Van: "paymando- morientes" > Aan: "J.D. Herring (Jim)" > Verzonden: Maandag 14 juli 2014 13:38:52 > Onderwerp: Re: [FieldTrip] variable "abort" > Thanks for your help. I found where the problem was. I had two > versions of FieldTrip installed . I removed the older one and the > problem was solved. > regards > payman > On Monday, 14 July 2014, 9:15, "Herring, J.D. (Jim)" > wrote: > Hi Payman, > ‘abort’ is indeed set by ft_preamble_init, which is called by > ft_definetrial through ft_preamble. This function is located in > fieldtrip/utilities. Could it be that your paths are not correctly > set? Did you run ft_defaults before running your script? > Best, > Jim > From: paymando- morientes [mailto:paymandomorientes at yahoo.com] > Sent: donderdag 10 juli 2014 20:24 > To: Herring, J.D. (Jim); 'FieldTrip discussion list' > Subject: Re: [FieldTrip] variable "abort" > oh sorry I mistyped it. I meant ft_definetrial. > thanks for your help > On Thursday, 10 July 2014, 13:40, "Herring, J.D. (Jim)" < > j.herring at fcdonders.ru.nl > wrote: > Dear Payman, > As far as I can tell there is no function called ft_definevarible, > could you please recheck which function is given you problems? > Best, > Jim > From: fieldtrip-bounces at science.ru.nl [ > mailto:fieldtrip-bounces at science.ru.nl ] On Behalf Of paymando- > morientes > Sent: donderdag 10 juli 2014 13:23 > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] variable "abort" > Dear all > I have a problem starting with field trip. When I call > "ft_definevarible" function, it throws an error that "abort" variable > is not defined. I checked the ".m file" for the function and it says > that abort is set by "ft_preamble" function. So where is the problem? > Should I change something in my script? or "ft_preamble" function is > not doing its job? > by the way i hope I am sending this message to the right e-mail. > thanks in advance > payman -- Jim Herring, MSc. Neuronal Oscillations Group Centre for Cognitive Neuroimaging Donders Institute for Brain, Cognition and Behaviour Radboud University Nijmegen -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Fri Jul 18 23:54:05 2014 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Fri, 18 Jul 2014 21:54:05 +0000 Subject: [FieldTrip] ft_volumerealign always producing coordsys 'ctf'. Message-ID: Hi all, I had understood, that using ft_volumerealign, and manually marking fiducials, should produce a new structure (mri_real) with a cfg.coordsys matching the actual MEG system you are using- in my case neuromag. However, no mater how much I play around with the ft_volumerealign, I always end up with a structure with mri_real.coordsys='ctf'. Later down the track, my volume conduction model is not properly aligned to my sensors. Currently I am just using the following basic code: cfg=[]; cfg.method = 'interactive'; mri_real = ft_volumerealign(cfg, mri); Does anyone know what I am doing wrong here? Cheers, Kaelasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From azadehh at uvic.ca Sat Jul 19 00:26:06 2014 From: azadehh at uvic.ca (Azadeh Hajihosseini) Date: Fri, 18 Jul 2014 15:26:06 -0700 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices Message-ID: Hello FieldTrip members, I am trying to source localize EEG oscillatory activity and have a few problems in constructing the forward model and eventually running the source analysis. I think the problems are related to each other. Here is what happens: 1- When I run the source analysis, I get this error message: *??? Error using ==> svd* *Input to SVD must not contain NaN or Inf.* *Error in ==> beamformer_dics>pinv at 650* * [U,S,V] = svd(A,0);* *Error in ==> beamformer_dics at 339* * filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross eqn. 3, use PINV/SVD to cover rank* * deficient leadfield* *Error in ==> ft_sourceanalysis at 572* * dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:});* *Error in ==> test_sourceanalysis at 12* *sourceTF = ft_sourceanalysis(cfg, data_TF);* 2- Checking the leadfiled matrices, I see there are a lot of NaN values. 3- When I visualize the head model I have created, the plots don't look right. The third field, *vol.bnd(3),* which is supposed to be the brain tissue, looks like a cube. And here are my code lines: *% CONSTRUCT A HEAD MODEL from the template mri in FT's template/anatomy* *mri = ft_read_mri('template\anatomy\single_subj_T1.nii');* *mri.coordsys = 'spm';* *%SEGMENTATION:* *cfg = [];* *cfg.output = {'brain','skull','scalp'};* *segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT resliced data* *save segmentedmri_template segmentedmri_template* *%CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL)* *cfg = [];* *cfg.method ='bemcp';* *cfg.tissue ={'brain','skull','scalp'};* *% cfg.outputfile = 'template_';* *vol = ft_prepare_headmodel(cfg, segmentedmri_template);* *save vol vol* *%Visualization of the head model* *figure;* *ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp * *figure;* *ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull* *figure;* *ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks like a cube* *% Align electrodes * *elec = ft_read_sens('template\electrode\standard_1020.elc'); * *% load volume conduction model* *% load vol; * *%interactive allignment* *cfg = [];* *cfg.method = 'interactive';* *cfg.elec = elec;* *cfg.headshape = vol.bnd(1);* *elec_aligned = ft_electroderealign(cfg);* *save elec_aligned elec_aligned* *% Prepare leadfield* *load data_TF* *cfg=[];* *cfg.vol = vol; %structure with volume conduction model* *cfg.elec = elec_aligned;%structure with electrode positions* *[grid] = ft_prepare_leadfield(cfg, data_TF);* *% Find source* *cfg = []; * *cfg.method = 'dics';* *cfg.frequency = 25; * *cfg.grid = grid; * *cfg.vol = vol;* *cfg.latency = .4;%single number in seconds, for time-frequency analysis* *cfg.dics.projectnoise = 'yes';* *cfg.dics.lambda = 0;* *cfg.elec = elec_aligned;%structure with electrode positions* *sourceTF = ft_sourceanalysis(cfg, data_TF);* I am using *wavelet *with a *fourier* output for the time-frequency analysis (*data_TF)*. Do you have any idea what might be wrong here? I also have a more general question. What type of time-frequency data can be input to source analysis? *ft_freqanalysis* provides power, power and cross-spectra, and complex fourier outputs. But is source-localization based on only power data correct? I couldn't find any explanations regarding this issue in the tutorial. I look forward to hearing from anyone who might have ideas about any of these issues! Many thanks, -- Azadeh HajiHosseini -------------- next part -------------- An HTML attachment was scrubbed... URL: From jinghua1227 at gmail.com Sat Jul 19 05:48:36 2014 From: jinghua1227 at gmail.com (Jinghua OU) Date: Sat, 19 Jul 2014 11:48:36 +0800 Subject: [FieldTrip] Problems with ft_resampledata Message-ID: Hello, I am using ft_resampledata to downsize my data and the code is as follows: cfg = []; cfg.resamplefs = 500; cfg.detrend = 'no'; data_resample = ft_resampledata(cfg, data_AR_bc); however, some errors occur as follows: ??? Undefined function or method 'resample' for input arguments of type 'double'. Error in ==> ft_resampledata at 182 data.trial{itr} = transpose(resample(transpose(data.trial{itr}),fsres,fsorig)); Is there something I'm missing? Thank you very much for your help in advacne. Best, Jinghua -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Sat Jul 19 08:45:51 2014 From: roeysc at gmail.com (Roey Schurr) Date: Sat, 19 Jul 2014 09:45:51 +0300 Subject: [FieldTrip] ft_volumerealign always producing coordsys 'ctf'. In-Reply-To: References: Message-ID: Dear Kaelasha, If I understand correctly (and as describes in the function's code), ft_realign has a default coordinate system that is used when using the different methods of realigning. When using 'interactive', this default is indeed ctf. Please try the following (specifying the coordinate system yourself) and tell us how it goes: cfg=[]; cfg.method = 'interactive'; cfg.coordsys = 'neurmag'; mri_real = ft_volumerealign(cfg, mri); Best, Roey On Sat, Jul 19, 2014 at 12:54 AM, Kaelasha Tyler wrote: > Hi all, > > I had understood, that using ft_volumerealign, and manually marking > fiducials, should produce a new structure (mri_real) with a cfg.coordsys > matching the actual MEG system you are using- in my case neuromag. > > However, no mater how much I play around with the ft_volumerealign, I > always end up with a structure with mri_real.coordsys='ctf'. > > Later down the track, my volume conduction model is not properly aligned > to my sensors. > > Currently I am just using the following basic code: > > > cfg=[]; > > cfg.method = 'interactive'; > > mri_real = ft_volumerealign(cfg, mri); > > Does anyone know what I am doing wrong here? > > Cheers, > Kaelasha > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Sun Jul 20 08:35:23 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Sun, 20 Jul 2014 06:35:23 +0000 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: References: Message-ID: <4C11F599-521E-49EA-B84D-6F46BF24A201@flinders.edu.au> I don't know if this advice is at all correct but I usually get that error if I've got a relatively small number of electrodes (~29) or a small data set (30 seconds of data). Does that sound familiar? I usually clear all and run it again and it will work eventually haha Sent from my iPad On 19 Jul 2014, at 8:01 am, "Azadeh Hajihosseini" > wrote: Hello FieldTrip members, I am trying to source localize EEG oscillatory activity and have a few problems in constructing the forward model and eventually running the source analysis. I think the problems are related to each other. Here is what happens: 1- When I run the source analysis, I get this error message: ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> beamformer_dics>pinv at 650 [U,S,V] = svd(A,0); Error in ==> beamformer_dics at 339 filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross eqn. 3, use PINV/SVD to cover rank deficient leadfield Error in ==> ft_sourceanalysis at 572 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); Error in ==> test_sourceanalysis at 12 sourceTF = ft_sourceanalysis(cfg, data_TF); 2- Checking the leadfiled matrices, I see there are a lot of NaN values. 3- When I visualize the head model I have created, the plots don't look right. The third field, vol.bnd(3), which is supposed to be the brain tissue, looks like a cube. And here are my code lines: % CONSTRUCT A HEAD MODEL from the template mri in FT's template/anatomy mri = ft_read_mri('template\anatomy\single_subj_T1.nii'); mri.coordsys = 'spm'; %SEGMENTATION: cfg = []; cfg.output = {'brain','skull','scalp'}; segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT resliced data save segmentedmri_template segmentedmri_template %CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL) cfg = []; cfg.method ='bemcp'; cfg.tissue ={'brain','skull','scalp'}; % cfg.outputfile = 'template_'; vol = ft_prepare_headmodel(cfg, segmentedmri_template); save vol vol %Visualization of the head model figure; ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp figure; ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull figure; ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks like a cube % Align electrodes elec = ft_read_sens('template\electrode\standard_1020.elc'); % load volume conduction model % load vol; %interactive allignment cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_aligned = ft_electroderealign(cfg); save elec_aligned elec_aligned % Prepare leadfield load data_TF cfg=[]; cfg.vol = vol; %structure with volume conduction model cfg.elec = elec_aligned;%structure with electrode positions [grid] = ft_prepare_leadfield(cfg, data_TF); % Find source cfg = []; cfg.method = 'dics'; cfg.frequency = 25; cfg.grid = grid; cfg.vol = vol; cfg.latency = .4;%single number in seconds, for time-frequency analysis cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = 0; cfg.elec = elec_aligned;%structure with electrode positions sourceTF = ft_sourceanalysis(cfg, data_TF); I am using wavelet with a fourier output for the time-frequency analysis (data_TF). Do you have any idea what might be wrong here? I also have a more general question. What type of time-frequency data can be input to source analysis? ft_freqanalysis provides power, power and cross-spectra, and complex fourier outputs. But is source-localization based on only power data correct? I couldn't find any explanations regarding this issue in the tutorial. I look forward to hearing from anyone who might have ideas about any of these issues! Many thanks, -- Azadeh HajiHosseini _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Sun Jul 20 11:14:25 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Sun, 20 Jul 2014 09:14:25 +0000 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: <4C11F599-521E-49EA-B84D-6F46BF24A201@flinders.edu.au> References: <4C11F599-521E-49EA-B84D-6F46BF24A201@flinders.edu.au> Message-ID: <1E693A08-6073-49AE-BDAD-D028B3F73BA3@flinders.edu.au> Also are the units the same for your Headmodel, electrodes and sourcemodel(?) Sent from my iPad On 20 Jul 2014, at 4:08 pm, "Tyler Grummett" > wrote: I don't know if this advice is at all correct but I usually get that error if I've got a relatively small number of electrodes (~29) or a small data set (30 seconds of data). Does that sound familiar? I usually clear all and run it again and it will work eventually haha Sent from my iPad On 19 Jul 2014, at 8:01 am, "Azadeh Hajihosseini" > wrote: Hello FieldTrip members, I am trying to source localize EEG oscillatory activity and have a few problems in constructing the forward model and eventually running the source analysis. I think the problems are related to each other. Here is what happens: 1- When I run the source analysis, I get this error message: ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> beamformer_dics>pinv at 650 [U,S,V] = svd(A,0); Error in ==> beamformer_dics at 339 filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross eqn. 3, use PINV/SVD to cover rank deficient leadfield Error in ==> ft_sourceanalysis at 572 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); Error in ==> test_sourceanalysis at 12 sourceTF = ft_sourceanalysis(cfg, data_TF); 2- Checking the leadfiled matrices, I see there are a lot of NaN values. 3- When I visualize the head model I have created, the plots don't look right. The third field, vol.bnd(3), which is supposed to be the brain tissue, looks like a cube. And here are my code lines: % CONSTRUCT A HEAD MODEL from the template mri in FT's template/anatomy mri = ft_read_mri('template\anatomy\single_subj_T1.nii'); mri.coordsys = 'spm'; %SEGMENTATION: cfg = []; cfg.output = {'brain','skull','scalp'}; segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT resliced data save segmentedmri_template segmentedmri_template %CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL) cfg = []; cfg.method ='bemcp'; cfg.tissue ={'brain','skull','scalp'}; % cfg.outputfile = 'template_'; vol = ft_prepare_headmodel(cfg, segmentedmri_template); save vol vol %Visualization of the head model figure; ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp figure; ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull figure; ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks like a cube % Align electrodes elec = ft_read_sens('template\electrode\standard_1020.elc'); % load volume conduction model % load vol; %interactive allignment cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_aligned = ft_electroderealign(cfg); save elec_aligned elec_aligned % Prepare leadfield load data_TF cfg=[]; cfg.vol = vol; %structure with volume conduction model cfg.elec = elec_aligned;%structure with electrode positions [grid] = ft_prepare_leadfield(cfg, data_TF); % Find source cfg = []; cfg.method = 'dics'; cfg.frequency = 25; cfg.grid = grid; cfg.vol = vol; cfg.latency = .4;%single number in seconds, for time-frequency analysis cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = 0; cfg.elec = elec_aligned;%structure with electrode positions sourceTF = ft_sourceanalysis(cfg, data_TF); I am using wavelet with a fourier output for the time-frequency analysis (data_TF). Do you have any idea what might be wrong here? I also have a more general question. What type of time-frequency data can be input to source analysis? ft_freqanalysis provides power, power and cross-spectra, and complex fourier outputs. But is source-localization based on only power data correct? I couldn't find any explanations regarding this issue in the tutorial. I look forward to hearing from anyone who might have ideas about any of these issues! Many thanks, -- Azadeh HajiHosseini _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From author at example.com Mon Jul 21 09:19:36 2014 From: author at example.com (Author Name Removed) Date: Mon, 21 Jul 2014 09:19:36 +0200 Subject: [Subject Removed] In-Reply-To: References: Message-ID: <119C5BD5-2DC7-42B4-A4C4-A3B9B74DB762@gmail.com> A non-text attachment was scrubbed... Name: not available Type: multipart/alternative Size: 216 bytes Desc: not available URL: From eelke.spaak at donders.ru.nl Mon Jul 21 09:58:30 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 21 Jul 2014 09:58:30 +0200 Subject: [FieldTrip] Problems with ft_resampledata In-Reply-To: References: Message-ID: Hi Jinghua, The function 'resample' is part of Mathworks' Signal Processing Toolbox. Currently, unfortunately, this toolbox is a requirement for certain FieldTrip functionality, including ft_resampledata. Best, Eelke On 19 July 2014 05:48, Jinghua OU wrote: > Hello, > > I am using ft_resampledata to downsize my data and the code is as follows: > > cfg = []; > cfg.resamplefs = 500; > cfg.detrend = 'no'; > data_resample = ft_resampledata(cfg, data_AR_bc); > > however, some errors occur as follows: > > ??? Undefined function or method 'resample' for input arguments of type > 'double'. > > Error in ==> ft_resampledata at 182 > data.trial{itr} = > transpose(resample(transpose(data.trial{itr}),fsres,fsorig)); > > Is there something I'm missing? > Thank you very much for your help in advacne. > > Best, > Jinghua > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From roeysc at gmail.com Mon Jul 21 11:21:32 2014 From: roeysc at gmail.com (Roey Schurr) Date: Mon, 21 Jul 2014 12:21:32 +0300 Subject: [FieldTrip] MNE Source Reconstruction Sanity Check Message-ID: Dear fieldtrippers, I want to do a sanity check on mne source reconstruction. I'm working on continuous EEG recordings (19 electrodes), estimating the source reconstruction activity using the *mne* (minimum norm estimate) method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As a sanity check for the source reconstruction itself, I wanted to compare conditions in which I could estimate the loci of significant changes, e.g.: rest vs movement of the hand, moving the right hand vs the left hand, etc. I have about 60 seconds of recording for each condition. What I did was: 1) Segment the recording of each condition into many "trials" of 2 seconds each. 2) For each trial, average the activity in each of the 90 ROIs of the aal atlas (I excluded the cerebellum from the source reconstruction). I was wondering what comparison would be best in this case. Since this is not Evoked Responses data, I find it hard to find relevant ideas, and would like to hear your thoughts. 1) I did a frequency analysis (mtmfft) in conventional bands of interest and ran ft_freqstatistics on the resulting structures (using ttest2 and the bonferoni correction for the multiple comparison problem). This gave some results, however for most conditions they are not very encouraging (the ROIs that showed significant differences were not close to those that I have assumed). *QUESTION 1*: do you think this is a proper method? Note that I did not use a frequency based source reconstruction in the first place, because I'm ultimately interested in the time course in the source space. 2) I was wondering if a cluster based permutation test is impossible to use here, since this is a continuous recording, so clustering according to time adjacency seems irrelevant. *QUESTION 2*: is it possible to use a cluster based statistical test here? If so, it could be better than a-priori averaging the source activity in the atlas ROIs, which could mask some of the effects, if they are located in a small area. 3) Another possibility is looking at the data itself. Unfortunately I encountered some problems using ft_sourcemovie, though this is a subject for a different thread. Any thoughts and advice are highly appreciated! Thank you for taking the time, roey -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Mon Jul 21 15:11:19 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Mon, 21 Jul 2014 15:11:19 +0200 Subject: [FieldTrip] phase synchronisation Message-ID: Dear all, I'm a bit confused with the computation of phase synchronisation. What I'm interested is to compute the phase synchronisation changes in the second session (i.e. 1 year later) with respect to the first session. There are 64 EEG channels in my data. I'm interested to compute the mean phase coherence index. >From the tutorial on 'analysis of sensor and source level connectivity, it seems to me one has to first compute the multivariate autoregressive model, follow by the spectral density function, follow by non-parametric computation of the cross spectral density function and finally the connectivity measures. However, when I tried to compute the multivariate autoregressive model as suggested, I get an error message: Error using chol Matrix must be positive definite. Error in armorf (line 40) ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); Error in ft_mvaranalysis (line 395) [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), size(tmpdata.trial{1},2), cfg.order); Can someone help me? Thanks! Cheers, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From khangsile at gmail.com Mon Jul 21 17:21:47 2014 From: khangsile at gmail.com (Khang Le) Date: Mon, 21 Jul 2014 17:21:47 +0200 Subject: [FieldTrip] Using real time field trip buffer on separate machines Message-ID: Hi everyone, I am currently attempting to use the field trip buffer, and I have been able to have it running on a single computer with two matlab instances, but for complicated reasons, I must use it with two computers. So the setup that I need to produce is to have one computer acquire data and write it to a remote server/virtual machine while my vm on the remote server reads the data and subsequently processes it. For right now, I am having trouble figuring out how to point my acquisition computer to write data to the buffer on the remote server. I know there is a possibility that I may have to change a little of the source code. If anyone has done this before or can assist, I would greatly appreciate it! Thanks, Khang -------------- next part -------------- An HTML attachment was scrubbed... URL: From nabra005 at odu.edu Mon Jul 21 19:10:15 2014 From: nabra005 at odu.edu (Nijo Abraham) Date: Mon, 21 Jul 2014 13:10:15 -0400 Subject: [FieldTrip] Event Type in own .mat structure Message-ID: Hi everyone. This question might sound trivial to many. However, since I just started using Fieldtrip I am having a tough time figuring how to input my own event types, start and end time for each event etc into the modified matlab data structure. I have a matlab structure with 4 EEG channels, obtained from Simulink. My ultimate goal is to convert this structure into a format with event types and event values that can be read by SPM. However, I am not able to find any tutorial that explain how one can add event types into own matlab data structure. (All the tutorials assume that the .ds or .vhr etc files already have event types assigned to them.) Can anyone help me out ? (P.S. I was successful in breaking down the .mat structure into trial, including adding the trialinfo attribute. However, the trialinfo cannot be read as an event in SPM. Only eventtypes and event values are asked as inputs in SPM, it seems) Neo -------------- next part -------------- An HTML attachment was scrubbed... URL: From azadehh at uvic.ca Mon Jul 21 20:12:56 2014 From: azadehh at uvic.ca (Azadeh Hajihosseini) Date: Mon, 21 Jul 2014 11:12:56 -0700 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: References: <4C11F599-521E-49EA-B84D-6F46BF24A201@flinders.edu.au> <1E693A08-6073-49AE-BDAD-D028B3F73BA3@flinders.edu.au> Message-ID: Hi Tyler, Thanks for responding! Actually, I have 51 electrodes. I also checked the units again and they are all 'mm'. It looks like there is a problem in preparing the head model because when I call the line: *vol = ft_prepare_headmodel(cfg, segmentedmri_template), * there is this warning: *Warning: Matrix is singular, close to singular or badly scaled.* * Results may be inaccurate. RCOND = NaN. * coming from *ft_headmodel_bemcp. *Any idea about this? Thanks again!! Azadeh > On Sun, Jul 20, 2014 at 2:14 AM, Tyler Grummett < > tyler.grummett at flinders.edu.au> wrote: > >> Also are the units the same for your Headmodel, electrodes and >> sourcemodel(?) >> >> Sent from my iPad >> >> On 20 Jul 2014, at 4:08 pm, "Tyler Grummett" < >> tyler.grummett at flinders.edu.au> wrote: >> >> I don't know if this advice is at all correct but I usually get that >> error if I've got a relatively small number of electrodes (~29) or a small >> data set (30 seconds of data). >> >> Does that sound familiar? >> >> I usually clear all and run it again and it will work eventually haha >> >> Sent from my iPad >> >> On 19 Jul 2014, at 8:01 am, "Azadeh Hajihosseini" >> wrote: >> >> Hello FieldTrip members, >> >> I am trying to source localize EEG oscillatory activity and have a few >> problems in constructing the forward model and eventually running the >> source analysis. I think the problems are related to each other. Here is >> what happens: >> >> 1- When I run the source analysis, I get this error message: >> >> *??? Error using ==> svd* >> *Input to SVD must not contain NaN or Inf.* >> >> *Error in ==> beamformer_dics>pinv at 650* >> * [U,S,V] = svd(A,0);* >> >> *Error in ==> beamformer_dics at 339* >> * filt = pinv(lf' * invCf * lf) * lf' * invCf; % >> Gross eqn. 3, use PINV/SVD to cover rank* >> * deficient leadfield* >> >> *Error in ==> ft_sourceanalysis at 572* >> * dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), >> optarg{:});* >> >> *Error in ==> test_sourceanalysis at 12* >> *sourceTF = ft_sourceanalysis(cfg, data_TF);* >> >> >> 2- Checking the leadfiled matrices, I see there are a lot of NaN values. >> 3- When I visualize the head model I have created, the plots don't look >> right. The third field, *vol.bnd(3),* which is supposed to be the brain >> tissue, looks like a cube. >> >> And here are my code lines: >> >> *% CONSTRUCT A HEAD MODEL from the template mri in FT's >> template/anatomy* >> *mri = ft_read_mri('template\anatomy\single_subj_T1.nii');* >> *mri.coordsys = 'spm';* >> >> *%SEGMENTATION:* >> *cfg = [];* >> *cfg.output = {'brain','skull','scalp'};* >> *segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT >> resliced data* >> *save segmentedmri_template segmentedmri_template* >> >> >> *%CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL)* >> *cfg = [];* >> *cfg.method ='bemcp';* >> *cfg.tissue ={'brain','skull','scalp'};* >> *% cfg.outputfile = 'template_';* >> *vol = ft_prepare_headmodel(cfg, segmentedmri_template);* >> *save vol vol* >> >> *%Visualization of the head model* >> *figure;* >> *ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp * >> *figure;* >> *ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull* >> *figure;* >> *ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks like >> a cube* >> >> *% Align electrodes * >> *elec = ft_read_sens('template\electrode\standard_1020.elc'); * >> *% load volume conduction model* >> *% load vol; * >> >> *%interactive allignment* >> *cfg = [];* >> *cfg.method = 'interactive';* >> *cfg.elec = elec;* >> *cfg.headshape = vol.bnd(1);* >> *elec_aligned = ft_electroderealign(cfg);* >> >> *save elec_aligned elec_aligned* >> >> *% Prepare leadfield* >> *load data_TF* >> *cfg=[];* >> *cfg.vol = vol; %structure with volume conduction model* >> *cfg.elec = elec_aligned;%structure with electrode positions* >> *[grid] = ft_prepare_leadfield(cfg, data_TF);* >> >> *% Find source* >> *cfg = []; * >> *cfg.method = 'dics';* >> *cfg.frequency = 25; * >> *cfg.grid = grid; * >> *cfg.vol = vol;* >> *cfg.latency = .4;%single number in seconds, for time-frequency >> analysis* >> *cfg.dics.projectnoise = 'yes';* >> *cfg.dics.lambda = 0;* >> *cfg.elec = elec_aligned;%structure with electrode positions* >> >> *sourceTF = ft_sourceanalysis(cfg, data_TF);* >> >> >> I am using *wavelet *with a *fourier* output for the time-frequency >> analysis (*data_TF)*. Do you have any idea what might be wrong here? >> >> I also have a more general question. What type of time-frequency data >> can be input to source analysis? *ft_freqanalysis* provides power, power >> and cross-spectra, and complex fourier outputs. But is source-localization >> based on only power data correct? I couldn't find any explanations >> regarding this issue in the tutorial. >> >> I look forward to hearing from anyone who might have ideas about any of >> these issues! >> >> Many thanks, >> >> -- >> Azadeh HajiHosseini >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laszlo.Grand at libd.org Tue Jul 22 02:09:48 2014 From: Laszlo.Grand at libd.org (Laszlo Grand) Date: Tue, 22 Jul 2014 00:09:48 +0000 Subject: [FieldTrip] Preprocessing and analysis of spike and local field potential data - issue with calling certain functions Message-ID: <3284EAED-05DE-4B52-843A-4A4D6437F7D4@libd.org> Hi, I am a new FieldTrip user with advanced Matlab programming skills. I would like to use FieldTrip for analyzing multichannel local field potentials (EEG) and spike data recorded from rats. As I go throughout the ‘Preprocessing and analysis of spike and local field potential data’ tutorial (http://fieldtrip.fcdonders.nl/tutorial/spikefield), I get the following error message after calling the ft_spiketriggeredaverage function in the ‘Computing the spike triggered average LFP’ section: staPost = ft_spiketriggeredaverage(cfg, data_all); the input is raw data with 6 channels and 600 trials Error using ft_checkconfig (line 205) The field cfg.progress is not allowed Error in ft_spiketriggeredaverage (line 72) cfg = ft_checkconfig(cfg, 'allowed', {'timwin', 'spikechannel', 'channel', 'keeptrials', 'feedback', 'latency', 'trials', 'warning'}); In the ‘Computing the phases of spikes relative to the ongoing LFP ‘ section I receive the same error msg after calling the ft_spiketriggeredspectrum function. stsConvol = ft_spiketriggeredspectrum(cfg, data_all); the input is raw data with 6 channels and 600 trials Error using ft_checkconfig (line 205) The field cfg.progress is not allowed Error in ft_spiketriggeredspectrum_convol (line 135) cfg = ft_checkconfig(cfg, 'allowed', {'taper', 'borderspikes', 't_ftimwin', 'foi', 'spikechannel', 'channel', 'taperopt', 'rejectsaturation','tapsmofrq', 'warning'}); Error in ft_spiketriggeredspectrum (line 106) sts = ft_spiketriggeredspectrum_convol(cfg,data); Can anyone help me to understand the cause and resolving this issue? Thank you, LG -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jul 22 03:50:14 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 22 Jul 2014 01:50:14 +0000 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: References: <4C11F599-521E-49EA-B84D-6F46BF24A201@flinders.edu.au> <1E693A08-6073-49AE-BDAD-D028B3F73BA3@flinders.edu.au> , Message-ID: <1405993814469.56866@flinders.edu.au> Hello Azadeh, Again, fieldtrip experts please let me know if I am wrong, I dont want to lead azadeh or myself astray. The code I use to create my headmodel is the following: cfg = []; cfg.write = 'no'; cfg.coordsys = 'spm'; cfg.output = { 'scalp', 'skull', 'brain'}; segmentedmri = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'iso2mesh'; cfg.numvertices = 10000; bnd = ft_prepare_mesh( cfg, segmentedmri); % fix mesh [ bnd( 1).pnt, bnd( 1).tri] = meshresample( bnd( 1).pnt, bnd( 1).tri, 1000/size( bnd( 1).pnt, 1)); [ bnd( 2).pnt, bnd( 2).tri] = meshresample( bnd( 2).pnt, bnd( 2).tri, 2000/size( bnd( 2).pnt, 1)); [ bnd( 3).pnt, bnd( 3).tri] = meshresample( bnd( 3).pnt, bnd( 3).tri, 3000/size( bnd( 3).pnt, 1)); for ii = 1:size( bnd), [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'dup'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'isolated'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'deep'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'meshfix'); end % calculate headmodel % reordered to brain skull scalp cfg = []; cfg.method = 'bemcp'; %openmeeg doesnt work with multiple output from ft_volumesegment vol = ft_prepare_headmodel(cfg, bnd); clear bnd Also with your previous issue: ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> beamformer_dics>pinv at 650 [U,S,V] = svd(A,0); Error in ==> beamformer_dics at 339 filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross eqn. 3, use PINV/SVD to cover rank deficient leadfield Error in ==> ft_sourceanalysis at 572 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); Error in ==> test_sourceanalysis at 12 sourceTF = ft_sourceanalysis(cfg, data_TF);​ Can you check the variables lf invCf lf should be: number of channels x 3 invCf should be: number of channels x number of channels Previously I would get an error if the number of channels didnt match up because when I select only EEG channels, it doesnt update the data.elec field. So you may need to check that also. Hopefully this works. tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Azadeh Hajihosseini Sent: Tuesday, 22 July 2014 3:42 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices Hi Tyler, Thanks for responding! Actually, I have 51 electrodes. I also checked the units again and they are all 'mm'. It looks like there is a problem in preparing the head model because when I call the line: vol = ft_prepare_headmodel(cfg, segmentedmri_template), there is this warning: Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN. coming from ft_headmodel_bemcp. Any idea about this? Thanks again!! Azadeh On Sun, Jul 20, 2014 at 2:14 AM, Tyler Grummett > wrote: Also are the units the same for your Headmodel, electrodes and sourcemodel(?) Sent from my iPad On 20 Jul 2014, at 4:08 pm, "Tyler Grummett" > wrote: I don't know if this advice is at all correct but I usually get that error if I've got a relatively small number of electrodes (~29) or a small data set (30 seconds of data). Does that sound familiar? I usually clear all and run it again and it will work eventually haha Sent from my iPad On 19 Jul 2014, at 8:01 am, "Azadeh Hajihosseini" > wrote: Hello FieldTrip members, I am trying to source localize EEG oscillatory activity and have a few problems in constructing the forward model and eventually running the source analysis. I think the problems are related to each other. Here is what happens: 1- When I run the source analysis, I get this error message: ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> beamformer_dics>pinv at 650 [U,S,V] = svd(A,0); Error in ==> beamformer_dics at 339 filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross eqn. 3, use PINV/SVD to cover rank deficient leadfield Error in ==> ft_sourceanalysis at 572 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); Error in ==> test_sourceanalysis at 12 sourceTF = ft_sourceanalysis(cfg, data_TF); 2- Checking the leadfiled matrices, I see there are a lot of NaN values. 3- When I visualize the head model I have created, the plots don't look right. The third field, vol.bnd(3), which is supposed to be the brain tissue, looks like a cube. And here are my code lines: % CONSTRUCT A HEAD MODEL from the template mri in FT's template/anatomy mri = ft_read_mri('template\anatomy\single_subj_T1.nii'); mri.coordsys = 'spm'; %SEGMENTATION: cfg = []; cfg.output = {'brain','skull','scalp'}; segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT resliced data save segmentedmri_template segmentedmri_template %CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL) cfg = []; cfg.method ='bemcp'; cfg.tissue ={'brain','skull','scalp'}; % cfg.outputfile = 'template_'; vol = ft_prepare_headmodel(cfg, segmentedmri_template); save vol vol %Visualization of the head model figure; ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp figure; ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull figure; ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks like a cube % Align electrodes elec = ft_read_sens('template\electrode\standard_1020.elc'); % load volume conduction model % load vol; %interactive allignment cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_aligned = ft_electroderealign(cfg); save elec_aligned elec_aligned % Prepare leadfield load data_TF cfg=[]; cfg.vol = vol; %structure with volume conduction model cfg.elec = elec_aligned;%structure with electrode positions [grid] = ft_prepare_leadfield(cfg, data_TF); % Find source cfg = []; cfg.method = 'dics'; cfg.frequency = 25; cfg.grid = grid; cfg.vol = vol; cfg.latency = .4;%single number in seconds, for time-frequency analysis cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = 0; cfg.elec = elec_aligned;%structure with electrode positions sourceTF = ft_sourceanalysis(cfg, data_TF); I am using wavelet with a fourier output for the time-frequency analysis (data_TF). Do you have any idea what might be wrong here? I also have a more general question. What type of time-frequency data can be input to source analysis? ft_freqanalysis provides power, power and cross-spectra, and complex fourier outputs. But is source-localization based on only power data correct? I couldn't find any explanations regarding this issue in the tutorial. I look forward to hearing from anyone who might have ideas about any of these issues! Many thanks, -- Azadeh HajiHosseini _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Jul 22 14:08:25 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 22 Jul 2014 14:08:25 +0200 Subject: [FieldTrip] phase synchronisation In-Reply-To: References: Message-ID: <53CE5439.2030906@donders.ru.nl> Dear Hwee Ling, this error most likely occurs because your data is rank-deficient. You can check this with the rank-function in Matlab. However, when you are interested in phase synchronisation, there is no need to go down the path you are pursuing. You can just compute nonparametric measures, such as coherence, weighted phase lag index or the like. These work entirely on the cross-spectral density. Check out the help of ft_connectivityanalysis for more information. Best, Jörn On 7/21/2014 3:11 PM, Hwee Ling Lee wrote: > Dear all, > > I'm a bit confused with the computation of phase synchronisation. > > What I'm interested is to compute the phase synchronisation changes in > the second session (i.e. 1 year later) with respect to the first > session. There are 64 EEG channels in my data. I'm interested to > compute the mean phase coherence index. > > From the tutorial on 'analysis of sensor and source level > connectivity, it seems to me one has to first compute the multivariate > autoregressive model, follow by the spectral density function, follow > by non-parametric computation of the cross spectral density function > and finally the connectivity measures. However, when I tried to > compute the multivariate autoregressive model as suggested, I get an > error message: > > Error using chol > Matrix must be positive definite. > > Error in armorf (line 40) > ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); > > Error in ft_mvaranalysis (line 395) > [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), > size(tmpdata.trial{1},2), cfg.order); > Can someone help me? > > Thanks! > > Cheers, > Hweeling > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Tue Jul 22 14:11:11 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 22 Jul 2014 14:11:11 +0200 Subject: [FieldTrip] Using real time field trip buffer on separate machines In-Reply-To: References: Message-ID: <53CE54DF.7000200@donders.ru.nl> Hi Khang Le, writing to the buffer depends solely in the acqusition software you are using. We created a summary page of different software that are able to communicate with the FieldTrip buffer: http://fieldtrip.fcdonders.nl/development/realtime/implementation I hope this helps. Otherwise, please be more specific in what acquisition software you are using. Best, Jörn On 7/21/2014 5:21 PM, Khang Le wrote: > Hi everyone, > > I am currently attempting to use the field trip buffer, and I have > been able to have it running on a single computer with two matlab > instances, but for complicated reasons, I must use it with two computers. > > So the setup that I need to produce is to have one computer acquire > data and write it to a remote server/virtual machine while my vm on > the remote server reads the data and subsequently processes it. > > For right now, I am having trouble figuring out how to point my > acquisition computer to write data to the buffer on the remote server. > I know there is a possibility that I may have to change a little of > the source code. If anyone has done this before or can assist, I would > greatly appreciate it! > > Thanks, > > Khang > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Tue Jul 22 14:26:27 2014 From: jm.horschig at donders.ru.nl (=?windows-1252?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 22 Jul 2014 14:26:27 +0200 Subject: [FieldTrip] Preprocessing and analysis of spike and local field potential data - issue with calling certain functions In-Reply-To: <3284EAED-05DE-4B52-843A-4A4D6437F7D4@libd.org> References: <3284EAED-05DE-4B52-843A-4A4D6437F7D4@libd.org> Message-ID: <53CE5873.9010101@donders.ru.nl> Hi Laszlo, this is a bug in the spike-toolbox, because we made some changes to FieldTrip. The spike toolbox explicitly checks what fields are in the cfg and whether the cfg are used in that function - however after FieldTrip has modified the cfg itself already. Thus, in this case, some other FieldTrip function has added cfg.progress, and the program code in ft_spikeXXX was not updated to account for that. As the functions are all open source, you can easily modify them yourself so that the function will work in the presence cfg.progress. Apart from that, we have a bugzilla system: http://bugzilla.fcdonders.nl/ Would you mind registering and posting your mail as a bug? Then we (aka Martin Vinck) can fix this bug, and won't forget this issue any time soon ;) Best, Jörn On 7/22/2014 2:09 AM, Laszlo Grand wrote: > Hi, > > I am a new FieldTrip user with advanced Matlab programming skills. I > would like to use FieldTrip for analyzing multichannel local field > potentials (EEG) and spike data recorded from rats. > As I go throughout the ‘Preprocessing and analysis of spike and local > field potential data’ tutorial > (http://fieldtrip.fcdonders.nl/tutorial/spikefield), I get the > following error message after calling the ft_spiketriggeredaverage > function in the ‘Computing the spike triggered average LFP’ section: > > *staPost = ft_spiketriggeredaverage(cfg, data_all);* > the input is raw data with 6 channels and 600 trials > Error using ft_checkconfig (line 205) > The field cfg.progress is not allowed > > > Error in ft_spiketriggeredaverage (line 72) > cfg = ft_checkconfig(cfg, 'allowed', {'timwin', 'spikechannel', 'channel', > 'keeptrials', 'feedback', 'latency', 'trials', 'warning'}); > > > > In the ‘Computing the phases of spikes relative to the ongoing LFP ‘ > section I receive the same error msg after calling the > ft_spiketriggeredspectrum function. > * > * > *stsConvol = ft_spiketriggeredspectrum(cfg, data_all);* > > the input is raw data with 6 channels and 600 trials > Error using ft_checkconfig (line 205) > The field cfg.progress is not allowed > > > Error in ft_spiketriggeredspectrum_convol (line 135) > cfg = ft_checkconfig(cfg, 'allowed', {'taper', 'borderspikes', > 't_ftimwin', > 'foi', 'spikechannel', 'channel', 'taperopt', > 'rejectsaturation','tapsmofrq', 'warning'}); > > Error in ft_spiketriggeredspectrum (line 106) > sts = ft_spiketriggeredspectrum_convol(cfg,data); > > > Can anyone help me to understand the cause and resolving this issue? > > Thank you, > > LG > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From thomas.wunderle at esi-frankfurt.de Tue Jul 22 17:01:38 2014 From: thomas.wunderle at esi-frankfurt.de (Thomas Wunderle) Date: Tue, 22 Jul 2014 17:01:38 +0200 Subject: [FieldTrip] Preprocessing and analysis of spike and local field potential data - issue with calling certain functions In-Reply-To: <53CE5873.9010101@donders.ru.nl> References: <3284EAED-05DE-4B52-843A-4A4D6437F7D4@libd.org> <53CE5873.9010101@donders.ru.nl> Message-ID: <53CE7CD2.4040400@esi-frankfurt.de> Hi all, I put that bug already two weeks ago into the bugzilla, see http://bugzilla.fcdonders.nl/show_bug.cgi?id=2641 You can add the line 'progress' in ft_checkconfig to make it work again. Best, Thomas Am 22.07.2014 14:26, schrieb "Jörn M. Horschig": > Hi Laszlo, > > this is a bug in the spike-toolbox, because we made some changes to > FieldTrip. The spike toolbox explicitly checks what fields are in the > cfg and whether the cfg are used in that function - however after > FieldTrip has modified the cfg itself already. Thus, in this case, > some other FieldTrip function has added cfg.progress, and the program > code in ft_spikeXXX was not updated to account for that. As the > functions are all open source, you can easily modify them yourself so > that the function will work in the presence cfg.progress. > > Apart from that, we have a bugzilla system: > http://bugzilla.fcdonders.nl/ > Would you mind registering and posting your mail as a bug? Then we > (aka Martin Vinck) can fix this bug, and won't forget this issue any > time soon ;) > > Best, > Jörn > > On 7/22/2014 2:09 AM, Laszlo Grand wrote: >> Hi, >> >> I am a new FieldTrip user with advanced Matlab programming skills. I >> would like to use FieldTrip for analyzing multichannel local field >> potentials (EEG) and spike data recorded from rats. >> As I go throughout the ‘Preprocessing and analysis of spike and local >> field potential data’ tutorial >> (http://fieldtrip.fcdonders.nl/tutorial/spikefield), I get the >> following error message after calling the ft_spiketriggeredaverage >> function in the ‘Computing the spike triggered average LFP’ section: >> >> *staPost = ft_spiketriggeredaverage(cfg, data_all);* >> the input is raw data with 6 channels and 600 trials >> Error using ft_checkconfig (line 205) >> The field cfg.progress is not allowed >> >> >> Error in ft_spiketriggeredaverage (line 72) >> cfg = ft_checkconfig(cfg, 'allowed', {'timwin', 'spikechannel', >> 'channel', >> 'keeptrials', 'feedback', 'latency', 'trials', 'warning'}); >> >> >> >> In the ‘Computing the phases of spikes relative to the ongoing LFP ‘ >> section I receive the same error msg after calling the >> ft_spiketriggeredspectrum function. >> * >> * >> *stsConvol = ft_spiketriggeredspectrum(cfg, data_all);* >> >> the input is raw data with 6 channels and 600 trials >> Error using ft_checkconfig (line 205) >> The field cfg.progress is not allowed >> >> >> Error in ft_spiketriggeredspectrum_convol (line 135) >> cfg = ft_checkconfig(cfg, 'allowed', {'taper', 'borderspikes', >> 't_ftimwin', >> 'foi', 'spikechannel', 'channel', 'taperopt', >> 'rejectsaturation','tapsmofrq', 'warning'}); >> >> Error in ft_spiketriggeredspectrum (line 106) >> sts = ft_spiketriggeredspectrum_convol(cfg,data); >> >> >> Can anyone help me to understand the cause and resolving this issue? >> >> Thank you, >> >> LG >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- ----- Dr. Thomas Wunderle Ernst Strüngmann Institute (ESI) for Neuroscience in Cooperation with Max Planck Society Deutschordenstrasse 46 60528 Frankfurt am Main, Germany www.esi-frankfurt.de thomas.wunderle at esi-frankfurt.de Tel: +49 69 96769 516 Fax: +49 69 96769 555 Sitz der Gesellschaft: Frankfurt am Main Registergericht: Amtsgericht Frankfurt - HRB 84266 Geschäftsführer: Prof. Dr. Pascal Fries From khangsile at gmail.com Wed Jul 23 09:56:03 2014 From: khangsile at gmail.com (Khang Le) Date: Wed, 23 Jul 2014 09:56:03 +0200 Subject: [FieldTrip] Using real time field trip buffer on separate machines In-Reply-To: <53CE54DF.7000200@donders.ru.nl> References: <53CE54DF.7000200@donders.ru.nl> Message-ID: Hi Jörn, The current system I am using is an in-house made NIRS system. We acquire the data from the NIRS device through a simple matlab script. Since I need to do real time analysis on it and since Matlab is single-threaded I was planning on modifying the acquisition matlab script to write to the buffer as it is acquiring data by using the ft_write_data function given in the fileio folder. Thanks, Khang On Tue, Jul 22, 2014 at 2:11 PM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Hi Khang Le, > > writing to the buffer depends solely in the acqusition software you are > using. We created a summary page of different software that are able to > communicate with the FieldTrip buffer: > http://fieldtrip.fcdonders.nl/development/realtime/implementation > I hope this helps. Otherwise, please be more specific in what acquisition > software you are using. > > Best, > Jörn > > > > On 7/21/2014 5:21 PM, Khang Le wrote: > >> Hi everyone, >> >> I am currently attempting to use the field trip buffer, and I have been >> able to have it running on a single computer with two matlab instances, but >> for complicated reasons, I must use it with two computers. >> >> So the setup that I need to produce is to have one computer acquire data >> and write it to a remote server/virtual machine while my vm on the remote >> server reads the data and subsequently processes it. >> >> For right now, I am having trouble figuring out how to point my >> acquisition computer to write data to the buffer on the remote server. I >> know there is a possibility that I may have to change a little of the >> source code. If anyone has done this before or can assist, I would greatly >> appreciate it! >> >> Thanks, >> >> Khang >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jul 23 10:24:00 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 23 Jul 2014 10:24:00 +0200 Subject: [FieldTrip] Using real time field trip buffer on separate machines In-Reply-To: References: <53CE54DF.7000200@donders.ru.nl> Message-ID: <53CF7120.6070608@donders.ru.nl> Hi Khang Le, then maybe the ft_realtime_signalproxy can serve as a template to write data from the matlab script directly into the buffer: http://fieldtrip.fcdonders.nl/reference/ft_realtime_signalproxy Best, Jörn On 7/23/2014 9:56 AM, Khang Le wrote: > Hi Jörn, > > The current system I am using is an in-house made NIRS system. We > acquire the data from the NIRS device through a simple matlab script. > Since I need to do real time analysis on it and since Matlab is > single-threaded I was planning on modifying the acquisition matlab > script to write to the buffer as it is acquiring data by using the > ft_write_data function given in the fileio folder. > > Thanks, > Khang > > > On Tue, Jul 22, 2014 at 2:11 PM, "Jörn M. Horschig" > > wrote: > > Hi Khang Le, > > writing to the buffer depends solely in the acqusition software > you are using. We created a summary page of different software > that are able to communicate with the FieldTrip buffer: > http://fieldtrip.fcdonders.nl/development/realtime/implementation > I hope this helps. Otherwise, please be more specific in what > acquisition software you are using. > > Best, > Jörn > > > > On 7/21/2014 5:21 PM, Khang Le wrote: > > Hi everyone, > > I am currently attempting to use the field trip buffer, and I > have been able to have it running on a single computer with > two matlab instances, but for complicated reasons, I must use > it with two computers. > > So the setup that I need to produce is to have one computer > acquire data and write it to a remote server/virtual machine > while my vm on the remote server reads the data and > subsequently processes it. > > For right now, I am having trouble figuring out how to point > my acquisition computer to write data to the buffer on the > remote server. I know there is a possibility that I may have > to change a little of the source code. If anyone has done this > before or can assist, I would greatly appreciate it! > > Thanks, > > Khang > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From d.lozanosoldevilla at fcdonders.ru.nl Wed Jul 23 16:35:23 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Wed, 23 Jul 2014 16:35:23 +0200 (CEST) Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: <178175387.8004228.1406124800670.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> Dear Roey, In my opinion it's definitely not a good idea to compute MNE using 19 sensors. There are studies that have found a drastic localization precision from 31 to 63 electrodes and further improvements till 123: http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) http://www.ncbi.nlm.nih.gov/pubmed/12495765 Although it's very difficult to know the "minimum" number of electrodes needed to accurately localize a given source (it depends on the strength of the source you want to localize, source reconstruction algorithm, data noise...), 19 electrodes are too low to trust the results you can get. best, Diego ----- Original Message ----- >From roeysc at gmail.com Mon Jul 21 11:21:32 2014From: roeysc at gmail.com (Roey Schurr)Date: Mon, 21 Jul 2014 12:21:32 +0300Subject: [FieldTrip] MNE Source Reconstruction Sanity CheckMessage-ID: Dear fieldtrippers,I want to do a sanity check on mne source reconstruction.I'm working on continuous EEG recordings (19 electrodes), estimating thesource reconstruction activity using the *mne* (minimum norm estimate)method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As asanity check for the source reconstruction itself, I wanted to compareconditions in which I could estimate the loci of significant changes, e.g.:rest vs movement of the hand, moving the right hand vs the left hand, etc.I have about 60 seconds of recording for each condition.What I did was:1) Segment the recording of each condition into many "trials" of 2 secondseach.2) For each trial, average the activity in each of the 90 ROIs of the aalatlas (I excluded the cerebellum from the source reconstruction).I was wondering what comparison would be best in this case. Since this isnot Evoked Responses data, I find it hard to find relevant ideas, and wouldlike to hear your thoughts.1) I did a frequency analysis (mtmfft) in conventional bands of interestand ran ft_freqstatistics on the resulting structures (using ttest2 and thebonferoni correction for the multiple comparison problem). This gave someresults, however for most conditions they are not very encouraging (theROIs that showed significant differences were not close to those that Ihave assumed).*QUESTION 1*: do you think this is a proper method? Note that I did not usea frequency based source reconstruction in the first place, because I'multimately interested in the time course in the source space.2) I was wondering if a cluster based permutation test is impossible to usehere, since this is a continuous recording, so clustering according to timeadjacency seems irrelevant.*QUESTION 2*: is it possible to use a cluster based statistical test here?If so, it could be better than a-priori averaging the source activity inthe atlas ROIs, which could mask some of the effects, if they are locatedin a small area.3) Another possibility is looking at the data itself. Unfortunately Iencountered some problems using ft_sourcemovie, though this is a subjectfor a different thread.Any thoughts and advice are highly appreciated!Thank you for taking the time,roey -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Thu Jul 24 10:07:17 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 24 Jul 2014 08:07:17 +0000 Subject: [FieldTrip] interpolating source then using sourceplot Message-ID: <1406189237804.86816@flinders.edu.au> Hello fieldtrip experts, I just have a question about source interpolation and sourceplot. For some reason or another, my data appears to generate a lot of power at cerebellar regions and some that dont correspond to any brain regions at all. So what I tried was to NaN the power that correspond to the cerebellar regions too see if other brain regions would light up and I still appear to get power at those positions in sourceplot. Ive made sure that all variables are the same coordinate system and have the same units (spm, mm). My code is as follows: % read in mri file template_mri = ft_read_mri( fullfile( matlabrootpath, 'Matlab', 'fieldtrip', ... 'template', 'headmodel', 'standard_mri.mat')); template_mri = ft_convert_coordsys( template_mri, 'spm'); template_mri = ft_volumenormalise( [], template_mri); template_mri = ft_volumereslice( [], template_mri); % map beamformer source locations onto an anatomical label in an atlas cfg = []; cfg.interpmethod = 'nearest'; cfg.parameter = 'tissue'; sourcemodel2 = ft_sourceinterpolate( cfg, atlas, sourcemodel); % NaN power at cerebellar regions temp_source = source; label = lower( atlas.tissuelabel); for iii = 91:numel( label), atlas_sources = find( sourcemodel2.tissue == iii); temp_source.avg.pow( atlas_sources) = NaN; end % interpolate source to mri parameter = 'avg.pow'; cfg = []; % cfg.voxelcoord = 'no'; cfg.downsample = 2; cfg.parameter = parameter; cfg.interpmethod = 'nearest'; sourceInt = ft_sourceinterpolate( cfg, temp_source, template_mri); % Plot interpolated data plot_method = 'slice'; cfg = []; cfg.method = plot_method; % slice ortho surface cfg.funparameter = parameter; cfg.atlas = atlas; cfg.crosshair = 'yes'; ft_sourceplot( cfg, sourceInt); Attached is the sourceplot figure that results Kind regards, Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sourceplot example.png Type: image/png Size: 46707 bytes Desc: sourceplot example.png URL: From pierpaolo12croce at gmail.com Thu Jul 24 12:32:56 2014 From: pierpaolo12croce at gmail.com (Pierpaolo Croce) Date: Thu, 24 Jul 2014 12:32:56 +0200 Subject: [FieldTrip] ft_prepare_mesh Message-ID: Hi all, my question is about "ft_prepare_mesh" function. can i use this function to create a mesh for a different part of body (for example an arm)? or it run only for headmodels? best -- PC -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Thu Jul 24 17:34:39 2014 From: j.herring at fcdonders.ru.nl (E688205) Date: Thu, 24 Jul 2014 17:34:39 +0200 (CEST) Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> References: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <790E6AB9-6372-4F70-9B98-2DE6E084F552@donders.ru.nl> Dear Roey, To add to Diego's comments, since you are dealing with EEG data a single sphere headmodel is not a good idea because it does not take into account the differences in conductivity between the skull, scalp, and brain. This is not a problem for MEG but is important for EEG. Therefore it is better to use, for example, a BEM head model. Best, Jim > On 23 jul. 2014, at 16:38, "Lozano Soldevilla, D. (Diego)" wrote: > > Dear Roey, > > In my opinion it's definitely not a good idea to compute MNE using 19 sensors. There are studies that have found a drastic localization precision from 31 to 63 electrodes and further improvements till 123: > > http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) > http://www.ncbi.nlm.nih.gov/pubmed/12495765 > > Although it's very difficult to know the "minimum" number of electrodes needed to accurately localize a given source (it depends on the strength of the source you want to localize, source reconstruction algorithm, data noise...), 19 electrodes are too low to trust the results you can get. > > best, > > Diego > > > From roeysc at gmail.com Mon Jul 21 11:21:32 2014 > From: roeysc at gmail.com (Roey Schurr) > Date: Mon, 21 Jul 2014 12:21:32 +0300 > Subject: [FieldTrip] MNE Source Reconstruction Sanity Check > Message-ID: > > Dear fieldtrippers, > > > > I want to do a sanity check on mne source reconstruction. > > I'm working on continuous EEG recordings (19 electrodes), estimating the > source reconstruction activity using the *mne* (minimum norm estimate) > method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As a > sanity check for the source reconstruction itself, I wanted to compare > conditions in which I could estimate the loci of significant changes, e.g.: > rest vs movement of the hand, moving the right hand vs the left hand, etc. > I have about 60 seconds of recording for each condition. > > > > What I did was: > > 1) Segment the recording of each condition into many "trials" of 2 seconds > each. > > 2) For each trial, average the activity in each of the 90 ROIs of the aal > atlas (I excluded the cerebellum from the source reconstruction). > > > > I was wondering what comparison would be best in this case. Since this is > not Evoked Responses data, I find it hard to find relevant ideas, and would > like to hear your thoughts. > > > > 1) I did a frequency analysis (mtmfft) in conventional bands of interest > and ran ft_freqstatistics on the resulting structures (using ttest2 and the > bonferoni correction for the multiple comparison problem). This gave some > results, however for most conditions they are not very encouraging (the > ROIs that showed significant differences were not close to those that I > have assumed). > > > > *QUESTION 1*: do you think this is a proper method? Note that I did not use > a frequency based source reconstruction in the first place, because I'm > ultimately interested in the time course in the source space. > > > > 2) I was wondering if a cluster based permutation test is impossible to use > here, since this is a continuous recording, so clustering according to time > adjacency seems irrelevant. > > > > *QUESTION 2*: is it possible to use a cluster based statistical test here? > If so, it could be better than a-priori averaging the source activity in > the atlas ROIs, which could mask some of the effects, if they are located > in a small area. > > > > 3) Another possibility is looking at the data itself. Unfortunately I > encountered some problems using ft_sourcemovie, though this is a subject > for a different thread. > > > > Any thoughts and advice are highly appreciated! > > Thank you for taking the time, > > roey > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laura.Rueda at faber.kuleuven.be Thu Jul 24 17:36:59 2014 From: Laura.Rueda at faber.kuleuven.be (Laura Rueda Delgado) Date: Thu, 24 Jul 2014 15:36:59 +0000 Subject: [FieldTrip] Group analysis at source level Message-ID: Dear fieldtrip users, I'm working with source estimations of EEG data. At the moment, I have estimated the sources at the individual level with individual MRIs. I've used ft_sourceinterpolate and ft_volumenormalise to transform the resulting estimation maps into a template for comparison, and I do this for every subject: cfg = []; cfg.parameter = 'avg.pow'; source = ft_sourceinterpolate(cfg, source, mri); cfg = []; cfg.template = '\spm8\templates\T1.nii'; cfg.parameter = 'all'; cfg.nonlinear = 'yes'; cfg.coordsys = 'spm'; source = ft_volumenormalise(cfg, source); Once I have the estimated sources for all the subjects, I use ft_sourcestatistics: cfg = []; cfg.dim = sourcePre_con{1}.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'avg.pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 'all'; cfg.alpha = 0.05; cfg.tail = 0; cfg.design(1,:) = [1:num 1:num]; cfg.design(2,:) = [ones(1,num) ones(1,num)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg,sourcePost_con{:}, sourcePre_con{:}); And I get this error: Reference to non-existent field 'pos'. Error in statistics_wrapper>get_source_avg (line 643) fprintf('only selecting voxels inside the brain for statistics (%.1f%%)\n', 100*length(varargin{1}.inside)/size(varargin{1}.pos,1)); Error in statistics_wrapper (line 206) [dat, cfg] = get_source_avg(cfg, varargin{:}); Error in ft_sourcestatistics (line 107) [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I check the data structure and the structure of the sources at the individual level, before interpolating and normalising has the pos field, but after these steps, it's gone. How can I work around this error? Do I have to keep the pos field and transform it according to the template? Thank you in advance for your help. Best regards, Laura Rueda -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Thu Jul 24 18:28:41 2014 From: roeysc at gmail.com (Roey Schurr) Date: Thu, 24 Jul 2014 19:28:41 +0300 Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> References: <178175387.8004228.1406124800670.JavaMail.root@sculptor.zimbra.ru.nl> <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Dear Diego, Thank you very much for your reply! I am familiar with these two studies (which I came to know through the wonderful Electrical Neuroimaging book by Cristoph Michel. Unfortunately, the data I have is clinical data that was recorded using only 19 electrodes. Localization precision is indeed too low in that case, but I am hoping it would suffice for analyzing certain aspects of the signal (e.g. power spectrum) on a large enough ROI, or a network of ROIs that covers a large portion of the brain. Thank you once again, roey On Wed, Jul 23, 2014 at 5:35 PM, Lozano Soldevilla, D. (Diego) < d.lozanosoldevilla at fcdonders.ru.nl> wrote: > Dear Roey, > > In my opinion it's definitely not a good idea to compute MNE using 19 > sensors. There are studies that have found a drastic localization precision > from 31 to 63 electrodes and further improvements till 123: > > http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) > http://www.ncbi.nlm.nih.gov/pubmed/12495765 > > Although it's very difficult to know the "minimum" number of electrodes > needed to accurately localize a given source (it depends on the strength of > the source you want to localize, source reconstruction algorithm, data > noise...), 19 electrodes are too low to trust the results you can get. > > best, > > Diego > > > ------------------------------ > > From roeysc at gmail.com Mon Jul 21 11:21:32 2014 > From: roeysc at gmail.com (Roey Schurr) > Date: Mon, 21 Jul 2014 12:21:32 +0300 > Subject: [FieldTrip] MNE Source Reconstruction Sanity Check > Message-ID: > > Dear fieldtrippers, > > > > I want to do a sanity check on mne source reconstruction. > > I'm working on continuous EEG recordings (19 electrodes), estimating the > source reconstruction activity using the *mne* (minimum norm estimate) > method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As a > sanity check for the source reconstruction itself, I wanted to compare > conditions in which I could estimate the loci of significant changes, e.g.: > rest vs movement of the hand, moving the right hand vs the left hand, etc. > I have about 60 seconds of recording for each condition. > > > > What I did was: > > 1) Segment the recording of each condition into many "trials" of 2 seconds > each. > > 2) For each trial, average the activity in each of the 90 ROIs of the aal > atlas (I excluded the cerebellum from the source reconstruction). > > > > I was wondering what comparison would be best in this case. Since this is > not Evoked Responses data, I find it hard to find relevant ideas, and would > like to hear your thoughts. > > > > 1) I did a frequency analysis (mtmfft) in conventional bands of interest > and ran ft_freqstatistics on the resulting structures (using ttest2 and the > bonferoni correction for the multiple comparison problem). This gave some > results, however for most conditions they are not very encouraging (the > ROIs that showed significant differences were not close to those that I > have assumed). > > > > *QUESTION 1*: do you think this is a proper method? Note that I did not use > a frequency based source reconstruction in the first place, because I'm > ultimately interested in the time course in the source space. > > > > 2) I was wondering if a cluster based permutation test is impossible to use > here, since this is a continuous recording, so clustering according to time > adjacency seems irrelevant. > > > > *QUESTION 2*: is it possible to use a cluster based statistical test here? > If so, it could be better than a-priori averaging the source activity in > the atlas ROIs, which could mask some of the effects, if they are located > in a small area. > > > > 3) Another possibility is looking at the data itself. Unfortunately I > encountered some problems using ft_sourcemovie, though this is a subject > for a different thread. > > > > Any thoughts and advice are highly appreciated! > > Thank you for taking the time, > > roey > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Thu Jul 24 20:50:25 2014 From: roeysc at gmail.com (Roey Schurr) Date: Thu, 24 Jul 2014 21:50:25 +0300 Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: <790E6AB9-6372-4F70-9B98-2DE6E084F552@donders.ru.nl> References: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> <790E6AB9-6372-4F70-9B98-2DE6E084F552@donders.ru.nl> Message-ID: Dear Jim, Thank you for drawing my attention to this problem. I have actually tried building a realistic head model using OPENMEG but encountered some compitability problems since our lab does not use Linux. This is indeed one of the most important (short) future tasks - being able to use such realistic head models. Best, roey On Thu, Jul 24, 2014 at 6:34 PM, E688205 wrote: > Dear Roey, > > To add to Diego's comments, since you are dealing with EEG data a single > sphere headmodel is not a good idea because it does not take into account > the differences in conductivity between the skull, scalp, and brain. This > is not a problem for MEG but is important for EEG. Therefore it is better > to use, for example, a BEM head model. > > Best, > > Jim > > On 23 jul. 2014, at 16:38, "Lozano Soldevilla, D. (Diego)" < > d.lozanosoldevilla at fcdonders.ru.nl> wrote: > > Dear Roey, > > In my opinion it's definitely not a good idea to compute MNE using 19 > sensors. There are studies that have found a drastic localization precision > from 31 to 63 electrodes and further improvements till 123: > > http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) > http://www.ncbi.nlm.nih.gov/pubmed/12495765 > > Although it's very difficult to know the "minimum" number of electrodes > needed to accurately localize a given source (it depends on the strength of > the source you want to localize, source reconstruction algorithm, data > noise...), 19 electrodes are too low to trust the results you can get. > > best, > > Diego > > > ------------------------------ > > From roeysc at gmail.com Mon Jul 21 11:21:32 2014 > From: roeysc at gmail.com (Roey Schurr) > Date: Mon, 21 Jul 2014 12:21:32 +0300 > Subject: [FieldTrip] MNE Source Reconstruction Sanity Check > Message-ID: > > Dear fieldtrippers, > > > > I want to do a sanity check on mne source reconstruction. > > I'm working on continuous EEG recordings (19 electrodes), estimating the > source reconstruction activity using the *mne* (minimum norm estimate) > method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As a > sanity check for the source reconstruction itself, I wanted to compare > conditions in which I could estimate the loci of significant changes, e.g.: > rest vs movement of the hand, moving the right hand vs the left hand, etc. > I have about 60 seconds of recording for each condition. > > > > What I did was: > > 1) Segment the recording of each condition into many "trials" of 2 seconds > each. > > 2) For each trial, average the activity in each of the 90 ROIs of the aal > atlas (I excluded the cerebellum from the source reconstruction). > > > > I was wondering what comparison would be best in this case. Since this is > not Evoked Responses data, I find it hard to find relevant ideas, and would > like to hear your thoughts. > > > > 1) I did a frequency analysis (mtmfft) in conventional bands of interest > and ran ft_freqstatistics on the resulting structures (using ttest2 and the > bonferoni correction for the multiple comparison problem). This gave some > results, however for most conditions they are not very encouraging (the > ROIs that showed significant differences were not close to those that I > have assumed). > > > > *QUESTION 1*: do you think this is a proper method? Note that I did not use > a frequency based source reconstruction in the first place, because I'm > ultimately interested in the time course in the source space. > > > > 2) I was wondering if a cluster based permutation test is impossible to use > here, since this is a continuous recording, so clustering according to time > adjacency seems irrelevant. > > > > *QUESTION 2*: is it possible to use a cluster based statistical test here? > If so, it could be better than a-priori averaging the source activity in > the atlas ROIs, which could mask some of the effects, if they are located > in a small area. > > > > 3) Another possibility is looking at the data itself. Unfortunately I > encountered some problems using ft_sourcemovie, though this is a subject > for a different thread. > > > > Any thoughts and advice are highly appreciated! > > Thank you for taking the time, > > roey > > _______________________________________________ > > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Fri Jul 25 02:20:18 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Fri, 25 Jul 2014 00:20:18 +0000 Subject: [FieldTrip] Group analysis at source level In-Reply-To: References: Message-ID: <1406247611055.41098@flinders.edu.au> Hey laura, Im not 100% sure of what I am about to tell you, as I am not an expert, but I think ft_sourceinterpolate is used in tutorials to display results on an mri model basically. One such tutorial is: http://fieldtrip.fcdonders.nl/tutorial/beamformingextended If you want to be consistent over subjects, I would use a sourcemodel when calculating your source variable, like in: http://fieldtrip.fcdonders.nl/faq/how_can_i_map_source_locations_between_two_different_representations?s[]=atlas and: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=subject&s[]=grid&s[]=mni? I really hope this helps, it helped me :) Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Laura Rueda Delgado Sent: Friday, 25 July 2014 1:06 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Group analysis at source level Dear fieldtrip users, I'm working with source estimations of EEG data. At the moment, I have estimated the sources at the individual level with individual MRIs. I've used ft_sourceinterpolate and ft_volumenormalise to transform the resulting estimation maps into a template for comparison, and I do this for every subject: cfg = []; cfg.parameter = 'avg.pow'; source = ft_sourceinterpolate(cfg, source, mri); cfg = []; cfg.template = '\spm8\templates\T1.nii'; cfg.parameter = 'all'; cfg.nonlinear = 'yes'; cfg.coordsys = 'spm'; source = ft_volumenormalise(cfg, source); Once I have the estimated sources for all the subjects, I use ft_sourcestatistics: cfg = []; cfg.dim = sourcePre_con{1}.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'avg.pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 'all'; cfg.alpha = 0.05; cfg.tail = 0; cfg.design(1,:) = [1:num 1:num]; cfg.design(2,:) = [ones(1,num) ones(1,num)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg,sourcePost_con{:}, sourcePre_con{:}); And I get this error: Reference to non-existent field 'pos'. Error in statistics_wrapper>get_source_avg (line 643) fprintf('only selecting voxels inside the brain for statistics (%.1f%%)\n', 100*length(varargin{1}.inside)/size(varargin{1}.pos,1)); Error in statistics_wrapper (line 206) [dat, cfg] = get_source_avg(cfg, varargin{:}); Error in ft_sourcestatistics (line 107) [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I check the data structure and the structure of the sources at the individual level, before interpolating and normalising has the pos field, but after these steps, it's gone. How can I work around this error? Do I have to keep the pos field and transform it according to the template? Thank you in advance for your help. Best regards, Laura Rueda -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jul 25 08:46:19 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 25 Jul 2014 08:46:19 +0200 Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: References: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> <790E6AB9-6372-4F70-9B98-2DE6E084F552@donders.ru.nl> Message-ID: <53D1FD3B.7040600@donders.ru.nl> Dear Roey, I agreet that this is a bad idea - independently of what result you will get, the error is just too big to draw any reliable conclusions. Imho, you can better try using ICA to decompose your data into components. Concerning the headmodel, there is a standard BEM headmodel template available in FieldTrip. Best, Jörn On 7/24/2014 8:50 PM, Roey Schurr wrote: > Dear Jim, > Thank you for drawing my attention to this problem. I have actually > tried building a realistic head model using OPENMEG but encountered > some compitability problems since our lab does not use Linux. This is > indeed one of the most important (short) future tasks - being able to > use such realistic head models. > Best, > roey > > > On Thu, Jul 24, 2014 at 6:34 PM, E688205 > wrote: > > Dear Roey, > > To add to Diego's comments, since you are dealing with EEG data a > single sphere headmodel is not a good idea because it does not > take into account the differences in conductivity between the > skull, scalp, and brain. This is not a problem for MEG but is > important for EEG. Therefore it is better to use, for example, a > BEM head model. > > Best, > > Jim > > On 23 jul. 2014, at 16:38, "Lozano Soldevilla, D. (Diego)" > > wrote: > >> Dear Roey, >> >> In my opinion it's definitely not a good idea to compute MNE >> using 19 sensors. There are studies that have found a drastic >> localization precision from 31 to 63 electrodes and further >> improvements till 123: >> >> http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) >> http://www.ncbi.nlm.nih.gov/pubmed/12495765 >> >> Although it's very difficult to know the "minimum" number of >> electrodes needed to accurately localize a given source (it >> depends on the strength of the source you want to localize, >> source reconstruction algorithm, data noise...), 19 electrodes >> are too low to trust the results you can get. >> >> best, >> >> Diego >> >> >> ------------------------------------------------------------------------ >> From roeysc atgmail.com Mon Jul 21 11:21:32 2014 >> From: roeysc atgmail.com (Roey Schurr) >> Date: Mon, 21 Jul 2014 12:21:32 +0300 >> Subject: [FieldTrip] MNE Source Reconstruction Sanity Check >> Message-ID: > >> >> Dear fieldtrippers, >> >> >> >> I want to do a sanity check on mne source reconstruction. >> >> I'm working on continuous EEG recordings (19 electrodes), estimating the >> source reconstruction activity using the *mne* (minimum norm estimate) >> method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As a >> sanity check for the source reconstruction itself, I wanted to compare >> conditions in which I could estimate the loci of significant changes, e.g.: >> rest vs movement of the hand, moving the right hand vs the left hand, etc. >> I have about 60 seconds of recording for each condition. >> >> >> >> What I did was: >> >> 1) Segment the recording of each condition into many "trials" of 2 seconds >> each. >> >> 2) For each trial, average the activity in each of the 90 ROIs of the aal >> atlas (I excluded the cerebellum from the source reconstruction). >> >> >> >> I was wondering what comparison would be best in this case. Since this is >> not Evoked Responses data, I find it hard to find relevant ideas, and would >> like to hear your thoughts. >> >> >> >> 1) I did a frequency analysis (mtmfft) in conventional bands of interest >> and ran ft_freqstatistics on the resulting structures (using ttest2 and the >> bonferoni correction for the multiple comparison problem). This gave some >> results, however for most conditions they are not very encouraging (the >> ROIs that showed significant differences were not close to those that I >> have assumed). >> >> >> >> *QUESTION 1*: do you think this is a proper method? Note that I did not use >> a frequency based source reconstruction in the first place, because I'm >> ultimately interested in the time course in the source space. >> >> >> >> 2) I was wondering if a cluster based permutation test is impossible to use >> here, since this is a continuous recording, so clustering according to time >> adjacency seems irrelevant. >> >> >> >> *QUESTION 2*: is it possible to use a cluster based statistical test here? >> If so, it could be better than a-priori averaging the source activity in >> the atlas ROIs, which could mask some of the effects, if they are located >> in a small area. >> >> >> >> 3) Another possibility is looking at the data itself. Unfortunately I >> encountered some problems using ft_sourcemovie, though this is a subject >> for a different thread. >> >> >> >> Any thoughts and advice are highly appreciated! >> >> Thank you for taking the time, >> >> roey >> _______________________________________________ >> >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From roeysc at gmail.com Fri Jul 25 09:04:29 2014 From: roeysc at gmail.com (Roey Schurr) Date: Fri, 25 Jul 2014 10:04:29 +0300 Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: <53D1FD3B.7040600@donders.ru.nl> References: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> <790E6AB9-6372-4F70-9B98-2DE6E084F552@donders.ru.nl> <53D1FD3B.7040600@donders.ru.nl> Message-ID: Dear Jörn, Thank you very much for your input! Indeed, since I'm now using template MRIs and not individual ones (for the time being), using the template BEM headodel makes perfect sense. Thank you. Regarding the ICA decomposition, as long as I use this 19 electrodes data, this could be a good compromise. The original goal is being able to get some anatomically significant results. Even though interpolated scalp maps (and microstates) are anatomical in a sense, networks based on the inverse solution are still the final goal. For this it seems like I will indeed need a different data set. Best, roey On Fri, Jul 25, 2014 at 9:46 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Roey, > > I agreet that this is a bad idea - independently of what result you will > get, the error is just too big to draw any reliable conclusions. Imho, you > can better try using ICA to decompose your data into components. > > Concerning the headmodel, there is a standard BEM headmodel template > available in FieldTrip. > > Best, > Jörn > > > On 7/24/2014 8:50 PM, Roey Schurr wrote: > >> Dear Jim, >> Thank you for drawing my attention to this problem. I have actually tried >> building a realistic head model using OPENMEG but encountered some >> compitability problems since our lab does not use Linux. This is indeed one >> of the most important (short) future tasks - being able to use such >> realistic head models. >> Best, >> roey >> >> >> On Thu, Jul 24, 2014 at 6:34 PM, E688205 > > wrote: >> >> Dear Roey, >> >> To add to Diego's comments, since you are dealing with EEG data a >> single sphere headmodel is not a good idea because it does not >> take into account the differences in conductivity between the >> skull, scalp, and brain. This is not a problem for MEG but is >> important for EEG. Therefore it is better to use, for example, a >> BEM head model. >> >> Best, >> >> Jim >> >> On 23 jul. 2014, at 16:38, "Lozano Soldevilla, D. (Diego)" >> > > wrote: >> >> Dear Roey, >>> >>> In my opinion it's definitely not a good idea to compute MNE >>> using 19 sensors. There are studies that have found a drastic >>> localization precision from 31 to 63 electrodes and further >>> improvements till 123: >>> >>> http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) >>> http://www.ncbi.nlm.nih.gov/pubmed/12495765 >>> >>> Although it's very difficult to know the "minimum" number of >>> electrodes needed to accurately localize a given source (it >>> depends on the strength of the source you want to localize, >>> source reconstruction algorithm, data noise...), 19 electrodes >>> are too low to trust the results you can get. >>> >>> best, >>> >>> Diego >>> >>> >>> ------------------------------------------------------------ >>> ------------ >>> From roeysc atgmail.com Mon Jul 21 11:21:32 >>> 2014 >>> From: roeysc atgmail.com (Roey Schurr) >>> >>> Date: Mon, 21 Jul 2014 12:21:32 +0300 >>> Subject: [FieldTrip] MNE Source Reconstruction Sanity Check >>> Message-ID: >> mail.gmail.com >> AQ_W43cHF_8J2b+rNyzd55x4aRviw at mail.gmail.com>> >>> >>> >>> Dear fieldtrippers, >>> >>> >>> >>> I want to do a sanity check on mne source reconstruction. >>> >>> I'm working on continuous EEG recordings (19 electrodes), estimating >>> the >>> source reconstruction activity using the *mne* (minimum norm >>> estimate) >>> method, a *template MRI* (Colin27) and a *singlesphere* headmodel. >>> As a >>> sanity check for the source reconstruction itself, I wanted to >>> compare >>> conditions in which I could estimate the loci of significant >>> changes, e.g.: >>> rest vs movement of the hand, moving the right hand vs the left >>> hand, etc. >>> I have about 60 seconds of recording for each condition. >>> >>> >>> >>> What I did was: >>> >>> 1) Segment the recording of each condition into many "trials" of 2 >>> seconds >>> each. >>> >>> 2) For each trial, average the activity in each of the 90 ROIs of >>> the aal >>> atlas (I excluded the cerebellum from the source reconstruction). >>> >>> >>> >>> I was wondering what comparison would be best in this case. Since >>> this is >>> not Evoked Responses data, I find it hard to find relevant ideas, >>> and would >>> like to hear your thoughts. >>> >>> >>> >>> 1) I did a frequency analysis (mtmfft) in conventional bands of >>> interest >>> and ran ft_freqstatistics on the resulting structures (using ttest2 >>> and the >>> bonferoni correction for the multiple comparison problem). This gave >>> some >>> results, however for most conditions they are not very encouraging >>> (the >>> ROIs that showed significant differences were not close to those >>> that I >>> have assumed). >>> >>> >>> >>> *QUESTION 1*: do you think this is a proper method? Note that I did >>> not use >>> a frequency based source reconstruction in the first place, because >>> I'm >>> ultimately interested in the time course in the source space. >>> >>> >>> >>> 2) I was wondering if a cluster based permutation test is impossible >>> to use >>> here, since this is a continuous recording, so clustering according >>> to time >>> adjacency seems irrelevant. >>> >>> >>> >>> *QUESTION 2*: is it possible to use a cluster based statistical test >>> here? >>> If so, it could be better than a-priori averaging the source >>> activity in >>> the atlas ROIs, which could mask some of the effects, if they are >>> located >>> in a small area. >>> >>> >>> >>> 3) Another possibility is looking at the data itself. Unfortunately I >>> encountered some problems using ft_sourcemovie, though this is a >>> subject >>> for a different thread. >>> >>> >>> >>> Any thoughts and advice are highly appreciated! >>> >>> Thank you for taking the time, >>> >>> roey >>> _______________________________________________ >>> >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Fri Jul 25 09:29:55 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Fri, 25 Jul 2014 09:29:55 +0200 (CEST) Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: References: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> <790E6AB9-6372-4F70-9B98-2DE6E084F552@donders.ru.nl> Message-ID: <008b01cfa7da$3bd9eac0$b38dc040$@herring@fcdonders.ru.nl> Hi Roey, Since you do not have the subject’s anatomical MRI and are using the colin27 standard brain, you can just use the template BEM headmodel in fieldtrip/template/headmodel (see for example, http://fieldtrip.fcdonders.nl/template/headmodel) . This head model is based on the colin27 brain. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Roey Schurr Sent: donderdag 24 juli 2014 20:50 To: FieldTrip discussion list Subject: Re: [FieldTrip] MNE Source Reconstruction Sanity Check Dear Jim, Thank you for drawing my attention to this problem. I have actually tried building a realistic head model using OPENMEG but encountered some compitability problems since our lab does not use Linux. This is indeed one of the most important (short) future tasks - being able to use such realistic head models. Best, roey On Thu, Jul 24, 2014 at 6:34 PM, E688205 wrote: Dear Roey, To add to Diego's comments, since you are dealing with EEG data a single sphere headmodel is not a good idea because it does not take into account the differences in conductivity between the skull, scalp, and brain. This is not a problem for MEG but is important for EEG. Therefore it is better to use, for example, a BEM head model. Best, Jim On 23 jul. 2014, at 16:38, "Lozano Soldevilla, D. (Diego)" wrote: Dear Roey, In my opinion it's definitely not a good idea to compute MNE using 19 sensors. There are studies that have found a drastic localization precision from 31 to 63 electrodes and further improvements till 123: http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) http://www.ncbi.nlm.nih.gov/pubmed/12495765 Although it's very difficult to know the "minimum" number of electrodes needed to accurately localize a given source (it depends on the strength of the source you want to localize, source reconstruction algorithm, data noise...), 19 electrodes are too low to trust the results you can get. best, Diego _____ >From roeysc at gmail.com Mon Jul 21 11:21:32 2014 From: roeysc at gmail.com (Roey Schurr) Date: Mon, 21 Jul 2014 12:21:32 +0300 Subject: [FieldTrip] MNE Source Reconstruction Sanity Check Message-ID: Dear fieldtrippers, I want to do a sanity check on mne source reconstruction. I'm working on continuous EEG recordings (19 electrodes), estimating the source reconstruction activity using the *mne* (minimum norm estimate) method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As a sanity check for the source reconstruction itself, I wanted to compare conditions in which I could estimate the loci of significant changes, e.g.: rest vs movement of the hand, moving the right hand vs the left hand, etc. I have about 60 seconds of recording for each condition. What I did was: 1) Segment the recording of each condition into many "trials" of 2 seconds each. 2) For each trial, average the activity in each of the 90 ROIs of the aal atlas (I excluded the cerebellum from the source reconstruction). I was wondering what comparison would be best in this case. Since this is not Evoked Responses data, I find it hard to find relevant ideas, and would like to hear your thoughts. 1) I did a frequency analysis (mtmfft) in conventional bands of interest and ran ft_freqstatistics on the resulting structures (using ttest2 and the bonferoni correction for the multiple comparison problem). This gave some results, however for most conditions they are not very encouraging (the ROIs that showed significant differences were not close to those that I have assumed). *QUESTION 1*: do you think this is a proper method? Note that I did not use a frequency based source reconstruction in the first place, because I'm ultimately interested in the time course in the source space. 2) I was wondering if a cluster based permutation test is impossible to use here, since this is a continuous recording, so clustering according to time adjacency seems irrelevant. *QUESTION 2*: is it possible to use a cluster based statistical test here? If so, it could be better than a-priori averaging the source activity in the atlas ROIs, which could mask some of the effects, if they are located in a small area. 3) Another possibility is looking at the data itself. Unfortunately I encountered some problems using ft_sourcemovie, though this is a subject for a different thread. Any thoughts and advice are highly appreciated! Thank you for taking the time, roey _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laura.Rueda at faber.kuleuven.be Fri Jul 25 12:00:21 2014 From: Laura.Rueda at faber.kuleuven.be (Laura Rueda Delgado) Date: Fri, 25 Jul 2014 10:00:21 +0000 Subject: [FieldTrip] Group analysis at source level In-Reply-To: <1406247611055.41098@flinders.edu.au> References: , <1406247611055.41098@flinders.edu.au> Message-ID: Dear Tyler, Thank you for your suggestion. I had checked the option of warping the individual grid to the template grid, but I discarded it, maybe for wrong reasons. From the tutorial, I understand that warping is done via the individual MRI. I have done the segmentation, mesh creation and grid preparation at the individual level. So the warping of grids seems to redo this segmentation and mesh creation from the individual MRI to get the individual grid and warp it. The function ft_prepare_sourcemodel does not have the option to include the headmodel that I've already created (in my case, a 3-shell BEM), and that's why I excluded this option. However, maybe I can use the template grid with the BEM like this: cfg = []; cfg.grid = template_grid; cfg.inwardshift = 0; cfg.vol = individual_vol; %result from segmentation and mesh creation warped_grid = ft_prepare_sourcemodel(cfg); And then create the headmodel: cfg = []; cfg.vol = individual_vol; cfg.elec = individual_sens; cfg.grid = warped_grid; cfg.grid.tight = 'yes'; cfg.reducerank = 'no'; % cfg.normalize = 'no'; leadfield = ft_prepare_leadfield(cfg); My question is whether this is correct given that warped_grid would be in MNI coordinates, and individual_vol and individual_sens would not. And also, would this mean that the points of the grid would all be the same for all subjects? Best regards, Laura From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Tyler Grummett [tyler.grummett at flinders.edu.au] Sent: 25 July 2014 02:20 To: FieldTrip discussion list Subject: Re: [FieldTrip] Group analysis at source level Hey laura, Im not 100% sure of what I am about to tell you, as I am not an expert, but I think ft_sourceinterpolate is used in tutorials to display results on an mri model basically. One such tutorial is: http://fieldtrip.fcdonders.nl/tutorial/beamformingextended If you want to be consistent over subjects, I would use a sourcemodel when calculating your source variable, like in: http://fieldtrip.fcdonders.nl/faq/how_can_i_map_source_locations_between_two_different_representations?s[]=atlas and: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=subject&s[]=grid&s[]=mni​ I really hope this helps, it helped me :) Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Laura Rueda Delgado Sent: Friday, 25 July 2014 1:06 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Group analysis at source level Dear fieldtrip users, I'm working with source estimations of EEG data. At the moment, I have estimated the sources at the individual level with individual MRIs. I've used ft_sourceinterpolate and ft_volumenormalise to transform the resulting estimation maps into a template for comparison, and I do this for every subject: cfg = []; cfg.parameter = 'avg.pow'; source = ft_sourceinterpolate(cfg, source, mri); cfg = []; cfg.template = '\spm8\templates\T1.nii'; cfg.parameter = 'all'; cfg.nonlinear = 'yes'; cfg.coordsys = 'spm'; source = ft_volumenormalise(cfg, source); Once I have the estimated sources for all the subjects, I use ft_sourcestatistics: cfg = []; cfg.dim = sourcePre_con{1}.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'avg.pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 'all'; cfg.alpha = 0.05; cfg.tail = 0; cfg.design(1,:) = [1:num 1:num]; cfg.design(2,:) = [ones(1,num) ones(1,num)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg,sourcePost_con{:}, sourcePre_con{:}); And I get this error: Reference to non-existent field 'pos'. Error in statistics_wrapper>get_source_avg (line 643) fprintf('only selecting voxels inside the brain for statistics (%.1f%%)\n', 100*length(varargin{1}.inside)/size(varargin{1}.pos,1)); Error in statistics_wrapper (line 206) [dat, cfg] = get_source_avg(cfg, varargin{:}); Error in ft_sourcestatistics (line 107) [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I check the data structure and the structure of the sources at the individual level, before interpolating and normalising has the pos field, but after these steps, it's gone. How can I work around this error? Do I have to keep the pos field and transform it according to the template? Thank you in advance for your help. Best regards, Laura Rueda -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Fri Jul 25 13:31:32 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Fri, 25 Jul 2014 13:31:32 +0200 (CEST) Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: <153325407.8009026.1406190552110.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <2077847771.8023108.1406287892841.JavaMail.root@sculptor.zimbra.ru.nl> Hi Azadeh, The problem is originated during the segmentation processing. Basically the default cfg values that you applied to template/anatomy/single_subj_T1.nii gave you the attached segmentation: the scalp is poorly defined as you can see. Then you end up with the wrong headmodel. I noticed that the single_subj_T1.nii has very low resolution. I used the single_subj_T1_1mm.nii instead with the following cfg parameters (by trial and error...) and they gave me sensitive binary representations: mri = ft_read_mri('/home/common/matlab/fieldtrip/template/anatomy/single_subj_T1_1mm.nii'); mri.coordsys = 'spm'; cfg                = []; cfg.brainsmooth    = 5%(default = 5) cfg.scalpsmooth    = 5%(default = 5) cfg.brainthreshold = 0.25%(default = 0.5) cfg.scalpthreshold = 0.25%(default = 0.1) cfg.output    = {'brain','skull','scalp'}; seg  = ft_volumesegment(cfg, mri); cfg              = []; cfg.funparameter = 'scalp'; ft_sourceplot(cfg,seg); The ft_volumesegment documentation mentions the fieldtrip/external/spm8/templates/T1.nii Unfortunately I'm not sure what this T1 is (MNI152 might be?) and its advantages or disadvantatges. If you use the T1.nii with the following cfg, you'll get a segmentation that makes sense to me: mri = ft_read_mri('/home/common/matlab/fieldtrip/external/spm8/templates/T1.nii'); mri.coordsys = 'spm'; cfg                = []; cfg.brainsmooth    = 2%(default = 5) cfg.scalpsmooth    = 2%(default = 5) cfg.brainthreshold = 0.25%(default = 0.5) cfg.scalpthreshold = 0.15%(default = 0.1) cfg.output    = {'brain','skull','scalp'}; seg  = ft_volumesegment(cfg, mri); cfg              = []; cfg.funparameter = 'scalp';%check the brain and skull too ft_sourceplot(cfg,seg); My source modeling experience is restricted to MEG using individual T1s (not a template). I'm sure a lot of people in the list have experience in the EEG/source modeling business using template anatomical scans. Could somedoby provide us a bit of advice?: Which anatomical template should one use (T1.nii, single_subj_T1_1mm.nii other?) and which cfg parameters make sense for the segmentation? It would be very nice if we could establish a kind of default and share them in the fieldtrip wiki ;) (I could do it if somebody share his/her knowledge/experience) Thanks in advance, Diego ----- Original Message ----- > From azadehh at uvic.ca Sat Jul 19 00:26:06 2014 > From: azadehh at uvic.ca (Azadeh Hajihosseini) > Date: Fri, 18 Jul 2014 15:26:06 -0700 > Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN > values > in the leadfield matrices > Message-ID: > > > Hello FieldTrip members, > > I am trying to source localize EEG oscillatory activity and have a few > problems in constructing the forward model and eventually running the > source analysis. I think the problems are related to each other. Here > is > what happens: > > 1- When I run the source analysis, I get this error message: > > *??? Error using ==> svd* > *Input to SVD must not contain NaN or Inf.* > > *Error in ==> beamformer_dics>pinv at 650* > * [U,S,V] = svd(A,0);* > > *Error in ==> beamformer_dics at 339* > * filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross > eqn. 3, use PINV/SVD to cover rank* > * deficient leadfield* > > *Error in ==> ft_sourceanalysis at 572* > * dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:});* > > *Error in ==> test_sourceanalysis at 12* > *sourceTF = ft_sourceanalysis(cfg, data_TF);* > > > 2- Checking the leadfiled matrices, I see there are a lot of NaN > values. > 3- When I visualize the head model I have created, the plots don't > look > right. The third field, *vol.bnd(3),* which is supposed to be the > brain > tissue, looks like a cube. > > And here are my code lines: > > *% CONSTRUCT A HEAD MODEL from the template mri in FT's > template/anatomy* > *mri = ft_read_mri('template\anatomy\single_subj_T1.nii');* > *mri.coordsys = 'spm';* > > *%SEGMENTATION:* > *cfg = [];* > *cfg.output = {'brain','skull','scalp'};* > *segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT > resliced > data* > *save segmentedmri_template segmentedmri_template* > > > *%CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL)* > *cfg = [];* > *cfg.method ='bemcp';* > *cfg.tissue ={'brain','skull','scalp'};* > *% cfg.outputfile = 'template_';* > *vol = ft_prepare_headmodel(cfg, segmentedmri_template);* > *save vol vol* > > *%Visualization of the head model* > *figure;* > *ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp * > *figure;* > *ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull* > *figure;* > *ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks > like a > cube* > > *% Align electrodes * > *elec = ft_read_sens('template\electrode\standard_1020.elc'); * > *% load volume conduction model* > *% load vol; * > > *%interactive allignment* > *cfg = [];* > *cfg.method = 'interactive';* > *cfg.elec = elec;* > *cfg.headshape = vol.bnd(1);* > *elec_aligned = ft_electroderealign(cfg);* > > *save elec_aligned elec_aligned* > > *% Prepare leadfield* > *load data_TF* > *cfg=[];* > *cfg.vol = vol; %structure with volume conduction model* > *cfg.elec = elec_aligned;%structure with electrode positions* > *[grid] = ft_prepare_leadfield(cfg, data_TF);* > > *% Find source* > *cfg = []; * > *cfg.method = 'dics';* > *cfg.frequency = 25; * > *cfg.grid = grid; * > *cfg.vol = vol;* > *cfg.latency = .4;%single number in seconds, for time-frequency > analysis* > *cfg.dics.projectnoise = 'yes';* > *cfg.dics.lambda = 0;* > *cfg.elec = elec_aligned;%structure with electrode positions* > > *sourceTF = ft_sourceanalysis(cfg, data_TF);* > > > I am using *wavelet *with a *fourier* output for the time-frequency > analysis (*data_TF)*. Do you have any idea what might be wrong here? > > I also have a more general question. What type of time-frequency data > can > be input to source analysis? *ft_freqanalysis* provides power, power > and > cross-spectra, and complex fourier outputs. But is source-localization > based on only power data correct? I couldn't find any explanations > regarding this issue in the tutorial. > > I look forward to hearing from anyone who might have ideas about any > of > these issues! > > Many thanks, > > -- > Azadeh HajiHosseini -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ -------------- next part -------------- A non-text attachment was scrubbed... Name: bad_segmentation.png Type: image/png Size: 43911 bytes Desc: not available URL: From azadehh at uvic.ca Fri Jul 25 20:03:38 2014 From: azadehh at uvic.ca (Azadeh Hajihosseini) Date: Fri, 25 Jul 2014 11:03:38 -0700 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: <2077847771.8023108.1406287892841.JavaMail.root@sculptor.zimbra.ru.nl> References: <153325407.8009026.1406190552110.JavaMail.root@sculptor.zimbra.ru.nl> <2077847771.8023108.1406287892841.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Hi Diego, Thanks so much for looking into this and finding the problem! I am going to try the other two templates you suggested and see what I can make of them. As you mentioned, it would be great to know other people's experience on using mri templates for EEG source localization. I look forward to hearing from anyone who has this experience! Thanks in advance :) Bests, On Fri, Jul 25, 2014 at 4:31 AM, Lozano Soldevilla, D. (Diego) < d.lozanosoldevilla at fcdonders.ru.nl> wrote: > Hi Azadeh, > > The problem is originated during the segmentation processing. Basically > the default cfg values that you applied to > template/anatomy/single_subj_T1.nii gave you the attached segmentation: the > scalp is poorly defined as you can see. Then you end up with the wrong > headmodel. > > I noticed that the single_subj_T1.nii has very low resolution. I used the > single_subj_T1_1mm.nii instead with the following cfg parameters (by trial > and error...) and they gave me sensitive binary representations: > > mri = > ft_read_mri('/home/common/matlab/fieldtrip/template/anatomy/single_subj_T1_1mm.nii'); > mri.coordsys = 'spm'; > > cfg = []; > cfg.brainsmooth = 5%(default = 5) > cfg.scalpsmooth = 5%(default = 5) > cfg.brainthreshold = 0.25%(default = 0.5) > cfg.scalpthreshold = 0.25%(default = 0.1) > > cfg.output = {'brain','skull','scalp'}; > seg = ft_volumesegment(cfg, mri); > > cfg = []; > cfg.funparameter = 'scalp'; > ft_sourceplot(cfg,seg); > > > The ft_volumesegment documentation mentions the > fieldtrip/external/spm8/templates/T1.nii Unfortunately I'm not sure what > this T1 is (MNI152 might be?) and its advantages or disadvantatges. If you > use the T1.nii with the following cfg, you'll get a segmentation that makes > sense to me: > > mri = > ft_read_mri('/home/common/matlab/fieldtrip/external/spm8/templates/T1.nii'); > mri.coordsys = 'spm'; > > cfg = []; > cfg.brainsmooth = 2%(default = 5) > cfg.scalpsmooth = 2%(default = 5) > cfg.brainthreshold = 0.25%(default = 0.5) > cfg.scalpthreshold = 0.15%(default = 0.1) > > cfg.output = {'brain','skull','scalp'}; > seg = ft_volumesegment(cfg, mri); > > cfg = []; > cfg.funparameter = 'scalp';%check the brain and skull too > ft_sourceplot(cfg,seg); > > > My source modeling experience is restricted to MEG using individual T1s > (not a template). I'm sure a lot of people in the list have experience in > the EEG/source modeling business using template anatomical scans. Could > somedoby provide us a bit of advice?: > > Which anatomical template should one use (T1.nii, single_subj_T1_1mm.nii > other?) and which cfg parameters make sense for the segmentation? It would > be very nice if we could establish a kind of default and share them in the > fieldtrip wiki ;) (I could do it if somebody share his/her > knowledge/experience) > > Thanks in advance, > > Diego > > > ----- Original Message ----- > > From azadehh at uvic.ca Sat Jul 19 00:26:06 2014 > > From: azadehh at uvic.ca (Azadeh Hajihosseini) > > Date: Fri, 18 Jul 2014 15:26:06 -0700 > > Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN > > values > > in the leadfield matrices > > Message-ID: > > > > > > Hello FieldTrip members, > > > > I am trying to source localize EEG oscillatory activity and have a few > > problems in constructing the forward model and eventually running the > > source analysis. I think the problems are related to each other. Here > > is > > what happens: > > > > 1- When I run the source analysis, I get this error message: > > > > *??? Error using ==> svd* > > *Input to SVD must not contain NaN or Inf.* > > > > *Error in ==> beamformer_dics>pinv at 650* > > * [U,S,V] = svd(A,0);* > > > > *Error in ==> beamformer_dics at 339* > > * filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross > > eqn. 3, use PINV/SVD to cover rank* > > * deficient leadfield* > > > > *Error in ==> ft_sourceanalysis at 572* > > * dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > > optarg{:});* > > > > *Error in ==> test_sourceanalysis at 12* > > *sourceTF = ft_sourceanalysis(cfg, data_TF);* > > > > > > 2- Checking the leadfiled matrices, I see there are a lot of NaN > > values. > > 3- When I visualize the head model I have created, the plots don't > > look > > right. The third field, *vol.bnd(3),* which is supposed to be the > > brain > > tissue, looks like a cube. > > > > And here are my code lines: > > > > *% CONSTRUCT A HEAD MODEL from the template mri in FT's > > template/anatomy* > > *mri = ft_read_mri('template\anatomy\single_subj_T1.nii');* > > *mri.coordsys = 'spm';* > > > > *%SEGMENTATION:* > > *cfg = [];* > > *cfg.output = {'brain','skull','scalp'};* > > *segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT > > resliced > > data* > > *save segmentedmri_template segmentedmri_template* > > > > > > *%CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL)* > > *cfg = [];* > > *cfg.method ='bemcp';* > > *cfg.tissue ={'brain','skull','scalp'};* > > *% cfg.outputfile = 'template_';* > > *vol = ft_prepare_headmodel(cfg, segmentedmri_template);* > > *save vol vol* > > > > *%Visualization of the head model* > > *figure;* > > *ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp * > > *figure;* > > *ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull* > > *figure;* > > *ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks > > like a > > cube* > > > > *% Align electrodes * > > *elec = ft_read_sens('template\electrode\standard_1020.elc'); * > > *% load volume conduction model* > > *% load vol; * > > > > *%interactive allignment* > > *cfg = [];* > > *cfg.method = 'interactive';* > > *cfg.elec = elec;* > > *cfg.headshape = vol.bnd(1);* > > *elec_aligned = ft_electroderealign(cfg);* > > > > *save elec_aligned elec_aligned* > > > > *% Prepare leadfield* > > *load data_TF* > > *cfg=[];* > > *cfg.vol = vol; %structure with volume conduction model* > > *cfg.elec = elec_aligned;%structure with electrode positions* > > *[grid] = ft_prepare_leadfield(cfg, data_TF);* > > > > *% Find source* > > *cfg = []; * > > *cfg.method = 'dics';* > > *cfg.frequency = 25; * > > *cfg.grid = grid; * > > *cfg.vol = vol;* > > *cfg.latency = .4;%single number in seconds, for time-frequency > > analysis* > > *cfg.dics.projectnoise = 'yes';* > > *cfg.dics.lambda = 0;* > > *cfg.elec = elec_aligned;%structure with electrode positions* > > > > *sourceTF = ft_sourceanalysis(cfg, data_TF);* > > > > > > I am using *wavelet *with a *fourier* output for the time-frequency > > analysis (*data_TF)*. Do you have any idea what might be wrong here? > > > > I also have a more general question. What type of time-frequency data > > can > > be input to source analysis? *ft_freqanalysis* provides power, power > > and > > cross-spectra, and complex fourier outputs. But is source-localization > > based on only power data correct? I couldn't find any explanations > > regarding this issue in the tutorial. > > > > I look forward to hearing from anyone who might have ideas about any > > of > > these issues! > > > > Many thanks, > > > > -- > > Azadeh HajiHosseini > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Azadeh HajiHosseini Graduate student Department of Psychology University of Victoria http://web.uvic.ca/~lccl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From paymandomorientes at yahoo.com Fri Jul 25 21:05:28 2014 From: paymandomorientes at yahoo.com (paymando- morientes) Date: Fri, 25 Jul 2014 12:05:28 -0700 Subject: [FieldTrip] simulating realtime analysis Message-ID: <1406315128.99700.YahooMailNeo@web141606.mail.bf1.yahoo.com> Dear all I want to simulate an online processing with a recorded brainvision data using "ft_realtime_fileproxy". But I wonder how can I "write to" and "read from" buffer simultaneously in matlab?  How is it possible to start the simulation from a script and then analyze it from another script in the same time? As far as I know it is impossible in matlab. Do I have to use to computers? thank you all for your helps -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Mon Jul 28 03:40:16 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Mon, 28 Jul 2014 01:40:16 +0000 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: <2077847771.8023108.1406287892841.JavaMail.root@sculptor.zimbra.ru.nl> References: <153325407.8009026.1406190552110.JavaMail.root@sculptor.zimbra.ru.nl>, <2077847771.8023108.1406287892841.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1406511600163.1705@flinders.edu.au> Hello Diego, Im still having trouble, particularly with ft_prepare_headmodel. After running the code that you used, I ran the following code: cfg = []; cfg.method = 'bemcp'; %openmeeg bemcp vol = ft_prepare_headmodel(cfg, segmentedmri); vol.mat is full of NaNs though, so the leadfield creates NaNs ect. I tried running the following code to fix it: % prepare mesh cfg = []; cfg.method = 'iso2mesh'; cfg.numvertices = 10000; bnd = ft_prepare_mesh( cfg, segmentedmri); % fix mesh [ bnd( 1).pnt, bnd( 1).tri] = meshresample( bnd( 1).pnt, bnd( 1).tri, 1000/size( bnd( 1).pnt, 1)); [ bnd( 2).pnt, bnd( 2).tri] = meshresample( bnd( 2).pnt, bnd( 2).tri, 2000/size( bnd( 2).pnt, 1)); [ bnd( 3).pnt, bnd( 3).tri] = meshresample( bnd( 3).pnt, bnd( 3).tri, 3000/size( bnd( 3).pnt, 1)); for ii = 1:size( bnd), [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'dup'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'isolated'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'deep'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'meshfix'); end However it crashes with the following message: Error using surface_nesting (line 26) the compartment nesting cannot be determined Error in ft_headmodel_bemcp (line 66) order = surface_nesting(vol.bnd, 'insidefirst'); Error in ft_prepare_headmodel (line 262) vol = ft_headmodel_bemcp(geometry, 'conductivity', cfg.conductivity); I dont have enough experience with this code to work out why this isnt working, previously I had been working with the template MRI inside the template folder 'standard_mri', and this process had worked for me. However I was getting really strange results after beamforming (the cerebellum would light up for every task). So I have been using the methods expressed in your email but it hasnt been working for me, can you see if you get the same result? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Lozano Soldevilla, D. (Diego) Sent: Friday, 25 July 2014 9:01 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices Hi Azadeh, The problem is originated during the segmentation processing. Basically the default cfg values that you applied to template/anatomy/single_subj_T1.nii gave you the attached segmentation: the scalp is poorly defined as you can see. Then you end up with the wrong headmodel. I noticed that the single_subj_T1.nii has very low resolution. I used the single_subj_T1_1mm.nii instead with the following cfg parameters (by trial and error...) and they gave me sensitive binary representations: mri = ft_read_mri('/home/common/matlab/fieldtrip/template/anatomy/single_subj_T1_1mm.nii'); mri.coordsys = 'spm'; cfg = []; cfg.brainsmooth = 5%(default = 5) cfg.scalpsmooth = 5%(default = 5) cfg.brainthreshold = 0.25%(default = 0.5) cfg.scalpthreshold = 0.25%(default = 0.1) cfg.output = {'brain','skull','scalp'}; seg = ft_volumesegment(cfg, mri); cfg = []; cfg.funparameter = 'scalp'; ft_sourceplot(cfg,seg); The ft_volumesegment documentation mentions the fieldtrip/external/spm8/templates/T1.nii Unfortunately I'm not sure what this T1 is (MNI152 might be?) and its advantages or disadvantatges. If you use the T1.nii with the following cfg, you'll get a segmentation that makes sense to me: mri = ft_read_mri('/home/common/matlab/fieldtrip/external/spm8/templates/T1.nii'); mri.coordsys = 'spm'; cfg = []; cfg.brainsmooth = 2%(default = 5) cfg.scalpsmooth = 2%(default = 5) cfg.brainthreshold = 0.25%(default = 0.5) cfg.scalpthreshold = 0.15%(default = 0.1) cfg.output = {'brain','skull','scalp'}; seg = ft_volumesegment(cfg, mri); cfg = []; cfg.funparameter = 'scalp';%check the brain and skull too ft_sourceplot(cfg,seg); My source modeling experience is restricted to MEG using individual T1s (not a template). I'm sure a lot of people in the list have experience in the EEG/source modeling business using template anatomical scans. Could somedoby provide us a bit of advice?: Which anatomical template should one use (T1.nii, single_subj_T1_1mm.nii other?) and which cfg parameters make sense for the segmentation? It would be very nice if we could establish a kind of default and share them in the fieldtrip wiki ;) (I could do it if somebody share his/her knowledge/experience) Thanks in advance, Diego ----- Original Message ----- > From azadehh at uvic.ca Sat Jul 19 00:26:06 2014 > From: azadehh at uvic.ca (Azadeh Hajihosseini) > Date: Fri, 18 Jul 2014 15:26:06 -0700 > Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN > values > in the leadfield matrices > Message-ID: > > > Hello FieldTrip members, > > I am trying to source localize EEG oscillatory activity and have a few > problems in constructing the forward model and eventually running the > source analysis. I think the problems are related to each other. Here > is > what happens: > > 1- When I run the source analysis, I get this error message: > > *??? Error using ==> svd* > *Input to SVD must not contain NaN or Inf.* > > *Error in ==> beamformer_dics>pinv at 650* > * [U,S,V] = svd(A,0);* > > *Error in ==> beamformer_dics at 339* > * filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross > eqn. 3, use PINV/SVD to cover rank* > * deficient leadfield* > > *Error in ==> ft_sourceanalysis at 572* > * dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:});* > > *Error in ==> test_sourceanalysis at 12* > *sourceTF = ft_sourceanalysis(cfg, data_TF);* > > > 2- Checking the leadfiled matrices, I see there are a lot of NaN > values. > 3- When I visualize the head model I have created, the plots don't > look > right. The third field, *vol.bnd(3),* which is supposed to be the > brain > tissue, looks like a cube. > > And here are my code lines: > > *% CONSTRUCT A HEAD MODEL from the template mri in FT's > template/anatomy* > *mri = ft_read_mri('template\anatomy\single_subj_T1.nii');* > *mri.coordsys = 'spm';* > > *%SEGMENTATION:* > *cfg = [];* > *cfg.output = {'brain','skull','scalp'};* > *segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT > resliced > data* > *save segmentedmri_template segmentedmri_template* > > > *%CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL)* > *cfg = [];* > *cfg.method ='bemcp';* > *cfg.tissue ={'brain','skull','scalp'};* > *% cfg.outputfile = 'template_';* > *vol = ft_prepare_headmodel(cfg, segmentedmri_template);* > *save vol vol* > > *%Visualization of the head model* > *figure;* > *ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp * > *figure;* > *ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull* > *figure;* > *ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks > like a > cube* > > *% Align electrodes * > *elec = ft_read_sens('template\electrode\standard_1020.elc'); * > *% load volume conduction model* > *% load vol; * > > *%interactive allignment* > *cfg = [];* > *cfg.method = 'interactive';* > *cfg.elec = elec;* > *cfg.headshape = vol.bnd(1);* > *elec_aligned = ft_electroderealign(cfg);* > > *save elec_aligned elec_aligned* > > *% Prepare leadfield* > *load data_TF* > *cfg=[];* > *cfg.vol = vol; %structure with volume conduction model* > *cfg.elec = elec_aligned;%structure with electrode positions* > *[grid] = ft_prepare_leadfield(cfg, data_TF);* > > *% Find source* > *cfg = []; * > *cfg.method = 'dics';* > *cfg.frequency = 25; * > *cfg.grid = grid; * > *cfg.vol = vol;* > *cfg.latency = .4;%single number in seconds, for time-frequency > analysis* > *cfg.dics.projectnoise = 'yes';* > *cfg.dics.lambda = 0;* > *cfg.elec = elec_aligned;%structure with electrode positions* > > *sourceTF = ft_sourceanalysis(cfg, data_TF);* > > > I am using *wavelet *with a *fourier* output for the time-frequency > analysis (*data_TF)*. Do you have any idea what might be wrong here? > > I also have a more general question. What type of time-frequency data > can > be input to source analysis? *ft_freqanalysis* provides power, power > and > cross-spectra, and complex fourier outputs. But is source-localization > based on only power data correct? I couldn't find any explanations > regarding this issue in the tutorial. > > I look forward to hearing from anyone who might have ideas about any > of > these issues! > > Many thanks, > > -- > Azadeh HajiHosseini -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ From jm.horschig at donders.ru.nl Mon Jul 28 10:23:29 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 28 Jul 2014 10:23:29 +0200 Subject: [FieldTrip] simulating realtime analysis In-Reply-To: <1406315128.99700.YahooMailNeo@web141606.mail.bf1.yahoo.com> References: <1406315128.99700.YahooMailNeo@web141606.mail.bf1.yahoo.com> Message-ID: <53D60881.3000805@donders.ru.nl> Hi, have you you tried opening two matlab sessions on one computer? Best, Jörn On 7/25/2014 9:05 PM, paymando- morientes wrote: > Dear all > I want to simulate an online processing with a recorded brainvision > data using "ft_realtime_fileproxy". But I wonder how can I "write to" > and "read from" buffer simultaneously in matlab? > How is it possible to start the simulation from a script and then > analyze it from another script in the same time? > As far as I know it is impossible in matlab. Do I have to use to > computers? > > thank you all for your helps > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From dragos at example.com Wed Jul 30 01:18:36 2014 From: dragos at example.com (Dragos Stanciu) Date: Wed, 30 Jul 2014 00:18:36 +0100 Subject: [FieldTrip] Connectivity analysis after applying Welch's method Message-ID: Dear FieldTrippers, I'm Dragos Stanciu and I'm working on my MSc in Neuroinformatics dissertation at the University of Edinburgh. My project involves analysis of resting-state functional connectivity using graph theory in Alzheimer's disease based on MEG data. Each of my subjects has a number of 10s epochs (trials) associated with him/her. I was able to compute the coherence and weighted phase lag index measures (with *ft_freqanalysis *and *ft_connectivityanalysis) *by treating my 10s epochs as trials, but now I would like to reduce the amount of noise in the estimation of the frequency spectrum by employing Welch's method. For this, I split each 10s epoch in 2s segments (minitrials) with 50% overlap: > [sep_epoch_data] = ft_redefinetrial(cfg_cut, single_epoch_data)*. * I then apply *ft_preprocessing *on the minitrials: > [processed_single_epoch] = ft_preprocessing(cfg, sep_epoch_data); I then do frequency analysis on the preprocessed segmented data: > [single_epoch_freq] = ft_freqanalysis(cfg_freq, processed_single_epoch); where > display(cfg_freq) > method: 'mtmfft' > taper: 'hanning' > foilim: [0.5000 4] > output: 'powandcsd' > channel: {148x1 cell} % 148 channels labelled from A1 to A148 > keeptrial: 'no' % don't keep the minitrials, as we want to > average them > keeptapers: 'no' Please note that I average the minitrials (*keeptrial = 'no'*) as I want to get an average of the frequencies. The resulting *single_epoch_freq* structure looks like: > display(single_epoch_freq) > label: {148x1 cell} > dimord: 'chan_freq' > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 4.0009] > powspctrm: [148x8 double] > labelcmb: {10878x2 cell} % channel combinations (148*147/2) > crsspctrm: [10878x8 double] > cfg: [1x1 struct] The last step is to append the averaged frequency structures of each 10s epoch together and perform connectivity analysis on the main 10s epochs. I do the concatenation like so: freq_avgs_powspctrm = [freq_avgs_powspctrm; permute(single_epoch_freq.powspctrm, [3,1,2])]; freq_avgs_crsspctrm = [freq_avgs_crsspctrm; permute(single_epoch_freq.crsspctrm, [3,1,2])]; The idea behind *permute(..., [3, 1, 2])* is that I want the first dimension to represent trials, the second dimension channel combinations and the third dimension frequencies, as this is needed for the input of *ft_connectivity_wpli *(Repetitions x Channelcombination (x Frequency)). I then call stat_conn = ft_connectivityanalysis(cfg_conn, freq_avgs); where: > display(cfg_conn) > method: 'wpli_debiased' > channel: {148x1 cell} and > display(freq_avgs) > powspctrm: [4x148x8 double] % as I have 4 ten second epochs > crsspctrm: [4x10878x8 double] % as I have 4 ten second epochs > label: {148x1 cell} > dimord: 'chan_freq' > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 4.0009] > labelcmb: {10878x2 cell} > cfg: [1x1 struct] The error that I get when running *ft_connectivityanalysis* is: > Error using cat > CAT arguments dimensions are not consistent. > Error in ft_checkdata>fixcsd (line 1170) > data.crsspctrm = cat(catdim, data.powspctrm, data.crsspctrm); When debugging, *catdim* is equal to 1. The error occurs because the 2nd dimension of data.powspctrm and data.crsspctrm are not equal (former is 148, latter is 10878). Do you have any suggestions on getting around this problem? Should I construct *freq_avgs *(data input to ft_connectivityanalysis) differently? I'm also open to different approaches to working out Welch's method in FieldTrip. Please download this archive that contains my test script and 4 example 10s epochs of a subject: https://www.dropbox.com/s/js7pztai02f5p27/Welch_fieldtrip.zip The code should make things clearer (or the opposite). Observations: I thought about using *ft_freqanalysis_mtmwelch*, but apparently it's deprecated. Thank you all in advance for your feedback. Kind regards, Dragos Stanciu -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jul 30 10:28:50 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 30 Jul 2014 10:28:50 +0200 Subject: [FieldTrip] Connectivity analysis after applying Welch's method In-Reply-To: References: Message-ID: <53D8ACC2.9050109@donders.ru.nl> Hi Dragos, while quickly browisng through your mail, it appears to me that you simply need to set single_epoch_freq.dimord = 'rpt_chan_freq'. FieldTrip is using the dimord field to infer the order of the dimensions (*dim*ension *ord*er). The actual dimensions of powspctrm and crsspctrm are now inconsistent with the dimord specifications. Best, Jörn On 7/30/2014 1:18 AM, Dragos Stanciu wrote: > Dear FieldTrippers, > > I'm Dragos Stanciu and I'm working on my MSc in Neuroinformatics > dissertation at the University of Edinburgh. My project involves > analysis of resting-state functional connectivity using graph theory > in Alzheimer's disease based on MEG data. > > Each of my subjects has a number of 10s epochs (trials) associated > with him/her. I was able to compute the coherence and weighted phase > lag index measures (with /ft_freqanalysis /and > /ft_connectivityanalysis) /by treating my 10s epochs as trials, but > now I would like to reduce the amount of noise in the estimation of > the frequency spectrum by employing Welch's method. > > For this, I split each 10s epoch in 2s segments (minitrials) with 50% > overlap: > > [sep_epoch_data] = ft_redefinetrial(cfg_cut, single_epoch_data)/. / > > > I then apply /ft_preprocessing /on the minitrials: > > [processed_single_epoch] = ft_preprocessing(cfg, sep_epoch_data); > > I then do frequency analysis on the preprocessed segmented data: > > [single_epoch_freq] = ft_freqanalysis(cfg_freq, > processed_single_epoch); > > where > > display(cfg_freq) > method: 'mtmfft' > taper: 'hanning' > foilim: [0.5000 4] > output: 'powandcsd' > channel: {148x1 cell} % 148 channels labelled from A1 to > A148 > keeptrial: 'no' % don't keep the minitrials, as we want > to average them > keeptapers: 'no' > > Please note that I average the minitrials (/keeptrial = 'no'/) as I > want to get an average of the frequencies. > > The resulting /single_epoch_freq/ structure looks like: > > display(single_epoch_freq) > label: {148x1 cell} > dimord: 'chan_freq' > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > 4.0009] > powspctrm: [148x8 double] > labelcmb: {10878x2 cell} % channel combinations (148*147/2) > crsspctrm: [10878x8 double] > cfg: [1x1 struct] > > > The last step is to append the averaged frequency structures of each > 10s epoch together and perform connectivity analysis on the main 10s > epochs. I do the concatenation like so: > freq_avgs_powspctrm = [freq_avgs_powspctrm; > permute(single_epoch_freq.powspctrm, [3,1,2])]; > > freq_avgs_crsspctrm = [freq_avgs_crsspctrm; > permute(single_epoch_freq.crsspctrm, [3,1,2])]; > > The idea behind /permute(..., [3, 1, 2])/ is that I want the first > dimension to represent trials, the second dimension channel > combinations and the third dimension frequencies, as this is needed > for the input of /ft_connectivity_wpli /(Repetitions x > Channelcombination (x Frequency)). > > I then call stat_conn = ft_connectivityanalysis(cfg_conn, freq_avgs); > where: > > display(cfg_conn) > method: 'wpli_debiased' > channel: {148x1 cell} > > and > > display(freq_avgs) > powspctrm: [4x148x8 double] % as I have 4 ten second epochs > crsspctrm: [4x10878x8 double] % as I have 4 ten second epochs > label: {148x1 cell} > dimord: 'chan_freq' > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > 4.0009] > labelcmb: {10878x2 cell} > cfg: [1x1 struct] > > > The error that I get when running /ft_connectivityanalysis/ is: > > Error using cat > CAT arguments dimensions are not consistent. > Error in ft_checkdata>fixcsd (line 1170) > data.crsspctrm = cat(catdim, data.powspctrm, data.crsspctrm); > > > When debugging, /catdim/ is equal to 1. The error occurs because the > 2nd dimension of data.powspctrm and data.crsspctrm are not equal > (former is 148, latter is 10878). Do you have any suggestions on > getting around this problem? Should I construct /freq_avgs /(data > input to ft_connectivityanalysis) differently? I'm also open to > different approaches to working out Welch's method in FieldTrip. > > Please download this archive that contains my test script and 4 > example 10s epochs of a subject: > https://www.dropbox.com/s/js7pztai02f5p27/Welch_fieldtrip.zip The code > should make things clearer (or the opposite). > Observations: I thought about using /ft_freqanalysis_mtmwelch/, but > apparently it's deprecated. > > Thank you all in advance for your feedback. > > Kind regards, > Dragos Stanciu > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Wed Jul 30 10:30:22 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 30 Jul 2014 10:30:22 +0200 Subject: [FieldTrip] Connectivity analysis after applying Welch's method In-Reply-To: References: Message-ID: <53D8AD1E.9090801@donders.ru.nl> oh and, maybe use cfg_freq.output = 'fourier', that circumvents the concatenation issue On 7/30/2014 1:18 AM, Dragos Stanciu wrote: > Dear FieldTrippers, > > I'm Dragos Stanciu and I'm working on my MSc in Neuroinformatics > dissertation at the University of Edinburgh. My project involves > analysis of resting-state functional connectivity using graph theory > in Alzheimer's disease based on MEG data. > > Each of my subjects has a number of 10s epochs (trials) associated > with him/her. I was able to compute the coherence and weighted phase > lag index measures (with /ft_freqanalysis /and > /ft_connectivityanalysis) /by treating my 10s epochs as trials, but > now I would like to reduce the amount of noise in the estimation of > the frequency spectrum by employing Welch's method. > > For this, I split each 10s epoch in 2s segments (minitrials) with 50% > overlap: > > [sep_epoch_data] = ft_redefinetrial(cfg_cut, single_epoch_data)/. / > > > I then apply /ft_preprocessing /on the minitrials: > > [processed_single_epoch] = ft_preprocessing(cfg, sep_epoch_data); > > I then do frequency analysis on the preprocessed segmented data: > > [single_epoch_freq] = ft_freqanalysis(cfg_freq, > processed_single_epoch); > > where > > display(cfg_freq) > method: 'mtmfft' > taper: 'hanning' > foilim: [0.5000 4] > output: 'powandcsd' > channel: {148x1 cell} % 148 channels labelled from A1 to > A148 > keeptrial: 'no' % don't keep the minitrials, as we want > to average them > keeptapers: 'no' > > Please note that I average the minitrials (/keeptrial = 'no'/) as I > want to get an average of the frequencies. > > The resulting /single_epoch_freq/ structure looks like: > > display(single_epoch_freq) > label: {148x1 cell} > dimord: 'chan_freq' > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > 4.0009] > powspctrm: [148x8 double] > labelcmb: {10878x2 cell} % channel combinations (148*147/2) > crsspctrm: [10878x8 double] > cfg: [1x1 struct] > > > The last step is to append the averaged frequency structures of each > 10s epoch together and perform connectivity analysis on the main 10s > epochs. I do the concatenation like so: > freq_avgs_powspctrm = [freq_avgs_powspctrm; > permute(single_epoch_freq.powspctrm, [3,1,2])]; > > freq_avgs_crsspctrm = [freq_avgs_crsspctrm; > permute(single_epoch_freq.crsspctrm, [3,1,2])]; > > The idea behind /permute(..., [3, 1, 2])/ is that I want the first > dimension to represent trials, the second dimension channel > combinations and the third dimension frequencies, as this is needed > for the input of /ft_connectivity_wpli /(Repetitions x > Channelcombination (x Frequency)). > > I then call stat_conn = ft_connectivityanalysis(cfg_conn, freq_avgs); > where: > > display(cfg_conn) > method: 'wpli_debiased' > channel: {148x1 cell} > > and > > display(freq_avgs) > powspctrm: [4x148x8 double] % as I have 4 ten second epochs > crsspctrm: [4x10878x8 double] % as I have 4 ten second epochs > label: {148x1 cell} > dimord: 'chan_freq' > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > 4.0009] > labelcmb: {10878x2 cell} > cfg: [1x1 struct] > > > The error that I get when running /ft_connectivityanalysis/ is: > > Error using cat > CAT arguments dimensions are not consistent. > Error in ft_checkdata>fixcsd (line 1170) > data.crsspctrm = cat(catdim, data.powspctrm, data.crsspctrm); > > > When debugging, /catdim/ is equal to 1. The error occurs because the > 2nd dimension of data.powspctrm and data.crsspctrm are not equal > (former is 148, latter is 10878). Do you have any suggestions on > getting around this problem? Should I construct /freq_avgs /(data > input to ft_connectivityanalysis) differently? I'm also open to > different approaches to working out Welch's method in FieldTrip. > > Please download this archive that contains my test script and 4 > example 10s epochs of a subject: > https://www.dropbox.com/s/js7pztai02f5p27/Welch_fieldtrip.zip The code > should make things clearer (or the opposite). > Observations: I thought about using /ft_freqanalysis_mtmwelch/, but > apparently it's deprecated. > > Thank you all in advance for your feedback. > > Kind regards, > Dragos Stanciu > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From paymandomorientes at yahoo.com Wed Jul 30 13:26:32 2014 From: paymandomorientes at yahoo.com (paymando- morientes) Date: Wed, 30 Jul 2014 04:26:32 -0700 Subject: [FieldTrip] problem with buffer simulation Message-ID: <1406719592.38804.YahooMailNeo@web141606.mail.bf1.yahoo.com> Dear field trippers I have encountered a problem simulating the buffer by  using the function "ft_realtime_fileproxy". When I start writing to the buffer, it works normally but when I stop it by "ctrl + c"  matlab stopps working and I have to terminate it from task manager. Does anyone know where the problem is? what should I change in the buffer or function's settings? thank you all! payman -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jul 30 13:34:06 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 30 Jul 2014 13:34:06 +0200 Subject: [FieldTrip] problem with buffer simulation In-Reply-To: <1406719592.38804.YahooMailNeo@web141606.mail.bf1.yahoo.com> References: <1406719592.38804.YahooMailNeo@web141606.mail.bf1.yahoo.com> Message-ID: <53D8D82E.6010808@donders.ru.nl> Hi Payman, I think what you describe is related to this bug: http://bugzilla.fcdonders.nl/show_bug.cgi?id=934 I am afraid that there is no easy fix for this, and we did not continue investigating this further. Best, Jörn On 7/30/2014 1:26 PM, paymando- morientes wrote: > Dear field trippers > I have encountered a problem simulating the buffer by using the > function "ft_realtime_fileproxy". > When I start writing to the buffer, it works normally but when I stop > it by "ctrl + c" matlab stopps working and I have to terminate it > from task manager. > Does anyone know where the problem is? what should I change in the > buffer or function's settings? > > thank you all! > payman > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From roeysc at gmail.com Wed Jul 30 22:24:53 2014 From: roeysc at gmail.com (Roey Schurr) Date: Wed, 30 Jul 2014 23:24:53 +0300 Subject: [FieldTrip] A datatype error in ft_sourceanalysis (Reference to non-existent field 'topo') Message-ID: Dear fieldtrippers, I'm writing you regarding an error I encountered upon computing an inverse solution in mne method: Reference to non-existent field 'topo'. Error in ft_datatype_comp (line 92) if size(comp.topo,1)==size(comp.topo,2) Error in ft_checkdata (line 342) data = ft_datatype_comp(data); Error in ft_sourceanalysis (line 161) data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'}, 'feedback', 'yes'); The problem stems from a change (made in 2014-05-27) in "ft_sourceanalysis", and can be bypassed by changing the order of data types in line 161 of "ft_sourceanalysis": instead of data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'}, 'feedback', 'yes'); write data = ft_checkdata(data, 'datatype', {*'timelock', 'freq', 'comp'*}, 'feedback', 'yes'); Now, I am sure there was a good reason for making this change, so I am guessing the fault is mine in the way I try computing the inverse solution (which did work until this change of ft_sourceanalysis). The relevant piece of code is: cfg = struct; cfg.method = 'mne'; cfg.elec = elec; cfg.grid = gridVar; cfg.vol = vol; cfg.rawtrial = 'yes'; cfg.hdmfile = headModelPath; cfg.mne.lambda = '5%'; cfg.keepfilter = 'yes'; cfg.rawtrial = 'no'; cfg.singletrial = 'no'; cfg.keeptrials = 'yes'; source = ft_sourceanalysis(cfg, data) I am also not sure why the data is thought to be a "comp" data. A possible cause for the problem is that the raw EEG records I work with are in TRC format which has to be transformed into a fieldtrip compatible format. So the "data" struct in the code has the following fields: data = label: {1x19 cell} fsample: 256 trial: {1x12 cell} time: {1x12 cell} interpolatedElectrodes: {1x12 cell} Any ideas regarding the suggested bypass or the deeper cause of the error will be greatly appreciated. Thank you for your time, Best, roey -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Wed Jul 30 22:39:12 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Wed, 30 Jul 2014 20:39:12 +0000 Subject: [FieldTrip] Extra Noise Message-ID: <851EC985-AEE4-483C-841F-9BF04CD1AC66@dartmouth.edu> Hello All, I have been trying to get rid of the noise when I create the mesh for this image in the neck area and the areas above the scalp. The MR Images have nothing below the nose area and there seems to be no contrast change in the image backgrounds to cause this result. [cid:9CC3E462-A99E-4540-9D53-E4519F967028 at socal.rr.com] [cid:F80D2CB7-391E-4688-95CF-A18E4425E8C4 at socal.rr.com] I am really stumped as to how to change this, These different results were gotten by changing the threshold and the mesh number slightly. However, each time I redo the process from the original images the chances of “horn” being in front or on top of the head seem to shift. In some cases, there are both. If anyone could help. It would be greatly appreciated. Is there some automated way to get rid of these extra vertices? Isaiah -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-18 at 3.42.39 PM.png Type: image/png Size: 126938 bytes Desc: Screen Shot 2014-07-18 at 3.42.39 PM.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-15 at 6.10.55 PM.png Type: image/png Size: 162431 bytes Desc: Screen Shot 2014-07-15 at 6.10.55 PM.png URL: From dragos at example.com Thu Jul 31 00:06:25 2014 From: dragos at example.com (Dragos Stanciu) Date: Wed, 30 Jul 2014 23:06:25 +0100 Subject: [FieldTrip] Connectivity analysis after applying Welch's method Message-ID: Hello Jörn, Thank you so much for responding. The suggested changes were spot on and ft_connectivityanalysis executed successfully. In the end, I went with the approach of redefining the 10s epoch in 2s minitrials and performing ft_freqanalysis on these minitrials with *cfg.output='fourier'* and *keeptrial='yes'. *I then did ft_connectivityanalysis on the frequency structures resulted from processing the segmented data. This would give me connectivity matrices for each 10s epoch, which I then average to get one connectivity matrix for the subject (technically, I have a connectivity matrix for each frequency bin, but I can again average across the frequency spectrum). I have a question on the debiased weighted phase lag index measure. The values in the matrix vary between -1 and 1 (depending if the relative phase lags or leads). When I construct the adjacency matrices, is it just a matter of taking the absolute value of these values? I would also like some advice on plotting connectivity matrices. I was able to plot one matrix with ft_plot_matrix, but it would be really nice if I could plot a connectivity graph where the thickness of the edges correspond to the strength of the connectivity measure. I tried ft_topoplotER with 4D148.lay as the layout file and 'gui' as refchannel, but I didn't get anything interesting. As my data is MEG, it doesn't make sense to me to choose a reference channel... Ideally, I would like to combine the layout (4D148.lay) with the connectivity matrix for plotting the graph. Do you have any ideas for this? Also, do you have any other suggestions on what other plotting functions can be used with these connectivity matrices? I've looked through the tutorial, but the functions don't seem very relevant to my type of data. Thank you for your help. Regards, Dragos Stanciu > Message: 9 > Date: Wed, 30 Jul 2014 10:28:50 +0200 > From: "J?rn M. Horschig" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Connectivity analysis after applying Welch's > method > > Hi Dragos, > > while quickly browisng through your mail, it appears to me that you > simply need to set single_epoch_freq.dimord = 'rpt_chan_freq'. FieldTrip > is using the dimord field to infer the order of the dimensions > (*dim*ension *ord*er). The actual dimensions of powspctrm and crsspctrm > are now inconsistent with the dimord specifications. > > Best, > J?rn > > > On 7/30/2014 1:18 AM, Dragos Stanciu wrote: > > Dear FieldTrippers, > > > > I'm Dragos Stanciu and I'm working on my MSc in Neuroinformatics > > dissertation at the University of Edinburgh. My project involves > > analysis of resting-state functional connectivity using graph theory > > in Alzheimer's disease based on MEG data. > > > > Each of my subjects has a number of 10s epochs (trials) associated > > with him/her. I was able to compute the coherence and weighted phase > > lag index measures (with /ft_freqanalysis /and > > /ft_connectivityanalysis) /by treating my 10s epochs as trials, but > > now I would like to reduce the amount of noise in the estimation of > > the frequency spectrum by employing Welch's method. > > > > For this, I split each 10s epoch in 2s segments (minitrials) with 50% > > overlap: > > > > [sep_epoch_data] = ft_redefinetrial(cfg_cut, single_epoch_data)/. / > > > > > > I then apply /ft_preprocessing /on the minitrials: > > > > [processed_single_epoch] = ft_preprocessing(cfg, sep_epoch_data); > > > > I then do frequency analysis on the preprocessed segmented data: > > > > [single_epoch_freq] = ft_freqanalysis(cfg_freq, > > processed_single_epoch); > > > > where > > > > display(cfg_freq) > > method: 'mtmfft' > > taper: 'hanning' > > foilim: [0.5000 4] > > output: 'powandcsd' > > channel: {148x1 cell} % 148 channels labelled from A1 to > > A148 > > keeptrial: 'no' % don't keep the minitrials, as we want > > to average them > > keeptapers: 'no' > > > > Please note that I average the minitrials (/keeptrial = 'no'/) as I > > want to get an average of the frequencies. > > > > The resulting /single_epoch_freq/ structure looks like: > > > > display(single_epoch_freq) > > label: {148x1 cell} > > dimord: 'chan_freq' > > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > > 4.0009] > > powspctrm: [148x8 double] > > labelcmb: {10878x2 cell} % channel combinations (148*147/2) > > crsspctrm: [10878x8 double] > > cfg: [1x1 struct] > > > > > > The last step is to append the averaged frequency structures of each > > 10s epoch together and perform connectivity analysis on the main 10s > > epochs. I do the concatenation like so: > > freq_avgs_powspctrm = [freq_avgs_powspctrm; > > permute(single_epoch_freq.powspctrm, [3,1,2])]; > > > > freq_avgs_crsspctrm = [freq_avgs_crsspctrm; > > permute(single_epoch_freq.crsspctrm, [3,1,2])]; > > > > The idea behind /permute(..., [3, 1, 2])/ is that I want the first > > dimension to represent trials, the second dimension channel > > combinations and the third dimension frequencies, as this is needed > > for the input of /ft_connectivity_wpli /(Repetitions x > > Channelcombination (x Frequency)). > > > > I then call stat_conn = ft_connectivityanalysis(cfg_conn, freq_avgs); > > where: > > > > display(cfg_conn) > > method: 'wpli_debiased' > > channel: {148x1 cell} > > > > and > > > > display(freq_avgs) > > powspctrm: [4x148x8 double] % as I have 4 ten second epochs > > crsspctrm: [4x10878x8 double] % as I have 4 ten second epochs > > label: {148x1 cell} > > dimord: 'chan_freq' > > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > > 4.0009] > > labelcmb: {10878x2 cell} > > cfg: [1x1 struct] > > > > > > The error that I get when running /ft_connectivityanalysis/ is: > > > > Error using cat > > CAT arguments dimensions are not consistent. > > Error in ft_checkdata>fixcsd (line 1170) > > data.crsspctrm = cat(catdim, data.powspctrm, data.crsspctrm); > > > > > > When debugging, /catdim/ is equal to 1. The error occurs because the > > 2nd dimension of data.powspctrm and data.crsspctrm are not equal > > (former is 148, latter is 10878). Do you have any suggestions on > > getting around this problem? Should I construct /freq_avgs /(data > > input to ft_connectivityanalysis) differently? I'm also open to > > different approaches to working out Welch's method in FieldTrip. > > > > Please download this archive that contains my test script and 4 > > example 10s epochs of a subject: > > https://www.dropbox.com/s/js7pztai02f5p27/Welch_fieldtrip.zip The code > > should make things clearer (or the opposite). > > Observations: I thought about using /ft_freqanalysis_mtmwelch/, but > > apparently it's deprecated. > > > > Thank you all in advance for your feedback. > > > > Kind regards, > > Dragos Stanciu > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Jul 31 09:00:26 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 31 Jul 2014 09:00:26 +0200 Subject: [FieldTrip] A datatype error in ft_sourceanalysis (Reference to non-existent field 'topo') In-Reply-To: References: Message-ID: Hi Roey, That sounds like a bug to me. I added this on our bugzilla: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2664 . You should be on the cc list for that bug. Best, Eelke On 30 July 2014 22:24, Roey Schurr wrote: > Dear fieldtrippers, > > I'm writing you regarding an error I encountered upon computing an inverse > solution in mne method: > > Reference to non-existent field 'topo'. > > Error in ft_datatype_comp (line 92) > if size(comp.topo,1)==size(comp.topo,2) > > Error in ft_checkdata (line 342) > data = ft_datatype_comp(data); > > Error in ft_sourceanalysis (line 161) > data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'}, > 'feedback', > 'yes'); > > The problem stems from a change (made in 2014-05-27) in "ft_sourceanalysis", > and can be bypassed by changing the order of data types in line 161 of > "ft_sourceanalysis": > > instead of > data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'}, > 'feedback', 'yes'); > write > data = ft_checkdata(data, 'datatype', {'timelock', 'freq', 'comp'}, > 'feedback', 'yes'); > > Now, I am sure there was a good reason for making this change, so I am > guessing the fault is mine in the way I try computing the inverse solution > (which did work until this change of ft_sourceanalysis). The relevant piece > of code is: > > cfg = struct; > cfg.method = 'mne'; > cfg.elec = elec; > cfg.grid = gridVar; > cfg.vol = vol; > cfg.rawtrial = 'yes'; > cfg.hdmfile = headModelPath; > cfg.mne.lambda = '5%'; > cfg.keepfilter = 'yes'; > cfg.rawtrial = 'no'; > cfg.singletrial = 'no'; > cfg.keeptrials = 'yes'; > source = ft_sourceanalysis(cfg, data) > > I am also not sure why the data is thought to be a "comp" data. A possible > cause for the problem is that the raw EEG records I work with are in TRC > format which has to be transformed into a fieldtrip compatible format. So > the "data" struct in the code has the following fields: > > data = > label: {1x19 cell} > fsample: 256 > trial: {1x12 cell} > time: {1x12 cell} > interpolatedElectrodes: {1x12 cell} > > Any ideas regarding the suggested bypass or the deeper cause of the error > will be greatly appreciated. > > Thank you for your time, > Best, > > roey > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From matt.gerhold at gmail.com Wed Jul 30 18:05:27 2014 From: matt.gerhold at gmail.com (Matt Gerhold) Date: Wed, 30 Jul 2014 09:05:27 -0700 Subject: [FieldTrip] Granger Causality Questions Message-ID: Hi, Given the data provided, the non-parametric granger causality test yields results which suggest no directional influence when all channels are used. The data is current source densities, they have not been scaled according to head circumference (fs=512). The subject is in an eyes-open condition. Any suggestions or comments on the resultant solution? Matthew -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CSD_Data_Eyes_Open.mat Type: application/octet-stream Size: 3542373 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Grange_Causality_Test_My_Data_Example.m Type: application/octet-stream Size: 2182 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Channel_Locs_20_Chans.jpg Type: image/jpeg Size: 31550 bytes Desc: not available URL: From d.lozanosoldevilla at fcdonders.ru.nl Thu Jul 31 10:31:19 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Thu, 31 Jul 2014 10:31:19 +0200 (CEST) Subject: [FieldTrip] Extra Noise In-Reply-To: <851EC985-AEE4-483C-841F-9BF04CD1AC66@dartmouth.edu> Message-ID: <2127891963.8064221.1406795479657.JavaMail.root@sculptor.zimbra.ru.nl> Hi Isaiah, Recently we answered a similar issue here: http ://mailman.science. ru . nl / pipermail / fieldtrip /2014-July/008273. html best, Diego ----- Original Message ----- > From: "Isaiah C. Smith" > To: " FieldTrip discussion list" < fieldtrip @science. ru . nl > > Sent: Wednesday, 30 July, 2014 10:39:12 PM > Subject: [ FieldTrip ] Extra Noise > Hello All, > I have been trying to get rid of the noise when I create the mesh for > this image in the neck area and the areas above the scalp. The MR > Images have nothing below the nose area and there seems to be no > contrast change in the image backgrounds to cause this result. > I am really stumped as to how to change this, These different results > were gotten by changing the threshold and the mesh number slightly. > However, each time I redo the process from the original images the > chances of “horn” being in front or on top of the head seem to shift. > In some cases, there are both. If anyone could help. It would be > greatly appreciated. Is there some automated way to get rid of these > extra vertices ? > Isaiah > _______________________________________________ > fieldtrip mailing list > fieldtrip @ donders . ru . nl > http ://mailman.science. ru . nl /mailman/ listinfo / fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http :// www . ru . nl /people/ donders /lozano-soldevilla-d/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-18 at 3.42.39 PM.png Type: image/png Size: 126938 bytes Desc: Screen Shot 2014-07-18 at 3.42.39 PM.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-15 at 6.10.55 PM.png Type: image/png Size: 162431 bytes Desc: Screen Shot 2014-07-15 at 6.10.55 PM.png URL: From s.rombetto at cib.na.cnr.it Thu Jul 31 12:22:28 2014 From: s.rombetto at cib.na.cnr.it (s.rombetto at cib.na.cnr.it) Date: Thu, 31 Jul 2014 12:22:28 +0200 Subject: [FieldTrip] source reconstruction Message-ID: <20140731122228.qingclalck0ooo4g@arco.cib.na.cnr.it> Dear all, I'm working on source reconstruction using the following steps: - I construct a forward model from a segmented individual mri - I prepare the head model from the segmented brain surface (option singleshell) - I compute lead field with ft_prepare_leadfield (is this correct? Or should I use ft_compute_leadfield? I cannot understand the differences between them) After this I do source reconstruction with dipole fit methods (as implemented in ft_dipolefitting) Is this sequence correct according to you? I'm in trouble because I find that the source sometimes is located outside the brain. Any suggestion? Sara ------------------------- Dott.ssa Sara Rombetto Istituto di Cibernetica "E. Caianiello" Via Campi Flegrei, 34 80078 Pozzuoli (NA) Italy mob +39 3401689815 tel +39 0818675361 fax +39 0818675128 Lab MEG 0817483511 -------------------------- "I disapprove of what you say, but I will defend to the death your right to say it." [Evelyn Beatrice Hall, The Friends Of Voltaire] ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From hweeling.lee at gmail.com Thu Jul 31 13:29:40 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 31 Jul 2014 13:29:40 +0200 Subject: [FieldTrip] sLoreta Message-ID: Dear all, I'm interested to apply sLoreta to my EEG data, as implemented by Babiloni et al., in http://www.ncbi.nlm.nih.gov/pubmed/20930306. >From Fieldtrip website, I read that it is possible to read the output generated by Loreta and read it in Fieldtrip. However, I wonder if it's possible to convert the preprocessed fieldtrip data to Loreta and then generate the sLoreta output. Can someone please help and share his/her experience with this? Thank you very much! Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Jul 31 15:17:05 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 31 Jul 2014 15:17:05 +0200 Subject: [FieldTrip] Connectivity analysis after applying Welch's method In-Reply-To: References: Message-ID: <53DA41D1.7080604@donders.ru.nl> Hi Dragos, have yoi checked ft_topoplotCC? Best, Jörn On 7/31/2014 12:06 AM, Dragos Stanciu wrote: > Hello Jörn, > > Thank you so much for responding. The suggested changes were spot on > and ft_connectivityanalysis executed successfully. > In the end, I went with the approach of redefining the 10s epoch in 2s > minitrials and performing ft_freqanalysis on these minitrials with > /cfg.output='fourier'/ and /keeptrial='yes'. /I then did > ft_connectivityanalysis on the frequency structures resulted from > processing the segmented data. This would give me connectivity > matrices for each 10s epoch, which I then average to get one > connectivity matrix for the subject (technically, I have a > connectivity matrix for each frequency bin, but I can again average > across the frequency spectrum). > > I have a question on the debiased weighted phase lag index measure. > The values in the matrix vary between -1 and 1 (depending if the > relative phase lags or leads). When I construct the adjacency > matrices, is it just a matter of taking the absolute value of these > values? > > I would also like some advice on plotting connectivity matrices. I was > able to plot one matrix with ft_plot_matrix, but it would be really > nice if I could plot a connectivity graph where the thickness of the > edges correspond to the strength of the connectivity measure. I tried > ft_topoplotER with 4D148.lay as the layout file and 'gui' as > refchannel, but I didn't get anything interesting. As my data is MEG, > it doesn't make sense to me to choose a reference channel... > Ideally, I would like to combine the layout (4D148.lay) with the > connectivity matrix for plotting the graph. Do you have any ideas for > this? Also, do you have any other suggestions on what other plotting > functions can be used with these connectivity matrices? I've looked > through the tutorial, but the functions don't seem very relevant to my > type of data. > > Thank you for your help. > > Regards, > Dragos Stanciu > > Message: 9 > Date: Wed, 30 Jul 2014 10:28:50 +0200 > From: "J?rn M. Horschig" > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Connectivity analysis after applying Welch's > method > > Hi Dragos, > > while quickly browisng through your mail, it appears to me that you > simply need to set single_epoch_freq.dimord = 'rpt_chan_freq'. > FieldTrip > is using the dimord field to infer the order of the dimensions > (*dim*ension *ord*er). The actual dimensions of powspctrm and > crsspctrm > are now inconsistent with the dimord specifications. > > Best, > J?rn > > > On 7/30/2014 1:18 AM, Dragos Stanciu wrote: > > Dear FieldTrippers, > > > > I'm Dragos Stanciu and I'm working on my MSc in Neuroinformatics > > dissertation at the University of Edinburgh. My project involves > > analysis of resting-state functional connectivity using graph theory > > in Alzheimer's disease based on MEG data. > > > > Each of my subjects has a number of 10s epochs (trials) associated > > with him/her. I was able to compute the coherence and weighted phase > > lag index measures (with /ft_freqanalysis /and > > /ft_connectivityanalysis) /by treating my 10s epochs as trials, but > > now I would like to reduce the amount of noise in the estimation of > > the frequency spectrum by employing Welch's method. > > > > For this, I split each 10s epoch in 2s segments (minitrials) > with 50% > > overlap: > > > > [sep_epoch_data] = ft_redefinetrial(cfg_cut, > single_epoch_data)/. / > > > > > > I then apply /ft_preprocessing /on the minitrials: > > > > [processed_single_epoch] = ft_preprocessing(cfg, > sep_epoch_data); > > > > I then do frequency analysis on the preprocessed segmented data: > > > > [single_epoch_freq] = ft_freqanalysis(cfg_freq, > > processed_single_epoch); > > > > where > > > > display(cfg_freq) > > method: 'mtmfft' > > taper: 'hanning' > > foilim: [0.5000 4] > > output: 'powandcsd' > > channel: {148x1 cell} % 148 channels labelled from > A1 to > > A148 > > keeptrial: 'no' % don't keep the minitrials, as we want > > to average them > > keeptapers: 'no' > > > > Please note that I average the minitrials (/keeptrial = 'no'/) as I > > want to get an average of the frequencies. > > > > The resulting /single_epoch_freq/ structure looks like: > > > > display(single_epoch_freq) > > label: {148x1 cell} > > dimord: 'chan_freq' > > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > > 4.0009] > > powspctrm: [148x8 double] > > labelcmb: {10878x2 cell} % channel combinations > (148*147/2) > > crsspctrm: [10878x8 double] > > cfg: [1x1 struct] > > > > > > The last step is to append the averaged frequency structures of each > > 10s epoch together and perform connectivity analysis on the main 10s > > epochs. I do the concatenation like so: > > freq_avgs_powspctrm = [freq_avgs_powspctrm; > > permute(single_epoch_freq.powspctrm, [3,1,2])]; > > > > freq_avgs_crsspctrm = [freq_avgs_crsspctrm; > > permute(single_epoch_freq.crsspctrm, [3,1,2])]; > > > > The idea behind /permute(..., [3, 1, 2])/ is that I want the first > > dimension to represent trials, the second dimension channel > > combinations and the third dimension frequencies, as this is needed > > for the input of /ft_connectivity_wpli /(Repetitions x > > Channelcombination (x Frequency)). > > > > I then call stat_conn = ft_connectivityanalysis(cfg_conn, > freq_avgs); > > where: > > > > display(cfg_conn) > > method: 'wpli_debiased' > > channel: {148x1 cell} > > > > and > > > > display(freq_avgs) > > powspctrm: [4x148x8 double] % as I have 4 ten > second epochs > > crsspctrm: [4x10878x8 double] % as I have 4 ten > second epochs > > label: {148x1 cell} > > dimord: 'chan_freq' > > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > > 4.0009] > > labelcmb: {10878x2 cell} > > cfg: [1x1 struct] > > > > > > The error that I get when running /ft_connectivityanalysis/ is: > > > > Error using cat > > CAT arguments dimensions are not consistent. > > Error in ft_checkdata>fixcsd (line 1170) > > data.crsspctrm = cat(catdim, data.powspctrm, > data.crsspctrm); > > > > > > When debugging, /catdim/ is equal to 1. The error occurs because the > > 2nd dimension of data.powspctrm and data.crsspctrm are not equal > > (former is 148, latter is 10878). Do you have any suggestions on > > getting around this problem? Should I construct /freq_avgs /(data > > input to ft_connectivityanalysis) differently? I'm also open to > > different approaches to working out Welch's method in FieldTrip. > > > > Please download this archive that contains my test script and 4 > > example 10s epochs of a subject: > > https://www.dropbox.com/s/js7pztai02f5p27/Welch_fieldtrip.zip > The code > > should make things clearer (or the opposite). > > Observations: I thought about using /ft_freqanalysis_mtmwelch/, but > > apparently it's deprecated. > > > > Thank you all in advance for your feedback. > > > > Kind regards, > > Dragos Stanciu > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From paymandomorientes at yahoo.com Thu Jul 31 20:54:33 2014 From: paymandomorientes at yahoo.com (paymando- morientes) Date: Thu, 31 Jul 2014 11:54:33 -0700 Subject: [FieldTrip] Artifact rejection in realtime analysis Message-ID: <1406832873.91684.YahooMailNeo@web141602.mail.bf1.yahoo.com> Dear field trippers I am trying to design my first real time loop for an EEG experiment. The question that I have now is that how should I deal with artifacts such as eye blinks. Firstly, I think rejecting data segments in real time analysis is pointless because if an epoch is artifactual and can not represent the classified features,  it could simply get the label (epoch rejected) in the classification section and the script then moves to the next segment.  Secondly, ICA is too slow to be implemented in an online loop. So how should artifacts be dealt with inside a real time analysis? Are there any ways for correcting eye blinks other than ICA?  Can you give me any suggestions? THANK YOU ALL! payman -------------- next part -------------- An HTML attachment was scrubbed... URL: From martina.postorino at gmail.com Tue Jul 1 10:58:42 2014 From: martina.postorino at gmail.com (Martina Postorino) Date: Tue, 1 Jul 2014 10:58:42 +0200 Subject: [FieldTrip] ft_selectdata - automatic channels sorting In-Reply-To: <78332B65-2F5C-4638-B15C-D8448950D479@donders.ru.nl> References: <78332B65-2F5C-4638-B15C-D8448950D479@donders.ru.nl> Message-ID: Dear Jan-Mathijs, thanks for your quick reply. I did not apply the ft_selectdata to the 'stat' output (there the channels were selected in the cfg.channel field of the ft_timelockstatistics function). I only apply that function to my ERP dataset to select a subset of channel on which I wanted the information stored in stat.mask to be plotted, this is why the order of channels was inconsistent (I am sorry, I know it is a bit hard to explain). By the way, I am following this issue on the Bugzilla website. Thanks again, best regards. *__________________* Martina Postorino, M.Sc Phd program in Medical Life Science and Technology Neuroimaging Center (TUM-NIC) Technische Universität München, Klinikum Rechts der Isar 2014-06-25 8:55 GMT+02:00 jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl>: > Hi Martina, > > I agree that the sorting of the channels is somewhat annoying, and an > unexpected feature in the coding. Presently we are looking into how to > address this. > > Yet, the sorting that is applied to the list of channels is consistently > applied to all fields that contain numeric data. In your case I don’t > understand your statement that the mask stays unsorted. Is there any way > you are able to verify that? If I run the following simple simulation > everything is reordered, also the ‘mask’-field. > > stat.label={‘B’;’A’;’C’}; > stat.stat=repmat([1:3]’,[1 2]); > stat.mask=stat.stat; > stat.prob=stat.stat; > stat.time=[1 2]; > stat.dimord=‘chan_time’; > > stat2=ft_selectdata([],stat); > > If I now do: > > stat2.label > > I get > > ans = > > ‘A’ > ‘B’ > ‘C’ > > and when I do: > > stat2.stat > > I get > > ans = > > 2 2 > 1 1 > 3 3 > > and when I do: > > stat2.mask > > I get > > ans = > > 2 2 > 1 1 > 3 3 > > Conslusion: the mask is also re-ordered. In other words, the rows in the > numeric data fields are still consistent with respect to one another. > > If you want to stay informed about this issue, I suggest you to create an > account on bugzilla.fcdonders.nl, and add yourself to the cc-list of bug > #2597. > > > Best wishes, > Jan-Mathijs > > > On Jun 23, 2014, at 4:14 PM, Martina Postorino < > martina.postorino at gmail.com> wrote: > > Dear all, > > I recently encountered a problem using the function ft_selectdata to > select a subset of channels from my EEG dataset. > > I found out that in the output of the function ft_selectdata, channels are > sorted alphabetically. For me, that represents a problem since I would like > to plot the results from a cluster based permutation test using the > information stored in stat.mask (in which the order of channels is in line > with the original order of channels, i.e. not alphabetically) on the ERP > grandaverage of specific electrodes selected with ft_selectdata, to see > which time points are significantly different between my experimental > conditions. Due to the different orders of the channels, the mask is > plotted over the wrong channels. > > Is there a way to avoid that the function automatically sorts the labels > of the channels alphabetically? > > I have already tried the different versions of ft_selectdata > (ft_selectdata, ft_selectdata_old, ft_selectdata_new) and updated my > Fieldtrip version to the last one available. Nothing changed. > > This is the code I use: > > [stat] = ft_timelockstatistics(cfg, ERP_pain_bp_GA, ERP_buttonpress_GA); > > %plotting > > cfgp = []; > cfgp.channel = {'Cz'; 'CPz', 'Pz', 'CP1'. 'CP3', 'CP2', 'CP4'}; > cfgp.avgoverchan = 'no'; > cfgp.latency = [-1 1]; > ERP_pain_bp_GA_red = ft_selectdata_new(cfgp, ERP_pain_bp_GA); > ERP_buttonpress_GA_red = ft_selectdata_new(cfgp, ERP_buttonpress_GA); > > % average data across subjects > > cfgp = []; > cfgp.keepindividual = 'no'; > ERP_pain_bp_GA_avg = ft_timelockanalysis (cfgp, ERP_pain_bp_GA_red); > ERP_buttonpress_GA_avg = ft_timelockanalysis (cfgp, > ERP_buttonpress_GA_red); > % ERP_pain_GA_avg = ft_timelockanalysis (cfg, ERP_pain_GA_red); > > ERP_pain_bp_GA_avg.mask = stat.mask; > ERP_buttonpress_GA_avg.mask = stat.mask; > % ERP_pain_GA_avg.mask = stat.mask; > > % do the plotting > > cfgp = []; > cfgp.maskparameter = 'mask'; > cfgp.maskstyle = 'box'; > cfgp.layout = layout_easycap_painlabmunich; > > ft_multiplotER(cfgp,ERP_pain_bp_GA_avg, ERP_buttonpress_GA_avg); > > Thanks in advance! > > ___________________________________________ > > Martina Postorino, M.Sc > Phd program in Medical Life Science and Technology > > Neuroimaging Center (TUM-NIC) > Technische Universität München, Klinikum Rechts der Isar > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jul 1 12:27:49 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 1 Jul 2014 10:27:49 +0000 Subject: [FieldTrip] Beamformer confusion (still) Message-ID: <1404210469377.62409@flinders.edu.au> Hello everyone, So with absolutely no luck with the other methods I was trying, I tried to just use template files as I dont actually have any real mri data at this point. I ran the following code to warp electrodes to the surface of the template standard_bem file. I made sure that vol, timelock.elec and sourcemodel were all in centimetres. timelock.elec = ft_convert_units( timelock.elec, 'cm'); ?cfg = []; cfg.method = 'headshape'; cfg.headshape = vol.bnd( 1); timelock.elec = ft_sensorrealign( cfg, timelock.elec); The attached is vol, sourcemodel and the electrodes plotted (from the following code) figure; hold on ft_plot_vol( vol, 'edgecolor', 'none'); alpha 0.4 hatlas = ft_plot_mesh( sourcemodel.pos( sourcemodel.inside, :)); set( hatlas, 'Color', [ 0 1 0]); hsens = ft_plot_sens( timelock.elec, 'style', 'sk'); set( hsens, 'Color', [ 1 0 0]); As they dont line up, Im wondering what I am doing wrong? ?Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: template_lineup.fig Type: application/octet-stream Size: 197493 bytes Desc: template_lineup.fig URL: From mcantor at umich.edu Wed Jul 2 16:10:02 2014 From: mcantor at umich.edu (Max Cantor) Date: Wed, 2 Jul 2014 10:10:02 -0400 Subject: [FieldTrip] Beamformers: SAM vs LCMV vs LCMV fixedori Message-ID: Hi Fieldtrip, We are currently using the SAM beamformer for source localization, but are thinking of switching to LCMV. Given the research I've read, the vector beamformer approach should, for our purposes, be more efficient and be as, if not more accurate than scalar. However, other than the vector/scalar difference, I don't have a great understanding of what other differences exist between the two beamformers. To test the differences, I've run SAM, LCMV, and LCMV with fixed orientation (making it scalar), with both our real data and with simulated data, and while SAM and LCMV fixedori are more similar to each other than either are when compared to LCMV without fixedori (particularly with the simulation, less so with our real data), they are still visibly different from each other. This suggests to me that there are other potentially meaningful differences between SAM and LCMV besides the scalar/vector difference, and I want to make sure I have at least some idea of what those differences are before I commit to the change. That being said, I get the feeling that these differences may be more nuanced than I can decipher on my own, so if anyone can explain to me what these differences are and if they are important, I would greatly appreciate it. Thanks, Max -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg at think-now.com Thu Jul 3 02:00:23 2014 From: greg at think-now.com (Greg Simpson) Date: Wed, 2 Jul 2014 17:00:23 -0700 Subject: [FieldTrip] Research Associate Position Available In-Reply-To: References: Message-ID: Dear Colleagues - This position has been filled. Thank you, Greg Gregory V. Simpson, Ph.D. Founder & CSO Think Now, Inc. On Thu, May 8, 2014 at 10:52 AM, Greg Simpson wrote: > Dear Colleagues - please note our job opening below and spread the word to > those that might be interested. Thank you! Greg > > EEG Research Associate (Data Analysis) > > > > Think Now Inc. has a Research Associate opening for an EEG data analyst > for 2 NIH-funded studies being conducted with UCLA on the > neurophysiological bases of sustained attention, its deficits in ADHD and > the effects of computerized brain training. We are seeking candidates with > direct hands-on experience in EEG data analysis. MatLab programming skills > are required. We prefer strongly self-directed individuals to take on this > work. > > > > The successful candidate will report directly to Gregory V. Simpson, > Ph.D., Chief Scientific Officer of Think Now and will collaborate with Mark > Cohen, Ph.D., Agatha Lenartowicz, Ph.D. and the team at UCLA. Think Now is > located in San Francisco, so the successful candidate can be located in > either San Francisco or Los Angeles. > > > > Think Now is creating EEG and mobile-app based solutions for the diagnosis > and amelioration of neurological disorders with a focus on attention and > its control. Please send your CV and a description of your prior > experience with EEG data analysis and MatLab to *jobs at think-now.com > *. > > > Gregory V. Simpson, Ph.D. > Founder & CSO > Think Now, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From giulia.rizza at tiscali.it Thu Jul 3 10:41:52 2014 From: giulia.rizza at tiscali.it (giulia.rizza at tiscali.it) Date: Thu, 03 Jul 2014 10:41:52 +0200 Subject: [FieldTrip] Fw: Call for Application Prospective Ph.D. Students Message-ID: <52c2358f49dd84c58551e90fbd2d0c4a@tiscali.it> Dear FieldTrip users I would like to announce this opportunity for an international PhD in PSYCHOLOGY AND SOCIAL NEUROSCIENCE IN ITALY (Rome and Udine) Feel free to share this information with people could be interested. Thanks for your attention Giulia 2014-07-03 10:23 GMT+02:00 Maria Serena Panasiti : > CALL FOR APPLICATION FOR PROSPECTIVE PH.D. STUDENTS > > Code: 16167 - PSYCHOLOGY AND SOCIAL NEUROSCIENCE > > curriculum in COGNITIVE SOCIAL AND AFFECTIVE NEUROSCIENCES (COSAN) > > WHAT: > > Four three-year funded PHD POSITIONS IN COGNITIVE, SOCIAL AND AFFECTIVE NEUROSCIENCE (COSAN) program (http://www.cosanphd.com/ [1]) > > WHO: HIGH-MOTIVATED APPLICANTS WITH A STRONG INTEREST IN SYSTEMS NEUROSCIENCE AND HIGHER ORDER COGNITIVE FUNCTIONS ARE ENCOURAGED TO APPLY. > > Applications are invited from candidates who: > > v hold an Italian diploma di laurea / laurea specialistica / laurea magistrale, or an equivalent second-level degree (generally equivalent to a Master's Degree) obtained abroad > > v expect to receive their degree award by October 31, 2014 > > WHERE: > > v DEPARTMENT OF PSYCHOLOGY, SAPIENZA UNIVERSITY OF ROME http://dippsi.psi.uniroma1.it [2] > > v IRCCS FONDAZIONE SANTA LUCIA, Rome http://www.hsantalucia.it [3] > > SUPERVISOR: > > PROF. SALVATORE MARIA AGLIOTI, Director of the Social and Cognitive Neuroscience Laboratory, Sapienza University of Rome http://agliotilab.org/ [4] > > STIPEND: > > EURO 13.638,47 PER YEAR > > RESEARCH TOPICS: > > Neural correlates of cognitive, social and affective processes including: > > v Empathy > > v Intention, action and emotion understanding > > v Joint attention and joint action. > > v Intergroup processing, stereotype and prejudice. > > v Body awareness and Self-Other distinction > > v Social decision making > > v Virtual reality and Brain control of artificial agents > > v Existential neuroscience > > RESEARCH TECHNIQUES: > > v Electroencephalography (EEG), including: > > o Somatosensory Evoked Potentials (SEP) > > o Laser Evoked Potentials (LEP) > > v Transcranial Magnetic Stimulation (TMS) > > v transcranial Direct Current Stimulation (tDCS) > > v infrared Eye-tracking and Motion-tracking > > v Thermal Imaging > > v Lesion Mapping analysis > > v CAVE -Virtual Reality > > v fMRI. > > HOW: Admission is based on an evaluation of the skills and aptitude of the candidate, and the selection procedure includes two steps: > > Phase 1. Evaluation of qualifications > > Phase 2. On site (or video-conference) interview > > WHEN: > > APPLICATION DEADLINE: 01/08/2013 11:59 11.59 PM CET HOW TO APPLY: > See http://www.cosanphd.com/ [5] and http://www.uniroma1.it/sites/default/files/call%20for%20application_30_0.pdf [6] > > PHASE 1. The outcome of the evaluation will be published by 16/09/2014. > > Phase 2. On site interviews will start from 29/09/2014 09:00 AM at the Department of Psychology. It is POSSIBLE, following motivated requests, to conduct Phase 2 interview using VIDEO-CONFERENCING facilities. > > INFO: > > http://www.cosanphd.com/ [7] > > http://agliotilab.org/ [8] > > http://www.uniroma1.it/sites/default/files/call%20for%20application_30_0.pdf [9] > > http://www.uniroma1.it/sites/default/files/Annex%20A_2.pdf [10] > > CONTACT INFO: > > Paola Trussardi (organizational manager) - paola.trussardi at uniroma1.it [11] (administrative requests) > > Salvatore M. Aglioti - salvatoremaria.aglioti at uniroma1.it [12] (scientific requests) -- > Maria Serena Panasiti, Ph.D > > Cognitive Social and Affective Neuroscience Lab > Department of Psychology. > University of Rome "La Sapienza". > Via dei Marsi 78 - 00185 - Roma. > Phone: (+39) 06-49917635 [13]. Fax: (+39) 06-49917635 [14] > > School of Psychology & Clinical Language Sciences > University of Reading > Reading, United Kingdom Scopri istella, il nuovo motore per il web italiano. Istella garantisce risultati di qualità e la possibilità di condividere, in modo semplice e veloce, documenti, immagini, audio e video. Usa istella, vai su http://www.istella.it?wtk=amc138614816829636 -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Thu Jul 3 12:14:13 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Thu, 3 Jul 2014 03:14:13 -0700 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates Message-ID: <1404382453.26194.YahooMailNeo@web124905.mail.ne1.yahoo.com> Dear fieldtrip experts, Im trying to do source localization for simulated EEG data, for this I followed the tutorial in page: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate I was trying to use the mri image provided by fieldtrip (Subject01.mri) and EEG template (standard_1020.elc) in my work. The mri image need to be re-aliened to the Talairach space for coregistration with EEG space. In the tutorial you use (ft_volumerealien) to do that using interactive method. I have two questions: First, how can I do the coregistration using fixed coordinates of the 3 fiducials (nasion, left pr, right pr), in other words how can I get the coordinates of the fiducials in both Talairach and EEG spaces to do the coregistration using the script only not manually. Second, I tried to use the mri image provided by the spm toolbox because its already aliened to Talairach space, but when I try to do segmentation I get error that coordinates field does not exist: ??? Reference to non-existent field 'coordsys'. Error in ==> ft_volumesegment at 284   original.coordsys  = mri.coordsys; Error in ==> segmentation_spm_mri at 24 seg           = ft_volumesegment(cfg, mrirs); I read the image using (ft_read_mri) function, I don't find the field specified for the coordinates: disp(mri)           dim: [177 240 256]       anatomy: [177x240x256 double]           hdr: [1x1 struct]     transform: [4x4 double]          unit: 'mm' How can I solve this problem so I can use the mri image in SPM for further analysing in fieldtrip? Sorry for the long email I would be thankful for any help. Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From akiko.ikkai at gmail.com Thu Jul 3 20:11:44 2014 From: akiko.ikkai at gmail.com (Akiko Ikkai) Date: Thu, 3 Jul 2014 14:11:44 -0400 Subject: [FieldTrip] error message when using dml.crossvalidator with "resample" option Message-ID: Dear Fieldtrippers, I'm trying to run a multivariate analysis to see if my data could classify trial types correctly. I'd like to use 'resample' option in dml.crossvalidator, since number of trials are sometimes quite different between trial types. When I feed in cfg.mva (at the end of this message), I get an error message: "No appropriate method, property, or field test for class dml.crossvalidator. Error in dml.analysis/test (line 65) Y = obj.method{c}.test(Y); Error in dml.crossvalidator/train (line 159) obj.result{f} = tproc.test(testX);" I think it's because the inputs to dml.crossvalidator are not properly entered. Could someone suggest a good way to format the inputs? Here is what I'm running: cfg=[]; % perform classification on the two TFRs cfg.channel = 'Fp1'; cfg.frequency = [4 8]; cfg.latency = [.4 4.6]; cfg.method='crossvalidate'; cfg.design=[ones(size(TFRcond1.powspctrm,1), 1); 2.*ones(size(TFRcond2.powspctrm,1), 1)]'; cfg.statistic = {'accuracy' 'binomial' 'contingency'}; cfg.mva = dml.crossvalidator('mva',{dml.standardizer() dml.svm()},'resample',true); stat=ft_freqstatistics(cfg, TFRcond1, TFRcond2); Thanks in advance! Akiko -- Akiko Ikkai, Ph.D. -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Fri Jul 4 08:23:28 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Thu, 3 Jul 2014 23:23:28 -0700 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates Message-ID: <1404455008.12862.YahooMailNeo@web124903.mail.ne1.yahoo.com> Dear fieldtrip experts, Im trying to do source localization for simulated EEG data, for this I followed the tutorial in page: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate I was trying to use the mri image provided by fieldtrip (Subject01.mri) and EEG template (standard_1020.elc) in my work. The mri image need to be re-aliened to the Talairach space for coregistration with EEG space. In the tutorial you use (ft_volumerealien) to do that using interactive method. I have two questions: First, how can I do the coregistration using fixed coordinates of the 3 fiducials (nasion, left pr, right pr), in other words how can I get the coordinates of the fiducials in both Talairach and EEG spaces to do the coregistration using the script only not manually. Second, I tried to use the mri image provided by the spm toolbox because its already aliened to Talairach space, but when I try to do segmentation I get error that coordinates field does not exist: ??? Reference to non-existent field 'coordsys'. Error in ==> ft_volumesegment at 284   original.coordsys  = mri.coordsys; Error in ==> segmentation_spm_mri at 24 seg           = ft_volumesegment(cfg, mrirs); I read the image using (ft_read_mri) function, I don't find the field specified for the coordinates: disp(mri)           dim: [177 240 256]       anatomy: [177x240x256 double]           hdr: [1x1 struct]     transform: [4x4 double]          unit: 'mm' How can I solve this problem so I can use the mri image in SPM for further analysing in fieldtrip? Sorry for the long email I would be thankful for any help. Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Fri Jul 4 08:35:25 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Thu, 3 Jul 2014 23:35:25 -0700 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates Message-ID: <1404455725.61933.YahooMailNeo@web124901.mail.ne1.yahoo.com> Dear fieldtrip experts, Im trying to do source localization for simulated EEG data, for this I followed the tutorial in page: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate I was trying to use the mri image provided by fieldtrip (Subject01.mri) and EEG template (standard_1020.elc) in my work. The mri image need to be re-aliened to the Talairach space for coregistration with EEG space. In the tutorial you use (ft_volumerealien) to do that using interactive method. I have two questions: First, how can I do the coregistration using fixed coordinates of the 3 fiducials (nasion, left pr, right pr), in other words how can I get the coordinates of the fiducials in both Talairach and EEG spaces to do the coregistration using the script only not manually. Second, I tried to use the mri image provided by the spm toolbox because its already aliened to Talairach space, but when I try to do segmentation I get error that coordinates field does not exist: ??? Reference to non-existent field 'coordsys'. Error in ==> ft_volumesegment at 284   original.coordsys  = mri.coordsys; Error in ==> segmentation_spm_mri at 24 seg           = ft_volumesegment(cfg, mrirs); I read the image using (ft_read_mri) function, I don't find the field specified for the coordinates: disp(mri)           dim: [177 240 256]       anatomy: [177x240x256 double]           hdr: [1x1 struct]     transform: [4x4 double]          unit: 'mm' How can I solve this problem so I can use the mri image in SPM for further analysing in fieldtrip? Sorry for the long email I would be thankful for any help. Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Fri Jul 4 08:50:38 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Thu, 3 Jul 2014 23:50:38 -0700 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates Message-ID: <1404456638.56273.YahooMailNeo@web124904.mail.ne1.yahoo.com> Dear fieldtrip experts, Im trying to do source localization for simulated EEG data, for this I followed the tutorial in page: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate I was trying to use the mri image provided by fieldtrip (Subject01.mri) and EEG template (standard_1020.elc) in my work. The mri image need to be re-aliened to the Talairach space for coregistration with EEG space. In the tutorial you use (ft_volumerealien) to do that using interactive method. I have two questions: First, how can I do the coregistration using fixed coordinates of the 3 fiducials (nasion, left pr, right pr), in other words how can I get the coordinates of the fiducials in both Talairach and EEG spaces to do the coregistration using the script only not manually. Second, I tried to use the mri image provided by the spm toolbox because its already aliened to Talairach space, but when I try to do segmentation I get error that coordinates field does not exist: ??? Reference to non-existent field 'coordsys'. Error in ==> ft_volumesegment at 284   original.coordsys  = mri.coordsys; Error in ==> segmentation_spm_mri at 24 seg           = ft_volumesegment(cfg, mrirs); I read the image using (ft_read_mri) function, I don't find the field specified for the coordinates: disp(mri)           dim: [177 240 256]       anatomy: [177x240x256 double]           hdr: [1x1 struct]     transform: [4x4 double]          unit: 'mm' How can I solve this problem so I can use the mri image in SPM for further analysing in fieldtrip? Sorry for the long email I would be thankful for any help. Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Jul 4 09:31:07 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 4 Jul 2014 09:31:07 +0200 Subject: [FieldTrip] error message when using dml.crossvalidator with "resample" option In-Reply-To: References: Message-ID: Dear Akiko, You should not specify an instance of dml.crossvalidator as the cfg.mva. Instead, ft_statistics_crossvalidate (which is called by timelock/freqstatistics) will construct its own dml.crossvalidator, wrapping whichever analysis you specify in cfg.mva. So, in your case, this would result in a crossvalidator wrapping another crossvalidator, leading to the error (since crossvalidator does not specify a test() function). Considering this problem, it used to be impossible to specify resample=true when using dml with FieldTrip. However, I have just committed a minor change to the code which allows you to specify cfg.resample = true/false in the call to ft_freq/timelockstatistics. So in your case you would specify: cfg.mva = {dml.standardizer() dml.svm()}; cfg.resample = true; The change is available on SVN and will be in tonight's FTP release. Best, Eelke On 3 July 2014 20:11, Akiko Ikkai wrote: > Dear Fieldtrippers, > > I'm trying to run a multivariate analysis to see if my data could classify > trial types correctly. I'd like to use 'resample' option in > dml.crossvalidator, since number of trials are sometimes quite different > between trial types. > > When I feed in cfg.mva (at the end of this message), I get an error message: > "No appropriate method, property, or field test for class > dml.crossvalidator. > > Error in dml.analysis/test (line 65) > Y = obj.method{c}.test(Y); > > Error in dml.crossvalidator/train (line 159) > obj.result{f} = tproc.test(testX);" > > > I think it's because the inputs to dml.crossvalidator are not properly > entered. Could someone suggest a good way to format the inputs? > > Here is what I'm running: > cfg=[]; % perform classification on the two TFRs > cfg.channel = 'Fp1'; > cfg.frequency = [4 8]; > cfg.latency = [.4 4.6]; > cfg.method='crossvalidate'; > cfg.design=[ones(size(TFRcond1.powspctrm,1), 1); > 2.*ones(size(TFRcond2.powspctrm,1), 1)]'; > cfg.statistic = {'accuracy' 'binomial' 'contingency'}; > cfg.mva = dml.crossvalidator('mva',{dml.standardizer() > dml.svm()},'resample',true); > stat=ft_freqstatistics(cfg, TFRcond1, TFRcond2); > > Thanks in advance! > Akiko > > -- > Akiko Ikkai, Ph.D. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tyler.grummett at flinders.edu.au Sat Jul 5 14:40:00 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Sat, 5 Jul 2014 12:40:00 +0000 Subject: [FieldTrip] possible bug: ft_sensorrealign Message-ID: <1404563999389.99277@flinders.edu.au> Hello fieldtrip, I just wanted to report a potential bug, I dont know whether it is a bug or if I am using it incorrectly. On line 323 to 329 of ft_sensorrealign is the following code: ft_plot_sens(elec, 'r*'); % plot all electrodes after warping ft_plot_sens(norm, 'm.', 'label', 'label'); % plot the template electrode locations ft_plot_sens(average, 'b.'); It throws the error: Error using ft_getopt the first input should contain key-value pairs Error in ft_plot_sens (line 47) style = ft_getopt(varargin, 'style', 'k.'); I think it should be: ?ft_plot_sens(elec, 'style', 'r*'); % plot all electrodes after warping ft_plot_sens(norm, 'style', 'm.', 'label', 'label'); % plot the template electrode locations ft_plot_sens(average, 'style', 'b.'); Hopefully this helps, Kind regards, Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Sun Jul 6 10:43:42 2014 From: a.stolk at fcdonders.ru.nl (Stolk, A. (Arjen)) Date: Sun, 6 Jul 2014 10:43:42 +0200 (CEST) Subject: [FieldTrip] Symposium : Towards a neuroscience of mutual understanding In-Reply-To: <732740966.7786680.1404636012987.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1118228088.7786691.1404636222882.JavaMail.root@sculptor.zimbra.ru.nl> Dear all, Here's a symposium I'd like to advertise. For program and registration, see: http://www.ru.nl/donders/agenda-news/symposium-towards/ Yours, Arjen Symposium : Towards a neuroscience of mutual understanding When : 1 September 2014 Where : Max Planck Institute for Psycholinguistics, Wundtlaan 1, Nijmegen, The Netherlands Organizers: Arjen Stolk, Peter Hagoort, and Ivan Toni Human sociality is built on our capacity for mutual understanding, but the principles and mechanisms of this capacity remain poorly understood. Progress might be limited because it is hard to capture the flexibility of mutual understanding with controlled experiments. More importantly, progress might also be limited because the mechanisms of mutual understanding lie in an interdisciplinary no-man’s land, with several theories pulling partial empirical observations in quite different directions. This symposium is concerned with bridging this interdisciplinary gap, fostering interactions between theoretical and experimental approaches on mutual understanding during human social interactions. The discussion will focus on mechanisms of mutual understanding, studied at different levels of organization, from cognitive systems to neuronal ensembles. -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From mahjoory86 at gmail.com Sun Jul 6 18:49:30 2014 From: mahjoory86 at gmail.com (Keyvan Mahjoory) Date: Sun, 6 Jul 2014 18:49:30 +0200 Subject: [FieldTrip] Remove Cerebellum Message-ID: Dear All, I've used standard_mri and standard_bem and I want to exclude cerebellum for source analysis. How can I do that? Best, Keyvan -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.chella at unich.it Mon Jul 7 11:34:57 2014 From: f.chella at unich.it (f.chella at unich.it) Date: Mon, 07 Jul 2014 11:34:57 +0200 Subject: [FieldTrip] Error while using ft_sensorrealign Message-ID: <20140707113457.373753g7giltvkch@webmail.unich.it> Hi everyone, I am getting an error when I use ft_sensorrealign to align my MEG sensor (i.e., ITAB MEG sensor) with the subject mri using fiducials. Below is the code I am using. I first specified the fiducial location in the sensor space in the field sens.fid: sens.fid.pnt(1,:) = [0 101.5 0] ; sens.fid.pnt(2,:) = [-69.9 -0.6 0.8]; sens.fid.pnt(3,:) = [69.9 0.6 -0.8]; sens.fid.label{1} = 'nasion'; sens.fid.label{2} = 'left'; sens.fid.label{3} = 'right'; and then I called ft_sensorrealign: cfg = []; cfg.method = 'fiducial'; cfg.fiducial = {'nasion', 'left', 'right'}; cfg.target.pnt(1,:) = [-0.5 86.5 -15.5]; cfg.target.pnt(2,:) = [-73.5 -7.5 -43.5]; cfg.target.pnt(3,:) = [69.5 -16.5 -44.5]; cfg.target.label = {'nasion', 'left', 'right'}; sens_realigned = ft_sensorrealign(cfg,sens); Now, I get the following error: ??? Subscripted assignment between dissimilar structures. Error in ==> ft_sensorrealign at 235 tmp(i) = ft_convert_units(template(i), elec.unit); % ensure that the units are consistent with the electrodes Does anyone know why this would be occurring and how to fix it? Thanks in advance for the help. Federico Chella, Ph.D. Dept. of Neuroscience, Imaging and Clinical Sciences ITAB ? Institute for advanced Biomedical Technologies ?G. d'Annunzio? University of Chieti-Pescara, Chieti, Italy From eelke.spaak at donders.ru.nl Mon Jul 7 11:49:15 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 7 Jul 2014 11:49:15 +0200 Subject: [FieldTrip] Error while using ft_sensorrealign In-Reply-To: <20140707113457.373753g7giltvkch@webmail.unich.it> References: <20140707113457.373753g7giltvkch@webmail.unich.it> Message-ID: Hi Federico, No idea whether this matters (haven't tested it), but perhaps the error is due to sens.fid.label being a column cell array (3x1) and cfg.target.label being a row (1x3)? Best, Eelke Op 7 jul. 2014 11:38 schreef : > Hi everyone, > > I am getting an error when I use ft_sensorrealign to align my MEG sensor > (i.e., ITAB MEG sensor) with the subject mri using fiducials. > > Below is the code I am using. > I first specified the fiducial location in the sensor space in the field > sens.fid: > sens.fid.pnt(1,:) = [0 101.5 0] ; > sens.fid.pnt(2,:) = [-69.9 -0.6 0.8]; > sens.fid.pnt(3,:) = [69.9 0.6 -0.8]; > sens.fid.label{1} = 'nasion'; > sens.fid.label{2} = 'left'; > sens.fid.label{3} = 'right'; > > and then I called ft_sensorrealign: > cfg = []; > cfg.method = 'fiducial'; > cfg.fiducial = {'nasion', 'left', 'right'}; > cfg.target.pnt(1,:) = [-0.5 86.5 -15.5]; > cfg.target.pnt(2,:) = [-73.5 -7.5 -43.5]; > cfg.target.pnt(3,:) = [69.5 -16.5 -44.5]; > cfg.target.label = {'nasion', 'left', 'right'}; > sens_realigned = ft_sensorrealign(cfg,sens); > > Now, I get the following error: > > ??? Subscripted assignment between dissimilar structures. > Error in ==> ft_sensorrealign at 235 > tmp(i) = ft_convert_units(template(i), elec.unit); % ensure that the > units are consistent with the electrodes > > Does anyone know why this would be occurring and how to fix it? > Thanks in advance for the help. > > > Federico Chella, Ph.D. > Dept. of Neuroscience, Imaging and Clinical Sciences > ITAB ? Institute for advanced Biomedical Technologies > ?G. d'Annunzio? University of Chieti-Pescara, Chieti, Italy > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.chella at unich.it Mon Jul 7 12:11:32 2014 From: f.chella at unich.it (f.chella at unich.it) Date: Mon, 07 Jul 2014 12:11:32 +0200 Subject: [FieldTrip] Error while using ft_sensorrealign In-Reply-To: References: <20140707113457.373753g7giltvkch@webmail.unich.it> Message-ID: <20140707121132.106815j962reywd0@webmail.unich.it> Hi Eelke, thanks for pointing out this oversight, but it seems not to depend on that. Now, I specified both as column cell array (3x1). However, the error is still occurring. Federico Def. Quota Eelke Spaak : > Hi Federico, > > No idea whether this matters (haven't tested it), but perhaps the error is > due to sens.fid.label being a column cell array (3x1) and cfg.target.label > being a row (1x3)? > > Best, > Eelke > Op 7 jul. 2014 11:38 schreef : > >> Hi everyone, >> >> I am getting an error when I use ft_sensorrealign to align my MEG sensor >> (i.e., ITAB MEG sensor) with the subject mri using fiducials. >> >> Below is the code I am using. >> I first specified the fiducial location in the sensor space in the field >> sens.fid: >> sens.fid.pnt(1,:) = [0 101.5 0] ; >> sens.fid.pnt(2,:) = [-69.9 -0.6 0.8]; >> sens.fid.pnt(3,:) = [69.9 0.6 -0.8]; >> sens.fid.label{1} = 'nasion'; >> sens.fid.label{2} = 'left'; >> sens.fid.label{3} = 'right'; >> >> and then I called ft_sensorrealign: >> cfg = []; >> cfg.method = 'fiducial'; >> cfg.fiducial = {'nasion', 'left', 'right'}; >> cfg.target.pnt(1,:) = [-0.5 86.5 -15.5]; >> cfg.target.pnt(2,:) = [-73.5 -7.5 -43.5]; >> cfg.target.pnt(3,:) = [69.5 -16.5 -44.5]; >> cfg.target.label = {'nasion', 'left', 'right'}; >> sens_realigned = ft_sensorrealign(cfg,sens); >> >> Now, I get the following error: >> >> ??? Subscripted assignment between dissimilar structures. >> Error in ==> ft_sensorrealign at 235 >> tmp(i) = ft_convert_units(template(i), elec.unit); % ensure that the >> units are consistent with the electrodes >> >> Does anyone know why this would be occurring and how to fix it? >> Thanks in advance for the help. >> >> >> Federico Chella, Ph.D. >> Dept. of Neuroscience, Imaging and Clinical Sciences >> ITAB ? Institute for advanced Biomedical Technologies >> ?G. d'Annunzio? University of Chieti-Pescara, Chieti, Italy >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > From jm.horschig at donders.ru.nl Mon Jul 7 14:12:05 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 07 Jul 2014 14:12:05 +0200 Subject: [FieldTrip] Error while using ft_sensorrealign In-Reply-To: <20140707121132.106815j962reywd0@webmail.unich.it> References: <20140707113457.373753g7giltvkch@webmail.unich.it> <20140707121132.106815j962reywd0@webmail.unich.it> Message-ID: <53BA8E95.1020304@donders.ru.nl> Hey, maybe we should look at that function more closely. Tyler Grummett also reported an issue with ft_sensorrealign a few days back, when specifying cfg.target as a file. His error was related to a missing field template.pnt. This could be since we recently changed the sensor-structures to contain .chanpos instead of .pnt. Here, I could imagine that the existence of template.pnt and absence of template.chanpos and .elecpos are also part of this problem. Best, Jörn On 7/7/2014 12:11 PM, f.chella at unich.it wrote: > Hi Eelke, > thanks for pointing out this oversight, but it seems not to depend on > that. > > Now, I specified both as column cell array (3x1). > However, the error is still occurring. > > Federico > > > > Def. Quota Eelke Spaak : > >> Hi Federico, >> >> No idea whether this matters (haven't tested it), but perhaps the >> error is >> due to sens.fid.label being a column cell array (3x1) and >> cfg.target.label >> being a row (1x3)? >> >> Best, >> Eelke >> Op 7 jul. 2014 11:38 schreef : >> >>> Hi everyone, >>> >>> I am getting an error when I use ft_sensorrealign to align my MEG >>> sensor >>> (i.e., ITAB MEG sensor) with the subject mri using fiducials. >>> >>> Below is the code I am using. >>> I first specified the fiducial location in the sensor space in the >>> field >>> sens.fid: >>> sens.fid.pnt(1,:) = [0 101.5 0] ; >>> sens.fid.pnt(2,:) = [-69.9 -0.6 0.8]; >>> sens.fid.pnt(3,:) = [69.9 0.6 -0.8]; >>> sens.fid.label{1} = 'nasion'; >>> sens.fid.label{2} = 'left'; >>> sens.fid.label{3} = 'right'; >>> >>> and then I called ft_sensorrealign: >>> cfg = []; >>> cfg.method = 'fiducial'; >>> cfg.fiducial = {'nasion', 'left', 'right'}; >>> cfg.target.pnt(1,:) = [-0.5 86.5 -15.5]; >>> cfg.target.pnt(2,:) = [-73.5 -7.5 -43.5]; >>> cfg.target.pnt(3,:) = [69.5 -16.5 -44.5]; >>> cfg.target.label = {'nasion', 'left', 'right'}; >>> sens_realigned = ft_sensorrealign(cfg,sens); >>> >>> Now, I get the following error: >>> >>> ??? Subscripted assignment between dissimilar structures. >>> Error in ==> ft_sensorrealign at 235 >>> tmp(i) = ft_convert_units(template(i), elec.unit); % ensure >>> that the >>> units are consistent with the electrodes >>> >>> Does anyone know why this would be occurring and how to fix it? >>> Thanks in advance for the help. >>> >>> >>> Federico Chella, Ph.D. >>> Dept. of Neuroscience, Imaging and Clinical Sciences >>> ITAB ? Institute for advanced Biomedical Technologies >>> ?G. d'Annunzio? University of Chieti-Pescara, Chieti, Italy >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From ctesche at unm.edu Tue Jul 8 03:44:49 2014 From: ctesche at unm.edu (Claudia Tesche) Date: Tue, 8 Jul 2014 01:44:49 +0000 Subject: [FieldTrip] Remove Cerebellum In-Reply-To: References: Message-ID: <1404783893509.40104@unm.edu> ?Dear Keyvan Why? Best, Claudia ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Keyvan Mahjoory Sent: Sunday, July 06, 2014 10:49 AM To: FieldTrip discussion list Subject: [FieldTrip] Remove Cerebellum Dear All, I've used standard_mri and standard_bem and I want to exclude cerebellum for source analysis. How can I do that? Best, Keyvan -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiderrasha at yahoo.com Tue Jul 8 06:44:54 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Mon, 7 Jul 2014 21:44:54 -0700 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates Message-ID: <1404794694.74187.YahooMailNeo@web124901.mail.ne1.yahoo.com> Dear fieldtrip experts, Im trying to do source localization for simulated EEG data, for this I followed the tutorial in page: http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate I was trying to use the mri image provided by fieldtrip (Subject01.mri) and EEG template (standard_1020.elc) in my work. The mri image need to be re-aliened to the Talairach space for coregistration with EEG space. In the tutorial you use (ft_volumerealien) to do that using interactive method. I have two questions: First, how can I do the coregistration using fixed coordinates of the 3 fiducials (nasion, left pr, right pr), in other words how can I get the coordinates of the fiducials in both Talairach and EEG spaces to do the coregistration using the script only not manually. Second, I tried to use the mri image provided by the spm toolbox because its already aliened to Talairach space, but when I try to do segmentation I get error that coordinates field does not exist: ??? Reference to non-existent field 'coordsys'. Error in ==> ft_volumesegment at 284   original.coordsys  = mri.coordsys; Error in ==> segmentation_spm_mri at 24 seg           = ft_volumesegment(cfg, mrirs); I read the image using (ft_read_mri) function, I don't find the field specified for the coordinates: disp(mri)           dim: [177 240 256]       anatomy: [177x240x256 double]           hdr: [1x1 struct]     transform: [4x4 double]          unit: 'mm' How can I solve this problem so I can use the mri image in SPM for further analysing in fieldtrip? Sorry for the long email I would be thankful for any help. Regards Rasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Jul 8 10:00:07 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 08 Jul 2014 10:00:07 +0200 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates In-Reply-To: <1404794694.74187.YahooMailNeo@web124901.mail.ne1.yahoo.com> References: <1404794694.74187.YahooMailNeo@web124901.mail.ne1.yahoo.com> Message-ID: <53BBA507.8060402@donders.ru.nl> Hi Rasha, you can call ft_determine_coordsys, or set the field manually if you what coordinate system the MRI is in. You could have also used the search function of the fieldtrip wiki (on the upper right on the page), e.g. by searching for coordinate system: http://fieldtrip.fcdonders.nl/?do=search&id=coordinate+system This leads to a page that lists all pages on which the term coordinate system occur. You can see that the first match links to a FAQ, which also hints to ft_determine_coordsys. FAQs can also be found when navigating to "User documentation" and then "Frequently asked questions". We spent quite some time to list a number of questions and detailled answers there. The answers are mostly more extensive than the question alone, so any question that might be remotely related to your actual question might be of interest there. However, please don't be afraid to ask any further questions, just notice that we're all doing this here besides our research, so sometimes it might take a bit longer for us to respond than within a few hours. Any search that you do in advance on the FT wiki is time that we do not have to spend ;) So, please don't send the same message five times within not even a week, once a week should be enough ;) Best, Jörn On 7/8/2014 6:44 AM, Rasha Haider wrote: > Dear fieldtrip experts, > Im trying to do source localization for simulated EEG data, for this I > followed the tutorial in page: > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate > > I was trying to use the mri image provided by fieldtrip > (Subject01.mri) and EEG template (standard_1020.elc) in my work. > The mri image need to be re-aliened to the Talairach space for > coregistration with EEG space. In the tutorial you use > (ft_volumerealien) to do that using interactive method. > I have two questions: > > First, how can I do the coregistration using fixed coordinates of the > 3 fiducials (nasion, left pr, right pr), in other words how can I get > the coordinates of the fiducials in both Talairach and EEG spaces to > do the coregistration using the script only not manually. > > Second, I tried to use the mri image provided by the spm toolbox > because its already aliened to Talairach space, but when I try to do > segmentation I get error that coordinates field does not exist: > > ??? Reference to non-existent field 'coordsys'. > > Error in ==> ft_volumesegment at 284 > original.coordsys = mri.coordsys; > > Error in ==> segmentation_spm_mri at 24 > seg = ft_volumesegment(cfg, mrirs); > > I read the image using (ft_read_mri) function, I don't find the field > specified for the coordinates: > > disp(mri) > dim: [177 240 256] > anatomy: [177x240x256 double] > hdr: [1x1 struct] > transform: [4x4 double] > unit: 'mm' > > How can I solve this problem so I can use the mri image in SPM for > further analysing in fieldtrip? > > Sorry for the long email I would be thankful for any help. > Regards > Rasha > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From r.oostenveld at donders.ru.nl Tue Jul 8 17:41:24 2014 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 8 Jul 2014 17:41:24 +0200 Subject: [FieldTrip] Fwd: Job opening: 7 PhD positions in Dutch Research Consortium "Language in Interaction" References: <787977264.3752891.1404822317386.JavaMail.root@draco.zimbra.ru.nl> Message-ID: Begin forwarded message: > From: "Lorenz, C.M." > Subject: Job opening: 7 PhD positions in Dutch Research Consortium "Language in Interaction" > > Seven PhD Positions in the Dutch Research Consortium 'Language in Interaction' > > > Closing date: 30 September 2014 > For more information: http://www.languageininteraction.nl/jobs/id-2nd-phd-call-general.html > > We are looking for highly motivated PhD candidates to enrich a unique consortium of researchers that aims to unravel the neurocognitive mechanisms of language at multiple levels. The goal is to understand both the universality and the variability of the human language faculty from genes to behaviour. > > The Netherlands has an outstanding track record in the language sciences. This research consortium sponsored by a large grant from the Netherlands Organization for Scientific research (NWO) brings together many of the excellent research groups in the Netherlands with a research programme on the foundations of language. The research team consists of 43 Principal Investigators. In addition to the excellence in the domain of language and related relevant fields of cognition, our consortium provides state-of-the-art research facilities and a research team with ample experience in the complex research methods that will be invoked to address the scientific questions at the highest level of methodological sophistication. These include methods from genetics, neuroimaging, computational modelling, and patient-related research. This consortium realizes both quality and critical mass for studying human language at a scale not easily found anywhere else. > > Currently, the consortium advertises seven PhD positions for a period of 4 years. Depending on the PhD position applied for, candidates will be appointed at one of the home institutions of the consortium. These positions provide the opportunity for conducting world-class research as a member of an interdisciplinary team. > > Click for more information on the PhD positions and how to apply: > http://www.languageininteraction.nl/jobs/id-2nd-phd-call-general.html > > > Carolin Lorenz > Secretary - Language in Interaction Consortium > Radboud University | Donders Centre for Cognitive Neuroimaging (DCCN) | room 0.78 > Kapittelweg 29, 6525 EN Nijmegen, The Netherlands | P.O. Box 9101, 6500 HB, Nijmegen, The Netherlands | > T: +31 (0)24 3666272 | E: C.Lorenz at donders.ru.nl| Office hours: 8.30-14 hr on Mon, Tue, Thur, Fri -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Wed Jul 9 01:49:06 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Tue, 8 Jul 2014 23:49:06 +0000 Subject: [FieldTrip] Problems with Scalp Model Message-ID: <238FF095-5F42-491C-8B2F-1C552E6A7CE3@dartmouth.edu> Hello, I am trying to produce the volume conduction model of some MRI data that I have, and I am having a problem with the production of the Scalp Model (Attached Below). I believe the problem may be stemming from the segmentation process, but I am not completely sure. Is there any option that will allow me to get rid of the extraneous figures in the scalp model? Help is greatly appreciated. Isaiah Smith -------------- next part -------------- A non-text attachment was scrubbed... Name: Scalp FieldTrip Model .fig Type: application/x-matlab-figure Size: 15139 bytes Desc: Scalp FieldTrip Model .fig URL: From haiderrasha at yahoo.com Wed Jul 9 07:59:44 2014 From: haiderrasha at yahoo.com (Rasha Haider) Date: Tue, 8 Jul 2014 22:59:44 -0700 Subject: [FieldTrip] Coregistration using fixed fiducials coordinates In-Reply-To: <53BBA507.8060402@donders.ru.nl> References: <1404794694.74187.YahooMailNeo@web124901.mail.ne1.yahoo.com> <53BBA507.8060402@donders.ru.nl> Message-ID: <1404885584.48607.YahooMailNeo@web124902.mail.ne1.yahoo.com> Dear Jörn, thank you for your reply, actually I didn't send many emails because I didn't receive any reply directly, the problem was that each time I sent the email I received a failure email mentioning that my email was not delivered so I had to resent it again. My apologies for this I don't know what was the problem. I will follow your advise hoping to get some results. Regards Rasha ________________________________ From: Jörn M. Horschig To: FieldTrip discussion list Sent: Tuesday, July 8, 2014 4:00 PM Subject: Re: [FieldTrip] Coregistration using fixed fiducials coordinates Hi Rasha, you can call ft_determine_coordsys, or set the field manually if you what coordinate system the MRI is in. You could have also used the search function of the fieldtrip wiki (on the upper right on the page), e.g. by searching for coordinate system: http://fieldtrip.fcdonders.nl/?do=search&id=coordinate+system This leads to a page that lists all pages on which the term coordinate system occur. You can see that the first match links to a FAQ, which also hints to ft_determine_coordsys. FAQs can also be found when navigating to "User documentation" and then "Frequently asked questions". We spent quite some time to list a number of questions and detailled answers there. The answers are mostly more extensive than the question alone, so any question that might be remotely related to your actual question might be of interest there. However, please don't be afraid to ask any further questions, just notice that we're all doing this here besides our research, so sometimes it might take a bit longer for us to respond than within a few hours. Any search that you do in advance on the FT wiki is time that we do not have to spend ;) So, please don't send the same message five times within not even a week, once a week should be enough ;) Best, Jörn On 7/8/2014 6:44 AM, Rasha Haider wrote: > Dear fieldtrip experts, > Im trying to do source localization for simulated EEG data, for this I > followed the tutorial in page: > http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate > > I was trying to use the mri image provided by fieldtrip > (Subject01.mri) and EEG template (standard_1020.elc) in my work. > The mri image need to be re-aliened to the Talairach space for > coregistration with EEG space. In the tutorial you use > (ft_volumerealien) to do that using interactive method. > I have two questions: > > First, how can I do the coregistration using fixed coordinates of the > 3 fiducials (nasion, left pr, right pr), in other words how can I get > the coordinates of the fiducials in both Talairach and EEG spaces to > do the coregistration using the script only not manually. > > Second, I tried to use the mri image provided by the spm toolbox > because its already aliened to Talairach space, but when I try to do > segmentation I get error that coordinates field does not exist: > > ??? Reference to non-existent field 'coordsys'. > > Error in ==> ft_volumesegment at 284 >  original.coordsys  = mri.coordsys; > > Error in ==> segmentation_spm_mri at 24 > seg          = ft_volumesegment(cfg, mrirs); > > I read the image using (ft_read_mri) function, I don't find the field > specified for the coordinates: > > disp(mri) >          dim: [177 240 256] >      anatomy: [177x240x256 double] >          hdr: [1x1 struct] >    transform: [4x4 double] >          unit: 'mm' > > How can I solve this problem so I can use the mri image in SPM for > further analysing in fieldtrip? > > Sorry for the long email I would be thankful for any help. > Regards > Rasha > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel:    +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From elisa.filevich at gmail.com Wed Jul 9 10:23:49 2014 From: elisa.filevich at gmail.com (elisa filevich) Date: Wed, 9 Jul 2014 10:23:49 +0200 Subject: [FieldTrip] Deadline extended for Frontiers in Psychology research topic: Awareness of intentional processes and its relationship to theories of consciousness Message-ID: <59DF1A32-CA31-4918-BFBC-5BBF2D7732FC@gmail.com> Dear all, We have extended the deadline for submission of manuscripts to our Frontiers in Psychology Research Topic on Awareness of intentional processes and its relationship to theories of consciousness to the 31st of December, 2014. For more information see the following link, or the description below http://www.frontiersin.org/Consciousness_Research/researchtopics/Awareness_of_intentional_proce/2762 Best wishes Elisa Filevich ---------- Awareness of intentional processes and its relationship to theories of consciousness Stimuli present ‘in the world’, external to the brain, can elicit a direct neural response, and eventually access consciousness. Behavioral and neurophysiological experiments have used these external stimuli to build, test and refine theories of how conscious perception might occur. But perceptual processes are not the only ones capable of accessing consciousness. We can become aware of internally generated intentions, urges and emotional states. Importantly, these signals are ‘internally generated’ in the sense that they do not depend directly on afferent signals. Despite the strong parallelisms between the conscious perception of externally- and internally-generated information, theories of consciousness have rarely incorporated data from awareness of intentions. This is perhaps due to the difficulties in reliably manipulating internally generated processes. However, and for example, a growing body of data on topics such as awareness of agency, and metacognitive monitoring of intentions shows that research on the awareness of intentions is indeed possible. Importantly, each paradigm and method has specific strengths, and exploring multiple kinds of data can often lead to a rich span of competing theories to explain them. For example, subliminal priming experiments have been used to develop the Global Workspace theory, whilst tasks including subjective reports of awareness have informed Higher Order theories, and brain functional connectivity data have offered possible implementations for the Information Integration theory. Including the often-neglected conscious perception of internally generated processes may enrich, or strengthen, some of the existing theories of consciousness. We therefore welcome both theoretical and empirical contributions, in the hope to explore the feasibility of incorporating the awareness of internal processes into theories of consciousness. We encourage submissions reporting novel experimental paradigms that may help advance in this direction. Specifically, we ask whether this research program can offer any novel insights, or raise any new challenges, for theories of consciousness. --- Elisa Filevich Postdoctoral Fellow E-Mail: filevich at mpib-berlin.mpg.de http://www.mpib-berlin.mpg.de/de/mitarbeiter/elisa-filevich Max-Planck-Institut für Bildungsforschung Max Planck Institute for Human Development Lentzeallee 94 14195 Berlin -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 5443 bytes Desc: not available URL: From niccol000 at yahoo.it Wed Jul 9 16:35:57 2014 From: niccol000 at yahoo.it (=?iso-8859-1?Q?Niccol=C3=B2_Pescetelli?=) Date: Wed, 9 Jul 2014 15:35:57 +0100 Subject: [FieldTrip] Conflicting pca functions in Matlab and FT Message-ID: <1404916557.89645.YahooMailNeo@web171605.mail.ir2.yahoo.com> Hi! I just noted that fieldtrip has a function called pca.m to perform principal component analysis. The problem with this is that also the standard MATLAB toolbox contains a pca.m function to perform PCA, but the two functions are not compatible with each other and cause unwanted calls depending on the position in your search path. For example at the moment I want to use the MATLAB pca function to analyse behavioural data, but at some point I might need the FT pca one ot analyse MEG data. How can I fix this bug? I think changing the name to the function in FT is going to be risky Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Jul 9 16:45:18 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 9 Jul 2014 16:45:18 +0200 Subject: [FieldTrip] Conflicting pca functions in Matlab and FT In-Reply-To: <1404916557.89645.YahooMailNeo@web171605.mail.ir2.yahoo.com> References: <1404916557.89645.YahooMailNeo@web171605.mail.ir2.yahoo.com> Message-ID: Hi, To my knowledge, the only pca.m is included in /external/dmlt/external/murphy/. This is rarely used. The PCA analysis performed by ft_componentanalysis is implemented inline in that function (as it is a very straightforward algorithm). The /external/dmlt/ is, I believe, not added to the path by ft_defaults, so it should not conflict if you add FieldTrip to your path properly (i.e. by *not* using addpath(genpath( wrote: > Hi! > > I just noted that fieldtrip has a function called pca.m to perform principal > component analysis. > The problem with this is that also the standard MATLAB toolbox contains a > pca.m function to perform PCA, but the two functions are not compatible with > each other and cause unwanted calls depending on the position in your search > path. For example at the moment I want to use the MATLAB pca function to > analyse behavioural data, but at some point I might need the FT pca one ot > analyse MEG data. > > How can I fix this bug? I think changing the name to the function in FT is > going to be risky > > > Thanks! > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From marc.lalancette at sickkids.ca Wed Jul 9 17:50:42 2014 From: marc.lalancette at sickkids.ca (Marc Lalancette) Date: Wed, 9 Jul 2014 15:50:42 +0000 Subject: [FieldTrip] Beamformers: SAM vs LCMV vs LCMV fixedori Message-ID: <2A2B6A5B8C4C174CBCCE0B45E548DEB229F967A1@SKMBXX01.sickkids.ca> Hi Max, The formulae are different even when using LCMV with the same fixed orientation as the one found by SAM. For example, the power formulae, with hopefully clear enough notation (o is orientation vector), and assuming unit-gain weight normalization for simplicity: scalar: w(o)' R w(o) = 1 / [o' L' R^-1 L o] 1-d vector: o' W' R W o = o' [L' R^-1 L]^-1 o Of course, if using different software, there might also be differences in what weight normalization is used, how the data is filtered, whether or not a baseline or "DC offset" is subtracted, etc. Note of potential interest: I'm preparing a poster for Biomag with information on scalar and vector beamformers, with emphasis on the issue of rotational invariance since it is a common issue in the literature and in some software: that some formulae are not rotationally invariant, i.e. the results depend on how the coordinate system is defined/oriented. This is obviously not acceptable for any physically significant measure. Regarding Fieldtrip itself, the only such issue I found is the (mostly hidden, thus probably not typically used) option to normalize lead fields by column. Cheers, Marc Lalancette Lab Research Project Manager The Hospital for Sick Children, Department of Diagnostic Imaging, Program in Neurosciences and Mental Health Research MEG lab, Room S742, 555 University Avenue, Toronto, ON, M5G 1X8 416-813-7654 x201535 Date: Wed, 2 Jul 2014 10:10:02 -0400 From: Max Cantor To: FieldTrip discussion list Subject: [FieldTrip] Beamformers: SAM vs LCMV vs LCMV fixedori Message-ID: Content-Type: text/plain; charset="utf-8" Hi Fieldtrip, We are currently using the SAM beamformer for source localization, but are thinking of switching to LCMV. Given the research I've read, the vector beamformer approach should, for our purposes, be more efficient and be as, if not more accurate than scalar. However, other than the vector/scalar difference, I don't have a great understanding of what other differences exist between the two beamformers. To test the differences, I've run SAM, LCMV, and LCMV with fixed orientation (making it scalar), with both our real data and with simulated data, and while SAM and LCMV fixedori are more similar to each other than either are when compared to LCMV without fixedori (particularly with the simulation, less so with our real data), they are still visibly different from each other. This suggests to me that there are other potentially meaningful differences between SAM and LCMV besides the scalar/vector difference, and I want to make sure I have at least some idea of what those differences are before I commit to the change. That being said, I get the feeling that these differences may be more nuanced than I can decipher on my own, so if anyone can explain to me what these differences are and if they are important, I would greatly appreciate it. Thanks, Max -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan ________________________________ This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. From mcantor at umich.edu Wed Jul 9 20:05:26 2014 From: mcantor at umich.edu (Max Cantor) Date: Wed, 9 Jul 2014 14:05:26 -0400 Subject: [FieldTrip] Beamformers: SAM vs LCMV vs LCMV fixedori In-Reply-To: <2A2B6A5B8C4C174CBCCE0B45E548DEB229F967A1@SKMBXX01.sickkids.ca> References: <2A2B6A5B8C4C174CBCCE0B45E548DEB229F967A1@SKMBXX01.sickkids.ca> Message-ID: Thanks Marc, Hopefully this can explain some of the differences I'm seeing between the beamformers with our data and help me determine if they are significant for our purposes. Good luck with the poster! I'm not sure if this is what you were getting at, but if it is made publicly available online I would certainly be interested in reading it, thank you. On Wed, Jul 9, 2014 at 11:50 AM, Marc Lalancette < marc.lalancette at sickkids.ca> wrote: > Hi Max, > > The formulae are different even when using LCMV with the same fixed > orientation as the one found by SAM. > For example, the power formulae, with hopefully clear enough notation (o > is orientation vector), and assuming unit-gain weight normalization for > simplicity: > scalar: w(o)' R w(o) = 1 / [o' L' R^-1 L o] > 1-d vector: o' W' R W o = o' [L' R^-1 L]^-1 o > > Of course, if using different software, there might also be differences in > what weight normalization is used, how the data is filtered, whether or not > a baseline or "DC offset" is subtracted, etc. > > Note of potential interest: I'm preparing a poster for Biomag with > information on scalar and vector beamformers, with emphasis on the issue of > rotational invariance since it is a common issue in the literature and in > some software: that some formulae are not rotationally invariant, i.e. the > results depend on how the coordinate system is defined/oriented. This is > obviously not acceptable for any physically significant measure. Regarding > Fieldtrip itself, the only such issue I found is the (mostly hidden, thus > probably not typically used) option to normalize lead fields by column. > > Cheers, > > Marc Lalancette > Lab Research Project Manager > The Hospital for Sick Children, Department of Diagnostic Imaging, Program > in Neurosciences and Mental Health > Research MEG lab, Room S742, 555 University Avenue, Toronto, ON, M5G 1X8 > 416-813-7654 x201535 > > > Date: Wed, 2 Jul 2014 10:10:02 -0400 > From: Max Cantor > To: FieldTrip discussion list > Subject: [FieldTrip] Beamformers: SAM vs LCMV vs LCMV fixedori > Message-ID: > q_pm9wFB5FZ-_L0A at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi Fieldtrip, > > We are currently using the SAM beamformer for source localization, but are > thinking of switching to LCMV. Given the research I've read, the vector > beamformer approach should, for our purposes, be more efficient and be as, > if not more accurate than scalar. > > However, other than the vector/scalar difference, I don't have a great > understanding of what other differences exist between the two beamformers. > To test the differences, I've run SAM, LCMV, and LCMV with fixed > orientation (making it scalar), with both our real data and with simulated > data, and while SAM and LCMV fixedori are more similar to each other than > either are when compared to LCMV without fixedori (particularly with the > simulation, less so with our real data), they are still visibly different > from each other. This suggests to me that there are other potentially > meaningful differences between SAM and LCMV besides the scalar/vector > difference, and I want to make sure I have at least some idea of what those > differences are before I commit to the change. > > That being said, I get the feeling that these differences may be more > nuanced than I can decipher on my own, so if anyone can explain to me what > these differences are and if they are important, I would greatly appreciate > it. > > Thanks, > > Max > > -- > Max Cantor > Lab Manager > Computational Neurolinguistics Lab > University of Michigan > > ________________________________ > > This e-mail may contain confidential, personal and/or health > information(information which may be subject to legal restrictions on use, > retention and/or disclosure) for the sole use of the intended recipient. > Any review or distribution by anyone other than the person for whom it was > originally intended is strictly prohibited. If you have received this > e-mail in error, please contact the sender and delete all copies. > -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From lid.mijas at gmail.com Wed Jul 9 20:18:23 2014 From: lid.mijas at gmail.com (Lidia Mijas) Date: Wed, 9 Jul 2014 19:18:23 +0100 Subject: [FieldTrip] surrogates for Phase lag index Message-ID: Hi all, I am wondering if fieldtrip has any options for computing surrogates? I am tryng to assess confidence level for my Phase Lag Index results ( to determine whether it is significantly larger then 0) But maybe someone has a better idea how to do it? Not sure if it matters so just to mentioned that my PLI was computed at the source level on beamformed signals. Many thanks for any suggestion. Lidia -------------- next part -------------- An HTML attachment was scrubbed... URL: From rikkert.hindriks at upf.edu Wed Jul 9 20:39:41 2014 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Wed, 9 Jul 2014 20:39:41 +0200 Subject: [FieldTrip] surrogates for Phase lag index In-Reply-To: References: Message-ID: Hi Lidia, I have the same question and I don't think the answer is trivial: one would have to construct pairs of surrogate time-series under the nullhypothesis of zero phase-lag-index. With other words: construct pairs of time-series who's instantaneous phases are coupled to the same extent as the recorded time-series but with zero lag. In my case, the question is how to test for a significant lag via the cross-correlation function. Kind regards, Rikkert On Wed, Jul 9, 2014 at 8:18 PM, Lidia Mijas wrote: > Hi all, > > I am wondering if fieldtrip has any options for computing surrogates? > I am tryng to assess confidence level for my Phase Lag Index results ( to > determine whether it is significantly larger then 0) > > But maybe someone has a better idea how to do it? > Not sure if it matters so just to mentioned that my PLI was computed at > the source level on beamformed signals. > > Many thanks for any suggestion. > > Lidia > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bastien.b1 at gmail.com Wed Jul 9 21:01:35 2014 From: bastien.b1 at gmail.com (Bastien Boutonnet) Date: Wed, 9 Jul 2014 14:01:35 -0500 Subject: [FieldTrip] surrogates for Phase lag index In-Reply-To: References: Message-ID: I guess I will tag along to this discussion, in saying that I have been having the same burning question for a while. My issues have been along those lines: when I run some kinds of connectivity analyses (be it PLI, wPLI or PLV), how do I make sure the values I obtain are "legal" (or different from 0). B – Bastien Boutonnet, Ph. D. Postdoctoral Research Associate Department of Psychology University of Wisconsin, Madison bastienboutonnet.com On 9 July 2014 13:39, HINDRIKS, RIKKERT wrote: > Hi Lidia, > > I have the same question and I don't think the answer is trivial: one > would have to construct pairs of surrogate time-series under the > nullhypothesis of zero phase-lag-index. With other words: construct pairs > of time-series who's instantaneous phases are coupled > to the same extent as the recorded time-series but with zero lag. In my > case, the question is how to test for a significant lag via the > cross-correlation function. > > > Kind regards, > Rikkert > > > On Wed, Jul 9, 2014 at 8:18 PM, Lidia Mijas wrote: > >> Hi all, >> >> I am wondering if fieldtrip has any options for computing surrogates? >> I am tryng to assess confidence level for my Phase Lag Index results ( to >> determine whether it is significantly larger then 0) >> >> But maybe someone has a better idea how to do it? >> Not sure if it matters so just to mentioned that my PLI was computed at >> the source level on beamformed signals. >> >> Many thanks for any suggestion. >> >> Lidia >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rikkert.hindriks at upf.edu Wed Jul 9 21:42:04 2014 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Wed, 9 Jul 2014 21:42:04 +0200 Subject: [FieldTrip] surrogates for Phase lag index In-Reply-To: References: Message-ID: Constructing surrogate time-series for PLV is more straightforward since, in this case, the nullhypothesis is the absence of phase-locking. Surrogate pairs of time-series can be constructed for example by phase-randomization in the Fourier domain. Rikkert On Wed, Jul 9, 2014 at 9:01 PM, Bastien Boutonnet wrote: > I guess I will tag along to this discussion, in saying that I have been > having the same burning question for a while. > > My issues have been along those lines: when I run some kinds of > connectivity analyses (be it PLI, wPLI or PLV), how do I make sure the > values I obtain are "legal" (or different from 0). > > B > > – > Bastien Boutonnet, Ph. D. > Postdoctoral Research Associate > Department of Psychology > University of Wisconsin, Madison > bastienboutonnet.com > > > On 9 July 2014 13:39, HINDRIKS, RIKKERT wrote: > >> Hi Lidia, >> >> I have the same question and I don't think the answer is trivial: one >> would have to construct pairs of surrogate time-series under the >> nullhypothesis of zero phase-lag-index. With other words: construct pairs >> of time-series who's instantaneous phases are coupled >> to the same extent as the recorded time-series but with zero lag. In my >> case, the question is how to test for a significant lag via the >> cross-correlation function. >> >> >> Kind regards, >> Rikkert >> >> >> On Wed, Jul 9, 2014 at 8:18 PM, Lidia Mijas wrote: >> >>> Hi all, >>> >>> I am wondering if fieldtrip has any options for computing surrogates? >>> I am tryng to assess confidence level for my Phase Lag Index results ( >>> to determine whether it is significantly larger then 0) >>> >>> But maybe someone has a better idea how to do it? >>> Not sure if it matters so just to mentioned that my PLI was computed at >>> the source level on beamformed signals. >>> >>> Many thanks for any suggestion. >>> >>> Lidia >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bastien.b1 at gmail.com Wed Jul 9 22:10:38 2014 From: bastien.b1 at gmail.com (Bastien Boutonnet) Date: Wed, 9 Jul 2014 15:10:38 -0500 Subject: [FieldTrip] surrogates for Phase lag index In-Reply-To: References: Message-ID: That makes sense. How would you implement phase-randomisation? Is it similar to estimating the connectivity between the same pairs of electrodes but with data coming from different trials? Or even simpler? My interest to know about PLI/wPLI however still holds. B – Bastien Boutonnet, Ph. D. Postdoctoral Research Associate Department of Psychology University of Wisconsin, Madison bastienboutonnet.com On 9 July 2014 14:42, HINDRIKS, RIKKERT wrote: > Constructing surrogate time-series for PLV is more straightforward since, > in this case, the nullhypothesis is the absence of phase-locking. > Surrogate pairs of time-series can be constructed for example by > phase-randomization in the Fourier domain. > > Rikkert > > > On Wed, Jul 9, 2014 at 9:01 PM, Bastien Boutonnet > wrote: > >> I guess I will tag along to this discussion, in saying that I have been >> having the same burning question for a while. >> >> My issues have been along those lines: when I run some kinds of >> connectivity analyses (be it PLI, wPLI or PLV), how do I make sure the >> values I obtain are "legal" (or different from 0). >> >> B >> >> – >> Bastien Boutonnet, Ph. D. >> Postdoctoral Research Associate >> Department of Psychology >> University of Wisconsin, Madison >> bastienboutonnet.com >> >> >> On 9 July 2014 13:39, HINDRIKS, RIKKERT wrote: >> >>> Hi Lidia, >>> >>> I have the same question and I don't think the answer is trivial: one >>> would have to construct pairs of surrogate time-series under the >>> nullhypothesis of zero phase-lag-index. With other words: construct >>> pairs of time-series who's instantaneous phases are coupled >>> to the same extent as the recorded time-series but with zero lag. In my >>> case, the question is how to test for a significant lag via the >>> cross-correlation function. >>> >>> >>> Kind regards, >>> Rikkert >>> >>> >>> On Wed, Jul 9, 2014 at 8:18 PM, Lidia Mijas wrote: >>> >>>> Hi all, >>>> >>>> I am wondering if fieldtrip has any options for computing surrogates? >>>> I am tryng to assess confidence level for my Phase Lag Index results ( >>>> to determine whether it is significantly larger then 0) >>>> >>>> But maybe someone has a better idea how to do it? >>>> Not sure if it matters so just to mentioned that my PLI was computed at >>>> the source level on beamformed signals. >>>> >>>> Many thanks for any suggestion. >>>> >>>> Lidia >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Thu Jul 10 00:55:18 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Wed, 9 Jul 2014 22:55:18 +0000 Subject: [FieldTrip] Problems with Scalp Model Message-ID: <73A7ED2B-6B6F-49C8-BF36-EEDA80B054A3@dartmouth.edu> Hello, I am trying to produce the volume conduction model of some MRI data that I have, and I am having a problem with the production of the Scalp Model (Attached Below). I believe the problem may be stemming from the segmentation process, but I am not completely sure. Is there any option that will allow me to get rid of the extraneous figures in the scalp model? Help is greatly appreciated. Isaiah Smith -------------- next part -------------- A non-text attachment was scrubbed... Name: Scalp FieldTrip Model .fig Type: application/x-matlab-figure Size: 15139 bytes Desc: Scalp FieldTrip Model .fig URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ATT00001.txt URL: From Isaiah.C.Smith.17 at dartmouth.edu Thu Jul 10 09:50:09 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Thu, 10 Jul 2014 07:50:09 +0000 Subject: [FieldTrip] Help with Volume Conduction Model Message-ID: <77D42DF8-54FB-4629-BEA4-1A008DAE687D@dartmouth.edu> Hello, I am having trouble with a specific tissue output in the segmentation process. How do I explore the output of the segmentation and look at the voxel-by-voxel assignment of a specific tissue type? Then how do I tweak the parameters and/or edit manually segmentation before making a mesh model? Isaiah Smith From thomas.wunderle at esi-frankfurt.de Thu Jul 10 11:14:08 2014 From: thomas.wunderle at esi-frankfurt.de (Wunderle, Thomas) Date: Thu, 10 Jul 2014 09:14:08 +0000 Subject: [FieldTrip] Problem in ft_checkconfig Message-ID: <27E5CAD9145EEC41BB9B34C01716A1987131AFEA@UM-EXCDAG-A01.um.gwdg.de> Hi all, apparently there was a change in "ft_checkconfig" which makes a problem when using functions related to spike analysis. When running "ft_spiketriggeredspectrum", there comes the following error message (FieldTrip version r9719): ??? Error using ==> ft_checkconfig at 205 The field cfg.progress is not allowed I put the whole code into bugzilla: Bug 2641 - Error in ft_checkconfig using ft_spiketriggeredspectrum Using FieldTrip version r8941 does not produce the error. I'm running Matlab R2011a on Linux. Best, Thomas ----- Dr. Thomas Wunderle Ernst Strüngmann Institute (ESI) for Neuroscience in Cooperation with Max Planck Society Deutschordenstrasse 46 60528 Frankfurt am Main, Germany www.esi-frankfurt.de thomas.wunderle at esi-frankfurt.de Tel: +49 69 96769 516 Fax: +49 69 96769 555 Sitz der Gesellschaft: Frankfurt am Main Registergericht: Amtsgericht Frankfurt - HRB 84266 Geschäftsführer: Prof. Dr. Pascal Fries -------------- next part -------------- An HTML attachment was scrubbed... URL: From paymandomorientes at yahoo.com Thu Jul 10 13:22:35 2014 From: paymandomorientes at yahoo.com (paymando- morientes) Date: Thu, 10 Jul 2014 04:22:35 -0700 Subject: [FieldTrip] variable "abort" Message-ID: <1404991355.38752.YahooMailNeo@web141606.mail.bf1.yahoo.com> Dear all I have a problem starting with field trip. When I call "ft_definevarible" function, it throws an error that "abort" variable is not defined. I checked the ".m file" for the function and it says that abort is set by "ft_preamble" function. So where is the problem? Should I change something in my script? or "ft_preamble" function is not doing its job? by the way i hope I am sending this message to the right e-mail. thanks in advance payman -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Thu Jul 10 13:40:12 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 10 Jul 2014 13:40:12 +0200 (CEST) Subject: [FieldTrip] variable "abort" In-Reply-To: <1404991355.38752.YahooMailNeo@web141606.mail.bf1.yahoo.com> References: <1404991355.38752.YahooMailNeo@web141606.mail.bf1.yahoo.com> Message-ID: <015201cf9c33$b5a9e830$20fdb890$@herring@fcdonders.ru.nl> Dear Payman, As far as I can tell there is no function called ft_definevarible, could you please recheck which function is given you problems? Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of paymando- morientes Sent: donderdag 10 juli 2014 13:23 To: fieldtrip at science.ru.nl Subject: [FieldTrip] variable "abort" Dear all I have a problem starting with field trip. When I call "ft_definevarible" function, it throws an error that "abort" variable is not defined. I checked the ".m file" for the function and it says that abort is set by "ft_preamble" function. So where is the problem? Should I change something in my script? or "ft_preamble" function is not doing its job? by the way i hope I am sending this message to the right e-mail. thanks in advance payman -------------- next part -------------- An HTML attachment was scrubbed... URL: From rikkert.hindriks at upf.edu Thu Jul 10 16:41:04 2014 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Thu, 10 Jul 2014 16:41:04 +0200 Subject: [FieldTrip] surrogates for Phase lag index In-Reply-To: References: Message-ID: http://www.vis.caltech.edu/~rodri/papers/PNB.pdf On Wed, Jul 9, 2014 at 10:10 PM, Bastien Boutonnet wrote: > That makes sense. How would you implement phase-randomisation? Is it > similar to estimating the connectivity between the same pairs of electrodes > but with data coming from different trials? Or even simpler? > > My interest to know about PLI/wPLI however still holds. > > B > > – > Bastien Boutonnet, Ph. D. > Postdoctoral Research Associate > Department of Psychology > University of Wisconsin, Madison > bastienboutonnet.com > > > On 9 July 2014 14:42, HINDRIKS, RIKKERT wrote: > >> Constructing surrogate time-series for PLV is more straightforward since, >> in this case, the nullhypothesis is the absence of phase-locking. >> Surrogate pairs of time-series can be constructed for example by >> phase-randomization in the Fourier domain. >> >> Rikkert >> >> >> On Wed, Jul 9, 2014 at 9:01 PM, Bastien Boutonnet >> wrote: >> >>> I guess I will tag along to this discussion, in saying that I have been >>> having the same burning question for a while. >>> >>> My issues have been along those lines: when I run some kinds of >>> connectivity analyses (be it PLI, wPLI or PLV), how do I make sure the >>> values I obtain are "legal" (or different from 0). >>> >>> B >>> >>> – >>> Bastien Boutonnet, Ph. D. >>> Postdoctoral Research Associate >>> Department of Psychology >>> University of Wisconsin, Madison >>> bastienboutonnet.com >>> >>> >>> On 9 July 2014 13:39, HINDRIKS, RIKKERT >>> wrote: >>> >>>> Hi Lidia, >>>> >>>> I have the same question and I don't think the answer is trivial: one >>>> would have to construct pairs of surrogate time-series under the >>>> nullhypothesis of zero phase-lag-index. With other words: construct >>>> pairs of time-series who's instantaneous phases are coupled >>>> to the same extent as the recorded time-series but with zero lag. In my >>>> case, the question is how to test for a significant lag via the >>>> cross-correlation function. >>>> >>>> >>>> Kind regards, >>>> Rikkert >>>> >>>> >>>> On Wed, Jul 9, 2014 at 8:18 PM, Lidia Mijas >>>> wrote: >>>> >>>>> Hi all, >>>>> >>>>> I am wondering if fieldtrip has any options for computing surrogates? >>>>> I am tryng to assess confidence level for my Phase Lag Index results ( >>>>> to determine whether it is significantly larger then 0) >>>>> >>>>> But maybe someone has a better idea how to do it? >>>>> Not sure if it matters so just to mentioned that my PLI was computed >>>>> at the source level on beamformed signals. >>>>> >>>>> Many thanks for any suggestion. >>>>> >>>>> Lidia >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bastien.b1 at gmail.com Thu Jul 10 16:58:13 2014 From: bastien.b1 at gmail.com (Bastien Boutonnet) Date: Thu, 10 Jul 2014 09:58:13 -0500 Subject: [FieldTrip] surrogates for Phase lag index In-Reply-To: References: Message-ID: This doesn't seem to be mentioning PLI related stuff. Any more descriptive help? B – Bastien Boutonnet, Ph. D. Postdoctoral Research Associate Department of Psychology University of Wisconsin, Madison bastienboutonnet.com On 10 July 2014 09:41, HINDRIKS, RIKKERT wrote: > http://www.vis.caltech.edu/~rodri/papers/PNB.pdf > > > On Wed, Jul 9, 2014 at 10:10 PM, Bastien Boutonnet > wrote: > >> That makes sense. How would you implement phase-randomisation? Is it >> similar to estimating the connectivity between the same pairs of electrodes >> but with data coming from different trials? Or even simpler? >> >> My interest to know about PLI/wPLI however still holds. >> >> B >> >> – >> Bastien Boutonnet, Ph. D. >> Postdoctoral Research Associate >> Department of Psychology >> University of Wisconsin, Madison >> bastienboutonnet.com >> >> >> On 9 July 2014 14:42, HINDRIKS, RIKKERT wrote: >> >>> Constructing surrogate time-series for PLV is more straightforward >>> since, in this case, the nullhypothesis is the absence of phase-locking. >>> Surrogate pairs of time-series can be constructed for example by >>> phase-randomization in the Fourier domain. >>> >>> Rikkert >>> >>> >>> On Wed, Jul 9, 2014 at 9:01 PM, Bastien Boutonnet >>> wrote: >>> >>>> I guess I will tag along to this discussion, in saying that I have been >>>> having the same burning question for a while. >>>> >>>> My issues have been along those lines: when I run some kinds of >>>> connectivity analyses (be it PLI, wPLI or PLV), how do I make sure the >>>> values I obtain are "legal" (or different from 0). >>>> >>>> B >>>> >>>> – >>>> Bastien Boutonnet, Ph. D. >>>> Postdoctoral Research Associate >>>> Department of Psychology >>>> University of Wisconsin, Madison >>>> bastienboutonnet.com >>>> >>>> >>>> On 9 July 2014 13:39, HINDRIKS, RIKKERT >>>> wrote: >>>> >>>>> Hi Lidia, >>>>> >>>>> I have the same question and I don't think the answer is trivial: one >>>>> would have to construct pairs of surrogate time-series under the >>>>> nullhypothesis of zero phase-lag-index. With other words: construct >>>>> pairs of time-series who's instantaneous phases are coupled >>>>> to the same extent as the recorded time-series but with zero lag. In >>>>> my case, the question is how to test for a significant lag via the >>>>> cross-correlation function. >>>>> >>>>> >>>>> Kind regards, >>>>> Rikkert >>>>> >>>>> >>>>> On Wed, Jul 9, 2014 at 8:18 PM, Lidia Mijas >>>>> wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> I am wondering if fieldtrip has any options for computing surrogates? >>>>>> I am tryng to assess confidence level for my Phase Lag Index results >>>>>> ( to determine whether it is significantly larger then 0) >>>>>> >>>>>> But maybe someone has a better idea how to do it? >>>>>> Not sure if it matters so just to mentioned that my PLI was computed >>>>>> at the source level on beamformed signals. >>>>>> >>>>>> Many thanks for any suggestion. >>>>>> >>>>>> Lidia >>>>>> >>>>>> _______________________________________________ >>>>>> fieldtrip mailing list >>>>>> fieldtrip at donders.ru.nl >>>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paymandomorientes at yahoo.com Thu Jul 10 20:23:50 2014 From: paymandomorientes at yahoo.com (paymando- morientes) Date: Thu, 10 Jul 2014 11:23:50 -0700 Subject: [FieldTrip] variable "abort" In-Reply-To: <015201cf9c33$b5a9e830$20fdb890$@herring@fcdonders.ru.nl> References: <1404991355.38752.YahooMailNeo@web141606.mail.bf1.yahoo.com> <015201cf9c33$b5a9e830$20fdb890$@herring@fcdonders.ru.nl> Message-ID: <1405016630.51075.YahooMailNeo@web141604.mail.bf1.yahoo.com> oh sorry  I mistyped it. I meant ft_definetrial. thanks for your help On Thursday, 10 July 2014, 13:40, "Herring, J.D. (Jim)" wrote: Dear Payman,   As far as I can tell there is no function called ft_definevarible, could you please recheck which function is given you problems?   Best,   Jim   From:fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of paymando- morientes Sent: donderdag 10 juli 2014 13:23 To: fieldtrip at science.ru.nl Subject: [FieldTrip] variable "abort"   Dear all I have a problem starting with field trip. When I call "ft_definevarible" function, it throws an error that "abort" variable is not defined. I checked the ".m file" for the function and it says that abort is set by "ft_preamble" function. So where is the problem? Should I change something in my script? or "ft_preamble" function is not doing its job? by the way i hope I am sending this message to the right e-mail.   thanks in advance payman -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Fri Jul 11 02:10:43 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Fri, 11 Jul 2014 00:10:43 +0000 Subject: [FieldTrip] Help with Volume Conduction Model Message-ID: <03FFEDF1-2980-493F-AE57-5FD329D625AF@dartmouth.edu> Hello, I am having trouble with a specific tissue output in the segmentation process. How do I explore the output of the segmentation and look at the voxel-by-voxel assignment of a specific tissue type? Then how do I tweak the parameters and/or edit manually segmentation before making a mesh model? Isaiah Smith From tyler.grummett at flinders.edu.au Fri Jul 11 03:31:11 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Fri, 11 Jul 2014 01:31:11 +0000 Subject: [FieldTrip] Thank you for beamformer help Message-ID: <1405042271282.5143@flinders.edu.au> Hello fieldtrip, I just wanted to thank the following people for helping me with my beamformer issues: Eelke Spaak, Roey Schurr, Matt craddock, Julian Keil and of course Jorn Horschig. For the sake of helping other, I want to collate the help so that it is all in one place. -------------------------------------- With the help of Roey Schurr and Matt craddock I calculated the headmodel as follows: % % load in template files temp = load( fullfile( matlabrootpath, 'Matlab', 'fieldtrip', ... 'template', 'headmodel', 'standard_mri.mat')); mri = temp.mri; clear temp % segment MRI (return probabilistic tissue maps of gray/white/csf % compartments cfg = []; cfg.write = 'no'; cfg.coordsys = 'spm'; cfg.output = { 'scalp', 'skull', 'brain'}; segmentedmri = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'iso2mesh'; cfg.numvertices = 10000; bnd = ft_prepare_mesh( cfg, segmentedmri); % fix mesh [ bnd( 1).pnt, bnd( 1).tri] = meshresample( bnd( 1).pnt, bnd( 1).tri, 1000/size( bnd( 1).pnt, 1)); [ bnd( 2).pnt, bnd( 2).tri] = meshresample( bnd( 2).pnt, bnd( 2).tri, 2000/size( bnd( 2).pnt, 1)); [ bnd( 3).pnt, bnd( 3).tri] = meshresample( bnd( 3).pnt, bnd( 3).tri, 3000/size( bnd( 3).pnt, 1)); for ii = 1:size( bnd), [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'dup'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'isolated'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'deep'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'meshfix'); end % calculate headmodel % reordered to brain skull scalp cfg = []; cfg.method = 'bemcp'; vol = ft_prepare_headmodel(cfg, bnd); clear bnd -------------------------------------- The electrode positions were fixed from literally taking the electrode positions from the template, at first I interpreted Matt's suggestions as using a function to do it. It is very clear that just copying the positions are the way to go. % Get electrode positions from template temp_electrodes = ft_read_sens( fullfile( matlabrootpath, 'Matlab', 'fieldtrip', ... 'template', 'electrode', 'standard_1005.elc')); match = ismember( temp_electrodes.label, data.elec.label); temp_pos = temp_electrodes.chanpos( match, :); data.elec.label = temp_electrodes.label( match); data.elec.chanpos = temp_pos; data.elec.elecpos = data.elec.chanpos; % add LPA RPA and Nasian labels data.elec.label{ end+1} = temp_electrodes.label{ 1}; data.elec.label{ end+1} = temp_electrodes.label{ 2}; data.elec.label{ end+1} = temp_electrodes.label{ 3}; % add LPA RPA and Nasian positions data.elec.chanpos( end+1, :) = temp_electrodes.chanpos( 1, :); data.elec.chanpos( end+1, :) = temp_electrodes.chanpos( 2, :); data.elec.chanpos( end+1, :) = temp_electrodes.chanpos( 3, :); data.elec.elecpos = data.elec.chanpos; -------------------------------------- Then finally the sourcemodel can be calculated: % calculate sourcemodel cfg = []; cfg.mri = mri; cfg.vol = vol; cfg.grid.warpmni = 'yes'; cfg.grid.template = template.sourcemodel; cfg.grid.nonlinear = 'yes'; cfg.moveinward = 1; % actually uses vol mesh cfg.inwardshift = 0; % needs to be expressed to work with moveinward cfg.elec = timelock.elec; sourcemodel = ft_prepare_sourcemodel( cfg); -------------------------------------- Thank you to everyone that has helped me. I gladly appreciate it. Im really sorry for all the emails as well. There will be another coming because the beamformer technique works for 2 datasets (out of four) and I cant work out why it isnt working for two datasets. Kind regards, Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Fri Jul 11 04:17:27 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Fri, 11 Jul 2014 02:17:27 +0000 Subject: [FieldTrip] Beamformer and two different datasets Message-ID: <1405045047076.88142@flinders.edu.au> Hello fieldtrip, As mentioned in my previous email, I had success at calculating beamformer with one dataset but not with another. The dropbox link to dataset1 is: https://www.dropbox.com/s/2nyps8pph7xszf0/Dataset1.mat The dropbox link to dataset2 is: https://www.dropbox.com/s/pkmkdv871y4w67z/Dataset2.mat In the datasets are structured in the following way: datasetx.data datasetx.timelock datasetx.vol datasetx.sourcemodel datasetx.grid datasetx.virtualchans datasetx.sourcemodel2 source wasnt included as it will make the file too big. The following code was used: ------------------------------------------------------------- %% timelock data cfg = []; cfg.channel = 'EEG'; cfg.vartrllength = 2; cfg.covariance = 'yes'; cfg.covariancewindow = 'all'; cfg.keeptrials = 'yes'; timelock = ft_timelockanalysis(cfg, data); ------------------------------------------------------------- %% create headmodel % segment MRI (return probabilistic tissue maps of gray/white/csf % compartments cfg = []; cfg.write = 'no'; cfg.coordsys = 'spm'; cfg.output = { 'scalp', 'skull', 'brain'}; segmentedmri = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'iso2mesh'; cfg.numvertices = 10000; bnd = ft_prepare_mesh( cfg, segmentedmri); % fix mesh [ bnd( 1).pnt, bnd( 1).tri] = meshresample( bnd( 1).pnt, bnd( 1).tri, 1000/size( bnd( 1).pnt, 1)); [ bnd( 2).pnt, bnd( 2).tri] = meshresample( bnd( 2).pnt, bnd( 2).tri, 2000/size( bnd( 2).pnt, 1)); [ bnd( 3).pnt, bnd( 3).tri] = meshresample( bnd( 3).pnt, bnd( 3).tri, 3000/size( bnd( 3).pnt, 1)); for ii = 1:size( bnd), [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'dup'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'isolated'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'deep'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'meshfix'); end % calculate headmodel % reordered to brain skull scalp cfg = []; cfg.method = 'bemcp'; %openmeeg doesnt work with multiple output from ft_volumesegment vol = ft_prepare_headmodel(cfg, bnd); clear bnd ------------------------------------------------------------- %% calculate sourcemodel cfg = []; cfg.mri = mri; cfg.vol = vol; cfg.grid.warpmni = 'yes'; cfg.grid.template = template.sourcemodel; cfg.grid.nonlinear = 'yes'; cfg.moveinward = 1; % actually uses vol mesh cfg.inwardshift = 0; % needs to be expressed to work with moveinward ​cfg.elec = timelock.elec; sourcemodel = ft_prepare_sourcemodel( cfg); ------------------------------------------------------------- %% beamformer calculation % compute lead field cfg = []; cfg.elec = timelock.elec; cfg.vol = vol; cfg.grid = sourcemodel; cfg.reducerank = 3; % 3 for EEG, 2 for MEG cfg.backproject = 'yes'; cfg.normalize = 'yes'; % if you are not contrasting the activity of interest again another condition or baseline time-window grid = ft_prepare_leadfield( cfg, timelock); % Source Analysis: without contrasting condition cfg = []; cfg.channel = 'EEG'; cfg.method = 'lcmv'; cfg.grid = grid; cfg.vol = vol; cfg.keepfilter = 'yes'; cfg.lcmv.fixedori = 'yes'; % project on axis of most variance using SVD source = ft_sourceanalysis( cfg, timelock); ------------------------------------------------------------- %% map beamformer source locations onto an anatomical label in an atlas cfg = []; cfg.interpmethod = 'nearest'; cfg.parameter = 'tissue'; sourcemodel2 = ft_sourceinterpolate( cfg, atlas, sourcemodel); ------------------------------------------------------------- %% compute virtual channels % start building vchan vchan = []; label = lower( atlas.tissuelabel); label = label( 1:90); vchan.time = data.time; vchan.fsample = data.fsample; Ntr = numel( data.trial); vchan.trial = cell( 1, Ntr); % find sensor names and indices chans = ft_channelselection( 'EEG', data.label); chans = match_str( data.label, chans); count = 1; tic for i = 1:numel( label), atlas_sources = find( sourcemodel2.tissue == i); ai = ismember( atlas_sources, find( sourcemodel.inside)); bregion_sources = atlas_sources( ai); clear atlas_sources if isempty( bregion_sources), continue; end for f = 1:numel( bregion_sources), source_inx = bregion_sources( f); dipole_data = cell( 1, Ntr); % multiply spatial filter (3,Nchan) by the original data if isempty( source.avg.filter{ source_inx}), continue; end for tr = 1:Ntr, dipole_data{ tr} = source.avg.filter{ source_inx} * data.trial{ tr}(chans,:); end % concatenate data, run svd on data, multiple data by the % orientation of the dipole in which it is strongest time_series = cat( 2, dipole_data{ :}); [ U1, ~, ~] = svd( time_series, 'econ'); % u is the spatial decomposition, v the temporal and s the eigenvalues along diagonal for tr = 1:Ntr, % tt.trial{ tr}( f, :) = U1( :, 1)' * dipole_data{ tr}; tt.trial{ tr}( f, :) = dipole_data{ tr}; end clear source_inx dipole_data U1 timeseries end % mean channels with brain region for tr = 1:Ntr, vchan.trial{ tr}( i, :) = mean( tt.trial{ tr}); end % include position and power for each source vchan.label( count) = label( i); fprintf( 'created virtual channel %d\n', count); count = count + 1; clear tt U S sv si temp_data bregion_sources bregion_source end cfg = []; vchan = ft_preprocessing( cfg, vchan); -------------------------------------------------------------​ I will greatly appreciate the help once again. As beamformer is the basically the key element of my Phd I really want it to get it working. Kind regards, Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ali.b.sharif at gmail.com Fri Jul 11 11:43:41 2014 From: ali.b.sharif at gmail.com (Ali Bahramisharif) Date: Fri, 11 Jul 2014 11:43:41 +0200 Subject: [FieldTrip] problem with ft_checkconfig Message-ID: Hi , I have a problem with ft_spike_waveform. When I run it, it gives me the following error: Error using ==> ft_checkconfig at 205 The field cfg.progress is not allowed I debuged the code a bit and it seems to me that 'progress' should be added to the list of 'allowed' in line 192-200 of ft_checkconfing. Would this be a solution? The point is that the global variable 'ft_default' does have a field called 'progress'. I do not know where it is initiated, but it looks like it should be allowed. Ali -------------- next part -------------- An HTML attachment was scrubbed... URL: From deadala at freenet.de Fri Jul 11 16:54:36 2014 From: deadala at freenet.de (deadala at freenet.de) Date: Fri, 11 Jul 2014 16:54:36 +0200 Subject: [FieldTrip] LCMV beamformer Message-ID: <5d4dceb1960c51cebf30bf52824209fd@email.freenet.de> Dear all   I am currently using the LCMV beamformer (beamformer_lcmv.m) with my own data.   Your function: beamformer_lcmv(dip, grad, vol, dat, Cy, varargin)   My input:   dip  - structure array, with fields:   - pos            Nx3 array (N- sources)                                                   - inside         1xN array                                                   - outside       empty (all sources inside)                                                   - leadfield     1xN cell array with 1xM arrays (M- channels)   grad  - empty  -> because I am using my own leadfield vol  -  empty  -> because I am using my own leadfield dat  - MxS array (S- samples) Cy  -  MxM array   The problem:   I want to check my own implementation of LCMV beamformer against MNE (software) an your LCMV beamformer with similar data ( measurement, leadfield, data covariance). The MNE and my own beamformer show the same activity of sources. But your LCMV beamformer calculates activities on other places in the brain.   My question: What I am doing wrong? Are the input arguments false or the numbers of sources change?   Thanks in advance for the help. Diana   --- Alle Postfächer an einem Ort. Jetzt wechseln und E-Mail-Adresse mitnehmen! Rundum glücklich mit freenetMail -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauer.mpih at googlemail.com Fri Jul 11 21:30:55 2014 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Fri, 11 Jul 2014 21:30:55 +0200 Subject: [FieldTrip] Job in Glasgow Message-ID: dear all, please find below a job-ad from peter uhlhaas at the university of glasgow. best, andreas Anfang der weitergeleiteten E‑Mail: University of Glasgow College of Medical, Veterinary and Life Sciences Research Institute of Neuroscience and Psychology Research Assistant / Associate Ref: M00563 Grade 6/7: £26,527 - £29,837 / £32,590 - £36,661 per annum You will contribute to a project entitled “Magnetoencephalography and Clinical Research in Schizophrenia”. Specifically, the job requires the analysis and acquisition of MEG-data sets and implementation of novel analytic tools, contributing to the design and programming of MEG experiments, recruiting and running the participants, assisting in analysing the results, and participating in the writing up of the results. With extensive, up-to-date practical knowledge in MEG or EEG, you will have excellent knowledge of source-localization, Matlab and experimental control software. This post is funded for 2 years Informal enquires to Dr Peter Uhlhaas (Email: Peter.Uhlhaas at glasgow.ac.uk< mailto:Peter.Uhlhaas at glasgow.ac.uk >; Tel: 0141 330 8730) Apply online at: www.gla.ac.uk/jobs Closing date: 11st of August 2014 The University has recently been awarded the Athena SWAN Institutional Bronze Award The University is committed to equality of opportunity in employment. The University of Glasgow, charity number SC004401. Dr. Peter J. Uhlhaas Reader Institute for Neuroscience and Psychology University of Glasgow 58 Hillhead Street Glasgow G12 8QB Telephone +44 (0)141 330 8730 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Mon Jul 14 23:28:59 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Mon, 14 Jul 2014 21:28:59 +0000 Subject: [FieldTrip] Editing Vertices of Scalp Manually or Automatically Message-ID: <4B7DB9E9-8F86-4323-8C32-C444ED97F84C@dartmouth.edu> Hello Everyone, I am having a problem with noise appearing in my volume conduction model. There are a few horn-like images on the head, and a cluster of vertices in the area where a neck would normally appear but the MRI was only of the upper half of someone's head so it should not be appearing either. I am running into a wall when I try to edit manually because the data so large I cannot view it. Please, I have been trying to fix this for a while does anyone have any ideas on how to get rid of these extraneous points: whether manually or by shifting parameters in the segmentation process? Your help would be extremely helpful and greatly appreciated. This is an image of the problem described. [cid:22E46479-BCE2-415D-B591-A53EE4F23A57] Kind Regards, Isaiah *************************** Isaiah Smith ( Dartmouth Undergraduate) UCLA California NanoSystems Institute Summer Intern University of California Los Angeles Dr. Wentai Liu’s Biomimetics Lab Rm 5311 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-14 at 2.21.48 PM.png Type: image/png Size: 163254 bytes Desc: Screen Shot 2014-07-14 at 2.21.48 PM.png URL: From a.stolk at fcdonders.ru.nl Mon Jul 14 23:46:34 2014 From: a.stolk at fcdonders.ru.nl (Stolk, A. (Arjen)) Date: Mon, 14 Jul 2014 23:46:34 +0200 (CEST) Subject: [FieldTrip] Editing Vertices of Scalp Manually or Automatically In-Reply-To: <4B7DB9E9-8F86-4323-8C32-C444ED97F84C@dartmouth.edu> Message-ID: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> Hi Isaiah, It could be that your problem is caused by your structural scan containing voxels outside the head but with levels of intensity falling in the range of that attributed to, say, csf. One way to check is by plotting the respective segmented brain mask, e.g. mri.pow = seg.csf cfg.funparameter = 'pow' ft_sourceplot(cfg,mri) You could then try and manually include certain voxels by playing with the inclusion threshold (e.g. set seg.csf with voxelvalues smaller than .99 to 0). This would allow to work around that problem, unless those voxels have exactly the same intensity as csf. Hope this helps narrowing the origin of your problem, Arjen ----- Oorspronkelijk bericht ----- > Van: "Isaiah C. Smith" > Aan: fieldtrip at science.ru.nl > Verzonden: Maandag 14 juli 2014 23:28:59 > Onderwerp: [FieldTrip] Editing Vertices of Scalp Manually or > Automatically > Hello Everyone, > I am having a problem with noise appearing in my volume conduction > model. There are a few horn-like images on the head, and a cluster of > vertices in the area where a neck would normally appear but the MRI > was only of the upper half of someone's head so it should not be > appearing either. I am running into a wall when I try to edit manually > because the data so large I cannot view it. Please, I have been trying > to fix this for a while does anyone have any ideas on how to get rid > of these extraneous points: whether manually or by shifting parameters > in the segmentation process? Your help would be extremely helpful and > greatly appreciated. > This is an image of the problem described. > Kind Regards, > Isaiah > *************************** > Isaiah Smith ( Dartmouth Undergraduate) > UCLA California NanoSystems Institute Summer Intern > University of California Los Angeles > Dr. Wentai Liu’s Biomimetics Lab > Rm 5311 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-14 at 2.21.48 PM.png Type: image/png Size: 163254 bytes Desc: Screen Shot 2014-07-14 at 2.21.48 PM.png URL: From Isaiah.C.Smith.17 at dartmouth.edu Tue Jul 15 00:47:58 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Mon, 14 Jul 2014 22:47:58 +0000 Subject: [FieldTrip] Editing Vertices of Scalp Manually or Automatically In-Reply-To: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> References: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <12B921FB-8A45-4640-A179-91FEB53EAFCD@dartmouth.edu> Thanks Arjen, I was able to bring up the source plot of the the scalp using: >> cfg.funparameter=‘scalp'; >> ft_sourceplot(cfg,segmentedmri) Results: [cid:FDB296FB-69C3-4B3E-A19D-214F52DDE76E] Could you please explain how to create/adjust the inclusion threshold? Sorry, I am a little new to the fieldtrip functions. Isaiah On Jul 14, 2014, at 2:46 PM, Stolk, A. (Arjen) > wrote: Hi Isaiah, It could be that your problem is caused by your structural scan containing voxels outside the head but with levels of intensity falling in the range of that attributed to, say, csf. One way to check is by plotting the respective segmented brain mask, e.g. mri.pow = seg.csf cfg.funparameter = 'pow' ft_sourceplot(cfg,mri) You could then try and manually include certain voxels by playing with the inclusion threshold (e.g. set seg.csf with voxelvalues smaller than .99 to 0). This would allow to work around that problem, unless those voxels have exactly the same intensity as csf. Hope this helps narrowing the origin of your problem, Arjen ________________________________ Van: "Isaiah C. Smith" > Aan: fieldtrip at science.ru.nl Verzonden: Maandag 14 juli 2014 23:28:59 Onderwerp: [FieldTrip] Editing Vertices of Scalp Manually or Automatically Hello Everyone, I am having a problem with noise appearing in my volume conduction model. There are a few horn-like images on the head, and a cluster of vertices in the area where a neck would normally appear but the MRI was only of the upper half of someone's head so it should not be appearing either. I am running into a wall when I try to edit manually because the data so large I cannot view it. Please, I have been trying to fix this for a while does anyone have any ideas on how to get rid of these extraneous points: whether manually or by shifting parameters in the segmentation process? Your help would be extremely helpful and greatly appreciated. This is an image of the problem described. Kind Regards, Isaiah *************************** Isaiah Smith ( Dartmouth Undergraduate) UCLA California NanoSystems Institute Summer Intern University of California Los Angeles Dr. Wentai Liu’s Biomimetics Lab Rm 5311 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-14 at 3.44.14 PM.png Type: image/png Size: 51597 bytes Desc: Screen Shot 2014-07-14 at 3.44.14 PM.png URL: From Isaiah.C.Smith.17 at dartmouth.edu Tue Jul 15 03:39:47 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Tue, 15 Jul 2014 01:39:47 +0000 Subject: [FieldTrip] Inclusion Threshold Message-ID: <038F985A-6BFB-43EB-AD9A-AECC295A3834@dartmouth.edu> Hello Everyone, Could someone please explain how to create/adjust the inclusion threshold in the segmentation process? It would be greatly appreciated. Isaiah Smith From jan.schoffelen at donders.ru.nl Tue Jul 15 09:34:23 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 15 Jul 2014 09:34:23 +0200 Subject: [FieldTrip] Editing Vertices of Scalp Manually or Automatically In-Reply-To: <12B921FB-8A45-4640-A179-91FEB53EAFCD@dartmouth.edu> References: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> <12B921FB-8A45-4640-A179-91FEB53EAFCD@dartmouth.edu> Message-ID: <1F212744-34A2-474F-8AAE-F23A498240D0@donders.ru.nl> Isaiah, Image segmentation algorithms work by thresholding an image (which has optionally been subjected to a sequence of image processing steps) at a sensible threshold, creating a binary image (i.e. consisting only of 0 and 1s). Then, in order to generate a surface description of e.g. the scalp, a triangulation is created that describes the boundary from 0 to 1, assuming the voxels with a value of 1 to lie within a single compartment. In your scalp mesh, the ‘horns’ are most likely caused by voxels with a supra threshold intensity value. After thresholding, the binary volume consists of multiple disconnected ‘blobs’, and the triangulation algorithm connects the points at the boundaries of these individual islands. Thus, in your case, the default image processing steps (which actually aim at generating a single compartment (by keeping the largest connected compartment, and throwing away the smaller islands) have failed. This may be caused by the fact that these islands lie at the edge of your image. If you don’t feel comfortable with editing the volumetric image yourself I suggest that you play with the cfg.scalpsmooth and cfg.scalpthreshold parameters prior to calling ft_volumesegment. I would start by increasing the scalpthreshold (the default value is 0.1, but you can try 0.3, or 0.5, or any value you fancy). Finally, please note that everybody who spends his/her valuable time on answering questions on this discussion list is doing so on a voluntary basis. Be aware that multiple postings of the same question does not necessary enhance people’s inclination to answer, although I realize fully well that it may be frustrating if you are stuck. Best wishes, Jan-Mathijs On Jul 15, 2014, at 12:47 AM, Isaiah C. Smith wrote: > Thanks Arjen, > > I was able to bring up the source plot of the the scalp using: > >> cfg.funparameter=‘scalp'; > >> ft_sourceplot(cfg,segmentedmri) > Results: > > Could you please explain how to create/adjust the inclusion threshold? Sorry, I am a little new to the fieldtrip functions. > > Isaiah > > On Jul 14, 2014, at 2:46 PM, Stolk, A. (Arjen) wrote: > >> Hi Isaiah, >> >> It could be that your problem is caused by your structural scan containing voxels outside the head but with levels of intensity falling in the range of that attributed to, say, csf. One way to check is by plotting the respective segmented brain mask, e.g. >> >> mri.pow = seg.csf >> cfg.funparameter = 'pow' >> ft_sourceplot(cfg,mri) >> >> You could then try and manually include certain voxels by playing with the inclusion threshold (e.g. set seg.csf with voxelvalues smaller than .99 to 0). This would allow to work around that problem, unless those voxels have exactly the same intensity as csf. >> >> Hope this helps narrowing the origin of your problem, >> Arjen >> >> >> >> Van: "Isaiah C. Smith" >> Aan: fieldtrip at science.ru.nl >> Verzonden: Maandag 14 juli 2014 23:28:59 >> Onderwerp: [FieldTrip] Editing Vertices of Scalp Manually or Automatically >> >> Hello Everyone, >> >> I am having a problem with noise appearing in my volume conduction model. There are a few horn-like images on the head, and a cluster of vertices in the area where a neck would normally appear but the MRI was only of the upper half of someone's head so it should not be appearing either. I am running into a wall when I try to edit manually because the data so large I cannot view it. Please, I have been trying to fix this for a while does anyone have any ideas on how to get rid of these extraneous points: whether manually or by shifting parameters in the segmentation process? Your help would be extremely helpful and greatly appreciated. >> >> This is an image of the problem described. >> >> >> Kind Regards, >> >> Isaiah >> >> *************************** >> Isaiah Smith ( Dartmouth Undergraduate) >> UCLA California NanoSystems Institute Summer Intern >> University of California Los Angeles >> Dr. Wentai Liu’s Biomimetics Lab >> Rm 5311 >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> -- >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> >> Email: a.stolk at donders.ru.nl >> Phone: +31(0)243 68294 >> Web: www.arjenstolk.nl >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jul 15 12:18:37 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 15 Jul 2014 10:18:37 +0000 Subject: [FieldTrip] Pop_cleanline (eeglab) and beamformer Message-ID: Hello fieldtrippers who use eeglab, If you're planning on beamformer your data, ensure that the data hasn't been cleanlined (pop_cleanline by Tim Mullen). Trust me when I say that it will not prove your results if you cleanline beforehand, it makes life a lot worse. Once again a thank you to the beamformer helpers mentioned in a previous email. Please disregard my old email if any of you were trying to solve it (I appreciate it though). The reason for it not working is the aforementioned cleanline. Kind regards, Tyler From f.roux at bcbl.eu Tue Jul 15 17:40:50 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Tue, 15 Jul 2014 17:40:50 +0200 (CEST) Subject: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data Message-ID: <468321985.2552096.1405438850636.JavaMail.root@bcbl.eu> Dear all, I would like to ask if anyone has ever tried to speed up the ft_statistics_montecarlo function by using Matlab's parallel computing toolbox ? I would like to run clusterstatistics on time-frequency data, but as a result of the large number of time and frequency bins, the function runs very slowly. So I was thinking to try and modify the code by running the loops over the frequency bins in parallel and see if that could save some time. Before starting to adapt the code on my own, however, I wanted to ask if anyone had ever tried that and also if there could be any possible reasons which would make that this is not a feasible project. Any thoughts or suggestions would be highly appreciated. Best, Fred --------------------------------------------------------------------------- From mcantor at umich.edu Tue Jul 15 19:26:33 2014 From: mcantor at umich.edu (Max Cantor) Date: Tue, 15 Jul 2014 13:26:33 -0400 Subject: [FieldTrip] Common Filters Question Message-ID: In the main beamformer tutorial ( http://fieldtrip.fcdonders.nl/tutorial/beamformer), the common filter is computed as follows: cfg.grid.filter = sourceAll.avg.filter; sourcePre_con = ft_sourceanalysis(cfg, freqPre ); sourcePost_con = ft_sourceanalysis(cfg, freqPost); However, in the separate common filters example script ( http://fieldtrip.fcdonders.nl/example/common_filters_in_beamforming), the common filter is much more complex. I've created working versions of both common filters for DICS, as well as a working version of the 'simple' common filter for LCMV. I have a version of the 'complex' common filter that should work, but it usually chews up my computer's RAM (I have 16gb) and crashes matlab. The DICS one is also slow, but not so bad that it crashes. However, I couldn't imagine running it on all my datasets and being able to do any stats on the data without my computer crashing. Before I post the code to see if maybe there is something wrong with it causing the memory overloads, I was wondering if anyone could explain to me what exactly the differences between the two methods are, and if it is even necessary for me to get the more complex common filter working? The simple common filters seem to work fine, but they could be affecting the data in ways that are not obvious, so I want to make sure. As always, thank you Fieldtrippers -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Tue Jul 15 23:57:29 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Tue, 15 Jul 2014 21:57:29 +0000 Subject: [FieldTrip] Editing Vertices of Scalp Manually or Automatically In-Reply-To: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> References: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <208DD306-6B0F-480E-9A15-9D925FE7B4F6@dartmouth.edu> Thank you so much for your reply Arjen, I was wondering if there is there any solution in the interface where we can automatically exclude some unwanted point? In the segmentation process? Or in a later process? When I change the threshold I get an error message concerning the final steps in creating the head model. Isaiah Smith On Jul 14, 2014, at 2:46 PM, Stolk, A. (Arjen) > wrote: Hi Isaiah, It could be that your problem is caused by your structural scan containing voxels outside the head but with levels of intensity falling in the range of that attributed to, say, csf. One way to check is by plotting the respective segmented brain mask, e.g. mri.pow = seg.csf cfg.funparameter = 'pow' ft_sourceplot(cfg,mri) You could then try and manually include certain voxels by playing with the inclusion threshold (e.g. set seg.csf with voxelvalues smaller than .99 to 0). This would allow to work around that problem, unless those voxels have exactly the same intensity as csf. Hope this helps narrowing the origin of your problem, Arjen ________________________________ Van: "Isaiah C. Smith" > Aan: fieldtrip at science.ru.nl Verzonden: Maandag 14 juli 2014 23:28:59 Onderwerp: [FieldTrip] Editing Vertices of Scalp Manually or Automatically Hello Everyone, I am having a problem with noise appearing in my volume conduction model. There are a few horn-like images on the head, and a cluster of vertices in the area where a neck would normally appear but the MRI was only of the upper half of someone's head so it should not be appearing either. I am running into a wall when I try to edit manually because the data so large I cannot view it. Please, I have been trying to fix this for a while does anyone have any ideas on how to get rid of these extraneous points: whether manually or by shifting parameters in the segmentation process? Your help would be extremely helpful and greatly appreciated. This is an image of the problem described. Kind Regards, Isaiah *************************** Isaiah Smith ( Dartmouth Undergraduate) UCLA California NanoSystems Institute Summer Intern University of California Los Angeles Dr. Wentai Liu’s Biomimetics Lab Rm 5311 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Wed Jul 16 00:13:13 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Tue, 15 Jul 2014 22:13:13 +0000 Subject: [FieldTrip] Editing Vertices of Scalp Manually or Automatically In-Reply-To: <208DD306-6B0F-480E-9A15-9D925FE7B4F6@dartmouth.edu> References: <98339591.7921153.1405374394137.JavaMail.root@sculptor.zimbra.ru.nl> <208DD306-6B0F-480E-9A15-9D925FE7B4F6@dartmouth.edu> Message-ID: <37138409-0293-4095-9F81-43FF91B6398A@dartmouth.edu> [cid:6DCD99BF-1FEB-4B85-90B8-E1368132E32C at host.ucla.edu]On I should probably show you the MRI as well. The reason as to why I am so confused is that there are no points below and still the neck-like image shows up. I cannot find any variation in intensity at all. Is there any explanation for this occurrence? Thanks once again. Isaiah Jul 15, 2014, at 2:57 PM, Isaiah C. Smith > wrote: Thank you so much for your reply Arjen, I was wondering if there is there any solution in the interface where we can automatically exclude some unwanted point? In the segmentation process? Or in a later process? When I change the threshold I get an error message concerning the final steps in creating the head model. Isaiah Smith On Jul 14, 2014, at 2:46 PM, Stolk, A. (Arjen) > wrote: Hi Isaiah, It could be that your problem is caused by your structural scan containing voxels outside the head but with levels of intensity falling in the range of that attributed to, say, csf. One way to check is by plotting the respective segmented brain mask, e.g. mri.pow = seg.csf cfg.funparameter = 'pow' ft_sourceplot(cfg,mri) You could then try and manually include certain voxels by playing with the inclusion threshold (e.g. set seg.csf with voxelvalues smaller than .99 to 0). This would allow to work around that problem, unless those voxels have exactly the same intensity as csf. Hope this helps narrowing the origin of your problem, Arjen ________________________________ Van: "Isaiah C. Smith" > Aan: fieldtrip at science.ru.nl Verzonden: Maandag 14 juli 2014 23:28:59 Onderwerp: [FieldTrip] Editing Vertices of Scalp Manually or Automatically Hello Everyone, I am having a problem with noise appearing in my volume conduction model. There are a few horn-like images on the head, and a cluster of vertices in the area where a neck would normally appear but the MRI was only of the upper half of someone's head so it should not be appearing either. I am running into a wall when I try to edit manually because the data so large I cannot view it. Please, I have been trying to fix this for a while does anyone have any ideas on how to get rid of these extraneous points: whether manually or by shifting parameters in the segmentation process? Your help would be extremely helpful and greatly appreciated. This is an image of the problem described. Kind Regards, Isaiah *************************** Isaiah Smith ( Dartmouth Undergraduate) UCLA California NanoSystems Institute Summer Intern University of California Los Angeles Dr. Wentai Liu’s Biomimetics Lab Rm 5311 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-15 at 3.05.07 PM.png Type: image/png Size: 180396 bytes Desc: Screen Shot 2014-07-15 at 3.05.07 PM.png URL: From jan.schoffelen at donders.ru.nl Wed Jul 16 09:12:59 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 16 Jul 2014 09:12:59 +0200 Subject: [FieldTrip] Common Filters Question In-Reply-To: References: Message-ID: Dear Max, I checked out both snippets of code (on the tutorial page and on the example page), and to me it seems that you should be able to get away with what you call the ‘simple common filter’. The code on the example page to me looks unnecessarily complicated (apart from the fact that it is incomplete), and seems to be designed to first create a single trial representation of the data in source space, before averaging across the trials that pertain to a certain experimental condition. If, as I suspect it to be so in your case, one is only interested in computing a per condition average in source space (in order to be able to do statistical inference across a group of subjects), computing and using the common spatial filter as per the tutorial should do the trick. I guess that the person who wrote the example code for some reason wanted to have access to the single trial source data (as per point 3 in the section ‘how to do this in fieldtrip’ on the example script page). Projection of single trial data to the source level indeed blows up memory requirements, and may only be necessary in certain non-standard cases. I think it would be good to make this more explicit on the example page (thanks for spotting it!). Would you mind helping out with this? It’s a wiki after all ;-), and the example code is allowed to be adjusted/extended. I suggest that we adjust the page a bit so that we make explicit that we can reconstruct single trial data if needed (for this we only need to make the example code correct), but that in most cases we can work with averages across trials (for this we need to add a section that more or less duplicates the creation of the ‘simple’ complex filter). The way we usually tackle this is by creating a ‘bug’ out of this (or rather an issue) on our bugzilla.fcdonders.nl issue-tracking system to make an action list and to keep track of who’s doing what. Best wishes, Jan-Mathijs On Jul 15, 2014, at 7:26 PM, Max Cantor wrote: > In the main beamformer tutorial (http://fieldtrip.fcdonders.nl/tutorial/beamformer), the common filter is computed as follows: > > cfg.grid.filter = sourceAll.avg.filter; > sourcePre_con = ft_sourceanalysis(cfg, freqPre ); > sourcePost_con = ft_sourceanalysis(cfg, freqPost); > However, in the separate common filters example script (http://fieldtrip.fcdonders.nl/example/common_filters_in_beamforming), the common filter is much more complex. > > I've created working versions of both common filters for DICS, as well as a working version of the 'simple' common filter for LCMV. I have a version of the 'complex' common filter that should work, but it usually chews up my computer's RAM (I have 16gb) and crashes matlab. The DICS one is also slow, but not so bad that it crashes. However, I couldn't imagine running it on all my datasets and being able to do any stats on the data without my computer crashing. > > Before I post the code to see if maybe there is something wrong with it causing the memory overloads, I was wondering if anyone could explain to me what exactly the differences between the two methods are, and if it is even necessary for me to get the more complex common filter working? The simple common filters seem to work fine, but they could be affecting the data in ways that are not obvious, so I want to make sure. > > As always, thank you Fieldtrippers > > -- > Max Cantor > Lab Manager > Computational Neurolinguistics Lab > University of Michigan > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Jul 16 09:39:03 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 16 Jul 2014 09:39:03 +0200 Subject: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data In-Reply-To: <468321985.2552096.1405438850636.JavaMail.root@bcbl.eu> References: <468321985.2552096.1405438850636.JavaMail.root@bcbl.eu> Message-ID: Hi Fred, Some time ago, I replaced parts of the clustering routine with a mex-file. For me this greatly sped up the cluster stats. I guess you are using a fairly recent (<1yr old) FT version? The platform you're using might also be relevant, I just noticed that the mex-file (private/combineClusters.mex*) is distributed in compiled form only for Linux 64 and Windows 32/64 bit. If you're e.g. on a Macintosh, you could compile it yourself from the src/combineClusters.cpp source file. I know of no attempts to parallelise the clustering code. Best, Eelke On 15 July 2014 17:40, Frédéric Roux wrote: > Dear all, > > I would like to ask if anyone has ever tried to speed up the ft_statistics_montecarlo function > by using Matlab's parallel computing toolbox ? > > I would like to run clusterstatistics on time-frequency data, but as a result of the large number > of time and frequency bins, the function runs very slowly. So I was thinking to try and modify > the code by running the loops over the frequency bins in parallel and see if that could save > some time. > > Before starting to adapt the code on my own, however, I wanted to ask if anyone had ever tried that > and also if there could be any possible reasons which would make that this is not a feasible project. > > Any thoughts or suggestions would be highly appreciated. > > Best, > Fred > > > --------------------------------------------------------------------------- > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eijlers at rsm.nl Wed Jul 16 13:38:17 2014 From: eijlers at rsm.nl (Esther Eijlers) Date: Wed, 16 Jul 2014 11:38:17 +0000 Subject: [FieldTrip] Effect size measure for cluster-based permutation tests Message-ID: Dear all, I’m using the cluster-based permutation tests (on time-frequency data), and was wondering if it makes sense and how to come up with an effect size measure that is easy to evaluate. Maybe the clusterstat is giving an indication; but I guess it’s not a standardised measure and therefore hard to evaluate? Thank you in advance. Best, Esther -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Wed Jul 16 15:06:04 2014 From: mcantor at umich.edu (Max Cantor) Date: Wed, 16 Jul 2014 09:06:04 -0400 Subject: [FieldTrip] Common Filters Question In-Reply-To: References: Message-ID: Ok, I thought something along those lines might be the case, but I just wanted to make sure. I've never used bugzilla before but I'm sure I can figure it out, and I'd be glad to help! Thanks Jan-Mathijs, Max On Wed, Jul 16, 2014 at 3:12 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Dear Max, > > I checked out both snippets of code (on the tutorial page and on the > example page), and to me it seems that you should be able to get away with > what you call the ‘simple common filter’. The code on the example page to > me looks unnecessarily complicated (apart from the fact that it is > incomplete), and seems to be designed to first create a single trial > representation of the data in source space, before averaging across the > trials that pertain to a certain experimental condition. If, as I suspect > it to be so in your case, one is only interested in computing a per > condition average in source space (in order to be able to do statistical > inference across a group of subjects), computing and using the common > spatial filter as per the tutorial should do the trick. > I guess that the person who wrote the example code for some reason wanted > to have access to the single trial source data (as per point 3 in the > section ‘how to do this in fieldtrip’ on the example script page). > Projection of single trial data to the source level indeed blows up memory > requirements, and may only be necessary in certain non-standard cases. I > think it would be good to make this more explicit on the example page > (thanks for spotting it!). Would you mind helping out with this? It’s a > wiki after all ;-), and the example code is allowed to be > adjusted/extended. I suggest that we adjust the page a bit so that we make > explicit that we can reconstruct single trial data if needed (for this we > only need to make the example code correct), but that in most cases we can > work with averages across trials (for this we need to add a section that > more or less duplicates the creation of the ‘simple’ complex filter). The > way we usually tackle this is by creating a ‘bug’ out of this (or rather an > issue) on our bugzilla.fcdonders.nl issue-tracking system to make an > action list and to keep track of who’s doing what. > > Best wishes, > Jan-Mathijs > > > On Jul 15, 2014, at 7:26 PM, Max Cantor wrote: > > In the main beamformer tutorial ( > http://fieldtrip.fcdonders.nl/tutorial/beamformer), the common filter is > computed as follows: > > cfg.grid.filter = sourceAll.avg.filter; > sourcePre_con = ft_sourceanalysis(cfg, freqPre ); > sourcePost_con = ft_sourceanalysis(cfg, freqPost); > > However, in the separate common filters example script ( > http://fieldtrip.fcdonders.nl/example/common_filters_in_beamforming), the > common filter is much more complex. > > I've created working versions of both common filters for DICS, as well as > a working version of the 'simple' common filter for LCMV. I have a version > of the 'complex' common filter that should work, but it usually chews up my > computer's RAM (I have 16gb) and crashes matlab. The DICS one is also slow, > but not so bad that it crashes. However, I couldn't imagine running it on > all my datasets and being able to do any stats on the data without my > computer crashing. > > Before I post the code to see if maybe there is something wrong with it > causing the memory overloads, I was wondering if anyone could explain to me > what exactly the differences between the two methods are, and if it is even > necessary for me to get the more complex common filter working? The simple > common filters seem to work fine, but they could be affecting the data in > ways that are not obvious, so I want to make sure. > > As always, thank you Fieldtrippers > > -- > Max Cantor > Lab Manager > Computational Neurolinguistics Lab > University of Michigan > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Wed Jul 16 15:07:36 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Wed, 16 Jul 2014 15:07:36 +0200 (CEST) Subject: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data In-Reply-To: Message-ID: <171511570.2562741.1405516056153.JavaMail.root@bcbl.eu> Hi Eelke, thanks for your response - that sounds promising. I am running fieldtrip-20140527 on a 64 bit Linux server, so I'd be keen to give your suggestion a try. This is actually the first time I am calling mex-files using Matlab, but I assume that the way to go is to comment out the part of the code in ft_findcluster that combines the cluster and to call the mex-file instead? If yes, here is what I did: I copied the combineClusters.mexa64 file into a spearate folder and added that folder to my Matlab path. % combine clusters that are connected in neighbouring channel(s) % (combinations). Convert inputs to uint32 as that is required by the mex % file (and the values will be positive integers anyway). addpath('/path2home/mex/'); cluster = combineClusters(uint32(labelmat), logical(spatdimneighbstructmat), uint32(total)); I am not sure however how to call the mex function. Is this done automatically or do I need to add some further steps? May I ask you which approach you are using? Best, Fred Frédéric Roux ----- Original Message ----- From: "Eelke Spaak" To: "FieldTrip discussion list" Sent: Wednesday, July 16, 2014 9:39:03 AM Subject: Re: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data Hi Fred, Some time ago, I replaced parts of the clustering routine with a mex-file. For me this greatly sped up the cluster stats. I guess you are using a fairly recent (<1yr old) FT version? The platform you're using might also be relevant, I just noticed that the mex-file (private/combineClusters.mex*) is distributed in compiled form only for Linux 64 and Windows 32/64 bit. If you're e.g. on a Macintosh, you could compile it yourself from the src/combineClusters.cpp source file. I know of no attempts to parallelise the clustering code. Best, Eelke On 15 July 2014 17:40, Frédéric Roux wrote: > Dear all, > > I would like to ask if anyone has ever tried to speed up the ft_statistics_montecarlo function > by using Matlab's parallel computing toolbox ? > > I would like to run clusterstatistics on time-frequency data, but as a result of the large number > of time and frequency bins, the function runs very slowly. So I was thinking to try and modify > the code by running the loops over the frequency bins in parallel and see if that could save > some time. > > Before starting to adapt the code on my own, however, I wanted to ask if anyone had ever tried that > and also if there could be any possible reasons which would make that this is not a feasible project. > > Any thoughts or suggestions would be highly appreciated. > > Best, > Fred > > > --------------------------------------------------------------------------- > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hweeling.lee at gmail.com Thu Jul 17 13:26:59 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 17 Jul 2014 13:26:59 +0200 Subject: [FieldTrip] testing if power is significantly different from zero Message-ID: Hi all, I have a naive question regarding cluster statistics in fieldtrip. Is it possible to run a statistical analysis to test if power is significantly different from zero? If so, how do I build the design matrix for this case? Thanks. Cheers, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.lam at fcdonders.ru.nl Thu Jul 17 13:56:35 2014 From: n.lam at fcdonders.ru.nl (Lam, Nietzsche) Date: Thu, 17 Jul 2014 13:56:35 +0200 (CEST) Subject: [FieldTrip] testing if power is significantly different from zero In-Reply-To: Message-ID: <613650745.758220.1405598195481.JavaMail.root@indus.zimbra.ru.nl> Hi Hweeling, I think the approach is similar to testing two different conditions. I have a suggestion below, but I think some people would argue that this is not a good way to do the test. You can keep the design matrix the same as comparing two conditions, but for the "zero" condition, you will turn this all into zeros. dat1.powspctrm = %power from your condition of interest dat2 = dat1 % your "zero" condition" dat2.powspctrm(:) = 0; % making the data structure identical to condition of interest but everything is zero. Then call your statistics function as before. Perhaps someone else can give you more detail on this. Nietzsche ----- Original Message ----- > From: "Hwee Ling Lee" > To: "FieldTrip discussion list" > Sent: Thursday, 17 July, 2014 1:26:59 PM > Subject: [FieldTrip] testing if power is significantly different from zero > Hi all, > > > I have a naive question regarding cluster statistics in fieldtrip. > > > Is it possible to run a statistical analysis to test if power is > significantly different from zero? If so, how do I build the design > matrix for this case? > > > Thanks. > > > Cheers, > Hweeling > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Nietzsche H.L. Lam, MSc PhD Candidate Max Planck Institute for Psycholinguistics Wundtlaan 1, 6525 XD Nijmegen, The Netherlands Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Kapittelweg 29, 6525EN Nijmegen, The Netherlands n.lam at fcdonders.ru.nl +31-24-3668219 neurobiologyoflanguage.com From jm.horschig at donders.ru.nl Thu Jul 17 15:38:54 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Thu, 17 Jul 2014 15:38:54 +0200 Subject: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data In-Reply-To: <171511570.2562741.1405516056153.JavaMail.root@bcbl.eu> References: <171511570.2562741.1405516056153.JavaMail.root@bcbl.eu> Message-ID: <53C7D1EE.8040007@donders.ru.nl> Hi Fred, Matlab is giving mex-files precedence over .m file as long as the mex-file is on the path. The easiest ways to check whether Matlab uses the mex-file is to type >> which combineClusters that should point to the mex file. Another way to check is to put a breakpoint in the beginning of the .m-file, and then call combineClusters or run your code. If the mex-file is executed, Matlab will not enter the .m-file and thus not arrive and not stop at the breakpoint. However, the files are also in FieldTrip/private, and this is the place where other functions that FieldTrip uses are stored. So, actually there is no need for you to copy the files over to a separate folder. FieldTrip/Matlab should execute the mex-files all by itself already. Best, Jörn On 7/16/2014 3:07 PM, Frédéric Roux wrote: > Hi Eelke, > > thanks for your response - that sounds promising. > > I am running fieldtrip-20140527 on a 64 bit Linux server, so I'd > be keen to give your suggestion a try. > > This is actually the first time I am calling mex-files using Matlab, > but I assume that the way to go is to comment out the part of the code > in ft_findcluster that combines the cluster and to call the mex-file instead? > > If yes, here is what I did: I copied the combineClusters.mexa64 file into > a spearate folder and added that folder to my Matlab path. > > % combine clusters that are connected in neighbouring channel(s) > % (combinations). Convert inputs to uint32 as that is required by the mex > % file (and the values will be positive integers anyway). > addpath('/path2home/mex/'); > cluster = combineClusters(uint32(labelmat), logical(spatdimneighbstructmat), uint32(total)); > > I am not sure however how to call the mex function. Is this done automatically or do > I need to add some further steps? May I ask you which approach you are using? > > Best, > Fred > > > > Frédéric Roux > > ----- Original Message ----- > From: "Eelke Spaak" > To: "FieldTrip discussion list" > Sent: Wednesday, July 16, 2014 9:39:03 AM > Subject: Re: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data > > Hi Fred, > > Some time ago, I replaced parts of the clustering routine with a > mex-file. For me this greatly sped up the cluster stats. I guess you > are using a fairly recent (<1yr old) FT version? The platform you're > using might also be relevant, I just noticed that the mex-file > (private/combineClusters.mex*) is distributed in compiled form only > for Linux 64 and Windows 32/64 bit. If you're e.g. on a Macintosh, you > could compile it yourself from the src/combineClusters.cpp source > file. > > I know of no attempts to parallelise the clustering code. > > Best, > Eelke > > On 15 July 2014 17:40, Frédéric Roux wrote: >> Dear all, >> >> I would like to ask if anyone has ever tried to speed up the ft_statistics_montecarlo function >> by using Matlab's parallel computing toolbox ? >> >> I would like to run clusterstatistics on time-frequency data, but as a result of the large number >> of time and frequency bins, the function runs very slowly. So I was thinking to try and modify >> the code by running the loops over the frequency bins in parallel and see if that could save >> some time. >> >> Before starting to adapt the code on my own, however, I wanted to ask if anyone had ever tried that >> and also if there could be any possible reasons which would make that this is not a feasible project. >> >> Any thoughts or suggestions would be highly appreciated. >> >> Best, >> Fred >> >> >> --------------------------------------------------------------------------- >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From constantino.mendezbertolo at ctb.upm.es Thu Jul 17 15:45:24 2014 From: constantino.mendezbertolo at ctb.upm.es (=?UTF-8?Q?Constantino_M=C3=A9ndez_B=C3=A9rtolo?=) Date: Thu, 17 Jul 2014 15:45:24 +0200 Subject: [FieldTrip] testing if power is significantly different from zero In-Reply-To: <613650745.758220.1405598195481.JavaMail.root@indus.zimbra.ru.nl> References: <613650745.758220.1405598195481.JavaMail.root@indus.zimbra.ru.nl> Message-ID: Bump, wishing that some sage fieldtripper either back-up the "t-test against homologue data filled with zeros method" or suggests a better approach, thx 2014-07-17 13:56 GMT+02:00 Lam, Nietzsche : > Hi Hweeling, > > I think the approach is similar to testing two different conditions. I > have a suggestion below, but I think some people would argue that this is > not a good way to do the test. > > You can keep the design matrix the same as comparing two conditions, but > for the "zero" condition, you will turn this all into zeros. > dat1.powspctrm = %power from your condition of interest > dat2 = dat1 % your "zero" condition" > dat2.powspctrm(:) = 0; % making the data structure identical to condition > of interest but everything is zero. > Then call your statistics function as before. > > Perhaps someone else can give you more detail on this. > > Nietzsche > > ----- Original Message ----- > > From: "Hwee Ling Lee" > > To: "FieldTrip discussion list" > > Sent: Thursday, 17 July, 2014 1:26:59 PM > > Subject: [FieldTrip] testing if power is significantly different from > zero > > Hi all, > > > > > > I have a naive question regarding cluster statistics in fieldtrip. > > > > > > Is it possible to run a statistical analysis to test if power is > > significantly different from zero? If so, how do I build the design > > matrix for this case? > > > > > > Thanks. > > > > > > Cheers, > > Hweeling > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Nietzsche H.L. Lam, MSc > PhD Candidate > > Max Planck Institute for Psycholinguistics > Wundtlaan 1, 6525 XD Nijmegen, The Netherlands > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Kapittelweg 29, 6525EN Nijmegen, The Netherlands > > n.lam at fcdonders.ru.nl > +31-24-3668219 > > > neurobiologyoflanguage.com > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Constantino Méndez-Bértolo Laboratorio de Neurociencia Clínica, Centro de Tecnología Biomédica (CTB) Parque Científico y Tecnológico de la UPM, Campus de Montegancedo 28223 Pozuelo de Alarcón, Madrid, SPAIN -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Jul 17 16:43:34 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 17 Jul 2014 16:43:34 +0200 Subject: [FieldTrip] testing if power is significantly different from zero In-Reply-To: References: <613650745.758220.1405598195481.JavaMail.root@indus.zimbra.ru.nl> Message-ID: <53C7E116.6000009@donders.ru.nl> Hey, I actually wouldn't advise to test power against 0. Since power is a positive measure (bound to 0), noise will cumulatatively add up and your test against 0 will effectively check whether you recorded something (aka noise) or not. But, as Nietzsche said, you can ask whether your measured powered is significantly different from 0 using her approach. It's just not a very clever question to ask... ;) Best, Jörn On 7/17/2014 3:45 PM, Constantino Méndez Bértolo wrote: > Bump, > wishing that some sage fieldtripper either back-up the "t-test against > homologue data filled with zeros method" or suggests a better approach, > thx > > > 2014-07-17 13:56 GMT+02:00 Lam, Nietzsche >: > > Hi Hweeling, > > I think the approach is similar to testing two different > conditions. I have a suggestion below, but I think some people > would argue that this is not a good way to do the test. > > You can keep the design matrix the same as comparing two > conditions, but for the "zero" condition, you will turn this all > into zeros. > dat1.powspctrm = %power from your condition of interest > dat2 = dat1 % your "zero" condition" > dat2.powspctrm(:) = 0; % making the data structure identical to > condition of interest but everything is zero. > Then call your statistics function as before. > > Perhaps someone else can give you more detail on this. > > Nietzsche > > ----- Original Message ----- > > From: "Hwee Ling Lee" > > > To: "FieldTrip discussion list" > > > Sent: Thursday, 17 July, 2014 1:26:59 PM > > Subject: [FieldTrip] testing if power is significantly different > from zero > > Hi all, > > > > > > I have a naive question regarding cluster statistics in fieldtrip. > > > > > > Is it possible to run a statistical analysis to test if power is > > significantly different from zero? If so, how do I build the design > > matrix for this case? > > > > > > Thanks. > > > > > > Cheers, > > Hweeling > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Nietzsche H.L. Lam, MSc > PhD Candidate > > Max Planck Institute for Psycholinguistics > Wundtlaan 1, 6525 XD Nijmegen, The Netherlands > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Kapittelweg 29, 6525EN Nijmegen, The Netherlands > > n.lam at fcdonders.ru.nl > +31-24-3668219 > > > neurobiologyoflanguage.com > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Constantino Méndez-Bértolo > Laboratorio de Neurociencia Clínica,Centro de Tecnología Biomédica (CTB) > > Parque Científico y Tecnológico de la UPM, Campus de Montegancedo > > 28223 Pozuelo deAlarcón, Madrid, SPAIN > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From hweeling.lee at gmail.com Thu Jul 17 17:44:53 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 17 Jul 2014 17:44:53 +0200 Subject: [FieldTrip] testing if power is significantly different from zero In-Reply-To: <53C7E116.6000009@donders.ru.nl> References: <613650745.758220.1405598195481.JavaMail.root@indus.zimbra.ru.nl> <53C7E116.6000009@donders.ru.nl> Message-ID: Hi, Thanks for all the input. The reason I wanted to test if power is significantly different from 0 is to check if the power in condition 1 resembles to what is reported in the literature. This is just to ensure that the changes observed in condition 2 relative to condition 1 makes sense. Cheers, Hweeling On 17 July 2014 16:43, "Jörn M. Horschig" wrote: > Hey, > > I actually wouldn't advise to test power against 0. Since power is a > positive measure (bound to 0), noise will cumulatatively add up and your > test against 0 will effectively check whether you recorded something (aka > noise) or not. But, as Nietzsche said, you can ask whether your measured > powered is significantly different from 0 using her approach. It's just not > a very clever question to ask... ;) > > Best, > Jörn > > > > On 7/17/2014 3:45 PM, Constantino Méndez Bértolo wrote: > >> Bump, >> wishing that some sage fieldtripper either back-up the "t-test against >> homologue data filled with zeros method" or suggests a better approach, >> thx >> >> >> 2014-07-17 13:56 GMT+02:00 Lam, Nietzsche > n.lam at fcdonders.ru.nl>>: >> >> >> Hi Hweeling, >> >> I think the approach is similar to testing two different >> conditions. I have a suggestion below, but I think some people >> would argue that this is not a good way to do the test. >> >> You can keep the design matrix the same as comparing two >> conditions, but for the "zero" condition, you will turn this all >> into zeros. >> dat1.powspctrm = %power from your condition of interest >> dat2 = dat1 % your "zero" condition" >> dat2.powspctrm(:) = 0; % making the data structure identical to >> condition of interest but everything is zero. >> Then call your statistics function as before. >> >> Perhaps someone else can give you more detail on this. >> >> Nietzsche >> >> ----- Original Message ----- >> > From: "Hwee Ling Lee" > > >> > To: "FieldTrip discussion list" > > >> > Sent: Thursday, 17 July, 2014 1:26:59 PM >> > Subject: [FieldTrip] testing if power is significantly different >> from zero >> > Hi all, >> > >> > >> > I have a naive question regarding cluster statistics in fieldtrip. >> > >> > >> > Is it possible to run a statistical analysis to test if power is >> > significantly different from zero? If so, how do I build the design >> > matrix for this case? >> > >> > >> > Thanks. >> > >> > >> > Cheers, >> > Hweeling >> > >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -- >> Nietzsche H.L. Lam, MSc >> PhD Candidate >> >> Max Planck Institute for Psycholinguistics >> Wundtlaan 1, 6525 XD Nijmegen, The Netherlands >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Kapittelweg 29, 6525EN Nijmegen, The Netherlands >> >> n.lam at fcdonders.ru.nl >> +31-24-3668219 >> >> >> neurobiologyoflanguage.com >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> Constantino Méndez-Bértolo >> Laboratorio de Neurociencia Clínica,Centro de Tecnología Biomédica (CTB) >> >> >> Parque Científico y Tecnológico de la UPM, Campus de Montegancedo >> >> 28223 Pozuelo deAlarcón, Madrid, SPAIN >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- > Jörn M. Horschig > PhD Student > > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.heusser at gmail.com Thu Jul 17 20:15:54 2014 From: andrew.heusser at gmail.com (Andrew Heusser) Date: Thu, 17 Jul 2014 14:15:54 -0400 Subject: [FieldTrip] Computing cluster sizes on group-level topographic maps without using built in monte carlo statistics Message-ID: Dear Fieldtrippers, I am working on an MEG analysis where I compute average oscillatory power for a given band for each trial in my experiment, and then perform a parametric regression over trials to obtain a t-statistic representing the fit to the model at each sensor and for each subject (for a given band). This leaves me with a topographic map of t-statistics for each subject for a given frequency band. Then, to compute reliability across subjects, I perform a one-sample t-test on the model fits across subjects for a given sensor to get a group-level topographic map of significance values. I would like to cluster correct these group-level maps by iteratively shuffling trials within subject and recomputing model fits, recomputing the group maps, and then finding the size of clusters to build a null distribution of cluster sizes. 1) Using the Fieldtrip functions (i.e. ft_freqstatistics), is there a simple way to grab cluster sizes from these 'shuffled' group-level statistical maps so that I can build a null distribution of cluster sizes and find a cluster threshold? Rather, is it possible to obtain cluster sizes on any statistical map without using the monte carlo statistics? 2) Does this approach logically make sense, or is there maybe another way to achieve this that I haven't thought of? Thank you in advance for you help! -- Andy Graduate Student at NYU -------------- next part -------------- An HTML attachment was scrubbed... URL: From fiebach at psych.uni-frankfurt.de Fri Jul 18 00:25:33 2014 From: fiebach at psych.uni-frankfurt.de (Christian Fiebach) Date: Fri, 18 Jul 2014 00:25:33 +0200 Subject: [FieldTrip] 1 PostDoc position, 2 PhD positions, Language & Predictive Coding, Frankfurt/Germany Message-ID: <3C1EE673-44B3-40ED-A6F8-189A1BF256F5@psych.uni-frankfurt.de> Dear colleagues, I would be thankful if you could forward this to interested colleagues and students. Thanks in advance, Christian Fiebeach __________________________________________________________________ The Cognitive Neuroscience Lab (Prof. Christian Fiebach) at the Department of Psychology of Goethe University Frankfurt offers three research positions as part of an ERC consolidator project that investigates neurophysiological mechanisms of language processing from a predictive coding perspective: Postdoctoral Researcher (German Salary Level E13, 100%) in Cognitive and Computational Neuroscience of Language We seek a colleague with a strong background in EEG/MEG, fMRI, and/or neuro-computational modeling, and an interest in brain mechanisms underlying language processing. You should have skills in signal processing, data analysis, and/or computational modeling, programming skills (e.g., Matlab, Python), and willingness to acquire expertise in all three methods. The successful candidate will be involved in all aspects of the project and should be motivated to further develop this topic. The position is offered initially for two years. However, an extension for up to five years is possible. Two PhD positions (German Salary Level E13, 65%) in Cognitive Neuroscience of Language The PhD projects involve fMRI and MEG/EEG experiments in the field of language processing. We encourage applications from excellent and enthusiastic candidates with MSc or equivalent degrees from Psychology, Neuroscience, Computational Neuroscience, Biology, Physics, or related areas, who share our interest in understanding investigating the neural bases of language processing. Programming skills (e.g., Matlab, Python) are appreciated. Tasks involve the design, acquisition, and analysis of fMRI and MEG/EEG experiments, as well as the publication of research findings. The PhD positions involve funding for three years. Our lab is at the Department of Psychology and is part of Frankfurt’s vibrant neuroscience community (Interdisciplinary Center for Neurosciences Frankfurt) and the larger Rhein-Main area (Rhein Main Neuroscience Network Frankfurt/Mainz). We have access to state of the art facilities involving the Frankfurt Brain Imaging Center with two 3T MR scanners and a 275 channel MEG, as well as EEG, fNIRS and eye tracking. The positions are available from September 1, 2014, and available until filled. Further information can be obtained directly from Christian Fiebach. Please send your complete application (including CV, certificates, as well as names of two referees) electronically to Prof. Christian Fiebach, Department of Psychology, Goethe University Frankfurt, Grüneburgplatz 1, D-60323 Frankfurt am Main (fiebach at psych.uni-frankfurt.de). -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: FiebachLabFrankfurt_1PostDoc_2PhD_ERCproject.pdf Type: application/pdf Size: 138583 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Jul 18 08:48:31 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 18 Jul 2014 08:48:31 +0200 Subject: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance computation speed for time-frequency data In-Reply-To: <53C7D1EE.8040007@donders.ru.nl> References: <171511570.2562741.1405516056153.JavaMail.root@bcbl.eu> <53C7D1EE.8040007@donders.ru.nl> Message-ID: Hi Fred, Just to add to Jörn's comment, to be entirely clear: you should not need to edit FT code to enable using the combineClusters mex-file; the default code should be calling it already. If it isn't, either something is wrong, or the mex-file has not been compiled for your platform (but I guess the latter is not the case since you're on Linux 64). Note that the 'which combineClusters' on the default command window won't work as combineClusters is a private function. Hope that helps. Best, Eelke On 17 July 2014 15:38, "Jörn M. Horschig" wrote: > Hi Fred, > > Matlab is giving mex-files precedence over .m file as long as the mex-file > is on the path. The easiest ways to check whether Matlab uses the mex-file > is to type >>> which combineClusters > that should point to the mex file. Another way to check is to put a > breakpoint in the beginning of the .m-file, and then call combineClusters or > run your code. If the mex-file is executed, Matlab will not enter the > .m-file and thus not arrive and not stop at the breakpoint. > > However, the files are also in FieldTrip/private, and this is the place > where other functions that FieldTrip uses are stored. So, actually there is > no need for you to copy the files over to a separate folder. > FieldTrip/Matlab should execute the mex-files all by itself already. > > Best, > Jörn > > > On 7/16/2014 3:07 PM, Frédéric Roux wrote: >> >> Hi Eelke, >> >> thanks for your response - that sounds promising. >> >> I am running fieldtrip-20140527 on a 64 bit Linux server, so I'd >> be keen to give your suggestion a try. >> >> This is actually the first time I am calling mex-files using Matlab, >> but I assume that the way to go is to comment out the part of the code >> in ft_findcluster that combines the cluster and to call the mex-file >> instead? >> >> If yes, here is what I did: I copied the combineClusters.mexa64 file into >> a spearate folder and added that folder to my Matlab path. >> >> % combine clusters that are connected in neighbouring channel(s) >> % (combinations). Convert inputs to uint32 as that is required by the mex >> % file (and the values will be positive integers anyway). >> addpath('/path2home/mex/'); >> cluster = combineClusters(uint32(labelmat), >> logical(spatdimneighbstructmat), uint32(total)); >> >> I am not sure however how to call the mex function. Is this done >> automatically or do >> I need to add some further steps? May I ask you which approach you are >> using? >> >> Best, >> Fred >> >> >> >> Frédéric Roux >> >> ----- Original Message ----- >> From: "Eelke Spaak" >> To: "FieldTrip discussion list" >> Sent: Wednesday, July 16, 2014 9:39:03 AM >> Subject: Re: [FieldTrip] parallelizing ft_statistics_montecarlo to enhance >> computation speed for time-frequency data >> >> Hi Fred, >> >> Some time ago, I replaced parts of the clustering routine with a >> mex-file. For me this greatly sped up the cluster stats. I guess you >> are using a fairly recent (<1yr old) FT version? The platform you're >> using might also be relevant, I just noticed that the mex-file >> (private/combineClusters.mex*) is distributed in compiled form only >> for Linux 64 and Windows 32/64 bit. If you're e.g. on a Macintosh, you >> could compile it yourself from the src/combineClusters.cpp source >> file. >> >> I know of no attempts to parallelise the clustering code. >> >> Best, >> Eelke >> >> On 15 July 2014 17:40, Frédéric Roux wrote: >>> >>> Dear all, >>> >>> I would like to ask if anyone has ever tried to speed up the >>> ft_statistics_montecarlo function >>> by using Matlab's parallel computing toolbox ? >>> >>> I would like to run clusterstatistics on time-frequency data, but as a >>> result of the large number >>> of time and frequency bins, the function runs very slowly. So I was >>> thinking to try and modify >>> the code by running the loops over the frequency bins in parallel and see >>> if that could save >>> some time. >>> >>> Before starting to adapt the code on my own, however, I wanted to ask if >>> anyone had ever tried that >>> and also if there could be any possible reasons which would make that >>> this is not a feasible project. >>> >>> Any thoughts or suggestions would be highly appreciated. >>> >>> Best, >>> Fred >>> >>> >>> >>> --------------------------------------------------------------------------- >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From j.herring at fcdonders.ru.nl Fri Jul 18 15:06:40 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Fri, 18 Jul 2014 15:06:40 +0200 (CEST) Subject: [FieldTrip] Fwd: variable "abort" In-Reply-To: <1405337932.32621.YahooMailNeo@web141605.mail.bf1.yahoo.com> Message-ID: <68127070.3916400.1405688800801.JavaMail.root@draco.zimbra.ru.nl> Dear Payman, I'm forwarding this e-mail to the mailinglist as the solution might be useful for others. Best, Jim ----- Doorgestuurd bericht ----- > Van: "paymando- morientes" > Aan: "J.D. Herring (Jim)" > Verzonden: Maandag 14 juli 2014 13:38:52 > Onderwerp: Re: [FieldTrip] variable "abort" > Thanks for your help. I found where the problem was. I had two > versions of FieldTrip installed . I removed the older one and the > problem was solved. > regards > payman > On Monday, 14 July 2014, 9:15, "Herring, J.D. (Jim)" > wrote: > Hi Payman, > ‘abort’ is indeed set by ft_preamble_init, which is called by > ft_definetrial through ft_preamble. This function is located in > fieldtrip/utilities. Could it be that your paths are not correctly > set? Did you run ft_defaults before running your script? > Best, > Jim > From: paymando- morientes [mailto:paymandomorientes at yahoo.com] > Sent: donderdag 10 juli 2014 20:24 > To: Herring, J.D. (Jim); 'FieldTrip discussion list' > Subject: Re: [FieldTrip] variable "abort" > oh sorry I mistyped it. I meant ft_definetrial. > thanks for your help > On Thursday, 10 July 2014, 13:40, "Herring, J.D. (Jim)" < > j.herring at fcdonders.ru.nl > wrote: > Dear Payman, > As far as I can tell there is no function called ft_definevarible, > could you please recheck which function is given you problems? > Best, > Jim > From: fieldtrip-bounces at science.ru.nl [ > mailto:fieldtrip-bounces at science.ru.nl ] On Behalf Of paymando- > morientes > Sent: donderdag 10 juli 2014 13:23 > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] variable "abort" > Dear all > I have a problem starting with field trip. When I call > "ft_definevarible" function, it throws an error that "abort" variable > is not defined. I checked the ".m file" for the function and it says > that abort is set by "ft_preamble" function. So where is the problem? > Should I change something in my script? or "ft_preamble" function is > not doing its job? > by the way i hope I am sending this message to the right e-mail. > thanks in advance > payman -- Jim Herring, MSc. Neuronal Oscillations Group Centre for Cognitive Neuroimaging Donders Institute for Brain, Cognition and Behaviour Radboud University Nijmegen -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Fri Jul 18 23:54:05 2014 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Fri, 18 Jul 2014 21:54:05 +0000 Subject: [FieldTrip] ft_volumerealign always producing coordsys 'ctf'. Message-ID: Hi all, I had understood, that using ft_volumerealign, and manually marking fiducials, should produce a new structure (mri_real) with a cfg.coordsys matching the actual MEG system you are using- in my case neuromag. However, no mater how much I play around with the ft_volumerealign, I always end up with a structure with mri_real.coordsys='ctf'. Later down the track, my volume conduction model is not properly aligned to my sensors. Currently I am just using the following basic code: cfg=[]; cfg.method = 'interactive'; mri_real = ft_volumerealign(cfg, mri); Does anyone know what I am doing wrong here? Cheers, Kaelasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From azadehh at uvic.ca Sat Jul 19 00:26:06 2014 From: azadehh at uvic.ca (Azadeh Hajihosseini) Date: Fri, 18 Jul 2014 15:26:06 -0700 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices Message-ID: Hello FieldTrip members, I am trying to source localize EEG oscillatory activity and have a few problems in constructing the forward model and eventually running the source analysis. I think the problems are related to each other. Here is what happens: 1- When I run the source analysis, I get this error message: *??? Error using ==> svd* *Input to SVD must not contain NaN or Inf.* *Error in ==> beamformer_dics>pinv at 650* * [U,S,V] = svd(A,0);* *Error in ==> beamformer_dics at 339* * filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross eqn. 3, use PINV/SVD to cover rank* * deficient leadfield* *Error in ==> ft_sourceanalysis at 572* * dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:});* *Error in ==> test_sourceanalysis at 12* *sourceTF = ft_sourceanalysis(cfg, data_TF);* 2- Checking the leadfiled matrices, I see there are a lot of NaN values. 3- When I visualize the head model I have created, the plots don't look right. The third field, *vol.bnd(3),* which is supposed to be the brain tissue, looks like a cube. And here are my code lines: *% CONSTRUCT A HEAD MODEL from the template mri in FT's template/anatomy* *mri = ft_read_mri('template\anatomy\single_subj_T1.nii');* *mri.coordsys = 'spm';* *%SEGMENTATION:* *cfg = [];* *cfg.output = {'brain','skull','scalp'};* *segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT resliced data* *save segmentedmri_template segmentedmri_template* *%CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL)* *cfg = [];* *cfg.method ='bemcp';* *cfg.tissue ={'brain','skull','scalp'};* *% cfg.outputfile = 'template_';* *vol = ft_prepare_headmodel(cfg, segmentedmri_template);* *save vol vol* *%Visualization of the head model* *figure;* *ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp * *figure;* *ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull* *figure;* *ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks like a cube* *% Align electrodes * *elec = ft_read_sens('template\electrode\standard_1020.elc'); * *% load volume conduction model* *% load vol; * *%interactive allignment* *cfg = [];* *cfg.method = 'interactive';* *cfg.elec = elec;* *cfg.headshape = vol.bnd(1);* *elec_aligned = ft_electroderealign(cfg);* *save elec_aligned elec_aligned* *% Prepare leadfield* *load data_TF* *cfg=[];* *cfg.vol = vol; %structure with volume conduction model* *cfg.elec = elec_aligned;%structure with electrode positions* *[grid] = ft_prepare_leadfield(cfg, data_TF);* *% Find source* *cfg = []; * *cfg.method = 'dics';* *cfg.frequency = 25; * *cfg.grid = grid; * *cfg.vol = vol;* *cfg.latency = .4;%single number in seconds, for time-frequency analysis* *cfg.dics.projectnoise = 'yes';* *cfg.dics.lambda = 0;* *cfg.elec = elec_aligned;%structure with electrode positions* *sourceTF = ft_sourceanalysis(cfg, data_TF);* I am using *wavelet *with a *fourier* output for the time-frequency analysis (*data_TF)*. Do you have any idea what might be wrong here? I also have a more general question. What type of time-frequency data can be input to source analysis? *ft_freqanalysis* provides power, power and cross-spectra, and complex fourier outputs. But is source-localization based on only power data correct? I couldn't find any explanations regarding this issue in the tutorial. I look forward to hearing from anyone who might have ideas about any of these issues! Many thanks, -- Azadeh HajiHosseini -------------- next part -------------- An HTML attachment was scrubbed... URL: From jinghua1227 at gmail.com Sat Jul 19 05:48:36 2014 From: jinghua1227 at gmail.com (Jinghua OU) Date: Sat, 19 Jul 2014 11:48:36 +0800 Subject: [FieldTrip] Problems with ft_resampledata Message-ID: Hello, I am using ft_resampledata to downsize my data and the code is as follows: cfg = []; cfg.resamplefs = 500; cfg.detrend = 'no'; data_resample = ft_resampledata(cfg, data_AR_bc); however, some errors occur as follows: ??? Undefined function or method 'resample' for input arguments of type 'double'. Error in ==> ft_resampledata at 182 data.trial{itr} = transpose(resample(transpose(data.trial{itr}),fsres,fsorig)); Is there something I'm missing? Thank you very much for your help in advacne. Best, Jinghua -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Sat Jul 19 08:45:51 2014 From: roeysc at gmail.com (Roey Schurr) Date: Sat, 19 Jul 2014 09:45:51 +0300 Subject: [FieldTrip] ft_volumerealign always producing coordsys 'ctf'. In-Reply-To: References: Message-ID: Dear Kaelasha, If I understand correctly (and as describes in the function's code), ft_realign has a default coordinate system that is used when using the different methods of realigning. When using 'interactive', this default is indeed ctf. Please try the following (specifying the coordinate system yourself) and tell us how it goes: cfg=[]; cfg.method = 'interactive'; cfg.coordsys = 'neurmag'; mri_real = ft_volumerealign(cfg, mri); Best, Roey On Sat, Jul 19, 2014 at 12:54 AM, Kaelasha Tyler wrote: > Hi all, > > I had understood, that using ft_volumerealign, and manually marking > fiducials, should produce a new structure (mri_real) with a cfg.coordsys > matching the actual MEG system you are using- in my case neuromag. > > However, no mater how much I play around with the ft_volumerealign, I > always end up with a structure with mri_real.coordsys='ctf'. > > Later down the track, my volume conduction model is not properly aligned > to my sensors. > > Currently I am just using the following basic code: > > > cfg=[]; > > cfg.method = 'interactive'; > > mri_real = ft_volumerealign(cfg, mri); > > Does anyone know what I am doing wrong here? > > Cheers, > Kaelasha > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Sun Jul 20 08:35:23 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Sun, 20 Jul 2014 06:35:23 +0000 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: References: Message-ID: <4C11F599-521E-49EA-B84D-6F46BF24A201@flinders.edu.au> I don't know if this advice is at all correct but I usually get that error if I've got a relatively small number of electrodes (~29) or a small data set (30 seconds of data). Does that sound familiar? I usually clear all and run it again and it will work eventually haha Sent from my iPad On 19 Jul 2014, at 8:01 am, "Azadeh Hajihosseini" > wrote: Hello FieldTrip members, I am trying to source localize EEG oscillatory activity and have a few problems in constructing the forward model and eventually running the source analysis. I think the problems are related to each other. Here is what happens: 1- When I run the source analysis, I get this error message: ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> beamformer_dics>pinv at 650 [U,S,V] = svd(A,0); Error in ==> beamformer_dics at 339 filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross eqn. 3, use PINV/SVD to cover rank deficient leadfield Error in ==> ft_sourceanalysis at 572 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); Error in ==> test_sourceanalysis at 12 sourceTF = ft_sourceanalysis(cfg, data_TF); 2- Checking the leadfiled matrices, I see there are a lot of NaN values. 3- When I visualize the head model I have created, the plots don't look right. The third field, vol.bnd(3), which is supposed to be the brain tissue, looks like a cube. And here are my code lines: % CONSTRUCT A HEAD MODEL from the template mri in FT's template/anatomy mri = ft_read_mri('template\anatomy\single_subj_T1.nii'); mri.coordsys = 'spm'; %SEGMENTATION: cfg = []; cfg.output = {'brain','skull','scalp'}; segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT resliced data save segmentedmri_template segmentedmri_template %CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL) cfg = []; cfg.method ='bemcp'; cfg.tissue ={'brain','skull','scalp'}; % cfg.outputfile = 'template_'; vol = ft_prepare_headmodel(cfg, segmentedmri_template); save vol vol %Visualization of the head model figure; ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp figure; ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull figure; ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks like a cube % Align electrodes elec = ft_read_sens('template\electrode\standard_1020.elc'); % load volume conduction model % load vol; %interactive allignment cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_aligned = ft_electroderealign(cfg); save elec_aligned elec_aligned % Prepare leadfield load data_TF cfg=[]; cfg.vol = vol; %structure with volume conduction model cfg.elec = elec_aligned;%structure with electrode positions [grid] = ft_prepare_leadfield(cfg, data_TF); % Find source cfg = []; cfg.method = 'dics'; cfg.frequency = 25; cfg.grid = grid; cfg.vol = vol; cfg.latency = .4;%single number in seconds, for time-frequency analysis cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = 0; cfg.elec = elec_aligned;%structure with electrode positions sourceTF = ft_sourceanalysis(cfg, data_TF); I am using wavelet with a fourier output for the time-frequency analysis (data_TF). Do you have any idea what might be wrong here? I also have a more general question. What type of time-frequency data can be input to source analysis? ft_freqanalysis provides power, power and cross-spectra, and complex fourier outputs. But is source-localization based on only power data correct? I couldn't find any explanations regarding this issue in the tutorial. I look forward to hearing from anyone who might have ideas about any of these issues! Many thanks, -- Azadeh HajiHosseini _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Sun Jul 20 11:14:25 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Sun, 20 Jul 2014 09:14:25 +0000 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: <4C11F599-521E-49EA-B84D-6F46BF24A201@flinders.edu.au> References: <4C11F599-521E-49EA-B84D-6F46BF24A201@flinders.edu.au> Message-ID: <1E693A08-6073-49AE-BDAD-D028B3F73BA3@flinders.edu.au> Also are the units the same for your Headmodel, electrodes and sourcemodel(?) Sent from my iPad On 20 Jul 2014, at 4:08 pm, "Tyler Grummett" > wrote: I don't know if this advice is at all correct but I usually get that error if I've got a relatively small number of electrodes (~29) or a small data set (30 seconds of data). Does that sound familiar? I usually clear all and run it again and it will work eventually haha Sent from my iPad On 19 Jul 2014, at 8:01 am, "Azadeh Hajihosseini" > wrote: Hello FieldTrip members, I am trying to source localize EEG oscillatory activity and have a few problems in constructing the forward model and eventually running the source analysis. I think the problems are related to each other. Here is what happens: 1- When I run the source analysis, I get this error message: ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> beamformer_dics>pinv at 650 [U,S,V] = svd(A,0); Error in ==> beamformer_dics at 339 filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross eqn. 3, use PINV/SVD to cover rank deficient leadfield Error in ==> ft_sourceanalysis at 572 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); Error in ==> test_sourceanalysis at 12 sourceTF = ft_sourceanalysis(cfg, data_TF); 2- Checking the leadfiled matrices, I see there are a lot of NaN values. 3- When I visualize the head model I have created, the plots don't look right. The third field, vol.bnd(3), which is supposed to be the brain tissue, looks like a cube. And here are my code lines: % CONSTRUCT A HEAD MODEL from the template mri in FT's template/anatomy mri = ft_read_mri('template\anatomy\single_subj_T1.nii'); mri.coordsys = 'spm'; %SEGMENTATION: cfg = []; cfg.output = {'brain','skull','scalp'}; segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT resliced data save segmentedmri_template segmentedmri_template %CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL) cfg = []; cfg.method ='bemcp'; cfg.tissue ={'brain','skull','scalp'}; % cfg.outputfile = 'template_'; vol = ft_prepare_headmodel(cfg, segmentedmri_template); save vol vol %Visualization of the head model figure; ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp figure; ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull figure; ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks like a cube % Align electrodes elec = ft_read_sens('template\electrode\standard_1020.elc'); % load volume conduction model % load vol; %interactive allignment cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_aligned = ft_electroderealign(cfg); save elec_aligned elec_aligned % Prepare leadfield load data_TF cfg=[]; cfg.vol = vol; %structure with volume conduction model cfg.elec = elec_aligned;%structure with electrode positions [grid] = ft_prepare_leadfield(cfg, data_TF); % Find source cfg = []; cfg.method = 'dics'; cfg.frequency = 25; cfg.grid = grid; cfg.vol = vol; cfg.latency = .4;%single number in seconds, for time-frequency analysis cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = 0; cfg.elec = elec_aligned;%structure with electrode positions sourceTF = ft_sourceanalysis(cfg, data_TF); I am using wavelet with a fourier output for the time-frequency analysis (data_TF). Do you have any idea what might be wrong here? I also have a more general question. What type of time-frequency data can be input to source analysis? ft_freqanalysis provides power, power and cross-spectra, and complex fourier outputs. But is source-localization based on only power data correct? I couldn't find any explanations regarding this issue in the tutorial. I look forward to hearing from anyone who might have ideas about any of these issues! Many thanks, -- Azadeh HajiHosseini _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From author at example.com Mon Jul 21 09:19:36 2014 From: author at example.com (Author Name Removed) Date: Mon, 21 Jul 2014 09:19:36 +0200 Subject: [Subject Removed] In-Reply-To: References: Message-ID: <119C5BD5-2DC7-42B4-A4C4-A3B9B74DB762@gmail.com> A non-text attachment was scrubbed... Name: not available Type: multipart/alternative Size: 216 bytes Desc: not available URL: From eelke.spaak at donders.ru.nl Mon Jul 21 09:58:30 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 21 Jul 2014 09:58:30 +0200 Subject: [FieldTrip] Problems with ft_resampledata In-Reply-To: References: Message-ID: Hi Jinghua, The function 'resample' is part of Mathworks' Signal Processing Toolbox. Currently, unfortunately, this toolbox is a requirement for certain FieldTrip functionality, including ft_resampledata. Best, Eelke On 19 July 2014 05:48, Jinghua OU wrote: > Hello, > > I am using ft_resampledata to downsize my data and the code is as follows: > > cfg = []; > cfg.resamplefs = 500; > cfg.detrend = 'no'; > data_resample = ft_resampledata(cfg, data_AR_bc); > > however, some errors occur as follows: > > ??? Undefined function or method 'resample' for input arguments of type > 'double'. > > Error in ==> ft_resampledata at 182 > data.trial{itr} = > transpose(resample(transpose(data.trial{itr}),fsres,fsorig)); > > Is there something I'm missing? > Thank you very much for your help in advacne. > > Best, > Jinghua > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From roeysc at gmail.com Mon Jul 21 11:21:32 2014 From: roeysc at gmail.com (Roey Schurr) Date: Mon, 21 Jul 2014 12:21:32 +0300 Subject: [FieldTrip] MNE Source Reconstruction Sanity Check Message-ID: Dear fieldtrippers, I want to do a sanity check on mne source reconstruction. I'm working on continuous EEG recordings (19 electrodes), estimating the source reconstruction activity using the *mne* (minimum norm estimate) method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As a sanity check for the source reconstruction itself, I wanted to compare conditions in which I could estimate the loci of significant changes, e.g.: rest vs movement of the hand, moving the right hand vs the left hand, etc. I have about 60 seconds of recording for each condition. What I did was: 1) Segment the recording of each condition into many "trials" of 2 seconds each. 2) For each trial, average the activity in each of the 90 ROIs of the aal atlas (I excluded the cerebellum from the source reconstruction). I was wondering what comparison would be best in this case. Since this is not Evoked Responses data, I find it hard to find relevant ideas, and would like to hear your thoughts. 1) I did a frequency analysis (mtmfft) in conventional bands of interest and ran ft_freqstatistics on the resulting structures (using ttest2 and the bonferoni correction for the multiple comparison problem). This gave some results, however for most conditions they are not very encouraging (the ROIs that showed significant differences were not close to those that I have assumed). *QUESTION 1*: do you think this is a proper method? Note that I did not use a frequency based source reconstruction in the first place, because I'm ultimately interested in the time course in the source space. 2) I was wondering if a cluster based permutation test is impossible to use here, since this is a continuous recording, so clustering according to time adjacency seems irrelevant. *QUESTION 2*: is it possible to use a cluster based statistical test here? If so, it could be better than a-priori averaging the source activity in the atlas ROIs, which could mask some of the effects, if they are located in a small area. 3) Another possibility is looking at the data itself. Unfortunately I encountered some problems using ft_sourcemovie, though this is a subject for a different thread. Any thoughts and advice are highly appreciated! Thank you for taking the time, roey -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Mon Jul 21 15:11:19 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Mon, 21 Jul 2014 15:11:19 +0200 Subject: [FieldTrip] phase synchronisation Message-ID: Dear all, I'm a bit confused with the computation of phase synchronisation. What I'm interested is to compute the phase synchronisation changes in the second session (i.e. 1 year later) with respect to the first session. There are 64 EEG channels in my data. I'm interested to compute the mean phase coherence index. >From the tutorial on 'analysis of sensor and source level connectivity, it seems to me one has to first compute the multivariate autoregressive model, follow by the spectral density function, follow by non-parametric computation of the cross spectral density function and finally the connectivity measures. However, when I tried to compute the multivariate autoregressive model as suggested, I get an error message: Error using chol Matrix must be positive definite. Error in armorf (line 40) ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); Error in ft_mvaranalysis (line 395) [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), size(tmpdata.trial{1},2), cfg.order); Can someone help me? Thanks! Cheers, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From khangsile at gmail.com Mon Jul 21 17:21:47 2014 From: khangsile at gmail.com (Khang Le) Date: Mon, 21 Jul 2014 17:21:47 +0200 Subject: [FieldTrip] Using real time field trip buffer on separate machines Message-ID: Hi everyone, I am currently attempting to use the field trip buffer, and I have been able to have it running on a single computer with two matlab instances, but for complicated reasons, I must use it with two computers. So the setup that I need to produce is to have one computer acquire data and write it to a remote server/virtual machine while my vm on the remote server reads the data and subsequently processes it. For right now, I am having trouble figuring out how to point my acquisition computer to write data to the buffer on the remote server. I know there is a possibility that I may have to change a little of the source code. If anyone has done this before or can assist, I would greatly appreciate it! Thanks, Khang -------------- next part -------------- An HTML attachment was scrubbed... URL: From nabra005 at odu.edu Mon Jul 21 19:10:15 2014 From: nabra005 at odu.edu (Nijo Abraham) Date: Mon, 21 Jul 2014 13:10:15 -0400 Subject: [FieldTrip] Event Type in own .mat structure Message-ID: Hi everyone. This question might sound trivial to many. However, since I just started using Fieldtrip I am having a tough time figuring how to input my own event types, start and end time for each event etc into the modified matlab data structure. I have a matlab structure with 4 EEG channels, obtained from Simulink. My ultimate goal is to convert this structure into a format with event types and event values that can be read by SPM. However, I am not able to find any tutorial that explain how one can add event types into own matlab data structure. (All the tutorials assume that the .ds or .vhr etc files already have event types assigned to them.) Can anyone help me out ? (P.S. I was successful in breaking down the .mat structure into trial, including adding the trialinfo attribute. However, the trialinfo cannot be read as an event in SPM. Only eventtypes and event values are asked as inputs in SPM, it seems) Neo -------------- next part -------------- An HTML attachment was scrubbed... URL: From azadehh at uvic.ca Mon Jul 21 20:12:56 2014 From: azadehh at uvic.ca (Azadeh Hajihosseini) Date: Mon, 21 Jul 2014 11:12:56 -0700 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: References: <4C11F599-521E-49EA-B84D-6F46BF24A201@flinders.edu.au> <1E693A08-6073-49AE-BDAD-D028B3F73BA3@flinders.edu.au> Message-ID: Hi Tyler, Thanks for responding! Actually, I have 51 electrodes. I also checked the units again and they are all 'mm'. It looks like there is a problem in preparing the head model because when I call the line: *vol = ft_prepare_headmodel(cfg, segmentedmri_template), * there is this warning: *Warning: Matrix is singular, close to singular or badly scaled.* * Results may be inaccurate. RCOND = NaN. * coming from *ft_headmodel_bemcp. *Any idea about this? Thanks again!! Azadeh > On Sun, Jul 20, 2014 at 2:14 AM, Tyler Grummett < > tyler.grummett at flinders.edu.au> wrote: > >> Also are the units the same for your Headmodel, electrodes and >> sourcemodel(?) >> >> Sent from my iPad >> >> On 20 Jul 2014, at 4:08 pm, "Tyler Grummett" < >> tyler.grummett at flinders.edu.au> wrote: >> >> I don't know if this advice is at all correct but I usually get that >> error if I've got a relatively small number of electrodes (~29) or a small >> data set (30 seconds of data). >> >> Does that sound familiar? >> >> I usually clear all and run it again and it will work eventually haha >> >> Sent from my iPad >> >> On 19 Jul 2014, at 8:01 am, "Azadeh Hajihosseini" >> wrote: >> >> Hello FieldTrip members, >> >> I am trying to source localize EEG oscillatory activity and have a few >> problems in constructing the forward model and eventually running the >> source analysis. I think the problems are related to each other. Here is >> what happens: >> >> 1- When I run the source analysis, I get this error message: >> >> *??? Error using ==> svd* >> *Input to SVD must not contain NaN or Inf.* >> >> *Error in ==> beamformer_dics>pinv at 650* >> * [U,S,V] = svd(A,0);* >> >> *Error in ==> beamformer_dics at 339* >> * filt = pinv(lf' * invCf * lf) * lf' * invCf; % >> Gross eqn. 3, use PINV/SVD to cover rank* >> * deficient leadfield* >> >> *Error in ==> ft_sourceanalysis at 572* >> * dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), >> optarg{:});* >> >> *Error in ==> test_sourceanalysis at 12* >> *sourceTF = ft_sourceanalysis(cfg, data_TF);* >> >> >> 2- Checking the leadfiled matrices, I see there are a lot of NaN values. >> 3- When I visualize the head model I have created, the plots don't look >> right. The third field, *vol.bnd(3),* which is supposed to be the brain >> tissue, looks like a cube. >> >> And here are my code lines: >> >> *% CONSTRUCT A HEAD MODEL from the template mri in FT's >> template/anatomy* >> *mri = ft_read_mri('template\anatomy\single_subj_T1.nii');* >> *mri.coordsys = 'spm';* >> >> *%SEGMENTATION:* >> *cfg = [];* >> *cfg.output = {'brain','skull','scalp'};* >> *segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT >> resliced data* >> *save segmentedmri_template segmentedmri_template* >> >> >> *%CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL)* >> *cfg = [];* >> *cfg.method ='bemcp';* >> *cfg.tissue ={'brain','skull','scalp'};* >> *% cfg.outputfile = 'template_';* >> *vol = ft_prepare_headmodel(cfg, segmentedmri_template);* >> *save vol vol* >> >> *%Visualization of the head model* >> *figure;* >> *ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp * >> *figure;* >> *ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull* >> *figure;* >> *ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks like >> a cube* >> >> *% Align electrodes * >> *elec = ft_read_sens('template\electrode\standard_1020.elc'); * >> *% load volume conduction model* >> *% load vol; * >> >> *%interactive allignment* >> *cfg = [];* >> *cfg.method = 'interactive';* >> *cfg.elec = elec;* >> *cfg.headshape = vol.bnd(1);* >> *elec_aligned = ft_electroderealign(cfg);* >> >> *save elec_aligned elec_aligned* >> >> *% Prepare leadfield* >> *load data_TF* >> *cfg=[];* >> *cfg.vol = vol; %structure with volume conduction model* >> *cfg.elec = elec_aligned;%structure with electrode positions* >> *[grid] = ft_prepare_leadfield(cfg, data_TF);* >> >> *% Find source* >> *cfg = []; * >> *cfg.method = 'dics';* >> *cfg.frequency = 25; * >> *cfg.grid = grid; * >> *cfg.vol = vol;* >> *cfg.latency = .4;%single number in seconds, for time-frequency >> analysis* >> *cfg.dics.projectnoise = 'yes';* >> *cfg.dics.lambda = 0;* >> *cfg.elec = elec_aligned;%structure with electrode positions* >> >> *sourceTF = ft_sourceanalysis(cfg, data_TF);* >> >> >> I am using *wavelet *with a *fourier* output for the time-frequency >> analysis (*data_TF)*. Do you have any idea what might be wrong here? >> >> I also have a more general question. What type of time-frequency data >> can be input to source analysis? *ft_freqanalysis* provides power, power >> and cross-spectra, and complex fourier outputs. But is source-localization >> based on only power data correct? I couldn't find any explanations >> regarding this issue in the tutorial. >> >> I look forward to hearing from anyone who might have ideas about any of >> these issues! >> >> Many thanks, >> >> -- >> Azadeh HajiHosseini >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laszlo.Grand at libd.org Tue Jul 22 02:09:48 2014 From: Laszlo.Grand at libd.org (Laszlo Grand) Date: Tue, 22 Jul 2014 00:09:48 +0000 Subject: [FieldTrip] Preprocessing and analysis of spike and local field potential data - issue with calling certain functions Message-ID: <3284EAED-05DE-4B52-843A-4A4D6437F7D4@libd.org> Hi, I am a new FieldTrip user with advanced Matlab programming skills. I would like to use FieldTrip for analyzing multichannel local field potentials (EEG) and spike data recorded from rats. As I go throughout the ‘Preprocessing and analysis of spike and local field potential data’ tutorial (http://fieldtrip.fcdonders.nl/tutorial/spikefield), I get the following error message after calling the ft_spiketriggeredaverage function in the ‘Computing the spike triggered average LFP’ section: staPost = ft_spiketriggeredaverage(cfg, data_all); the input is raw data with 6 channels and 600 trials Error using ft_checkconfig (line 205) The field cfg.progress is not allowed Error in ft_spiketriggeredaverage (line 72) cfg = ft_checkconfig(cfg, 'allowed', {'timwin', 'spikechannel', 'channel', 'keeptrials', 'feedback', 'latency', 'trials', 'warning'}); In the ‘Computing the phases of spikes relative to the ongoing LFP ‘ section I receive the same error msg after calling the ft_spiketriggeredspectrum function. stsConvol = ft_spiketriggeredspectrum(cfg, data_all); the input is raw data with 6 channels and 600 trials Error using ft_checkconfig (line 205) The field cfg.progress is not allowed Error in ft_spiketriggeredspectrum_convol (line 135) cfg = ft_checkconfig(cfg, 'allowed', {'taper', 'borderspikes', 't_ftimwin', 'foi', 'spikechannel', 'channel', 'taperopt', 'rejectsaturation','tapsmofrq', 'warning'}); Error in ft_spiketriggeredspectrum (line 106) sts = ft_spiketriggeredspectrum_convol(cfg,data); Can anyone help me to understand the cause and resolving this issue? Thank you, LG -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Tue Jul 22 03:50:14 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Tue, 22 Jul 2014 01:50:14 +0000 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: References: <4C11F599-521E-49EA-B84D-6F46BF24A201@flinders.edu.au> <1E693A08-6073-49AE-BDAD-D028B3F73BA3@flinders.edu.au> , Message-ID: <1405993814469.56866@flinders.edu.au> Hello Azadeh, Again, fieldtrip experts please let me know if I am wrong, I dont want to lead azadeh or myself astray. The code I use to create my headmodel is the following: cfg = []; cfg.write = 'no'; cfg.coordsys = 'spm'; cfg.output = { 'scalp', 'skull', 'brain'}; segmentedmri = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'iso2mesh'; cfg.numvertices = 10000; bnd = ft_prepare_mesh( cfg, segmentedmri); % fix mesh [ bnd( 1).pnt, bnd( 1).tri] = meshresample( bnd( 1).pnt, bnd( 1).tri, 1000/size( bnd( 1).pnt, 1)); [ bnd( 2).pnt, bnd( 2).tri] = meshresample( bnd( 2).pnt, bnd( 2).tri, 2000/size( bnd( 2).pnt, 1)); [ bnd( 3).pnt, bnd( 3).tri] = meshresample( bnd( 3).pnt, bnd( 3).tri, 3000/size( bnd( 3).pnt, 1)); for ii = 1:size( bnd), [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'dup'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'isolated'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'deep'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'meshfix'); end % calculate headmodel % reordered to brain skull scalp cfg = []; cfg.method = 'bemcp'; %openmeeg doesnt work with multiple output from ft_volumesegment vol = ft_prepare_headmodel(cfg, bnd); clear bnd Also with your previous issue: ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> beamformer_dics>pinv at 650 [U,S,V] = svd(A,0); Error in ==> beamformer_dics at 339 filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross eqn. 3, use PINV/SVD to cover rank deficient leadfield Error in ==> ft_sourceanalysis at 572 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); Error in ==> test_sourceanalysis at 12 sourceTF = ft_sourceanalysis(cfg, data_TF);​ Can you check the variables lf invCf lf should be: number of channels x 3 invCf should be: number of channels x number of channels Previously I would get an error if the number of channels didnt match up because when I select only EEG channels, it doesnt update the data.elec field. So you may need to check that also. Hopefully this works. tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Azadeh Hajihosseini Sent: Tuesday, 22 July 2014 3:42 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices Hi Tyler, Thanks for responding! Actually, I have 51 electrodes. I also checked the units again and they are all 'mm'. It looks like there is a problem in preparing the head model because when I call the line: vol = ft_prepare_headmodel(cfg, segmentedmri_template), there is this warning: Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN. coming from ft_headmodel_bemcp. Any idea about this? Thanks again!! Azadeh On Sun, Jul 20, 2014 at 2:14 AM, Tyler Grummett > wrote: Also are the units the same for your Headmodel, electrodes and sourcemodel(?) Sent from my iPad On 20 Jul 2014, at 4:08 pm, "Tyler Grummett" > wrote: I don't know if this advice is at all correct but I usually get that error if I've got a relatively small number of electrodes (~29) or a small data set (30 seconds of data). Does that sound familiar? I usually clear all and run it again and it will work eventually haha Sent from my iPad On 19 Jul 2014, at 8:01 am, "Azadeh Hajihosseini" > wrote: Hello FieldTrip members, I am trying to source localize EEG oscillatory activity and have a few problems in constructing the forward model and eventually running the source analysis. I think the problems are related to each other. Here is what happens: 1- When I run the source analysis, I get this error message: ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> beamformer_dics>pinv at 650 [U,S,V] = svd(A,0); Error in ==> beamformer_dics at 339 filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross eqn. 3, use PINV/SVD to cover rank deficient leadfield Error in ==> ft_sourceanalysis at 572 dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), optarg{:}); Error in ==> test_sourceanalysis at 12 sourceTF = ft_sourceanalysis(cfg, data_TF); 2- Checking the leadfiled matrices, I see there are a lot of NaN values. 3- When I visualize the head model I have created, the plots don't look right. The third field, vol.bnd(3), which is supposed to be the brain tissue, looks like a cube. And here are my code lines: % CONSTRUCT A HEAD MODEL from the template mri in FT's template/anatomy mri = ft_read_mri('template\anatomy\single_subj_T1.nii'); mri.coordsys = 'spm'; %SEGMENTATION: cfg = []; cfg.output = {'brain','skull','scalp'}; segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT resliced data save segmentedmri_template segmentedmri_template %CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL) cfg = []; cfg.method ='bemcp'; cfg.tissue ={'brain','skull','scalp'}; % cfg.outputfile = 'template_'; vol = ft_prepare_headmodel(cfg, segmentedmri_template); save vol vol %Visualization of the head model figure; ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp figure; ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull figure; ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks like a cube % Align electrodes elec = ft_read_sens('template\electrode\standard_1020.elc'); % load volume conduction model % load vol; %interactive allignment cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol.bnd(1); elec_aligned = ft_electroderealign(cfg); save elec_aligned elec_aligned % Prepare leadfield load data_TF cfg=[]; cfg.vol = vol; %structure with volume conduction model cfg.elec = elec_aligned;%structure with electrode positions [grid] = ft_prepare_leadfield(cfg, data_TF); % Find source cfg = []; cfg.method = 'dics'; cfg.frequency = 25; cfg.grid = grid; cfg.vol = vol; cfg.latency = .4;%single number in seconds, for time-frequency analysis cfg.dics.projectnoise = 'yes'; cfg.dics.lambda = 0; cfg.elec = elec_aligned;%structure with electrode positions sourceTF = ft_sourceanalysis(cfg, data_TF); I am using wavelet with a fourier output for the time-frequency analysis (data_TF). Do you have any idea what might be wrong here? I also have a more general question. What type of time-frequency data can be input to source analysis? ft_freqanalysis provides power, power and cross-spectra, and complex fourier outputs. But is source-localization based on only power data correct? I couldn't find any explanations regarding this issue in the tutorial. I look forward to hearing from anyone who might have ideas about any of these issues! Many thanks, -- Azadeh HajiHosseini _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Tue Jul 22 14:08:25 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 22 Jul 2014 14:08:25 +0200 Subject: [FieldTrip] phase synchronisation In-Reply-To: References: Message-ID: <53CE5439.2030906@donders.ru.nl> Dear Hwee Ling, this error most likely occurs because your data is rank-deficient. You can check this with the rank-function in Matlab. However, when you are interested in phase synchronisation, there is no need to go down the path you are pursuing. You can just compute nonparametric measures, such as coherence, weighted phase lag index or the like. These work entirely on the cross-spectral density. Check out the help of ft_connectivityanalysis for more information. Best, Jörn On 7/21/2014 3:11 PM, Hwee Ling Lee wrote: > Dear all, > > I'm a bit confused with the computation of phase synchronisation. > > What I'm interested is to compute the phase synchronisation changes in > the second session (i.e. 1 year later) with respect to the first > session. There are 64 EEG channels in my data. I'm interested to > compute the mean phase coherence index. > > From the tutorial on 'analysis of sensor and source level > connectivity, it seems to me one has to first compute the multivariate > autoregressive model, follow by the spectral density function, follow > by non-parametric computation of the cross spectral density function > and finally the connectivity measures. However, when I tried to > compute the multivariate autoregressive model as suggested, I get an > error message: > > Error using chol > Matrix must be positive definite. > > Error in armorf (line 40) > ap(:,:,1) = inv((chol(ap(:,:,1)/Nr*(Nl-1)))'); > > Error in ft_mvaranalysis (line 395) > [ar, tmpnoisecov] = armorf(dat, numel(rpt{rlop}), > size(tmpdata.trial{1},2), cfg.order); > Can someone help me? > > Thanks! > > Cheers, > Hweeling > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Tue Jul 22 14:11:11 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 22 Jul 2014 14:11:11 +0200 Subject: [FieldTrip] Using real time field trip buffer on separate machines In-Reply-To: References: Message-ID: <53CE54DF.7000200@donders.ru.nl> Hi Khang Le, writing to the buffer depends solely in the acqusition software you are using. We created a summary page of different software that are able to communicate with the FieldTrip buffer: http://fieldtrip.fcdonders.nl/development/realtime/implementation I hope this helps. Otherwise, please be more specific in what acquisition software you are using. Best, Jörn On 7/21/2014 5:21 PM, Khang Le wrote: > Hi everyone, > > I am currently attempting to use the field trip buffer, and I have > been able to have it running on a single computer with two matlab > instances, but for complicated reasons, I must use it with two computers. > > So the setup that I need to produce is to have one computer acquire > data and write it to a remote server/virtual machine while my vm on > the remote server reads the data and subsequently processes it. > > For right now, I am having trouble figuring out how to point my > acquisition computer to write data to the buffer on the remote server. > I know there is a possibility that I may have to change a little of > the source code. If anyone has done this before or can assist, I would > greatly appreciate it! > > Thanks, > > Khang > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Tue Jul 22 14:26:27 2014 From: jm.horschig at donders.ru.nl (=?windows-1252?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Tue, 22 Jul 2014 14:26:27 +0200 Subject: [FieldTrip] Preprocessing and analysis of spike and local field potential data - issue with calling certain functions In-Reply-To: <3284EAED-05DE-4B52-843A-4A4D6437F7D4@libd.org> References: <3284EAED-05DE-4B52-843A-4A4D6437F7D4@libd.org> Message-ID: <53CE5873.9010101@donders.ru.nl> Hi Laszlo, this is a bug in the spike-toolbox, because we made some changes to FieldTrip. The spike toolbox explicitly checks what fields are in the cfg and whether the cfg are used in that function - however after FieldTrip has modified the cfg itself already. Thus, in this case, some other FieldTrip function has added cfg.progress, and the program code in ft_spikeXXX was not updated to account for that. As the functions are all open source, you can easily modify them yourself so that the function will work in the presence cfg.progress. Apart from that, we have a bugzilla system: http://bugzilla.fcdonders.nl/ Would you mind registering and posting your mail as a bug? Then we (aka Martin Vinck) can fix this bug, and won't forget this issue any time soon ;) Best, Jörn On 7/22/2014 2:09 AM, Laszlo Grand wrote: > Hi, > > I am a new FieldTrip user with advanced Matlab programming skills. I > would like to use FieldTrip for analyzing multichannel local field > potentials (EEG) and spike data recorded from rats. > As I go throughout the ‘Preprocessing and analysis of spike and local > field potential data’ tutorial > (http://fieldtrip.fcdonders.nl/tutorial/spikefield), I get the > following error message after calling the ft_spiketriggeredaverage > function in the ‘Computing the spike triggered average LFP’ section: > > *staPost = ft_spiketriggeredaverage(cfg, data_all);* > the input is raw data with 6 channels and 600 trials > Error using ft_checkconfig (line 205) > The field cfg.progress is not allowed > > > Error in ft_spiketriggeredaverage (line 72) > cfg = ft_checkconfig(cfg, 'allowed', {'timwin', 'spikechannel', 'channel', > 'keeptrials', 'feedback', 'latency', 'trials', 'warning'}); > > > > In the ‘Computing the phases of spikes relative to the ongoing LFP ‘ > section I receive the same error msg after calling the > ft_spiketriggeredspectrum function. > * > * > *stsConvol = ft_spiketriggeredspectrum(cfg, data_all);* > > the input is raw data with 6 channels and 600 trials > Error using ft_checkconfig (line 205) > The field cfg.progress is not allowed > > > Error in ft_spiketriggeredspectrum_convol (line 135) > cfg = ft_checkconfig(cfg, 'allowed', {'taper', 'borderspikes', > 't_ftimwin', > 'foi', 'spikechannel', 'channel', 'taperopt', > 'rejectsaturation','tapsmofrq', 'warning'}); > > Error in ft_spiketriggeredspectrum (line 106) > sts = ft_spiketriggeredspectrum_convol(cfg,data); > > > Can anyone help me to understand the cause and resolving this issue? > > Thank you, > > LG > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From thomas.wunderle at esi-frankfurt.de Tue Jul 22 17:01:38 2014 From: thomas.wunderle at esi-frankfurt.de (Thomas Wunderle) Date: Tue, 22 Jul 2014 17:01:38 +0200 Subject: [FieldTrip] Preprocessing and analysis of spike and local field potential data - issue with calling certain functions In-Reply-To: <53CE5873.9010101@donders.ru.nl> References: <3284EAED-05DE-4B52-843A-4A4D6437F7D4@libd.org> <53CE5873.9010101@donders.ru.nl> Message-ID: <53CE7CD2.4040400@esi-frankfurt.de> Hi all, I put that bug already two weeks ago into the bugzilla, see http://bugzilla.fcdonders.nl/show_bug.cgi?id=2641 You can add the line 'progress' in ft_checkconfig to make it work again. Best, Thomas Am 22.07.2014 14:26, schrieb "Jörn M. Horschig": > Hi Laszlo, > > this is a bug in the spike-toolbox, because we made some changes to > FieldTrip. The spike toolbox explicitly checks what fields are in the > cfg and whether the cfg are used in that function - however after > FieldTrip has modified the cfg itself already. Thus, in this case, > some other FieldTrip function has added cfg.progress, and the program > code in ft_spikeXXX was not updated to account for that. As the > functions are all open source, you can easily modify them yourself so > that the function will work in the presence cfg.progress. > > Apart from that, we have a bugzilla system: > http://bugzilla.fcdonders.nl/ > Would you mind registering and posting your mail as a bug? Then we > (aka Martin Vinck) can fix this bug, and won't forget this issue any > time soon ;) > > Best, > Jörn > > On 7/22/2014 2:09 AM, Laszlo Grand wrote: >> Hi, >> >> I am a new FieldTrip user with advanced Matlab programming skills. I >> would like to use FieldTrip for analyzing multichannel local field >> potentials (EEG) and spike data recorded from rats. >> As I go throughout the ‘Preprocessing and analysis of spike and local >> field potential data’ tutorial >> (http://fieldtrip.fcdonders.nl/tutorial/spikefield), I get the >> following error message after calling the ft_spiketriggeredaverage >> function in the ‘Computing the spike triggered average LFP’ section: >> >> *staPost = ft_spiketriggeredaverage(cfg, data_all);* >> the input is raw data with 6 channels and 600 trials >> Error using ft_checkconfig (line 205) >> The field cfg.progress is not allowed >> >> >> Error in ft_spiketriggeredaverage (line 72) >> cfg = ft_checkconfig(cfg, 'allowed', {'timwin', 'spikechannel', >> 'channel', >> 'keeptrials', 'feedback', 'latency', 'trials', 'warning'}); >> >> >> >> In the ‘Computing the phases of spikes relative to the ongoing LFP ‘ >> section I receive the same error msg after calling the >> ft_spiketriggeredspectrum function. >> * >> * >> *stsConvol = ft_spiketriggeredspectrum(cfg, data_all);* >> >> the input is raw data with 6 channels and 600 trials >> Error using ft_checkconfig (line 205) >> The field cfg.progress is not allowed >> >> >> Error in ft_spiketriggeredspectrum_convol (line 135) >> cfg = ft_checkconfig(cfg, 'allowed', {'taper', 'borderspikes', >> 't_ftimwin', >> 'foi', 'spikechannel', 'channel', 'taperopt', >> 'rejectsaturation','tapsmofrq', 'warning'}); >> >> Error in ft_spiketriggeredspectrum (line 106) >> sts = ft_spiketriggeredspectrum_convol(cfg,data); >> >> >> Can anyone help me to understand the cause and resolving this issue? >> >> Thank you, >> >> LG >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- ----- Dr. Thomas Wunderle Ernst Strüngmann Institute (ESI) for Neuroscience in Cooperation with Max Planck Society Deutschordenstrasse 46 60528 Frankfurt am Main, Germany www.esi-frankfurt.de thomas.wunderle at esi-frankfurt.de Tel: +49 69 96769 516 Fax: +49 69 96769 555 Sitz der Gesellschaft: Frankfurt am Main Registergericht: Amtsgericht Frankfurt - HRB 84266 Geschäftsführer: Prof. Dr. Pascal Fries From khangsile at gmail.com Wed Jul 23 09:56:03 2014 From: khangsile at gmail.com (Khang Le) Date: Wed, 23 Jul 2014 09:56:03 +0200 Subject: [FieldTrip] Using real time field trip buffer on separate machines In-Reply-To: <53CE54DF.7000200@donders.ru.nl> References: <53CE54DF.7000200@donders.ru.nl> Message-ID: Hi Jörn, The current system I am using is an in-house made NIRS system. We acquire the data from the NIRS device through a simple matlab script. Since I need to do real time analysis on it and since Matlab is single-threaded I was planning on modifying the acquisition matlab script to write to the buffer as it is acquiring data by using the ft_write_data function given in the fileio folder. Thanks, Khang On Tue, Jul 22, 2014 at 2:11 PM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Hi Khang Le, > > writing to the buffer depends solely in the acqusition software you are > using. We created a summary page of different software that are able to > communicate with the FieldTrip buffer: > http://fieldtrip.fcdonders.nl/development/realtime/implementation > I hope this helps. Otherwise, please be more specific in what acquisition > software you are using. > > Best, > Jörn > > > > On 7/21/2014 5:21 PM, Khang Le wrote: > >> Hi everyone, >> >> I am currently attempting to use the field trip buffer, and I have been >> able to have it running on a single computer with two matlab instances, but >> for complicated reasons, I must use it with two computers. >> >> So the setup that I need to produce is to have one computer acquire data >> and write it to a remote server/virtual machine while my vm on the remote >> server reads the data and subsequently processes it. >> >> For right now, I am having trouble figuring out how to point my >> acquisition computer to write data to the buffer on the remote server. I >> know there is a possibility that I may have to change a little of the >> source code. If anyone has done this before or can assist, I would greatly >> appreciate it! >> >> Thanks, >> >> Khang >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jul 23 10:24:00 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 23 Jul 2014 10:24:00 +0200 Subject: [FieldTrip] Using real time field trip buffer on separate machines In-Reply-To: References: <53CE54DF.7000200@donders.ru.nl> Message-ID: <53CF7120.6070608@donders.ru.nl> Hi Khang Le, then maybe the ft_realtime_signalproxy can serve as a template to write data from the matlab script directly into the buffer: http://fieldtrip.fcdonders.nl/reference/ft_realtime_signalproxy Best, Jörn On 7/23/2014 9:56 AM, Khang Le wrote: > Hi Jörn, > > The current system I am using is an in-house made NIRS system. We > acquire the data from the NIRS device through a simple matlab script. > Since I need to do real time analysis on it and since Matlab is > single-threaded I was planning on modifying the acquisition matlab > script to write to the buffer as it is acquiring data by using the > ft_write_data function given in the fileio folder. > > Thanks, > Khang > > > On Tue, Jul 22, 2014 at 2:11 PM, "Jörn M. Horschig" > > wrote: > > Hi Khang Le, > > writing to the buffer depends solely in the acqusition software > you are using. We created a summary page of different software > that are able to communicate with the FieldTrip buffer: > http://fieldtrip.fcdonders.nl/development/realtime/implementation > I hope this helps. Otherwise, please be more specific in what > acquisition software you are using. > > Best, > Jörn > > > > On 7/21/2014 5:21 PM, Khang Le wrote: > > Hi everyone, > > I am currently attempting to use the field trip buffer, and I > have been able to have it running on a single computer with > two matlab instances, but for complicated reasons, I must use > it with two computers. > > So the setup that I need to produce is to have one computer > acquire data and write it to a remote server/virtual machine > while my vm on the remote server reads the data and > subsequently processes it. > > For right now, I am having trouble figuring out how to point > my acquisition computer to write data to the buffer on the > remote server. I know there is a possibility that I may have > to change a little of the source code. If anyone has done this > before or can assist, I would greatly appreciate it! > > Thanks, > > Khang > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From d.lozanosoldevilla at fcdonders.ru.nl Wed Jul 23 16:35:23 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Wed, 23 Jul 2014 16:35:23 +0200 (CEST) Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: <178175387.8004228.1406124800670.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> Dear Roey, In my opinion it's definitely not a good idea to compute MNE using 19 sensors. There are studies that have found a drastic localization precision from 31 to 63 electrodes and further improvements till 123: http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) http://www.ncbi.nlm.nih.gov/pubmed/12495765 Although it's very difficult to know the "minimum" number of electrodes needed to accurately localize a given source (it depends on the strength of the source you want to localize, source reconstruction algorithm, data noise...), 19 electrodes are too low to trust the results you can get. best, Diego ----- Original Message ----- >From roeysc at gmail.com Mon Jul 21 11:21:32 2014From: roeysc at gmail.com (Roey Schurr)Date: Mon, 21 Jul 2014 12:21:32 +0300Subject: [FieldTrip] MNE Source Reconstruction Sanity CheckMessage-ID: Dear fieldtrippers,I want to do a sanity check on mne source reconstruction.I'm working on continuous EEG recordings (19 electrodes), estimating thesource reconstruction activity using the *mne* (minimum norm estimate)method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As asanity check for the source reconstruction itself, I wanted to compareconditions in which I could estimate the loci of significant changes, e.g.:rest vs movement of the hand, moving the right hand vs the left hand, etc.I have about 60 seconds of recording for each condition.What I did was:1) Segment the recording of each condition into many "trials" of 2 secondseach.2) For each trial, average the activity in each of the 90 ROIs of the aalatlas (I excluded the cerebellum from the source reconstruction).I was wondering what comparison would be best in this case. Since this isnot Evoked Responses data, I find it hard to find relevant ideas, and wouldlike to hear your thoughts.1) I did a frequency analysis (mtmfft) in conventional bands of interestand ran ft_freqstatistics on the resulting structures (using ttest2 and thebonferoni correction for the multiple comparison problem). This gave someresults, however for most conditions they are not very encouraging (theROIs that showed significant differences were not close to those that Ihave assumed).*QUESTION 1*: do you think this is a proper method? Note that I did not usea frequency based source reconstruction in the first place, because I'multimately interested in the time course in the source space.2) I was wondering if a cluster based permutation test is impossible to usehere, since this is a continuous recording, so clustering according to timeadjacency seems irrelevant.*QUESTION 2*: is it possible to use a cluster based statistical test here?If so, it could be better than a-priori averaging the source activity inthe atlas ROIs, which could mask some of the effects, if they are locatedin a small area.3) Another possibility is looking at the data itself. Unfortunately Iencountered some problems using ft_sourcemovie, though this is a subjectfor a different thread.Any thoughts and advice are highly appreciated!Thank you for taking the time,roey -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Thu Jul 24 10:07:17 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Thu, 24 Jul 2014 08:07:17 +0000 Subject: [FieldTrip] interpolating source then using sourceplot Message-ID: <1406189237804.86816@flinders.edu.au> Hello fieldtrip experts, I just have a question about source interpolation and sourceplot. For some reason or another, my data appears to generate a lot of power at cerebellar regions and some that dont correspond to any brain regions at all. So what I tried was to NaN the power that correspond to the cerebellar regions too see if other brain regions would light up and I still appear to get power at those positions in sourceplot. Ive made sure that all variables are the same coordinate system and have the same units (spm, mm). My code is as follows: % read in mri file template_mri = ft_read_mri( fullfile( matlabrootpath, 'Matlab', 'fieldtrip', ... 'template', 'headmodel', 'standard_mri.mat')); template_mri = ft_convert_coordsys( template_mri, 'spm'); template_mri = ft_volumenormalise( [], template_mri); template_mri = ft_volumereslice( [], template_mri); % map beamformer source locations onto an anatomical label in an atlas cfg = []; cfg.interpmethod = 'nearest'; cfg.parameter = 'tissue'; sourcemodel2 = ft_sourceinterpolate( cfg, atlas, sourcemodel); % NaN power at cerebellar regions temp_source = source; label = lower( atlas.tissuelabel); for iii = 91:numel( label), atlas_sources = find( sourcemodel2.tissue == iii); temp_source.avg.pow( atlas_sources) = NaN; end % interpolate source to mri parameter = 'avg.pow'; cfg = []; % cfg.voxelcoord = 'no'; cfg.downsample = 2; cfg.parameter = parameter; cfg.interpmethod = 'nearest'; sourceInt = ft_sourceinterpolate( cfg, temp_source, template_mri); % Plot interpolated data plot_method = 'slice'; cfg = []; cfg.method = plot_method; % slice ortho surface cfg.funparameter = parameter; cfg.atlas = atlas; cfg.crosshair = 'yes'; ft_sourceplot( cfg, sourceInt); Attached is the sourceplot figure that results Kind regards, Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sourceplot example.png Type: image/png Size: 46707 bytes Desc: sourceplot example.png URL: From pierpaolo12croce at gmail.com Thu Jul 24 12:32:56 2014 From: pierpaolo12croce at gmail.com (Pierpaolo Croce) Date: Thu, 24 Jul 2014 12:32:56 +0200 Subject: [FieldTrip] ft_prepare_mesh Message-ID: Hi all, my question is about "ft_prepare_mesh" function. can i use this function to create a mesh for a different part of body (for example an arm)? or it run only for headmodels? best -- PC -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Thu Jul 24 17:34:39 2014 From: j.herring at fcdonders.ru.nl (E688205) Date: Thu, 24 Jul 2014 17:34:39 +0200 (CEST) Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> References: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <790E6AB9-6372-4F70-9B98-2DE6E084F552@donders.ru.nl> Dear Roey, To add to Diego's comments, since you are dealing with EEG data a single sphere headmodel is not a good idea because it does not take into account the differences in conductivity between the skull, scalp, and brain. This is not a problem for MEG but is important for EEG. Therefore it is better to use, for example, a BEM head model. Best, Jim > On 23 jul. 2014, at 16:38, "Lozano Soldevilla, D. (Diego)" wrote: > > Dear Roey, > > In my opinion it's definitely not a good idea to compute MNE using 19 sensors. There are studies that have found a drastic localization precision from 31 to 63 electrodes and further improvements till 123: > > http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) > http://www.ncbi.nlm.nih.gov/pubmed/12495765 > > Although it's very difficult to know the "minimum" number of electrodes needed to accurately localize a given source (it depends on the strength of the source you want to localize, source reconstruction algorithm, data noise...), 19 electrodes are too low to trust the results you can get. > > best, > > Diego > > > From roeysc at gmail.com Mon Jul 21 11:21:32 2014 > From: roeysc at gmail.com (Roey Schurr) > Date: Mon, 21 Jul 2014 12:21:32 +0300 > Subject: [FieldTrip] MNE Source Reconstruction Sanity Check > Message-ID: > > Dear fieldtrippers, > > > > I want to do a sanity check on mne source reconstruction. > > I'm working on continuous EEG recordings (19 electrodes), estimating the > source reconstruction activity using the *mne* (minimum norm estimate) > method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As a > sanity check for the source reconstruction itself, I wanted to compare > conditions in which I could estimate the loci of significant changes, e.g.: > rest vs movement of the hand, moving the right hand vs the left hand, etc. > I have about 60 seconds of recording for each condition. > > > > What I did was: > > 1) Segment the recording of each condition into many "trials" of 2 seconds > each. > > 2) For each trial, average the activity in each of the 90 ROIs of the aal > atlas (I excluded the cerebellum from the source reconstruction). > > > > I was wondering what comparison would be best in this case. Since this is > not Evoked Responses data, I find it hard to find relevant ideas, and would > like to hear your thoughts. > > > > 1) I did a frequency analysis (mtmfft) in conventional bands of interest > and ran ft_freqstatistics on the resulting structures (using ttest2 and the > bonferoni correction for the multiple comparison problem). This gave some > results, however for most conditions they are not very encouraging (the > ROIs that showed significant differences were not close to those that I > have assumed). > > > > *QUESTION 1*: do you think this is a proper method? Note that I did not use > a frequency based source reconstruction in the first place, because I'm > ultimately interested in the time course in the source space. > > > > 2) I was wondering if a cluster based permutation test is impossible to use > here, since this is a continuous recording, so clustering according to time > adjacency seems irrelevant. > > > > *QUESTION 2*: is it possible to use a cluster based statistical test here? > If so, it could be better than a-priori averaging the source activity in > the atlas ROIs, which could mask some of the effects, if they are located > in a small area. > > > > 3) Another possibility is looking at the data itself. Unfortunately I > encountered some problems using ft_sourcemovie, though this is a subject > for a different thread. > > > > Any thoughts and advice are highly appreciated! > > Thank you for taking the time, > > roey > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laura.Rueda at faber.kuleuven.be Thu Jul 24 17:36:59 2014 From: Laura.Rueda at faber.kuleuven.be (Laura Rueda Delgado) Date: Thu, 24 Jul 2014 15:36:59 +0000 Subject: [FieldTrip] Group analysis at source level Message-ID: Dear fieldtrip users, I'm working with source estimations of EEG data. At the moment, I have estimated the sources at the individual level with individual MRIs. I've used ft_sourceinterpolate and ft_volumenormalise to transform the resulting estimation maps into a template for comparison, and I do this for every subject: cfg = []; cfg.parameter = 'avg.pow'; source = ft_sourceinterpolate(cfg, source, mri); cfg = []; cfg.template = '\spm8\templates\T1.nii'; cfg.parameter = 'all'; cfg.nonlinear = 'yes'; cfg.coordsys = 'spm'; source = ft_volumenormalise(cfg, source); Once I have the estimated sources for all the subjects, I use ft_sourcestatistics: cfg = []; cfg.dim = sourcePre_con{1}.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'avg.pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 'all'; cfg.alpha = 0.05; cfg.tail = 0; cfg.design(1,:) = [1:num 1:num]; cfg.design(2,:) = [ones(1,num) ones(1,num)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg,sourcePost_con{:}, sourcePre_con{:}); And I get this error: Reference to non-existent field 'pos'. Error in statistics_wrapper>get_source_avg (line 643) fprintf('only selecting voxels inside the brain for statistics (%.1f%%)\n', 100*length(varargin{1}.inside)/size(varargin{1}.pos,1)); Error in statistics_wrapper (line 206) [dat, cfg] = get_source_avg(cfg, varargin{:}); Error in ft_sourcestatistics (line 107) [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I check the data structure and the structure of the sources at the individual level, before interpolating and normalising has the pos field, but after these steps, it's gone. How can I work around this error? Do I have to keep the pos field and transform it according to the template? Thank you in advance for your help. Best regards, Laura Rueda -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Thu Jul 24 18:28:41 2014 From: roeysc at gmail.com (Roey Schurr) Date: Thu, 24 Jul 2014 19:28:41 +0300 Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> References: <178175387.8004228.1406124800670.JavaMail.root@sculptor.zimbra.ru.nl> <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Dear Diego, Thank you very much for your reply! I am familiar with these two studies (which I came to know through the wonderful Electrical Neuroimaging book by Cristoph Michel. Unfortunately, the data I have is clinical data that was recorded using only 19 electrodes. Localization precision is indeed too low in that case, but I am hoping it would suffice for analyzing certain aspects of the signal (e.g. power spectrum) on a large enough ROI, or a network of ROIs that covers a large portion of the brain. Thank you once again, roey On Wed, Jul 23, 2014 at 5:35 PM, Lozano Soldevilla, D. (Diego) < d.lozanosoldevilla at fcdonders.ru.nl> wrote: > Dear Roey, > > In my opinion it's definitely not a good idea to compute MNE using 19 > sensors. There are studies that have found a drastic localization precision > from 31 to 63 electrodes and further improvements till 123: > > http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) > http://www.ncbi.nlm.nih.gov/pubmed/12495765 > > Although it's very difficult to know the "minimum" number of electrodes > needed to accurately localize a given source (it depends on the strength of > the source you want to localize, source reconstruction algorithm, data > noise...), 19 electrodes are too low to trust the results you can get. > > best, > > Diego > > > ------------------------------ > > From roeysc at gmail.com Mon Jul 21 11:21:32 2014 > From: roeysc at gmail.com (Roey Schurr) > Date: Mon, 21 Jul 2014 12:21:32 +0300 > Subject: [FieldTrip] MNE Source Reconstruction Sanity Check > Message-ID: > > Dear fieldtrippers, > > > > I want to do a sanity check on mne source reconstruction. > > I'm working on continuous EEG recordings (19 electrodes), estimating the > source reconstruction activity using the *mne* (minimum norm estimate) > method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As a > sanity check for the source reconstruction itself, I wanted to compare > conditions in which I could estimate the loci of significant changes, e.g.: > rest vs movement of the hand, moving the right hand vs the left hand, etc. > I have about 60 seconds of recording for each condition. > > > > What I did was: > > 1) Segment the recording of each condition into many "trials" of 2 seconds > each. > > 2) For each trial, average the activity in each of the 90 ROIs of the aal > atlas (I excluded the cerebellum from the source reconstruction). > > > > I was wondering what comparison would be best in this case. Since this is > not Evoked Responses data, I find it hard to find relevant ideas, and would > like to hear your thoughts. > > > > 1) I did a frequency analysis (mtmfft) in conventional bands of interest > and ran ft_freqstatistics on the resulting structures (using ttest2 and the > bonferoni correction for the multiple comparison problem). This gave some > results, however for most conditions they are not very encouraging (the > ROIs that showed significant differences were not close to those that I > have assumed). > > > > *QUESTION 1*: do you think this is a proper method? Note that I did not use > a frequency based source reconstruction in the first place, because I'm > ultimately interested in the time course in the source space. > > > > 2) I was wondering if a cluster based permutation test is impossible to use > here, since this is a continuous recording, so clustering according to time > adjacency seems irrelevant. > > > > *QUESTION 2*: is it possible to use a cluster based statistical test here? > If so, it could be better than a-priori averaging the source activity in > the atlas ROIs, which could mask some of the effects, if they are located > in a small area. > > > > 3) Another possibility is looking at the data itself. Unfortunately I > encountered some problems using ft_sourcemovie, though this is a subject > for a different thread. > > > > Any thoughts and advice are highly appreciated! > > Thank you for taking the time, > > roey > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Thu Jul 24 20:50:25 2014 From: roeysc at gmail.com (Roey Schurr) Date: Thu, 24 Jul 2014 21:50:25 +0300 Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: <790E6AB9-6372-4F70-9B98-2DE6E084F552@donders.ru.nl> References: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> <790E6AB9-6372-4F70-9B98-2DE6E084F552@donders.ru.nl> Message-ID: Dear Jim, Thank you for drawing my attention to this problem. I have actually tried building a realistic head model using OPENMEG but encountered some compitability problems since our lab does not use Linux. This is indeed one of the most important (short) future tasks - being able to use such realistic head models. Best, roey On Thu, Jul 24, 2014 at 6:34 PM, E688205 wrote: > Dear Roey, > > To add to Diego's comments, since you are dealing with EEG data a single > sphere headmodel is not a good idea because it does not take into account > the differences in conductivity between the skull, scalp, and brain. This > is not a problem for MEG but is important for EEG. Therefore it is better > to use, for example, a BEM head model. > > Best, > > Jim > > On 23 jul. 2014, at 16:38, "Lozano Soldevilla, D. (Diego)" < > d.lozanosoldevilla at fcdonders.ru.nl> wrote: > > Dear Roey, > > In my opinion it's definitely not a good idea to compute MNE using 19 > sensors. There are studies that have found a drastic localization precision > from 31 to 63 electrodes and further improvements till 123: > > http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) > http://www.ncbi.nlm.nih.gov/pubmed/12495765 > > Although it's very difficult to know the "minimum" number of electrodes > needed to accurately localize a given source (it depends on the strength of > the source you want to localize, source reconstruction algorithm, data > noise...), 19 electrodes are too low to trust the results you can get. > > best, > > Diego > > > ------------------------------ > > From roeysc at gmail.com Mon Jul 21 11:21:32 2014 > From: roeysc at gmail.com (Roey Schurr) > Date: Mon, 21 Jul 2014 12:21:32 +0300 > Subject: [FieldTrip] MNE Source Reconstruction Sanity Check > Message-ID: > > Dear fieldtrippers, > > > > I want to do a sanity check on mne source reconstruction. > > I'm working on continuous EEG recordings (19 electrodes), estimating the > source reconstruction activity using the *mne* (minimum norm estimate) > method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As a > sanity check for the source reconstruction itself, I wanted to compare > conditions in which I could estimate the loci of significant changes, e.g.: > rest vs movement of the hand, moving the right hand vs the left hand, etc. > I have about 60 seconds of recording for each condition. > > > > What I did was: > > 1) Segment the recording of each condition into many "trials" of 2 seconds > each. > > 2) For each trial, average the activity in each of the 90 ROIs of the aal > atlas (I excluded the cerebellum from the source reconstruction). > > > > I was wondering what comparison would be best in this case. Since this is > not Evoked Responses data, I find it hard to find relevant ideas, and would > like to hear your thoughts. > > > > 1) I did a frequency analysis (mtmfft) in conventional bands of interest > and ran ft_freqstatistics on the resulting structures (using ttest2 and the > bonferoni correction for the multiple comparison problem). This gave some > results, however for most conditions they are not very encouraging (the > ROIs that showed significant differences were not close to those that I > have assumed). > > > > *QUESTION 1*: do you think this is a proper method? Note that I did not use > a frequency based source reconstruction in the first place, because I'm > ultimately interested in the time course in the source space. > > > > 2) I was wondering if a cluster based permutation test is impossible to use > here, since this is a continuous recording, so clustering according to time > adjacency seems irrelevant. > > > > *QUESTION 2*: is it possible to use a cluster based statistical test here? > If so, it could be better than a-priori averaging the source activity in > the atlas ROIs, which could mask some of the effects, if they are located > in a small area. > > > > 3) Another possibility is looking at the data itself. Unfortunately I > encountered some problems using ft_sourcemovie, though this is a subject > for a different thread. > > > > Any thoughts and advice are highly appreciated! > > Thank you for taking the time, > > roey > > _______________________________________________ > > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Fri Jul 25 02:20:18 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Fri, 25 Jul 2014 00:20:18 +0000 Subject: [FieldTrip] Group analysis at source level In-Reply-To: References: Message-ID: <1406247611055.41098@flinders.edu.au> Hey laura, Im not 100% sure of what I am about to tell you, as I am not an expert, but I think ft_sourceinterpolate is used in tutorials to display results on an mri model basically. One such tutorial is: http://fieldtrip.fcdonders.nl/tutorial/beamformingextended If you want to be consistent over subjects, I would use a sourcemodel when calculating your source variable, like in: http://fieldtrip.fcdonders.nl/faq/how_can_i_map_source_locations_between_two_different_representations?s[]=atlas and: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=subject&s[]=grid&s[]=mni? I really hope this helps, it helped me :) Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Laura Rueda Delgado Sent: Friday, 25 July 2014 1:06 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Group analysis at source level Dear fieldtrip users, I'm working with source estimations of EEG data. At the moment, I have estimated the sources at the individual level with individual MRIs. I've used ft_sourceinterpolate and ft_volumenormalise to transform the resulting estimation maps into a template for comparison, and I do this for every subject: cfg = []; cfg.parameter = 'avg.pow'; source = ft_sourceinterpolate(cfg, source, mri); cfg = []; cfg.template = '\spm8\templates\T1.nii'; cfg.parameter = 'all'; cfg.nonlinear = 'yes'; cfg.coordsys = 'spm'; source = ft_volumenormalise(cfg, source); Once I have the estimated sources for all the subjects, I use ft_sourcestatistics: cfg = []; cfg.dim = sourcePre_con{1}.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'avg.pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 'all'; cfg.alpha = 0.05; cfg.tail = 0; cfg.design(1,:) = [1:num 1:num]; cfg.design(2,:) = [ones(1,num) ones(1,num)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg,sourcePost_con{:}, sourcePre_con{:}); And I get this error: Reference to non-existent field 'pos'. Error in statistics_wrapper>get_source_avg (line 643) fprintf('only selecting voxels inside the brain for statistics (%.1f%%)\n', 100*length(varargin{1}.inside)/size(varargin{1}.pos,1)); Error in statistics_wrapper (line 206) [dat, cfg] = get_source_avg(cfg, varargin{:}); Error in ft_sourcestatistics (line 107) [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I check the data structure and the structure of the sources at the individual level, before interpolating and normalising has the pos field, but after these steps, it's gone. How can I work around this error? Do I have to keep the pos field and transform it according to the template? Thank you in advance for your help. Best regards, Laura Rueda -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jul 25 08:46:19 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 25 Jul 2014 08:46:19 +0200 Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: References: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> <790E6AB9-6372-4F70-9B98-2DE6E084F552@donders.ru.nl> Message-ID: <53D1FD3B.7040600@donders.ru.nl> Dear Roey, I agreet that this is a bad idea - independently of what result you will get, the error is just too big to draw any reliable conclusions. Imho, you can better try using ICA to decompose your data into components. Concerning the headmodel, there is a standard BEM headmodel template available in FieldTrip. Best, Jörn On 7/24/2014 8:50 PM, Roey Schurr wrote: > Dear Jim, > Thank you for drawing my attention to this problem. I have actually > tried building a realistic head model using OPENMEG but encountered > some compitability problems since our lab does not use Linux. This is > indeed one of the most important (short) future tasks - being able to > use such realistic head models. > Best, > roey > > > On Thu, Jul 24, 2014 at 6:34 PM, E688205 > wrote: > > Dear Roey, > > To add to Diego's comments, since you are dealing with EEG data a > single sphere headmodel is not a good idea because it does not > take into account the differences in conductivity between the > skull, scalp, and brain. This is not a problem for MEG but is > important for EEG. Therefore it is better to use, for example, a > BEM head model. > > Best, > > Jim > > On 23 jul. 2014, at 16:38, "Lozano Soldevilla, D. (Diego)" > > wrote: > >> Dear Roey, >> >> In my opinion it's definitely not a good idea to compute MNE >> using 19 sensors. There are studies that have found a drastic >> localization precision from 31 to 63 electrodes and further >> improvements till 123: >> >> http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) >> http://www.ncbi.nlm.nih.gov/pubmed/12495765 >> >> Although it's very difficult to know the "minimum" number of >> electrodes needed to accurately localize a given source (it >> depends on the strength of the source you want to localize, >> source reconstruction algorithm, data noise...), 19 electrodes >> are too low to trust the results you can get. >> >> best, >> >> Diego >> >> >> ------------------------------------------------------------------------ >> From roeysc atgmail.com Mon Jul 21 11:21:32 2014 >> From: roeysc atgmail.com (Roey Schurr) >> Date: Mon, 21 Jul 2014 12:21:32 +0300 >> Subject: [FieldTrip] MNE Source Reconstruction Sanity Check >> Message-ID: > >> >> Dear fieldtrippers, >> >> >> >> I want to do a sanity check on mne source reconstruction. >> >> I'm working on continuous EEG recordings (19 electrodes), estimating the >> source reconstruction activity using the *mne* (minimum norm estimate) >> method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As a >> sanity check for the source reconstruction itself, I wanted to compare >> conditions in which I could estimate the loci of significant changes, e.g.: >> rest vs movement of the hand, moving the right hand vs the left hand, etc. >> I have about 60 seconds of recording for each condition. >> >> >> >> What I did was: >> >> 1) Segment the recording of each condition into many "trials" of 2 seconds >> each. >> >> 2) For each trial, average the activity in each of the 90 ROIs of the aal >> atlas (I excluded the cerebellum from the source reconstruction). >> >> >> >> I was wondering what comparison would be best in this case. Since this is >> not Evoked Responses data, I find it hard to find relevant ideas, and would >> like to hear your thoughts. >> >> >> >> 1) I did a frequency analysis (mtmfft) in conventional bands of interest >> and ran ft_freqstatistics on the resulting structures (using ttest2 and the >> bonferoni correction for the multiple comparison problem). This gave some >> results, however for most conditions they are not very encouraging (the >> ROIs that showed significant differences were not close to those that I >> have assumed). >> >> >> >> *QUESTION 1*: do you think this is a proper method? Note that I did not use >> a frequency based source reconstruction in the first place, because I'm >> ultimately interested in the time course in the source space. >> >> >> >> 2) I was wondering if a cluster based permutation test is impossible to use >> here, since this is a continuous recording, so clustering according to time >> adjacency seems irrelevant. >> >> >> >> *QUESTION 2*: is it possible to use a cluster based statistical test here? >> If so, it could be better than a-priori averaging the source activity in >> the atlas ROIs, which could mask some of the effects, if they are located >> in a small area. >> >> >> >> 3) Another possibility is looking at the data itself. Unfortunately I >> encountered some problems using ft_sourcemovie, though this is a subject >> for a different thread. >> >> >> >> Any thoughts and advice are highly appreciated! >> >> Thank you for taking the time, >> >> roey >> _______________________________________________ >> >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From roeysc at gmail.com Fri Jul 25 09:04:29 2014 From: roeysc at gmail.com (Roey Schurr) Date: Fri, 25 Jul 2014 10:04:29 +0300 Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: <53D1FD3B.7040600@donders.ru.nl> References: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> <790E6AB9-6372-4F70-9B98-2DE6E084F552@donders.ru.nl> <53D1FD3B.7040600@donders.ru.nl> Message-ID: Dear Jörn, Thank you very much for your input! Indeed, since I'm now using template MRIs and not individual ones (for the time being), using the template BEM headodel makes perfect sense. Thank you. Regarding the ICA decomposition, as long as I use this 19 electrodes data, this could be a good compromise. The original goal is being able to get some anatomically significant results. Even though interpolated scalp maps (and microstates) are anatomical in a sense, networks based on the inverse solution are still the final goal. For this it seems like I will indeed need a different data set. Best, roey On Fri, Jul 25, 2014 at 9:46 AM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Roey, > > I agreet that this is a bad idea - independently of what result you will > get, the error is just too big to draw any reliable conclusions. Imho, you > can better try using ICA to decompose your data into components. > > Concerning the headmodel, there is a standard BEM headmodel template > available in FieldTrip. > > Best, > Jörn > > > On 7/24/2014 8:50 PM, Roey Schurr wrote: > >> Dear Jim, >> Thank you for drawing my attention to this problem. I have actually tried >> building a realistic head model using OPENMEG but encountered some >> compitability problems since our lab does not use Linux. This is indeed one >> of the most important (short) future tasks - being able to use such >> realistic head models. >> Best, >> roey >> >> >> On Thu, Jul 24, 2014 at 6:34 PM, E688205 > > wrote: >> >> Dear Roey, >> >> To add to Diego's comments, since you are dealing with EEG data a >> single sphere headmodel is not a good idea because it does not >> take into account the differences in conductivity between the >> skull, scalp, and brain. This is not a problem for MEG but is >> important for EEG. Therefore it is better to use, for example, a >> BEM head model. >> >> Best, >> >> Jim >> >> On 23 jul. 2014, at 16:38, "Lozano Soldevilla, D. (Diego)" >> > > wrote: >> >> Dear Roey, >>> >>> In my opinion it's definitely not a good idea to compute MNE >>> using 19 sensors. There are studies that have found a drastic >>> localization precision from 31 to 63 electrodes and further >>> improvements till 123: >>> >>> http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) >>> http://www.ncbi.nlm.nih.gov/pubmed/12495765 >>> >>> Although it's very difficult to know the "minimum" number of >>> electrodes needed to accurately localize a given source (it >>> depends on the strength of the source you want to localize, >>> source reconstruction algorithm, data noise...), 19 electrodes >>> are too low to trust the results you can get. >>> >>> best, >>> >>> Diego >>> >>> >>> ------------------------------------------------------------ >>> ------------ >>> From roeysc atgmail.com Mon Jul 21 11:21:32 >>> 2014 >>> From: roeysc atgmail.com (Roey Schurr) >>> >>> Date: Mon, 21 Jul 2014 12:21:32 +0300 >>> Subject: [FieldTrip] MNE Source Reconstruction Sanity Check >>> Message-ID: >> mail.gmail.com >> AQ_W43cHF_8J2b+rNyzd55x4aRviw at mail.gmail.com>> >>> >>> >>> Dear fieldtrippers, >>> >>> >>> >>> I want to do a sanity check on mne source reconstruction. >>> >>> I'm working on continuous EEG recordings (19 electrodes), estimating >>> the >>> source reconstruction activity using the *mne* (minimum norm >>> estimate) >>> method, a *template MRI* (Colin27) and a *singlesphere* headmodel. >>> As a >>> sanity check for the source reconstruction itself, I wanted to >>> compare >>> conditions in which I could estimate the loci of significant >>> changes, e.g.: >>> rest vs movement of the hand, moving the right hand vs the left >>> hand, etc. >>> I have about 60 seconds of recording for each condition. >>> >>> >>> >>> What I did was: >>> >>> 1) Segment the recording of each condition into many "trials" of 2 >>> seconds >>> each. >>> >>> 2) For each trial, average the activity in each of the 90 ROIs of >>> the aal >>> atlas (I excluded the cerebellum from the source reconstruction). >>> >>> >>> >>> I was wondering what comparison would be best in this case. Since >>> this is >>> not Evoked Responses data, I find it hard to find relevant ideas, >>> and would >>> like to hear your thoughts. >>> >>> >>> >>> 1) I did a frequency analysis (mtmfft) in conventional bands of >>> interest >>> and ran ft_freqstatistics on the resulting structures (using ttest2 >>> and the >>> bonferoni correction for the multiple comparison problem). This gave >>> some >>> results, however for most conditions they are not very encouraging >>> (the >>> ROIs that showed significant differences were not close to those >>> that I >>> have assumed). >>> >>> >>> >>> *QUESTION 1*: do you think this is a proper method? Note that I did >>> not use >>> a frequency based source reconstruction in the first place, because >>> I'm >>> ultimately interested in the time course in the source space. >>> >>> >>> >>> 2) I was wondering if a cluster based permutation test is impossible >>> to use >>> here, since this is a continuous recording, so clustering according >>> to time >>> adjacency seems irrelevant. >>> >>> >>> >>> *QUESTION 2*: is it possible to use a cluster based statistical test >>> here? >>> If so, it could be better than a-priori averaging the source >>> activity in >>> the atlas ROIs, which could mask some of the effects, if they are >>> located >>> in a small area. >>> >>> >>> >>> 3) Another possibility is looking at the data itself. Unfortunately I >>> encountered some problems using ft_sourcemovie, though this is a >>> subject >>> for a different thread. >>> >>> >>> >>> Any thoughts and advice are highly appreciated! >>> >>> Thank you for taking the time, >>> >>> roey >>> _______________________________________________ >>> >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Fri Jul 25 09:29:55 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Fri, 25 Jul 2014 09:29:55 +0200 (CEST) Subject: [FieldTrip] MNE Source Reconstruction Sanity Check In-Reply-To: References: <346147900.8004488.1406126123454.JavaMail.root@sculptor.zimbra.ru.nl> <790E6AB9-6372-4F70-9B98-2DE6E084F552@donders.ru.nl> Message-ID: <008b01cfa7da$3bd9eac0$b38dc040$@herring@fcdonders.ru.nl> Hi Roey, Since you do not have the subject’s anatomical MRI and are using the colin27 standard brain, you can just use the template BEM headmodel in fieldtrip/template/headmodel (see for example, http://fieldtrip.fcdonders.nl/template/headmodel) . This head model is based on the colin27 brain. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Roey Schurr Sent: donderdag 24 juli 2014 20:50 To: FieldTrip discussion list Subject: Re: [FieldTrip] MNE Source Reconstruction Sanity Check Dear Jim, Thank you for drawing my attention to this problem. I have actually tried building a realistic head model using OPENMEG but encountered some compitability problems since our lab does not use Linux. This is indeed one of the most important (short) future tasks - being able to use such realistic head models. Best, roey On Thu, Jul 24, 2014 at 6:34 PM, E688205 wrote: Dear Roey, To add to Diego's comments, since you are dealing with EEG data a single sphere headmodel is not a good idea because it does not take into account the differences in conductivity between the skull, scalp, and brain. This is not a problem for MEG but is important for EEG. Therefore it is better to use, for example, a BEM head model. Best, Jim On 23 jul. 2014, at 16:38, "Lozano Soldevilla, D. (Diego)" wrote: Dear Roey, In my opinion it's definitely not a good idea to compute MNE using 19 sensors. There are studies that have found a drastic localization precision from 31 to 63 electrodes and further improvements till 123: http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1) http://www.ncbi.nlm.nih.gov/pubmed/12495765 Although it's very difficult to know the "minimum" number of electrodes needed to accurately localize a given source (it depends on the strength of the source you want to localize, source reconstruction algorithm, data noise...), 19 electrodes are too low to trust the results you can get. best, Diego _____ >From roeysc at gmail.com Mon Jul 21 11:21:32 2014 From: roeysc at gmail.com (Roey Schurr) Date: Mon, 21 Jul 2014 12:21:32 +0300 Subject: [FieldTrip] MNE Source Reconstruction Sanity Check Message-ID: Dear fieldtrippers, I want to do a sanity check on mne source reconstruction. I'm working on continuous EEG recordings (19 electrodes), estimating the source reconstruction activity using the *mne* (minimum norm estimate) method, a *template MRI* (Colin27) and a *singlesphere* headmodel. As a sanity check for the source reconstruction itself, I wanted to compare conditions in which I could estimate the loci of significant changes, e.g.: rest vs movement of the hand, moving the right hand vs the left hand, etc. I have about 60 seconds of recording for each condition. What I did was: 1) Segment the recording of each condition into many "trials" of 2 seconds each. 2) For each trial, average the activity in each of the 90 ROIs of the aal atlas (I excluded the cerebellum from the source reconstruction). I was wondering what comparison would be best in this case. Since this is not Evoked Responses data, I find it hard to find relevant ideas, and would like to hear your thoughts. 1) I did a frequency analysis (mtmfft) in conventional bands of interest and ran ft_freqstatistics on the resulting structures (using ttest2 and the bonferoni correction for the multiple comparison problem). This gave some results, however for most conditions they are not very encouraging (the ROIs that showed significant differences were not close to those that I have assumed). *QUESTION 1*: do you think this is a proper method? Note that I did not use a frequency based source reconstruction in the first place, because I'm ultimately interested in the time course in the source space. 2) I was wondering if a cluster based permutation test is impossible to use here, since this is a continuous recording, so clustering according to time adjacency seems irrelevant. *QUESTION 2*: is it possible to use a cluster based statistical test here? If so, it could be better than a-priori averaging the source activity in the atlas ROIs, which could mask some of the effects, if they are located in a small area. 3) Another possibility is looking at the data itself. Unfortunately I encountered some problems using ft_sourcemovie, though this is a subject for a different thread. Any thoughts and advice are highly appreciated! Thank you for taking the time, roey _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laura.Rueda at faber.kuleuven.be Fri Jul 25 12:00:21 2014 From: Laura.Rueda at faber.kuleuven.be (Laura Rueda Delgado) Date: Fri, 25 Jul 2014 10:00:21 +0000 Subject: [FieldTrip] Group analysis at source level In-Reply-To: <1406247611055.41098@flinders.edu.au> References: , <1406247611055.41098@flinders.edu.au> Message-ID: Dear Tyler, Thank you for your suggestion. I had checked the option of warping the individual grid to the template grid, but I discarded it, maybe for wrong reasons. From the tutorial, I understand that warping is done via the individual MRI. I have done the segmentation, mesh creation and grid preparation at the individual level. So the warping of grids seems to redo this segmentation and mesh creation from the individual MRI to get the individual grid and warp it. The function ft_prepare_sourcemodel does not have the option to include the headmodel that I've already created (in my case, a 3-shell BEM), and that's why I excluded this option. However, maybe I can use the template grid with the BEM like this: cfg = []; cfg.grid = template_grid; cfg.inwardshift = 0; cfg.vol = individual_vol; %result from segmentation and mesh creation warped_grid = ft_prepare_sourcemodel(cfg); And then create the headmodel: cfg = []; cfg.vol = individual_vol; cfg.elec = individual_sens; cfg.grid = warped_grid; cfg.grid.tight = 'yes'; cfg.reducerank = 'no'; % cfg.normalize = 'no'; leadfield = ft_prepare_leadfield(cfg); My question is whether this is correct given that warped_grid would be in MNI coordinates, and individual_vol and individual_sens would not. And also, would this mean that the points of the grid would all be the same for all subjects? Best regards, Laura From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Tyler Grummett [tyler.grummett at flinders.edu.au] Sent: 25 July 2014 02:20 To: FieldTrip discussion list Subject: Re: [FieldTrip] Group analysis at source level Hey laura, Im not 100% sure of what I am about to tell you, as I am not an expert, but I think ft_sourceinterpolate is used in tutorials to display results on an mri model basically. One such tutorial is: http://fieldtrip.fcdonders.nl/tutorial/beamformingextended If you want to be consistent over subjects, I would use a sourcemodel when calculating your source variable, like in: http://fieldtrip.fcdonders.nl/faq/how_can_i_map_source_locations_between_two_different_representations?s[]=atlas and: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=subject&s[]=grid&s[]=mni​ I really hope this helps, it helped me :) Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Laura Rueda Delgado Sent: Friday, 25 July 2014 1:06 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Group analysis at source level Dear fieldtrip users, I'm working with source estimations of EEG data. At the moment, I have estimated the sources at the individual level with individual MRIs. I've used ft_sourceinterpolate and ft_volumenormalise to transform the resulting estimation maps into a template for comparison, and I do this for every subject: cfg = []; cfg.parameter = 'avg.pow'; source = ft_sourceinterpolate(cfg, source, mri); cfg = []; cfg.template = '\spm8\templates\T1.nii'; cfg.parameter = 'all'; cfg.nonlinear = 'yes'; cfg.coordsys = 'spm'; source = ft_volumenormalise(cfg, source); Once I have the estimated sources for all the subjects, I use ft_sourcestatistics: cfg = []; cfg.dim = sourcePre_con{1}.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'avg.pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 'all'; cfg.alpha = 0.05; cfg.tail = 0; cfg.design(1,:) = [1:num 1:num]; cfg.design(2,:) = [ones(1,num) ones(1,num)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg,sourcePost_con{:}, sourcePre_con{:}); And I get this error: Reference to non-existent field 'pos'. Error in statistics_wrapper>get_source_avg (line 643) fprintf('only selecting voxels inside the brain for statistics (%.1f%%)\n', 100*length(varargin{1}.inside)/size(varargin{1}.pos,1)); Error in statistics_wrapper (line 206) [dat, cfg] = get_source_avg(cfg, varargin{:}); Error in ft_sourcestatistics (line 107) [stat, cfg] = statistics_wrapper(cfg, varargin{:}); I check the data structure and the structure of the sources at the individual level, before interpolating and normalising has the pos field, but after these steps, it's gone. How can I work around this error? Do I have to keep the pos field and transform it according to the template? Thank you in advance for your help. Best regards, Laura Rueda -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Fri Jul 25 13:31:32 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Fri, 25 Jul 2014 13:31:32 +0200 (CEST) Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: <153325407.8009026.1406190552110.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <2077847771.8023108.1406287892841.JavaMail.root@sculptor.zimbra.ru.nl> Hi Azadeh, The problem is originated during the segmentation processing. Basically the default cfg values that you applied to template/anatomy/single_subj_T1.nii gave you the attached segmentation: the scalp is poorly defined as you can see. Then you end up with the wrong headmodel. I noticed that the single_subj_T1.nii has very low resolution. I used the single_subj_T1_1mm.nii instead with the following cfg parameters (by trial and error...) and they gave me sensitive binary representations: mri = ft_read_mri('/home/common/matlab/fieldtrip/template/anatomy/single_subj_T1_1mm.nii'); mri.coordsys = 'spm'; cfg                = []; cfg.brainsmooth    = 5%(default = 5) cfg.scalpsmooth    = 5%(default = 5) cfg.brainthreshold = 0.25%(default = 0.5) cfg.scalpthreshold = 0.25%(default = 0.1) cfg.output    = {'brain','skull','scalp'}; seg  = ft_volumesegment(cfg, mri); cfg              = []; cfg.funparameter = 'scalp'; ft_sourceplot(cfg,seg); The ft_volumesegment documentation mentions the fieldtrip/external/spm8/templates/T1.nii Unfortunately I'm not sure what this T1 is (MNI152 might be?) and its advantages or disadvantatges. If you use the T1.nii with the following cfg, you'll get a segmentation that makes sense to me: mri = ft_read_mri('/home/common/matlab/fieldtrip/external/spm8/templates/T1.nii'); mri.coordsys = 'spm'; cfg                = []; cfg.brainsmooth    = 2%(default = 5) cfg.scalpsmooth    = 2%(default = 5) cfg.brainthreshold = 0.25%(default = 0.5) cfg.scalpthreshold = 0.15%(default = 0.1) cfg.output    = {'brain','skull','scalp'}; seg  = ft_volumesegment(cfg, mri); cfg              = []; cfg.funparameter = 'scalp';%check the brain and skull too ft_sourceplot(cfg,seg); My source modeling experience is restricted to MEG using individual T1s (not a template). I'm sure a lot of people in the list have experience in the EEG/source modeling business using template anatomical scans. Could somedoby provide us a bit of advice?: Which anatomical template should one use (T1.nii, single_subj_T1_1mm.nii other?) and which cfg parameters make sense for the segmentation? It would be very nice if we could establish a kind of default and share them in the fieldtrip wiki ;) (I could do it if somebody share his/her knowledge/experience) Thanks in advance, Diego ----- Original Message ----- > From azadehh at uvic.ca Sat Jul 19 00:26:06 2014 > From: azadehh at uvic.ca (Azadeh Hajihosseini) > Date: Fri, 18 Jul 2014 15:26:06 -0700 > Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN > values > in the leadfield matrices > Message-ID: > > > Hello FieldTrip members, > > I am trying to source localize EEG oscillatory activity and have a few > problems in constructing the forward model and eventually running the > source analysis. I think the problems are related to each other. Here > is > what happens: > > 1- When I run the source analysis, I get this error message: > > *??? Error using ==> svd* > *Input to SVD must not contain NaN or Inf.* > > *Error in ==> beamformer_dics>pinv at 650* > * [U,S,V] = svd(A,0);* > > *Error in ==> beamformer_dics at 339* > * filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross > eqn. 3, use PINV/SVD to cover rank* > * deficient leadfield* > > *Error in ==> ft_sourceanalysis at 572* > * dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:});* > > *Error in ==> test_sourceanalysis at 12* > *sourceTF = ft_sourceanalysis(cfg, data_TF);* > > > 2- Checking the leadfiled matrices, I see there are a lot of NaN > values. > 3- When I visualize the head model I have created, the plots don't > look > right. The third field, *vol.bnd(3),* which is supposed to be the > brain > tissue, looks like a cube. > > And here are my code lines: > > *% CONSTRUCT A HEAD MODEL from the template mri in FT's > template/anatomy* > *mri = ft_read_mri('template\anatomy\single_subj_T1.nii');* > *mri.coordsys = 'spm';* > > *%SEGMENTATION:* > *cfg = [];* > *cfg.output = {'brain','skull','scalp'};* > *segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT > resliced > data* > *save segmentedmri_template segmentedmri_template* > > > *%CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL)* > *cfg = [];* > *cfg.method ='bemcp';* > *cfg.tissue ={'brain','skull','scalp'};* > *% cfg.outputfile = 'template_';* > *vol = ft_prepare_headmodel(cfg, segmentedmri_template);* > *save vol vol* > > *%Visualization of the head model* > *figure;* > *ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp * > *figure;* > *ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull* > *figure;* > *ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks > like a > cube* > > *% Align electrodes * > *elec = ft_read_sens('template\electrode\standard_1020.elc'); * > *% load volume conduction model* > *% load vol; * > > *%interactive allignment* > *cfg = [];* > *cfg.method = 'interactive';* > *cfg.elec = elec;* > *cfg.headshape = vol.bnd(1);* > *elec_aligned = ft_electroderealign(cfg);* > > *save elec_aligned elec_aligned* > > *% Prepare leadfield* > *load data_TF* > *cfg=[];* > *cfg.vol = vol; %structure with volume conduction model* > *cfg.elec = elec_aligned;%structure with electrode positions* > *[grid] = ft_prepare_leadfield(cfg, data_TF);* > > *% Find source* > *cfg = []; * > *cfg.method = 'dics';* > *cfg.frequency = 25; * > *cfg.grid = grid; * > *cfg.vol = vol;* > *cfg.latency = .4;%single number in seconds, for time-frequency > analysis* > *cfg.dics.projectnoise = 'yes';* > *cfg.dics.lambda = 0;* > *cfg.elec = elec_aligned;%structure with electrode positions* > > *sourceTF = ft_sourceanalysis(cfg, data_TF);* > > > I am using *wavelet *with a *fourier* output for the time-frequency > analysis (*data_TF)*. Do you have any idea what might be wrong here? > > I also have a more general question. What type of time-frequency data > can > be input to source analysis? *ft_freqanalysis* provides power, power > and > cross-spectra, and complex fourier outputs. But is source-localization > based on only power data correct? I couldn't find any explanations > regarding this issue in the tutorial. > > I look forward to hearing from anyone who might have ideas about any > of > these issues! > > Many thanks, > > -- > Azadeh HajiHosseini -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ -------------- next part -------------- A non-text attachment was scrubbed... Name: bad_segmentation.png Type: image/png Size: 43911 bytes Desc: not available URL: From azadehh at uvic.ca Fri Jul 25 20:03:38 2014 From: azadehh at uvic.ca (Azadeh Hajihosseini) Date: Fri, 25 Jul 2014 11:03:38 -0700 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: <2077847771.8023108.1406287892841.JavaMail.root@sculptor.zimbra.ru.nl> References: <153325407.8009026.1406190552110.JavaMail.root@sculptor.zimbra.ru.nl> <2077847771.8023108.1406287892841.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Hi Diego, Thanks so much for looking into this and finding the problem! I am going to try the other two templates you suggested and see what I can make of them. As you mentioned, it would be great to know other people's experience on using mri templates for EEG source localization. I look forward to hearing from anyone who has this experience! Thanks in advance :) Bests, On Fri, Jul 25, 2014 at 4:31 AM, Lozano Soldevilla, D. (Diego) < d.lozanosoldevilla at fcdonders.ru.nl> wrote: > Hi Azadeh, > > The problem is originated during the segmentation processing. Basically > the default cfg values that you applied to > template/anatomy/single_subj_T1.nii gave you the attached segmentation: the > scalp is poorly defined as you can see. Then you end up with the wrong > headmodel. > > I noticed that the single_subj_T1.nii has very low resolution. I used the > single_subj_T1_1mm.nii instead with the following cfg parameters (by trial > and error...) and they gave me sensitive binary representations: > > mri = > ft_read_mri('/home/common/matlab/fieldtrip/template/anatomy/single_subj_T1_1mm.nii'); > mri.coordsys = 'spm'; > > cfg = []; > cfg.brainsmooth = 5%(default = 5) > cfg.scalpsmooth = 5%(default = 5) > cfg.brainthreshold = 0.25%(default = 0.5) > cfg.scalpthreshold = 0.25%(default = 0.1) > > cfg.output = {'brain','skull','scalp'}; > seg = ft_volumesegment(cfg, mri); > > cfg = []; > cfg.funparameter = 'scalp'; > ft_sourceplot(cfg,seg); > > > The ft_volumesegment documentation mentions the > fieldtrip/external/spm8/templates/T1.nii Unfortunately I'm not sure what > this T1 is (MNI152 might be?) and its advantages or disadvantatges. If you > use the T1.nii with the following cfg, you'll get a segmentation that makes > sense to me: > > mri = > ft_read_mri('/home/common/matlab/fieldtrip/external/spm8/templates/T1.nii'); > mri.coordsys = 'spm'; > > cfg = []; > cfg.brainsmooth = 2%(default = 5) > cfg.scalpsmooth = 2%(default = 5) > cfg.brainthreshold = 0.25%(default = 0.5) > cfg.scalpthreshold = 0.15%(default = 0.1) > > cfg.output = {'brain','skull','scalp'}; > seg = ft_volumesegment(cfg, mri); > > cfg = []; > cfg.funparameter = 'scalp';%check the brain and skull too > ft_sourceplot(cfg,seg); > > > My source modeling experience is restricted to MEG using individual T1s > (not a template). I'm sure a lot of people in the list have experience in > the EEG/source modeling business using template anatomical scans. Could > somedoby provide us a bit of advice?: > > Which anatomical template should one use (T1.nii, single_subj_T1_1mm.nii > other?) and which cfg parameters make sense for the segmentation? It would > be very nice if we could establish a kind of default and share them in the > fieldtrip wiki ;) (I could do it if somebody share his/her > knowledge/experience) > > Thanks in advance, > > Diego > > > ----- Original Message ----- > > From azadehh at uvic.ca Sat Jul 19 00:26:06 2014 > > From: azadehh at uvic.ca (Azadeh Hajihosseini) > > Date: Fri, 18 Jul 2014 15:26:06 -0700 > > Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN > > values > > in the leadfield matrices > > Message-ID: > > > > > > Hello FieldTrip members, > > > > I am trying to source localize EEG oscillatory activity and have a few > > problems in constructing the forward model and eventually running the > > source analysis. I think the problems are related to each other. Here > > is > > what happens: > > > > 1- When I run the source analysis, I get this error message: > > > > *??? Error using ==> svd* > > *Input to SVD must not contain NaN or Inf.* > > > > *Error in ==> beamformer_dics>pinv at 650* > > * [U,S,V] = svd(A,0);* > > > > *Error in ==> beamformer_dics at 339* > > * filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross > > eqn. 3, use PINV/SVD to cover rank* > > * deficient leadfield* > > > > *Error in ==> ft_sourceanalysis at 572* > > * dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > > optarg{:});* > > > > *Error in ==> test_sourceanalysis at 12* > > *sourceTF = ft_sourceanalysis(cfg, data_TF);* > > > > > > 2- Checking the leadfiled matrices, I see there are a lot of NaN > > values. > > 3- When I visualize the head model I have created, the plots don't > > look > > right. The third field, *vol.bnd(3),* which is supposed to be the > > brain > > tissue, looks like a cube. > > > > And here are my code lines: > > > > *% CONSTRUCT A HEAD MODEL from the template mri in FT's > > template/anatomy* > > *mri = ft_read_mri('template\anatomy\single_subj_T1.nii');* > > *mri.coordsys = 'spm';* > > > > *%SEGMENTATION:* > > *cfg = [];* > > *cfg.output = {'brain','skull','scalp'};* > > *segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT > > resliced > > data* > > *save segmentedmri_template segmentedmri_template* > > > > > > *%CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL)* > > *cfg = [];* > > *cfg.method ='bemcp';* > > *cfg.tissue ={'brain','skull','scalp'};* > > *% cfg.outputfile = 'template_';* > > *vol = ft_prepare_headmodel(cfg, segmentedmri_template);* > > *save vol vol* > > > > *%Visualization of the head model* > > *figure;* > > *ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp * > > *figure;* > > *ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull* > > *figure;* > > *ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks > > like a > > cube* > > > > *% Align electrodes * > > *elec = ft_read_sens('template\electrode\standard_1020.elc'); * > > *% load volume conduction model* > > *% load vol; * > > > > *%interactive allignment* > > *cfg = [];* > > *cfg.method = 'interactive';* > > *cfg.elec = elec;* > > *cfg.headshape = vol.bnd(1);* > > *elec_aligned = ft_electroderealign(cfg);* > > > > *save elec_aligned elec_aligned* > > > > *% Prepare leadfield* > > *load data_TF* > > *cfg=[];* > > *cfg.vol = vol; %structure with volume conduction model* > > *cfg.elec = elec_aligned;%structure with electrode positions* > > *[grid] = ft_prepare_leadfield(cfg, data_TF);* > > > > *% Find source* > > *cfg = []; * > > *cfg.method = 'dics';* > > *cfg.frequency = 25; * > > *cfg.grid = grid; * > > *cfg.vol = vol;* > > *cfg.latency = .4;%single number in seconds, for time-frequency > > analysis* > > *cfg.dics.projectnoise = 'yes';* > > *cfg.dics.lambda = 0;* > > *cfg.elec = elec_aligned;%structure with electrode positions* > > > > *sourceTF = ft_sourceanalysis(cfg, data_TF);* > > > > > > I am using *wavelet *with a *fourier* output for the time-frequency > > analysis (*data_TF)*. Do you have any idea what might be wrong here? > > > > I also have a more general question. What type of time-frequency data > > can > > be input to source analysis? *ft_freqanalysis* provides power, power > > and > > cross-spectra, and complex fourier outputs. But is source-localization > > based on only power data correct? I couldn't find any explanations > > regarding this issue in the tutorial. > > > > I look forward to hearing from anyone who might have ideas about any > > of > > these issues! > > > > Many thanks, > > > > -- > > Azadeh HajiHosseini > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Azadeh HajiHosseini Graduate student Department of Psychology University of Victoria http://web.uvic.ca/~lccl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From paymandomorientes at yahoo.com Fri Jul 25 21:05:28 2014 From: paymandomorientes at yahoo.com (paymando- morientes) Date: Fri, 25 Jul 2014 12:05:28 -0700 Subject: [FieldTrip] simulating realtime analysis Message-ID: <1406315128.99700.YahooMailNeo@web141606.mail.bf1.yahoo.com> Dear all I want to simulate an online processing with a recorded brainvision data using "ft_realtime_fileproxy". But I wonder how can I "write to" and "read from" buffer simultaneously in matlab?  How is it possible to start the simulation from a script and then analyze it from another script in the same time? As far as I know it is impossible in matlab. Do I have to use to computers? thank you all for your helps -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler.grummett at flinders.edu.au Mon Jul 28 03:40:16 2014 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Mon, 28 Jul 2014 01:40:16 +0000 Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices In-Reply-To: <2077847771.8023108.1406287892841.JavaMail.root@sculptor.zimbra.ru.nl> References: <153325407.8009026.1406190552110.JavaMail.root@sculptor.zimbra.ru.nl>, <2077847771.8023108.1406287892841.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1406511600163.1705@flinders.edu.au> Hello Diego, Im still having trouble, particularly with ft_prepare_headmodel. After running the code that you used, I ran the following code: cfg = []; cfg.method = 'bemcp'; %openmeeg bemcp vol = ft_prepare_headmodel(cfg, segmentedmri); vol.mat is full of NaNs though, so the leadfield creates NaNs ect. I tried running the following code to fix it: % prepare mesh cfg = []; cfg.method = 'iso2mesh'; cfg.numvertices = 10000; bnd = ft_prepare_mesh( cfg, segmentedmri); % fix mesh [ bnd( 1).pnt, bnd( 1).tri] = meshresample( bnd( 1).pnt, bnd( 1).tri, 1000/size( bnd( 1).pnt, 1)); [ bnd( 2).pnt, bnd( 2).tri] = meshresample( bnd( 2).pnt, bnd( 2).tri, 2000/size( bnd( 2).pnt, 1)); [ bnd( 3).pnt, bnd( 3).tri] = meshresample( bnd( 3).pnt, bnd( 3).tri, 3000/size( bnd( 3).pnt, 1)); for ii = 1:size( bnd), [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'dup'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'isolated'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'deep'); [ bnd( ii).pnt, bnd( ii).tri] = meshcheckrepair( bnd( ii).pnt, bnd( ii).tri, 'meshfix'); end However it crashes with the following message: Error using surface_nesting (line 26) the compartment nesting cannot be determined Error in ft_headmodel_bemcp (line 66) order = surface_nesting(vol.bnd, 'insidefirst'); Error in ft_prepare_headmodel (line 262) vol = ft_headmodel_bemcp(geometry, 'conductivity', cfg.conductivity); I dont have enough experience with this code to work out why this isnt working, previously I had been working with the template MRI inside the template folder 'standard_mri', and this process had worked for me. However I was getting really strange results after beamforming (the cerebellum would light up for every task). So I have been using the methods expressed in your email but it hasnt been working for me, can you see if you get the same result? Tyler ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124 ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Lozano Soldevilla, D. (Diego) Sent: Friday, 25 July 2014 9:01 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN values in the leadfield matrices Hi Azadeh, The problem is originated during the segmentation processing. Basically the default cfg values that you applied to template/anatomy/single_subj_T1.nii gave you the attached segmentation: the scalp is poorly defined as you can see. Then you end up with the wrong headmodel. I noticed that the single_subj_T1.nii has very low resolution. I used the single_subj_T1_1mm.nii instead with the following cfg parameters (by trial and error...) and they gave me sensitive binary representations: mri = ft_read_mri('/home/common/matlab/fieldtrip/template/anatomy/single_subj_T1_1mm.nii'); mri.coordsys = 'spm'; cfg = []; cfg.brainsmooth = 5%(default = 5) cfg.scalpsmooth = 5%(default = 5) cfg.brainthreshold = 0.25%(default = 0.5) cfg.scalpthreshold = 0.25%(default = 0.1) cfg.output = {'brain','skull','scalp'}; seg = ft_volumesegment(cfg, mri); cfg = []; cfg.funparameter = 'scalp'; ft_sourceplot(cfg,seg); The ft_volumesegment documentation mentions the fieldtrip/external/spm8/templates/T1.nii Unfortunately I'm not sure what this T1 is (MNI152 might be?) and its advantages or disadvantatges. If you use the T1.nii with the following cfg, you'll get a segmentation that makes sense to me: mri = ft_read_mri('/home/common/matlab/fieldtrip/external/spm8/templates/T1.nii'); mri.coordsys = 'spm'; cfg = []; cfg.brainsmooth = 2%(default = 5) cfg.scalpsmooth = 2%(default = 5) cfg.brainthreshold = 0.25%(default = 0.5) cfg.scalpthreshold = 0.15%(default = 0.1) cfg.output = {'brain','skull','scalp'}; seg = ft_volumesegment(cfg, mri); cfg = []; cfg.funparameter = 'scalp';%check the brain and skull too ft_sourceplot(cfg,seg); My source modeling experience is restricted to MEG using individual T1s (not a template). I'm sure a lot of people in the list have experience in the EEG/source modeling business using template anatomical scans. Could somedoby provide us a bit of advice?: Which anatomical template should one use (T1.nii, single_subj_T1_1mm.nii other?) and which cfg parameters make sense for the segmentation? It would be very nice if we could establish a kind of default and share them in the fieldtrip wiki ;) (I could do it if somebody share his/her knowledge/experience) Thanks in advance, Diego ----- Original Message ----- > From azadehh at uvic.ca Sat Jul 19 00:26:06 2014 > From: azadehh at uvic.ca (Azadeh Hajihosseini) > Date: Fri, 18 Jul 2014 15:26:06 -0700 > Subject: [FieldTrip] Source analysis of EEG oscillatory activity/ NaN > values > in the leadfield matrices > Message-ID: > > > Hello FieldTrip members, > > I am trying to source localize EEG oscillatory activity and have a few > problems in constructing the forward model and eventually running the > source analysis. I think the problems are related to each other. Here > is > what happens: > > 1- When I run the source analysis, I get this error message: > > *??? Error using ==> svd* > *Input to SVD must not contain NaN or Inf.* > > *Error in ==> beamformer_dics>pinv at 650* > * [U,S,V] = svd(A,0);* > > *Error in ==> beamformer_dics at 339* > * filt = pinv(lf' * invCf * lf) * lf' * invCf; % Gross > eqn. 3, use PINV/SVD to cover rank* > * deficient leadfield* > > *Error in ==> ft_sourceanalysis at 572* > * dip(i) = beamformer_dics(grid, sens, vol, [], squeeze(Cf(i,:,:)), > optarg{:});* > > *Error in ==> test_sourceanalysis at 12* > *sourceTF = ft_sourceanalysis(cfg, data_TF);* > > > 2- Checking the leadfiled matrices, I see there are a lot of NaN > values. > 3- When I visualize the head model I have created, the plots don't > look > right. The third field, *vol.bnd(3),* which is supposed to be the > brain > tissue, looks like a cube. > > And here are my code lines: > > *% CONSTRUCT A HEAD MODEL from the template mri in FT's > template/anatomy* > *mri = ft_read_mri('template\anatomy\single_subj_T1.nii');* > *mri.coordsys = 'spm';* > > *%SEGMENTATION:* > *cfg = [];* > *cfg.output = {'brain','skull','scalp'};* > *segmentedmri_template = ft_volumesegment(cfg, mri); % Using NOT > resliced > data* > *save segmentedmri_template segmentedmri_template* > > > *%CREATE THE HEAD MODEL (VOLUME CONDUCTION MODEL)* > *cfg = [];* > *cfg.method ='bemcp';* > *cfg.tissue ={'brain','skull','scalp'};* > *% cfg.outputfile = 'template_';* > *vol = ft_prepare_headmodel(cfg, segmentedmri_template);* > *save vol vol* > > *%Visualization of the head model* > *figure;* > *ft_plot_mesh(vol.bnd(1),'facecolor','none'); %scalp * > *figure;* > *ft_plot_mesh(vol.bnd(2),'facecolor','none'); %skull* > *figure;* > *ft_plot_mesh(vol.bnd(3),'facecolor','none'); %brain This one looks > like a > cube* > > *% Align electrodes * > *elec = ft_read_sens('template\electrode\standard_1020.elc'); * > *% load volume conduction model* > *% load vol; * > > *%interactive allignment* > *cfg = [];* > *cfg.method = 'interactive';* > *cfg.elec = elec;* > *cfg.headshape = vol.bnd(1);* > *elec_aligned = ft_electroderealign(cfg);* > > *save elec_aligned elec_aligned* > > *% Prepare leadfield* > *load data_TF* > *cfg=[];* > *cfg.vol = vol; %structure with volume conduction model* > *cfg.elec = elec_aligned;%structure with electrode positions* > *[grid] = ft_prepare_leadfield(cfg, data_TF);* > > *% Find source* > *cfg = []; * > *cfg.method = 'dics';* > *cfg.frequency = 25; * > *cfg.grid = grid; * > *cfg.vol = vol;* > *cfg.latency = .4;%single number in seconds, for time-frequency > analysis* > *cfg.dics.projectnoise = 'yes';* > *cfg.dics.lambda = 0;* > *cfg.elec = elec_aligned;%structure with electrode positions* > > *sourceTF = ft_sourceanalysis(cfg, data_TF);* > > > I am using *wavelet *with a *fourier* output for the time-frequency > analysis (*data_TF)*. Do you have any idea what might be wrong here? > > I also have a more general question. What type of time-frequency data > can > be input to source analysis? *ft_freqanalysis* provides power, power > and > cross-spectra, and complex fourier outputs. But is source-localization > based on only power data correct? I couldn't find any explanations > regarding this issue in the tutorial. > > I look forward to hearing from anyone who might have ideas about any > of > these issues! > > Many thanks, > > -- > Azadeh HajiHosseini -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ From jm.horschig at donders.ru.nl Mon Jul 28 10:23:29 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 28 Jul 2014 10:23:29 +0200 Subject: [FieldTrip] simulating realtime analysis In-Reply-To: <1406315128.99700.YahooMailNeo@web141606.mail.bf1.yahoo.com> References: <1406315128.99700.YahooMailNeo@web141606.mail.bf1.yahoo.com> Message-ID: <53D60881.3000805@donders.ru.nl> Hi, have you you tried opening two matlab sessions on one computer? Best, Jörn On 7/25/2014 9:05 PM, paymando- morientes wrote: > Dear all > I want to simulate an online processing with a recorded brainvision > data using "ft_realtime_fileproxy". But I wonder how can I "write to" > and "read from" buffer simultaneously in matlab? > How is it possible to start the simulation from a script and then > analyze it from another script in the same time? > As far as I know it is impossible in matlab. Do I have to use to > computers? > > thank you all for your helps > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From dragos at example.com Wed Jul 30 01:18:36 2014 From: dragos at example.com (Dragos Stanciu) Date: Wed, 30 Jul 2014 00:18:36 +0100 Subject: [FieldTrip] Connectivity analysis after applying Welch's method Message-ID: Dear FieldTrippers, I'm Dragos Stanciu and I'm working on my MSc in Neuroinformatics dissertation at the University of Edinburgh. My project involves analysis of resting-state functional connectivity using graph theory in Alzheimer's disease based on MEG data. Each of my subjects has a number of 10s epochs (trials) associated with him/her. I was able to compute the coherence and weighted phase lag index measures (with *ft_freqanalysis *and *ft_connectivityanalysis) *by treating my 10s epochs as trials, but now I would like to reduce the amount of noise in the estimation of the frequency spectrum by employing Welch's method. For this, I split each 10s epoch in 2s segments (minitrials) with 50% overlap: > [sep_epoch_data] = ft_redefinetrial(cfg_cut, single_epoch_data)*. * I then apply *ft_preprocessing *on the minitrials: > [processed_single_epoch] = ft_preprocessing(cfg, sep_epoch_data); I then do frequency analysis on the preprocessed segmented data: > [single_epoch_freq] = ft_freqanalysis(cfg_freq, processed_single_epoch); where > display(cfg_freq) > method: 'mtmfft' > taper: 'hanning' > foilim: [0.5000 4] > output: 'powandcsd' > channel: {148x1 cell} % 148 channels labelled from A1 to A148 > keeptrial: 'no' % don't keep the minitrials, as we want to > average them > keeptapers: 'no' Please note that I average the minitrials (*keeptrial = 'no'*) as I want to get an average of the frequencies. The resulting *single_epoch_freq* structure looks like: > display(single_epoch_freq) > label: {148x1 cell} > dimord: 'chan_freq' > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 4.0009] > powspctrm: [148x8 double] > labelcmb: {10878x2 cell} % channel combinations (148*147/2) > crsspctrm: [10878x8 double] > cfg: [1x1 struct] The last step is to append the averaged frequency structures of each 10s epoch together and perform connectivity analysis on the main 10s epochs. I do the concatenation like so: freq_avgs_powspctrm = [freq_avgs_powspctrm; permute(single_epoch_freq.powspctrm, [3,1,2])]; freq_avgs_crsspctrm = [freq_avgs_crsspctrm; permute(single_epoch_freq.crsspctrm, [3,1,2])]; The idea behind *permute(..., [3, 1, 2])* is that I want the first dimension to represent trials, the second dimension channel combinations and the third dimension frequencies, as this is needed for the input of *ft_connectivity_wpli *(Repetitions x Channelcombination (x Frequency)). I then call stat_conn = ft_connectivityanalysis(cfg_conn, freq_avgs); where: > display(cfg_conn) > method: 'wpli_debiased' > channel: {148x1 cell} and > display(freq_avgs) > powspctrm: [4x148x8 double] % as I have 4 ten second epochs > crsspctrm: [4x10878x8 double] % as I have 4 ten second epochs > label: {148x1 cell} > dimord: 'chan_freq' > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 4.0009] > labelcmb: {10878x2 cell} > cfg: [1x1 struct] The error that I get when running *ft_connectivityanalysis* is: > Error using cat > CAT arguments dimensions are not consistent. > Error in ft_checkdata>fixcsd (line 1170) > data.crsspctrm = cat(catdim, data.powspctrm, data.crsspctrm); When debugging, *catdim* is equal to 1. The error occurs because the 2nd dimension of data.powspctrm and data.crsspctrm are not equal (former is 148, latter is 10878). Do you have any suggestions on getting around this problem? Should I construct *freq_avgs *(data input to ft_connectivityanalysis) differently? I'm also open to different approaches to working out Welch's method in FieldTrip. Please download this archive that contains my test script and 4 example 10s epochs of a subject: https://www.dropbox.com/s/js7pztai02f5p27/Welch_fieldtrip.zip The code should make things clearer (or the opposite). Observations: I thought about using *ft_freqanalysis_mtmwelch*, but apparently it's deprecated. Thank you all in advance for your feedback. Kind regards, Dragos Stanciu -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jul 30 10:28:50 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 30 Jul 2014 10:28:50 +0200 Subject: [FieldTrip] Connectivity analysis after applying Welch's method In-Reply-To: References: Message-ID: <53D8ACC2.9050109@donders.ru.nl> Hi Dragos, while quickly browisng through your mail, it appears to me that you simply need to set single_epoch_freq.dimord = 'rpt_chan_freq'. FieldTrip is using the dimord field to infer the order of the dimensions (*dim*ension *ord*er). The actual dimensions of powspctrm and crsspctrm are now inconsistent with the dimord specifications. Best, Jörn On 7/30/2014 1:18 AM, Dragos Stanciu wrote: > Dear FieldTrippers, > > I'm Dragos Stanciu and I'm working on my MSc in Neuroinformatics > dissertation at the University of Edinburgh. My project involves > analysis of resting-state functional connectivity using graph theory > in Alzheimer's disease based on MEG data. > > Each of my subjects has a number of 10s epochs (trials) associated > with him/her. I was able to compute the coherence and weighted phase > lag index measures (with /ft_freqanalysis /and > /ft_connectivityanalysis) /by treating my 10s epochs as trials, but > now I would like to reduce the amount of noise in the estimation of > the frequency spectrum by employing Welch's method. > > For this, I split each 10s epoch in 2s segments (minitrials) with 50% > overlap: > > [sep_epoch_data] = ft_redefinetrial(cfg_cut, single_epoch_data)/. / > > > I then apply /ft_preprocessing /on the minitrials: > > [processed_single_epoch] = ft_preprocessing(cfg, sep_epoch_data); > > I then do frequency analysis on the preprocessed segmented data: > > [single_epoch_freq] = ft_freqanalysis(cfg_freq, > processed_single_epoch); > > where > > display(cfg_freq) > method: 'mtmfft' > taper: 'hanning' > foilim: [0.5000 4] > output: 'powandcsd' > channel: {148x1 cell} % 148 channels labelled from A1 to > A148 > keeptrial: 'no' % don't keep the minitrials, as we want > to average them > keeptapers: 'no' > > Please note that I average the minitrials (/keeptrial = 'no'/) as I > want to get an average of the frequencies. > > The resulting /single_epoch_freq/ structure looks like: > > display(single_epoch_freq) > label: {148x1 cell} > dimord: 'chan_freq' > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > 4.0009] > powspctrm: [148x8 double] > labelcmb: {10878x2 cell} % channel combinations (148*147/2) > crsspctrm: [10878x8 double] > cfg: [1x1 struct] > > > The last step is to append the averaged frequency structures of each > 10s epoch together and perform connectivity analysis on the main 10s > epochs. I do the concatenation like so: > freq_avgs_powspctrm = [freq_avgs_powspctrm; > permute(single_epoch_freq.powspctrm, [3,1,2])]; > > freq_avgs_crsspctrm = [freq_avgs_crsspctrm; > permute(single_epoch_freq.crsspctrm, [3,1,2])]; > > The idea behind /permute(..., [3, 1, 2])/ is that I want the first > dimension to represent trials, the second dimension channel > combinations and the third dimension frequencies, as this is needed > for the input of /ft_connectivity_wpli /(Repetitions x > Channelcombination (x Frequency)). > > I then call stat_conn = ft_connectivityanalysis(cfg_conn, freq_avgs); > where: > > display(cfg_conn) > method: 'wpli_debiased' > channel: {148x1 cell} > > and > > display(freq_avgs) > powspctrm: [4x148x8 double] % as I have 4 ten second epochs > crsspctrm: [4x10878x8 double] % as I have 4 ten second epochs > label: {148x1 cell} > dimord: 'chan_freq' > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > 4.0009] > labelcmb: {10878x2 cell} > cfg: [1x1 struct] > > > The error that I get when running /ft_connectivityanalysis/ is: > > Error using cat > CAT arguments dimensions are not consistent. > Error in ft_checkdata>fixcsd (line 1170) > data.crsspctrm = cat(catdim, data.powspctrm, data.crsspctrm); > > > When debugging, /catdim/ is equal to 1. The error occurs because the > 2nd dimension of data.powspctrm and data.crsspctrm are not equal > (former is 148, latter is 10878). Do you have any suggestions on > getting around this problem? Should I construct /freq_avgs /(data > input to ft_connectivityanalysis) differently? I'm also open to > different approaches to working out Welch's method in FieldTrip. > > Please download this archive that contains my test script and 4 > example 10s epochs of a subject: > https://www.dropbox.com/s/js7pztai02f5p27/Welch_fieldtrip.zip The code > should make things clearer (or the opposite). > Observations: I thought about using /ft_freqanalysis_mtmwelch/, but > apparently it's deprecated. > > Thank you all in advance for your feedback. > > Kind regards, > Dragos Stanciu > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From jm.horschig at donders.ru.nl Wed Jul 30 10:30:22 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 30 Jul 2014 10:30:22 +0200 Subject: [FieldTrip] Connectivity analysis after applying Welch's method In-Reply-To: References: Message-ID: <53D8AD1E.9090801@donders.ru.nl> oh and, maybe use cfg_freq.output = 'fourier', that circumvents the concatenation issue On 7/30/2014 1:18 AM, Dragos Stanciu wrote: > Dear FieldTrippers, > > I'm Dragos Stanciu and I'm working on my MSc in Neuroinformatics > dissertation at the University of Edinburgh. My project involves > analysis of resting-state functional connectivity using graph theory > in Alzheimer's disease based on MEG data. > > Each of my subjects has a number of 10s epochs (trials) associated > with him/her. I was able to compute the coherence and weighted phase > lag index measures (with /ft_freqanalysis /and > /ft_connectivityanalysis) /by treating my 10s epochs as trials, but > now I would like to reduce the amount of noise in the estimation of > the frequency spectrum by employing Welch's method. > > For this, I split each 10s epoch in 2s segments (minitrials) with 50% > overlap: > > [sep_epoch_data] = ft_redefinetrial(cfg_cut, single_epoch_data)/. / > > > I then apply /ft_preprocessing /on the minitrials: > > [processed_single_epoch] = ft_preprocessing(cfg, sep_epoch_data); > > I then do frequency analysis on the preprocessed segmented data: > > [single_epoch_freq] = ft_freqanalysis(cfg_freq, > processed_single_epoch); > > where > > display(cfg_freq) > method: 'mtmfft' > taper: 'hanning' > foilim: [0.5000 4] > output: 'powandcsd' > channel: {148x1 cell} % 148 channels labelled from A1 to > A148 > keeptrial: 'no' % don't keep the minitrials, as we want > to average them > keeptapers: 'no' > > Please note that I average the minitrials (/keeptrial = 'no'/) as I > want to get an average of the frequencies. > > The resulting /single_epoch_freq/ structure looks like: > > display(single_epoch_freq) > label: {148x1 cell} > dimord: 'chan_freq' > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > 4.0009] > powspctrm: [148x8 double] > labelcmb: {10878x2 cell} % channel combinations (148*147/2) > crsspctrm: [10878x8 double] > cfg: [1x1 struct] > > > The last step is to append the averaged frequency structures of each > 10s epoch together and perform connectivity analysis on the main 10s > epochs. I do the concatenation like so: > freq_avgs_powspctrm = [freq_avgs_powspctrm; > permute(single_epoch_freq.powspctrm, [3,1,2])]; > > freq_avgs_crsspctrm = [freq_avgs_crsspctrm; > permute(single_epoch_freq.crsspctrm, [3,1,2])]; > > The idea behind /permute(..., [3, 1, 2])/ is that I want the first > dimension to represent trials, the second dimension channel > combinations and the third dimension frequencies, as this is needed > for the input of /ft_connectivity_wpli /(Repetitions x > Channelcombination (x Frequency)). > > I then call stat_conn = ft_connectivityanalysis(cfg_conn, freq_avgs); > where: > > display(cfg_conn) > method: 'wpli_debiased' > channel: {148x1 cell} > > and > > display(freq_avgs) > powspctrm: [4x148x8 double] % as I have 4 ten second epochs > crsspctrm: [4x10878x8 double] % as I have 4 ten second epochs > label: {148x1 cell} > dimord: 'chan_freq' > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > 4.0009] > labelcmb: {10878x2 cell} > cfg: [1x1 struct] > > > The error that I get when running /ft_connectivityanalysis/ is: > > Error using cat > CAT arguments dimensions are not consistent. > Error in ft_checkdata>fixcsd (line 1170) > data.crsspctrm = cat(catdim, data.powspctrm, data.crsspctrm); > > > When debugging, /catdim/ is equal to 1. The error occurs because the > 2nd dimension of data.powspctrm and data.crsspctrm are not equal > (former is 148, latter is 10878). Do you have any suggestions on > getting around this problem? Should I construct /freq_avgs /(data > input to ft_connectivityanalysis) differently? I'm also open to > different approaches to working out Welch's method in FieldTrip. > > Please download this archive that contains my test script and 4 > example 10s epochs of a subject: > https://www.dropbox.com/s/js7pztai02f5p27/Welch_fieldtrip.zip The code > should make things clearer (or the opposite). > Observations: I thought about using /ft_freqanalysis_mtmwelch/, but > apparently it's deprecated. > > Thank you all in advance for your feedback. > > Kind regards, > Dragos Stanciu > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From paymandomorientes at yahoo.com Wed Jul 30 13:26:32 2014 From: paymandomorientes at yahoo.com (paymando- morientes) Date: Wed, 30 Jul 2014 04:26:32 -0700 Subject: [FieldTrip] problem with buffer simulation Message-ID: <1406719592.38804.YahooMailNeo@web141606.mail.bf1.yahoo.com> Dear field trippers I have encountered a problem simulating the buffer by  using the function "ft_realtime_fileproxy". When I start writing to the buffer, it works normally but when I stop it by "ctrl + c"  matlab stopps working and I have to terminate it from task manager. Does anyone know where the problem is? what should I change in the buffer or function's settings? thank you all! payman -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jul 30 13:34:06 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 30 Jul 2014 13:34:06 +0200 Subject: [FieldTrip] problem with buffer simulation In-Reply-To: <1406719592.38804.YahooMailNeo@web141606.mail.bf1.yahoo.com> References: <1406719592.38804.YahooMailNeo@web141606.mail.bf1.yahoo.com> Message-ID: <53D8D82E.6010808@donders.ru.nl> Hi Payman, I think what you describe is related to this bug: http://bugzilla.fcdonders.nl/show_bug.cgi?id=934 I am afraid that there is no easy fix for this, and we did not continue investigating this further. Best, Jörn On 7/30/2014 1:26 PM, paymando- morientes wrote: > Dear field trippers > I have encountered a problem simulating the buffer by using the > function "ft_realtime_fileproxy". > When I start writing to the buffer, it works normally but when I stop > it by "ctrl + c" matlab stopps working and I have to terminate it > from task manager. > Does anyone know where the problem is? what should I change in the > buffer or function's settings? > > thank you all! > payman > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From roeysc at gmail.com Wed Jul 30 22:24:53 2014 From: roeysc at gmail.com (Roey Schurr) Date: Wed, 30 Jul 2014 23:24:53 +0300 Subject: [FieldTrip] A datatype error in ft_sourceanalysis (Reference to non-existent field 'topo') Message-ID: Dear fieldtrippers, I'm writing you regarding an error I encountered upon computing an inverse solution in mne method: Reference to non-existent field 'topo'. Error in ft_datatype_comp (line 92) if size(comp.topo,1)==size(comp.topo,2) Error in ft_checkdata (line 342) data = ft_datatype_comp(data); Error in ft_sourceanalysis (line 161) data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'}, 'feedback', 'yes'); The problem stems from a change (made in 2014-05-27) in "ft_sourceanalysis", and can be bypassed by changing the order of data types in line 161 of "ft_sourceanalysis": instead of data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'}, 'feedback', 'yes'); write data = ft_checkdata(data, 'datatype', {*'timelock', 'freq', 'comp'*}, 'feedback', 'yes'); Now, I am sure there was a good reason for making this change, so I am guessing the fault is mine in the way I try computing the inverse solution (which did work until this change of ft_sourceanalysis). The relevant piece of code is: cfg = struct; cfg.method = 'mne'; cfg.elec = elec; cfg.grid = gridVar; cfg.vol = vol; cfg.rawtrial = 'yes'; cfg.hdmfile = headModelPath; cfg.mne.lambda = '5%'; cfg.keepfilter = 'yes'; cfg.rawtrial = 'no'; cfg.singletrial = 'no'; cfg.keeptrials = 'yes'; source = ft_sourceanalysis(cfg, data) I am also not sure why the data is thought to be a "comp" data. A possible cause for the problem is that the raw EEG records I work with are in TRC format which has to be transformed into a fieldtrip compatible format. So the "data" struct in the code has the following fields: data = label: {1x19 cell} fsample: 256 trial: {1x12 cell} time: {1x12 cell} interpolatedElectrodes: {1x12 cell} Any ideas regarding the suggested bypass or the deeper cause of the error will be greatly appreciated. Thank you for your time, Best, roey -------------- next part -------------- An HTML attachment was scrubbed... URL: From Isaiah.C.Smith.17 at dartmouth.edu Wed Jul 30 22:39:12 2014 From: Isaiah.C.Smith.17 at dartmouth.edu (Isaiah C. Smith) Date: Wed, 30 Jul 2014 20:39:12 +0000 Subject: [FieldTrip] Extra Noise Message-ID: <851EC985-AEE4-483C-841F-9BF04CD1AC66@dartmouth.edu> Hello All, I have been trying to get rid of the noise when I create the mesh for this image in the neck area and the areas above the scalp. The MR Images have nothing below the nose area and there seems to be no contrast change in the image backgrounds to cause this result. [cid:9CC3E462-A99E-4540-9D53-E4519F967028 at socal.rr.com] [cid:F80D2CB7-391E-4688-95CF-A18E4425E8C4 at socal.rr.com] I am really stumped as to how to change this, These different results were gotten by changing the threshold and the mesh number slightly. However, each time I redo the process from the original images the chances of “horn” being in front or on top of the head seem to shift. In some cases, there are both. If anyone could help. It would be greatly appreciated. Is there some automated way to get rid of these extra vertices? Isaiah -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-18 at 3.42.39 PM.png Type: image/png Size: 126938 bytes Desc: Screen Shot 2014-07-18 at 3.42.39 PM.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-15 at 6.10.55 PM.png Type: image/png Size: 162431 bytes Desc: Screen Shot 2014-07-15 at 6.10.55 PM.png URL: From dragos at example.com Thu Jul 31 00:06:25 2014 From: drago at example.com (Dragos Stanciu) Date: Wed, 30 Jul 2014 23:06:25 +0100 Subject: [FieldTrip] Connectivity analysis after applying Welch's method Message-ID: Hello Jörn, Thank you so much for responding. The suggested changes were spot on and ft_connectivityanalysis executed successfully. In the end, I went with the approach of redefining the 10s epoch in 2s minitrials and performing ft_freqanalysis on these minitrials with *cfg.output='fourier'* and *keeptrial='yes'. *I then did ft_connectivityanalysis on the frequency structures resulted from processing the segmented data. This would give me connectivity matrices for each 10s epoch, which I then average to get one connectivity matrix for the subject (technically, I have a connectivity matrix for each frequency bin, but I can again average across the frequency spectrum). I have a question on the debiased weighted phase lag index measure. The values in the matrix vary between -1 and 1 (depending if the relative phase lags or leads). When I construct the adjacency matrices, is it just a matter of taking the absolute value of these values? I would also like some advice on plotting connectivity matrices. I was able to plot one matrix with ft_plot_matrix, but it would be really nice if I could plot a connectivity graph where the thickness of the edges correspond to the strength of the connectivity measure. I tried ft_topoplotER with 4D148.lay as the layout file and 'gui' as refchannel, but I didn't get anything interesting. As my data is MEG, it doesn't make sense to me to choose a reference channel... Ideally, I would like to combine the layout (4D148.lay) with the connectivity matrix for plotting the graph. Do you have any ideas for this? Also, do you have any other suggestions on what other plotting functions can be used with these connectivity matrices? I've looked through the tutorial, but the functions don't seem very relevant to my type of data. Thank you for your help. Regards, Dragos Stanciu > Message: 9 > Date: Wed, 30 Jul 2014 10:28:50 +0200 > From: "J?rn M. Horschig" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Connectivity analysis after applying Welch's > method > > Hi Dragos, > > while quickly browisng through your mail, it appears to me that you > simply need to set single_epoch_freq.dimord = 'rpt_chan_freq'. FieldTrip > is using the dimord field to infer the order of the dimensions > (*dim*ension *ord*er). The actual dimensions of powspctrm and crsspctrm > are now inconsistent with the dimord specifications. > > Best, > J?rn > > > On 7/30/2014 1:18 AM, Dragos Stanciu wrote: > > Dear FieldTrippers, > > > > I'm Dragos Stanciu and I'm working on my MSc in Neuroinformatics > > dissertation at the University of Edinburgh. My project involves > > analysis of resting-state functional connectivity using graph theory > > in Alzheimer's disease based on MEG data. > > > > Each of my subjects has a number of 10s epochs (trials) associated > > with him/her. I was able to compute the coherence and weighted phase > > lag index measures (with /ft_freqanalysis /and > > /ft_connectivityanalysis) /by treating my 10s epochs as trials, but > > now I would like to reduce the amount of noise in the estimation of > > the frequency spectrum by employing Welch's method. > > > > For this, I split each 10s epoch in 2s segments (minitrials) with 50% > > overlap: > > > > [sep_epoch_data] = ft_redefinetrial(cfg_cut, single_epoch_data)/. / > > > > > > I then apply /ft_preprocessing /on the minitrials: > > > > [processed_single_epoch] = ft_preprocessing(cfg, sep_epoch_data); > > > > I then do frequency analysis on the preprocessed segmented data: > > > > [single_epoch_freq] = ft_freqanalysis(cfg_freq, > > processed_single_epoch); > > > > where > > > > display(cfg_freq) > > method: 'mtmfft' > > taper: 'hanning' > > foilim: [0.5000 4] > > output: 'powandcsd' > > channel: {148x1 cell} % 148 channels labelled from A1 to > > A148 > > keeptrial: 'no' % don't keep the minitrials, as we want > > to average them > > keeptapers: 'no' > > > > Please note that I average the minitrials (/keeptrial = 'no'/) as I > > want to get an average of the frequencies. > > > > The resulting /single_epoch_freq/ structure looks like: > > > > display(single_epoch_freq) > > label: {148x1 cell} > > dimord: 'chan_freq' > > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > > 4.0009] > > powspctrm: [148x8 double] > > labelcmb: {10878x2 cell} % channel combinations (148*147/2) > > crsspctrm: [10878x8 double] > > cfg: [1x1 struct] > > > > > > The last step is to append the averaged frequency structures of each > > 10s epoch together and perform connectivity analysis on the main 10s > > epochs. I do the concatenation like so: > > freq_avgs_powspctrm = [freq_avgs_powspctrm; > > permute(single_epoch_freq.powspctrm, [3,1,2])]; > > > > freq_avgs_crsspctrm = [freq_avgs_crsspctrm; > > permute(single_epoch_freq.crsspctrm, [3,1,2])]; > > > > The idea behind /permute(..., [3, 1, 2])/ is that I want the first > > dimension to represent trials, the second dimension channel > > combinations and the third dimension frequencies, as this is needed > > for the input of /ft_connectivity_wpli /(Repetitions x > > Channelcombination (x Frequency)). > > > > I then call stat_conn = ft_connectivityanalysis(cfg_conn, freq_avgs); > > where: > > > > display(cfg_conn) > > method: 'wpli_debiased' > > channel: {148x1 cell} > > > > and > > > > display(freq_avgs) > > powspctrm: [4x148x8 double] % as I have 4 ten second epochs > > crsspctrm: [4x10878x8 double] % as I have 4 ten second epochs > > label: {148x1 cell} > > dimord: 'chan_freq' > > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > > 4.0009] > > labelcmb: {10878x2 cell} > > cfg: [1x1 struct] > > > > > > The error that I get when running /ft_connectivityanalysis/ is: > > > > Error using cat > > CAT arguments dimensions are not consistent. > > Error in ft_checkdata>fixcsd (line 1170) > > data.crsspctrm = cat(catdim, data.powspctrm, data.crsspctrm); > > > > > > When debugging, /catdim/ is equal to 1. The error occurs because the > > 2nd dimension of data.powspctrm and data.crsspctrm are not equal > > (former is 148, latter is 10878). Do you have any suggestions on > > getting around this problem? Should I construct /freq_avgs /(data > > input to ft_connectivityanalysis) differently? I'm also open to > > different approaches to working out Welch's method in FieldTrip. > > > > Please download this archive that contains my test script and 4 > > example 10s epochs of a subject: > > https://www.dropbox.com/s/js7pztai02f5p27/Welch_fieldtrip.zip The code > > should make things clearer (or the opposite). > > Observations: I thought about using /ft_freqanalysis_mtmwelch/, but > > apparently it's deprecated. > > > > Thank you all in advance for your feedback. > > > > Kind regards, > > Dragos Stanciu > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Jul 31 09:00:26 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 31 Jul 2014 09:00:26 +0200 Subject: [FieldTrip] A datatype error in ft_sourceanalysis (Reference to non-existent field 'topo') In-Reply-To: References: Message-ID: Hi Roey, That sounds like a bug to me. I added this on our bugzilla: http://bugzilla.fcdonders.nl/show_bug.cgi?id=2664 . You should be on the cc list for that bug. Best, Eelke On 30 July 2014 22:24, Roey Schurr wrote: > Dear fieldtrippers, > > I'm writing you regarding an error I encountered upon computing an inverse > solution in mne method: > > Reference to non-existent field 'topo'. > > Error in ft_datatype_comp (line 92) > if size(comp.topo,1)==size(comp.topo,2) > > Error in ft_checkdata (line 342) > data = ft_datatype_comp(data); > > Error in ft_sourceanalysis (line 161) > data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'}, > 'feedback', > 'yes'); > > The problem stems from a change (made in 2014-05-27) in "ft_sourceanalysis", > and can be bypassed by changing the order of data types in line 161 of > "ft_sourceanalysis": > > instead of > data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'}, > 'feedback', 'yes'); > write > data = ft_checkdata(data, 'datatype', {'timelock', 'freq', 'comp'}, > 'feedback', 'yes'); > > Now, I am sure there was a good reason for making this change, so I am > guessing the fault is mine in the way I try computing the inverse solution > (which did work until this change of ft_sourceanalysis). The relevant piece > of code is: > > cfg = struct; > cfg.method = 'mne'; > cfg.elec = elec; > cfg.grid = gridVar; > cfg.vol = vol; > cfg.rawtrial = 'yes'; > cfg.hdmfile = headModelPath; > cfg.mne.lambda = '5%'; > cfg.keepfilter = 'yes'; > cfg.rawtrial = 'no'; > cfg.singletrial = 'no'; > cfg.keeptrials = 'yes'; > source = ft_sourceanalysis(cfg, data) > > I am also not sure why the data is thought to be a "comp" data. A possible > cause for the problem is that the raw EEG records I work with are in TRC > format which has to be transformed into a fieldtrip compatible format. So > the "data" struct in the code has the following fields: > > data = > label: {1x19 cell} > fsample: 256 > trial: {1x12 cell} > time: {1x12 cell} > interpolatedElectrodes: {1x12 cell} > > Any ideas regarding the suggested bypass or the deeper cause of the error > will be greatly appreciated. > > Thank you for your time, > Best, > > roey > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From matt.gerhold at gmail.com Wed Jul 30 18:05:27 2014 From: matt.gerhold at gmail.com (Matt Gerhold) Date: Wed, 30 Jul 2014 09:05:27 -0700 Subject: [FieldTrip] Granger Causality Questions Message-ID: Hi, Given the data provided, the non-parametric granger causality test yields results which suggest no directional influence when all channels are used. The data is current source densities, they have not been scaled according to head circumference (fs=512). The subject is in an eyes-open condition. Any suggestions or comments on the resultant solution? Matthew -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CSD_Data_Eyes_Open.mat Type: application/octet-stream Size: 3542373 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Grange_Causality_Test_My_Data_Example.m Type: application/octet-stream Size: 2182 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Channel_Locs_20_Chans.jpg Type: image/jpeg Size: 31550 bytes Desc: not available URL: From d.lozanosoldevilla at fcdonders.ru.nl Thu Jul 31 10:31:19 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Thu, 31 Jul 2014 10:31:19 +0200 (CEST) Subject: [FieldTrip] Extra Noise In-Reply-To: <851EC985-AEE4-483C-841F-9BF04CD1AC66@dartmouth.edu> Message-ID: <2127891963.8064221.1406795479657.JavaMail.root@sculptor.zimbra.ru.nl> Hi Isaiah, Recently we answered a similar issue here: http ://mailman.science. ru . nl / pipermail / fieldtrip /2014-July/008273. html best, Diego ----- Original Message ----- > From: "Isaiah C. Smith" > To: " FieldTrip discussion list" < fieldtrip @science. ru . nl > > Sent: Wednesday, 30 July, 2014 10:39:12 PM > Subject: [ FieldTrip ] Extra Noise > Hello All, > I have been trying to get rid of the noise when I create the mesh for > this image in the neck area and the areas above the scalp. The MR > Images have nothing below the nose area and there seems to be no > contrast change in the image backgrounds to cause this result. > I am really stumped as to how to change this, These different results > were gotten by changing the threshold and the mesh number slightly. > However, each time I redo the process from the original images the > chances of “horn” being in front or on top of the head seem to shift. > In some cases, there are both. If anyone could help. It would be > greatly appreciated. Is there some automated way to get rid of these > extra vertices ? > Isaiah > _______________________________________________ > fieldtrip mailing list > fieldtrip @ donders . ru . nl > http ://mailman.science. ru . nl /mailman/ listinfo / fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http :// www . ru . nl /people/ donders /lozano-soldevilla-d/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-18 at 3.42.39 PM.png Type: image/png Size: 126938 bytes Desc: Screen Shot 2014-07-18 at 3.42.39 PM.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-07-15 at 6.10.55 PM.png Type: image/png Size: 162431 bytes Desc: Screen Shot 2014-07-15 at 6.10.55 PM.png URL: From s.rombetto at cib.na.cnr.it Thu Jul 31 12:22:28 2014 From: s.rombetto at cib.na.cnr.it (s.rombetto at cib.na.cnr.it) Date: Thu, 31 Jul 2014 12:22:28 +0200 Subject: [FieldTrip] source reconstruction Message-ID: <20140731122228.qingclalck0ooo4g@arco.cib.na.cnr.it> Dear all, I'm working on source reconstruction using the following steps: - I construct a forward model from a segmented individual mri - I prepare the head model from the segmented brain surface (option singleshell) - I compute lead field with ft_prepare_leadfield (is this correct? Or should I use ft_compute_leadfield? I cannot understand the differences between them) After this I do source reconstruction with dipole fit methods (as implemented in ft_dipolefitting) Is this sequence correct according to you? I'm in trouble because I find that the source sometimes is located outside the brain. Any suggestion? Sara ------------------------- Dott.ssa Sara Rombetto Istituto di Cibernetica "E. Caianiello" Via Campi Flegrei, 34 80078 Pozzuoli (NA) Italy mob +39 3401689815 tel +39 0818675361 fax +39 0818675128 Lab MEG 0817483511 -------------------------- "I disapprove of what you say, but I will defend to the death your right to say it." [Evelyn Beatrice Hall, The Friends Of Voltaire] ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From hweeling.lee at gmail.com Thu Jul 31 13:29:40 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 31 Jul 2014 13:29:40 +0200 Subject: [FieldTrip] sLoreta Message-ID: Dear all, I'm interested to apply sLoreta to my EEG data, as implemented by Babiloni et al., in http://www.ncbi.nlm.nih.gov/pubmed/20930306. >From Fieldtrip website, I read that it is possible to read the output generated by Loreta and read it in Fieldtrip. However, I wonder if it's possible to convert the preprocessed fieldtrip data to Loreta and then generate the sLoreta output. Can someone please help and share his/her experience with this? Thank you very much! Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Jul 31 15:17:05 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 31 Jul 2014 15:17:05 +0200 Subject: [FieldTrip] Connectivity analysis after applying Welch's method In-Reply-To: References: Message-ID: <53DA41D1.7080604@donders.ru.nl> Hi Dragos, have yoi checked ft_topoplotCC? Best, Jörn On 7/31/2014 12:06 AM, Dragos Stanciu wrote: > Hello Jörn, > > Thank you so much for responding. The suggested changes were spot on > and ft_connectivityanalysis executed successfully. > In the end, I went with the approach of redefining the 10s epoch in 2s > minitrials and performing ft_freqanalysis on these minitrials with > /cfg.output='fourier'/ and /keeptrial='yes'. /I then did > ft_connectivityanalysis on the frequency structures resulted from > processing the segmented data. This would give me connectivity > matrices for each 10s epoch, which I then average to get one > connectivity matrix for the subject (technically, I have a > connectivity matrix for each frequency bin, but I can again average > across the frequency spectrum). > > I have a question on the debiased weighted phase lag index measure. > The values in the matrix vary between -1 and 1 (depending if the > relative phase lags or leads). When I construct the adjacency > matrices, is it just a matter of taking the absolute value of these > values? > > I would also like some advice on plotting connectivity matrices. I was > able to plot one matrix with ft_plot_matrix, but it would be really > nice if I could plot a connectivity graph where the thickness of the > edges correspond to the strength of the connectivity measure. I tried > ft_topoplotER with 4D148.lay as the layout file and 'gui' as > refchannel, but I didn't get anything interesting. As my data is MEG, > it doesn't make sense to me to choose a reference channel... > Ideally, I would like to combine the layout (4D148.lay) with the > connectivity matrix for plotting the graph. Do you have any ideas for > this? Also, do you have any other suggestions on what other plotting > functions can be used with these connectivity matrices? I've looked > through the tutorial, but the functions don't seem very relevant to my > type of data. > > Thank you for your help. > > Regards, > Dragos Stanciu > > Message: 9 > Date: Wed, 30 Jul 2014 10:28:50 +0200 > From: "J?rn M. Horschig" > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Connectivity analysis after applying Welch's > method > > Hi Dragos, > > while quickly browisng through your mail, it appears to me that you > simply need to set single_epoch_freq.dimord = 'rpt_chan_freq'. > FieldTrip > is using the dimord field to infer the order of the dimensions > (*dim*ension *ord*er). The actual dimensions of powspctrm and > crsspctrm > are now inconsistent with the dimord specifications. > > Best, > J?rn > > > On 7/30/2014 1:18 AM, Dragos Stanciu wrote: > > Dear FieldTrippers, > > > > I'm Dragos Stanciu and I'm working on my MSc in Neuroinformatics > > dissertation at the University of Edinburgh. My project involves > > analysis of resting-state functional connectivity using graph theory > > in Alzheimer's disease based on MEG data. > > > > Each of my subjects has a number of 10s epochs (trials) associated > > with him/her. I was able to compute the coherence and weighted phase > > lag index measures (with /ft_freqanalysis /and > > /ft_connectivityanalysis) /by treating my 10s epochs as trials, but > > now I would like to reduce the amount of noise in the estimation of > > the frequency spectrum by employing Welch's method. > > > > For this, I split each 10s epoch in 2s segments (minitrials) > with 50% > > overlap: > > > > [sep_epoch_data] = ft_redefinetrial(cfg_cut, > single_epoch_data)/. / > > > > > > I then apply /ft_preprocessing /on the minitrials: > > > > [processed_single_epoch] = ft_preprocessing(cfg, > sep_epoch_data); > > > > I then do frequency analysis on the preprocessed segmented data: > > > > [single_epoch_freq] = ft_freqanalysis(cfg_freq, > > processed_single_epoch); > > > > where > > > > display(cfg_freq) > > method: 'mtmfft' > > taper: 'hanning' > > foilim: [0.5000 4] > > output: 'powandcsd' > > channel: {148x1 cell} % 148 channels labelled from > A1 to > > A148 > > keeptrial: 'no' % don't keep the minitrials, as we want > > to average them > > keeptapers: 'no' > > > > Please note that I average the minitrials (/keeptrial = 'no'/) as I > > want to get an average of the frequencies. > > > > The resulting /single_epoch_freq/ structure looks like: > > > > display(single_epoch_freq) > > label: {148x1 cell} > > dimord: 'chan_freq' > > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > > 4.0009] > > powspctrm: [148x8 double] > > labelcmb: {10878x2 cell} % channel combinations > (148*147/2) > > crsspctrm: [10878x8 double] > > cfg: [1x1 struct] > > > > > > The last step is to append the averaged frequency structures of each > > 10s epoch together and perform connectivity analysis on the main 10s > > epochs. I do the concatenation like so: > > freq_avgs_powspctrm = [freq_avgs_powspctrm; > > permute(single_epoch_freq.powspctrm, [3,1,2])]; > > > > freq_avgs_crsspctrm = [freq_avgs_crsspctrm; > > permute(single_epoch_freq.crsspctrm, [3,1,2])]; > > > > The idea behind /permute(..., [3, 1, 2])/ is that I want the first > > dimension to represent trials, the second dimension channel > > combinations and the third dimension frequencies, as this is needed > > for the input of /ft_connectivity_wpli /(Repetitions x > > Channelcombination (x Frequency)). > > > > I then call stat_conn = ft_connectivityanalysis(cfg_conn, > freq_avgs); > > where: > > > > display(cfg_conn) > > method: 'wpli_debiased' > > channel: {148x1 cell} > > > > and > > > > display(freq_avgs) > > powspctrm: [4x148x8 double] % as I have 4 ten > second epochs > > crsspctrm: [4x10878x8 double] % as I have 4 ten > second epochs > > label: {148x1 cell} > > dimord: 'chan_freq' > > freq: [0.5001 1.0002 1.5004 2.0005 2.5006 3.0007 3.5008 > > 4.0009] > > labelcmb: {10878x2 cell} > > cfg: [1x1 struct] > > > > > > The error that I get when running /ft_connectivityanalysis/ is: > > > > Error using cat > > CAT arguments dimensions are not consistent. > > Error in ft_checkdata>fixcsd (line 1170) > > data.crsspctrm = cat(catdim, data.powspctrm, > data.crsspctrm); > > > > > > When debugging, /catdim/ is equal to 1. The error occurs because the > > 2nd dimension of data.powspctrm and data.crsspctrm are not equal > > (former is 148, latter is 10878). Do you have any suggestions on > > getting around this problem? Should I construct /freq_avgs /(data > > input to ft_connectivityanalysis) differently? I'm also open to > > different approaches to working out Welch's method in FieldTrip. > > > > Please download this archive that contains my test script and 4 > > example 10s epochs of a subject: > > https://www.dropbox.com/s/js7pztai02f5p27/Welch_fieldtrip.zip > The code > > should make things clearer (or the opposite). > > Observations: I thought about using /ft_freqanalysis_mtmwelch/, but > > apparently it's deprecated. > > > > Thank you all in advance for your feedback. > > > > Kind regards, > > Dragos Stanciu > > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From paymandomorientes at yahoo.com Thu Jul 31 20:54:33 2014 From: paymandomorientes at yahoo.com (paymando- morientes) Date: Thu, 31 Jul 2014 11:54:33 -0700 Subject: [FieldTrip] Artifact rejection in realtime analysis Message-ID: <1406832873.91684.YahooMailNeo@web141602.mail.bf1.yahoo.com> Dear field trippers I am trying to design my first real time loop for an EEG experiment. The question that I have now is that how should I deal with artifacts such as eye blinks. Firstly, I think rejecting data segments in real time analysis is pointless because if an epoch is artifactual and can not represent the classified features,  it could simply get the label (epoch rejected) in the classification section and the script then moves to the next segment.  Secondly, ICA is too slow to be implemented in an online loop. So how should artifacts be dealt with inside a real time analysis? Are there any ways for correcting eye blinks other than ICA?  Can you give me any suggestions? THANK YOU ALL! payman -------------- next part -------------- An HTML attachment was scrubbed... URL: