From Darren.Price at mrc-cbu.cam.ac.uk Thu Aug 2 15:42:19 2018 From: Darren.Price at mrc-cbu.cam.ac.uk (Darren Price) Date: Thu, 2 Aug 2018 13:42:19 +0000 Subject: [FieldTrip] Transfer entropy Message-ID: Hi All Could anyone suggest the tools for computing transfer entropy in Matlab? I had a look at MuTE toolbox, but that seemed overly complicated, and I couldn't even get the example to work. I'm currently looking at TRENTTOOL which looks good and works with fieldtrip format. I will also try "phase transfer entropy", which is a single matlab function and simple to implement. Any other suggestions or comments / experiences with those above would be very helpful. To begin with I would simply like to check for information transfer between two timeseries. I may also check for indirect serial transfer i.e. A>B>C Thanks Darren ------------------------------------------------------- Dr. Darren Price Research Associate MRC Cognition & Brain Sciences Unit 15 Chaucer Road Cambridge, CB2 7EF England EMAIL: darren.price at mrc-cbu.cam.ac.uk URL: http://www.mrc-cbu.cam.ac.uk/people/darren.price TEL +44 (0)1223 355 294 x202 FAX +44 (0)1223 359 062 MOB +44 (0)7717822431 ------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From popwatson at hotmail.com Fri Aug 3 07:23:00 2018 From: popwatson at hotmail.com (Poppy Watson) Date: Fri, 3 Aug 2018 05:23:00 +0000 Subject: [FieldTrip] Issues with TF analysis and plotting Message-ID: Dear all, Sorry for this simple question but I am unable to work out what I am doing wrong. I am working through a TF analysis using all the online tutorials etc. I'm interested in the time window 1 second before the trigger but have taken a 2 second window (0.5 seconds either side of the bit I am interested in). Everything seems to be going ok and the freq.powspctrm object seems to be the correct size but when plotting my results (using any of the multiplot, singeplot or topoplot methods) I keep getting the error message: incorrect specification of cfg.trials for data without repetitions. See here some example code: cfg.trials = highValSuccessTrials; % this is a vector of trial numbers cfg.method = 'mtmconvol'; cfg.keeptrials = 'no'; cfg.output = 'pow'; cfg.channel = 'eeg'; cfg.taper = 'hanning'; cfg.foi = 2:2:30; cfg.t_ftimwin = ones(length(cfg.foi),1).*2; % length of time window = 2 sec cfg.toi = -1.5:0.05:0.5; % time window "slides" from -1.5 to 0.5 sec (0.5 s after stim presentation) in steps of 0.05 sec (50 ms) freqdata = ft_freqanalysis(cfg, preProcData); %%plotting cfg.baseline = [-1.5 -1.1]; % this is just before my 1 sec of interest cfg.baselinetype = 'absolute'; cfg.maskstyle = 'saturation'; cfg.channel = 'FcZ'; figure ft_singleplotTFR(cfg, freqdata); Much appreciated! --------------------------------------------------------------------- P. Watson -------------- next part -------------- An HTML attachment was scrubbed... URL: From nitin.williams at helsinki.fi Fri Aug 3 08:37:20 2018 From: nitin.williams at helsinki.fi (Williams, Nitin J) Date: Fri, 3 Aug 2018 06:37:20 +0000 Subject: [FieldTrip] Transfer entropy In-Reply-To: References: Message-ID: hi Darren! :) Multi-Variate Granger Causality is also a suitable framework to check for information transfer between time series: Anil Seth's MATLAB toolbox below: http://users.sussex.ac.uk/~anils/aks_code.htm I think that in the case of variables with Gaussian distributions and linear relationships between them, MVGC gives the same results as Multi-Variate Transfer Entropy (MVTE). However, MVTE is also generalized to the case of variables with non-Gaussian distributions with non-linear relationships between them. A related framework is the Multi-Variate Auto-Regressive (MVAR) model, which can also be used to check for information transfer between time series. In particular, Partial Directed Coherence (PDC) and Directed Transfer Function (DTF) can be interpreted in terms of information transfer between time series, and the non-normalised PDC also has a similar interpretation, perhaps even more straightforward than the conventional PDC measure. The MVAR-based connectivity measures are implemented in Fieldtrip, in ft_connectivityanalysis Scott Makeig's group also has the SIFT (Source Information Flow Toolbox) for this: https://sccn.ucsd.edu/wiki/SIFT I have found the user manual to be helpful: https://sccn.ucsd.edu/mediawiki/images/d/d2/SIFT_manual_0.1a.pdf Both MVGC and MVAR allow for frequency-specific measures of information flow between time series. Regards, Nitin From: fieldtrip On Behalf Of Darren Price Sent: Thursday, August 2, 2018 4:42 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Transfer entropy Hi All Could anyone suggest the tools for computing transfer entropy in Matlab? I had a look at MuTE toolbox, but that seemed overly complicated, and I couldn't even get the example to work. I'm currently looking at TRENTTOOL which looks good and works with fieldtrip format. I will also try "phase transfer entropy", which is a single matlab function and simple to implement. Any other suggestions or comments / experiences with those above would be very helpful. To begin with I would simply like to check for information transfer between two timeseries. I may also check for indirect serial transfer i.e. A>B>C Thanks Darren ------------------------------------------------------- Dr. Darren Price Research Associate MRC Cognition & Brain Sciences Unit 15 Chaucer Road Cambridge, CB2 7EF England EMAIL: darren.price at mrc-cbu.cam.ac.uk URL: http://www.mrc-cbu.cam.ac.uk/people/darren.price TEL +44 (0)1223 355 294 x202 FAX +44 (0)1223 359 062 MOB +44 (0)7717822431 ------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Aug 3 08:43:49 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 3 Aug 2018 06:43:49 +0000 Subject: [FieldTrip] Transfer entropy In-Reply-To: References: Message-ID: Dear Darren, In this context it might be also interesting to look into Robin Ince’s gcmi tool (Gaussian Cupola transform based mutual information). As far as my understanding goes, this techniques allows for the computation of directed information between time series (optionally conditioned on a third one), which is very similar to transfer entropy. Robin and I have been working to integrate his tools into FieldTrip a while ago, but did not quite finalize it (although FieldTrip at present should support the computation of mutual information between neural signals, and a continuously valued reference signal, using Robin’s code). With some proper incentive we might consider finishing the final 5% in order to really get it up and running for directed information as well. Best wishes, Jan-Mathijs On 2 Aug 2018, at 15:42, Darren Price > wrote: Hi All Could anyone suggest the tools for computing transfer entropy in Matlab? I had a look at MuTE toolbox, but that seemed overly complicated, and I couldn’t even get the example to work. I’m currently looking at TRENTTOOL which looks good and works with fieldtrip format. I will also try “phase transfer entropy”, which is a single matlab function and simple to implement. Any other suggestions or comments / experiences with those above would be very helpful. To begin with I would simply like to check for information transfer between two timeseries. I may also check for indirect serial transfer i.e. A>B>C Thanks Darren ------------------------------------------------------- Dr. Darren Price Research Associate MRC Cognition & Brain Sciences Unit 15 Chaucer Road Cambridge, CB2 7EF England EMAIL: darren.price at mrc-cbu.cam.ac.uk URL: http://www.mrc-cbu.cam.ac.uk/people/darren.price TEL +44 (0)1223 355 294 x202 FAX +44 (0)1223 359 062 MOB +44 (0)7717822431 ------------------------------------------------------- _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Patricia.Wollstadt at gmx.de Fri Aug 3 11:44:48 2018 From: Patricia.Wollstadt at gmx.de (Patricia Wollstadt) Date: Fri, 3 Aug 2018 11:44:48 +0200 Subject: [FieldTrip] Transfer entropy In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From tom.marshall at psy.ox.ac.uk Fri Aug 3 12:30:37 2018 From: tom.marshall at psy.ox.ac.uk (Tom Marshall) Date: Fri, 3 Aug 2018 10:30:37 +0000 Subject: [FieldTrip] Issues with TF analysis and plotting In-Reply-To: References: Message-ID: Hi Poppy, You've asked not to keep the trials (cfg.keeptrials = 'no'), but then propagated that cfg to your call to ft_singleplotTFR. So fieldtrip is reading the cfg.trials field again at plotting and is trying to find the trials again in 'freqdata'. But there aren't any trials there anymore. If you change cfg.keeptrials = 'yes' in your call to ft_freqanalysis this code will work. Alternatively add a cfg = [] before the call to ft_singleplotTFR. Best, Tom ________________________________ From: fieldtrip on behalf of Poppy Watson Sent: 03 August 2018 06:23:00 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Issues with TF analysis and plotting Dear all, Sorry for this simple question but I am unable to work out what I am doing wrong. I am working through a TF analysis using all the online tutorials etc. I’m interested in the time window 1 second before the trigger but have taken a 2 second window (0.5 seconds either side of the bit I am interested in). Everything seems to be going ok and the freq.powspctrm object seems to be the correct size but when plotting my results (using any of the multiplot, singeplot or topoplot methods) I keep getting the error message: incorrect specification of cfg.trials for data without repetitions. See here some example code: cfg.trials = highValSuccessTrials; % this is a vector of trial numbers cfg.method = 'mtmconvol'; cfg.keeptrials = 'no'; cfg.output = 'pow'; cfg.channel = 'eeg'; cfg.taper = 'hanning'; cfg.foi = 2:2:30; cfg.t_ftimwin = ones(length(cfg.foi),1).*2; % length of time window = 2 sec cfg.toi = -1.5:0.05:0.5; % time window "slides" from -1.5 to 0.5 sec (0.5 s after stim presentation) in steps of 0.05 sec (50 ms) freqdata = ft_freqanalysis(cfg, preProcData); %%plotting cfg.baseline = [-1.5 -1.1]; % this is just before my 1 sec of interest cfg.baselinetype = 'absolute'; cfg.maskstyle = 'saturation'; cfg.channel = 'FcZ'; figure ft_singleplotTFR(cfg, freqdata); Much appreciated! --------------------------------------------------------------------- P. Watson -------------- next part -------------- An HTML attachment was scrubbed... URL: From brungio at gmail.com Fri Aug 3 14:57:03 2018 From: brungio at gmail.com (Bruno L. Giordano) Date: Fri, 3 Aug 2018 14:57:03 +0200 Subject: [FieldTrip] Transfer entropy In-Reply-To: References: Message-ID: Hi Darren, I personally recommend GCMI by Robin Ince: https://github.com/robince/gcmi Transfer Entropy computation is definitely possible, but as far as I see in the toolbox there is no function that computes it directly. You will have to compute the required MI/CMI terms yourself and assemble them to calculate TE. With this code, you can indeed also compute a "feature informed" version of TE (i.e. Directed Feature Information), which isolates the contribution to connectivity of the transfer of a time-varying stimulus feature you specify explicitly. Significance testing for single-subject and group level can proceed as specified here: https://elifesciences.org/articles/24763 Best, Bruno On Fri, 3 Aug 2018 at 12:24, Patricia Wollstadt wrote: > Hi Darren, > > there is also the excellent JIDT (Java information dynamics toolkit) by > Joe Lizier, which comes with MATLAB/octave wrappers: > https://github.com/jlizier/jidt > > There is even a demo for the quick calculation of TE from two time series: > https://github.com/jlizier/jidt/blob/master/demos/octave/example4TeContinuousDataKraskov.m > > Hope this helps! > > Best, > Patricia > > > *Gesendet:* Donnerstag, 02. August 2018 um 15:42 Uhr > *Von:* "Darren Price" > *An:* "fieldtrip at science.ru.nl" > *Betreff:* [FieldTrip] Transfer entropy > > Hi All > > > > Could anyone suggest the tools for computing transfer entropy in Matlab? I > had a look at MuTE toolbox, but that seemed overly complicated, and I > couldn’t even get the example to work. I’m currently looking at TRENTTOOL > which looks good and works with fieldtrip format. I will also try “phase > transfer entropy”, which is a single matlab function and simple to > implement. > > > > Any other suggestions or comments / experiences with those above would be > very helpful. > > > > To begin with I would simply like to check for information transfer > between two timeseries. I may also check for indirect serial transfer i.e. > A>B>C > > > > Thanks > > > > Darren > > > > ------------------------------------------------------- > > Dr. Darren Price > > Research Associate > > MRC Cognition & Brain Sciences Unit > > 15 Chaucer Road > > Cambridge, CB2 7EF > > England > > EMAIL: darren.price at mrc-cbu.cam.ac.uk > > URL: http://www.mrc-cbu.cam.ac.uk/people/darren.price > > TEL +44 (0)1223 355 294 x202 > > FAX +44 (0)1223 359 062 > > MOB +44 (0)7717822431 > > ------------------------------------------------------- > > > _______________________________________________ fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Bruno L. Giordano, PhD – CR1 Institut de Neurosciences de la Timone (INT) UMR 7289, CNRS and Aix Marseille Université http://www.int.univ-amu.fr/ Campus santé Timone 27, boulevard Jean Moulin 13385 Marseille cedex 5 Www: http://www.brunolgiordano.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From stieg030 at umn.edu Fri Aug 3 16:34:23 2018 From: stieg030 at umn.edu (James Stieger) Date: Fri, 3 Aug 2018 10:34:23 -0400 Subject: [FieldTrip] ERROR in fieldtrip sourcemodel tutorial freesurfer pipeline Message-ID: Hello! My name is James Stieger and I am a PhD student in biomedical engineering at the University of Minnesota studying brain computer interfaces. I have been going through the fieldtrip tutorials and I encounter the error in the source model tutorial found here: http://www.fieldtriptoolbox.org/tutorial/sourcemodel I have been following the pipeline outlined on the web page and typically receive the notification: recon-all -s Subject01 finished without error However, when executing the command: recon-all -finalsurfs -subjid Subject01 I receive the following errors in the recon-all.log: mris_convert --volume Subject01 lh .../fieldtrip/Tutorial/FreeSurfer/Subject01/surf/lh.volume MRISread(.../fieldtrip/Tutorial/FreeSurfer/Subject01/surf/lh.white): could not open file No such file or directory ERROR: vertexvol mris_convert --volume Subject01 lh .../fieldtrip/Tutorial/FreeSurfer/Subject01/surf/lh.volume and in the surf error.log: MRISread(.../fieldtrip/Tutorial/FreeSurfer/Subject01/surf/lh.white): could not open file however the command recon-all -white -subjid Subject01 also finished without error. Can someone help? James -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauppe.s at gmail.com Tue Aug 7 09:44:38 2018 From: sauppe.s at gmail.com (Sebastian Sauppe) Date: Tue, 7 Aug 2018 09:44:38 +0200 Subject: [FieldTrip] Templates for defining neighbouring channels for EGI Message-ID: <20BF2385-3D95-433D-816E-0BF89CAAFFA3@gmail.com> Dear FieldTrip list members, does anyone know whether there are templates available for EGI systems to define neighboring channels? On the FieldTrip homepage, there are templates for Biosemi, Easycap and 10% systems (http://www.fieldtriptoolbox.org/template/neighbours). However, EGI has a different montage and the channel names don’t conform to the 10% system so that these are not easily applicable. Any hints would be highly appreciated! Regards, Sebastian ----------- Dr. Sebastian Sauppe Department of Comparative Linguistics, University of Zurich Homepage: https://sites.google.com/site/sauppes/ Twitter: @SebastianSauppe Google Scholar Citations: https://scholar.google.de/citations?user=wEtciKQAAAAJ ResearchGate: http://www.researchgate.net/profile/Sebastian_Sauppe ORCID ID: http://orcid.org/0000-0001-8670-8197 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Tue Aug 7 10:59:05 2018 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Tue, 7 Aug 2018 10:59:05 +0200 Subject: [FieldTrip] Templates for defining neighbouring channels for EGI In-Reply-To: <20BF2385-3D95-433D-816E-0BF89CAAFFA3@gmail.com> References: <20BF2385-3D95-433D-816E-0BF89CAAFFA3@gmail.com> Message-ID: Dear Sebastian, could you try this and see if it works for you: [~,ftpath] = ft_version; elec = ft_read_sens(strcat(ftpath,'/template/electrode/GSN-HydroCel-256.sfp')); cfg = []; cfg.method = 'distance'; cfg.neighbourdist = 3; cfg.feedback = 'yes'; neighbours = ft_prepare_neighbours(cfg,elec); Good luck, tzvetan > Am 07.08.2018 um 09:44 schrieb Sebastian Sauppe : > > Dear FieldTrip list members, > > does anyone know whether there are templates available for EGI systems to define neighboring channels? On the FieldTrip homepage, there are templates for Biosemi, Easycap and 10% systems (http://www.fieldtriptoolbox.org/template/neighbours ). However, EGI has a different montage and the channel names don’t conform to the 10% system so that these are not easily applicable. Any hints would be highly appreciated! > > Regards, > Sebastian > > ----------- > Dr. Sebastian Sauppe > Department of Comparative Linguistics, University of Zurich > Homepage: https://sites.google.com/site/sauppes/ > Twitter: @SebastianSauppe > Google Scholar Citations: https://scholar.google.de/citations?user=wEtciKQAAAAJ > ResearchGate: http://www.researchgate.net/profile/Sebastian_Sauppe > ORCID ID: http://orcid.org/0000-0001-8670-8197 > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From beese at cbs.mpg.de Tue Aug 7 11:15:12 2018 From: beese at cbs.mpg.de (Caroline Beese) Date: Tue, 7 Aug 2018 11:15:12 +0200 (CEST) Subject: [FieldTrip] Templates for defining neighbouring channels for EGI In-Reply-To: References: <20BF2385-3D95-433D-816E-0BF89CAAFFA3@gmail.com> Message-ID: <1001674831.53282.1533633312046.JavaMail.zimbra@cbs.mpg.de> Dear Sebastian, here you also find other template options for the EGI system: http://www.fieldtriptoolbox.org/template/electrode Best, Caroline ----- Original Message ----- From: "Tzvetan Popov" To: "FieldTrip discussion list" Sent: Tuesday, August 7, 2018 10:59:05 AM Subject: Re: [FieldTrip] Templates for defining neighbouring channels for EGI Dear Sebastian, could you try this and see if it works for you: [~,ftpath] = ft_version; elec = ft_read_sens(strcat(ftpath, '/template/electrode/GSN-HydroCel-256.sfp' )); cfg = []; cfg.method = 'distance' ; cfg.neighbourdist = 3; cfg.feedback = 'yes' ; neighbours = ft_prepare_neighbours(cfg,elec); Good luck, tzvetan Am 07.08.2018 um 09:44 schrieb Sebastian Sauppe < sauppe.s at gmail.com >: Dear FieldTrip list members, does anyone know whether there are templates available for EGI systems to define neighboring channels? On the FieldTrip homepage, there are templates for Biosemi, Easycap and 10% systems ( http://www.fieldtriptoolbox.org/template/neighbours ). However, EGI has a different montage and the channel names don’t conform to the 10% system so that these are not easily applicable. Any hints would be highly appreciated! Regards, Sebastian ----------- Dr. Sebastian Sauppe Department of Comparative Linguistics, University of Zurich Homepage: https://sites.google.com/site/sauppes/ Twitter: @SebastianSauppe Google Scholar Citations: https://scholar.google.de/citations?user=wEtciKQAAAAJ ResearchGate: http://www.researchgate.net/profile/Sebastian_Sauppe ORCID ID: http://orcid.org/0000-0001-8670-8197 _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 From sauppe.s at gmail.com Tue Aug 7 13:35:29 2018 From: sauppe.s at gmail.com (Sebastian Sauppe) Date: Tue, 7 Aug 2018 13:35:29 +0200 Subject: [FieldTrip] Templates for defining neighbouring channels for EGI Message-ID: <77800037-DFB8-4DDC-8FBD-33F27C236497@gmail.com> Thanks! But I was rather looking for a template specifically to specify the neighborhood structure as described on the "How does ft_prepare_neighbours work?“ page (http://www.fieldtriptoolbox.org/faq/how_does_ft_prepare_neighbours_work). If I understand this correctly, one can input a template to ft_prepare_neighbours that specifies which channels are neighbors and this is slight different from using a template that specifies channel locations. I was trying to find a solution that lets me avoid using a distance measure to define neighborhood. Or is this what you suggest? Many thanks for the help! Regards, Sebastian ----------- Dr. Sebastian Sauppe Department of Comparative Linguistics, University of Zurich Homepage: https://sites.google.com/site/sauppes/ Twitter: @SebastianSauppe Google Scholar Citations: https://scholar.google.de/citations?user=wEtciKQAAAAJ ResearchGate: http://www.researchgate.net/profile/Sebastian_Sauppe ORCID ID: http://orcid.org/0000-0001-8670-8197 -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Aug 7 13:43:37 2018 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 7 Aug 2018 13:43:37 +0200 Subject: [FieldTrip] non parametric testing In-Reply-To: References: Message-ID: <2929FBD4-A414-45AC-841D-12A18F233D13@donders.ru.nl> Dear Mehmet, Since you have 19 channels for which you do the test, you have the multiple comparison problem. That means that you are not controlling for the false alarm rate: with more channels, the chances are increasing that one of the channels will have a false alarm and that yu will therefore make the incorrect decision of rejecting your null hypothesis. A permutation-based nonparametric test using clustering corrects for multiple comparisons. An independent sample t-test does in general not correct for multiple comparisons, unless you adjust the critical value (i.e. Bonferoni correction). If you have 19 channels, you can do the t-test with an alpha level of 5% divided by 19, i.e. 0.2632% best regards, Robert PS please follow up questions like these on the http://fieldtriptoolbox.org/discussion_list , to which I have also CCed this answer > On 6 Aug 2018, at 17:41, Mehmet Akif Özçoban wrote: > > Dear professor, I want to ask you about a problem, please could you help me. > > I am working obsessive compulsive disorder and i have 30 patient and 30 helathy control data. > > I compute synchronization value of each channel and compared with using independent sample t-test. > > Some reviewers advice me that you should not use each channels synchronization and you should use nonparametric testing of EEG. But I want to conclude it according to spatial features. I am listening some lessons and they used it for comparison of two situation not 19 situtaion (synhronization value for channels) > > How can i adapt my research your permutation testing statistical method. > > Thank youmy manuscript had been attached. Please can you read for me > > -- > Sincerely > Mehmet Akif ÖZÇOBAN, phD > Istanbul Gedik University > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Holger.Krause at med.uni-duesseldorf.de Wed Aug 8 15:10:59 2018 From: Holger.Krause at med.uni-duesseldorf.de (Holger.Krause at med.uni-duesseldorf.de) Date: Wed, 8 Aug 2018 13:10:59 +0000 Subject: [FieldTrip] Latest FT version on ftp-server is from three days ago Message-ID: <404F4AB0E196F54D941EB2469822658AF5BC264E@MAIL3-UKD.VMED.UKD> Dear developers, Last version available on the ftp server seems to be fieldtrip-20180805.zip. Could you please have a look at this? Thanks in advance, Holger From jan.schoffelen at donders.ru.nl Wed Aug 8 17:25:30 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 8 Aug 2018 15:25:30 +0000 Subject: [FieldTrip] Latest FT version on ftp-server is from three days ago In-Reply-To: <404F4AB0E196F54D941EB2469822658AF5BC264E@MAIL3-UKD.VMED.UKD> References: <404F4AB0E196F54D941EB2469822658AF5BC264E@MAIL3-UKD.VMED.UKD> Message-ID: <1C272A6F-9FCD-4F96-AF0A-1CB01AF46C03@donders.ru.nl> Dear Holger, Indeed the cronjob that takes care of the daily zipping and upload to the ftp-server was not restarted after our TG did some upgrades to the compute cluster early this week. It has now been restarted (by Robert) so a new version should become available tonight. Note that this might be a good moment to look into the possibility of using github to get your local and daily copy of the repository. See http://www.fieldtriptoolbox.org/development/git for more information. With best wishes, and apologies for any inconvenience caused. Jan-Mathijs On 8 Aug 2018, at 15:10, Holger.Krause at med.uni-duesseldorf.de wrote: Dear developers, Last version available on the ftp server seems to be fieldtrip-20180805.zip. Could you please have a look at this? Thanks in advance, Holger _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mejia6 at illinois.edu Thu Aug 9 01:24:10 2018 From: mejia6 at illinois.edu (Mejia, Daniela) Date: Wed, 8 Aug 2018 23:24:10 +0000 Subject: [FieldTrip] converting eeglab to fieldtrip for time-frequency analysis Message-ID: Hello, My name is Daniela Mejía and I am a student in the Cognitive Neuroimaging Lab at the University of Illinois. I have previously worked on time-frequency analysis of EEG data in EEGLAB and am currently trying to convert over to Fieldtrip for more advanced statistical testing. I am aware of eeglab2fieldtrip and tried my best to write code based on previous mailinglist answers but I'm still not sure if I'm defining ft_preprocessing and/or ft_definetrials correctly. My code and a sample dataset can be found here: https://uofi.box.com/s/cxbuqqhp065wenpzw1bxasr5vpcdvlms also here's the gist of it: %define trial cfg = []; cfg.dataset = '/Users/Daniela/Desktop/aim_set/TF/aim345_ep_ad3rej.set'; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'B1(1)','B2(2)','B3(3)','B4(4)'}; cfg = ft_definetrial(cfg); % preprocess the data data = eeglab2fieldtrip(EEG,'preprocessing','none'); cfg_pre=[]; cfg_pre.channel={'all','-A2'}; cfg_pre.demean='yes'; cfg_pre.baselinewindow ='all'; % or [begin end] cfg_pre.trials = 'all'; tpt0_id=find_tpt(EEG.times,0); %add a trial configuration to make sure fieldtrip %doesn't think the data are really continuous for a=1:n_trials, data.cfg.trl(a,:)=[1 n_tpts tpt0_id a]; %"a" just tells you what EEG.epoch the trial corresponds to. It isn't used for anything now. %get rid of possible time numerical error; milliseconds is the %lowest resolution we should ever need data.time{a}=round(data.time{a}*1000)/1000; end ft_data=ft_preprocessing(cfg_pre,data); The find_tpt function is based on this: http://kutaslab.ucsd.edu/matlabmk_fn_docs/matlabmk/find_tpt.html Any suggestions on what I am doing wrong would be greatly appreciated! Thank you. Best, Daniela Mejía -------------- next part -------------- An HTML attachment was scrubbed... URL: From weberi at staff.uni-marburg.de Thu Aug 9 09:26:25 2018 From: weberi at staff.uni-marburg.de (weberi at staff.uni-marburg.de) Date: Thu, 09 Aug 2018 09:26:25 +0200 Subject: [FieldTrip] strange observations using ICA Message-ID: <20180809092625.Horde.vNTP0Ql8KWDcjGljoaVQMZU@home.staff.uni-marburg.de> Dear FieldTrip community, I have a question concerning some strange observations when using ICA. In our lab we try to get rid of an EEG artefact induced by deep brain stimulation. For this purpose we compute an ICA of our EEG-channels and sort the components relative to their similarity (quantified using mutual information) with the raw artefact measured directly from the stimulator. We then successively remove the components according to their mutual information and calculate the mean frequency spectrum of the back-transformed corrected data. The artefact has a very defined frequency distribution with peaks at multiples of 130 Hz. With our approach, we would expect the artefactual peaks to successively become smaller. However, this is not the case. While the peaks ultimately become smaller after removal of several components, the artefactual power even rises again after the first couple of components. How can this be explained? Any insights would be much appreciated, Best regards Immo Weber From jan.schoffelen at donders.ru.nl Thu Aug 9 09:37:04 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 9 Aug 2018 07:37:04 +0000 Subject: [FieldTrip] converting eeglab to fieldtrip for time-frequency analysis In-Reply-To: References: Message-ID: <237CE30A-7D3B-492A-B8E0-41F421303DAB@donders.ru.nl> Hi Daniela, I am afraid that it’s not clear to the readers of this list whether and what is going wrong, because you don’t write about it. Best wishes, Jan-Mathijs On 9 Aug 2018, at 01:24, Mejia, Daniela > wrote: Hello, My name is Daniela Mejía and I am a student in the Cognitive Neuroimaging Lab at the University of Illinois. I have previously worked on time-frequency analysis of EEG data in EEGLAB and am currently trying to convert over to Fieldtrip for more advanced statistical testing. I am aware of eeglab2fieldtrip and tried my best to write code based on previous mailinglist answers but I'm still not sure if I'm defining ft_preprocessing and/or ft_definetrials correctly. My code and a sample dataset can be found here: https://uofi.box.com/s/cxbuqqhp065wenpzw1bxasr5vpcdvlms also here's the gist of it: %define trial cfg = []; cfg.dataset = '/Users/Daniela/Desktop/aim_set/TF/aim345_ep_ad3rej.set'; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'B1(1)','B2(2)','B3(3)','B4(4)'}; cfg = ft_definetrial(cfg); % preprocess the data data = eeglab2fieldtrip(EEG,'preprocessing','none'); cfg_pre=[]; cfg_pre.channel={'all','-A2'}; cfg_pre.demean='yes'; cfg_pre.baselinewindow ='all'; % or [begin end] cfg_pre.trials = 'all'; tpt0_id=find_tpt(EEG.times,0); %add a trial configuration to make sure fieldtrip %doesn't think the data are really continuous for a=1:n_trials, data.cfg.trl(a,:)=[1 n_tpts tpt0_id a]; %"a" just tells you what EEG.epoch the trial corresponds to. It isn't used for anything now. %get rid of possible time numerical error; milliseconds is the %lowest resolution we should ever need data.time{a}=round(data.time{a}*1000)/1000; end ft_data=ft_preprocessing(cfg_pre,data); The find_tpt function is based on this: http://kutaslab.ucsd.edu/matlabmk_fn_docs/matlabmk/find_tpt.html Any suggestions on what I am doing wrong would be greatly appreciated! Thank you. Best, Daniela Mejía _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.spaak at donders.ru.nl Thu Aug 9 10:16:14 2018 From: e.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 9 Aug 2018 10:16:14 +0200 Subject: [FieldTrip] strange observations using ICA In-Reply-To: <20180809092625.Horde.vNTP0Ql8KWDcjGljoaVQMZU@home.staff.uni-marburg.de> References: <20180809092625.Horde.vNTP0Ql8KWDcjGljoaVQMZU@home.staff.uni-marburg.de> Message-ID: Dear Immo, While I don't have a clear-cut answer, I could imagine that something like the following is going on. The ICA decomposition is never perfect, and the isolation of individual components will get worse with decreasing component power. So, as you say, removing the first few components might indeed decrease the artifactual power, but at some point removing components that have a clear 130 Hz peak might end up instead *adding* 130 Hz power into channels for which the component weight is nonzero (but which, in a perfect decomposition, should have been zero). (I'm not sure I'm explaining this well enough; in any case, the key is to keep in mind that ICA is simply a linear projection of the data.) Since you say that the artifact has very well-defined spectral characteristics, might it not be simpler and more effective to use a band-stop filter to take out 129-131 Hz (and similarly for the harmonics)? Hope that helps, Best, Eelke On 9 August 2018 at 09:26, wrote: > > Dear FieldTrip community, > > I have a question concerning some strange observations when using ICA. > In our lab we try to get rid of an EEG artefact induced by deep brain > stimulation. > For this purpose we compute an ICA of our EEG-channels and sort the > components > relative to their similarity (quantified using mutual information) with the > raw artefact > measured directly from the stimulator. We then successively remove the > components > according to their mutual information and calculate the mean frequency > spectrum of the > back-transformed corrected data. The artefact has a very defined frequency > distribution > with peaks at multiples of 130 Hz. With our approach, we would expect the > artefactual > peaks to successively become smaller. However, this is not the case. While > the peaks > ultimately become smaller after removal of several components, the > artefactual power > even rises again after the first couple of components. How can this be > explained? > > Any insights would be much appreciated, > > Best regards > Immo Weber > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From mejia6 at illinois.edu Thu Aug 9 14:29:28 2018 From: mejia6 at illinois.edu (Mejia, Daniela) Date: Thu, 9 Aug 2018 12:29:28 +0000 Subject: [FieldTrip] converting eeglab to fieldtrip for time-frequency analysis In-Reply-To: <237CE30A-7D3B-492A-B8E0-41F421303DAB@donders.ru.nl> References: , <237CE30A-7D3B-492A-B8E0-41F421303DAB@donders.ru.nl> Message-ID: Hello, Thanks for the reply. Specifically I am trying to start with code that can at least produce a time frequency plot using Fieldtrip from a '.set' file that is already preprocessed in EEGLAB. I am not exactly sure where my code is wrong although my guess would be I am either defining the trials incorrectly or using ft_preprocessing wrong. From the code snippet that I provided, I would appreciate any feedback in case anything looks glaringly wrong or any suggestions. Thank you, Daniela ________________________________ From: fieldtrip [fieldtrip-bounces at science.ru.nl] on behalf of Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Sent: Thursday, August 09, 2018 2:37 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] converting eeglab to fieldtrip for time-frequency analysis Hi Daniela, I am afraid that it’s not clear to the readers of this list whether and what is going wrong, because you don’t write about it. Best wishes, Jan-Mathijs On 9 Aug 2018, at 01:24, Mejia, Daniela > wrote: Hello, My name is Daniela Mejía and I am a student in the Cognitive Neuroimaging Lab at the University of Illinois. I have previously worked on time-frequency analysis of EEG data in EEGLAB and am currently trying to convert over to Fieldtrip for more advanced statistical testing. I am aware of eeglab2fieldtrip and tried my best to write code based on previous mailinglist answers but I'm still not sure if I'm defining ft_preprocessing and/or ft_definetrials correctly. My code and a sample dataset can be found here: https://uofi.box.com/s/cxbuqqhp065wenpzw1bxasr5vpcdvlms also here's the gist of it: %define trial cfg = []; cfg.dataset = '/Users/Daniela/Desktop/aim_set/TF/aim345_ep_ad3rej.set'; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'B1(1)','B2(2)','B3(3)','B4(4)'}; cfg = ft_definetrial(cfg); % preprocess the data data = eeglab2fieldtrip(EEG,'preprocessing','none'); cfg_pre=[]; cfg_pre.channel={'all','-A2'}; cfg_pre.demean='yes'; cfg_pre.baselinewindow ='all'; % or [begin end] cfg_pre.trials = 'all'; tpt0_id=find_tpt(EEG.times,0); %add a trial configuration to make sure fieldtrip %doesn't think the data are really continuous for a=1:n_trials, data.cfg.trl(a,:)=[1 n_tpts tpt0_id a]; %"a" just tells you what EEG.epoch the trial corresponds to. It isn't used for anything now. %get rid of possible time numerical error; milliseconds is the %lowest resolution we should ever need data.time{a}=round(data.time{a}*1000)/1000; end ft_data=ft_preprocessing(cfg_pre,data); The find_tpt function is based on this: http://kutaslab.ucsd.edu/matlabmk_fn_docs/matlabmk/find_tpt.html Any suggestions on what I am doing wrong would be greatly appreciated! Thank you. Best, Daniela Mejía _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Aug 9 14:44:37 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 9 Aug 2018 12:44:37 +0000 Subject: [FieldTrip] converting eeglab to fieldtrip for time-frequency analysis In-Reply-To: References: <237CE30A-7D3B-492A-B8E0-41F421303DAB@donders.ru.nl> Message-ID: What I meant is: do you get an error, or what? The code itself looks great, and is a pleasure to read, but so is a Shakespeare sonnet, or a musical score of a random JS Bach piece. Please refer to http://www.fieldtriptoolbox.org/faq/how_to_ask_good_questions_to_the_community and http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 in crafting your questions to this list. Best wishes, Jan-Mathijs On 9 Aug 2018, at 14:29, Mejia, Daniela > wrote: Hello, Thanks for the reply. Specifically I am trying to start with code that can at least produce a time frequency plot using Fieldtrip from a '.set' file that is already preprocessed in EEGLAB. I am not exactly sure where my code is wrong although my guess would be I am either defining the trials incorrectly or using ft_preprocessing wrong. From the code snippet that I provided, I would appreciate any feedback in case anything looks glaringly wrong or any suggestions. Thank you, Daniela ________________________________ From: fieldtrip [fieldtrip-bounces at science.ru.nl] on behalf of Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Sent: Thursday, August 09, 2018 2:37 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] converting eeglab to fieldtrip for time-frequency analysis Hi Daniela, I am afraid that it’s not clear to the readers of this list whether and what is going wrong, because you don’t write about it. Best wishes, Jan-Mathijs On 9 Aug 2018, at 01:24, Mejia, Daniela > wrote: Hello, My name is Daniela Mejía and I am a student in the Cognitive Neuroimaging Lab at the University of Illinois. I have previously worked on time-frequency analysis of EEG data in EEGLAB and am currently trying to convert over to Fieldtrip for more advanced statistical testing. I am aware of eeglab2fieldtrip and tried my best to write code based on previous mailinglist answers but I'm still not sure if I'm defining ft_preprocessing and/or ft_definetrials correctly. My code and a sample dataset can be found here: https://uofi.box.com/s/cxbuqqhp065wenpzw1bxasr5vpcdvlms also here's the gist of it: %define trial cfg = []; cfg.dataset = '/Users/Daniela/Desktop/aim_set/TF/aim345_ep_ad3rej.set'; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'B1(1)','B2(2)','B3(3)','B4(4)'}; cfg = ft_definetrial(cfg); % preprocess the data data = eeglab2fieldtrip(EEG,'preprocessing','none'); cfg_pre=[]; cfg_pre.channel={'all','-A2'}; cfg_pre.demean='yes'; cfg_pre.baselinewindow ='all'; % or [begin end] cfg_pre.trials = 'all'; tpt0_id=find_tpt(EEG.times,0); %add a trial configuration to make sure fieldtrip %doesn't think the data are really continuous for a=1:n_trials, data.cfg.trl(a,:)=[1 n_tpts tpt0_id a]; %"a" just tells you what EEG.epoch the trial corresponds to. It isn't used for anything now. %get rid of possible time numerical error; milliseconds is the %lowest resolution we should ever need data.time{a}=round(data.time{a}*1000)/1000; end ft_data=ft_preprocessing(cfg_pre,data); The find_tpt function is based on this: http://kutaslab.ucsd.edu/matlabmk_fn_docs/matlabmk/find_tpt.html Any suggestions on what I am doing wrong would be greatly appreciated! Thank you. Best, Daniela Mejía _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mejia6 at illinois.edu Thu Aug 9 14:53:55 2018 From: mejia6 at illinois.edu (Mejia, Daniela) Date: Thu, 9 Aug 2018 12:53:55 +0000 Subject: [FieldTrip] converting eeglab to fieldtrip for time-frequency analysis In-Reply-To: References: <237CE30A-7D3B-492A-B8E0-41F421303DAB@donders.ru.nl> , Message-ID: Okay, great. Thanks a lot. Daniela ________________________________ From: fieldtrip [fieldtrip-bounces at science.ru.nl] on behalf of Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Sent: Thursday, August 09, 2018 7:44 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] converting eeglab to fieldtrip for time-frequency analysis What I meant is: do you get an error, or what? The code itself looks great, and is a pleasure to read, but so is a Shakespeare sonnet, or a musical score of a random JS Bach piece. Please refer to http://www.fieldtriptoolbox.org/faq/how_to_ask_good_questions_to_the_community and http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202 in crafting your questions to this list. Best wishes, Jan-Mathijs On 9 Aug 2018, at 14:29, Mejia, Daniela > wrote: Hello, Thanks for the reply. Specifically I am trying to start with code that can at least produce a time frequency plot using Fieldtrip from a '.set' file that is already preprocessed in EEGLAB. I am not exactly sure where my code is wrong although my guess would be I am either defining the trials incorrectly or using ft_preprocessing wrong. From the code snippet that I provided, I would appreciate any feedback in case anything looks glaringly wrong or any suggestions. Thank you, Daniela ________________________________ From: fieldtrip [fieldtrip-bounces at science.ru.nl] on behalf of Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Sent: Thursday, August 09, 2018 2:37 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] converting eeglab to fieldtrip for time-frequency analysis Hi Daniela, I am afraid that it’s not clear to the readers of this list whether and what is going wrong, because you don’t write about it. Best wishes, Jan-Mathijs On 9 Aug 2018, at 01:24, Mejia, Daniela > wrote: Hello, My name is Daniela Mejía and I am a student in the Cognitive Neuroimaging Lab at the University of Illinois. I have previously worked on time-frequency analysis of EEG data in EEGLAB and am currently trying to convert over to Fieldtrip for more advanced statistical testing. I am aware of eeglab2fieldtrip and tried my best to write code based on previous mailinglist answers but I'm still not sure if I'm defining ft_preprocessing and/or ft_definetrials correctly. My code and a sample dataset can be found here: https://uofi.box.com/s/cxbuqqhp065wenpzw1bxasr5vpcdvlms also here's the gist of it: %define trial cfg = []; cfg.dataset = '/Users/Daniela/Desktop/aim_set/TF/aim345_ep_ad3rej.set'; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'B1(1)','B2(2)','B3(3)','B4(4)'}; cfg = ft_definetrial(cfg); % preprocess the data data = eeglab2fieldtrip(EEG,'preprocessing','none'); cfg_pre=[]; cfg_pre.channel={'all','-A2'}; cfg_pre.demean='yes'; cfg_pre.baselinewindow ='all'; % or [begin end] cfg_pre.trials = 'all'; tpt0_id=find_tpt(EEG.times,0); %add a trial configuration to make sure fieldtrip %doesn't think the data are really continuous for a=1:n_trials, data.cfg.trl(a,:)=[1 n_tpts tpt0_id a]; %"a" just tells you what EEG.epoch the trial corresponds to. It isn't used for anything now. %get rid of possible time numerical error; milliseconds is the %lowest resolution we should ever need data.time{a}=round(data.time{a}*1000)/1000; end ft_data=ft_preprocessing(cfg_pre,data); The find_tpt function is based on this: http://kutaslab.ucsd.edu/matlabmk_fn_docs/matlabmk/find_tpt.html Any suggestions on what I am doing wrong would be greatly appreciated! Thank you. Best, Daniela Mejía _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom.marshall at psy.ox.ac.uk Thu Aug 9 15:12:27 2018 From: tom.marshall at psy.ox.ac.uk (Tom Marshall) Date: Thu, 9 Aug 2018 13:12:27 +0000 Subject: [FieldTrip] converting eeglab to fieldtrip for time-frequency analysis In-Reply-To: References: , <237CE30A-7D3B-492A-B8E0-41F421303DAB@donders.ru.nl>, Message-ID: Hi Daniela, What's the error message that matlab gives you? Best, Tom ________________________________ From: fieldtrip on behalf of Mejia, Daniela Sent: 09 August 2018 13:29:28 To: FieldTrip discussion list Subject: Re: [FieldTrip] converting eeglab to fieldtrip for time-frequency analysis Hello, Thanks for the reply. Specifically I am trying to start with code that can at least produce a time frequency plot using Fieldtrip from a '.set' file that is already preprocessed in EEGLAB. I am not exactly sure where my code is wrong although my guess would be I am either defining the trials incorrectly or using ft_preprocessing wrong. From the code snippet that I provided, I would appreciate any feedback in case anything looks glaringly wrong or any suggestions. Thank you, Daniela ________________________________ From: fieldtrip [fieldtrip-bounces at science.ru.nl] on behalf of Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Sent: Thursday, August 09, 2018 2:37 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] converting eeglab to fieldtrip for time-frequency analysis Hi Daniela, I am afraid that it’s not clear to the readers of this list whether and what is going wrong, because you don’t write about it. Best wishes, Jan-Mathijs On 9 Aug 2018, at 01:24, Mejia, Daniela > wrote: Hello, My name is Daniela Mejía and I am a student in the Cognitive Neuroimaging Lab at the University of Illinois. I have previously worked on time-frequency analysis of EEG data in EEGLAB and am currently trying to convert over to Fieldtrip for more advanced statistical testing. I am aware of eeglab2fieldtrip and tried my best to write code based on previous mailinglist answers but I'm still not sure if I'm defining ft_preprocessing and/or ft_definetrials correctly. My code and a sample dataset can be found here: https://uofi.box.com/s/cxbuqqhp065wenpzw1bxasr5vpcdvlms also here's the gist of it: %define trial cfg = []; cfg.dataset = '/Users/Daniela/Desktop/aim_set/TF/aim345_ep_ad3rej.set'; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'B1(1)','B2(2)','B3(3)','B4(4)'}; cfg = ft_definetrial(cfg); % preprocess the data data = eeglab2fieldtrip(EEG,'preprocessing','none'); cfg_pre=[]; cfg_pre.channel={'all','-A2'}; cfg_pre.demean='yes'; cfg_pre.baselinewindow ='all'; % or [begin end] cfg_pre.trials = 'all'; tpt0_id=find_tpt(EEG.times,0); %add a trial configuration to make sure fieldtrip %doesn't think the data are really continuous for a=1:n_trials, data.cfg.trl(a,:)=[1 n_tpts tpt0_id a]; %"a" just tells you what EEG.epoch the trial corresponds to. It isn't used for anything now. %get rid of possible time numerical error; milliseconds is the %lowest resolution we should ever need data.time{a}=round(data.time{a}*1000)/1000; end ft_data=ft_preprocessing(cfg_pre,data); The find_tpt function is based on this: http://kutaslab.ucsd.edu/matlabmk_fn_docs/matlabmk/find_tpt.html Any suggestions on what I am doing wrong would be greatly appreciated! Thank you. Best, Daniela Mejía _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From pia.michel at student.uva.nl Thu Aug 9 18:38:08 2018 From: pia.michel at student.uva.nl (Pia Michel) Date: Thu, 9 Aug 2018 18:38:08 +0200 Subject: [FieldTrip] Time-frequency-analysis for resting state Message-ID: <6185AFDD-1A9E-4969-B35E-BAB28F7D0DD3@student.uva.nl> Hi everyone, I’m new to both FieldTrip and EEG analysis, and dealing with a somewhat unusual data set, so I’d very much appreciate your help. We recorded 80s intervals of resting state EEG during a parabolic flight, made up of four 20s intervals of different gravity each. As the gravity shift is gradual and I am interested in the change in alpha and beta power over time, I would prefer not cutting the data into four trials, but analyse it as one trial. The data is preprocessed and I followed the tutorial for time-frequency analysis for resting state data. I would like to use the first 20s of normal gravity as the baseline, but I don’t know how to use ft_freqbaseline for this. In particular not how I’d do it if I first temporarily redefine the trial into epochs. Is the below appropriate for this setting or is there a way to do the freq analysis directly on the entire trial? How do I define a time window in the first 20s as the baseline to compare the later intervals to? Thank you so much! Pia cfg = []; cfg.length = 2; cfg.overlap = 0; data_segmented = ft_redefinetrial(cfg, data_continuous) cfg = []; cfg.method = 'mtmfft' cfg.taper = 'hanning' cfg.foilim = [7.5 35]; cfg.keeptrials = 'yes' freq_segmented = ft_freqanalysis(cfg, data_segmented) begsample = data_segmented.sampleinfo(:,1); endsample = data_segmented.sampleinfo(:,2); time = ((begsample+endsample)/2) / data_segmented.fsample; freq_continuous = freq_segmented; freq_continuous.powspctrm = permute(freq_segmented.powspctrm, [2, 3, 1]); freq_continuous.dimord = ‘chan_freq_time', freq_continuous.time = time; cfg = [] cfg.layout = ‘eeg1010.lay' ft_multiplotTFR(cfg, freq_continuous); -------------- next part -------------- An HTML attachment was scrubbed... URL: From J.J.Vink-5 at umcutrecht.nl Fri Aug 10 10:14:10 2018 From: J.J.Vink-5 at umcutrecht.nl (Vink-5, J.J.) Date: Fri, 10 Aug 2018 08:14:10 +0000 Subject: [FieldTrip] MVAR analysis on rank deficient EEG data (due to removal of ICA components) Message-ID: Dear fieldtrip community, I'm currently working with 60 channel sensor space EEG data, which has been preprocessed using ICA, resulting in a rank deficient dataset. However, when I'm trying to evaluate the rank of my data using Matlab's rank function, it tells me that the data is full rank, which is somewhat confusing. The data clearly is not full rank, because when I want to perform an MVAR analysis it either tells me the data is singular or not positive definite. I read up a lot on rank deficiency and how this is introduced through ICA. My current understanding is that the reconstruction of the full 60 channel EEG data after removal of ICA components reduces the rank due to linear dependencies between the original channels and the reconstruction of the data without the removed ICA components. Consequently, people have suggested to remove channels in order to restore data rank. However, how do I know which channels contain these linear dependencies? Simply removing channels does not resolve this issue. Performing PCA prior to MVAR analysis could potentially resolve this. Does anybody know whether you can reconstruct sensor space directed connectivity from a PCA-based MVAR model? Best, Jord ------------------------------------------------------------------------------ De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht ontvangt, wordt u verzocht de inhoud niet te gebruiken en de afzender direct te informeren door het bericht te retourneren. Het Universitair Medisch Centrum Utrecht is een publiekrechtelijke rechtspersoon in de zin van de W.H.W. (Wet Hoger Onderwijs en Wetenschappelijk Onderzoek) en staat geregistreerd bij de Kamer van Koophandel voor Midden-Nederland onder nr. 30244197. Denk s.v.p aan het milieu voor u deze e-mail afdrukt. ------------------------------------------------------------------------------ This message may contain confidential information and is intended exclusively for the addressee. If you receive this message unintentionally, please do not use the contents but notify the sender immediately by return e-mail. University Medical Center Utrecht is a legal person by public law and is registered at the Chamber of Commerce for Midden-Nederland under no. 30244197. Please consider the environment before printing this e-mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From weberi at staff.uni-marburg.de Fri Aug 10 11:31:12 2018 From: weberi at staff.uni-marburg.de (weberi at staff.uni-marburg.de) Date: Fri, 10 Aug 2018 11:31:12 +0200 Subject: [FieldTrip] strange observations using ICA In-Reply-To: References: <20180809092625.Horde.vNTP0Ql8KWDcjGljoaVQMZU@home.staff.uni-marburg.de> Message-ID: <20180810113112.Horde.UhRFxv_FGnJpQfnMOEV9mR_@home.staff.uni-marburg.de> Dear Eelke, thank you for the explanation. I am not sure I understand completely, but I get the gist of it. The reason why we don't use a band-stop filter is that we fear it may have a great influence on the subsequent analysis methods, especially regarding directionality measures or measures working in the time domain. Thank you and best regards, Immo Zitat von Eelke Spaak : > Dear Immo, > > While I don't have a clear-cut answer, I could imagine that something > like the following is going on. The ICA decomposition is never > perfect, and the isolation of individual components will get worse > with decreasing component power. So, as you say, removing the first > few components might indeed decrease the artifactual power, but at > some point removing components that have a clear 130 Hz peak might end > up instead *adding* 130 Hz power into channels for which the component > weight is nonzero (but which, in a perfect decomposition, should have > been zero). (I'm not sure I'm explaining this well enough; in any > case, the key is to keep in mind that ICA is simply a linear > projection of the data.) > > Since you say that the artifact has very well-defined spectral > characteristics, might it not be simpler and more effective to use a > band-stop filter to take out 129-131 Hz (and similarly for the > harmonics)? > > Hope that helps, > Best, > Eelke > > On 9 August 2018 at 09:26, wrote: >> >> Dear FieldTrip community, >> >> I have a question concerning some strange observations when using ICA. >> In our lab we try to get rid of an EEG artefact induced by deep brain >> stimulation. >> For this purpose we compute an ICA of our EEG-channels and sort the >> components >> relative to their similarity (quantified using mutual information) with the >> raw artefact >> measured directly from the stimulator. We then successively remove the >> components >> according to their mutual information and calculate the mean frequency >> spectrum of the >> back-transformed corrected data. The artefact has a very defined frequency >> distribution >> with peaks at multiples of 130 Hz. With our approach, we would expect the >> artefactual >> peaks to successively become smaller. However, this is not the case. While >> the peaks >> ultimately become smaller after removal of several components, the >> artefactual power >> even rises again after the first couple of components. How can this be >> explained? >> >> Any insights would be much appreciated, >> >> Best regards >> Immo Weber >> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From jan.schoffelen at donders.ru.nl Fri Aug 10 11:40:06 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 10 Aug 2018 09:40:06 +0000 Subject: [FieldTrip] strange observations using ICA In-Reply-To: <20180810113112.Horde.UhRFxv_FGnJpQfnMOEV9mR_@home.staff.uni-marburg.de> References: <20180809092625.Horde.vNTP0Ql8KWDcjGljoaVQMZU@home.staff.uni-marburg.de> <20180810113112.Horde.UhRFxv_FGnJpQfnMOEV9mR_@home.staff.uni-marburg.de> Message-ID: <0E9A58EE-4FBF-442C-80BA-2ABA10802A4F@donders.ru.nl> Dear Immo, I understand your concern with respect to filtering, but replacing original recordings with linear combinations of all channels (which you essentially do with the ICA decomposition/backprojection) is also potentially harmful, and possible more harmful than careful filtering. Anecdotally, if your artifact is a clear line in the spectrum, it is actually often better to notch it out (with an as narrow as possible filter) if you aim to estimate quantities like spectrally resolved Granger, using non-parametric factorization. If you don’t do this, the spectra typically look strange. If you consider to go for more ‘straightforward’ frequency resolved methods, which rely on FFTs without a subsequent introduction of across-frequency bin dependencies of the local estimates (which is what happens with the spectral factorization), I wouldn’t be worried about the 130 Hz artifact (and only refrain from interpreting any result at that frequency). Best wishes, Jan-Mathijs > On 10 Aug 2018, at 11:31, weberi at staff.uni-marburg.de wrote: > > Dear Eelke, > > thank you for the explanation. I am not sure I understand > completely, but I get the gist of it. The reason why we don't use > a band-stop filter is that we fear it may have a great influence on the subsequent > analysis methods, especially regarding directionality measures or measures > working in the time domain. > > Thank you and best regards, > Immo > > Zitat von Eelke Spaak : > >> Dear Immo, >> >> While I don't have a clear-cut answer, I could imagine that something >> like the following is going on. The ICA decomposition is never >> perfect, and the isolation of individual components will get worse >> with decreasing component power. So, as you say, removing the first >> few components might indeed decrease the artifactual power, but at >> some point removing components that have a clear 130 Hz peak might end >> up instead *adding* 130 Hz power into channels for which the component >> weight is nonzero (but which, in a perfect decomposition, should have >> been zero). (I'm not sure I'm explaining this well enough; in any >> case, the key is to keep in mind that ICA is simply a linear >> projection of the data.) >> >> Since you say that the artifact has very well-defined spectral >> characteristics, might it not be simpler and more effective to use a >> band-stop filter to take out 129-131 Hz (and similarly for the >> harmonics)? >> >> Hope that helps, >> Best, >> Eelke >> >> On 9 August 2018 at 09:26, wrote: >>> >>> Dear FieldTrip community, >>> >>> I have a question concerning some strange observations when using ICA. >>> In our lab we try to get rid of an EEG artefact induced by deep brain >>> stimulation. >>> For this purpose we compute an ICA of our EEG-channels and sort the >>> components >>> relative to their similarity (quantified using mutual information) with the >>> raw artefact >>> measured directly from the stimulator. We then successively remove the >>> components >>> according to their mutual information and calculate the mean frequency >>> spectrum of the >>> back-transformed corrected data. The artefact has a very defined frequency >>> distribution >>> with peaks at multiples of 130 Hz. With our approach, we would expect the >>> artefactual >>> peaks to successively become smaller. However, this is not the case. While >>> the peaks >>> ultimately become smaller after removal of several components, the >>> artefactual power >>> even rises again after the first couple of components. How can this be >>> explained? >>> >>> Any insights would be much appreciated, >>> >>> Best regards >>> Immo Weber >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> https://doi.org/10.1371/journal.pcbi.1002202 >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From jan.schoffelen at donders.ru.nl Fri Aug 10 14:14:11 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 10 Aug 2018 12:14:11 +0000 Subject: [FieldTrip] ERROR in fieldtrip sourcemodel tutorial freesurfer pipeline In-Reply-To: References: Message-ID: <59664C81-98A3-4F30-B691-C3F05BCF34A9@donders.ru.nl> Hi James, This looks like a freesurfer related issue, rather than like a fieldtrip related issue. Perhaps it’s better to ask for help on the freesurfer discussion list. Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Senior Researcher, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 3 Aug 2018, at 16:34, James Stieger > wrote: Hello! My name is James Stieger and I am a PhD student in biomedical engineering at the University of Minnesota studying brain computer interfaces. I have been going through the fieldtrip tutorials and I encounter the error in the source model tutorial found here: http://www.fieldtriptoolbox.org/tutorial/sourcemodel I have been following the pipeline outlined on the web page and typically receive the notification: recon-all -s Subject01 finished without error However, when executing the command: recon-all -finalsurfs -subjid Subject01 I receive the following errors in the recon-all.log: mris_convert --volume Subject01 lh .../fieldtrip/Tutorial/FreeSurfer/Subject01/surf/lh.volume MRISread(.../fieldtrip/Tutorial/FreeSurfer/Subject01/surf/lh.white): could not open file No such file or directory ERROR: vertexvol mris_convert --volume Subject01 lh .../fieldtrip/Tutorial/FreeSurfer/Subject01/surf/lh.volume and in the surf error.log: MRISread(.../fieldtrip/Tutorial/FreeSurfer/Subject01/surf/lh.white): could not open file however the command recon-all -white -subjid Subject01 also finished without error. Can someone help? James _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.patai at ucl.ac.uk Sun Aug 12 22:00:35 2018 From: e.patai at ucl.ac.uk (Zita Eva Patai) Date: Sun, 12 Aug 2018 21:00:35 +0100 Subject: [FieldTrip] posthoc stats after ft_regressconfound Message-ID: Dear FTers I have a stats/double dipping question. Here is my problem & reasoning: 1. I found a significant effect between condition A & B at times x-y in the theta band. 2. I also found that overall trials and subjects there is no significant difference between conditions (A&B) on variance in saccade behaviour (as measured by the EOG signals and extracting the values from the ICA for that component). But there is a difference between condition A & C, which is why i do not look at this comparison, as i can't be certain that eyemovements aren't driving all my neural differences (i have other reasons to be cautious in comparing these latter two conditions) 3. I could also look at trial-by-trial differences, on data where the ICA component for saccades has been regressed out (ft_regressconfound). Would this be a more statistically sound approach? In this case, I could compare condition A and B at the subject level (indepsamplesT) and take the surviving t-values to the group level and compare against zero. My problem is how to restrict this analysis...i can restrict myself to the theta band, but i have a very long epoch (4 seconds) and I have a lot of sensors, none of which I can come up with a good apriori reason to select. >>>*Is it double dipping to report the effect from point1, and then run a posthoc test at the subject level, only for the relevant times, and see if i still get a significant difference between A & B, when correcting for eyemovements at the single trial level?* Thanks so much for your help in advance, z -- Eva Zita Patai, DPhil Postdoctoral Researcher Institute of Behavioural Neuroscience UCL -------------- next part -------------- An HTML attachment was scrubbed... URL: From Darren.Price at mrc-cbu.cam.ac.uk Mon Aug 13 13:39:18 2018 From: Darren.Price at mrc-cbu.cam.ac.uk (Darren Price) Date: Mon, 13 Aug 2018 11:39:18 +0000 Subject: [FieldTrip] Transfer entropy In-Reply-To: References: Message-ID: Hi Nitin Thanks for your detailed answer. That's really helpful. I will look into this and let you know how I get on. Darren ------------------------------------------------------- Dr. Darren Price Research Associate MRC Cognition & Brain Sciences Unit 15 Chaucer Road Cambridge, CB2 7EF England EMAIL: darren.price at mrc-cbu.cam.ac.uk URL: http://www.mrc-cbu.cam.ac.uk/people/darren.price TEL +44 (0)1223 355 294 x202 FAX +44 (0)1223 359 062 MOB +44 (0)7717822431 ------------------------------------------------------- From: fieldtrip [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Williams, Nitin J Sent: 03 August 2018 07:37 To: FieldTrip discussion list Subject: Re: [FieldTrip] Transfer entropy hi Darren! :) Multi-Variate Granger Causality is also a suitable framework to check for information transfer between time series: Anil Seth's MATLAB toolbox below: http://users.sussex.ac.uk/~anils/aks_code.htm I think that in the case of variables with Gaussian distributions and linear relationships between them, MVGC gives the same results as Multi-Variate Transfer Entropy (MVTE). However, MVTE is also generalized to the case of variables with non-Gaussian distributions with non-linear relationships between them. A related framework is the Multi-Variate Auto-Regressive (MVAR) model, which can also be used to check for information transfer between time series. In particular, Partial Directed Coherence (PDC) and Directed Transfer Function (DTF) can be interpreted in terms of information transfer between time series, and the non-normalised PDC also has a similar interpretation, perhaps even more straightforward than the conventional PDC measure. The MVAR-based connectivity measures are implemented in Fieldtrip, in ft_connectivityanalysis Scott Makeig's group also has the SIFT (Source Information Flow Toolbox) for this: https://sccn.ucsd.edu/wiki/SIFT I have found the user manual to be helpful: https://sccn.ucsd.edu/mediawiki/images/d/d2/SIFT_manual_0.1a.pdf Both MVGC and MVAR allow for frequency-specific measures of information flow between time series. Regards, Nitin From: fieldtrip > On Behalf Of Darren Price Sent: Thursday, August 2, 2018 4:42 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Transfer entropy Hi All Could anyone suggest the tools for computing transfer entropy in Matlab? I had a look at MuTE toolbox, but that seemed overly complicated, and I couldn't even get the example to work. I'm currently looking at TRENTTOOL which looks good and works with fieldtrip format. I will also try "phase transfer entropy", which is a single matlab function and simple to implement. Any other suggestions or comments / experiences with those above would be very helpful. To begin with I would simply like to check for information transfer between two timeseries. I may also check for indirect serial transfer i.e. A>B>C Thanks Darren ------------------------------------------------------- Dr. Darren Price Research Associate MRC Cognition & Brain Sciences Unit 15 Chaucer Road Cambridge, CB2 7EF England EMAIL: darren.price at mrc-cbu.cam.ac.uk URL: http://www.mrc-cbu.cam.ac.uk/people/darren.price TEL +44 (0)1223 355 294 x202 FAX +44 (0)1223 359 062 MOB +44 (0)7717822431 ------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From matti.stenroos at aalto.fi Tue Aug 14 15:32:32 2018 From: matti.stenroos at aalto.fi (Matti Stenroos) Date: Tue, 14 Aug 2018 16:32:32 +0300 Subject: [FieldTrip] MVAR analysis on rank deficient EEG data (due to removal of ICA components) In-Reply-To: References: Message-ID: <9e8e3aa2-3f3e-b243-1db1-b1ccf26bbafe@aalto.fi> Dear Jord, Indeed, if you drop components (= time-series & topography) away using ICA, the rank of your data will go down. Matlab rank routine is, however, not very good tool for assessing rank --- for example, even mixing double and single precision floating point numbers in your decomposition process may yield "full numerical rank", even though the real rank is lower. In my opinion, the easiest way to assess the rank is to use svd: just take a measurement (or noise) covariance matrix C, do s = svd(C), and plot s or log10(s). You should see a clear drop in the svd spectrum at the point, when the "true rank" is reached. Then you can project the rest out, and after that, also the rank function should show correct rank. Cheers, Matti On 2018-08-10 11:14, Vink-5, J.J. wrote: > Dear fieldtrip community, > > I'm currently working with 60 channel sensor space EEG data, which has > been preprocessed using ICA, resulting in a rank deficient dataset. > However, when I'm trying to evaluate the rank of my data using Matlab's > rank function, it tells me that the data is full rank, which is somewhat > confusing. > > The data clearly is not full rank, because when I want to perform an > MVAR analysis it either tells me the data is singular or not positive > definite. I read up a lot on rank deficiency and how this is introduced > through ICA. My current understanding is that the reconstruction of the > full 60 channel EEG data after removal of ICA components reduces the > rank due to linear dependencies between the original channels and the > reconstruction of the data without the removed ICA components. > Consequently, people have suggested to remove channels in order to > restore data rank. However, how do I know which channels contain these > linear dependencies? Simply removing channels does not resolve this issue. > > Performing PCA prior to MVAR analysis could potentially resolve this. > Does anybody know whether you can reconstruct sensor space directed > connectivity from a PCA-based MVAR model? > > Best, > > Jord > ------------------------------------------------------------------------ > > /De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is > uitsluitend bestemd voor de geadresseerde. Indien u dit bericht > onterecht ontvangt, wordt u verzocht de inhoud niet te gebruiken en de > afzender direct te informeren door het bericht te retourneren. Het > Universitair Medisch Centrum Utrecht is een publiekrechtelijke > rechtspersoon in de zin van de W.H.W. (Wet Hoger Onderwijs en > Wetenschappelijk Onderzoek) en staat geregistreerd bij de Kamer van > Koophandel voor Midden-Nederland onder nr. 30244197. / > > /Denk s.v.p aan het milieu voor u deze e-mail afdrukt. / > > ------------------------------------------------------------------------ > > /This message may contain confidential information and is intended > exclusively for the addressee. If you receive this message > unintentionally, please do not use the contents but notify the sender > immediately by return e-mail. University Medical Center Utrecht is a > legal person by public law and is registered at the Chamber of Commerce > for Midden-Nederland under no. 30244197. / > > /Please consider the environment before printing this e-mail. / > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > From J.J.Vink-5 at umcutrecht.nl Wed Aug 15 09:24:28 2018 From: J.J.Vink-5 at umcutrecht.nl (Vink-5, J.J.) Date: Wed, 15 Aug 2018 07:24:28 +0000 Subject: [FieldTrip] MVAR analysis on rank deficient EEG data (due to removal of ICA components) In-Reply-To: <9e8e3aa2-3f3e-b243-1db1-b1ccf26bbafe@aalto.fi> References: , <9e8e3aa2-3f3e-b243-1db1-b1ccf26bbafe@aalto.fi> Message-ID: Dear Matti, Thank you very much for the advice. It is much appreciated. Best, Jord ________________________________________ Van: fieldtrip [fieldtrip-bounces at science.ru.nl] namens Matti Stenroos [matti.stenroos at aalto.fi] Verzonden: dinsdag 14 augustus 2018 15:32 Aan: fieldtrip at science.ru.nl Onderwerp: Re: [FieldTrip] MVAR analysis on rank deficient EEG data (due to removal of ICA components) Dear Jord, Indeed, if you drop components (= time-series & topography) away using ICA, the rank of your data will go down. Matlab rank routine is, however, not very good tool for assessing rank --- for example, even mixing double and single precision floating point numbers in your decomposition process may yield "full numerical rank", even though the real rank is lower. In my opinion, the easiest way to assess the rank is to use svd: just take a measurement (or noise) covariance matrix C, do s = svd(C), and plot s or log10(s). You should see a clear drop in the svd spectrum at the point, when the "true rank" is reached. Then you can project the rest out, and after that, also the rank function should show correct rank. Cheers, Matti On 2018-08-10 11:14, Vink-5, J.J. wrote: > Dear fieldtrip community, > > I'm currently working with 60 channel sensor space EEG data, which has > been preprocessed using ICA, resulting in a rank deficient dataset. > However, when I'm trying to evaluate the rank of my data using Matlab's > rank function, it tells me that the data is full rank, which is somewhat > confusing. > > The data clearly is not full rank, because when I want to perform an > MVAR analysis it either tells me the data is singular or not positive > definite. I read up a lot on rank deficiency and how this is introduced > through ICA. My current understanding is that the reconstruction of the > full 60 channel EEG data after removal of ICA components reduces the > rank due to linear dependencies between the original channels and the > reconstruction of the data without the removed ICA components. > Consequently, people have suggested to remove channels in order to > restore data rank. However, how do I know which channels contain these > linear dependencies? Simply removing channels does not resolve this issue. > > Performing PCA prior to MVAR analysis could potentially resolve this. > Does anybody know whether you can reconstruct sensor space directed > connectivity from a PCA-based MVAR model? > > Best, > > Jord > ------------------------------------------------------------------------ > > /De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is > uitsluitend bestemd voor de geadresseerde. Indien u dit bericht > onterecht ontvangt, wordt u verzocht de inhoud niet te gebruiken en de > afzender direct te informeren door het bericht te retourneren. Het > Universitair Medisch Centrum Utrecht is een publiekrechtelijke > rechtspersoon in de zin van de W.H.W. (Wet Hoger Onderwijs en > Wetenschappelijk Onderzoek) en staat geregistreerd bij de Kamer van > Koophandel voor Midden-Nederland onder nr. 30244197. / > > /Denk s.v.p aan het milieu voor u deze e-mail afdrukt. / > > ------------------------------------------------------------------------ > > /This message may contain confidential information and is intended > exclusively for the addressee. If you receive this message > unintentionally, please do not use the contents but notify the sender > immediately by return e-mail. University Medical Center Utrecht is a > legal person by public law and is registered at the Chamber of Commerce > for Midden-Nederland under no. 30244197. / > > /Please consider the environment before printing this e-mail. / > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 From rochelle.albert at sickkids.ca Wed Aug 15 21:39:18 2018 From: rochelle.albert at sickkids.ca (Rochelle Albert) Date: Wed, 15 Aug 2018 19:39:18 +0000 Subject: [FieldTrip] Hiring for Research Fellow - Imaging Message-ID: Hello all, My name is Rochelle Albert and I am the Program Manager for the Children's Stroke Program at The Hospital for Sick Children, under the direction of Dr. Nomazulu Dlamini. We are hiring for a Research Fellow -Imaging (see job description attached). Please let me know if you are interested in applying, or have any recommendations. Kind regards, [SickkidsLogo] Rochelle Albert, MSc. Program Manager - Research, CHES Children's Stroke Program The Hospital for Sick Children, Research Institute | 686 Bay Street Room 12.9834 | Toronto, ON, Phone: 416.813.7654 | Ex. 306978 Email: rochelle.albert at sickkids.ca ________________________________ 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 5970 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Research Fellow - Imaging.docx Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Size: 16283 bytes Desc: Research Fellow - Imaging.docx URL: From enoumotong at hotmail.com Wed Aug 15 22:32:26 2018 From: enoumotong at hotmail.com (Eno Umotong) Date: Wed, 15 Aug 2018 20:32:26 +0000 Subject: [FieldTrip] Using cfg.baseline and cfg.toi In-Reply-To: <72943034-0A2D-4BE2-B5CB-285351826204@nhs.net> References: <940ABE7F-7174-4223-A1D2-40BFA21A362C@nhs.net> <72943034-0A2D-4BE2-B5CB-285351826204@nhs.net> Message-ID: Hi there, I’m having trouble extracting the baseline from my time frequency data. I’m using the function like this: cfg = []; cfg.output = ‘pow’; cfg.channel = … cfg.taper = ‘hanning’; cfg.foi = … cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; cfg.toi = … cfg.baseline = .. cfg.baselinetype = ‘absolute’; cfg.parameter = ‘powspctrm’; freq = ft_freqanalysis(cfg, Dataset); TFRHann3 = ft_freqbaseline(cfg,freq); How can I use this function correctly please? I’m sorry to bother you with this. I couldn’t find assistance online. TFRHann3.powspctrum returns a matrix full of NaN. I’m sure this is obvious to you. Just one more question. When selecting my time window of interest for frequency analysis using ft_freqanalysis and specifying cfg.toi, would 0 represent my stimulus (as specified by epoch selection in eeglab interface)? Many thanks again for your help. Many thanks for your help. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Thu Aug 16 09:13:32 2018 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Thu, 16 Aug 2018 09:13:32 +0200 Subject: [FieldTrip] Using cfg.baseline and cfg.toi In-Reply-To: References: <940ABE7F-7174-4223-A1D2-40BFA21A362C@nhs.net> <72943034-0A2D-4BE2-B5CB-285351826204@nhs.net> Message-ID: Hi Eno, The list will be unable to answer your first question. E.g.: what is your full cfg, and what is your input/output data structure like? Are the NaNs already in 'freq'?. Please refer to http://www.fieldtriptoolbox. org/faq/how_to_ask_good_questions_to_the_community and http://journals.plos.org/ploscompbiol/article?id=10. 1371/journal.pcbi.1002202 in crafting your questions to this list. However, if you literally mean 'extract', that you perhaps misunderstand the functionality of ft_freqbaseline, which is to remove (by division or subtraction), the baseline from the frequency data. Also, you can try to follow the tutorials on freqanalysis. Your second question seems to be a double question: 1) I don't know about the eeglab interface, but if you have trials/epochs, time is always defined around a particular event, with t=0 more often than not corresponding to that trial event. At stimulus onset would make sense, but it has been your decision when segmenting the data. Best is to backtrack your (eeglab) segmentation and to double-check the .time field of your fieldtrip data structure, and see if that makes sense to you. 2) All trial-based functions that refer to time/latency, indeed do so according to the time-axis as specified in the datastructure in the .time field. However, what that time-axis refers to, (i.e. what t-0 means) depends on you, as described above. Hope this helps, Stephen On 15 August 2018 at 22:32, Eno Umotong wrote: > > > > > > > Hi there, > > > > I’m having trouble extracting the baseline from my time frequency data. > > > > I’m using the function like this: > > > > cfg = []; > > cfg.output = ‘pow’; > > cfg.channel = … > > cfg.taper = ‘hanning’; > > cfg.foi = … > > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; > > cfg.toi = … > > cfg.baseline = .. > > cfg.baselinetype = ‘absolute’; > > cfg.parameter = ‘powspctrm’; > > freq = ft_freqanalysis(cfg, Dataset); > > TFRHann3 = ft_freqbaseline(cfg,freq); > > > > How can I use this function correctly please? I’m sorry to bother you with > this. I couldn’t find assistance online. TFRHann3.powspctrum returns a > matrix full of NaN. I’m sure this is obvious to you. > > > > Just one more question. When selecting my time window of interest for > frequency analysis using ft_freqanalysis and specifying cfg.toi, would 0 > represent my stimulus (as specified by epoch selection in eeglab interface)? > > > > Many thanks again for your help. > > > > > > Many thanks for your help. > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.spaak at donders.ru.nl Thu Aug 16 09:25:04 2018 From: e.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 16 Aug 2018 09:25:04 +0200 Subject: [FieldTrip] Using cfg.baseline and cfg.toi In-Reply-To: References: <940ABE7F-7174-4223-A1D2-40BFA21A362C@nhs.net> <72943034-0A2D-4BE2-B5CB-285351826204@nhs.net> Message-ID: Hi Eno, My hunch is that after the call to ft_freqanalysis, the time interval comprising your baseline contains NaNs. The subsequent call to ft_freqbaseline will subtract those NaNs from all time points, which will result in all NaNs. Have a look here to understand why there are NaNs after ft_freqanalysis: http://www.fieldtriptoolbox.org/faq/why_does_my_tfr_contain_nans And then ensure you select a baseline window that does not contain NaNs. Also, make sure to use *separate* cfg structs per FT function call to avoid confusing yourself. So: cfg = []; ... freq = ft_freqanalysis(cfg, data); cfg = []; ... freq_bsl = ft_freqbaseline(cfg, freq); Cheers, Eelke On 15 August 2018 at 22:32, Eno Umotong wrote: > > > > > > > Hi there, > > > > I’m having trouble extracting the baseline from my time frequency data. > > > > I’m using the function like this: > > > > cfg = []; > > cfg.output = ‘pow’; > > cfg.channel = … > > cfg.taper = ‘hanning’; > > cfg.foi = … > > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; > > cfg.toi = … > > cfg.baseline = .. > > cfg.baselinetype = ‘absolute’; > > cfg.parameter = ‘powspctrm’; > > freq = ft_freqanalysis(cfg, Dataset); > > TFRHann3 = ft_freqbaseline(cfg,freq); > > > > How can I use this function correctly please? I’m sorry to bother you with > this. I couldn’t find assistance online. TFRHann3.powspctrum returns a > matrix full of NaN. I’m sure this is obvious to you. > > > > Just one more question. When selecting my time window of interest for > frequency analysis using ft_freqanalysis and specifying cfg.toi, would 0 > represent my stimulus (as specified by epoch selection in eeglab interface)? > > > > Many thanks again for your help. > > > > > > Many thanks for your help. > > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > From enoumotong at hotmail.com Thu Aug 16 12:33:37 2018 From: enoumotong at hotmail.com (Eno Umotong) Date: Thu, 16 Aug 2018 10:33:37 +0000 Subject: [FieldTrip] Using cfg.baseline and cfg.toi In-Reply-To: References: <940ABE7F-7174-4223-A1D2-40BFA21A362C@nhs.net> <72943034-0A2D-4BE2-B5CB-285351826204@nhs.net> Message-ID: Many thanks for all your responses! Indeed the baseline period did include NaNs. I was just double checking that fieldtrip maintained the same t=0 as I had defined in the eeglab interface. Last question (hopefully) Does the baseline period need to be the same length as the period of frequency analysis? Thanks again! On 16/08/2018, 08:25, "fieldtrip on behalf of Eelke Spaak" wrote: Hi Eno, My hunch is that after the call to ft_freqanalysis, the time interval comprising your baseline contains NaNs. The subsequent call to ft_freqbaseline will subtract those NaNs from all time points, which will result in all NaNs. Have a look here to understand why there are NaNs after ft_freqanalysis: http://www.fieldtriptoolbox.org/faq/why_does_my_tfr_contain_nans And then ensure you select a baseline window that does not contain NaNs. Also, make sure to use *separate* cfg structs per FT function call to avoid confusing yourself. So: cfg = []; ... freq = ft_freqanalysis(cfg, data); cfg = []; ... freq_bsl = ft_freqbaseline(cfg, freq); Cheers, Eelke On 15 August 2018 at 22:32, Eno Umotong wrote: > > > > > > > Hi there, > > > > I’m having trouble extracting the baseline from my time frequency data. > > > > I’m using the function like this: > > > > cfg = []; > > cfg.output = ‘pow’; > > cfg.channel = … > > cfg.taper = ‘hanning’; > > cfg.foi = … > > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; > > cfg.toi = … > > cfg.baseline = .. > > cfg.baselinetype = ‘absolute’; > > cfg.parameter = ‘powspctrm’; > > freq = ft_freqanalysis(cfg, Dataset); > > TFRHann3 = ft_freqbaseline(cfg,freq); > > > > How can I use this function correctly please? I’m sorry to bother you with > this. I couldn’t find assistance online. TFRHann3.powspctrum returns a > matrix full of NaN. I’m sure this is obvious to you. > > > > Just one more question. When selecting my time window of interest for > frequency analysis using ft_freqanalysis and specifying cfg.toi, would 0 > represent my stimulus (as specified by epoch selection in eeglab interface)? > > > > Many thanks again for your help. > > > > > > Many thanks for your help. > > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 From kirstin.heise at kuleuven.be Thu Aug 16 15:46:37 2018 From: kirstin.heise at kuleuven.be (Kirstin Heise) Date: Thu, 16 Aug 2018 13:46:37 +0000 Subject: [FieldTrip] PhD student position at the Movement Control and Neuroplasticity Research Group at KU Leuven | Belgium Message-ID: <1534427197593.59995@kuleuven.be> ? We are looking for a PhD candidate (full-time employment for 4 years) to study the neural mechanisms underlying age deficits in human movement control. Possible start date: October 1, 2018 or later. Application deadline: August 31st2018. Full information about the vacancy can be found here: https://www.kuleuven.be/personeel/jobsite/jobs/54745166 For informal inquiries please contact Prof. dr. Stephan Swinnen, email: stephan.swinnen at kuleuven.be or Dr. Kirstin-Friederike Heise, email: kirstin.heise at kuleuven.be -------------- next part -------------- An HTML attachment was scrubbed... URL: From magotrasushain at gmail.com Thu Aug 16 18:54:56 2018 From: magotrasushain at gmail.com (Sushain Magotra) Date: Thu, 16 Aug 2018 18:54:56 +0200 Subject: [FieldTrip] LCMV source localization Message-ID: Hello eveyone, I am a research fellow working in the area of brain connectivity analysis and its applicability in Deep Brain stimulation for Parkinsons patients. So, for this I created a model of the human head using FieldTrip and then simulated two dipoles inside this head model with thier predefined time series and collected the synthetic EEG data. Then, I created a source model to reconstruct these two dipoles again inside the head model using LCMV inverse method. But, the reconstrcuted dipoles are way too far from the original dipoles in terms of their location. I think that even if they are deviated from the original positions it should be a little difference but my results show too much difference. I am attaching my results obtained below and also providing the code that I've used. Please let me know where am I going wrong. % READ MRI mri = ft_read_mri('Subject01.mri'); %SEGMENTATION cfg = []; cfg.output = {'gray','white','csf','skull','scalp'}; segmentedmri = ft_volumesegment(cfg, mri); %MESH GENERATION cfg = []; cfg.shift = 0.3; cfg.method = 'hexahedral'; mesh = ft_prepare_mesh(cfg,segmentedmri); % HEAD MODEL CREATION cfg = []; cfg.method ='simbio'; cfg.conductivity = [0.33 0.14 1.79 0.01 0.43]; vol = ft_prepare_headmodel(cfg, mesh); %EEG SENSOR ALIGNMENT elec = ft_read_sens('standard_1020.elc'); cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = vol; elec_aligned = ft_electroderealign(cfg); % DIPOLE SIMULATION cfg = []; cfg.vol = vol; cfg.elec = elec_aligned; cfg.dip.pos = [ 28.5 -5.5 50.5 % dipole 1 26.5 14.5 41.5 % dipole 2 ]; cfg.dip.mom = ... % the vector represents [qx1 qy1 qz1 qx2 qy2 qz2] [ 1 0 0 0 0 0 ]' + ...% this is how signal1 contributes to the 6 dipole components [ 0 0 0 1 0 0 ]'; % this is how signal2 contributes to the 6 dipole components time = (0:199)/200; % manually create a time axis signal1 = data.trial{1, 1}(1,:); signal2 = data.trial{1, 1}(3,:); cfg.dip.signal = {[signal1; signal2]}; % one trial only cfg.fsample = 200; % Hz raw = ft_dipolesimulation(cfg); avg = ft_timelockanalysis([], raw); %SOURCE MODEL ftpath = 'C:\Users\sushain\fieldtrip-20180129'; load(fullfile(ftpath, 'template/sourcemodel/standard_sourcemodel3d10mm')); template_grid = sourcemodel; clear sourcemodel; cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template_grid; cfg.grid.nonlinear = 'yes'; cfg.mri = mri; cfg.grid.unit ='mm'; grid = ft_prepare_sourcemodel(cfg); %LEADFIELD CREATION cfg = []; cfg.elec = elec_aligned; % gradiometer distances cfg.headmodel = vol; % volume conduction headmodel cfg.grid = grid; % normalized grid positions cfg.normalize = 'yes'; % to remove depth bias lf = ft_prepare_leadfield(cfg); %LCMV SOURCE RECONSTRUCTION cfg = []; cfg.method = 'lcmv'; cfg.grid = lf; % leadfield, which has the grid information cfg.vol = vol; % volume conduction model (headmodel) cfg.keepfilter = 'yes'; cfg.lcmv.fixedori = 'yes'; lcmv_reconstructed_sources = ft_sourceanalysis(cfg, avg); In the LCMV results I plotted the two dipoles showing the maximum power at two grid locations.Note that the originally placed dipoles are red and the reconstructed dipoles are blue in colour. But the results show that these reconstructed dipoles are really deviated from their original locations. It would be really helpful for me if I could get some suggestions on what could I possibly be doing wrong. Thanking you. Kind Regards, Sushain Magotra Research Fellow IRTG ELAINE University of Rostock Institute of General Electrical Engineering Albert-Einstein-Str. 2 D-18059 Rostcok Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: brain_sources1.png Type: image/png Size: 68434 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: brain_sources2.png Type: image/png Size: 86138 bytes Desc: not available URL: From alex.sel at psy.ox.ac.uk Fri Aug 17 18:01:29 2018 From: alex.sel at psy.ox.ac.uk (Alex Sel) Date: Fri, 17 Aug 2018 16:01:29 +0000 Subject: [FieldTrip] One-sample cluster based permutation t-test ERP data Message-ID: <47637187-A1A5-4040-8917-F04C501E65CF@psy.ox.ac.uk> Dear list, I wonder if there has been a function developed to do a one-sample cluster based permutation t-test ERP data. I am aware this is possible to do with actvsblT for time-frequency data. There is a forum thread from 2012 saying that this wasn’t implemented. But I wonder if there is anyone there who might have resolve this issue and wouldn’t mind sharing the solution. Any help would be appreciated. Best wishes, Alex Sel, PhD Associate Fellow of the Higher Education Academy Wellcome Centre for Integrative Neuroimaging Department of Experimental Psychology University of Oxford The Tinsley Building OX1 3SR From politzerahless at gmail.com Sun Aug 19 10:36:09 2018 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sun, 19 Aug 2018 16:36:09 +0800 Subject: [FieldTrip] One-sample cluster based permutation t-test ERP data Message-ID: I'm not sure if there is or not, but in the past I have managed this by creating an ERP dataset that is all zeroes, and then comparing my real dataset to it with a cluster test. Since a one-sample test is the same as a paired samples test between something and zero (e.g., comparing X and Y via t-test is the same as comparing {X-Y} to zero), this should give the same result. --- Stephen Politzer-Ahles The Hong Kong Polytechnic University Department of Chinese and Bilingual Studies http://www.mypolyuweb.hk/~sjpolit/ > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 17 Aug 2018 16:01:29 +0000 > From: Alex Sel > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] One-sample cluster based permutation t-test ERP > data > Message-ID: <47637187-A1A5-4040-8917-F04C501E65CF at psy.ox.ac.uk> > Content-Type: text/plain; charset="utf-8" > > Dear list, > > I wonder if there has been a function developed to do a one-sample cluster > based permutation t-test ERP data. I am aware this is possible to do with > actvsblT for time-frequency data. > > There is a forum thread from 2012 saying that this wasn’t implemented. But > I wonder if there is anyone there who might have resolve this issue and > wouldn’t mind sharing the solution. > > Any help would be appreciated. > > Best wishes, > > Alex Sel, PhD > Associate Fellow of the Higher Education Academy > Wellcome Centre for Integrative Neuroimaging > Department of Experimental Psychology > University of Oxford > The Tinsley Building > OX1 3SR > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luca.kolibius at gmail.com Sun Aug 19 14:43:27 2018 From: luca.kolibius at gmail.com (Luca Kolibius) Date: Sun, 19 Aug 2018 14:43:27 +0200 Subject: [FieldTrip] Short survey on EEG/MEG visualisation preferences Message-ID: Dear FieldTrip community, We are currently investigating empirically which of three methods of visualising ERP/ERF results is prefered. To this end we would like to ask for less than 10 minutes of your time to participate in an online survey where you will be presented with various outputs. We know how valuable your time is and appreciate your decision to aid in our research project. You can participate through clicking on this link: https://ww3.unipark.de/uc/erp_experiment/ If you can think of any other collegue that possesses great expertise in event-related potentials, we invite you to share the survey with them. Kind regards, Luca Kolibius -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Sun Aug 19 23:57:32 2018 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Sun, 19 Aug 2018 21:57:32 +0000 Subject: [FieldTrip] One-sample cluster based permutation t-test ERP data In-Reply-To: References: Message-ID: Dear FT-ers, The one-sample statistical test continues to be an issue that raises confusion. Although it is impossible to explain here the statistical background in all detail, the following points are relevant for empirical neuroscientists that apply cluster-based permutation tests to their data: 1. A permutation test can only be used for comparing two or more experimental conditions. Thus, Stephen’s proposal is not a permutation test. However, it does produce a p-value, and by comparing it with some nominal value (e.g., 0.05) it can be used to take a decision. The problem with this procedure is that it is unclear what is the null hypothesis to which this decision pertains. Here lies the important difference with a permutation test for the difference between two experimental conditions: tthe null hypothesis involves that the biological data in the two conditions are generated by the same probability distribution. 2. Comparing the activation (post-stimulus) with the baseline (pre-stimulus) period can be performed using a permutation test, regardless whether the raw data were transformed into a time-frequency representation or not. The reason why some people think it cannot be used on the raw data (i.e., for testing effects on the time-locked average) is that the baseline period is typically used to normalize the activation period (by removing the DC component). With this normalisation, the null hypothesis pertains to two sets of biological data of which one (the activation data) is already a function of the other (as a result of the normalisation procedure). If you want to use the actvsblT statfun, It makes more sense to perform a high-pass filter on the raw data rather than normalising the activation data using the baseline data. best, Eric Maris 1. Re: One-sample cluster based permutation t-test ERP data (Stephen Politzer-Ahles) From: Stephen Politzer-Ahles > Subject: Re: [FieldTrip] One-sample cluster based permutation t-test ERP data Date: 19 August 2018 at 10:36:09 CEST To: > I'm not sure if there is or not, but in the past I have managed this by creating an ERP dataset that is all zeroes, and then comparing my real dataset to it with a cluster test. Since a one-sample test is the same as a paired samples test between something and zero (e.g., comparing X and Y via t-test is the same as comparing {X-Y} to zero), this should give the same result. --- Stephen Politzer-Ahles The Hong Kong Polytechnic University Department of Chinese and Bilingual Studies http://www.mypolyuweb.hk/~sjpolit/ ---------------------------------------------------------------------- Message: 1 Date: Fri, 17 Aug 2018 16:01:29 +0000 From: Alex Sel > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] One-sample cluster based permutation t-test ERP data Message-ID: <47637187-A1A5-4040-8917-F04C501E65CF at psy.ox.ac.uk> Content-Type: text/plain; charset="utf-8" Dear list, I wonder if there has been a function developed to do a one-sample cluster based permutation t-test ERP data. I am aware this is possible to do with actvsblT for time-frequency data. There is a forum thread from 2012 saying that this wasn’t implemented. But I wonder if there is anyone there who might have resolve this issue and wouldn’t mind sharing the solution. Any help would be appreciated. Best wishes, Alex Sel, PhD Associate Fellow of the Higher Education Academy Wellcome Centre for Integrative Neuroimaging Department of Experimental Psychology University of Oxford The Tinsley Building OX1 3SR _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 Eric Maris | Donders Institute for Brain, Cognition, and Behaviour & Faculty of Social Sciences | Radboud University | PO Box 9104, 6500 HE Nijmegen | (024) 3612651 | www.ru.nl This message (and any attachments) is intended solely for the addressee(s) and may contain confidential information. If you are not the addressee, do not copy this message (and any attachments), forward or share this message with third parties. You are requested to notify the sender immediately and delete this message. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nima.noury at student.uni-tuebingen.de Mon Aug 20 12:05:36 2018 From: nima.noury at student.uni-tuebingen.de (Nima Noury) Date: Mon, 20 Aug 2018 12:05:36 +0200 Subject: [FieldTrip] 2018 Tuebingen Systems Neuroscience Symposium (SNS), Oct 18-19 Message-ID: <20180820120536.Horde.ar93ZoM7ZWtH9e7nzrOqaEB@webmail.uni-tuebingen.de> The Centre for Integrative Neuroscience, MEG Center Tuebingen, and the Graduate Training Centre of Neuroscience are pleased to announce the 2018 Tuebingen Systems Neuroscience Symposium (SNS2018) The symposium takes place on October 18 and 19, 2018 at the University of Tuebingen. This annual international meeting brings together leading researchers in the field of systems neuroscience featuring plenary talks, poster sessions and social events. Join us in Tuebingen to learn about the latest advances in systems neuroscience. Confirmed speakers: Bahador Bahrami, London Sylvain Baillet, Montreal Paul Cisek, Montreal Olivier Collignon, Brüssel Lila Davachi, New York Ileana Hanganu-Opatz, Hamburg Ayelet Landau, Jerusalem Wolfgang Maass, Graz Carl Petersen, Lausanne Mark Stokes, Oxford Matthew Self, Amsterdam For more information and registration, please visit: http://meg.medizin.uni-tuebingen.de/2018/ Please forward this information to any of your colleagues and collaborators that may be interested in the symposium. Nima Noury AG Large-Scale Neuronal Interactions Centre for Integrative Neuroscience (CIN) University of Tübingen Otfried Müller-Straße 25 72076 Tübingen Germany From J.Verhoef at donders.ru.nl Mon Aug 20 12:29:24 2018 From: J.Verhoef at donders.ru.nl (Verhoef, J.P. (Julia)) Date: Mon, 20 Aug 2018 10:29:24 +0000 Subject: [FieldTrip] Three Positions for Dutch Research Consortium 'Language in Interaction' Message-ID: <11E9E0B371DBAE4EB859A9CC30606A048287FF8A@EXPRD98.hosting.ru.nl> Three Positions for Dutch Research Consortium 'Language in Interaction' (1.0 FTE) Dutch Research Consortium 'Language in Interaction' Vacancy number: 30.06.18 Application deadline: 16 September 2018 [Logo NWO] Responsibilities We are looking for highly motivated candidates to enrich a unique consortium of researchers aiming to unravel the neurocognitive mechanisms of language at multiple levels. The goal is to understand both the universality and variability of the human language faculty from genes to behaviour. Currently, our consortium advertises one postdoctoral position and two PhD positions. These positions provide the opportunity for conducting world-class research as a member of an interdisciplinary team. Each position has its own requirements and profile. Click here for more information on the positions. Work environment The Netherlands has an outstanding track record in the language sciences. The Language in Interaction research consortium, sponsored by a large grant from the Netherlands Organisation for Scientific Research (NWO), brings together a large number of the excellent research groups in the Netherlands in one research programme on the foundations of language. In addition to 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, including 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. We have identified five Big Questions (BQ) that are central to our understanding of the human language faculty. These questions are interrelated at multiple levels. Teams of researchers will collaborate to collectively address these key questions in our field. Our five Big Questions are: BQ1: The nature of the mental lexicon: How to bridge neurobiology and psycholinguistic theory by computational modelling? BQ2: What are the characteristics and consequences of internal brain organisation for language? BQ3: Creating a shared cognitive space: How is language grounded in and shaped by communicative settings of interacting people? BQ4: Variability in language processing and in language learning: Why does the ability to learn language change with age? How can we characterise and map individual language skills in relation to the population distribution? BQ5: How are other cognitive systems shaped by the presence of a language system in humans? More information on our Big Questions: www.languageininteraction.nl/Bigquestions.html Successful candidates will be appointed at one of the consortium's home institutions, depending on the position applied for. All successful candidates will become members of our Big Question teams. The research is being conducted at the participating institutions in an international setting. English is the lingua franca. What we expect from you Each position has its own requirements and profile. More information on: www.languageininteraction.nl/jobs/bqfifth.html General requirements for all positions are: * a degree in the field indicated; * strong motivation; * excellent proficiency in written and spoken English. What we have to offer * employment: 1.0 FTE; * you will be appointed at one of the consortium's home institutions, depending on the position applied for; * terms of employment depend on the position applied for; * the institutes involved have regulations in place that enable their staff to create a good work life balance. Other Information Both institutes involved are equal opportunity employers, committed to building a culturally diverse intellectual community, and as such encourage applications from women and minorities. Would you like to know more? Further information on: the Language in Interaction Consortium Further information on: the different positions For more information about this vacancy, please contact: additional information can be obtained from the contacts for the different positions. Are you interested? You should upload your application (attn. of Prof. dr. P. Hagoort) exclusively using the button 'Apply' below. Your application should include (and be limited to) the following attachment(s): * a cover letter; please state at the top the reference number(s) of the position(s) you apply for; * your curriculum vitae, including a list of publications and the names of at least two persons who can provide references. Please apply before 16 September 2018, 23:59 CET. Applicants are welcome to apply for more than one position. [Apply] No commercial propositions please. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 2461 bytes Desc: image001.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 3660 bytes Desc: image003.jpg URL: From luca.kaiser at web.de Mon Aug 20 14:39:13 2018 From: luca.kaiser at web.de (Luca Kaiser) Date: Mon, 20 Aug 2018 14:39:13 +0200 Subject: [FieldTrip] Set regularization parameter after SSS In-Reply-To: <20180809092625.Horde.vNTP0Ql8KWDcjGljoaVQMZU@home.staff.uni-marburg.de> References: <20180809092625.Horde.vNTP0Ql8KWDcjGljoaVQMZU@home.staff.uni-marburg.de> Message-ID: An HTML attachment was scrubbed... URL: From luca.kaiser at web.de Mon Aug 20 15:22:03 2018 From: luca.kaiser at web.de (Luca Kaiser) Date: Mon, 20 Aug 2018 15:22:03 +0200 Subject: [FieldTrip] Set regularization parameter after SSS In-Reply-To: References: <20180809092625.Horde.vNTP0Ql8KWDcjGljoaVQMZU@home.staff.uni-marburg.de> Message-ID: An HTML attachment was scrubbed... URL: From e.spaak at donders.ru.nl Tue Aug 21 09:53:14 2018 From: e.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 21 Aug 2018 09:53:14 +0200 Subject: [FieldTrip] One-sample cluster based permutation t-test ERP data In-Reply-To: References: Message-ID: Dear Eric and all, Following up on your point (1), I've wondered in the past about the one-sample randomization test (let's call it that to avoid the name "permutation"). Would it not be fair to say that the null hypothesis here is that the expected value of our data equals zero? Cheers, Eelke On 19 August 2018 at 23:57, Maris, E.G.G. (Eric) wrote: > Dear FT-ers, > > The one-sample statistical test continues to be an issue that raises > confusion. Although it is impossible to explain here the statistical > background in all detail, the following points are relevant for empirical > neuroscientists that apply cluster-based permutation tests to their data: > > 1. A permutation test can only be used for comparing two or more > experimental conditions. Thus, Stephen’s proposal is not a permutation test. > However, it does produce a p-value, and by comparing it with some nominal > value (e.g., 0.05) it can be used to take a decision. The problem with this > procedure is that it is unclear what is the null hypothesis to which this > decision pertains. Here lies the important difference with a permutation > test for the difference between two experimental conditions: tthe null > hypothesis involves that the biological data in the two conditions are > generated by the same probability distribution. > > 2. Comparing the activation (post-stimulus) with the baseline (pre-stimulus) > period can be performed using a permutation test, regardless whether the raw > data were transformed into a time-frequency representation or not. The > reason why some people think it cannot be used on the raw data (i.e., for > testing effects on the time-locked average) is that the baseline period is > typically used to normalize the activation period (by removing the DC > component). With this normalisation, the null hypothesis pertains to two > sets of biological data of which one (the activation data) is already a > function of the other (as a result of the normalisation procedure). If you > want to use the actvsblT statfun, It makes more sense to perform a high-pass > filter on the raw data rather than normalising the activation data using the > baseline data. > > best, > Eric Maris > > > > > > 1. Re: One-sample cluster based permutation t-test ERP data > (Stephen Politzer-Ahles) > > From: Stephen Politzer-Ahles > Subject: Re: [FieldTrip] One-sample cluster based permutation t-test ERP > data > Date: 19 August 2018 at 10:36:09 CEST > To: > > > I'm not sure if there is or not, but in the past I have managed this by > creating an ERP dataset that is all zeroes, and then comparing my real > dataset to it with a cluster test. Since a one-sample test is the same as a > paired samples test between something and zero (e.g., comparing X and Y via > t-test is the same as comparing {X-Y} to zero), this should give the same > result. > > > --- > Stephen Politzer-Ahles > The Hong Kong Polytechnic University > Department of Chinese and Bilingual Studies > http://www.mypolyuweb.hk/~sjpolit/ > >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Fri, 17 Aug 2018 16:01:29 +0000 >> From: Alex Sel >> To: "fieldtrip at science.ru.nl" >> Subject: [FieldTrip] One-sample cluster based permutation t-test ERP >> data >> Message-ID: <47637187-A1A5-4040-8917-F04C501E65CF at psy.ox.ac.uk> >> Content-Type: text/plain; charset="utf-8" >> >> Dear list, >> >> I wonder if there has been a function developed to do a one-sample cluster >> based permutation t-test ERP data. I am aware this is possible to do with >> actvsblT for time-frequency data. >> >> There is a forum thread from 2012 saying that this wasn’t implemented. But >> I wonder if there is anyone there who might have resolve this issue and >> wouldn’t mind sharing the solution. >> >> Any help would be appreciated. >> >> Best wishes, >> >> Alex Sel, PhD >> Associate Fellow of the Higher Education Academy >> Wellcome Centre for Integrative Neuroimaging >> Department of Experimental Psychology >> University of Oxford >> The Tinsley Building >> OX1 3SR >> >> >> >> >> >> > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > > > Eric Maris | Donders Institute for Brain, Cognition, and Behaviour & Faculty > of Social Sciences | Radboud University | PO Box 9104, 6500 HE Nijmegen | > (024) 3612651 | www.ru.nl > > This message (and any attachments) is intended solely for the addressee(s) > and may contain confidential information. If you are not the addressee, do > not copy this message (and any attachments), forward or share this message > with third parties. You are requested to notify the sender immediately and > delete this message. > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > From thomas.hartmann at th-ht.de Tue Aug 21 10:24:25 2018 From: thomas.hartmann at th-ht.de (Thomas Hartmann) Date: Tue, 21 Aug 2018 10:24:25 +0200 Subject: [FieldTrip] question on coil orientations for elekta systems Message-ID: <7aa1613b-a175-6ed6-0b7e-18b38ecc7fdd@th-ht.de> hi, while diving into the import code for elekta systems, i noticed that coil orientations are imported like this: t = orig.chs(n).coil_trans; grad.coilpos(kCoil,:) = t(1:3,4)+0.0003*t(1:3,3); grad.coilori(kCoil,:) = t(1:3,3); (full code is here: https://github.com/fieldtrip/fieldtrip/blob/master/fileio/private/mne2grad.m#L321) t (or coil_trans) is a 4x4 matrix, that if i understood it correctly, is a 3x3 rotation matrix combined with xyz coordinates in the last column. if i understand everything correctly, coilori is supposed to store a unit vector pointing in the direction of the coil's orientation. so, why is this the third column? thanks a lot in advance! thomas -- Dr. Thomas Hartmann Centre for Cognitive Neuroscience FB Psychologie Universität Salzburg Hellbrunnerstraße 34/II 5020 Salzburg Tel: +43 662 8044 5109 Email: thomas.hartmann at th-ht.de "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Aug 21 11:11:51 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 21 Aug 2018 09:11:51 +0000 Subject: [FieldTrip] question on coil orientations for elekta systems In-Reply-To: <7aa1613b-a175-6ed6-0b7e-18b38ecc7fdd@th-ht.de> References: <7aa1613b-a175-6ed6-0b7e-18b38ecc7fdd@th-ht.de> Message-ID: <5C9F995D-1ABA-4CC6-BD6A-FA59DDC62B66@donders.ru.nl> Dear Thomas, I would guess that the 3x3 ‘rotation’ part of the affine transformation matrix here describes the direction plane of the sensor in the first two columns (x/y axis), and the normal to this plane in the third column, which is the vector perpendicular to the coil. Try and verify whether the cross-product between the first two columns gives the the third. Best wishes, Jan-Mathijs On 21 Aug 2018, at 10:24, Thomas Hartmann > wrote: hi, while diving into the import code for elekta systems, i noticed that coil orientations are imported like this: t = orig.chs(n).coil_trans; grad.coilpos(kCoil,:) = t(1:3,4)+0.0003*t(1:3,3); grad.coilori(kCoil,:) = t(1:3,3); (full code is here: https://github.com/fieldtrip/fieldtrip/blob/master/fileio/private/mne2grad.m#L321) t (or coil_trans) is a 4x4 matrix, that if i understood it correctly, is a 3x3 rotation matrix combined with xyz coordinates in the last column. if i understand everything correctly, coilori is supposed to store a unit vector pointing in the direction of the coil's orientation. so, why is this the third column? thanks a lot in advance! thomas -- Dr. Thomas Hartmann Centre for Cognitive Neuroscience FB Psychologie Universität Salzburg Hellbrunnerstraße 34/II 5020 Salzburg Tel: +43 662 8044 5109 Email: thomas.hartmann at th-ht.de "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Aug 21 13:15:37 2018 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 21 Aug 2018 13:15:37 +0200 Subject: [FieldTrip] Sensor scaling in FieldTrip? In-Reply-To: <5b839818-bd22-2d76-702f-a0d119974e85@aalto.fi> References: <5b839818-bd22-2d76-702f-a0d119974e85@aalto.fi> Message-ID: Hi Matii, Good question, let me also CC this to the fieldtrip email list so that google might retrieve it for others in the future. There is no automatic weighting of channels done in FT inverse estimation, neither for planar/magnetometer, nor for meg/eeg in more general. For the planar/magnetometer a known issue is that many people preprocess the data such that the planar gradiometers are defined in T/cm, whereas the data is defined in T/m. To ensure consistent units that match the forward computation code (which assumes SI units) you should use cfg.coilaccuracy in ft_preprocessing with a non-empty value (0, 1 or 2 are valid). When empty, units won’t be SI compatible (which is not a problem in many cases, but would be when combining different channels types). The subspace projections in some (but not consistently in all) inverse functions predates the application of FT to Neuromag/Elekta/Megin/York_Instruments data. At that time different sensor types were not considered. The original implementation was used in combination with http://www.ijbem.org/volume7/number2/pdf/007.pdf but I don’t think that the full code (from around 2004) survived. After that the subspace “machinery” has been extended here and there, but not with combined planar/magnetometer in mind. Separate from this there is some code in ft_denoise_synthetic.m, ft_denoise_pca.m and ft_componentanalysis.m that relates to linear projections (for noise suppression) done on the data that also need to be replicated in the forward model (since the forward model should be distorted, just like the data). In that case the projections for the forward model are applied to grad.tra (and stored for reference in grad.balance). Although I am not doing combined planar/magnetometer estimations, I suspect that my strategy would be to implement it similar to ft_denoise_xxx (which updates the grad.tra) and implement it as ft_sensorscaling or ft_prewhitening or so. The function would apply a linear scaling to the data, and apply teh same scaling to the data.grad.tra (and store it in data.grad.balance) and if applicable idem for data.elec.tra/balance. Hope this helps, Robert PS See also this regarding the linear projections when they are meant to deal with artifacts. > On 20 Aug 2018, at 18:22, Matti Stenroos wrote: > > Hi Robert, > > While looking at FT code related to this illish-posed question, I noticed that regularization and subspace projection in beamformer_lcmv.m do not mention any preweighting based on sensor type (magnetometer vs gradiometer)... > > I have earlier gone through some preprocessing pipelines and I don't remember seeing any sensor scaling there. Is it applied somehow automatically to the covariance matrix and leadfield? > > ...if not, at least the regularization and subspace parts don't work correctly with 306-channel Elekta data. If yep, sorry for bothering... (didn't find anything with quick googling). > > See you in Philadelphia! > > m > > > > > > > > > > > -------- Forwarded Message -------- > Subject: Re: [FieldTrip] Set regularization parameter after SSS > Date: Mon, 20 Aug 2018 15:22:03 +0200 > From: Luca Kaiser > Reply-To: FieldTrip discussion list > To: fieldtrip at science.ru.nl > > > > Hi Matti, > sure-sorry and thanks for your quick reply. So here is what I am doing using the average covariance matrix (so data covariance). > cfg=[]; > cfg.covariance='yes'; > cfg.channel=data.label; > avg_data=ft_timelockanalysis(cfg, data); > cfg=[]; > cfg.method='lcmv'; > cfg.grid=lf; > cfg.vol=hdm; > cfg.lcmv.keepfilter='yes'; > cfg.lcmv.fixedori= 'yes'; > cfg.lcmv.lambda= '10%'; %0% rank deficient data-use stronger regularization?? > lcmv_avg=ft_sourceanalysis(cfg, avg_data); > Best, > Luca > *Gesendet:* Montag, 20. August 2018 um 15:10 Uhr > *Von:* "Matti Stenroos" > *An:* "Luca Kaiser" > *Betreff:* Re: [FieldTrip] Set regularization parameter after SSS > Dear Luca, > > I think you'd need to tell a bit more, as the meaning of "lambda" > depends on the algorithm you are using. Also "the covariance matrix" is > not uniquely defined --- are you talking about noise covariance or > measurement covariance? > > In general, the eigenvalue idea you had read does not make sense --- the > eigenvalue text deals with condition numbers, while lambda does, in > general, not relate directly to that. The advice might have been that > "set lambda so that the ratio of largest and smallest eigenvalues is > 1000"... > > Cheers, > Matti > also working with low-rankingMax-filtered MEG and coincidentally > having a lot of covariance metrics on screen at the moment > > > > On 2018-08-20 15:39, Luca Kaiser wrote: > > Dear FieldTrip community, > > I am using ft_sourceanalysis on SSS preprocessed (neuromag) data. I > > wonder if there are any suggestions on how to set lambda in this case? > > My covariance matrix is rank deficient (rank 60, 306 sensors). I read in > > the mailing list that I would need to look at the eigenvalues of XX' and > > set lambda to be 1/1000 of the largest eigenvalue. However, I do not > > really understand why to divide by 1/1000? > > Every help would be very much appreciated, > > Thanks! > > Luca > > > > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > https://doi.org/10.1371/journal.pcbi.1002202 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nirofir2 at gmail.com Tue Aug 21 13:55:36 2018 From: nirofir2 at gmail.com (Nir Ofir) Date: Tue, 21 Aug 2018 14:55:36 +0300 Subject: [FieldTrip] Channel and trial selection in ft_rejectvisual Message-ID: Hello everyone, I noticed that using cfg.trials or cfg.channel as input for ft_rejectvisual doesn't affect the channels or trials that are plotted, instead the selection is done only after the user has gone through all channels/trials. What is the reason for that? Many thanks, Nir -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Tue Aug 21 14:02:34 2018 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Tue, 21 Aug 2018 13:02:34 +0100 Subject: [FieldTrip] Set regularization parameter after SSS In-Reply-To: References: <20180809092625.Horde.vNTP0Ql8KWDcjGljoaVQMZU@home.staff.uni-marburg.de> Message-ID: Hi Luca and Matti, We have recently looked into beamforming on Elekta with several methods people including Robert and Alex Gramfort. One thing we discovered is that beamforming can completely fail when small regularisation (like 1% or 5% which most people use) is applied to data after SSS. The theoretical underpinning for this has not been figured out yet, but in practice, the more robust thing to do is to reduce the data dimensionality and set lambda to zero. I attach an example developed for the phantom data we got from Aston MEG that shows how this can be done in FT. If you want, I can share the phantom example with you so that you can verify that this approach works. Regarding sensor type fusion, I would suggest that you only limit your analysis to one sensor type. Most Neuromag people use the planar gradiometers. The reason for this suggestion is that after SSS, channels of both types are linear combinations of the same basis vectors and contain redundant information so trying to fuse them is more a headache than anything else. There is a paper saying this in more detail http://www.mdpi.com/1424-8220/17/12/2926/html Best, Vladimir On Mon, Aug 20, 2018 at 2:35 PM Luca Kaiser wrote: > > Hi Matti, > > sure-sorry and thanks for your quick reply. So here is what I am doing using the average covariance matrix (so data covariance). > > cfg=[]; > cfg.covariance='yes'; > cfg.channel=data.label; > avg_data=ft_timelockanalysis(cfg, data); > > cfg=[]; > cfg.method='lcmv'; > cfg.grid=lf; > cfg.vol=hdm; > cfg.lcmv.keepfilter='yes'; > cfg.lcmv.fixedori= 'yes'; > cfg.lcmv.lambda= '10%'; %0% rank deficient data-use stronger regularization?? > lcmv_avg=ft_sourceanalysis(cfg, avg_data); > > > Best, > > Luca > > > Gesendet: Montag, 20. August 2018 um 15:10 Uhr > Von: "Matti Stenroos" > An: "Luca Kaiser" > Betreff: Re: [FieldTrip] Set regularization parameter after SSS > Dear Luca, > > I think you'd need to tell a bit more, as the meaning of "lambda" > depends on the algorithm you are using. Also "the covariance matrix" is > not uniquely defined --- are you talking about noise covariance or > measurement covariance? > > In general, the eigenvalue idea you had read does not make sense --- the > eigenvalue text deals with condition numbers, while lambda does, in > general, not relate directly to that. The advice might have been that > "set lambda so that the ratio of largest and smallest eigenvalues is > 1000"... > > Cheers, > Matti > also working with low-rankingMax-filtered MEG and coincidentally > having a lot of covariance metrics on screen at the moment > > > > On 2018-08-20 15:39, Luca Kaiser wrote: > > Dear FieldTrip community, > > I am using ft_sourceanalysis on SSS preprocessed (neuromag) data. I > > wonder if there are any suggestions on how to set lambda in this case? > > My covariance matrix is rank deficient (rank 60, 306 sensors). I read in > > the mailing list that I would need to look at the eigenvalues of XX' and > > set lambda to be 1/1000 of the largest eigenvalue. However, I do not > > really understand why to divide by 1/1000? > > Every help would be very much appreciated, > > Thanks! > > Luca > > > > > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > https://doi.org/10.1371/journal.pcbi.1002202 > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- cd C:\home\Data\Aston\newphantom ft_defaults; %% amp = 200; dip = 5; %% headmodel = []; headmodel.o = [0 0 0]; headmodel.r = 0.10; %% suffix = '';%'_tsss';% '';%******* Compare to ; %% %% dataset = sprintf('.\\%dnAm\\Amp%d_Dip%d_IASoff%s.fif',amp, amp, dip, suffix); hdr = ft_read_header(dataset); hdr.chantype{strmatch('SYS201', hdr.label)} = 'other trigger'; ev = ft_read_event(dataset, 'header', hdr); cfg = []; cfg.dataset = dataset; cfg.event = ev; cfg.channel = {'megplanar', '-MEG1133', '-MEG1323'}; cfg.trialfun = 'ft_trialfun_general'; cfg.trialdef.prestim = 0.1; cfg.trialdef.poststim = 0.1; cfg.trialdef.eventtype = 'SYS201'; cfg.lpfilter = 'yes'; cfg.lpfreq = 40; cfg.demean = 'yes'; cfg = ft_definetrial(cfg); data = ft_preprocessing(cfg); %% cfg = []; cfg.method = 'pca'; cfg.updatesens = 'no'; cfg.channel = 'megplanar'; comp = ft_componentanalysis(cfg, data); cfg = []; cfg.updatesens = 'no'; cfg.component = comp.label(51:end); data = ft_rejectcomponent(cfg, comp); %% cfg = []; cfg.toilim = [0 0.1]; active = ft_redefinetrial(cfg, data); cfg = []; cfg.toilim = [-0.1 0]; baseline = ft_redefinetrial(cfg, data); %% cfg = []; cfg.covariance = 'yes'; cfg.covariancewindow = 'all'; timelock_active = ft_timelockanalysis(cfg, active); timelock_baseline = ft_timelockanalysis(cfg, baseline); timelock_all = ft_timelockanalysis(cfg, data); %% cfg = []; cfg.headmodel = headmodel; cfg.grid.resolution = 0.01; sourcemodel = ft_prepare_sourcemodel(cfg, timelock_active); %% cfg = []; cfg.headmodel = headmodel; cfg.grid = sourcemodel; cfg.method = 'lcmv'; cfg.channel = 'megplanar'; cfg.lcmv.lambda = '0%'; cfg.lcmv.normalize = 'no'; cfg.lcmv.keepfilter = 'yes'; source_lcmv_filters = ft_sourceanalysis(cfg, timelock_all); %% cfg.grid.filter = source_lcmv_filters.avg.filter; source_lcmv_active = ft_sourceanalysis(cfg, timelock_active); source_lcmv_baseline = ft_sourceanalysis(cfg, timelock_baseline); source_lcmv_active.time = 0; source_lcmv_baseline.time = 0; cfg = []; cfg.parameter = 'pow'; cfg.operation = 'log10(x1/x2)'; source_lcmv_relative = ft_math(cfg, source_lcmv_active, source_lcmv_baseline); %% cfg = []; cfg.funparameter = 'pow'; cfg.location = 'max'; %% ft_sourceplot(cfg, source_lcmv_relative); %% From matti.stenroos at aalto.fi Tue Aug 21 15:16:23 2018 From: matti.stenroos at aalto.fi (Matti Stenroos) Date: Tue, 21 Aug 2018 16:16:23 +0300 Subject: [FieldTrip] Set regularization parameter after SSS In-Reply-To: References: <20180809092625.Horde.vNTP0Ql8KWDcjGljoaVQMZU@home.staff.uni-marburg.de> Message-ID: <9e38e3c7-ec00-270a-fcbb-b0517a6da284@aalto.fi> Hi Vladimir, Robert, Thanks for your input! I've been playing with linear estimates & SSS-processed data. Based on my experience, I agree with Vladimir that dropping the rank to 60--70 (depending on the number of max filter coeffs etc) is the way to go. If whitening (via noise covariance matrix) is used, some regularization to the whitener is probably appropriate. I don't have strong opinion regarding "only gradiometers" or "gradio+magneto". I'd say there is no general answer; rather it depends on what kind on inverse method you apply = how you use your data there. In resolution analysis of minimum-norm estimates, the difference is small. Data fusing = sensor scaling should not be that difficult; pre-weighting the data with 1/sqrt(mvars), where mvars has mean noise/data variances per sensotype. But, as the Max reconstructs all data using the same multipole series with ~64 components, rank will not really increase --- if there has been 64 max filter components, useful ranks of magnetometers, gradiometers, and the whole MEG are of the order of 60--64. Cheers, Matti On 2018-08-21 15:02, Vladimir Litvak wrote: > Hi Luca and Matti, > > We have recently looked into beamforming on Elekta with several > methods people including Robert and Alex Gramfort. One thing we > discovered is that beamforming can completely fail when small > regularisation (like 1% or 5% which most people use) is applied to > data after SSS. The theoretical underpinning for this has not been > figured out yet, but in practice, the more robust thing to do is to > reduce the data dimensionality and set lambda to zero. I attach an > example developed for the phantom data we got from Aston MEG that > shows how this can be done in FT. If you want, I can share the phantom > example with you so that you can verify that this approach works. > > Regarding sensor type fusion, I would suggest that you only limit your > analysis to one sensor type. Most Neuromag people use the planar > gradiometers. The reason for this suggestion is that after SSS, > channels of both types are linear combinations of the same basis > vectors and contain redundant information so trying to fuse them is > more a headache than anything else. There is a paper saying this in > more detail http://www.mdpi.com/1424-8220/17/12/2926/html > > Best, > > Vladimir > > On Mon, Aug 20, 2018 at 2:35 PM Luca Kaiser wrote: >> >> Hi Matti, >> >> sure-sorry and thanks for your quick reply. So here is what I am doing using the average covariance matrix (so data covariance). >> >> cfg=[]; >> cfg.covariance='yes'; >> cfg.channel=data.label; >> avg_data=ft_timelockanalysis(cfg, data); >> >> cfg=[]; >> cfg.method='lcmv'; >> cfg.grid=lf; >> cfg.vol=hdm; >> cfg.lcmv.keepfilter='yes'; >> cfg.lcmv.fixedori= 'yes'; >> cfg.lcmv.lambda= '10%'; %0% rank deficient data-use stronger regularization?? >> lcmv_avg=ft_sourceanalysis(cfg, avg_data); >> >> >> Best, >> >> Luca >> >> >> Gesendet: Montag, 20. August 2018 um 15:10 Uhr >> Von: "Matti Stenroos" >> An: "Luca Kaiser" >> Betreff: Re: [FieldTrip] Set regularization parameter after SSS >> Dear Luca, >> >> I think you'd need to tell a bit more, as the meaning of "lambda" >> depends on the algorithm you are using. Also "the covariance matrix" is >> not uniquely defined --- are you talking about noise covariance or >> measurement covariance? >> >> In general, the eigenvalue idea you had read does not make sense --- the >> eigenvalue text deals with condition numbers, while lambda does, in >> general, not relate directly to that. The advice might have been that >> "set lambda so that the ratio of largest and smallest eigenvalues is >> 1000"... >> >> Cheers, >> Matti >> also working with low-rankingMax-filtered MEG and coincidentally >> having a lot of covariance metrics on screen at the moment >> >> >> >> On 2018-08-20 15:39, Luca Kaiser wrote: >>> Dear FieldTrip community, >>> I am using ft_sourceanalysis on SSS preprocessed (neuromag) data. I >>> wonder if there are any suggestions on how to set lambda in this case? >>> My covariance matrix is rank deficient (rank 60, 306 sensors). I read in >>> the mailing list that I would need to look at the eigenvalues of XX' and >>> set lambda to be 1/1000 of the largest eigenvalue. However, I do not >>> really understand why to divide by 1/1000? >>> Every help would be very much appreciated, >>> Thanks! >>> Luca >>> >>> >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> https://doi.org/10.1371/journal.pcbi.1002202 >>> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 >> >> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 From thomas.hartmann at th-ht.de Tue Aug 21 15:18:05 2018 From: thomas.hartmann at th-ht.de (Thomas Hartmann) Date: Tue, 21 Aug 2018 15:18:05 +0200 Subject: [FieldTrip] question on coil orientations for elekta systems In-Reply-To: <5C9F995D-1ABA-4CC6-BD6A-FA59DDC62B66@donders.ru.nl> References: <7aa1613b-a175-6ed6-0b7e-18b38ecc7fdd@th-ht.de> <5C9F995D-1ABA-4CC6-BD6A-FA59DDC62B66@donders.ru.nl> Message-ID: <6be63097-4464-b610-9778-e625669c87e2@th-ht.de> dear jan-mathijs, that is indeed the case. thanks for the quick reply! best wishes, thomas Am 21.08.18 um 11:11 schrieb Schoffelen, J.M. (Jan Mathijs): > Dear Thomas, > > I would guess that the 3x3 ‘rotation’ part of the affine > transformation matrix here describes the direction plane of the sensor > in the first two columns (x/y axis), and the normal to this plane in > the third column, which is the vector perpendicular to the coil. Try > and verify whether the cross-product between the first two columns > gives the the third. > > Best wishes, > > Jan-Mathijs > >> On 21 Aug 2018, at 10:24, Thomas Hartmann > > wrote: >> >> hi, >> >> while diving into the import code for elekta systems, i noticed that >> coil orientations are imported like this: >> >> t = orig.chs(n).coil_trans; >> >> grad.coilpos(kCoil,:) = t(1:3,4)+0.0003*t(1:3,3); >> grad.coilori(kCoil,:) = t(1:3,3); >> >> (full code is here: >> https://github.com/fieldtrip/fieldtrip/blob/master/fileio/private/mne2grad.m#L321) >> >> t (or coil_trans) is a 4x4 matrix, that if i understood it correctly, >> is a 3x3 rotation matrix combined with xyz coordinates in the last >> column. >> >> if i understand everything correctly, coilori is supposed to store a >> unit vector pointing in the direction of the coil's orientation. >> >> so, why is this the third column? >> >> thanks a lot in advance! >> >> thomas >> >> -- >> Dr. Thomas Hartmann >> >> Centre for Cognitive Neuroscience >> FB Psychologie >> Universität Salzburg >> Hellbrunnerstraße 34/II >> 5020 Salzburg >> >> Tel: +43 662 8044 5109 >> Email:thomas.hartmann at th-ht.de >> >> "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 -- Dr. Thomas Hartmann Centre for Cognitive Neuroscience FB Psychologie Universität Salzburg Hellbrunnerstraße 34/II 5020 Salzburg Tel: +43 662 8044 5109 Email: thomas.hartmann at th-ht.de "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Aug 21 15:38:23 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 21 Aug 2018 13:38:23 +0000 Subject: [FieldTrip] Set regularization parameter after SSS In-Reply-To: <9e38e3c7-ec00-270a-fcbb-b0517a6da284@aalto.fi> References: <20180809092625.Horde.vNTP0Ql8KWDcjGljoaVQMZU@home.staff.uni-marburg.de> <9e38e3c7-ec00-270a-fcbb-b0517a6da284@aalto.fi> Message-ID: Dear Matti et al., Matti, in relating to your original point, where you state something about the beamformer algorithms (lcmv/possibly dics) in FT: in addition to Robert and Vladimir’s comments, and you might already have seen this, the somewhat obscure optional input argument to beamformer_lcmv/beamformer_dics, called ‘subspace’ (containing an MxNsensor projection matrix), can be used to generically project the data (as well as the forward operator) to a subspace (e.g.: prewhitened subspace, truncated SVD, diagonal weighting matrix as per the sensor type). It’s not documented well, nor is it applied automatically. But if you want, you can do it :). Best , JM > On 21 Aug 2018, at 15:16, Matti Stenroos wrote: > > Hi Vladimir, Robert, > > Thanks for your input! > > I've been playing with linear estimates & SSS-processed data. Based on my experience, I agree with Vladimir that dropping the rank to 60--70 (depending on the number of max filter coeffs etc) is the way to go. If whitening (via noise covariance matrix) is used, some regularization to the whitener is probably appropriate. > > I don't have strong opinion regarding "only gradiometers" or "gradio+magneto". I'd say there is no general answer; rather it depends on what kind on inverse method you apply = how you use your data there. In resolution analysis of minimum-norm estimates, the difference is small. > > Data fusing = sensor scaling should not be that difficult; pre-weighting the data with 1/sqrt(mvars), where mvars has mean noise/data variances per sensotype. But, as the Max reconstructs all data using the same multipole series with ~64 components, rank will not really increase --- if there has been 64 max filter components, useful ranks of magnetometers, gradiometers, and the whole MEG are of the order of 60--64. > > Cheers, > Matti > > > On 2018-08-21 15:02, Vladimir Litvak wrote: >> Hi Luca and Matti, >> We have recently looked into beamforming on Elekta with several >> methods people including Robert and Alex Gramfort. One thing we >> discovered is that beamforming can completely fail when small >> regularisation (like 1% or 5% which most people use) is applied to >> data after SSS. The theoretical underpinning for this has not been >> figured out yet, but in practice, the more robust thing to do is to >> reduce the data dimensionality and set lambda to zero. I attach an >> example developed for the phantom data we got from Aston MEG that >> shows how this can be done in FT. If you want, I can share the phantom >> example with you so that you can verify that this approach works. >> Regarding sensor type fusion, I would suggest that you only limit your >> analysis to one sensor type. Most Neuromag people use the planar >> gradiometers. The reason for this suggestion is that after SSS, >> channels of both types are linear combinations of the same basis >> vectors and contain redundant information so trying to fuse them is >> more a headache than anything else. There is a paper saying this in >> more detail http://www.mdpi.com/1424-8220/17/12/2926/html >> Best, >> Vladimir >> On Mon, Aug 20, 2018 at 2:35 PM Luca Kaiser wrote: >>> >>> Hi Matti, >>> >>> sure-sorry and thanks for your quick reply. So here is what I am doing using the average covariance matrix (so data covariance). >>> >>> cfg=[]; >>> cfg.covariance='yes'; >>> cfg.channel=data.label; >>> avg_data=ft_timelockanalysis(cfg, data); >>> >>> cfg=[]; >>> cfg.method='lcmv'; >>> cfg.grid=lf; >>> cfg.vol=hdm; >>> cfg.lcmv.keepfilter='yes'; >>> cfg.lcmv.fixedori= 'yes'; >>> cfg.lcmv.lambda= '10%'; %0% rank deficient data-use stronger regularization?? >>> lcmv_avg=ft_sourceanalysis(cfg, avg_data); >>> >>> >>> Best, >>> >>> Luca >>> >>> >>> Gesendet: Montag, 20. August 2018 um 15:10 Uhr >>> Von: "Matti Stenroos" >>> An: "Luca Kaiser" >>> Betreff: Re: [FieldTrip] Set regularization parameter after SSS >>> Dear Luca, >>> >>> I think you'd need to tell a bit more, as the meaning of "lambda" >>> depends on the algorithm you are using. Also "the covariance matrix" is >>> not uniquely defined --- are you talking about noise covariance or >>> measurement covariance? >>> >>> In general, the eigenvalue idea you had read does not make sense --- the >>> eigenvalue text deals with condition numbers, while lambda does, in >>> general, not relate directly to that. The advice might have been that >>> "set lambda so that the ratio of largest and smallest eigenvalues is >>> 1000"... >>> >>> Cheers, >>> Matti >>> also working with low-rankingMax-filtered MEG and coincidentally >>> having a lot of covariance metrics on screen at the moment >>> >>> >>> >>> On 2018-08-20 15:39, Luca Kaiser wrote: >>>> Dear FieldTrip community, >>>> I am using ft_sourceanalysis on SSS preprocessed (neuromag) data. I >>>> wonder if there are any suggestions on how to set lambda in this case? >>>> My covariance matrix is rank deficient (rank 60, 306 sensors). I read in >>>> the mailing list that I would need to look at the eigenvalues of XX' and >>>> set lambda to be 1/1000 of the largest eigenvalue. However, I do not >>>> really understand why to divide by 1/1000? >>>> Every help would be very much appreciated, >>>> Thanks! >>>> Luca >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> https://doi.org/10.1371/journal.pcbi.1002202 >>>> >>> _______________________________________________ >>> fieldtrip mailing list >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> https://doi.org/10.1371/journal.pcbi.1002202 >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> https://doi.org/10.1371/journal.pcbi.1002202 > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From litvak.vladimir at gmail.com Tue Aug 21 15:47:14 2018 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Tue, 21 Aug 2018 14:47:14 +0100 Subject: [FieldTrip] Set regularization parameter after SSS In-Reply-To: <9e38e3c7-ec00-270a-fcbb-b0517a6da284@aalto.fi> References: <20180809092625.Horde.vNTP0Ql8KWDcjGljoaVQMZU@home.staff.uni-marburg.de> <9e38e3c7-ec00-270a-fcbb-b0517a6da284@aalto.fi> Message-ID: I usually reduce the rank to 50 just to be safe. Although in theory, the rank should be 80 with the default settings (if I'm not mistaken), in practice the data are not full rank and there are will be many SVD components with small eigenvalues. Maybe 50 is an overkill but seems to work OK in practice. Vladimir On Tue, Aug 21, 2018 at 2:35 PM Matti Stenroos wrote: > > Hi Vladimir, Robert, > > Thanks for your input! > > I've been playing with linear estimates & SSS-processed data. Based on > my experience, I agree with Vladimir that dropping the rank to 60--70 > (depending on the number of max filter coeffs etc) is the way to go. If > whitening (via noise covariance matrix) is used, some regularization to > the whitener is probably appropriate. > > I don't have strong opinion regarding "only gradiometers" or > "gradio+magneto". I'd say there is no general answer; rather it depends > on what kind on inverse method you apply = how you use your data there. > In resolution analysis of minimum-norm estimates, the difference is small. > > Data fusing = sensor scaling should not be that difficult; pre-weighting > the data with 1/sqrt(mvars), where mvars has mean noise/data variances > per sensotype. But, as the Max reconstructs all data using the same > multipole series with ~64 components, rank will not really increase --- > if there has been 64 max filter components, useful ranks of > magnetometers, gradiometers, and the whole MEG are of the order of 60--64. > > Cheers, > Matti > > > On 2018-08-21 15:02, Vladimir Litvak wrote: > > Hi Luca and Matti, > > > > We have recently looked into beamforming on Elekta with several > > methods people including Robert and Alex Gramfort. One thing we > > discovered is that beamforming can completely fail when small > > regularisation (like 1% or 5% which most people use) is applied to > > data after SSS. The theoretical underpinning for this has not been > > figured out yet, but in practice, the more robust thing to do is to > > reduce the data dimensionality and set lambda to zero. I attach an > > example developed for the phantom data we got from Aston MEG that > > shows how this can be done in FT. If you want, I can share the phantom > > example with you so that you can verify that this approach works. > > > > Regarding sensor type fusion, I would suggest that you only limit your > > analysis to one sensor type. Most Neuromag people use the planar > > gradiometers. The reason for this suggestion is that after SSS, > > channels of both types are linear combinations of the same basis > > vectors and contain redundant information so trying to fuse them is > > more a headache than anything else. There is a paper saying this in > > more detail http://www.mdpi.com/1424-8220/17/12/2926/html > > > > Best, > > > > Vladimir > > > > On Mon, Aug 20, 2018 at 2:35 PM Luca Kaiser wrote: > >> > >> Hi Matti, > >> > >> sure-sorry and thanks for your quick reply. So here is what I am doing using the average covariance matrix (so data covariance). > >> > >> cfg=[]; > >> cfg.covariance='yes'; > >> cfg.channel=data.label; > >> avg_data=ft_timelockanalysis(cfg, data); > >> > >> cfg=[]; > >> cfg.method='lcmv'; > >> cfg.grid=lf; > >> cfg.vol=hdm; > >> cfg.lcmv.keepfilter='yes'; > >> cfg.lcmv.fixedori= 'yes'; > >> cfg.lcmv.lambda= '10%'; %0% rank deficient data-use stronger regularization?? > >> lcmv_avg=ft_sourceanalysis(cfg, avg_data); > >> > >> > >> Best, > >> > >> Luca > >> > >> > >> Gesendet: Montag, 20. August 2018 um 15:10 Uhr > >> Von: "Matti Stenroos" > >> An: "Luca Kaiser" > >> Betreff: Re: [FieldTrip] Set regularization parameter after SSS > >> Dear Luca, > >> > >> I think you'd need to tell a bit more, as the meaning of "lambda" > >> depends on the algorithm you are using. Also "the covariance matrix" is > >> not uniquely defined --- are you talking about noise covariance or > >> measurement covariance? > >> > >> In general, the eigenvalue idea you had read does not make sense --- the > >> eigenvalue text deals with condition numbers, while lambda does, in > >> general, not relate directly to that. The advice might have been that > >> "set lambda so that the ratio of largest and smallest eigenvalues is > >> 1000"... > >> > >> Cheers, > >> Matti > >> also working with low-rankingMax-filtered MEG and coincidentally > >> having a lot of covariance metrics on screen at the moment > >> > >> > >> > >> On 2018-08-20 15:39, Luca Kaiser wrote: > >>> Dear FieldTrip community, > >>> I am using ft_sourceanalysis on SSS preprocessed (neuromag) data. I > >>> wonder if there are any suggestions on how to set lambda in this case? > >>> My covariance matrix is rank deficient (rank 60, 306 sensors). I read in > >>> the mailing list that I would need to look at the eigenvalues of XX' and > >>> set lambda to be 1/1000 of the largest eigenvalue. However, I do not > >>> really understand why to divide by 1/1000? > >>> Every help would be very much appreciated, > >>> Thanks! > >>> Luca > >>> > >>> > >>> > >>> > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >>> https://doi.org/10.1371/journal.pcbi.1002202 > >>> > >> _______________________________________________ > >> fieldtrip mailing list > >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> https://doi.org/10.1371/journal.pcbi.1002202 > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> https://doi.org/10.1371/journal.pcbi.1002202 > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From athierfelder at tuebingen.mpg.de Tue Aug 21 18:21:00 2018 From: athierfelder at tuebingen.mpg.de (Annika Thierfelder) Date: Tue, 21 Aug 2018 18:21:00 +0200 Subject: [FieldTrip] Electrode alignment to standard MRI template Message-ID: Hello everyone, I started using fieldtrip last week to do EEG source analysis and I experienced some issues when trying to align the EEG to the MRI. Since we don't have MRI scans for our subjects, I used the standard_mri from the template folder. The solution that works "best" until now is to align the electrodes with the MRI fiducials and compute the BEM from the MRI seperately (I used bemcp for that since I work on windows, so dipoli doesn't run). However, when I plot the aligned electrodes together with the BEM head surface, the electrodes are in the correct orientation but they have an offset along the z-axis. I put the code I used below and uploaded the picture of the electrodes and the head model on google drive: https://drive.google.com/open?id=1b7Q3YGWGyzaa5oXeE-PfOOHNIDoFaLO1 There are two things I'm wondering about now: Why are the nasion head coordinates in the MRI template [1, 0, 0] and not [100, 0, 0], which would make more sense (at least in my opinion) since the units are in mm and I thought the nasion is not supposed to be inside the head? The LPA and RPA values are [0, 83, 0] and [0, -117, 0] respectively, which seems perfectly fine to me. I have the feeling that the problem arises because the two coordinate systems of the data do not have the same origin. Can I shift the coordinate system of the electrode space before aligning them? I only found ways how to change the coordinate system of the MRI. I also tried to change the MRI coordinate system first before aligning the electrodes, but I found that I cannot create the BEM model with 'bemcp' anymore. It seems to throw an error if I give it an MRI with any coordinate system that is not 'spm'. So I kind of have the feeling that I need to get the electrodes into the 'spm' coordinates to match the MRI and BEM head. Thank you a lot in advance for your support! Annika PS: I know there has been a similar problem once in this mailing list, but I checked the suggestions and they did not work for me, also it seemed as if in the end it came down to fitting the electrodes manually there, and I suppose there can be another solution for this. ================================================================================== Code for the electrode alignment: %This is my how my electrode data looks like: disp(chanlocs_124)       label: {124×1 cell}     elecpos: [124×3 double]        unit: 'mm' % get fiducials from the MRI template vox_Nas = mri_spm.hdr.fiducial.mri.nas; vox_Lpa = mri_spm.hdr.fiducial.mri.lpa; vox_Rpa = mri_spm.hdr.fiducial.mri.rpa; % I know I can skip this step because I can directly use the head-coordinates given in the MRI template % I kept it because it doesn't make a difference vox2head = mri_spm.hdr.transformMRI2Head; head_Nas = ft_warp_apply(vox2head, vox_Nas, 'homogeneous'); % nasion head_Lpa = ft_warp_apply(vox2head, vox_Lpa, 'homogeneous'); % Left preauricular head_Rpa = ft_warp_apply(vox2head, vox_Rpa, 'homogeneous'); % Right preauricular % save the MRI fiducials as target structure for the realignment % in our data set, the LPA is named TTP9 and the RPA is TTP10, so I renamed them elec_mri.elecpos(1,:) = head_Nas; elec_mri.elecpos(2,:) = head_Lpa; elec_mri.elecpos(3,:) = head_Rpa; elec_mri.label = {'Nz', 'TTP9', 'TTP10'}; elec_mri.unit  = 'mm'; % coregister the electrodes to the MRI using fiducials cfg = []; cfg.method   = 'fiducial'; cfg.target   = elec_mri; cfg.elec     = chanlocs_124; cfg.fiducial = {'Nz', 'TTP9', 'TTP10'}; chanlocs_124_spm = ft_electroderealign(cfg); =================================================================================================== Just in case this is also of interest, this is how I compute the BEM headmodel from the same MRI template: % segments the MRI into three different tissue parts % creates binary masks for each point and tissue part cfg = []; cfg.output    = {'brain','skull','scalp'}; segmented_mri  = ft_volumesegment(cfg, mri_spm); %% create mesh with different tissues cfg=[]; cfg.tissue={'brain','skull','scalp'}; cfg.numvertices = [3000 2000 1000]; bnd=ft_prepare_mesh(cfg,segmented_mri); % compute headmodel cfg        = []; cfg.tissue={'brain','skull','scalp'}; cfg.method ='bemcp'; vol        = ft_prepare_headmodel(cfg, bnd); From gabriel.delara at med.uni-goettingen.de Wed Aug 22 14:05:29 2018 From: gabriel.delara at med.uni-goettingen.de (Amador, Gabriel) Date: Wed, 22 Aug 2018 12:05:29 +0000 Subject: [FieldTrip] Statistics in resting-state dataset Message-ID: Hello FT´s I have a 5 minutes resting-state scalp EEG dataset, where the continuous data where epoched in 2s segments with 50% overlap. I am interested in comparing pre and post-intervention recordings, and going up to 80 Hz. I set a fixed smoothing parameter as cfg.tapsmofrq = 1;... Since I am interested in the spectral aspects but not the temporal, i ran the mtmfft with multitapers for all the frequencies. Is it reasonable? Or should I apply hanning up to 30Hz, and multitapers with varying lengths to the 30-80 Hz range? Best, Gabriel Amador de Lara wissenschaftlicher Mitarbeiter / PhD candidate Klinik für klinische Neurophysiologie / Department of Clinical Neurophysiology Universitätsmedizin / Medical Center Georg-August-Universität Göttingen Robert-Koch-Str. 40, 37075 +49 0551 3919265 -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Wed Aug 22 15:54:09 2018 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Wed, 22 Aug 2018 13:54:09 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 93, Issue 18 In-Reply-To: References: Message-ID: Dear Eelke and others, "Would it not be fair to say that the null hypothesis here is that the expected value of our data equals zero?” This question can be answered by “Yes” if one can produce a proof of the false alarm rate control of this “one-sample randomisation test” under the null hypothesis that you mention. I welcome the results of all successful attempts to this challenge. You do not have to produce the proof yourself, a reference to a descent peer-reviewed publication (e.g., a statistics journal) is also OK. best, Eric From: Eelke Spaak > Subject: Re: [FieldTrip] One-sample cluster based permutation t-test ERP data Date: 21 August 2018 at 09:53:14 CEST To: FieldTrip discussion list > Dear Eric and all, Following up on your point (1), I've wondered in the past about the one-sample randomization test (let's call it that to avoid the name "permutation"). Would it not be fair to say that the null hypothesis here is that the expected value of our data equals zero? Cheers, Eelke On 19 August 2018 at 23:57, Maris, E.G.G. (Eric) > wrote: Dear FT-ers, The one-sample statistical test continues to be an issue that raises confusion. Although it is impossible to explain here the statistical background in all detail, the following points are relevant for empirical neuroscientists that apply cluster-based permutation tests to their data: 1. A permutation test can only be used for comparing two or more experimental conditions. Thus, Stephen’s proposal is not a permutation test. However, it does produce a p-value, and by comparing it with some nominal value (e.g., 0.05) it can be used to take a decision. The problem with this procedure is that it is unclear what is the null hypothesis to which this decision pertains. Here lies the important difference with a permutation test for the difference between two experimental conditions: tthe null hypothesis involves that the biological data in the two conditions are generated by the same probability distribution. 2. Comparing the activation (post-stimulus) with the baseline (pre-stimulus) period can be performed using a permutation test, regardless whether the raw data were transformed into a time-frequency representation or not. The reason why some people think it cannot be used on the raw data (i.e., for testing effects on the time-locked average) is that the baseline period is typically used to normalize the activation period (by removing the DC component). With this normalisation, the null hypothesis pertains to two sets of biological data of which one (the activation data) is already a function of the other (as a result of the normalisation procedure). If you want to use the actvsblT statfun, It makes more sense to perform a high-pass filter on the raw data rather than normalising the activation data using the baseline data. best, Eric Maris 1. Re: One-sample cluster based permutation t-test ERP data (Stephen Politzer-Ahles) From: Stephen Politzer-Ahles > Subject: Re: [FieldTrip] One-sample cluster based permutation t-test ERP data Date: 19 August 2018 at 10:36:09 CEST To: > I'm not sure if there is or not, but in the past I have managed this by creating an ERP dataset that is all zeroes, and then comparing my real dataset to it with a cluster test. Since a one-sample test is the same as a paired samples test between something and zero (e.g., comparing X and Y via t-test is the same as comparing {X-Y} to zero), this should give the same result. --- Stephen Politzer-Ahles The Hong Kong Polytechnic University Department of Chinese and Bilingual Studies http://www.mypolyuweb.hk/~sjpolit/ ---------------------------------------------------------------------- Message: 1 Date: Fri, 17 Aug 2018 16:01:29 +0000 From: Alex Sel > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] One-sample cluster based permutation t-test ERP data Message-ID: <47637187-A1A5-4040-8917-F04C501E65CF at psy.ox.ac.uk> Content-Type: text/plain; charset="utf-8" Dear list, I wonder if there has been a function developed to do a one-sample cluster based permutation t-test ERP data. I am aware this is possible to do with actvsblT for time-frequency data. There is a forum thread from 2012 saying that this wasn’t implemented. But I wonder if there is anyone there who might have resolve this issue and wouldn’t mind sharing the solution. Any help would be appreciated. Best wishes, Alex Sel, PhD Associate Fellow of the Higher Education Academy Wellcome Centre for Integrative Neuroimaging Department of Experimental Psychology University of Oxford The Tinsley Building OX1 3SR Eric Maris | Donders Institute for Brain, Cognition, and Behaviour & Faculty of Social Sciences | Radboud University | PO Box 9104, 6500 HE Nijmegen | (024) 3612651 | www.ru.nl This message (and any attachments) is intended solely for the addressee(s) and may contain confidential information. If you are not the addressee, do not copy this message (and any attachments), forward or share this message with third parties. You are requested to notify the sender immediately and delete this message. -------------- next part -------------- An HTML attachment was scrubbed... URL: From athierfelder at tuebingen.mpg.de Thu Aug 23 11:06:04 2018 From: athierfelder at tuebingen.mpg.de (Annika Thierfelder) Date: Thu, 23 Aug 2018 11:06:04 +0200 Subject: [FieldTrip] Electrode alignment to standard MRI template In-Reply-To: References: Message-ID: <19c51cab-6da5-e02b-e704-9cf6a75a28c9@tuebingen.mpg.de> Hello everyone, short update on my question, that is maybe easier to answer without going through the code itself. I believe that the heart of the problem lies (of course) in the coordinate definitions of the electrodes and the MRI. So, I experimented a little with the example electrode set that is aligned to the standard BEM model that results from the standard MRI. If I try to align the example electrodes to the MRI (which is not necessary but it also should not hurt), I discovered that I get the same shift into the z-direction for the example electrodes. So, the basic question underlying my problem would be: How can the MRI and the eletrodes be aligned if their fiducials are so different, they even seem to be in different coordinate systems? Shouldn't they be kind of similar if they are aligned? I did not see any further coordinate transformation in the BEM computation from the MRI (except for the conversion into 'acpc' in ft_volumesegment which doesn't change anything) that would explain the alignment later on. MRI fiducials: NAS [1, 0, 0] LPA [0, 83, 0] RPA [0, -117, 0] template electrode fiducials are roughly: NAS [0, 87, -40] LPA [-86, -20, -48] RPA [86, -20, -48] Also, the MRI is supposed to be in MNI coordinates, which I don't understand why, because already the first dimension doesn't point to the right. I feel like understanding why the coordinates are this way would be a crucial step to solve my problem. I'm very thankful for any help on this problem. If I understand this, I hopefully can figure out the rest myself. Best regards, Annika On 8/21/2018 6:21 PM, Annika Thierfelder wrote: > Hello everyone, > > I started using fieldtrip last week to do EEG source analysis and I > experienced some issues when trying to align the EEG to the MRI. Since > we don't have MRI scans for our subjects, I used the standard_mri from > the template folder. > > The solution that works "best" until now is to align the electrodes > with the MRI fiducials and compute the BEM from the MRI seperately (I > used bemcp for that since I work on windows, so dipoli doesn't run). > However, when I plot the aligned electrodes together with the BEM head > surface, the electrodes are in the correct orientation but they have > an offset along the z-axis. I put the code I used below and uploaded > the picture of the electrodes and the head model on google drive: > https://drive.google.com/open?id=1b7Q3YGWGyzaa5oXeE-PfOOHNIDoFaLO1 > > There are two things I'm wondering about now: > > Why are the nasion head coordinates in the MRI template [1, 0, 0] and > not [100, 0, 0], which would make more sense (at least in my opinion) > since the units are in mm and I thought the nasion is not supposed to > be inside the head? The LPA and RPA values are [0, 83, 0] and [0, > -117, 0] respectively, which seems perfectly fine to me. > > I have the feeling that the problem arises because the two coordinate > systems of the data do not have the same origin. Can I shift the > coordinate system of the electrode space before aligning them? I only > found ways how to change the coordinate system of the MRI. I also > tried to change the MRI coordinate system first before aligning the > electrodes, but I found that I cannot create the BEM model with > 'bemcp' anymore. It seems to throw an error if I give it an MRI with > any coordinate system that is not 'spm'. So I kind of have the feeling > that I need to get the electrodes into the 'spm' coordinates to match > the MRI and BEM head. > > Thank you a lot in advance for your support! > > Annika > > PS: I know there has been a similar problem once in this mailing list, > but I checked the suggestions and they did not work for me, also it > seemed as if in the end it came down to fitting the electrodes > manually there, and I suppose there can be another solution for this. > > ================================================================================== > > > Code for the electrode alignment: > > %This is my how my electrode data looks like: > disp(chanlocs_124) >       label: {124×1 cell} >     elecpos: [124×3 double] >        unit: 'mm' > > % get fiducials from the MRI template > vox_Nas = mri_spm.hdr.fiducial.mri.nas; > vox_Lpa = mri_spm.hdr.fiducial.mri.lpa; > vox_Rpa = mri_spm.hdr.fiducial.mri.rpa; > > % I know I can skip this step because I can directly use the > head-coordinates given in the MRI template > % I kept it because it doesn't make a difference > vox2head = mri_spm.hdr.transformMRI2Head; > head_Nas = ft_warp_apply(vox2head, vox_Nas, 'homogeneous'); % nasion > head_Lpa = ft_warp_apply(vox2head, vox_Lpa, 'homogeneous'); % Left > preauricular > head_Rpa = ft_warp_apply(vox2head, vox_Rpa, 'homogeneous'); % Right > preauricular > > % save the MRI fiducials as target structure for the realignment > % in our data set, the LPA is named TTP9 and the RPA is TTP10, so I > renamed them > elec_mri.elecpos(1,:) = head_Nas; > elec_mri.elecpos(2,:) = head_Lpa; > elec_mri.elecpos(3,:) = head_Rpa; > elec_mri.label = {'Nz', 'TTP9', 'TTP10'}; > elec_mri.unit  = 'mm'; > > % coregister the electrodes to the MRI using fiducials > cfg = []; > cfg.method   = 'fiducial'; > cfg.target   = elec_mri; > cfg.elec     = chanlocs_124; > cfg.fiducial = {'Nz', 'TTP9', 'TTP10'}; > chanlocs_124_spm = ft_electroderealign(cfg); > > =================================================================================================== > > Just in case this is also of interest, this is how I compute the BEM > headmodel from the same MRI template: > > % segments the MRI into three different tissue parts > % creates binary masks for each point and tissue part > cfg = []; > cfg.output    = {'brain','skull','scalp'}; > segmented_mri  = ft_volumesegment(cfg, mri_spm); > > %% create mesh with different tissues > cfg=[]; > cfg.tissue={'brain','skull','scalp'}; > cfg.numvertices = [3000 2000 1000]; > bnd=ft_prepare_mesh(cfg,segmented_mri); > > % compute headmodel > cfg        = []; > cfg.tissue={'brain','skull','scalp'}; > cfg.method ='bemcp'; > vol        = ft_prepare_headmodel(cfg, bnd); > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From jan.schoffelen at donders.ru.nl Thu Aug 23 14:57:16 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 23 Aug 2018 12:57:16 +0000 Subject: [FieldTrip] Electrode alignment to standard MRI template In-Reply-To: <19c51cab-6da5-e02b-e704-9cf6a75a28c9@tuebingen.mpg.de> References: <19c51cab-6da5-e02b-e704-9cf6a75a28c9@tuebingen.mpg.de> Message-ID: <012859F5-86EF-4918-B242-D83ACE9CF8B6@donders.ru.nl> Dear Annika, It’s a bit unfortunate that you ended up using the low-level information in the mri.hdr.fiducial field (in combination with the transformation matrices). I agree with you that the values are strange, and I am pretty sure that they do not correspond with the volumetric image in the same data structure. Note that the mri itself also has a ‘transform’ field, which provides you with the mapping between voxels and head space (MNI-convention, ACPC-based RAS). If you aim for a 3-point (nas,lpa,rpa) based coregistration between your electrodes and the templates needed for source reconstruction, you could use the set of fiducial positions that can be found in fieldtrip/electrode/standard1005.elc. (an alternative and possibly better coregistration could be achieved using a non-linear matching with the ‘template’ method, but that might be a story of its own). If you do: >> sens=ft_read_sens('standard_1005.elc'); >> sens.chanpos(1:3,:) ans = -86.0761 -19.9897 -47.9860 85.7939 -20.0093 -48.0310 0.0083 86.8110 -39.9830 (note that this very nicely corresponds with the template fiducials you reported in your e-mail) >> sens.label(1:3) ans = 'LPA' 'RPA' ‘Nz' you can verify that these three fiducials are expressed in head coordinates according to the ‘spm’ convention, i.e. Anterior Commissure is origin, the line through AC and PC is the y-axis, x-axis pointing to the right etc). This verification can be done with >>load(‘standard_mri’);, >>cfg = []; >>cfg.location = sens.chanpos(1,:); >>figure;ft_sourceplot(cfg, mri); Now, if your electrodes' coordinate system is the same as the anatomical mri’s, then you can proceed to ft_electroderealign. Yet, your electrodes’ coordinate system is different, because you report that you’d expect the nasion to be [100 0 0], i.e. the x-axis to go exactly through the nasion, and the positive y-axis pointing to the left. This is then an ALS-based coordinate system with the origin somewhere between the ears (the exact definition depends on whether you are using the convention that e.g. CTF uses, as compared to the ASA coordinate system: see ‘help ft_headcoordinates’ and the fieldtrip wiki’s faq about coordinate systems). Now, if you need to get your electrodes expressed in the coordinate system that is the same as the one in which the headmodel is specified (called ‘spm’, or ‘acpc’), then you can do the following: T = ft_headcoordinates(sens.chanpos(3,:),sens.chanpos(1,:),sens.chanpos(2,:),’ctf’); % or ‘asa' This gives you a transformation matrix that maps from the space in which the ‘fiducials’ are expressed (in this case: spm) to a ctf/asa-based coordinate system. This you can verify with ft_warp_apply(T, sens.chanpos(1:3,:));, which will give you the fiducials’ coordinates with values close to 0, on 2 out of three values. Then, the inv(T) is transforming from the ctf/asa-based coordinate system into spm’s convention, so you can do: chanlocs_124_transformed = ft_transform_geometry(inv(T), chanlocs_124); I think that this already should get you close to where you want to end up. And yes, coordinate systems are always complicated. Good luck, Jan-Mathijs PS: I have removed the hdr-fields from standard_mri and standard_seg in the release version of the code, to avoid any future confusion. On 23 Aug 2018, at 11:06, Annika Thierfelder > wrote: Hello everyone, short update on my question, that is maybe easier to answer without going through the code itself. I believe that the heart of the problem lies (of course) in the coordinate definitions of the electrodes and the MRI. So, I experimented a little with the example electrode set that is aligned to the standard BEM model that results from the standard MRI. If I try to align the example electrodes to the MRI (which is not necessary but it also should not hurt), I discovered that I get the same shift into the z-direction for the example electrodes. So, the basic question underlying my problem would be: How can the MRI and the eletrodes be aligned if their fiducials are so different, they even seem to be in different coordinate systems? Shouldn't they be kind of similar if they are aligned? I did not see any further coordinate transformation in the BEM computation from the MRI (except for the conversion into 'acpc' in ft_volumesegment which doesn't change anything) that would explain the alignment later on. MRI fiducials: NAS [1, 0, 0] LPA [0, 83, 0] RPA [0, -117, 0] template electrode fiducials are roughly: NAS [0, 87, -40] LPA [-86, -20, -48] RPA [86, -20, -48] Also, the MRI is supposed to be in MNI coordinates, which I don't understand why, because already the first dimension doesn't point to the right. I feel like understanding why the coordinates are this way would be a crucial step to solve my problem. I'm very thankful for any help on this problem. If I understand this, I hopefully can figure out the rest myself. Best regards, Annika On 8/21/2018 6:21 PM, Annika Thierfelder wrote: Hello everyone, I started using fieldtrip last week to do EEG source analysis and I experienced some issues when trying to align the EEG to the MRI. Since we don't have MRI scans for our subjects, I used the standard_mri from the template folder. The solution that works "best" until now is to align the electrodes with the MRI fiducials and compute the BEM from the MRI seperately (I used bemcp for that since I work on windows, so dipoli doesn't run). However, when I plot the aligned electrodes together with the BEM head surface, the electrodes are in the correct orientation but they have an offset along the z-axis. I put the code I used below and uploaded the picture of the electrodes and the head model on google drive: https://drive.google.com/open?id=1b7Q3YGWGyzaa5oXeE-PfOOHNIDoFaLO1 There are two things I'm wondering about now: Why are the nasion head coordinates in the MRI template [1, 0, 0] and not [100, 0, 0], which would make more sense (at least in my opinion) since the units are in mm and I thought the nasion is not supposed to be inside the head? The LPA and RPA values are [0, 83, 0] and [0, -117, 0] respectively, which seems perfectly fine to me. I have the feeling that the problem arises because the two coordinate systems of the data do not have the same origin. Can I shift the coordinate system of the electrode space before aligning them? I only found ways how to change the coordinate system of the MRI. I also tried to change the MRI coordinate system first before aligning the electrodes, but I found that I cannot create the BEM model with 'bemcp' anymore. It seems to throw an error if I give it an MRI with any coordinate system that is not 'spm'. So I kind of have the feeling that I need to get the electrodes into the 'spm' coordinates to match the MRI and BEM head. Thank you a lot in advance for your support! Annika PS: I know there has been a similar problem once in this mailing list, but I checked the suggestions and they did not work for me, also it seemed as if in the end it came down to fitting the electrodes manually there, and I suppose there can be another solution for this. ================================================================================== Code for the electrode alignment: %This is my how my electrode data looks like: disp(chanlocs_124) label: {124×1 cell} elecpos: [124×3 double] unit: 'mm' % get fiducials from the MRI template vox_Nas = mri_spm.hdr.fiducial.mri.nas; vox_Lpa = mri_spm.hdr.fiducial.mri.lpa; vox_Rpa = mri_spm.hdr.fiducial.mri.rpa; % I know I can skip this step because I can directly use the head-coordinates given in the MRI template % I kept it because it doesn't make a difference vox2head = mri_spm.hdr.transformMRI2Head; head_Nas = ft_warp_apply(vox2head, vox_Nas, 'homogeneous'); % nasion head_Lpa = ft_warp_apply(vox2head, vox_Lpa, 'homogeneous'); % Left preauricular head_Rpa = ft_warp_apply(vox2head, vox_Rpa, 'homogeneous'); % Right preauricular % save the MRI fiducials as target structure for the realignment % in our data set, the LPA is named TTP9 and the RPA is TTP10, so I renamed them elec_mri.elecpos(1,:) = head_Nas; elec_mri.elecpos(2,:) = head_Lpa; elec_mri.elecpos(3,:) = head_Rpa; elec_mri.label = {'Nz', 'TTP9', 'TTP10'}; elec_mri.unit = 'mm'; % coregister the electrodes to the MRI using fiducials cfg = []; cfg.method = 'fiducial'; cfg.target = elec_mri; cfg.elec = chanlocs_124; cfg.fiducial = {'Nz', 'TTP9', 'TTP10'}; chanlocs_124_spm = ft_electroderealign(cfg); =================================================================================================== Just in case this is also of interest, this is how I compute the BEM headmodel from the same MRI template: % segments the MRI into three different tissue parts % creates binary masks for each point and tissue part cfg = []; cfg.output = {'brain','skull','scalp'}; segmented_mri = ft_volumesegment(cfg, mri_spm); %% create mesh with different tissues cfg=[]; cfg.tissue={'brain','skull','scalp'}; cfg.numvertices = [3000 2000 1000]; bnd=ft_prepare_mesh(cfg,segmented_mri); % compute headmodel cfg = []; cfg.tissue={'brain','skull','scalp'}; cfg.method ='bemcp'; vol = ft_prepare_headmodel(cfg, bnd); _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From athierfelder at tuebingen.mpg.de Thu Aug 23 17:25:37 2018 From: athierfelder at tuebingen.mpg.de (Annika Thierfelder) Date: Thu, 23 Aug 2018 17:25:37 +0200 Subject: [FieldTrip] Electrode alignment to standard MRI template In-Reply-To: <012859F5-86EF-4918-B242-D83ACE9CF8B6@donders.ru.nl> References: <19c51cab-6da5-e02b-e704-9cf6a75a28c9@tuebingen.mpg.de> <012859F5-86EF-4918-B242-D83ACE9CF8B6@donders.ru.nl> Message-ID: <1ccac9e2-c1fe-b472-8db7-692d7ad4ec09@tuebingen.mpg.de> Dear Jan-Mathijs, thank you very much for your help and taking the time, your code did the job for me - it looks pretty good now! My electrode set wasn't in ctf-coordinates, so I had to do it a little bit different but it worked out well. Thanks again and have a good start into the weekend soon, Annika On 8/23/2018 2:57 PM, Schoffelen, J.M. (Jan Mathijs) wrote: > Dear Annika, > > It’s a bit unfortunate that you ended up using the low-level > information in the mri.hdr.fiducial field (in combination with the > transformation matrices). I agree with you that the values are > strange, and I am pretty sure that they do not correspond with the > volumetric image in the same data structure. Note that the mri itself > also has a ‘transform’ field, which provides you with the mapping > between voxels and head space (MNI-convention, ACPC-based RAS). If you > aim for a 3-point (nas,lpa,rpa) based coregistration between your > electrodes and the templates needed for source reconstruction, you > could use the set of fiducial positions that can be found in > fieldtrip/electrode/standard1005.elc. (an alternative and possibly > better coregistration could be achieved using a non-linear matching > with the ‘template’ method, but that might be a story of its own). > > If you do: > > >> sens=ft_read_sens('standard_1005.elc'); > >> sens.chanpos(1:3,:) > > ans = > >   -86.0761  -19.9897  -47.9860 >    85.7939  -20.0093  -48.0310 >     0.0083   86.8110  -39.9830 > > (note that this very nicely corresponds with the template fiducials > you reported in your e-mail) > > >> sens.label(1:3) > > ans = > >     'LPA' >     'RPA' >     ‘Nz' > > > > you can verify that these three fiducials are expressed in head > coordinates according to the ‘spm’ convention, i.e. Anterior > Commissure is origin, the line through AC and PC is the y-axis, x-axis > pointing to the right etc). This verification can be done with > > >>load(‘standard_mri’);, > > >>cfg = []; > >>cfg.location = sens.chanpos(1,:); > >>figure;ft_sourceplot(cfg, mri); > > Now, if /your/ electrodes' coordinate system is the same as the > anatomical mri’s, then you can proceed to ft_electroderealign. > > Yet, your electrodes’ coordinate system is different, because you > report that you’d expect the nasion to be [100 0 0], i.e. the x-axis > to go exactly through the nasion, and the positive y-axis pointing to > the left. This is then an ALS-based coordinate system with the origin > somewhere between the ears (the exact definition depends on whether > you are using the convention that e.g. CTF uses, as compared to the > ASA coordinate system: see ‘help ft_headcoordinates’ and the fieldtrip > wiki’s faq about coordinate systems). > > Now, if you need to get your electrodes expressed in the coordinate > system that is the same as the one in which the headmodel is specified > (called ‘spm’, or ‘acpc’), then you can do the following: > > T = > ft_headcoordinates(sens.chanpos(3,:),sens.chanpos(1,:),sens.chanpos(2,:),’ctf’); > % or ‘asa' > > This gives you a transformation matrix that maps from the space in > which the ‘fiducials’ are expressed (in this case: spm) to a > ctf/asa-based coordinate system. This you can verify with > > ft_warp_apply(T, sens.chanpos(1:3,:));, > > which will give you the fiducials’ coordinates with values close to 0, > on 2 out of three values. Then, the inv(T) is transforming from the > ctf/asa-based coordinate system into spm’s convention, so you can do: > > chanlocs_124_transformed = ft_transform_geometry(inv(T), chanlocs_124); > > I think that this already should get you close to where you want to > end up. > > And yes, coordinate systems are always complicated. > > Good luck, > > Jan-Mathijs > > PS: I have removed the hdr-fields from standard_mri and standard_seg > in the release version of the code, to avoid any future confusion. > > >> On 23 Aug 2018, at 11:06, Annika Thierfelder >> > > wrote: >> >> Hello everyone, >> >> short update on my question, that is maybe easier to answer without >> going through the code itself. >> >> I believe that the heart of the problem lies (of course) in the >> coordinate definitions of the electrodes and the MRI. So, I >> experimented a little with the example electrode set that is aligned >> to the standard BEM model that results from the standard MRI. If I >> try to align the example electrodes to the MRI (which is not >> necessary but it also should not hurt), I discovered that I get the >> same shift into the z-direction for the example electrodes. >> >> So, the basic question underlying my problem would be: How can the >> MRI and the eletrodes be aligned if their fiducials are so different, >> they even seem to be in different coordinate systems? Shouldn't they >> be kind of similar if they are aligned? I did not see any further >> coordinate transformation in the BEM computation from the MRI (except >> for the conversion into 'acpc' in ft_volumesegment which doesn't >> change anything) that would explain the alignment later on. >> >> MRI fiducials: >> NAS [1, 0, 0] >> LPA [0, 83, 0] >> RPA [0, -117, 0] >> >> template electrode fiducials are roughly: >> NAS [0, 87, -40] >> LPA [-86, -20, -48] >> RPA [86, -20, -48] >> >> Also, the MRI is supposed to be in MNI coordinates, which I don't >> understand why, because already the first dimension doesn't point to >> the right. I feel like understanding why the coordinates are this way >> would be a crucial step to solve my problem. >> >> I'm very thankful for any help on this problem. If I understand this, >> I hopefully can figure out the rest myself. >> >> Best regards, >> Annika >> >> On 8/21/2018 6:21 PM, Annika Thierfelder wrote: >>> Hello everyone, >>> >>> I started using fieldtrip last week to do EEG source analysis and I >>> experienced some issues when trying to align the EEG to the MRI. >>> Since we don't have MRI scans for our subjects, I used the >>> standard_mri from the template folder. >>> >>> The solution that works "best" until now is to align the electrodes >>> with the MRI fiducials and compute the BEM from the MRI seperately >>> (I used bemcp for that since I work on windows, so dipoli doesn't >>> run). However, when I plot the aligned electrodes together with the >>> BEM head surface, the electrodes are in the correct orientation but >>> they have an offset along the z-axis. I put the code I used below >>> and uploaded the picture of the electrodes and the head model on >>> google drive: >>> https://drive.google.com/open?id=1b7Q3YGWGyzaa5oXeE-PfOOHNIDoFaLO1 >>> >>> There are two things I'm wondering about now: >>> >>> Why are the nasion head coordinates in the MRI template [1, 0, 0] >>> and not [100, 0, 0], which would make more sense (at least in my >>> opinion) since the units are in mm and I thought the nasion is not >>> supposed to be inside the head? The LPA and RPA values are [0, 83, >>> 0] and [0, -117, 0] respectively, which seems perfectly fine to me. >>> >>> I have the feeling that the problem arises because the two >>> coordinate systems of the data do not have the same origin. Can I >>> shift the coordinate system of the electrode space before aligning >>> them? I only found ways how to change the coordinate system of the >>> MRI. I also tried to change the MRI coordinate system first before >>> aligning the electrodes, but I found that I cannot create the BEM >>> model with 'bemcp' anymore. It seems to throw an error if I give it >>> an MRI with any coordinate system that is not 'spm'. So I kind of >>> have the feeling that I need to get the electrodes into the 'spm' >>> coordinates to match the MRI and BEM head. >>> >>> Thank you a lot in advance for your support! >>> >>> Annika >>> >>> PS: I know there has been a similar problem once in this mailing >>> list, but I checked the suggestions and they did not work for me, >>> also it seemed as if in the end it came down to fitting the >>> electrodes manually there, and I suppose there can be another >>> solution for this. >>> >>> ================================================================================== >>> >>> >>> Code for the electrode alignment: >>> >>> %This is my how my electrode data looks like: >>> disp(chanlocs_124) >>>       label: {124×1 cell} >>>     elecpos: [124×3 double] >>>        unit: 'mm' >>> >>> % get fiducials from the MRI template >>> vox_Nas = mri_spm.hdr.fiducial.mri.nas; >>> vox_Lpa = mri_spm.hdr.fiducial.mri.lpa; >>> vox_Rpa = mri_spm.hdr.fiducial.mri.rpa; >>> >>> % I know I can skip this step because I can directly use the >>> head-coordinates given in the MRI template >>> % I kept it because it doesn't make a difference >>> vox2head = mri_spm.hdr.transformMRI2Head; >>> head_Nas = ft_warp_apply(vox2head, vox_Nas, 'homogeneous'); % nasion >>> head_Lpa = ft_warp_apply(vox2head, vox_Lpa, 'homogeneous'); % Left >>> preauricular >>> head_Rpa = ft_warp_apply(vox2head, vox_Rpa, 'homogeneous'); % Right >>> preauricular >>> >>> % save the MRI fiducials as target structure for the realignment >>> % in our data set, the LPA is named TTP9 and the RPA is TTP10, so I >>> renamed them >>> elec_mri.elecpos(1,:) = head_Nas; >>> elec_mri.elecpos(2,:) = head_Lpa; >>> elec_mri.elecpos(3,:) = head_Rpa; >>> elec_mri.label = {'Nz', 'TTP9', 'TTP10'}; >>> elec_mri.unit  = 'mm'; >>> >>> % coregister the electrodes to the MRI using fiducials >>> cfg = []; >>> cfg.method   = 'fiducial'; >>> cfg.target   = elec_mri; >>> cfg.elec     = chanlocs_124; >>> cfg.fiducial = {'Nz', 'TTP9', 'TTP10'}; >>> chanlocs_124_spm = ft_electroderealign(cfg); >>> >>> =================================================================================================== >>> >>> Just in case this is also of interest, this is how I compute the BEM >>> headmodel from the same MRI template: >>> >>> % segments the MRI into three different tissue parts >>> % creates binary masks for each point and tissue part >>> cfg = []; >>> cfg.output    = {'brain','skull','scalp'}; >>> segmented_mri  = ft_volumesegment(cfg, mri_spm); >>> >>> %% create mesh with different tissues >>> cfg=[]; >>> cfg.tissue={'brain','skull','scalp'}; >>> cfg.numvertices = [3000 2000 1000]; >>> bnd=ft_prepare_mesh(cfg,segmented_mri); >>> >>> % compute headmodel >>> cfg        = []; >>> cfg.tissue={'brain','skull','scalp'}; >>> cfg.method ='bemcp'; >>> vol        = ft_prepare_headmodel(cfg, bnd); >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> https://doi.org/10.1371/journal.pcbi.1002202 >> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From kamiakavi at gmail.com Fri Aug 24 06:41:16 2018 From: kamiakavi at gmail.com (Kamia Kavi) Date: Fri, 24 Aug 2018 06:41:16 +0200 Subject: [FieldTrip] could not determine dimord Message-ID: Hello, I'm a newbie in FieldTrip and would appriciate it a lot if you help me with this problem: When I want to calculate grand average using ft_timelockgrandaverage, I receive the warning below: Warning: could not determine dimord of "fsample" in: label: {60x1 cell} fsample: 250 elec: [1x1 struct] avg: [60x750 single] var: [60x750 single] time: [1x750 double] cfg: [1x1 struct] dimord: 'chan_time' Could you please tell me what is wrong with dimord? (I have used eeglab2fieldtrip to import subject-averages to FieldTrip) Best wisehs, Kamia -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.spaak at donders.ru.nl Fri Aug 24 09:38:32 2018 From: e.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 24 Aug 2018 09:38:32 +0200 Subject: [FieldTrip] could not determine dimord In-Reply-To: References: Message-ID: Hi Kamia, You are getting this warning because the field fsample is of dimensions 1x1, which does not correspond to chan_time. I agree that this warning is a bit confusing and unnecessary, but you can safely ignore it. Your data structure (including dimord) looks fine to me. Best, Eelke On Fri, 24 Aug 2018 at 06:41, Kamia Kavi wrote: > > Hello, > > I'm a newbie in FieldTrip and would appriciate it a lot if you help me with this problem: > > When I want to calculate grand average using ft_timelockgrandaverage, I receive the warning below: > > Warning: could not determine dimord of "fsample" in: > > label: {60x1 cell} > fsample: 250 > elec: [1x1 struct] > avg: [60x750 single] > var: [60x750 single] > time: [1x750 double] > cfg: [1x1 struct] > dimord: 'chan_time' > > Could you please tell me what is wrong with dimord? (I have used eeglab2fieldtrip to import subject-averages to FieldTrip) > > Best wisehs, > > Kamia > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From tzvetomir.tzvetanov at gmail.com Fri Aug 24 11:23:26 2018 From: tzvetomir.tzvetanov at gmail.com (Tzvetomir Tzvetanov) Date: Fri, 24 Aug 2018 11:23:26 +0200 Subject: [FieldTrip] Fwd: Re: One-sample cluster based permutation t-test ERP data In-Reply-To: References: Message-ID: I resent my response in case people may be interested. tzvetomir Your message has been rejected, probably because you are not subscribed to the mailing list and the list's policy is to prohibit non-members from posting to it. If you think that your messages are being rejected in error, contact the mailing list owner at fieldtrip-owner at science.ru.nl. ForwardedMessage.eml Subject: Re: [FieldTrip] One-sample cluster based permutation t-test ERP data From: Tzvetomir Tzvetanov Date: 18/08/21 13:14 To: fieldtrip at science.ru.nl, alex.sel at psy.ox.ac.uk, politzerahless at gmail.com Dear Alex, Dear Stephen, Dear Eelke, Dear all, we have worked on such a case, that is trying to test a single sample. We made an arxiv publication, after rejection from J. of Neuroscience Methods with a similar argument presented by Dr. Eric Maris at that time too (a correct open review). We decided to make an arxiv publication and leave the community decide if our approach is worth. (https://arxiv.org/abs/1801.09372) For the moment I do think single sample test is available. It can be traced (a very late discovery from my side) also to the non-linear dynamics literature where it is called surrogate data analysis/statistics. I found a good description is the book from Kantz or his more recent reviews (non-linear time series analysis). Hope this gives some clues for people wondering about this open question in our field. Best regards, Tzvetomir On 18/08/21 09:53, Eelke Spaak wrote: > Dear Eric and all, > > Following up on your point (1), I've wondered in the past about the > one-sample randomization test (let's call it that to avoid the name > "permutation"). Would it not be fair to say that the null hypothesis > here is that the expected value of our data equals zero? > > Cheers, > Eelke > > On 19 August 2018 at 23:57, Maris, E.G.G. (Eric) wrote: >> Dear FT-ers, >> >> The one-sample statistical test continues to be an issue that raises >> confusion. Although it is impossible to explain here the statistical >> background in all detail, the following points are relevant for empirical >> neuroscientists that apply cluster-based permutation tests to their data: >> >> 1. A permutation test can only be used for comparing two or more >> experimental conditions. Thus, Stephen’s proposal is not a permutation test. >> However, it does produce a p-value, and by comparing it with some nominal >> value (e.g., 0.05) it can be used to take a decision. The problem with this >> procedure is that it is unclear what is the null hypothesis to which this >> decision pertains. Here lies the important difference with a permutation >> test for the difference between two experimental conditions: tthe null >> hypothesis involves that the biological data in the two conditions are >> generated by the same probability distribution. >> >> 2. Comparing the activation (post-stimulus) with the baseline (pre-stimulus) >> period can be performed using a permutation test, regardless whether the raw >> data were transformed into a time-frequency representation or not. The >> reason why some people think it cannot be used on the raw data (i.e., for >> testing effects on the time-locked average) is that the baseline period is >> typically used to normalize the activation period (by removing the DC >> component). With this normalisation, the null hypothesis pertains to two >> sets of biological data of which one (the activation data) is already a >> function of the other (as a result of the normalisation procedure). If you >> want to use the actvsblT statfun, It makes more sense to perform a high-pass >> filter on the raw data rather than normalising the activation data using the >> baseline data. >> >> best, >> Eric Maris >> >> >> >> >> >> 1. Re: One-sample cluster based permutation t-test ERP data >> (Stephen Politzer-Ahles) >> >> From: Stephen Politzer-Ahles >> Subject: Re: [FieldTrip] One-sample cluster based permutation t-test ERP >> data >> Date: 19 August 2018 at 10:36:09 CEST >> To: >> >> >> I'm not sure if there is or not, but in the past I have managed this by >> creating an ERP dataset that is all zeroes, and then comparing my real >> dataset to it with a cluster test. Since a one-sample test is the same as a >> paired samples test between something and zero (e.g., comparing X and Y via >> t-test is the same as comparing {X-Y} to zero), this should give the same >> result. >> >> >> --- >> Stephen Politzer-Ahles >> The Hong Kong Polytechnic University >> Department of Chinese and Bilingual Studies >> http://www.mypolyuweb.hk/~sjpolit/ >> >>> ---------------------------------------------------------------------- >>> >>> Message: 1 >>> Date: Fri, 17 Aug 2018 16:01:29 +0000 >>> From: Alex Sel >>> To:"fieldtrip at science.ru.nl" >>> Subject: [FieldTrip] One-sample cluster based permutation t-test ERP >>> data >>> Message-ID:<47637187-A1A5-4040-8917-F04C501E65CF at psy.ox.ac.uk> >>> Content-Type: text/plain; charset="utf-8" >>> >>> Dear list, >>> >>> I wonder if there has been a function developed to do a one-sample cluster >>> based permutation t-test ERP data. I am aware this is possible to do with >>> actvsblT for time-frequency data. >>> >>> There is a forum thread from 2012 saying that this wasn’t implemented. But >>> I wonder if there is anyone there who might have resolve this issue and >>> wouldn’t mind sharing the solution. >>> >>> Any help would be appreciated. >>> >>> Best wishes, >>> >>> Alex Sel, PhD >>> Associate Fellow of the Higher Education Academy >>> Wellcome Centre for Integrative Neuroimaging >>> Department of Experimental Psychology >>> University of Oxford >>> The Tinsley Building >>> OX1 3SR >>> >>> >>> >>> >>> >>> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 >> >> >> Eric Maris | Donders Institute for Brain, Cognition, and Behaviour & Faculty >> of Social Sciences | Radboud University | PO Box 9104, 6500 HE Nijmegen | >> (024) 3612651 |www.ru.nl >> >> This message (and any attachments) is intended solely for the addressee(s) >> and may contain confidential information. If you are not the addressee, do >> not copy this message (and any attachments), forward or share this message >> with third parties. You are requested to notify the sender immediately and >> delete this message. >> >> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 >> > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 -- __________________________________________________ Tzvetomir Tzvetanov, PhD Associate Professor/Senior Researcher School of Computer & Information, Hefei University of Technology Hefei, Anhui 230009, P.R.China Email:tzvetan at hfut.edu.cn -------------- next part -------------- An HTML attachment was scrubbed... URL: From kamiakavi at gmail.com Fri Aug 24 19:08:35 2018 From: kamiakavi at gmail.com (Kamia Kavi) Date: Fri, 24 Aug 2018 19:08:35 +0200 Subject: [FieldTrip] Finding Corresponding Time Points in Cluster-based Permutation Message-ID: Hello! When I perform cluster-based permutation tests on event related fields/potentials, in stat.posclusters.prob (also stat.negclusters.prob) there is an descending sorted list of clusters with their probabilities. How can I find the corresponding time points for each of theses rows? (For example, how can I find the corresponding time points for stat.posclusters(1).prob). Thank you very much in advance for any help! Kamia -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sat Aug 25 14:03:25 2018 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 25 Aug 2018 20:03:25 +0800 Subject: [FieldTrip] Finding Corresponding Time Points in Cluster-based Permutation In-Reply-To: References: Message-ID: Dear Kamia stat.posclusterslabelmat (or stat.negclusterslabelmat) is a channels x samples matrix saying, for each data point (each pair) which cluster it is part of, if any. (For time-frequency data, it is a channels x samples x frequencies matrix.) So if you want to find the spatiotemporal extent of positive cluster #1, you can search stat.posclusterslabelmat for which points == 1. I believe there are some examples in http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock. Best, Steve --- Stephen Politzer-Ahles The Hong Kong Polytechnic University Department of Chinese and Bilingual Studies http://www.mypolyuweb.hk/~sjpolit/ > Message: 1 > Date: Fri, 24 Aug 2018 19:08:35 +0200 > From: Kamia Kavi > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Finding Corresponding Time Points in > Cluster-based Permutation > Message-ID: > < > CAAT2gKZJR0Y-UmgcTFxgvbegjGO6_95a4aPBuT9Sk8_uV10TAw at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hello! > > > > When I perform cluster-based permutation tests on event related > fields/potentials, in stat.posclusters.prob (also stat.negclusters.prob) > there is an descending sorted list of clusters with their probabilities. > How can I find the corresponding time points for each of theses rows? (For > example, how can I find the corresponding time points for > stat.posclusters(1).prob). > > > > Thank you very much in advance for any help! > > > > Kamia > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20180824/4ffbdd16/attachment-0001.html > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > > > ------------------------------ > > End of fieldtrip Digest, Vol 93, Issue 22 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kamiakavi at gmail.com Sat Aug 25 20:24:35 2018 From: kamiakavi at gmail.com (Kamia Kavi) Date: Sat, 25 Aug 2018 20:24:35 +0200 Subject: [FieldTrip] stat.stat matrix of ft_XXXstatistics Message-ID: Hello FieldTrip-ers, Sorry in advance if my question is trivial! Using ft_timelockstatistics with cfg.method = 'montecarlo', can each element which is a t-value in stat.stat matrix (assuming that we used t-value as our test statistic) be considered as a value corrected for multiple compressions? In other words, since we have used a non-parametric method (i.e., permutation Meonte Carlo), can we assume that each element (i.e., a t-value) of stat.stat matrix is corrected for multiple comparisons? I would appreciate a clear explanation. Many thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From kamiakavi at gmail.com Sat Aug 25 21:18:40 2018 From: kamiakavi at gmail.com (Kamia Kavi) Date: Sat, 25 Aug 2018 21:18:40 +0200 Subject: [FieldTrip] Finding Corresponding Time Points in Cluster-based Permutation In-Reply-To: References: Message-ID: Dear Steve, Thank you very much, very helpful! Best wishes, Kamia On Sat, Aug 25, 2018 at 2:35 PM Stephen Politzer-Ahles < politzerahless at gmail.com> wrote: > Dear Kamia > > stat.posclusterslabelmat (or stat.negclusterslabelmat) is a channels x > samples matrix saying, for each data point (each pair) > which cluster it is part of, if any. (For time-frequency data, it is a > channels x samples x frequencies matrix.) So if you want to find the > spatiotemporal extent of positive cluster #1, you can search > stat.posclusterslabelmat for which points == 1. I believe there are some > examples in > http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock. > > Best, > Steve > > --- > Stephen Politzer-Ahles > The Hong Kong Polytechnic University > Department of Chinese and Bilingual Studies > http://www.mypolyuweb.hk/~sjpolit/ > > > > >> Message: 1 >> Date: Fri, 24 Aug 2018 19:08:35 +0200 >> From: Kamia Kavi >> To: fieldtrip at science.ru.nl >> Subject: [FieldTrip] Finding Corresponding Time Points in >> Cluster-based Permutation >> Message-ID: >> < >> CAAT2gKZJR0Y-UmgcTFxgvbegjGO6_95a4aPBuT9Sk8_uV10TAw at mail.gmail.com> >> Content-Type: text/plain; charset="utf-8" >> >> Hello! >> >> >> >> When I perform cluster-based permutation tests on event related >> fields/potentials, in stat.posclusters.prob (also stat.negclusters.prob) >> there is an descending sorted list of clusters with their probabilities. >> How can I find the corresponding time points for each of theses rows? (For >> example, how can I find the corresponding time points for >> stat.posclusters(1).prob). >> >> >> >> Thank you very much in advance for any help! >> >> >> >> Kamia >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20180824/4ffbdd16/attachment-0001.html >> > >> >> ------------------------------ >> >> Subject: Digest Footer >> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 >> >> >> ------------------------------ >> >> End of fieldtrip Digest, Vol 93, Issue 22 >> ***************************************** >> > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Sun Aug 26 13:30:33 2018 From: julian.keil at gmail.com (Julian Keil) Date: Sun, 26 Aug 2018 13:30:33 +0200 Subject: [FieldTrip] stat.stat matrix of ft_XXXstatistics In-Reply-To: References: Message-ID: <128D9633-2286-444C-8081-9866DCBADED3@gmail.com> Dear Kavi, the t-values are not corrected for multiple comparisons. In order to check if a t-value has passed the significance criterion, you can take a look at the .mask-field. Here, each element is coded with either 0 (not significant) or 1 (significant). Cheers, Julian > Am 25.08.2018 um 20:24 schrieb Kamia Kavi : > > Hello FieldTrip-ers, > > Sorry in advance if my question is trivial! > > Using ft_timelockstatistics with cfg.method = 'montecarlo', can each element which is a t-value in stat.stat matrix (assuming that we used t-value as our test statistic) be considered as a value corrected for multiple compressions? > > In other words, since we have used a non-parametric method (i.e., permutation Meonte Carlo), can we assume that each element (i.e., a t-value) of stat.stat matrix is corrected for multiple comparisons? I would appreciate a clear explanation. Many thanks! > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: Message signed with OpenPGP URL: From kamiakavi at gmail.com Mon Aug 27 08:57:30 2018 From: kamiakavi at gmail.com (Kamia Kavi) Date: Mon, 27 Aug 2018 08:57:30 +0200 Subject: [FieldTrip] stat.stat matrix of ft_XXXstatistics In-Reply-To: <128D9633-2286-444C-8081-9866DCBADED3@gmail.com> References: <128D9633-2286-444C-8081-9866DCBADED3@gmail.com> Message-ID: Dear Julian, Thanks for the tip! Best wishes, Mahmoud On Sun, Aug 26, 2018 at 1:35 PM Julian Keil wrote: > Dear Kavi, > > the t-values are not corrected for multiple comparisons. In order to check > if a t-value has passed the significance criterion, you can take a look at > the .mask-field. Here, each element is coded with either 0 (not > significant) or 1 (significant). > > Cheers, > > Julian > > > Am 25.08.2018 um 20:24 schrieb Kamia Kavi : > > Hello FieldTrip-ers, > > > Sorry in advance if my question is trivial! > > > Using ft_timelockstatistics with cfg.method = 'montecarlo', can each > element which is a t-value in stat.stat matrix (assuming that we used > t-value as our test statistic) be considered as a value corrected for > multiple compressions? > > > In other words, since we have used a non-parametric method (i.e., > permutation Meonte Carlo), can we assume that each element (i.e., a > t-value) of stat.stat matrix is corrected for multiple comparisons? I would > appreciate a clear explanation. Many thanks! > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at inria.fr Mon Aug 27 12:52:23 2018 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Mon, 27 Aug 2018 12:52:23 +0200 Subject: [FieldTrip] [ANN] OpenMEEG 2.4 release Message-ID: Dear community, We are pleased to announce the new 2.4 release of OpenMEEG. Last release from OpenMEEG was a while ago but a number of developments and bug fixes have been done since then and just needed to be released. A few highlights ============ - Support for non-nested geometries (e.g. hole in skull) - Python bindings work now for both Python 2 and 3 in Windows, Linux and OSX platforms. - Openmeeg can now be installed though conda. See installation for details, this installs the OpenMEEG libraries, binaries and bindings. - Project was moved to GitHub: https://github.com/openmeeg/openmeeg and continuous integration is now done with Travis and Appveyor that also generate nightly builds for all 3 platforms. - Improved web site at https://openmeeg.github.io/ - New tutorial page at : https://openmeeg.github.io/tutorial.html - Optimized parallel computation of the D operator (should accelerate Head matrix computation with OpenMP parallel binaries) - All files saved and written by OpenMEEG are now in Matlab 7.3 / HDF5 format so can be accessed just with load and save in Matlab. Thanks ====== Many thanks to François Tadel to help us with the Brainstorm integration and to Sarang Dalal for revamping the Fieldtrip code to better support this new version. Warning ====== If you have used OpenMEEG before you will need to recompute all the intermediate files to use them with the version 2.4 Installation ======== The latest release precompiled binaries are available at: http://openmeeg.gforge.inria.fr/download/?C=M;O=D The precompiled Python extension can now be installed with Anaconda python distribution: conda install -c conda-forge openmeeg. Should you have any issue with this release please report it on the issue tracker on github: https://github.com/openmeeg/openmeeg/issues Regards, The OpenMEEG developers People who contributed to OpenMEEG (in alphabetical order) since the beginning: Alexandre Gramfort Boris Burle Daniel Miklody Emmanuel Olivi Joan Massich Kai Dang Kyle Beauchamp Marmaduke Woodman Maureen Clerc Perrine Landreau Renaud Keriven Sylvain Vallaghe Theodore Papadopoulo Thierry Guillemot Yaroslav Halchenko From p.gaur at ulster.ac.uk Tue Aug 28 21:26:42 2018 From: p.gaur at ulster.ac.uk (Gaur, Pramod) Date: Tue, 28 Aug 2018 19:26:42 +0000 Subject: [FieldTrip] Hello Experts Message-ID: Hi All, Does anyone aware of how to use a template mri when individual subject mri are not available. I am interested in MEG source modelling and I don't have individual mri. I do have the polyhemus headshape points with the raw data. Any help will be highly appreciated. Best regards, Pramod This email and any attachments are confidential and intended solely for the use of the addressee and may contain information which is covered by legal, professional or other privilege. If you have received this email in error please notify the system manager at postmaster at ulster.ac.uk and delete this email immediately. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Ulster University. The University's computer systems may be monitored and communications carried out on them may be recorded to secure the effective operation of the system and for other lawful purposes. Ulster University does not guarantee that this email or any attachments are free from viruses or 100% secure. Unless expressly stated in the body of a separate attachment, the text of email is not intended to form a binding contract. Correspondence to and from the University may be subject to requests for disclosure by 3rd parties under relevant legislation. The Ulster University was founded by Royal Charter in 1984 and is registered with company number RC000726 and VAT registered number GB672390524.The primary contact address for Ulster University in Northern Ireland is Cromore Road, Coleraine, Co. Londonderry BT52 1SA -------------- next part -------------- An HTML attachment was scrubbed... URL: From weiyong.w.xu at jyu.fi Wed Aug 29 12:07:09 2018 From: weiyong.w.xu at jyu.fi (Xu, Weiyong) Date: Wed, 29 Aug 2018 10:07:09 +0000 Subject: [FieldTrip] Hello Experts In-Reply-To: References: Message-ID: <781013ea7e6046d88a5ed96d20cd67c4@jyu.fi> Hi Pramod, I had similar problem for my MEG data because we did not collect the individual MRI data. For source analysis in FieldTrip without individual MRIs, I used a simple sphere fitting and scaling method to fit a template (Colin 27, included in FieldTrip) to the polhemus headshape. First, a single sphere was fitted to the MRI scalp and another sphere was fitted to the polhemus headshape. Then I scale the MRI sphere to the same size as the polhemus headshape sphere. And use the scaled MRI template for later source analysis in FieldTrip. Some details, I usually remove the polhemus head points on the nose, also the lower part of the scalp (from MRI template). Best, Weiyong ________________________________ From: fieldtrip on behalf of Gaur, Pramod Sent: Tuesday, August 28, 2018 10:26:42 PM To: FieldTrip discussion list Subject: [FieldTrip] Hello Experts Hi All, Does anyone aware of how to use a template mri when individual subject mri are not available. I am interested in MEG source modelling and I don’t have individual mri. I do have the polyhemus headshape points with the raw data. Any help will be highly appreciated. Best regards, Pramod This email and any attachments are confidential and intended solely for the use of the addressee and may contain information which is covered by legal, professional or other privilege. If you have received this email in error please notify the system manager at postmaster at ulster.ac.uk and delete this email immediately. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Ulster University. The University's computer systems may be monitored and communications carried out on them may be recorded to secure the effective operation of the system and for other lawful purposes. Ulster University does not guarantee that this email or any attachments are free from viruses or 100% secure. Unless expressly stated in the body of a separate attachment, the text of email is not intended to form a binding contract. Correspondence to and from the University may be subject to requests for disclosure by 3rd parties under relevant legislation. The Ulster University was founded by Royal Charter in 1984 and is registered with company number RC000726 and VAT registered number GB672390524.The primary contact address for Ulster University in Northern Ireland is Cromore Road, Coleraine, Co. Londonderry BT52 1SA -------------- next part -------------- An HTML attachment was scrubbed... URL: From seymourr at aston.ac.uk Wed Aug 29 13:01:41 2018 From: seymourr at aston.ac.uk (Seymour, Robert (Student)) Date: Wed, 29 Aug 2018 11:01:41 +0000 Subject: [FieldTrip] Hello Experts Message-ID: Hi Pramod, Try the approach in this paper: https://www.frontiersin.org/articles/10.3389/fninf.2017.00050/full .. it's worked well for me (code below) https://github.com/Macquarie-MEG-Research/MEMES Robert Get Outlook for Android -------------- next part -------------- An HTML attachment was scrubbed... URL: From ericgabriel.rodrigues at hotmail.com Wed Aug 29 14:17:45 2018 From: ericgabriel.rodrigues at hotmail.com (Eric Gabriel) Date: Wed, 29 Aug 2018 12:17:45 +0000 Subject: [FieldTrip] Granger causality Message-ID: Hi, my name is Eric Rodrigues I am a Master's student in Neuroengineering at the Santos Dumont Institute in Brazil. I am studying about Granger causality and I have some doubts that I could not heal for the documentation of the site. I am basically analyzing the local field potentials of 64 channels recorded in rats in 4 regions of the brain to infer causal relationships. The experiment is a tactile discrimination task. My question is how to create the data windows according to the events that occur in the experiment. The data was registered in Plexon and has extension ".plx" Thanks in advance. Eric Gabriel Oliveira Rodrigues Engenheiro Civil - CREA: 2116637597 - RN Mestrando em Neuroengenharia Edmond and Lily Safra International Institute of Neuroscience Macaiba, RN - Brazil. (84) 99627-5378 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlozanosoldevilla at gmail.com Wed Aug 29 14:52:04 2018 From: dlozanosoldevilla at gmail.com (Diego Lozano-Soldevilla) Date: Wed, 29 Aug 2018 14:52:04 +0200 Subject: [FieldTrip] Granger causality In-Reply-To: References: Message-ID: Hi Eric, I'll be relevant to you to know first how fieldtrip deals with plexon data: http://www.fieldtriptoolbox.org/getting_started/plexon This tutorial shows you how to read spikes and LFPs and cut them into epochs for latter processing: http://www.fieldtriptoolbox.org/tutorial/spikefield I recommend you take a look to the following tutorial paper about Granger causality (and other state of the art connectivity measures) https://www.frontiersin.org/articles/10.3389/fnsys.2015.00175/full You'll find the matlab code kindly supplied by the authors to reproduce all the figures: you can explore it and try to adapt it to your reseach question. I hope that helps, Diego On Wed, 29 Aug 2018 at 14:35, Eric Gabriel < ericgabriel.rodrigues at hotmail.com> wrote: > Hi, my name is Eric Rodrigues > I am a Master's student in Neuroengineering at the Santos Dumont Institute > in Brazil. > > I am studying about Granger causality and I have some doubts that I could > not heal for the documentation of the site. > > I am basically analyzing the local field potentials of 64 channels > recorded in rats in 4 regions of the brain to infer causal relationships. > The experiment is a tactile discrimination task. > > My question is how to create the data windows according to the events that > occur in the experiment. The data was registered in Plexon and has > extension ".plx" > > Thanks in advance. > > *Eric Gabriel Oliveira Rodrigues* > *Engenheiro Civil - CREA: 2116637597 - RN* > * Mestrando em Neuroengenharia Edmond and Lily Safra International > Institute of Neuroscience Macaiba, RN - Brazil. * > *(84) 99627-5378* > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From manuela.costa at ctb.upm.es Wed Aug 29 19:34:10 2018 From: manuela.costa at ctb.upm.es (Manuela Costa) Date: Wed, 29 Aug 2018 19:34:10 +0200 Subject: [FieldTrip] Error in ft_mvaranalysis Message-ID: Dear community, I'm planning to do granger causality analysis on human iEEG data. I'm using ft_mvaranalysis to get time-dependent coefficient sets based on a sliding window, but I get an error. The data is downsampled at 250 Hz. The fields of my data structure are fsample, trial, time, label and cfg. The size of preprocessing_emotional_Rem_ds{1}.trial{1} is 3x3751 (channels, data points). Below is the configuration structure and the error message. The ft_mvaranalysis function works if I do not use the sliding window approach. I tried to use different cfg.toi and cfg.t_ftimwin but I could not find a solution. I hope you can help me. Best wishes, Manuela Costa Configuration structure: cfg = []; cfg.toolbox = 'bsmart'; cfg.order = 10; cfg.toi = -0.5:0.01:3; %% the time points at which the windows are centered cfg.t_ftimwin = 0.25; %% length of time window in second mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg, preprocessing_emotional_Rem_ds{subj}); Error message: Matrix dimensions must agree. Error in ft_mvaranalysis (line 185) latency(k,:) = cfg.toi + cfg.t_ftimwin.*[-0.5 0.5]; Error in Step2_Calculate_Granger_time_freq(line 108) mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg, preprocessing_emotional_Rem_ds{subj}); -------------- next part -------------- An HTML attachment was scrubbed... URL: From assaf.harel at wright.edu Wed Aug 29 21:52:26 2018 From: assaf.harel at wright.edu (Harel, Assaf) Date: Wed, 29 Aug 2018 19:52:26 +0000 Subject: [FieldTrip] 20th International Symposium on Aviation Psychology Call for Proposals Message-ID: 20th International Symposium on Aviation Psychology Call for Proposals The 20th ISAP will be held in Dayton, Ohio, U.S.A., May 7-10, 2019 (Tuesday – Friday). Proposals are sought for posters, papers, symposium and panel sessions, and workshops. Any topic related to the field of aviation psychology is welcomed. Topics on human performance problems and opportunities within aviation systems, and design solutions that best utilize human capabilities for creating safe and efficient aviation systems are all appropriate. Any basic or applied research domain that generalizes from or to the aviation domain will be considered. Students are especially encouraged to participate in the The Stanley Nelson Roscoe Best Student Paper Competition. Visit http://aviation-psychology.org for more information. Deadline for proposal submissions is October 5, 2018. Pamela Tsang and Michael Vidulich (Symposium Co-Chairs) Contact isap2019 at isap.wright.edu for any questions. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Silvia.Formica at UGent.be Thu Aug 30 10:19:12 2018 From: Silvia.Formica at UGent.be (Silvia Formica) Date: Thu, 30 Aug 2018 08:19:12 +0000 Subject: [FieldTrip] ICA error "the component unmixing failed" Message-ID: <1535617154705.82583@UGent.be> Hi all, this is probably a fairly basic question. I'm trying to run an ICA on my epoched data, but I come across an error that I don't understand. Note that in the past I already succeded in running an ICA on the same dataset, so I really can't understand what is changed.? ------------------------------------------------------------------------------------------------ Here the error I am getting: scaling data with 1 over 86.290718 concatenating data....................................................................................................... concatenated data matrix size 64x590112 starting decomposition using runica runica(): unknown flagError using ft_notification (line 340) the component unmixing failed Error in ft_error (line 39) ft_notification(varargin{:}); Error in ft_componentanalysis (line 800) ft_error('the component unmixing failed'); ------------------------------------------------------------------ The error shows up immediately, the convergence process doesn't even start. The dataset is made of 288 epochs, 4 seconds long with a sampling rate of 1024 Hz. I'm running the ICA with the following parameters: cfg = []; cfg.layout= 'biosemi64.lay'; cfg.method = 'runica'; cfg.channel = 1:64; comp_cue= ft_componentanalysis(cfg, data_cue); Thanks for any help! Best, Silvia -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Aug 31 11:32:43 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 31 Aug 2018 09:32:43 +0000 Subject: [FieldTrip] Error in ft_mvaranalysis In-Reply-To: References: Message-ID: Dear Manuela, This looks like a typo in the code, which I will fix (and once fixed will become available in the daily release version of the code). To give myself some time: probably not tonight, but perhaps after the weekend :). However, the fact that this part of the code clearly doesn’t work, I am not entirely sure whether the rest will work smoothly as well, as soon as the current hurdle is fixed. But let’s see Best wishes, Jan-Mathijs On 29 Aug 2018, at 13:34, Manuela Costa > wrote: Dear community, I'm planning to do granger causality analysis on human iEEG data. I'm using ft_mvaranalysis to get time-dependent coefficient sets based on a sliding window, but I get an error. The data is downsampled at 250 Hz. The fields of my data structure are fsample, trial, time, label and cfg. The size of preprocessing_emotional_Rem_ds{1}.trial{1} is 3x3751 (channels, data points). Below is the configuration structure and the error message. The ft_mvaranalysis function works if I do not use the sliding window approach. I tried to use different cfg.toi and cfg.t_ftimwin but I could not find a solution. I hope you can help me. Best wishes, Manuela Costa Configuration structure: cfg = []; cfg.toolbox = 'bsmart'; cfg.order = 10; cfg.toi = -0.5:0.01:3; %% the time points at which the windows are centered cfg.t_ftimwin = 0.25; %% length of time window in second mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg, preprocessing_emotional_Rem_ds{subj}); Error message: Matrix dimensions must agree. Error in ft_mvaranalysis (line 185) latency(k,:) = cfg.toi + cfg.t_ftimwin.*[-0.5 0.5]; Error in Step2_Calculate_Granger_time_freq(line 108) mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg,preprocessing_emotional_Rem_ds{subj}); _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From wei.he at mq.edu.au Fri Aug 31 14:07:33 2018 From: wei.he at mq.edu.au (Wei He) Date: Fri, 31 Aug 2018 12:07:33 +0000 Subject: [FieldTrip] weird z-value plot from ft_rejectvisual In-Reply-To: References: Message-ID: <1F371526-BD4E-495A-9404-B271ED18AB48@mq.edu.au> Dear all, When I used ft_rejectvisual on my ERF data and then selected z-value, I got funny plots that seem just not right to me (the units of the x-axis may suggest the z values weren't computed correctly?). It was initially identified with fieldtrip-20180827 in Matlab2014b. Then the same error was also found with the most recent feildtrip release in Matlab2017b. I attached below a few screenshots for the z-value plots. Any suggestions will be very much appreciated! [cid:image008.jpg at 01D4415B.F3437220] [cid:image009.jpg at 01D4415B.F3437220] [cid:image010.jpg at 01D4415B.F3437220] Regards, Wei He Postdoctoral Research Fellow ARC Centre of Excellence in Cognition and its Disorders Department of Cognitive Science | Level 3, Australian Hearing Hub 16 University Avenue Macquarie University NSW 2109 Australia T : +61 2 9850 2952 | ccd.edu.au | mq.edu.au [Macquarie University] CRICOS Provider 00002J. Think before you print. Please consider the environment before printing this email. This message is intended for the addressee named and may contain confidential information. If you are not the intended recipient, please delete the message and notify the sender. Views expressed in this message are those of the individual sender and are not necessarily the views of Macquarie University and its controlled entities. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 39530 bytes Desc: image001.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 34034 bytes Desc: image002.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 38064 bytes Desc: image003.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 5137 bytes Desc: image004.png URL: