From yoniilevy at gmail.com Thu Nov 1 10:01:34 2012 From: yoniilevy at gmail.com (Yoni Levy) Date: Thu, 1 Nov 2012 11:01:34 +0200 Subject: [FieldTrip] MNI or CTF coordinates during the construction of individual MNI-based grids Message-ID: Hi all, If I understood correctly from the tutorial, the template_grid should be expressed in MNI coordinates, therefore in 'mm' units. However, following the current tutorial, the resulting template_grid is expressed in 'cm' (because of the CTF system). If I understand correctly, we should add to the tutorial that the template_grid units should be transformed to 'mm' after creating it. The individual warped grid however stays expressed in 'cm' (in the case of CTF). Does that make sense or I might be missing anything here? Thanks, Yoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcoskun at mail.uh.edu Thu Nov 1 17:30:02 2012 From: mcoskun at mail.uh.edu (Mehmet-Akif Coskun) Date: Thu, 01 Nov 2012 11:30:02 -0500 Subject: [FieldTrip] Minimal Stimulus Condition to evoke a detectable MEG response Message-ID: <7280fbc125328.50925d3a@mail.uh.edu> Dear Fieldtrippers, Is there any study that measured the minimal stimulus condition required to evoke a detectable MEG response. We acquire our data using 4D 248 sensor device and our stimulus is 1.8 kg/cm^2. We know this is above average but we also would like to know what is the threshold? Also in many papers that i have seen, the threshold is measured as deflection of skin in mm. Is there a method that i can convert our units to find the deflection of skin? I will greatly appreciate any helps, Thanks in advance, Mehmet -------------- next part -------------- An HTML attachment was scrubbed... URL: From bherrmann at cbs.mpg.de Fri Nov 2 10:10:16 2012 From: bherrmann at cbs.mpg.de (=?utf-8?Q?Bj=C3=B6rn_Herrmann?=) Date: Fri, 2 Nov 2012 10:10:16 +0100 (CET) Subject: [FieldTrip] wavelet fourier output produces sign inverted imaginary part In-Reply-To: <855059066.4809.1351778311397.JavaMail.root@zimbra> Message-ID: <715262839.1275.1351847416532.JavaMail.root@zimbra> Dear fieldtrip users, I observed something strange using ft_freqanalysis with the "wavelet" method that might be important for many/some of you. It seems that the imaginary part of the fourier output (from "wavelet") is sign inverted for the TFR calculated for more than one frequency at once (i.e. cfg.foi = [4 5]) as compared to the TFR calculated independently for the frequencies (i.e., first cfg.foi = 4, and then cfg.foi = 5). This impacts the phase angle which is backwards in case of calculating the TFR for more frequencies in one go. amplitude/power is unaffected and it seems also ITPC calculations. momentary phase and therefore some phase-amplitude coupling measures are, however, affected by this. I attached a bit of code showing the difference: Cf = 5; Sf = 500; dur = 20; freqs = 1:10; cfg = []; cfg.method = 'wavelet'; cfg.output = 'fourier'; cfg.width = 3; cfg.toi = 0:0.01:dur; t = 0:1/Sf:(dur-1/Sf); data = []; data.avg = sin(2*pi*Cf*t+1.1); data.fsample = Sf; data.time = t; data.label = {'channel'}; data.dimord = 'chan_time'; floop = []; for ii = 1 : length(freqs) cfg.foi = freqs(ii); F = ft_freqanalysis(cfg, data); floop(:,ii) = squeeze(F.fourierspctrm); end cfg.foi = freqs; F = ft_freqanalysis(cfg, data); fonego = squeeze(F.fourierspctrm)'; [real(floop(1000,1)), real(fonego(1000,1)); ... imag(floop(1000,1)), imag(fonego(1000,1)); ... angle(floop(1000,1)), angle(fonego(1000,1))] ans = -0.0128 -0.0128 0.0067 -0.0067 2.6605 -2.6605 I thought this might be important for some of you, independently of a bug report i'll try to send later (i have to figure out how this works first). My colleagues and I were unable to fix the problem in the fieldtrip script directly, but a simple solution is to do the following: real(fourier)+(imag(fourier)*-1)*1i Based on some tests i did, I believe the fonego is the wrong one (i.e. using cfg.foi = [4 5]). All the best, Björn From r.vandermeij at donders.ru.nl Fri Nov 2 13:21:06 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Fri, 2 Nov 2012 13:21:06 +0100 Subject: [FieldTrip] wavelet fourier output produces sign inverted imaginary part In-Reply-To: <715262839.1275.1351847416532.JavaMail.root@zimbra> References: <855059066.4809.1351778311397.JavaMail.root@zimbra> <715262839.1275.1351847416532.JavaMail.root@zimbra> Message-ID: Dear Björn, Please note that in your example, you take the complex conjugate transpose of 'fonego'. This changes the sign of the imaginary part of your Fourier coefficients. Please verify whether this is causing the phase-flip you mention in your first paragraph. All the best, Roemer On Fri, Nov 2, 2012 at 10:10 AM, Björn Herrmann wrote: > Dear fieldtrip users, > > I observed something strange using ft_freqanalysis with the "wavelet" > method that might be important for many/some of you. > It seems that the imaginary part of the fourier output (from "wavelet") is > sign inverted for the TFR calculated for more than one frequency at once > (i.e. cfg.foi = [4 5]) as compared to the TFR calculated independently for > the frequencies (i.e., first cfg.foi = 4, and then cfg.foi = 5). This > impacts the phase angle which is backwards in case of calculating the TFR > for more frequencies in one go. amplitude/power is unaffected and it seems > also ITPC calculations. momentary phase and therefore some phase-amplitude > coupling measures are, however, affected by this. I attached a bit of code > showing the difference: > > > Cf = 5; > Sf = 500; > dur = 20; > > freqs = 1:10; > > cfg = []; > cfg.method = 'wavelet'; > cfg.output = 'fourier'; > cfg.width = 3; > cfg.toi = 0:0.01:dur; > > t = 0:1/Sf:(dur-1/Sf); > data = []; > data.avg = sin(2*pi*Cf*t+1.1); > data.fsample = Sf; > data.time = t; > data.label = {'channel'}; > data.dimord = 'chan_time'; > > floop = []; > for ii = 1 : length(freqs) > cfg.foi = freqs(ii); > F = ft_freqanalysis(cfg, data); > floop(:,ii) = squeeze(F.fourierspctrm); > end > cfg.foi = freqs; > F = ft_freqanalysis(cfg, data); > fonego = squeeze(F.fourierspctrm)'; > > [real(floop(1000,1)), real(fonego(1000,1)); ... > imag(floop(1000,1)), imag(fonego(1000,1)); ... > angle(floop(1000,1)), angle(fonego(1000,1))] > > ans = > -0.0128 -0.0128 > 0.0067 -0.0067 > 2.6605 -2.6605 > > > I thought this might be important for some of you, independently of a bug > report i'll try to send later (i have to figure out how this works first). > My colleagues and I were unable to fix the problem in the fieldtrip script > directly, but a simple solution is to do the following: > real(fourier)+(imag(fourier)*-1)*1i > Based on some tests i did, I believe the fonego is the wrong one (i.e. > using cfg.foi = [4 5]). > > All the best, > > Björn > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Roemer van der Meij M.Sc. PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From bherrmann at cbs.mpg.de Fri Nov 2 13:56:20 2012 From: bherrmann at cbs.mpg.de (=?utf-8?Q?Bj=C3=B6rn_Herrmann?=) Date: Fri, 2 Nov 2012 13:56:20 +0100 (CET) Subject: [FieldTrip] wavelet fourier output produces sign inverted imaginary part In-Reply-To: Message-ID: <979548527.3464.1351860980202.JavaMail.root@zimbra> Dear fieldtrip users, I have just received an anser to my email regarding the "sign inverted imaginary part". It seems that I was introducing this error myself in my script by transposing the complex output. I did not know this before that this changes the sign of the imaginary part. a = 3+1i; b = a' b = 3 - 1i hmm. I am very sorry for the mistake and thankful to Matt bringing my attention to this. Thus, it seems fieldtrip does work alright regarding the output. I was working wrong. Björn ------ Björn Herrmann Auditory Cognition Group Max Planck Institute for Human Cognitive and Brain Sciences Stephanstrasse 1a, 04103 Leipzig, Germany phone: ++49 (0)341 9940 2606 email: bherrmann at cbs.mpg.de ----- Ursprüngliche Mail ----- Von: fieldtrip-request at science.ru.nl An: fieldtrip at science.ru.nl Gesendet: Freitag, 2. November 2012 12:00:16 Betreff: fieldtrip Digest, Vol 24, Issue 2 Send fieldtrip mailing list submissions to fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to fieldtrip-request at science.ru.nl You can reach the person managing the list at fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: 1. Minimal Stimulus Condition to evoke a detectable MEG response (Mehmet-Akif Coskun) 2. wavelet fourier output produces sign inverted imaginary part (Bj?rn Herrmann) ---------------------------------------------------------------------- Message: 1 Date: Thu, 01 Nov 2012 11:30:02 -0500 From: Mehmet-Akif Coskun To: FieldTrip discussion list Subject: [FieldTrip] Minimal Stimulus Condition to evoke a detectable MEG response Message-ID: <7280fbc125328.50925d3a at mail.uh.edu> Content-Type: text/plain; charset="us-ascii" Dear Fieldtrippers, Is there any study that measured the minimal stimulus condition required to evoke a detectable MEG response. We acquire our data using 4D 248 sensor device and our stimulus is 1.8 kg/cm^2. We know this is above average but we also would like to know what is the threshold? Also in many papers that i have seen, the threshold is measured as deflection of skin in mm. Is there a method that i can convert our units to find the deflection of skin? I will greatly appreciate any helps, Thanks in advance, Mehmet -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Fri, 2 Nov 2012 10:10:16 +0100 (CET) From: Bj?rn Herrmann To: fieldtrip at science.ru.nl Subject: [FieldTrip] wavelet fourier output produces sign inverted imaginary part Message-ID: <715262839.1275.1351847416532.JavaMail.root at zimbra> Content-Type: text/plain; charset=utf-8 Dear fieldtrip users, I observed something strange using ft_freqanalysis with the "wavelet" method that might be important for many/some of you. It seems that the imaginary part of the fourier output (from "wavelet") is sign inverted for the TFR calculated for more than one frequency at once (i.e. cfg.foi = [4 5]) as compared to the TFR calculated independently for the frequencies (i.e., first cfg.foi = 4, and then cfg.foi = 5). This impacts the phase angle which is backwards in case of calculating the TFR for more frequencies in one go. amplitude/power is unaffected and it seems also ITPC calculations. momentary phase and therefore some phase-amplitude coupling measures are, however, affected by this. I attached a bit of code showing the difference: Cf = 5; Sf = 500; dur = 20; freqs = 1:10; cfg = []; cfg.method = 'wavelet'; cfg.output = 'fourier'; cfg.width = 3; cfg.toi = 0:0.01:dur; t = 0:1/Sf:(dur-1/Sf); data = []; data.avg = sin(2*pi*Cf*t+1.1); data.fsample = Sf; data.time = t; data.label = {'channel'}; data.dimord = 'chan_time'; floop = []; for ii = 1 : length(freqs) cfg.foi = freqs(ii); F = ft_freqanalysis(cfg, data); floop(:,ii) = squeeze(F.fourierspctrm); end cfg.foi = freqs; F = ft_freqanalysis(cfg, data); fonego = squeeze(F.fourierspctrm)'; [real(floop(1000,1)), real(fonego(1000,1)); ... imag(floop(1000,1)), imag(fonego(1000,1)); ... angle(floop(1000,1)), angle(fonego(1000,1))] ans = -0.0128 -0.0128 0.0067 -0.0067 2.6605 -2.6605 I thought this might be important for some of you, independently of a bug report i'll try to send later (i have to figure out how this works first). My colleagues and I were unable to fix the problem in the fieldtrip script directly, but a simple solution is to do the following: real(fourier)+(imag(fourier)*-1)*1i Based on some tests i did, I believe the fonego is the wrong one (i.e. using cfg.foi = [4 5]). All the best, Bj?rn ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 24, Issue 2 **************************************** From polomacnenad at gmail.com Mon Nov 5 17:01:58 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Mon, 5 Nov 2012 17:01:58 +0100 Subject: [FieldTrip] opposite to the ft_appenddata Message-ID: Hi everybody, I would like to know does the fildtrip has some function opposite to the ft_appenddata. I have appended all trials from the two of my conditions in order to have more information for the ICA calculation. Now after ft_rejectcomponent I would like to bring back trials in a previous state. Do you have any advice? Thank you very much! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon Nov 5 17:18:27 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 5 Nov 2012 17:18:27 +0100 Subject: [FieldTrip] opposite to the ft_appenddata In-Reply-To: References: Message-ID: Hi Nenad, If I understand correctly what you want, ft_selectdata is what you are looking for. You can use it to select specific trials or channels (or time windows) from a data set. In the 'old' syntax, if you want trials 1, 3, and 5: data = ft_selectdata(data, 'rpt', [1 3 5]); Of course, the trial indices you will have to provide yourself, for instance by looking at which trials originally came from which dataset (i.e., prior to calling ft_appenddata). Best, Eelke On 5 November 2012 17:01, Nenad Polomac wrote: > Hi everybody, > > I would like to know does the fildtrip has some function opposite to the > ft_appenddata. I have appended all trials from the two of my conditions in > order to have more information for the ICA calculation. Now after > ft_rejectcomponent I would like to bring back trials in a previous state. > Do you have any advice? > > Thank you very much! > > Nenad > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stephen.whitmarsh at gmail.com Mon Nov 5 17:11:26 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 5 Nov 2012 17:11:26 +0100 Subject: [FieldTrip] opposite to the ft_appenddata In-Reply-To: References: Message-ID: Dear Nenad, You could apply ft_rejectcomponent on the original datasets using the extra second input argument ('data') - the function help should be clear enough. Cheers, Stephen On 5 November 2012 17:01, Nenad Polomac wrote: > Hi everybody, > > I would like to know does the fildtrip has some function opposite to the > ft_appenddata. I have appended all trials from the two of my conditions in > order to have more information for the ICA calculation. Now > after ft_rejectcomponent I would like to bring back trials in a previous > state. > Do you have any advice? > > Thank you very much! > > Nenad > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Hirschmann at med.uni-duesseldorf.de Tue Nov 6 14:34:53 2012 From: Jan.Hirschmann at med.uni-duesseldorf.de (Jan.Hirschmann at med.uni-duesseldorf.de) Date: Tue, 6 Nov 2012 14:34:53 +0100 Subject: [FieldTrip] subspace projection Message-ID: <72E993C35FB11743B79FF9286E5B6D8B048E4A8B@Mail2-UKD.VMED.UKD> Dear fieldtrip community, In LCMV beamforming there is an option cfg.lcmv.subspace=X. Does anyone have experience or recommendations regarding this option? Is there a publication in which the rationale is described? From looking at the code it seems that data and lead field are projected onto a subspace spanned by the first X singular vectors of the covariance matrix (correct me if I'm wrong). Seems helpful in my case but I am hesitant to use it without knowing anything about it. Thanks for any comment! Jan -- Jan Hirschmann MSc Neuroscience Institute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Düsseldorf Universitätsstr. 1 40225 Düsseldorf Germany Tel: +49 (0)211 81 18415 Fax: +49 (0)211 81 19033 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Nov 6 14:49:36 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 6 Nov 2012 14:49:36 +0100 Subject: [FieldTrip] subspace projection In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B048E4A8B@Mail2-UKD.VMED.UKD> References: <72E993C35FB11743B79FF9286E5B6D8B048E4A8B@Mail2-UKD.VMED.UKD> Message-ID: <0E290E21-72BD-4E44-A6CE-ADADD1886432@donders.ru.nl> Hi Jan, You can look up the rationale in the work of Kensuke Sekihara. Look for 'eigenspace beamformer'. The implementation in FieldTrip is along these lines (but slightly differently implemented). Best wishes, Jan-Mathijs On Nov 6, 2012, at 2:34 PM, wrote: > Dear fieldtrip community, > > In LCMV beamforming there is an option cfg.lcmv.subspace=X. Does anyone have experience or recommendations regarding this option? Is there a publication in which the rationale is described? From looking at the code it seems that data and lead field are projected onto a subspace spanned by the first X singular vectors of the covariance matrix (correct me if I’m wrong). Seems helpful in my case but I am hesitant to use it without knowing anything about it. > > Thanks for any comment! > Jan > > -- > Jan Hirschmann > MSc Neuroscience > Institute of Clinical Neuroscience and Medical Psychology > Heinrich Heine University Düsseldorf > Universitätsstr. 1 > 40225 Düsseldorf > Germany > Tel: +49 (0)211 81 18415 > Fax: +49 (0)211 81 19033 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Tue Nov 6 16:36:48 2012 From: luke.bloy at gmail.com (Luke Bloy) Date: Tue, 6 Nov 2012 10:36:48 -0500 Subject: [FieldTrip] co registration of the mesh points to the atlas In-Reply-To: References: <508F97DC.9080009@donders.ru.nl> Message-ID: <50992e91.0347e00a.5ced.6484@mx.google.com> Hi Qi, I'm not sure if this is what you are looking for but take a look at the --morph option to mne_setup_source_space. It should let you create corresponding source grids in each of your subjects. -Luke -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of qi li Sent: Wednesday, October 31, 2012 5:39 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] co registration of the mesh points to the atlas Hi Jörn, Thanks a lot! This link is very helpful for my question. Actually, I followed the tutorial of source reconstruction of event-related fields using MNE which clearly states 'recon-all -surfreg -subjid Subject01' this already co-registered the original surface to the standard atlas sphere. So for each individual, their cortical surfaces are aligned at this step. The confusion is when down-sampling by using 'mne_setup_source_space --ico -6', what is exactly done(algorithm) to down-sample from 20,000 nodes to only 8196? This might be crucial for a group analysis so I seek a clarification. Thanks! Qi On Tue, Oct 30, 2012 at 5:03 AM, "Jörn M. Horschig" wrote: > Dear Qi, > > I guess this page might help: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_i > ndividual_head_space_that_are_all_aligned_in_mni_space?s[]=warp > > Best, > Jörn > > > On 10/25/2012 6:00 PM, qi li wrote: >> >> Hi, >> >> Is there any function to co-register the individual cortical mesh >> points(8196 in total) generate by fieldtrip to the standard brain. >> Thanks! >> >> Qi >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour Centre for > Cognitive Neuroimaging Radboud University Nijmegen Neuronal > Oscillations Group FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From harding at cbs.mpg.de Tue Nov 6 17:31:54 2012 From: harding at cbs.mpg.de (Eleanor Harding) Date: Tue, 6 Nov 2012 17:31:54 +0100 (CET) Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? In-Reply-To: <1053338968.6953.1352218543584.JavaMail.root@zimbra> Message-ID: <1002956758.7127.1352219514263.JavaMail.root@zimbra> Dear Fieldtrip community, I intend to run ICA on an EEG dataset with 64 channels (+ 2 eye channels), on epochs which are about 4 seconds long, and I am unsure as to how many independent components I should define (20,65,..?). My question is, is there a 'rule of thumb' for defining how many independent components to analyze for EEG? In the archives I have found only references to MEG datasets with many channels, for example reducing over 200 channels to 80 components. Looking in the literature today I also wasn't able to interpret an answer. If anyone has any information, references, or other input I would be much obliged. Thanks, Ellie -- ------------------------------------------------------------------ Eleanor Harding PhD Student Max Planck Institute for Human Cognitive and Brain Sciences Stephanstraße 1A, 04103 Leipzig, Germany Phone: +49 341 9940-2268 Fax: +49 341 9940 2260 http://www.cbs.mpg.de/~harding From polomacnenad at gmail.com Tue Nov 6 18:34:45 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Tue, 6 Nov 2012 18:34:45 +0100 Subject: [FieldTrip] opposite to the ft_appenddata Message-ID: Thank you very much to both of you! I will use Stephen's suggestion. It fits better with my situation! All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron__t at hotmail.com Tue Nov 6 19:27:44 2012 From: aaron__t at hotmail.com (Aaron T) Date: Tue, 6 Nov 2012 10:27:44 -0800 Subject: [FieldTrip] Beginner questions regarding trialfun and nex data Message-ID: I am trying to read event data from .nex files, and having a wee bit of difficulty. When I use the code cfg = [] cfg.dataset = 'Filename.nex' cfg.trialdef.eventtype = '?' ft_definetrial(cfg); The only event data that is returned is the Strobed channel with a number of values. Using event type = 'gui' yields a similar result. Looking at the example provided in the spikefield tutorial, I have run the same commands on the p029_sort_final_01.nex sample data on the website; this yields similar results (only the Strobed event type is returned, with a number of associated values). These values appear to correspond with the events that would be of interest: Looking at the trialfun_stimon.m code I see the following: hdr = ft_read_header(cfg.dataset); event = ft_read_event(cfg.dataset); correctresponse = 10041; begintrial = 10044; endtrial = 10045; stimon = 10030; distractorChange = 12000; targetChange = 12001; attCnds = 20001:20004; % att in/out by target change first/second I have looked at the sample data in offline sorter and neuroexplorer and cannot figure out from where these values for the Strobed event type (the only event returned by fieldtrip), are being ascertained (e.g., so I could write my own version of trialfun)? Any help very much appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From arno at cerco.ups-tlse.fr Tue Nov 6 19:44:03 2012 From: arno at cerco.ups-tlse.fr (Arnaud Delorme) Date: Tue, 6 Nov 2012 10:44:03 -0800 Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? In-Reply-To: <1002956758.7127.1352219514263.JavaMail.root@zimbra> References: <1002956758.7127.1352219514263.JavaMail.root@zimbra> Message-ID: Dear Ellie, you should decompose your full rank matrix. PCA dimension reduction may seriously affects and bias ICA solutions (I have seen a yet-to-be published report on that). Best, Arno On 6 Nov 2012, at 08:31, Eleanor Harding wrote: > Dear Fieldtrip community, > > I intend to run ICA on an EEG dataset with 64 channels (+ 2 eye channels), on epochs which are about 4 seconds long, and I am unsure as to how many independent components I should define (20,65,..?). > > My question is, is there a 'rule of thumb' for defining how many independent components to analyze for EEG? In the archives I have found only references to MEG datasets with many channels, for example reducing over 200 channels to 80 components. Looking in the literature today I also wasn't able to interpret an answer. > > If anyone has any information, references, or other input I would be much obliged. > > Thanks, > Ellie > > > > -- > ------------------------------------------------------------------ > Eleanor Harding > PhD Student > Max Planck Institute for Human Cognitive and Brain Sciences > Stephanstraße 1A, 04103 Leipzig, Germany > Phone: +49 341 9940-2268 > Fax: +49 341 9940 2260 > http://www.cbs.mpg.de/~harding > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Tue Nov 6 20:03:44 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 6 Nov 2012 20:03:44 +0100 Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? In-Reply-To: References: <1002956758.7127.1352219514263.JavaMail.root@zimbra> Message-ID: Dear Ellie, In addition to Arnaud's comment; if your question is how much components you should specify in your cfg.numcomponent parameter, I would suggest to just leave it at the default ('all'). This will give you as many components as their are channels in your data. Typically, specifying anything less than that will just lead to a number of components (the ones explaining least variance) being discarded. Best, Eelke On 6 November 2012 19:44, Arnaud Delorme wrote: > Dear Ellie, > > you should decompose your full rank matrix. PCA dimension reduction may seriously affects and bias ICA solutions (I have seen a yet-to-be published report on that). > > Best, > > Arno > > On 6 Nov 2012, at 08:31, Eleanor Harding wrote: > >> Dear Fieldtrip community, >> >> I intend to run ICA on an EEG dataset with 64 channels (+ 2 eye channels), on epochs which are about 4 seconds long, and I am unsure as to how many independent components I should define (20,65,..?). >> >> My question is, is there a 'rule of thumb' for defining how many independent components to analyze for EEG? In the archives I have found only references to MEG datasets with many channels, for example reducing over 200 channels to 80 components. Looking in the literature today I also wasn't able to interpret an answer. >> >> If anyone has any information, references, or other input I would be much obliged. >> >> Thanks, >> Ellie >> >> >> >> -- >> ------------------------------------------------------------------ >> Eleanor Harding >> PhD Student >> Max Planck Institute for Human Cognitive and Brain Sciences >> Stephanstraße 1A, 04103 Leipzig, Germany >> Phone: +49 341 9940-2268 >> Fax: +49 341 9940 2260 >> http://www.cbs.mpg.de/~harding >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From harding at cbs.mpg.de Wed Nov 7 11:37:21 2012 From: harding at cbs.mpg.de (Eleanor Harding) Date: Wed, 7 Nov 2012 11:37:21 +0100 (CET) Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? In-Reply-To: Message-ID: <1330528100.2559.1352284641098.JavaMail.root@zimbra> Dear Arno and Eelke, Thanks for the information. I also received the following code suggestion from J.Obleser in house cfg.runica.pca =rank(your_number_of_channels) which I am trying out right now. Cheers, Ellie ----- Original Message ----- From: fieldtrip-request at science.ru.nl To: fieldtrip at science.ru.nl Sent: Tuesday, November 6, 2012 6:34:47 PM Subject: fieldtrip Digest, Vol 24, Issue 5 Send fieldtrip mailing list submissions to fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to fieldtrip-request at science.ru.nl You can reach the person managing the list at fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: 1. subspace projection (Jan.Hirschmann at med.uni-duesseldorf.de) 2. Re: subspace projection (jan-mathijs schoffelen) 3. Re: co registration of the mesh points to the atlas (Luke Bloy) 4. 'rule of thumb' for defining how many independent components to analyze for EEG? (Eleanor Harding) 5. Re: opposite to the ft_appenddata (Nenad Polomac) ---------------------------------------------------------------------- Message: 1 Date: Tue, 6 Nov 2012 14:34:53 +0100 From: To: Subject: [FieldTrip] subspace projection Message-ID: <72E993C35FB11743B79FF9286E5B6D8B048E4A8B at Mail2-UKD.VMED.UKD> Content-Type: text/plain; charset="iso-8859-1" Dear fieldtrip community, In LCMV beamforming there is an option cfg.lcmv.subspace=X. Does anyone have experience or recommendations regarding this option? Is there a publication in which the rationale is described? From looking at the code it seems that data and lead field are projected onto a subspace spanned by the first X singular vectors of the covariance matrix (correct me if I'm wrong). Seems helpful in my case but I am hesitant to use it without knowing anything about it. Thanks for any comment! Jan -- Jan Hirschmann MSc Neuroscience Institute of Clinical Neuroscience and Medical Psychology Heinrich Heine University D?sseldorf Universit?tsstr. 1 40225 D?sseldorf Germany Tel: +49 (0)211 81 18415 Fax: +49 (0)211 81 19033 -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Tue, 6 Nov 2012 14:49:36 +0100 From: jan-mathijs schoffelen To: FieldTrip discussion list Subject: Re: [FieldTrip] subspace projection Message-ID: <0E290E21-72BD-4E44-A6CE-ADADD1886432 at donders.ru.nl> Content-Type: text/plain; charset="windows-1252" Hi Jan, You can look up the rationale in the work of Kensuke Sekihara. Look for 'eigenspace beamformer'. The implementation in FieldTrip is along these lines (but slightly differently implemented). Best wishes, Jan-Mathijs On Nov 6, 2012, at 2:34 PM, wrote: > Dear fieldtrip community, > > In LCMV beamforming there is an option cfg.lcmv.subspace=X. Does anyone have experience or recommendations regarding this option? Is there a publication in which the rationale is described? From looking at the code it seems that data and lead field are projected onto a subspace spanned by the first X singular vectors of the covariance matrix (correct me if I?m wrong). Seems helpful in my case but I am hesitant to use it without knowing anything about it. > > Thanks for any comment! > Jan > > -- > Jan Hirschmann > MSc Neuroscience > Institute of Clinical Neuroscience and Medical Psychology > Heinrich Heine University D?sseldorf > Universit?tsstr. 1 > 40225 D?sseldorf > Germany > Tel: +49 (0)211 81 18415 > Fax: +49 (0)211 81 19033 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 3 Date: Tue, 6 Nov 2012 10:36:48 -0500 From: "Luke Bloy" To: "'FieldTrip discussion list'" Subject: Re: [FieldTrip] co registration of the mesh points to the atlas Message-ID: <50992e91.0347e00a.5ced.6484 at mx.google.com> Content-Type: text/plain; charset="iso-8859-1" Hi Qi, I'm not sure if this is what you are looking for but take a look at the --morph option to mne_setup_source_space. It should let you create corresponding source grids in each of your subjects. -Luke -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of qi li Sent: Wednesday, October 31, 2012 5:39 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] co registration of the mesh points to the atlas Hi J?rn, Thanks a lot! This link is very helpful for my question. Actually, I followed the tutorial of source reconstruction of event-related fields using MNE which clearly states 'recon-all -surfreg -subjid Subject01' this already co-registered the original surface to the standard atlas sphere. So for each individual, their cortical surfaces are aligned at this step. The confusion is when down-sampling by using 'mne_setup_source_space --ico -6', what is exactly done(algorithm) to down-sample from 20,000 nodes to only 8196? This might be crucial for a group analysis so I seek a clarification. Thanks! Qi On Tue, Oct 30, 2012 at 5:03 AM, "J?rn M. Horschig" wrote: > Dear Qi, > > I guess this page might help: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_i > ndividual_head_space_that_are_all_aligned_in_mni_space?s[]=warp > > Best, > J?rn > > > On 10/25/2012 6:00 PM, qi li wrote: >> >> Hi, >> >> Is there any function to co-register the individual cortical mesh >> points(8196 in total) generate by fieldtrip to the standard brain. >> Thanks! >> >> Qi >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour Centre for > Cognitive Neuroimaging Radboud University Nijmegen Neuronal > Oscillations Group FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ------------------------------ Message: 4 Date: Tue, 6 Nov 2012 17:31:54 +0100 (CET) From: Eleanor Harding To: fieldtrip at science.ru.nl Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? Message-ID: <1002956758.7127.1352219514263.JavaMail.root at zimbra> Content-Type: text/plain; charset=utf-8 Dear Fieldtrip community, I intend to run ICA on an EEG dataset with 64 channels (+ 2 eye channels), on epochs which are about 4 seconds long, and I am unsure as to how many independent components I should define (20,65,..?). My question is, is there a 'rule of thumb' for defining how many independent components to analyze for EEG? In the archives I have found only references to MEG datasets with many channels, for example reducing over 200 channels to 80 components. Looking in the literature today I also wasn't able to interpret an answer. If anyone has any information, references, or other input I would be much obliged. Thanks, Ellie -- ------------------------------------------------------------------ Eleanor Harding PhD Student Max Planck Institute for Human Cognitive and Brain Sciences Stephanstra?e 1A, 04103 Leipzig, Germany Phone: +49 341 9940-2268 Fax: +49 341 9940 2260 http://www.cbs.mpg.de/~harding ------------------------------ Message: 5 Date: Tue, 6 Nov 2012 18:34:45 +0100 From: Nenad Polomac To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] opposite to the ft_appenddata Message-ID: Content-Type: text/plain; charset="iso-8859-1" Thank you very much to both of you! I will use Stephen's suggestion. It fits better with my situation! All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 24, Issue 5 **************************************** -- ------------------------------------------------------------------ Eleanor Harding PhD Student Max Planck Institute for Human Cognitive and Brain Sciences Stephanstraße 1A, 04103 Leipzig, Germany Phone: +49 341 9940-2268 Fax: +49 341 9940 2260 http://www.cbs.mpg.de/~harding From matt.craddock at uni-leipzig.de Wed Nov 7 13:44:33 2012 From: matt.craddock at uni-leipzig.de (Matt Craddock) Date: Wed, 07 Nov 2012 13:44:33 +0100 Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? In-Reply-To: References: <1002956758.7127.1352219514263.JavaMail.root@zimbra> Message-ID: <509A57B1.8070709@uni-leipzig.de> On 06/11/2012 19:44, Arnaud Delorme wrote: > Dear Ellie, > > you should decompose your full rank matrix. PCA dimension reduction may seriously affects and bias ICA solutions (I have seen a yet-to-be published report on that). > > Best, > > Arno Dear all, Uh oh. If PCA is off the table, what should be done if the data is not full rank? e.g. if it's in average reference or multiple channels are bridged etc. Is the bias introduced by PCA worse than trying to decompose a matrix which is not full rank as if it were full rank? Wouldn't cfg.runica.pca =rank(your_number_of_channels) always set it to 1, and thus tell runica to reduce to only a single component? Or does setting it to 1 tell runica to detect rank-deficiency and suggest an appropriate reduction? I don't normally run ICA via fieldtrip, so am not sure how to tell it to detect the rank and reduce accordingly; EEGLAB at least asks you about this when it detects rank deficiency (or at least, should do - i've found it a little temperamental on this point, but this is the Fieldtrip list so...). Regards, Matt -- Dr. Matt Craddock Post-doctoral researcher, Institute of Psychology, University of Leipzig, Seeburgstr. 14-20, 04103 Leipzig, Germany Phone: +49 341 973 95 44 From poil.simonshlomo at gmail.com Wed Nov 7 14:21:13 2012 From: poil.simonshlomo at gmail.com (Simon-Shlomo Poil) Date: Wed, 7 Nov 2012 14:21:13 +0100 Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? In-Reply-To: <509A57B1.8070709@uni-leipzig.de> References: <1002956758.7127.1352219514263.JavaMail.root@zimbra> <509A57B1.8070709@uni-leipzig.de> Message-ID: Dear all, My experience with cleaning high-density EEG (i.e. >=129 channels) is that PCA reduction is necessary before ICA. If you do not do the PCA, you (1) spread out your artifactual source across multiple components, (2) you get a lot of components representing single channels, and (3) you need long recordings to get enough data for so many component (i.e. ~30*129^2 as lower limit for 129 components, a rule-of-thumb I have from the EEGLAB website). This also means that we, e.g., recommend our students using the Neurophysiological Biomarker Toolbox to clean data to reduce their 129-channel data to rank 15 ( http://www.nbtwiki.net/doku.php?id=tutorial:compute_independent_component_analysis#.UJpfS4az70E)! It is simply easier for them to understand 15 components than 129 components... However, my opinion is only based on my non-systematical observations.. I don't know if, e.g., reducing a 129 channel Signal to a PCA rank 30 Signal potentially could remove low power neuronal signal (e.g. gamma oscillations)? I look forward to see the report on PCA dimension reduction effects on ICA! Back to Eleanor's question: I would also recommend you to do a full rank ICA for 64 channel data. Good luck with the cleaning. Best regards, Simon-Shlomo Poil 2012/11/7 Matt Craddock > On 06/11/2012 19:44, Arnaud Delorme wrote: > >> Dear Ellie, >> >> you should decompose your full rank matrix. PCA dimension reduction may >> seriously affects and bias ICA solutions (I have seen a yet-to-be published >> report on that). >> >> Best, >> >> Arno >> > > Dear all, > > Uh oh. If PCA is off the table, what should be done if the data is not > full rank? e.g. if it's in average reference or multiple channels are > bridged etc. Is the bias introduced by PCA worse than trying to decompose a > matrix which is not full rank as if it were full rank? > > Wouldn't > > cfg.runica.pca =rank(your_number_of_channels) > > always set it to 1, and thus tell runica to reduce to only a single > component? Or does setting it to 1 tell runica to detect rank-deficiency > and suggest an appropriate reduction? I don't normally run ICA via > fieldtrip, so am not sure how to tell it to detect the rank and reduce > accordingly; EEGLAB at least asks you about this when it detects rank > deficiency (or at least, should do - i've found it a little temperamental > on this point, but this is the Fieldtrip list so...). > > Regards, > Matt > -- > Dr. Matt Craddock > > Post-doctoral researcher, > Institute of Psychology, > University of Leipzig, > Seeburgstr. 14-20, > 04103 Leipzig, Germany > Phone: +49 341 973 95 44 > > ______________________________**_________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip > -- -- Simon-Shlomo Poil Center of MR-Research University Children’s Hospital Zurich Mobile number: +41 (0)76 399 5809 Office number: +41 (0)44 266 3129 Skype: poil.simonshlomo Webpage: http://www.poil.dk/s/ and http://www.nbtwiki.net and http://www.kispi.uzh.ch/Kinderspital/Medizin/mrzentrum_en.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Wed Nov 7 15:00:38 2012 From: luke.bloy at gmail.com (Luke Bloy) Date: Wed, 7 Nov 2012 09:00:38 -0500 Subject: [FieldTrip] using freesurfer cortical atlases Message-ID: <509a6987.9111e00a.5e14.ffffa79a@mx.google.com> Hi, I'm using cortically constrained mne to look at some auditory ERfs. I'm roughly following this tutorial, http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate. What I would like to do is to impart some anatomical information onto my findings. I can load the desikan atlas created by freesurfer using ft_read_atlas, but the points I get from this don't match the points I get from the sourcespace that I created with mne_setup_source -iso -6. Does anyone have any experience with this? Thanks, Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Nov 7 19:21:17 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 7 Nov 2012 19:21:17 +0100 Subject: [FieldTrip] using freesurfer cortical atlases In-Reply-To: <509a6987.9111e00a.5e14.ffffa79a@mx.google.com> References: <509a6987.9111e00a.5e14.ffffa79a@mx.google.com> Message-ID: Hi Luke, If you read in the *.fif sourcemodel using ft_read_headshape, it contains a field called 'orig'. The subfield orig.inuse links the vertices in the high resolution tessellation to the vertices in the sourcemodel. Best Jan-Mathijs On Nov 7, 2012, at 3:00 PM, Luke Bloy wrote: > Hi, > > I’m using cortically constrained mne to look at some auditory ERfs. I’m roughly following this tutorial, http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate. What I would like to do is to impart some anatomical information onto my findings. I can load the desikan atlas created by freesurfer using ft_read_atlas, but the points I get from this don’t match the points I get from the sourcespace that I created with mne_setup_source –iso -6. > > Does anyone have any experience with this? > > Thanks, > Luke > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Thu Nov 8 14:11:12 2012 From: luke.bloy at gmail.com (Luke Bloy) Date: Thu, 8 Nov 2012 08:11:12 -0500 Subject: [FieldTrip] using freesurfer cortical atlases In-Reply-To: References: <509a6987.9111e00a.5e14.ffffa79a@mx.google.com> Message-ID: <509baf71.2a74310a.053a.1035@mx.google.com> Thanks this is will be much faster than my brute force method. From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of jan-mathijs schoffelen Sent: Wednesday, November 07, 2012 1:21 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] using freesurfer cortical atlases Hi Luke, If you read in the *.fif sourcemodel using ft_read_headshape, it contains a field called 'orig'. The subfield orig.inuse links the vertices in the high resolution tessellation to the vertices in the sourcemodel. Best Jan-Mathijs On Nov 7, 2012, at 3:00 PM, Luke Bloy wrote: Hi, I'm using cortically constrained mne to look at some auditory ERfs. I'm roughly following this tutorial, http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate. What I would like to do is to impart some anatomical information onto my findings. I can load the desikan atlas created by freesurfer using ft_read_atlas, but the points I get from this don't match the points I get from the sourcespace that I created with mne_setup_source -iso -6. Does anyone have any experience with this? Thanks, Luke _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Thu Nov 8 16:17:47 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Thu, 8 Nov 2012 16:17:47 +0100 Subject: [FieldTrip] global field power Message-ID: Hi, Is there any options in the fieldtrip to calculate global field power for MEG data? Thank you in advance! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Nov 8 16:32:36 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 8 Nov 2012 16:32:36 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: Hi Nenad, There are several options available for doing this. You can call, for instance, ft_preprocessing with the option cfg.rectify = 'yes', and then compute the mean signal over any or all of time/trials/channels with some custom code. Does this help? If not, please specify your problem a bit more. Best, Eelke On 8 November 2012 16:17, Nenad Polomac wrote: > Hi, > Is there any options in the fieldtrip to calculate global field power for > MEG data? > > Thank you in advance! > > Nenad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jan.schoffelen at donders.ru.nl Thu Nov 8 16:35:57 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 8 Nov 2012 16:35:57 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: Hi Nenad, No, there is not, but I guess you can use matlabs std function for that. Best, Jan-Mathijs On Nov 8, 2012, at 4:17 PM, Nenad Polomac wrote: > Hi, > Is there any options in the fieldtrip to calculate global field power for MEG data? > > Thank you in advance! > > Nenad > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Nov 8 18:02:38 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 8 Nov 2012 18:02:38 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: JM is right, global field power is the std over channels. Apologies for any confusion I may have caused; I did not know the term and thought you meant something like 'total signal power'. Cheers, Eelke Op 8 nov. 2012 16:39 schreef "jan-mathijs schoffelen" < jan.schoffelen at donders.ru.nl> het volgende: > Hi Nenad, > > No, there is not, but I guess you can use matlabs std function for that. > > Best, > > Jan-Mathijs > > On Nov 8, 2012, at 4:17 PM, Nenad Polomac wrote: > > Hi, > Is there any options in the fieldtrip to calculate global field power for > MEG data? > > Thank you in advance! > > Nenad > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From venug001 at crimson.ua.edu Thu Nov 8 18:21:53 2012 From: venug001 at crimson.ua.edu (Gopakumar Venugopalan) Date: Thu, 8 Nov 2012 14:21:53 -0300 Subject: [FieldTrip] request for 4d users In-Reply-To: References: Message-ID: Dear JM, I have simultaneously recorded EEG/MEG data using 4D. Yes they use the 10-20 (or some variant thereof) system for EEG. This information can be extracted from the headers, and it is possible to relabel the channel locations in EEGLAB, and it is also possible to replace the standard xyz coordinates, with the coordinates from your own individual xyz file--generated by 4D (using Polhemus). Hope to hear from you. warm regards gopa On Wed, Oct 31, 2012 at 4:03 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Dear community and 4d-users in particular, > > I am in the process of implementing more robust support in the fileio > module to deal with simultaneous MEG/EEG measurements using the > 4D-neuroimaging system. Specifically, I want to improve the reading of EEG > electrode positions, when these have been digitized using the Polhemus in > combination with the 4D acquisition software. This question has been raised > on this list over a year ago by Margit Schönherr (who kindly sent me a > dataset to work with: thanks Margit), but it would be really helpful if I > could benefit from your knowledge/input. At the moment FT can extract > electrode positions from the header, but it is based on reverse engineering > based on 1 dataset only. Therefore I would like to ask you whether you > could send me some (as small as possible) datasets, which contain digitized > electrode positions (in combination with the corresponding config and > hs_file). This would be much appreciated. > On a related note, Margit's dataset contained electrode positions in > combination with their labels according to the 10/20 convention. Does > anybody know whether information is stored in the file-header that links > the named electrodes to the generic naming scheme 'E1'...'Ex'? > > Thanks for any input, > > JM > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Thu Nov 8 20:34:14 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Thu, 8 Nov 2012 20:34:14 +0100 Subject: [FieldTrip] global field power Message-ID: Dear Jan and Elke, Thank you for your ansewers! I have applied The Matlabs std function on data.avg matrix and it doesn't give me good results. Namely, it returns matrix with [1 x time points] so it reduces number of channels to one, which is not what I want. I believe this is because the sum function sums data column-wise. My question is could I do only sqrt(data.var). Would this result be proper way of calculating global field power? All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Nov 8 20:46:34 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 8 Nov 2012 20:46:34 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: Dear Nenad, The only definition I could find for 'global field power' in the context of EEG is indeed as JM suggested, the standard deviation over channels. Of course, computing this std collapses across the channel dimension, so you end up with a dimensionality of 1 where previously there was the dimensionality of nChannels. If this is not what you are after, you need to give us a clear definition of what you mean by 'global field power'. Best, Eelke On 8 November 2012 20:34, Nenad Polomac wrote: > Dear Jan and Elke, > > Thank you for your ansewers! > I have applied The Matlabs std function on data.avg matrix and it doesn't > give me good results. Namely, it returns matrix with [1 x time points] so > it reduces number of channels to one, which is not what I want. I believe > this is because the sum function sums data column-wise. My question is could > I do only sqrt(data.var). Would this result be proper way of calculating > global field power? > > All the best! > > Nenad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From nathanweisz at mac.com Fri Nov 9 07:28:50 2012 From: nathanweisz at mac.com (Nathan Weisz) Date: Fri, 09 Nov 2012 07:28:50 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: Hi, I think Nenad means something like (untested code): data.GFP=mean(data.avg.^2) or for data.RMS=sqrt(mean(data.avg.^2)) Good luck, n On 08.11.2012, at 20:46, Eelke Spaak wrote: > Dear Nenad, > > The only definition I could find for 'global field power' in the > context of EEG is indeed as JM suggested, the standard deviation over > channels. Of course, computing this std collapses across the channel > dimension, so you end up with a dimensionality of 1 where previously > there was the dimensionality of nChannels. > > If this is not what you are after, you need to give us a clear > definition of what you mean by 'global field power'. > > Best, > Eelke > > On 8 November 2012 20:34, Nenad Polomac wrote: >> Dear Jan and Elke, >> >> Thank you for your ansewers! >> I have applied The Matlabs std function on data.avg matrix and it doesn't >> give me good results. Namely, it returns matrix with [1 x time points] so >> it reduces number of channels to one, which is not what I want. I believe >> this is because the sum function sums data column-wise. My question is could >> I do only sqrt(data.var). Would this result be proper way of calculating >> global field power? >> >> All the best! >> >> Nenad >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Fri Nov 9 08:53:27 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 9 Nov 2012 08:53:27 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: If something like that is what you are after then my first post is still relevant :) Cheers, Eelke On 9 November 2012 07:28, Nathan Weisz wrote: > Hi, > > I think Nenad means something like (untested code): > data.GFP=mean(data.avg.^2) > > or for > data.RMS=sqrt(mean(data.avg.^2)) > > Good luck, > n > > On 08.11.2012, at 20:46, Eelke Spaak wrote: > >> Dear Nenad, >> >> The only definition I could find for 'global field power' in the >> context of EEG is indeed as JM suggested, the standard deviation over >> channels. Of course, computing this std collapses across the channel >> dimension, so you end up with a dimensionality of 1 where previously >> there was the dimensionality of nChannels. >> >> If this is not what you are after, you need to give us a clear >> definition of what you mean by 'global field power'. >> >> Best, >> Eelke >> >> On 8 November 2012 20:34, Nenad Polomac wrote: >>> Dear Jan and Elke, >>> >>> Thank you for your ansewers! >>> I have applied The Matlabs std function on data.avg matrix and it doesn't >>> give me good results. Namely, it returns matrix with [1 x time points] so >>> it reduces number of channels to one, which is not what I want. I believe >>> this is because the sum function sums data column-wise. My question is could >>> I do only sqrt(data.var). Would this result be proper way of calculating >>> global field power? >>> >>> All the best! >>> >>> Nenad >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From g.piantoni at nin.knaw.nl Fri Nov 9 09:09:35 2012 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Fri, 9 Nov 2012 09:09:35 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: Hi, There is an EEGLAB implementation of the original (Lehman's) GFP definition that might help you: https://sccn.ucsd.edu/svn/software/eeglab/external/bioelectromagnetism_ligth/eeg_gfp.m I don't know of any code for Fieldtrip though. Cheers, G On Fri, Nov 9, 2012 at 7:28 AM, Nathan Weisz wrote: > Hi, > > I think Nenad means something like (untested code): > data.GFP=mean(data.avg.^2) > > or for > data.RMS=sqrt(mean(data.avg.^2)) > > Good luck, > n > > On 08.11.2012, at 20:46, Eelke Spaak wrote: > >> Dear Nenad, >> >> The only definition I could find for 'global field power' in the >> context of EEG is indeed as JM suggested, the standard deviation over >> channels. Of course, computing this std collapses across the channel >> dimension, so you end up with a dimensionality of 1 where previously >> there was the dimensionality of nChannels. >> >> If this is not what you are after, you need to give us a clear >> definition of what you mean by 'global field power'. >> >> Best, >> Eelke >> >> On 8 November 2012 20:34, Nenad Polomac wrote: >>> Dear Jan and Elke, >>> >>> Thank you for your ansewers! >>> I have applied The Matlabs std function on data.avg matrix and it doesn't >>> give me good results. Namely, it returns matrix with [1 x time points] so >>> it reduces number of channels to one, which is not what I want. I believe >>> this is because the sum function sums data column-wise. My question is could >>> I do only sqrt(data.var). Would this result be proper way of calculating >>> global field power? >>> >>> All the best! >>> >>> Nenad >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From polomacnenad at gmail.com Fri Nov 9 10:15:49 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Fri, 9 Nov 2012 10:15:49 +0100 Subject: [FieldTrip] global field power Message-ID: Dear all, Thank you very much for your discussion, and sorry if I was confusing. Thank you for your suggestions, I solved my problem now. @Eelke for the global field power I meant this http://www.sciencedirect.com/science/article/pii/0301008284900030 page 235. Thank you very much for you effort! All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank.ye.mei at gmail.com Fri Nov 9 22:50:39 2012 From: frank.ye.mei at gmail.com (Ye Mei) Date: Fri, 09 Nov 2012 16:50:39 -0500 Subject: [FieldTrip] Is FT_VOLUMEREALIGN required for MEG MRI source localization? Message-ID: <509D7AAF.1020003@gmail.com> Dear all, For source localization, do I need to first registrate the subject's MR scan to the coil locations/fiducials? I suppose yes. But, when I looked at the fieldtrip tutorial (http://fieldtrip.fcdonders.nl/tutorial/beamformer), I didn't see the function FT_VOLUMEREALIGN was used? Could someone explain that? Many thanks in advance. Kind regards Ye Mei From a.stolk at fcdonders.ru.nl Sat Nov 10 14:04:52 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Sat, 10 Nov 2012 14:04:52 +0100 (CET) Subject: [FieldTrip] Is FT_VOLUMEREALIGN required for MEG MRI source localization? In-Reply-To: <509D7AAF.1020003@gmail.com> Message-ID: <915729497.1200106.1352552692303.JavaMail.root@sculptor.zimbra.ru.nl> Hi Ye Mei, It is indeed important to have your anatomical MRI aligned to the coordinate system of your electrophysiological recording. ft_volumerealign will not change the anatomical data itself, it only creates a transformation matrix (.transform field) that aligns the anatomy to the intended coordinate system. With respect to the tutorial anatomical data, this procedure was already applied. Namely, the anatomical MRI is already aligned to the CTF (MEG) coordinate system and stored as such. For more details, please see: http://fieldtrip.fcdonders.nl/tutorial/headmodel_meg Hope this answered your question, Arjen ----- Oorspronkelijk bericht ----- > Van: "Ye Mei" > Aan: fieldtrip at science.ru.nl > Verzonden: Vrijdag 9 november 2012 22:50:39 > Onderwerp: [FieldTrip] Is FT_VOLUMEREALIGN required for MEG MRI source localization? > Dear all, > > For source localization, do I need to first registrate the subject's > MR > scan to the coil locations/fiducials? I suppose yes. But, when I > looked > at the fieldtrip tutorial > (http://fieldtrip.fcdonders.nl/tutorial/beamformer), I didn't see the > function FT_VOLUMEREALIGN was used? > > Could someone explain that? > > Many thanks in advance. > > Kind regards > > Ye Mei > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Caroline.Lustenberger at kispi.uzh.ch Sun Nov 11 14:25:31 2012 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Sun, 11 Nov 2012 13:25:31 +0000 Subject: [FieldTrip] Cluster statistics Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A@kispi.uzh.ch> Dear fieldtrip users I tried to perform cluster analysis with fieldtrip. Since I've performed preprocessing/frequency analysis before using fieldtrip, I had to form the specific data structure to use for ft_freqstatistics by myself. I made a a structur as follows: Condition 1 'EEGa': --> 10 subjects: EEGa{1:10} label: {128x1 cell} %128 egi elec. dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Condition 2 'EEGm': EEGm{1:10} label: {128x1 cell} dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Then I performed the following steps: cfg = []; cfg.elec = elec; %was defined before EGI 128 electrodes cfg.neighbours = neighbours; %also successfully defined before cfg.latency = 'all'; %cfg.frequency = 'all'; cfg.channel = 'all';%eleselection % see CHANNELSELECTION cfg.avgovertime = 'no'; %cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'depsamplesT'; cfg.numrandomization = 2^10; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.alpha = 0.05; cfg.clustertail = 0; cfg.feedback = 'gui'; cfg.parameter = 'powspctrm'; cfg.design = [ 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 % subject number 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); The function ft_freqstatistics runs but the stats results are strange. My stats.stat is always -inf and stats.prob always 0 What might be the problem? Thanks and all the best Caroline Von meinem iPhone gesendet -------------- next part -------------- An HTML attachment was scrubbed... URL: From chakalov.ivan at googlemail.com Mon Nov 12 11:16:48 2012 From: chakalov.ivan at googlemail.com (Ivan Chakalov) Date: Mon, 12 Nov 2012 11:16:48 +0100 Subject: [FieldTrip] baseline_normalization Message-ID: Dear Fieldtrippers, I have question regarding the baseline normalization using Time Frequency Analyses on a sensor space-level. I have used “Hanning tapper “for analyzing MEG data with “relchange” (relative change) baseline-normalization. So far I have no idea how to report the obtained results in terms of units or dimensions? Should it be called “relative change of the spectral power”? As I understood, if *Pa* is the spectral power of the post-rigger time-period and *Pb* is the spectral power of the pre-trigger period, the “relchange” value is calculated as: Pa-Pb/Pb Am I correct? Thank you in advanced! Ivan Chakalov -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon Nov 12 11:24:42 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 12 Nov 2012 11:24:42 +0100 Subject: [FieldTrip] baseline_normalization In-Reply-To: References: Message-ID: Dear Ivan, Yes, you are correct. I think "relative change of spectral power" covers what the formula means quite well. Best, Eelke On 12 November 2012 11:16, Ivan Chakalov wrote: > Dear Fieldtrippers, > > I have question regarding the baseline normalization using Time Frequency > Analyses on a sensor space-level. I have used “Hanning tapper “for analyzing > MEG data with “relchange” (relative change) baseline-normalization. So far I > have no idea how to report the obtained results in terms of units or > dimensions? Should it be called “relative change of the spectral power”? As > I understood, if Pa is the spectral power of the post-rigger time-period and > Pb is the spectral power of the pre-trigger period, the “relchange” value is > calculated as: Pa-Pb/Pb > > Am I correct? > > > > Thank you in advanced! > > Ivan Chakalov > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From chakalov.ivan at googlemail.com Mon Nov 12 11:27:47 2012 From: chakalov.ivan at googlemail.com (Ivan Chakalov) Date: Mon, 12 Nov 2012 11:27:47 +0100 Subject: [FieldTrip] baseline_normalization In-Reply-To: References: Message-ID: Thanks a lot! On 12 November 2012 11:24, Eelke Spaak wrote: > Dear Ivan, > > Yes, you are correct. I think "relative change of spectral power" > covers what the formula means quite well. > > Best, > Eelke > > On 12 November 2012 11:16, Ivan Chakalov > wrote: > > Dear Fieldtrippers, > > > > I have question regarding the baseline normalization using Time Frequency > > Analyses on a sensor space-level. I have used “Hanning tapper “for > analyzing > > MEG data with “relchange” (relative change) baseline-normalization. So > far I > > have no idea how to report the obtained results in terms of units or > > dimensions? Should it be called “relative change of the spectral > power”? As > > I understood, if Pa is the spectral power of the post-rigger time-period > and > > Pb is the spectral power of the pre-trigger period, the “relchange” > value is > > calculated as: Pa-Pb/Pb > > > > Am I correct? > > > > > > > > Thank you in advanced! > > > > Ivan Chakalov > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Mon Nov 12 14:30:28 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Mon, 12 Nov 2012 07:30:28 -0600 Subject: [FieldTrip] Cluster statistics Message-ID: Hi Caroline, It looks to me like your grand averages don't have any EEG data in them; here is what mine look like: label: {60x1 cell} time: [1x601 double] individual: [19x60x601 double] dimord: 'subj_chan_time' cfg: [1x1 struct] elec: [1x1 struct] To run cluster statistics your structure has to have that "individual" field, which has the ERPs for each subject (for instance, from mine you can see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). I got mine by importing each subject's data into FieldTrip, and then using ft_timelockgrandaverage() with cfg.keepindividual='yes'. That is my guess about what your problem is, but I could be wrong. After you ran it, did you check stat.posclusters and stat.negclusters? I think those are more important than stat.stat and stat.prob; they tell you which clusters are actually significant (and stat.posclusterslabelmat and stat.negclusterslabelmat tell you where/when the clusters are). Best, Steve Message: 1 > Date: Sun, 11 Nov 2012 13:25:31 +0000 > From: Lustenberger Caroline > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Cluster statistics > Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A at kispi.uzh.ch> > Content-Type: text/plain; charset="utf-8" > > Dear fieldtrip users > > I tried to perform cluster analysis with fieldtrip. Since I've performed > preprocessing/frequency analysis before using fieldtrip, I had to form the > specific > data structure to use for ft_freqstatistics by myself. > > I made a a structur as follows: > Condition 1 'EEGa': > --> 10 subjects: > EEGa{1:10} > label: {128x1 cell} %128 egi elec. > dimord: 'chan_freq' > freq: 1 > powspctrm: [128x1 double] > cumtapcnt: 1 > cfg: [1x1 struct] > > Condition 2 'EEGm': > EEGm{1:10} > label: {128x1 cell} > dimord: 'chan_freq' > freq: 1 > powspctrm: [128x1 double] > cumtapcnt: 1 > cfg: [1x1 struct] > > > Then I performed the following steps: > > cfg = []; > > cfg.elec = elec; %was defined before EGI 128 electrodes > > cfg.neighbours = neighbours; %also successfully defined before > > cfg.latency = 'all'; > > %cfg.frequency = 'all'; > > cfg.channel = 'all';%eleselection % see CHANNELSELECTION > > cfg.avgovertime = 'no'; > > %cfg.avgoverfreq = 'no'; > > cfg.avgoverchan = 'no'; > > cfg.statistic = 'depsamplesT'; > > cfg.numrandomization = 2^10; > > cfg.correctm = 'cluster'; > > cfg.method = 'montecarlo'; > > cfg.clusteralpha = 0.05; > > cfg.alpha = 0.05; > > cfg.alpha = 0.05; > > cfg.clustertail = 0; > > cfg.feedback = 'gui'; > > cfg.parameter = 'powspctrm'; > > cfg.design = [ > > 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 > 9 10 % subject number > > 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number > > cfg.uvar = 1; % "subject" is unit of observation > > cfg.ivar = 2; % "condition" is the independent variable > > stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); > > > > > The function ft_freqstatistics runs but the stats results are strange. > My stats.stat is always -inf > and stats.prob always 0 > > What might be the problem? > > > Thanks and all the best > Caroline > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Caroline.Lustenberger at kispi.uzh.ch Mon Nov 12 14:57:38 2012 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Mon, 12 Nov 2012 13:57:38 +0000 Subject: [FieldTrip] Cluster statistics In-Reply-To: Message-ID: <7C66D90E0C18014E85B44B560D4D5BC81488F224@EXZH1VM.kispi.int> Dear Steve Thank you so much for your fast answering. I try your advices and hope it works. Otherwise I let you know. All the best Caroline ________________________________ Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Politzer-Ahles Gesendet: Montag, 12. November 2012 14:30 An: fieldtrip at science.ru.nl Betreff: Re: [FieldTrip] Cluster statistics Hi Caroline, It looks to me like your grand averages don't have any EEG data in them; here is what mine look like: label: {60x1 cell} time: [1x601 double] individual: [19x60x601 double] dimord: 'subj_chan_time' cfg: [1x1 struct] elec: [1x1 struct] To run cluster statistics your structure has to have that "individual" field, which has the ERPs for each subject (for instance, from mine you can see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). I got mine by importing each subject's data into FieldTrip, and then using ft_timelockgrandaverage() with cfg.keepindividual='yes'. That is my guess about what your problem is, but I could be wrong. After you ran it, did you check stat.posclusters and stat.negclusters? I think those are more important than stat.stat and stat.prob; they tell you which clusters are actually significant (and stat.posclusterslabelmat and stat.negclusterslabelmat tell you where/when the clusters are). Best, Steve Message: 1 Date: Sun, 11 Nov 2012 13:25:31 +0000 From: Lustenberger Caroline > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Cluster statistics Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A at kispi.uzh.ch> Content-Type: text/plain; charset="utf-8" Dear fieldtrip users I tried to perform cluster analysis with fieldtrip. Since I've performed preprocessing/frequency analysis before using fieldtrip, I had to form the specific data structure to use for ft_freqstatistics by myself. I made a a structur as follows: Condition 1 'EEGa': --> 10 subjects: EEGa{1:10} label: {128x1 cell} %128 egi elec. dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Condition 2 'EEGm': EEGm{1:10} label: {128x1 cell} dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Then I performed the following steps: cfg = []; cfg.elec = elec; %was defined before EGI 128 electrodes cfg.neighbours = neighbours; %also successfully defined before cfg.latency = 'all'; %cfg.frequency = 'all'; cfg.channel = 'all';%eleselection % see CHANNELSELECTION cfg.avgovertime = 'no'; %cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'depsamplesT'; cfg.numrandomization = 2^10; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.alpha = 0.05; cfg.clustertail = 0; cfg.feedback = 'gui'; cfg.parameter = 'powspctrm'; cfg.design = [ 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 % subject number 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); The function ft_freqstatistics runs but the stats results are strange. My stats.stat is always -inf and stats.prob always 0 What might be the problem? Thanks and all the best Caroline -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.piantoni at nin.knaw.nl Mon Nov 12 16:17:01 2012 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Mon, 12 Nov 2012 16:17:01 +0100 Subject: [FieldTrip] baseline_normalization In-Reply-To: References: Message-ID: Hi Ivan, If you multiply the values by 100, you get the "percentage change", which is very straightforward to interpret. Cheers, G On Mon, Nov 12, 2012 at 11:24 AM, Eelke Spaak wrote: > Dear Ivan, > > Yes, you are correct. I think "relative change of spectral power" > covers what the formula means quite well. > > Best, > Eelke > > On 12 November 2012 11:16, Ivan Chakalov wrote: >> Dear Fieldtrippers, >> >> I have question regarding the baseline normalization using Time Frequency >> Analyses on a sensor space-level. I have used “Hanning tapper “for analyzing >> MEG data with “relchange” (relative change) baseline-normalization. So far I >> have no idea how to report the obtained results in terms of units or >> dimensions? Should it be called “relative change of the spectral power”? As >> I understood, if Pa is the spectral power of the post-rigger time-period and >> Pb is the spectral power of the pre-trigger period, the “relchange” value is >> calculated as: Pa-Pb/Pb >> >> Am I correct? >> >> >> >> Thank you in advanced! >> >> Ivan Chakalov >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From chakalov.ivan at googlemail.com Mon Nov 12 16:28:51 2012 From: chakalov.ivan at googlemail.com (Ivan Chakalov) Date: Mon, 12 Nov 2012 16:28:51 +0100 Subject: [FieldTrip] baseline_normalization In-Reply-To: References: Message-ID: Thank you, it is a very good idea! Best, Ivan On 12 November 2012 16:17, Gio Piantoni wrote: > Hi Ivan, > > If you multiply the values by 100, you get the "percentage change", > which is very straightforward to interpret. > > Cheers, > G > > On Mon, Nov 12, 2012 at 11:24 AM, Eelke Spaak > wrote: > > Dear Ivan, > > > > Yes, you are correct. I think "relative change of spectral power" > > covers what the formula means quite well. > > > > Best, > > Eelke > > > > On 12 November 2012 11:16, Ivan Chakalov > wrote: > >> Dear Fieldtrippers, > >> > >> I have question regarding the baseline normalization using Time > Frequency > >> Analyses on a sensor space-level. I have used “Hanning tapper “for > analyzing > >> MEG data with “relchange” (relative change) baseline-normalization. So > far I > >> have no idea how to report the obtained results in terms of units or > >> dimensions? Should it be called “relative change of the spectral > power”? As > >> I understood, if Pa is the spectral power of the post-rigger > time-period and > >> Pb is the spectral power of the pre-trigger period, the “relchange” > value is > >> calculated as: Pa-Pb/Pb > >> > >> Am I correct? > >> > >> > >> > >> Thank you in advanced! > >> > >> Ivan Chakalov > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Caroline.Lustenberger at kispi.uzh.ch Mon Nov 12 16:55:35 2012 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Mon, 12 Nov 2012 15:55:35 +0000 Subject: [FieldTrip] Cluster statistics In-Reply-To: Message-ID: <7C66D90E0C18014E85B44B560D4D5BC81488F2C5@EXZH1VM.kispi.int> Dear Steve It seems to work now. However, when I have NaN values in my powerspectrum array, I recieve the following error: ??? Invalid MEX-file 'C:\Users\Caroline\MATLAB_PhD\fieldtrip-20110927\fieldtrip-20110927\statfun\private\nanmean.mexw64': The specified module could not be found. Error in ==> statfun_depsamplesT at 98 avgdiff = nanmean(diffmat,2); Error in ==> statistics_montecarlo at 240 [statobs, cfg] = statfun(cfg, dat, design); Error in ==> ft_freqstatistics at 279 [stat, cfg] = statmethod(cfg, dat, cfg.design); What might be the problem? Is there a detailed documentation about the command ft_freqstatistics, especially about the meanings of the stats output and what kind of input is possible (e.g. t-test, ...) Thanks again for all your help and best wishes Caroline ________________________________ Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Politzer-Ahles Gesendet: Montag, 12. November 2012 14:30 An: fieldtrip at science.ru.nl Betreff: Re: [FieldTrip] Cluster statistics Hi Caroline, It looks to me like your grand averages don't have any EEG data in them; here is what mine look like: label: {60x1 cell} time: [1x601 double] individual: [19x60x601 double] dimord: 'subj_chan_time' cfg: [1x1 struct] elec: [1x1 struct] To run cluster statistics your structure has to have that "individual" field, which has the ERPs for each subject (for instance, from mine you can see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). I got mine by importing each subject's data into FieldTrip, and then using ft_timelockgrandaverage() with cfg.keepindividual='yes'. That is my guess about what your problem is, but I could be wrong. After you ran it, did you check stat.posclusters and stat.negclusters? I think those are more important than stat.stat and stat.prob; they tell you which clusters are actually significant (and stat.posclusterslabelmat and stat.negclusterslabelmat tell you where/when the clusters are). Best, Steve Message: 1 Date: Sun, 11 Nov 2012 13:25:31 +0000 From: Lustenberger Caroline > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Cluster statistics Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A at kispi.uzh.ch> Content-Type: text/plain; charset="utf-8" Dear fieldtrip users I tried to perform cluster analysis with fieldtrip. Since I've performed preprocessing/frequency analysis before using fieldtrip, I had to form the specific data structure to use for ft_freqstatistics by myself. I made a a structur as follows: Condition 1 'EEGa': --> 10 subjects: EEGa{1:10} label: {128x1 cell} %128 egi elec. dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Condition 2 'EEGm': EEGm{1:10} label: {128x1 cell} dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Then I performed the following steps: cfg = []; cfg.elec = elec; %was defined before EGI 128 electrodes cfg.neighbours = neighbours; %also successfully defined before cfg.latency = 'all'; %cfg.frequency = 'all'; cfg.channel = 'all';%eleselection % see CHANNELSELECTION cfg.avgovertime = 'no'; %cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'depsamplesT'; cfg.numrandomization = 2^10; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.alpha = 0.05; cfg.clustertail = 0; cfg.feedback = 'gui'; cfg.parameter = 'powspctrm'; cfg.design = [ 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 % subject number 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); The function ft_freqstatistics runs but the stats results are strange. My stats.stat is always -inf and stats.prob always 0 What might be the problem? Thanks and all the best Caroline -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Mon Nov 12 17:08:28 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 12 Nov 2012 17:08:28 +0100 Subject: [FieldTrip] Cluster statistics In-Reply-To: <7C66D90E0C18014E85B44B560D4D5BC81488F2C5@EXZH1VM.kispi.int> References: <7C66D90E0C18014E85B44B560D4D5BC81488F2C5@EXZH1VM.kispi.int> Message-ID: Dear Caroline, Just to be sure - are you working on a recent version of FieldTrip (your pathname suggests otherwise)? The error seems to suggest you are just missing the mexfile which updating your version might solve. You can take a look at the specific statfun_* functions for details about their output. A very generic overview is giving in the Fieldtrup Walkthrough (see the left dropdown documentation menu on the website) in which the output input-output structure is explained. That might help as well. Cheers, Stephen On 12 November 2012 16:55, Lustenberger Caroline < Caroline.Lustenberger at kispi.uzh.ch> wrote: > ** > Dear Steve > > It seems to work now. However, when I have NaN values in my powerspectrum > array, I recieve the following error: > > ??? Invalid MEX-file > > 'C:\Users\Caroline\MATLAB_PhD\fieldtrip-20110927\fieldtrip-20110927\statfun\private\nanmean.mexw64': > The specified module could not be found. > > Error in ==> statfun_depsamplesT at 98 > avgdiff = nanmean(diffmat,2); > > Error in ==> statistics_montecarlo at 240 > [statobs, cfg] = statfun(cfg, dat, design); > > Error in ==> ft_freqstatistics at 279 > [stat, cfg] = statmethod(cfg, dat, cfg.design); > > What might be the problem? > > Is there a detailed documentation about the command ft_freqstatistics, > especially about the meanings of the stats output and what kind of input is > possible (e.g. t-test, ...) > > Thanks again for all your help and best wishes > Caroline > > > ------------------------------ > *Von:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *Im Auftrag von *Stephen Politzer-Ahles > *Gesendet:* Montag, 12. November 2012 14:30 > *An:* fieldtrip at science.ru.nl > *Betreff:* Re: [FieldTrip] Cluster statistics > > Hi Caroline, > > It looks to me like your grand averages don't have any EEG data in them; > here is what mine look like: > > label: {60x1 cell} > time: [1x601 double] > individual: [19x60x601 double] > dimord: 'subj_chan_time' > cfg: [1x1 struct] > elec: [1x1 struct] > > To run cluster statistics your structure has to have that "individual" > field, which has the ERPs for each subject (for instance, from mine you can > see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). > I got mine by importing each subject's data into FieldTrip, and then using > ft_timelockgrandaverage() with cfg.keepindividual='yes'. > > That is my guess about what your problem is, but I could be wrong. After > you ran it, did you check stat.posclusters and stat.negclusters? I think > those are more important than stat.stat and stat.prob; they tell you which > clusters are actually significant (and stat.posclusterslabelmat and > stat.negclusterslabelmat tell you where/when the clusters are). > > Best, > Steve > > > Message: 1 >> Date: Sun, 11 Nov 2012 13:25:31 +0000 >> From: Lustenberger Caroline >> To: "fieldtrip at science.ru.nl" >> Subject: [FieldTrip] Cluster statistics >> Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A at kispi.uzh.ch> >> Content-Type: text/plain; charset="utf-8" >> >> Dear fieldtrip users >> >> I tried to perform cluster analysis with fieldtrip. Since I've performed >> preprocessing/frequency analysis before using fieldtrip, I had to form the >> specific >> data structure to use for ft_freqstatistics by myself. >> >> I made a a structur as follows: >> Condition 1 'EEGa': >> --> 10 subjects: >> EEGa{1:10} >> label: {128x1 cell} %128 egi elec. >> dimord: 'chan_freq' >> freq: 1 >> powspctrm: [128x1 double] >> cumtapcnt: 1 >> cfg: [1x1 struct] >> >> Condition 2 'EEGm': >> EEGm{1:10} >> label: {128x1 cell} >> dimord: 'chan_freq' >> freq: 1 >> powspctrm: [128x1 double] >> cumtapcnt: 1 >> cfg: [1x1 struct] >> >> >> Then I performed the following steps: >> >> cfg = []; >> >> cfg.elec = elec; %was defined before EGI 128 electrodes >> >> cfg.neighbours = neighbours; %also successfully defined before >> >> cfg.latency = 'all'; >> >> %cfg.frequency = 'all'; >> >> cfg.channel = 'all';%eleselection % see CHANNELSELECTION >> >> cfg.avgovertime = 'no'; >> >> %cfg.avgoverfreq = 'no'; >> >> cfg.avgoverchan = 'no'; >> >> cfg.statistic = 'depsamplesT'; >> >> cfg.numrandomization = 2^10; >> >> cfg.correctm = 'cluster'; >> >> cfg.method = 'montecarlo'; >> >> cfg.clusteralpha = 0.05; >> >> cfg.alpha = 0.05; >> >> cfg.alpha = 0.05; >> >> cfg.clustertail = 0; >> >> cfg.feedback = 'gui'; >> >> cfg.parameter = 'powspctrm'; >> >> cfg.design = [ >> >> 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 >> 9 10 % subject number >> >> 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number >> >> cfg.uvar = 1; % "subject" is unit of observation >> >> cfg.ivar = 2; % "condition" is the independent variable >> >> stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); >> >> >> >> >> The function ft_freqstatistics runs but the stats results are strange. >> My stats.stat is always -inf >> and stats.prob always 0 >> >> What might be the problem? >> >> >> Thanks and all the best >> Caroline >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ulrich.Pomper at charite.de Mon Nov 12 20:01:07 2012 From: Ulrich.Pomper at charite.de (Pomper, Ulrich) Date: Mon, 12 Nov 2012 20:01:07 +0100 Subject: [FieldTrip] =?windows-1252?q?_PhD_position=2C_Department_of_Psych?= =?windows-1252?q?iatry_and_Psychotherapy=2C_Charit=E9_Berlin?= In-Reply-To: <4B78B221-796B-4B89-97B8-BA2A51C0F92D@charite.de> References: <4B78B221-796B-4B89-97B8-BA2A51C0F92D@charite.de> Message-ID: The Department of Psychiatry and Psychotherapy, Charité – Universitätsmedizin Berlin invites applications for a PhD position A Starting Grant of the European Research Council (ERC) will fund the currently open position (initially 24 months). The main objective of this ERC research program is to examine neural markers of multisensory integration and to test a new hypothesis that considers dynamic interplay of synchronized neural populations as a key to multisensory processes. The studies within this program include EEG and other neuroimaging methods. Studies will be conducted in healthy subjects and patients with schizophrenia. Multisensory processes will be examined in a series of experiments requiring both bottom-up and top-down processing. Applicants should have a background in psychology, medicine, biology, physics, engineering, or neuroscience. Basic experience in human EEG or MEG studies, Matlab programming skills, as well as some German language skills for interacting with patients are prerequisites for the position. An interest in neurophysiological studies including clinical populations is expected. Applicants are asked to submit their CV, a motivation letter including information about a possible starting date, 2 names of referees, and documentation of relevant qualifications (e.g., copies of diplomas and/or transcripts of grades) until November 25, 2012, electronically to: daniel.senkowski at charite.de Regards, Daniel Senkowski --------------------------------------------------------------- Daniel Senkowski, Ph.D. Professor of Clinical Neuropsychology Department of Psychiatry and Psychotherapy Charité, University Medicine Berlin St. Hedwig Hospital, Große Hamburger Str. 5-11 10115 Berlin, Germany www.danielsenkowski.com http://psy-ccm.charite.de/en/research/neuroimaging/multisensory_integration -------------- next part -------------- An HTML attachment was scrubbed... URL: From Caroline.Lustenberger at kispi.uzh.ch Tue Nov 13 09:02:22 2012 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Tue, 13 Nov 2012 08:02:22 +0000 Subject: [FieldTrip] Cluster statistics In-Reply-To: Message-ID: <7C66D90E0C18014E85B44B560D4D5BC81488F447@EXZH1VM.kispi.int> Dear Stephen Thank you, It now perfectly works, but I always get this warning I'm not sure how to handle that: Warning: doing a two-sided test without correcting p-values or alpha-level, p-values and alpha-level will reflect one-sided tests per tail cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.clustertail = 0; When I want to test whether my data is significant different (direction not known, therefore two sided) with an alpha level <0.05 do I have to adjust my level to 0.025? All the Best, Caroline ________________________________ Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Whitmarsh Gesendet: Montag, 12. November 2012 17:08 An: FieldTrip discussion list Betreff: Re: [FieldTrip] Cluster statistics Dear Caroline, Just to be sure - are you working on a recent version of FieldTrip (your pathname suggests otherwise)? The error seems to suggest you are just missing the mexfile which updating your version might solve. You can take a look at the specific statfun_* functions for details about their output. A very generic overview is giving in the Fieldtrup Walkthrough (see the left dropdown documentation menu on the website) in which the output input-output structure is explained. That might help as well. Cheers, Stephen On 12 November 2012 16:55, Lustenberger Caroline > wrote: Dear Steve It seems to work now. However, when I have NaN values in my powerspectrum array, I recieve the following error: ??? Invalid MEX-file 'C:\Users\Caroline\MATLAB_PhD\fieldtrip-20110927\fieldtrip-20110927\statfun\private\nanmean.mexw64': The specified module could not be found. Error in ==> statfun_depsamplesT at 98 avgdiff = nanmean(diffmat,2); Error in ==> statistics_montecarlo at 240 [statobs, cfg] = statfun(cfg, dat, design); Error in ==> ft_freqstatistics at 279 [stat, cfg] = statmethod(cfg, dat, cfg.design); What might be the problem? Is there a detailed documentation about the command ft_freqstatistics, especially about the meanings of the stats output and what kind of input is possible (e.g. t-test, ...) Thanks again for all your help and best wishes Caroline ________________________________ Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Politzer-Ahles Gesendet: Montag, 12. November 2012 14:30 An: fieldtrip at science.ru.nl Betreff: Re: [FieldTrip] Cluster statistics Hi Caroline, It looks to me like your grand averages don't have any EEG data in them; here is what mine look like: label: {60x1 cell} time: [1x601 double] individual: [19x60x601 double] dimord: 'subj_chan_time' cfg: [1x1 struct] elec: [1x1 struct] To run cluster statistics your structure has to have that "individual" field, which has the ERPs for each subject (for instance, from mine you can see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). I got mine by importing each subject's data into FieldTrip, and then using ft_timelockgrandaverage() with cfg.keepindividual='yes'. That is my guess about what your problem is, but I could be wrong. After you ran it, did you check stat.posclusters and stat.negclusters? I think those are more important than stat.stat and stat.prob; they tell you which clusters are actually significant (and stat.posclusterslabelmat and stat.negclusterslabelmat tell you where/when the clusters are). Best, Steve Message: 1 Date: Sun, 11 Nov 2012 13:25:31 +0000 From: Lustenberger Caroline > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Cluster statistics Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A at kispi.uzh.ch> Content-Type: text/plain; charset="utf-8" Dear fieldtrip users I tried to perform cluster analysis with fieldtrip. Since I've performed preprocessing/frequency analysis before using fieldtrip, I had to form the specific data structure to use for ft_freqstatistics by myself. I made a a structur as follows: Condition 1 'EEGa': --> 10 subjects: EEGa{1:10} label: {128x1 cell} %128 egi elec. dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Condition 2 'EEGm': EEGm{1:10} label: {128x1 cell} dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Then I performed the following steps: cfg = []; cfg.elec = elec; %was defined before EGI 128 electrodes cfg.neighbours = neighbours; %also successfully defined before cfg.latency = 'all'; %cfg.frequency = 'all'; cfg.channel = 'all';%eleselection % see CHANNELSELECTION cfg.avgovertime = 'no'; %cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'depsamplesT'; cfg.numrandomization = 2^10; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.alpha = 0.05; cfg.clustertail = 0; cfg.feedback = 'gui'; cfg.parameter = 'powspctrm'; cfg.design = [ 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 % subject number 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); The function ft_freqstatistics runs but the stats results are strange. My stats.stat is always -inf and stats.prob always 0 What might be the problem? Thanks and all the best Caroline _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Tue Nov 13 09:27:04 2012 From: julian.keil at gmail.com (Julian Keil) Date: Tue, 13 Nov 2012 09:27:04 +0100 Subject: [FieldTrip] Cluster statistics In-Reply-To: <7C66D90E0C18014E85B44B560D4D5BC81488F447@EXZH1VM.kispi.int> References: <7C66D90E0C18014E85B44B560D4D5BC81488F447@EXZH1VM.kispi.int> Message-ID: Dear Caroline, that's what the option cfg.correcttail = 'alpha'; is for. Good Luck Am 13.11.2012 um 09:02 schrieb Lustenberger Caroline: > Dear Stephen > > Thank you, It now perfectly works, but I always get this warning I'm not sure how to handle that: > > Warning: doing a two-sided test without correcting p-values or alpha-level, > p-values and alpha-level will reflect one-sided tests per tail > > cfg.clusteralpha = 0.05; > > cfg.alpha = 0.05; > > cfg.clustertail = 0; > > When I want to test whether my data is significant different (direction not known, therefore two sided) with an alpha level <0.05 do I have to adjust my level to 0.025? > > All the Best, Caroline > > Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Whitmarsh > Gesendet: Montag, 12. November 2012 17:08 > An: FieldTrip discussion list > Betreff: Re: [FieldTrip] Cluster statistics > > Dear Caroline, > > Just to be sure - are you working on a recent version of FieldTrip (your pathname suggests otherwise)? The error seems to suggest you are just missing the mexfile which updating your version might solve. > > You can take a look at the specific statfun_* functions for details about their output. A very generic overview is giving in the Fieldtrup Walkthrough (see the left dropdown documentation menu on the website) in which the output input-output structure is explained. That might help as well. > > Cheers, > Stephen > > > > On 12 November 2012 16:55, Lustenberger Caroline wrote: > Dear Steve > > It seems to work now. However, when I have NaN values in my powerspectrum array, I recieve the following error: > > ??? Invalid MEX-file > 'C:\Users\Caroline\MATLAB_PhD\fieldtrip-20110927\fieldtrip-20110927\statfun\private\nanmean.mexw64': > The specified module could not be found. > > Error in ==> statfun_depsamplesT at 98 > avgdiff = nanmean(diffmat,2); > > Error in ==> statistics_montecarlo at 240 > [statobs, cfg] = statfun(cfg, dat, design); > > Error in ==> ft_freqstatistics at 279 > [stat, cfg] = statmethod(cfg, dat, cfg.design); > > What might be the problem? > > Is there a detailed documentation about the command ft_freqstatistics, especially about the meanings of the stats output and what kind of input is possible (e.g. t-test, ...) > > Thanks again for all your help and best wishes > Caroline > > > Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Politzer-Ahles > Gesendet: Montag, 12. November 2012 14:30 > An: fieldtrip at science.ru.nl > Betreff: Re: [FieldTrip] Cluster statistics > > Hi Caroline, > > It looks to me like your grand averages don't have any EEG data in them; here is what mine look like: > > label: {60x1 cell} > time: [1x601 double] > individual: [19x60x601 double] > dimord: 'subj_chan_time' > cfg: [1x1 struct] > elec: [1x1 struct] > > To run cluster statistics your structure has to have that "individual" field, which has the ERPs for each subject (for instance, from mine you can see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). I got mine by importing each subject's data into FieldTrip, and then using ft_timelockgrandaverage() with cfg.keepindividual='yes'. > > That is my guess about what your problem is, but I could be wrong. After you ran it, did you check stat.posclusters and stat.negclusters? I think those are more important than stat.stat and stat.prob; they tell you which clusters are actually significant (and stat.posclusterslabelmat and stat.negclusterslabelmat tell you where/when the clusters are). > > Best, > Steve > > > Message: 1 > Date: Sun, 11 Nov 2012 13:25:31 +0000 > From: Lustenberger Caroline > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Cluster statistics > Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A at kispi.uzh.ch> > Content-Type: text/plain; charset="utf-8" > > Dear fieldtrip users > > I tried to perform cluster analysis with fieldtrip. Since I've performed preprocessing/frequency analysis before using fieldtrip, I had to form the specific > data structure to use for ft_freqstatistics by myself. > > I made a a structur as follows: > Condition 1 'EEGa': > --> 10 subjects: > EEGa{1:10} > label: {128x1 cell} %128 egi elec. > dimord: 'chan_freq' > freq: 1 > powspctrm: [128x1 double] > cumtapcnt: 1 > cfg: [1x1 struct] > > Condition 2 'EEGm': > EEGm{1:10} > label: {128x1 cell} > dimord: 'chan_freq' > freq: 1 > powspctrm: [128x1 double] > cumtapcnt: 1 > cfg: [1x1 struct] > > > Then I performed the following steps: > > cfg = []; > > cfg.elec = elec; %was defined before EGI 128 electrodes > > cfg.neighbours = neighbours; %also successfully defined before > > cfg.latency = 'all'; > > %cfg.frequency = 'all'; > > cfg.channel = 'all';%eleselection % see CHANNELSELECTION > > cfg.avgovertime = 'no'; > > %cfg.avgoverfreq = 'no'; > > cfg.avgoverchan = 'no'; > > cfg.statistic = 'depsamplesT'; > > cfg.numrandomization = 2^10; > > cfg.correctm = 'cluster'; > > cfg.method = 'montecarlo'; > > cfg.clusteralpha = 0.05; > > cfg.alpha = 0.05; > > cfg.alpha = 0.05; > > cfg.clustertail = 0; > > cfg.feedback = 'gui'; > > cfg.parameter = 'powspctrm'; > > cfg.design = [ > > 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 % subject number > > 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number > > cfg.uvar = 1; % "subject" is unit of observation > > cfg.ivar = 2; % "condition" is the independent variable > > stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); > > > > > The function ft_freqstatistics runs but the stats results are strange. > My stats.stat is always -inf > and stats.prob always 0 > > What might be the problem? > > > Thanks and all the best > Caroline > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Tue Nov 13 13:58:50 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 13 Nov 2012 06:58:50 -0600 Subject: [FieldTrip] fieldtrip Digest, Vol 24, Issue 16 In-Reply-To: References: Message-ID: Hi Caroline, It looks like your call is missing cfg.correctm = 'cluster'; cfg.tail = 0; Those are both options that I include when I do it; I'm not sure if not having those might be what's giving you the error message. Best, Steve Message: 2 > Date: Tue, 13 Nov 2012 08:02:22 +0000 > From: Lustenberger Caroline > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Cluster statistics > Message-ID: > <7C66D90E0C18014E85B44B560D4D5BC81488F447 at EXZH1VM.kispi.int> > Content-Type: text/plain; charset="us-ascii" > > Dear Stephen > > Thank you, It now perfectly works, but I always get this warning I'm not > sure how to handle that: > > Warning: doing a two-sided test without correcting p-values or alpha-level, > p-values and alpha-level will reflect one-sided tests per tail > > > cfg.clusteralpha = 0.05; > > cfg.alpha = 0.05; > > cfg.clustertail = 0; > > When I want to test whether my data is significant different (direction > not known, therefore two sided) with an alpha level <0.05 do I have to > adjust my level to 0.025? > > All the Best, Caroline > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Caroline.Lustenberger at kispi.uzh.ch Tue Nov 13 14:40:51 2012 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Tue, 13 Nov 2012 13:40:51 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 24, Issue 16 In-Reply-To: Message-ID: <7C66D90E0C18014E85B44B560D4D5BC81488F538@EXZH1VM.kispi.int> Dear Steve Thank you so much for your advice. My script looks now as follows: cfg = []; cfg.elec = elec; cfg.computeprob = 'yes' cfg.neighbours = neighbours; %cfg.latency = 'all'; cfg.frequency = 'all'; cfg.channel = 'all'%'all';%eleselection % see CHANNELSELECTION %cfg.avgovertime = 'no'; %cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'depsamplesT'; cfg.numrandomization = 2^6;% 2^number subjects cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.tail = 0; cfg.clustertail = 0; cfg.correcttail = 'alpha' cfg.feedback = 'gui'; cfg.parameter = 'powspctrm'; % cfg.design = [ % 1 2 3 4 1 2 3 4 % subject number % 1 1 1 1 2 2 2 2 ]; % condition number cfg.design(1,:)=[1:6,1:6] cfg.design(2,:)=[ones(1,6),ones(1,6)+1] cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable stat = ft_freqstatistics(cfg,sd, ld); Do you think this is now correct? We perform statistics on high-density EEG Power values and want to see whether differences that we see doing simple t-test also remain when we correct for multiple comparison. Again many thanks and all the best Caroline ________________________________ Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Politzer-Ahles Gesendet: Dienstag, 13. November 2012 13:59 An: fieldtrip at science.ru.nl Betreff: Re: [FieldTrip] fieldtrip Digest, Vol 24, Issue 16 Hi Caroline, It looks like your call is missing cfg.correctm = 'cluster'; cfg.tail = 0; Those are both options that I include when I do it; I'm not sure if not having those might be what's giving you the error message. Best, Steve Message: 2 Date: Tue, 13 Nov 2012 08:02:22 +0000 From: Lustenberger Caroline > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Cluster statistics Message-ID: <7C66D90E0C18014E85B44B560D4D5BC81488F447 at EXZH1VM.kispi.int> Content-Type: text/plain; charset="us-ascii" Dear Stephen Thank you, It now perfectly works, but I always get this warning I'm not sure how to handle that: Warning: doing a two-sided test without correcting p-values or alpha-level, p-values and alpha-level will reflect one-sided tests per tail cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.clustertail = 0; When I want to test whether my data is significant different (direction not known, therefore two sided) with an alpha level <0.05 do I have to adjust my level to 0.025? All the Best, Caroline -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Tue Nov 13 15:14:08 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 13 Nov 2012 08:14:08 -0600 Subject: [FieldTrip] Cluster statistics Message-ID: Hi Caroline, It looks like your call is missing cfg.correctm = 'cluster'; cfg.tail = 0; Those are both options that I include when I do it; I'm not sure if not having those might be what's giving you the error message. Best, Steve Message: 2 > Date: Tue, 13 Nov 2012 08:02:22 +0000 > From: Lustenberger Caroline > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Cluster statistics > Message-ID: > <7C66D90E0C18014E85B44B560D4D5BC81488F447 at EXZH1VM.kispi.int> > Content-Type: text/plain; charset="us-ascii" > > Dear Stephen > > Thank you, It now perfectly works, but I always get this warning I'm not > sure how to handle that: > > Warning: doing a two-sided test without correcting p-values or alpha-level, > p-values and alpha-level will reflect one-sided tests per tail > > > cfg.clusteralpha = 0.05; > > cfg.alpha = 0.05; > > cfg.clustertail = 0; > > When I want to test whether my data is significant different (direction > not known, therefore two sided) with an alpha level <0.05 do I have to > adjust my level to 0.025? > > All the Best, Caroline > > ________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at mac.com Tue Nov 13 15:49:47 2012 From: nathanweisz at mac.com (Nathan Weisz) Date: Tue, 13 Nov 2012 15:49:47 +0100 Subject: [FieldTrip] postdoc position at CIMeC MEG lab Message-ID: ERC-funded post-doc in conscious perception research Research in the Ongoing Brain Oscillations and Behaviour Lab at the Center for Mind/Brain Sciences focuses on brain activity / connectivity patterns predisposing conscious perception. Our works mostly involves MEG, intracranial EEG and combined TMS/EEG studies. https://sites.google.com/site/obobcimec/ We are currently looking for a candidate at a Postdoc level to strengthen our team. This postdoc is expected to have solid experience with at least one of the aforementioned methods and proficiency in Matlab applied to the analysis of MEG / EEG data. The Center for Mind/Brain Sciences at the University of Trento is an oustanding work-place situated in a beautiful surrounding (e.g. Dolomites, diverse lakes; see http://www.visittrentino.it/en). It offers an international and vibrant research setting with state-of-the-art neuroimaging methodologies, including a research-only MRI scanner, MEG, EEG and TMS, as well as behavioral, eye tracking and motion tracking laboratories. The University of Trento is ranked first among research universities in Italy, and the Trentino region is consistently at the top for quality of life and for the most efficient services in Italy. English is the official language of the CIMeC, where a large proportion of the faculty, post-docs and students come from a wide range of countries outside of Italy. Interested candidates are encouraged to contact me by email at nathan.weisz at unitn.it -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Tue Nov 13 16:25:19 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 13 Nov 2012 09:25:19 -0600 Subject: [FieldTrip] Cluster statistics Message-ID: Hi Caroline, That all looks good to me, as far as I can tell from a quick glance (but I've only ever tried cluster statistics on ERPs, not on time-frequency data, so there might be differences I don't know about). But 2^6 (64) seems like a very small number of randomizations. The rule of thumb I follow (based on the recommendation in the tutorial) is to use 500 the first time, and if I get some marginal or borderline results then re-do it with something like 1000 or even 5000 randomizations just to be sure. 64 randomizations might not be enough to converge on a reliable result (i.e., if you run the same test several times with only 64 randomizations, you might get different results each time, whereas if you run it several times with 1000 or more randomizations your results probably will be stable) Best, Steve > Message: 2 > Date: Tue, 13 Nov 2012 13:40:51 +0000 > From: Lustenberger Caroline > To: FieldTrip discussion list > Subject: Re: [FieldTrip] fieldtrip Digest, Vol 24, Issue 16 > Message-ID: > <7C66D90E0C18014E85B44B560D4D5BC81488F538 at EXZH1VM.kispi.int> > Content-Type: text/plain; charset="us-ascii" > > Dear Steve > > Thank you so much for your advice. My script looks now as follows: > > > cfg = []; > > cfg.elec = elec; > > cfg.computeprob = 'yes' > > cfg.neighbours = neighbours; > > %cfg.latency = 'all'; > > cfg.frequency = 'all'; > > cfg.channel = 'all'%'all';%eleselection % see CHANNELSELECTION > > %cfg.avgovertime = 'no'; > > %cfg.avgoverfreq = 'no'; > > cfg.avgoverchan = 'no'; > > cfg.statistic = 'depsamplesT'; > > cfg.numrandomization = 2^6;% 2^number subjects > > cfg.correctm = 'cluster'; > > cfg.method = 'montecarlo'; > > cfg.clusteralpha = 0.05; > > cfg.alpha = 0.05; > > cfg.tail = 0; > > cfg.clustertail = 0; > > cfg.correcttail = 'alpha' > > cfg.feedback = 'gui'; > > cfg.parameter = 'powspctrm'; > > % cfg.design = [ > > % 1 2 3 4 1 2 3 4 % subject number > > % 1 1 1 1 2 2 2 2 ]; % condition number > > cfg.design(1,:)=[1:6,1:6] > > cfg.design(2,:)=[ones(1,6),ones(1,6)+1] > > cfg.uvar = 1; % "subject" is unit of observation > > cfg.ivar = 2; > > % "condition" is the independent variable > > stat = ft_freqstatistics(cfg,sd, ld); > > > Do you think this is now correct? We perform statistics on high-density > EEG Power values and want to see whether differences that we see doing > simple t-test also remain when we correct for multiple comparison. > > Again many thanks and all the best > Caroline > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Wed Nov 14 10:35:10 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Wed, 14 Nov 2012 10:35:10 +0100 Subject: [FieldTrip] correction for movement tool Message-ID: Dear all, Do you have some tool which can correct data for the movements during MEG measurement? Our data were obtained on the CTF MEG 275 system. All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Wed Nov 14 11:07:50 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Wed, 14 Nov 2012 11:07:50 +0100 (CET) Subject: [FieldTrip] correction for movement tool In-Reply-To: Message-ID: <1692488181.1258768.1352887670587.JavaMail.root@sculptor.zimbra.ru.nl> Hi Nenad, There are a few (online and offline) tools implemented in FieldTrip to deal with head movements in MEG. For instance, have a look here: http://fieldtrip.fcdonders.nl/example/how_to_incorporate_head_movements_in_meg_analysis ft_regressconfound is particularly useful for removing trial-by-trial variance from the data that can be explained by head movements. We found it to have a significant impact on statistical sensitivity. At our institute, we use a real-time head localizer to reposition the subject between and within sessions (prevent/minimalize different head positions ) . http://fieldtrip.fcdonders.nl/faq/how_can_i_monitor_a_subject_s_head_position_during_a_meg_session Currently, it is implemented only  for CTF systems (with the continous head localization upgrade) but we are working on extending its implementation to other systems.    Yours, Arjen ----- Oorspronkelijk bericht ----- > Van: "Nenad Polomac" > Aan: fieldtrip at science.ru.nl > Verzonden: Woensdag 14 november 2012 10:35:10 > Onderwerp: [FieldTrip] correction for movement tool > Dear all, > Do you have some tool which can correct data for the movements during > MEG measurement? Our data were obtained on the CTF MEG 275 system. > All the best! > Nenad > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcgoiv0 at wfu.edu Wed Nov 14 14:31:15 2012 From: mcgoiv0 at wfu.edu (McGowin, Inna) Date: Wed, 14 Nov 2012 08:31:15 -0500 Subject: [FieldTrip] correction for movement tool In-Reply-To: <1692488181.1258768.1352887670587.JavaMail.root@sculptor.zimbra.ru.nl> References: <1692488181.1258768.1352887670587.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Hello Arjen, Thanks for the links on the head motion correction. Could you please point a source or a reference on which the FieldTrip head motion correction method is based? Is it expansion of magnetic scalar potential in spherical harmonics or some other method? How accurate is the correction and what are the limitations for its application; in other words does it correct for motion up to 3 cm or beyond? What is the minimum motion that does not need to be corrected, for example we allow 5 mm? Thanks, Inna On Wed, Nov 14, 2012 at 5:07 AM, Stolk, A. wrote: > Hi Nenad, > > > > There are a few (online and offline) tools implemented in FieldTrip to > deal with head movements in MEG. > > > > For instance, have a look here: > > > http://fieldtrip.fcdonders.nl/example/how_to_incorporate_head_movements_in_meg_analysis > > > > ft_regressconfound is particularly useful for removing trial-by-trial > variance from the data that can be explained by head movements. We found it > to have a significant impact on statistical sensitivity. > > > > At our institute, we use a real-time head localizer to reposition the > subject between and within sessions (prevent/minimalize different head > positions). > > > > > http://fieldtrip.fcdonders.nl/faq/how_can_i_monitor_a_subject_s_head_position_during_a_meg_session > > > Currently, it is implemented only for CTF systems (with the continous head > localization upgrade) but we are working on extending its implementation to > other systems. > > > > Yours, > > Arjen > > ------------------------------ > > *Van: *"Nenad Polomac" > *Aan: *fieldtrip at science.ru.nl > *Verzonden: *Woensdag 14 november 2012 10:35:10 > *Onderwerp: *[FieldTrip] correction for movement tool > > > Dear all, > > Do you have some tool which can correct data for the movements during MEG > measurement? Our data were obtained on the CTF MEG 275 system. > > All the best! > > Nenad > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Inna McGowin -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Wed Nov 14 15:57:26 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Wed, 14 Nov 2012 15:57:26 +0100 (CET) Subject: [FieldTrip] correction for movement tool In-Reply-To: Message-ID: <227289624.1267900.1352905046647.JavaMail.root@sculptor.zimbra.ru.nl> Hi Inna, You're welcome. The offline compensation method suggested (ft_regressconfound) is based on general linear modeling, and not on the  signal space separation method (Taulu et al., 2005, MaxFilter, Neuromag - not implemented in FieldTrip) you are referring to. Head movements blur the topography of the neuronal sources of the MEG signal, increase localization errors, and reduce statistical sensitivity. This GLM-based method is geared to improve statistical sensitivity rather than t opographical blurring and localization bias.  More specifically, it does not interpolate/extrapolate the magnetic field distribution measured by the sensor array to a magnetic field distribution that would have been measured had the sensors been at a desired location. Instead, it removes head movement related trial-by-trial variance from the data, by incorporating head position time-series into a general linear model.   A recently performed study (*) showed that this method improves statictical sensitivity without changing the pattern of activity. This is useful when you're testing an hypothesis, derived from a cognitive research question, because it reduces the risk of false negatives. With respect to your question; in case you are particularly interested in reducing  localization bias, I could recommend you to have a look at Uutela et al., NeuroImage, 2001. The forward calculation correction method suggested there incorporates head position information into the source reconstruction procedure. This method is implemented as ft_headmovement in FieldTrip. I cannot give you any numbers except from the ones reported there, but for all offline methods it holds that you need to be able to  measure the magnetic field distribution in order to know (and interpolate)   it. Hope this answered your question a bit. Feel free to ask more details. Yours, arjen (*) Stolk, Todorovic, Schoffelen & Oostenveld. Online and offline tools for head movement compensation in MEG. NeuroImage, accepted pending revisions. ----- Oorspronkelijk bericht ----- > Van: "Inna McGowin" > Aan: "FieldTrip discussion list" > Verzonden: Woensdag 14 november 2012 14:31:15 > Onderwerp: Re: [FieldTrip] correction for movement tool > Hello Arjen, > Thanks for the links on the head motion correction. > Could you please point a source or a reference on which the FieldTrip > head motion correction method is based? Is it expansion of magnetic > scalar potential in spherical harmonics or some other method? How > accurate is the correction and what are the limitations for its > application; in other words does it correct for motion up to 3 cm or > beyond? > What is the minimum motion that does not need to be corrected, for > example we allow 5 mm? > Thanks, > Inna > On Wed, Nov 14, 2012 at 5:07 AM, Stolk, A. < a.stolk at fcdonders.ru.nl > > wrote: > > Hi Nenad, > >   > > There are a few (online and offline) tools implemented in FieldTrip > > to > > deal with head movements in MEG. > >   > > For instance, have a look here: > > http://fieldtrip.fcdonders.nl/example/how_to_incorporate_head_movements_in_meg_analysis > >   > > ft_regressconfound is particularly useful for removing > > trial-by-trial > > variance from the data that can be explained by head movements. We > > found it to have a significant impact on statistical sensitivity. > >   > > At our institute, we use a real-time head localizer to reposition > > the > > subject between and within sessions (prevent/minimalize different > > head > > positions). > >   > > http://fieldtrip.fcdonders.nl/faq/how_can_i_monitor_a_subject_s_head_position_during_a_meg_session > > Currently, it is implemented only for CTF systems (with the > > continous > > head localization upgrade) but we are working on extending > > its implementation to other systems.   > >   > > Yours, > > Arjen > > > Van: "Nenad Polomac" < polomacnenad at gmail.com > > > > Aan: fieldtrip at science.ru.nl > > > Verzonden: Woensdag 14 november 2012 10:35:10 > > > Onderwerp: [FieldTrip] correction for movement tool > > > Dear all, > > > Do you have some tool which can correct data for the movements > > > during > > > MEG measurement? Our data were obtained on the CTF MEG 275 system. > > > All the best! > > > Nenad > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- > Inna McGowin > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrick.jung at esi-frankfurt.de Wed Nov 14 18:24:32 2012 From: patrick.jung at esi-frankfurt.de (Jung, Patrick) Date: Wed, 14 Nov 2012 17:24:32 +0000 Subject: [FieldTrip] ICA decomposition & backprojection Message-ID: <36E953F5321EB743AC6B338995A56D63250662@UM-EXCDAG-A01.um.gwdg.de> Dear Fieldtrippers, if I do ICA in my preprocessing to reject EOG and ECG signals, the new MEG guidelines say that this might alter later source reconstruction and connectivity analyses (which I aim to do). So, worried about this, I wonder if applying ft_rejectcomponent on my raw dataset 1.) automatically modifies the leadfield matrix? 2.) the unmixing (and mixing?) matrix is saved in the new data structure somewhere (to evtl make use of it at later analysis steps)? 3.) automatically stores the information how many and what ICA components were subtracted from the data in my new data structure. Would you generally discourage to apply ICA in the preprocessing when planning source reconstruction and connectivity analysis? It's a complicated topic for me as a clinician so I hope there is no mixing in my questions ;-) Many thanks for your answers, Patrick -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Wed Nov 14 18:32:19 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Wed, 14 Nov 2012 17:32:19 +0000 Subject: [FieldTrip] error when converting from spm to ft Message-ID: Hello FT-ers In the past i had no problem when converting my data from SPM (where i do preprocessing and averaging) to FT (where I do my cluster-stats and plotting) Currently, I am using the new way to convert (previous version seems outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in the right format, ie: not freq data. But i know that it is...any advice would be much appreciated! Not to mention is warns me my data is not epoched when it is indeed so... Thank you! zita ********************* *>> D = spm_eeg_load* SPM M/EEG data object Type: evoked Transform: TF 8 conditions 326 channels 20 frequencies 501 samples/trial 8 trials Sampling frequency: 250 Hz Loaded from file C:\Users\Eva Z Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat Use the syntax D(channels, frequencies, samples, trials) to access the data Type "methods('meeg')" for the list of methods performing other operations with the object Type "help meeg/method_name" to get help about methods *>> data = spm2ft(D)* mapping condition label "11" to condition code 1 mapping condition label "12" to condition code 2 mapping condition label "21" to condition code 3 mapping condition label "22" to condition code 4 mapping condition label "31" to condition code 5 mapping condition label "32" to condition code 6 mapping condition label "41" to condition code 7 mapping condition label "42" to condition code 8 data = fsample: 250.0000 label: {326x1 cell} time: {1x8 cell} trial: {1x8 cell} trialinfo: [8x1 double] cfg: [1x1 struct] *>> data2 = ft_checkdata(data, 'datatype', 'freq')* Warning: the data does not contain a trial definition, assuming that the trials are consecutive segments of a continuous recording > In utilities\private\warning_once at 81 In utilities\private\fixsampleinfo at 54 In ft_datatype_raw at 91 In ft_checkdata at 170 Error using ft_checkdata (line 288) This function requires freq data as input. -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Wed Nov 14 19:33:51 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Wed, 14 Nov 2012 19:33:51 +0100 Subject: [FieldTrip] correction for movement tool Message-ID: Hello Arjen, Thank you very much for your suggestion. I think it will work in my data. Only thing that concerns me in this tutorial is when in the analysis pipeline I should perform this circumcenter calculation? Because if I do that e.g. before artifact rejection, I will have different numbers of trials in timelock and confound structures. Since in timelock I already removed some trials due to jumps or muscle artifacts. So what is your suggestion for this? Thank you in advance! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Thu Nov 15 08:59:24 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Thu, 15 Nov 2012 08:59:24 +0100 (CET) Subject: [FieldTrip] correction for movement tool In-Reply-To: Message-ID: <1672820011.1274993.1352966364516.JavaMail.root@sculptor.zimbra.ru.nl> Hi Nenad, Thanks for your question . These details need to be added to the wiki.  First; ft_regressconfound can be applied to timelock, freq, and source data. The estimation of  regression coefficients (beta weights of the head position data)  is performed separately for each channel and each latency, in the case of timelock data. Consequently, after compensation, the sensor level data cannot be used anymore for source modeling. To employ the GLM based compensation on the source level, single trial estimates for the cortical locations of interest have to be made from the original sensor level data, preferably using a common spatial filter based on all trials. The beta weights are subsequently estimated for each cortical location and the variance in source amplitude over trials that is explained by the head movement is removed. We therefore recommend to use ft_regressconfound as a final step prior to ft_XXXstatistics . This is indeed in contrast to the ft_rejectXXX functions. Furthermore, make sure you select the same trials in the headposition data as you have selected in your MEG data since you are going to fit the two of them . Second, circumcenter.m (on the wiki) is a helper function that calculates one position and orientation of the head. This saves some degrees of freedom (df=6) as compared to taking into account the x,y,z-coordinates of each coil separately (n=3) as regressors (df=9). When you want to also use the squares, cubes, and derivatives as regressors, this can save quite a bit of degrees. The 'circumcenter' is the geometrical center of the three coils. Hope this answered your questions. Best regards, Arjen ----- Oorspronkelijk bericht ----- > Van: "Nenad Polomac" > Aan: fieldtrip at science.ru.nl > Verzonden: Woensdag 14 november 2012 19:33:51 > Onderwerp: Re: [FieldTrip] correction for movement tool > Hello Arjen, > Thank you very much for your suggestion. I think it will work in my > data. Only thing that concerns me in this tutorial  is when in the > analysis pipeline I should perform this circumcenter calculation? > Because if I do that e.g. before artifact rejection, I will have > different numbers of trials in timelock and confound structures. Since > in timelock I already removed some trials due to jumps or muscle > artifacts. > So what is your suggestion for this? > Thank you in advance! > Nenad > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Thu Nov 15 09:58:35 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Thu, 15 Nov 2012 09:58:35 +0100 Subject: [FieldTrip] correction for movement tool Message-ID: Dear Arjen, Thank you very much for the detailed clarification! This helped a lot! :) All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Nov 15 15:55:05 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 15 Nov 2012 15:55:05 +0100 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: References: Message-ID: <50A50249.3010303@donders.ru.nl> Dear Zita, The function seems to convert the function not correctly to a freq datastructure - it seems more like raw data to me. freq data requires a .powspctrm field, which should be a matrix of observations x channels x freq x time. So you would need to use cell2mat on your .trial field. Probably you need to permute the dimensions to match this order. Additionally, you will need a .dimord field which which should be 'rpt_chan_freq_time' and you need a .freq field that contains the frequencies in that matrix. Please first make sure that your trials actually have 3 dimensions, else something else in the conversion went wrong. I don't use SPM so no clue if there is a better way than doing it manually. Best, Jörn On 11/14/2012 6:32 PM, Zita Eva Patai wrote: > Hello FT-ers > > In the past i had no problem when converting my data from SPM (where i > do preprocessing and averaging) to FT (where I do my cluster-stats and > plotting) > > Currently, I am using the new way to convert (previous version seems > outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not > in the right format, ie: not freq data. But i know that it is...any > advice would be much appreciated! Not to mention is warns me my data > is not epoched when it is indeed so... > > Thank you! > zita > > ********************* > *>> D = spm_eeg_load* > SPM M/EEG data object > Type: evoked > Transform: TF > 8 conditions > 326 channels > 20 frequencies > 501 samples/trial > 8 trials > Sampling frequency: 250 Hz > Loaded from file C:\Users\Eva Z > Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat > > Use the syntax D(channels, frequencies, samples, trials) to access the > data > Type "methods('meeg')" for the list of methods performing other > operations with the object > Type "help meeg/method_name" to get help about methods > > *>> data = spm2ft(D)* > > mapping condition label "11" to condition code 1 > mapping condition label "12" to condition code 2 > mapping condition label "21" to condition code 3 > mapping condition label "22" to condition code 4 > mapping condition label "31" to condition code 5 > mapping condition label "32" to condition code 6 > mapping condition label "41" to condition code 7 > mapping condition label "42" to condition code 8 > > data = > > fsample: 250.0000 > label: {326x1 cell} > time: {1x8 cell} > trial: {1x8 cell} > trialinfo: [8x1 double] > cfg: [1x1 struct] > > > *>> data2 = ft_checkdata(data, 'datatype', 'freq')* > Warning: the data does not contain a trial definition, assuming that > the trials are consecutive segments of a continuous recording > > In utilities\private\warning_once at 81 > In utilities\private\fixsampleinfo at 54 > In ft_datatype_raw at 91 > In ft_checkdata at 170 > Error using ft_checkdata (line 288) > This function requires freq data as input. > > > -- > > Zita Patai > DPhil, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.brovelli at univ-amu.fr Thu Nov 15 17:28:46 2012 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Thu, 15 Nov 2012 17:28:46 +0100 Subject: [FieldTrip] DICS: fixed orientation of sources option Message-ID: <20121115172846.14247fxr0mnn198g@wmelperso1.univmed.fr> Dear all, I have a question regarding the option "fixedori" of DICS (the code from lines 292 to 306 in beamformer_dics.m). If I get it right, you implemented the situation when the first singular value lambda1 is much greater that the second singular value lambda2 of Cs (Cs is given by eq. 4 of Gross et al., 2001, PNAS). I checked in my data and this is not the case. Maybe my data is just a very special case, but I find that the first is a little larger that the second. Here they are: lambda1 = 0.5380; lambda2 = 0.2921; lambda3 = 0.0000; After eq. 9 in Gross (2001), it says that if lambda1 >> lambda2 does not hold, the trace of Cs should be used instead. So, has it been implemented in Fieldtrip somewhere ? And, if not, would you know how to do it ? Thanks a lot bye Andrea From eva.patai at psy.ox.ac.uk Thu Nov 15 17:29:34 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Thu, 15 Nov 2012 16:29:34 +0000 Subject: [FieldTrip] converting from som to ft Message-ID: Hello FT-ers In the past i had no problem when converting my data from SPM (where i do preprocessing and averaging) to FT (where I do my cluster-stats and plotting) Currently, I am using the new way to convert (previous version seems outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in the right format, ie: not freq data. But i know that it is...any advice would be much appreciated! Not to mention is warns me my data is not epoched when it is indeed so... Thank you! zita ********************* *>> D = spm_eeg_load* SPM M/EEG data object Type: evoked Transform: TF 8 conditions 326 channels 20 frequencies 501 samples/trial 8 trials Sampling frequency: 250 Hz Loaded from file C:\Users\Eva Z Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat Use the syntax D(channels, frequencies, samples, trials) to access the data Type "methods('meeg')" for the list of methods performing other operations with the object Type "help meeg/method_name" to get help about methods *>> data = spm2ft(D)* mapping condition label "11" to condition code 1 mapping condition label "12" to condition code 2 mapping condition label "21" to condition code 3 mapping condition label "22" to condition code 4 mapping condition label "31" to condition code 5 mapping condition label "32" to condition code 6 mapping condition label "41" to condition code 7 mapping condition label "42" to condition code 8 data = fsample: 250.0000 label: {326x1 cell} time: {1x8 cell} trial: {1x8 cell} trialinfo: [8x1 double] cfg: [1x1 struct] *>> data2 = ft_checkdata(data, 'datatype', 'freq')* Warning: the data does not contain a trial definition, assuming that the trials are consecutive segments of a continuous recording > In utilities\private\warning_once at 81 In utilities\private\fixsampleinfo at 54 In ft_datatype_raw at 91 In ft_checkdata at 170 Error using ft_checkdata (line 288) This function requires freq data as input. -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Thu Nov 15 17:37:54 2012 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 15 Nov 2012 16:37:54 +0000 Subject: [FieldTrip] converting from som to ft In-Reply-To: References: Message-ID: Dear Zita, You do: freq = D.fttimelock in SPM. The fieldtrip function does not support TF data. Best, Vladimir On Thu, Nov 15, 2012 at 4:29 PM, Zita Eva Patai wrote: > Hello FT-ers > > In the past i had no problem when converting my data from SPM (where i do > preprocessing and averaging) to FT (where I do my cluster-stats and > plotting) > > Currently, I am using the new way to convert (previous version seems > outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in > the right format, ie: not freq data. But i know that it is...any advice > would be much appreciated! Not to mention is warns me my data is not > epoched when it is indeed so... > > Thank you! > zita > > ********************* > *>> D = spm_eeg_load* > SPM M/EEG data object > Type: evoked > Transform: TF > 8 conditions > 326 channels > 20 frequencies > 501 samples/trial > 8 trials > Sampling frequency: 250 Hz > Loaded from file C:\Users\Eva Z > Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat > > Use the syntax D(channels, frequencies, samples, trials) to access the data > Type "methods('meeg')" for the list of methods performing other operations > with the object > Type "help meeg/method_name" to get help about methods > > *>> data = spm2ft(D)* > > mapping condition label "11" to condition code 1 > mapping condition label "12" to condition code 2 > mapping condition label "21" to condition code 3 > mapping condition label "22" to condition code 4 > mapping condition label "31" to condition code 5 > mapping condition label "32" to condition code 6 > mapping condition label "41" to condition code 7 > mapping condition label "42" to condition code 8 > > data = > > fsample: 250.0000 > label: {326x1 cell} > time: {1x8 cell} > trial: {1x8 cell} > trialinfo: [8x1 double] > cfg: [1x1 struct] > > > *>> data2 = ft_checkdata(data, 'datatype', 'freq')* > > Warning: the data does not contain a trial definition, assuming that the > trials are consecutive segments of a continuous recording > > In utilities\private\warning_once at 81 > In utilities\private\fixsampleinfo at 54 > In ft_datatype_raw at 91 > In ft_checkdata at 170 > Error using ft_checkdata (line 288) > This function requires freq data as input. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Thu Nov 15 18:03:58 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Thu, 15 Nov 2012 17:03:58 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: <50A50249.3010303@donders.ru.nl> References: <50A50249.3010303@donders.ru.nl> Message-ID: Dear Jörn, Thank you for the quick reply. I will try your suggestion! Many thanks, z On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Zita, > > The function seems to convert the function not correctly to a freq > datastructure - it seems more like raw data to me. > > freq data requires a .powspctrm field, which should be a matrix of > observations x channels x freq x time. So you would need to use cell2mat on > your .trial field. Probably you need to permute the dimensions to match > this order. Additionally, you will need a .dimord field which which should > be 'rpt_chan_freq_time' and you need a .freq field that contains the > frequencies in that matrix. Please first make sure that your trials > actually have 3 dimensions, else something else in the conversion went > wrong. > > I don't use SPM so no clue if there is a better way than doing it manually. > > Best, > Jörn > > > On 11/14/2012 6:32 PM, Zita Eva Patai wrote: > > Hello FT-ers > > In the past i had no problem when converting my data from SPM (where i > do preprocessing and averaging) to FT (where I do my cluster-stats and > plotting) > > Currently, I am using the new way to convert (previous version seems > outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in > the right format, ie: not freq data. But i know that it is...any advice > would be much appreciated! Not to mention is warns me my data is not > epoched when it is indeed so... > > Thank you! > zita > > ********************* > *>> D = spm_eeg_load* > SPM M/EEG data object > Type: evoked > Transform: TF > 8 conditions > 326 channels > 20 frequencies > 501 samples/trial > 8 trials > Sampling frequency: 250 Hz > Loaded from file C:\Users\Eva Z > Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat > > Use the syntax D(channels, frequencies, samples, trials) to access the > data > Type "methods('meeg')" for the list of methods performing other operations > with the object > Type "help meeg/method_name" to get help about methods > > *>> data = spm2ft(D)* > > mapping condition label "11" to condition code 1 > mapping condition label "12" to condition code 2 > mapping condition label "21" to condition code 3 > mapping condition label "22" to condition code 4 > mapping condition label "31" to condition code 5 > mapping condition label "32" to condition code 6 > mapping condition label "41" to condition code 7 > mapping condition label "42" to condition code 8 > > data = > > fsample: 250.0000 > label: {326x1 cell} > time: {1x8 cell} > trial: {1x8 cell} > trialinfo: [8x1 double] > cfg: [1x1 struct] > > > *>> data2 = ft_checkdata(data, 'datatype', 'freq')* > > Warning: the data does not contain a trial definition, assuming that the > trials are consecutive segments of a continuous recording > > In utilities\private\warning_once at 81 > In utilities\private\fixsampleinfo at 54 > In ft_datatype_raw at 91 > In ft_checkdata at 170 > Error using ft_checkdata (line 288) > This function requires freq data as input. > > > -- > > Zita Patai > DPhil, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Thu Nov 15 18:19:32 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Thu, 15 Nov 2012 17:19:32 +0000 Subject: [FieldTrip] converting from som to ft In-Reply-To: References: Message-ID: Thanks Vladimir! (but does this mean I cannot convert my TF data at all, or i have to do this as a 'loophole' alternative...and then i get my TF data into the right format?) On Thu, Nov 15, 2012 at 4:37 PM, Vladimir Litvak wrote: > Dear Zita, > > You do: > > freq = D.fttimelock > > in SPM. The fieldtrip function does not support TF data. > > Best, > > Vladimir > > > On Thu, Nov 15, 2012 at 4:29 PM, Zita Eva Patai wrote: > >> Hello FT-ers >> >> In the past i had no problem when converting my data from SPM (where i do >> preprocessing and averaging) to FT (where I do my cluster-stats and >> plotting) >> >> Currently, I am using the new way to convert (previous version seems >> outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in >> the right format, ie: not freq data. But i know that it is...any advice >> would be much appreciated! Not to mention is warns me my data is not >> epoched when it is indeed so... >> >> Thank you! >> zita >> >> ********************* >> *>> D = spm_eeg_load* >> SPM M/EEG data object >> Type: evoked >> Transform: TF >> 8 conditions >> 326 channels >> 20 frequencies >> 501 samples/trial >> 8 trials >> Sampling frequency: 250 Hz >> Loaded from file C:\Users\Eva Z >> Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat >> >> Use the syntax D(channels, frequencies, samples, trials) to access the >> data >> Type "methods('meeg')" for the list of methods performing other >> operations with the object >> Type "help meeg/method_name" to get help about methods >> >> *>> data = spm2ft(D)* >> >> mapping condition label "11" to condition code 1 >> mapping condition label "12" to condition code 2 >> mapping condition label "21" to condition code 3 >> mapping condition label "22" to condition code 4 >> mapping condition label "31" to condition code 5 >> mapping condition label "32" to condition code 6 >> mapping condition label "41" to condition code 7 >> mapping condition label "42" to condition code 8 >> >> data = >> >> fsample: 250.0000 >> label: {326x1 cell} >> time: {1x8 cell} >> trial: {1x8 cell} >> trialinfo: [8x1 double] >> cfg: [1x1 struct] >> >> >> *>> data2 = ft_checkdata(data, 'datatype', 'freq')* >> >> Warning: the data does not contain a trial definition, assuming that the >> trials are consecutive segments of a continuous recording >> > In utilities\private\warning_once at 81 >> In utilities\private\fixsampleinfo at 54 >> In ft_datatype_raw at 91 >> In ft_checkdata at 170 >> Error using ft_checkdata (line 288) >> This function requires freq data as input. >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Thu Nov 15 18:53:59 2012 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 15 Nov 2012 17:53:59 +0000 Subject: [FieldTrip] converting from som to ft In-Reply-To: References: Message-ID: I don't see what you mean. This is the intended functionality that supports TF data and produces the right format. Vladimir On 11/15/12, Zita Eva Patai wrote: > Thanks Vladimir! > (but does this mean I cannot convert my TF data at all, or i have to do > this as a 'loophole' alternative...and then i get my TF data into the right > format?) > > On Thu, Nov 15, 2012 at 4:37 PM, Vladimir Litvak > wrote: > >> Dear Zita, >> >> You do: >> >> freq = D.fttimelock >> >> in SPM. The fieldtrip function does not support TF data. >> >> Best, >> >> Vladimir >> >> >> On Thu, Nov 15, 2012 at 4:29 PM, Zita Eva Patai >> wrote: >> >>> Hello FT-ers >>> >>> In the past i had no problem when converting my data from SPM (where i >>> do >>> preprocessing and averaging) to FT (where I do my cluster-stats and >>> plotting) >>> >>> Currently, I am using the new way to convert (previous version seems >>> outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not >>> in >>> the right format, ie: not freq data. But i know that it is...any advice >>> would be much appreciated! Not to mention is warns me my data is not >>> epoched when it is indeed so... >>> >>> Thank you! >>> zita >>> >>> ********************* >>> *>> D = spm_eeg_load* >>> SPM M/EEG data object >>> Type: evoked >>> Transform: TF >>> 8 conditions >>> 326 channels >>> 20 frequencies >>> 501 samples/trial >>> 8 trials >>> Sampling frequency: 250 Hz >>> Loaded from file C:\Users\Eva Z >>> Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat >>> >>> Use the syntax D(channels, frequencies, samples, trials) to access the >>> data >>> Type "methods('meeg')" for the list of methods performing other >>> operations with the object >>> Type "help meeg/method_name" to get help about methods >>> >>> *>> data = spm2ft(D)* >>> >>> mapping condition label "11" to condition code 1 >>> mapping condition label "12" to condition code 2 >>> mapping condition label "21" to condition code 3 >>> mapping condition label "22" to condition code 4 >>> mapping condition label "31" to condition code 5 >>> mapping condition label "32" to condition code 6 >>> mapping condition label "41" to condition code 7 >>> mapping condition label "42" to condition code 8 >>> >>> data = >>> >>> fsample: 250.0000 >>> label: {326x1 cell} >>> time: {1x8 cell} >>> trial: {1x8 cell} >>> trialinfo: [8x1 double] >>> cfg: [1x1 struct] >>> >>> >>> *>> data2 = ft_checkdata(data, 'datatype', 'freq')* >>> >>> Warning: the data does not contain a trial definition, assuming that the >>> trials are consecutive segments of a continuous recording >>> > In utilities\private\warning_once at 81 >>> In utilities\private\fixsampleinfo at 54 >>> In ft_datatype_raw at 91 >>> In ft_checkdata at 170 >>> Error using ft_checkdata (line 288) >>> This function requires freq data as input. >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > > Zita Patai > DPhil, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > From eva.patai at psy.ox.ac.uk Thu Nov 15 19:18:35 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Thu, 15 Nov 2012 18:18:35 +0000 Subject: [FieldTrip] converting from som to ft In-Reply-To: References: Message-ID: Right, got it. Thank you again! On Thu, Nov 15, 2012 at 5:53 PM, Vladimir Litvak wrote: > I don't see what you mean. This is the intended functionality that > supports TF data and produces the right format. > > Vladimir > > On 11/15/12, Zita Eva Patai wrote: > > Thanks Vladimir! > > (but does this mean I cannot convert my TF data at all, or i have to do > > this as a 'loophole' alternative...and then i get my TF data into the > right > > format?) > > > > On Thu, Nov 15, 2012 at 4:37 PM, Vladimir Litvak > > wrote: > > > >> Dear Zita, > >> > >> You do: > >> > >> freq = D.fttimelock > >> > >> in SPM. The fieldtrip function does not support TF data. > >> > >> Best, > >> > >> Vladimir > >> > >> > >> On Thu, Nov 15, 2012 at 4:29 PM, Zita Eva Patai > >> wrote: > >> > >>> Hello FT-ers > >>> > >>> In the past i had no problem when converting my data from SPM (where i > >>> do > >>> preprocessing and averaging) to FT (where I do my cluster-stats and > >>> plotting) > >>> > >>> Currently, I am using the new way to convert (previous version seems > >>> outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not > >>> in > >>> the right format, ie: not freq data. But i know that it is...any advice > >>> would be much appreciated! Not to mention is warns me my data is not > >>> epoched when it is indeed so... > >>> > >>> Thank you! > >>> zita > >>> > >>> ********************* > >>> *>> D = spm_eeg_load* > >>> SPM M/EEG data object > >>> Type: evoked > >>> Transform: TF > >>> 8 conditions > >>> 326 channels > >>> 20 frequencies > >>> 501 samples/trial > >>> 8 trials > >>> Sampling frequency: 250 Hz > >>> Loaded from file C:\Users\Eva Z > >>> Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat > >>> > >>> Use the syntax D(channels, frequencies, samples, trials) to access the > >>> data > >>> Type "methods('meeg')" for the list of methods performing other > >>> operations with the object > >>> Type "help meeg/method_name" to get help about methods > >>> > >>> *>> data = spm2ft(D)* > >>> > >>> mapping condition label "11" to condition code 1 > >>> mapping condition label "12" to condition code 2 > >>> mapping condition label "21" to condition code 3 > >>> mapping condition label "22" to condition code 4 > >>> mapping condition label "31" to condition code 5 > >>> mapping condition label "32" to condition code 6 > >>> mapping condition label "41" to condition code 7 > >>> mapping condition label "42" to condition code 8 > >>> > >>> data = > >>> > >>> fsample: 250.0000 > >>> label: {326x1 cell} > >>> time: {1x8 cell} > >>> trial: {1x8 cell} > >>> trialinfo: [8x1 double] > >>> cfg: [1x1 struct] > >>> > >>> > >>> *>> data2 = ft_checkdata(data, 'datatype', 'freq')* > >>> > >>> Warning: the data does not contain a trial definition, assuming that > the > >>> trials are consecutive segments of a continuous recording > >>> > In utilities\private\warning_once at 81 > >>> In utilities\private\fixsampleinfo at 54 > >>> In ft_datatype_raw at 91 > >>> In ft_checkdata at 170 > >>> Error using ft_checkdata (line 288) > >>> This function requires freq data as input. > >>> > >>> > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> fieldtrip at donders.ru.nl > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >>> > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > > > > > > > > -- > > > > Zita Patai > > DPhil, Experimental Psychology > > University of Oxford > > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Duncan.Astle at mrc-cbu.cam.ac.uk Thu Nov 15 19:24:39 2012 From: Duncan.Astle at mrc-cbu.cam.ac.uk (Duncan Astle) Date: Thu, 15 Nov 2012 18:24:39 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: References: <50A50249.3010303@donders.ru.nl> Message-ID: Word up Zita, Try this(replacing the filename for the file you want): D1 = spm_eeg_load('/imaging/as05/EEG data/Load3Easy_TF/wmrtf_efMMspm8_raw_0001'); l3e1=D1.fttimelock; l3e1.dimord='chan_freq_time'; l3e1.powspctrm = squeeze(D1.fttimelock.powspctrm); Extra tip: you first need to separate your conditions such that you have an SPM file for each subject for each condition........ Let me know how you get on, D. ________________________________________________ Dr. Duncan Astle, Programme Leader Track, British Academy Research Fellow, MRC Cognition and Brain Sciences Unit, Chaucer Road, Cambridge. Duncan.Astle at mrc-cbu.cam.ac.uk From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Zita Eva Patai Sent: 15 November 2012 17:04 To: FieldTrip discussion list Subject: Re: [FieldTrip] error when converting from spm to ft Dear Jörn, Thank you for the quick reply. I will try your suggestion! Many thanks, z On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" > wrote: Dear Zita, The function seems to convert the function not correctly to a freq datastructure - it seems more like raw data to me. freq data requires a .powspctrm field, which should be a matrix of observations x channels x freq x time. So you would need to use cell2mat on your .trial field. Probably you need to permute the dimensions to match this order. Additionally, you will need a .dimord field which which should be 'rpt_chan_freq_time' and you need a .freq field that contains the frequencies in that matrix. Please first make sure that your trials actually have 3 dimensions, else something else in the conversion went wrong. I don't use SPM so no clue if there is a better way than doing it manually. Best, Jörn On 11/14/2012 6:32 PM, Zita Eva Patai wrote: Hello FT-ers In the past i had no problem when converting my data from SPM (where i do preprocessing and averaging) to FT (where I do my cluster-stats and plotting) Currently, I am using the new way to convert (previous version seems outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in the right format, ie: not freq data. But i know that it is...any advice would be much appreciated! Not to mention is warns me my data is not epoched when it is indeed so... Thank you! zita ********************* >> D = spm_eeg_load SPM M/EEG data object Type: evoked Transform: TF 8 conditions 326 channels 20 frequencies 501 samples/trial 8 trials Sampling frequency: 250 Hz Loaded from file C:\Users\Eva Z Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat Use the syntax D(channels, frequencies, samples, trials) to access the data Type "methods('meeg')" for the list of methods performing other operations with the object Type "help meeg/method_name" to get help about methods >> data = spm2ft(D) mapping condition label "11" to condition code 1 mapping condition label "12" to condition code 2 mapping condition label "21" to condition code 3 mapping condition label "22" to condition code 4 mapping condition label "31" to condition code 5 mapping condition label "32" to condition code 6 mapping condition label "41" to condition code 7 mapping condition label "42" to condition code 8 data = fsample: 250.0000 label: {326x1 cell} time: {1x8 cell} trial: {1x8 cell} trialinfo: [8x1 double] cfg: [1x1 struct] >> data2 = ft_checkdata(data, 'datatype', 'freq') Warning: the data does not contain a trial definition, assuming that the trials are consecutive segments of a continuous recording > In utilities\private\warning_once at 81 In utilities\private\fixsampleinfo at 54 In ft_datatype_raw at 91 In ft_checkdata at 170 Error using ft_checkdata (line 288) This function requires freq data as input. -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Thu Nov 15 19:57:21 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Thu, 15 Nov 2012 18:57:21 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: References: <50A50249.3010303@donders.ru.nl> Message-ID: awesome! thank you Duncan:) Thanks everyone for all the suggestions!! On Thu, Nov 15, 2012 at 6:24 PM, Duncan Astle < Duncan.Astle at mrc-cbu.cam.ac.uk> wrote: > Word up Zita,**** > > ** ** > > Try this(replacing the filename for the file you want): **** > > ** ** > > D1 = spm_eeg_load('/imaging/as05/EEG > data/Load3Easy_TF/wmrtf_efMMspm8_raw_0001');**** > > l3e1=D1.fttimelock;**** > > l3e1.dimord='chan_freq_time';**** > > l3e1.powspctrm = squeeze(D1.fttimelock.powspctrm);**** > > ** ** > > Extra tip: you first need to separate your conditions such that you have > an SPM file for each subject for each condition……..**** > > ** ** > > Let me know how you get on,**** > > D.**** > > ________________________________________________**** > > Dr. Duncan Astle,**** > > Programme Leader Track,**** > > British Academy Research Fellow,**** > > MRC Cognition and Brain Sciences Unit,**** > > Chaucer Road,**** > > Cambridge.**** > > Duncan.Astle at mrc-cbu.cam.ac.uk**** > > ** ** > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Zita Eva Patai > *Sent:* 15 November 2012 17:04 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] error when converting from spm to ft**** > > ** ** > > Dear Jörn,**** > > ** ** > > Thank you for the quick reply. I will try your suggestion!**** > > ** ** > > Many thanks,**** > > z**** > > On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" < > jm.horschig at donders.ru.nl> wrote:**** > > Dear Zita, > > The function seems to convert the function not correctly to a freq > datastructure - it seems more like raw data to me. > > freq data requires a .powspctrm field, which should be a matrix of > observations x channels x freq x time. So you would need to use cell2mat on > your .trial field. Probably you need to permute the dimensions to match > this order. Additionally, you will need a .dimord field which which should > be 'rpt_chan_freq_time' and you need a .freq field that contains the > frequencies in that matrix. Please first make sure that your trials > actually have 3 dimensions, else something else in the conversion went > wrong. > > I don't use SPM so no clue if there is a better way than doing it manually. > > Best, > Jörn**** > > > > On 11/14/2012 6:32 PM, Zita Eva Patai wrote:**** > > Hello FT-ers **** > > ** ** > > In the past i had no problem when converting my data from SPM (where i do > preprocessing and averaging) to FT (where I do my cluster-stats and > plotting)**** > > ** ** > > Currently, I am using the new way to convert (previous version seems > outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in > the right format, ie: not freq data. But i know that it is...any advice > would be much appreciated! Not to mention is warns me my data is not > epoched when it is indeed so...**** > > ** ** > > Thank you!**** > > zita**** > > ** ** > > ************************* > > *>> D = spm_eeg_load***** > > SPM M/EEG data object**** > > Type: evoked**** > > Transform: TF**** > > 8 conditions**** > > 326 channels**** > > 20 frequencies**** > > 501 samples/trial**** > > 8 trials**** > > Sampling frequency: 250 Hz**** > > Loaded from file C:\Users\Eva Z > Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat**** > > ** ** > > Use the syntax D(channels, frequencies, samples, trials) to access the data > **** > > Type "methods('meeg')" for the list of methods performing other operations > with the object**** > > Type "help meeg/method_name" to get help about methods**** > > ** ** > > *>> data = spm2ft(D)***** > > ** ** > > mapping condition label "11" to condition code 1**** > > mapping condition label "12" to condition code 2**** > > mapping condition label "21" to condition code 3**** > > mapping condition label "22" to condition code 4**** > > mapping condition label "31" to condition code 5**** > > mapping condition label "32" to condition code 6**** > > mapping condition label "41" to condition code 7**** > > mapping condition label "42" to condition code 8**** > > ** ** > > data = **** > > ** ** > > fsample: 250.0000**** > > label: {326x1 cell}**** > > time: {1x8 cell}**** > > trial: {1x8 cell}**** > > trialinfo: [8x1 double]**** > > cfg: [1x1 struct]**** > > ** ** > > ** ** > > *>> data2 = ft_checkdata(data, 'datatype', 'freq')***** > > **** > > Warning: the data does not contain a trial definition, assuming that the > trials are consecutive segments of a continuous recording **** > > > In utilities\private\warning_once at 81**** > > In utilities\private\fixsampleinfo at 54**** > > In ft_datatype_raw at 91**** > > In ft_checkdata at 170 **** > > Error using ft_checkdata (line 288)**** > > This function requires freq data as input.**** > > > **** > > ** ** > > -- **** > > ** ** > > Zita Patai**** > > DPhil, Experimental Psychology**** > > University of Oxford**** > > bcl.psy.ox.ac.uk/people/zita-eva-patai/**** > > ** ** > > ** ** > > ** ** > > _______________________________________________**** > > fieldtrip mailing list**** > > fieldtrip at donders.ru.nl**** > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > > > > **** > > -- **** > > Jörn M. Horschig**** > > PhD Student**** > > Donders Institute for Brain, Cognition and Behaviour **** > > Centre for Cognitive Neuroimaging**** > > Radboud University Nijmegen **** > > Neuronal Oscillations Group**** > > FieldTrip Development Team**** > > ** ** > > P.O. Box 9101**** > > NL-6500 HB Nijmegen**** > > The Netherlands**** > > ** ** > > Contact:**** > > E-Mail: jm.horschig at donders.ru.nl**** > > Tel: +31-(0)24-36-68493**** > > Web: http://www.ru.nl/donders**** > > ** ** > > Visiting address:**** > > Trigon, room 2.30**** > > Kapittelweg 29**** > > NL-6525 EN Nijmegen**** > > The Netherlands**** > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > > > **** > > ** ** > > -- **** > > ** ** > > Zita Patai**** > > DPhil, Experimental Psychology**** > > University of Oxford**** > > bcl.psy.ox.ac.uk/people/zita-eva-patai/**** > > ** ** > > ** ** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Nov 15 20:35:45 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 15 Nov 2012 20:35:45 +0100 Subject: [FieldTrip] DICS: fixed orientation of sources option In-Reply-To: <20121115172846.14247fxr0mnn198g@wmelperso1.univmed.fr> References: <20121115172846.14247fxr0mnn198g@wmelperso1.univmed.fr> Message-ID: Hi Andrea, If you specify fixedori = 'no', FT will not project the leadfield onto the orientation of maximum power, prior to computing the spatial filter, and this indeed will yield 'lambda-like' behaviour. Note that the essential difference is that with fixedori='yes' a scalar beamformer is computed, with fixedori='no' a vector beamformer is computed. With the powmethod option you can specify whether to take the 'trace', or the first singular value 'lambda1' of the vector beamformer output. As of yet there is no functionality that takes one of the two options depending on the 'singular value spectrum'. Best, JM On Nov 15, 2012, at 5:28 PM, andrea brovelli wrote: > > Dear all, > > I have a question regarding the option "fixedori" of DICS (the code from lines 292 to 306 in beamformer_dics.m). > > If I get it right, you implemented the situation when the first singular value lambda1 is much greater that the second singular value lambda2 of Cs (Cs is given by eq. 4 of Gross et al., 2001, PNAS). > > I checked in my data and this is not the case. Maybe my data is just a very special case, but I find that the first is a little larger that the second. Here they are: > > lambda1 = 0.5380; > lambda2 = 0.2921; > lambda3 = 0.0000; > > After eq. 9 in Gross (2001), it says that if lambda1 >> lambda2 does not hold, the trace of Cs should be used instead. > > So, has it been implemented in Fieldtrip somewhere ? And, if not, would you know how to do it ? > > Thanks a lot > > bye > > Andrea > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Thu Nov 15 22:28:48 2012 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 15 Nov 2012 21:28:48 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: References: <50A50249.3010303@donders.ru.nl> Message-ID: <6C066992-C1BA-41CC-AA29-35B933ADE574@gmail.com> Note that Duncan's suggestions only make sense for a dataset with only one trial. Even then I'm not sure why he had problems with the output as it was but I can check. Vladimir On 15 Nov 2012, at 18:57, Zita Eva Patai wrote: > awesome! thank you Duncan:) > > Thanks everyone for all the suggestions!! > > On Thu, Nov 15, 2012 at 6:24 PM, Duncan Astle wrote: > Word up Zita, > > > > Try this(replacing the filename for the file you want): > > > > D1 = spm_eeg_load('/imaging/as05/EEG data/Load3Easy_TF/wmrtf_efMMspm8_raw_0001'); > > l3e1=D1.fttimelock; > > l3e1.dimord='chan_freq_time'; > > l3e1.powspctrm = squeeze(D1.fttimelock.powspctrm); > > > > Extra tip: you first need to separate your conditions such that you have an SPM file for each subject for each condition…….. > > > > Let me know how you get on, > > D. > > ________________________________________________ > > Dr. Duncan Astle, > > Programme Leader Track, > > British Academy Research Fellow, > > MRC Cognition and Brain Sciences Unit, > > Chaucer Road, > > Cambridge. > > Duncan.Astle at mrc-cbu.cam.ac.uk > > > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Zita Eva Patai > Sent: 15 November 2012 17:04 > To: FieldTrip discussion list > Subject: Re: [FieldTrip] error when converting from spm to ft > > > > Dear Jörn, > > > > Thank you for the quick reply. I will try your suggestion! > > > > Many thanks, > > z > > On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" wrote: > > Dear Zita, > > The function seems to convert the function not correctly to a freq datastructure - it seems more like raw data to me. > > freq data requires a .powspctrm field, which should be a matrix of observations x channels x freq x time. So you would need to use cell2mat on your .trial field. Probably you need to permute the dimensions to match this order. Additionally, you will need a .dimord field which which should be 'rpt_chan_freq_time' and you need a .freq field that contains the frequencies in that matrix. Please first make sure that your trials actually have 3 dimensions, else something else in the conversion went wrong. > > I don't use SPM so no clue if there is a better way than doing it manually. > > Best, > Jörn > > > > On 11/14/2012 6:32 PM, Zita Eva Patai wrote: > > Hello FT-ers > > > > In the past i had no problem when converting my data from SPM (where i do preprocessing and averaging) to FT (where I do my cluster-stats and plotting) > > > > Currently, I am using the new way to convert (previous version seems outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in the right format, ie: not freq data. But i know that it is...any advice would be much appreciated! Not to mention is warns me my data is not epoched when it is indeed so... > > > > Thank you! > > zita > > > > ********************* > > >> D = spm_eeg_load > > SPM M/EEG data object > > Type: evoked > > Transform: TF > > 8 conditions > > 326 channels > > 20 frequencies > > 501 samples/trial > > 8 trials > > Sampling frequency: 250 Hz > > Loaded from file C:\Users\Eva Z Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat > > > > Use the syntax D(channels, frequencies, samples, trials) to access the data > > Type "methods('meeg')" for the list of methods performing other operations with the object > > Type "help meeg/method_name" to get help about methods > > > > >> data = spm2ft(D) > > > > mapping condition label "11" to condition code 1 > > mapping condition label "12" to condition code 2 > > mapping condition label "21" to condition code 3 > > mapping condition label "22" to condition code 4 > > mapping condition label "31" to condition code 5 > > mapping condition label "32" to condition code 6 > > mapping condition label "41" to condition code 7 > > mapping condition label "42" to condition code 8 > > > > data = > > > > fsample: 250.0000 > > label: {326x1 cell} > > time: {1x8 cell} > > trial: {1x8 cell} > > trialinfo: [8x1 double] > > cfg: [1x1 struct] > > > > > > >> data2 = ft_checkdata(data, 'datatype', 'freq') > > > > Warning: the data does not contain a trial definition, assuming that the trials are consecutive segments of a continuous recording > > > In utilities\private\warning_once at 81 > > In utilities\private\fixsampleinfo at 54 > > In ft_datatype_raw at 91 > > In ft_checkdata at 170 > > Error using ft_checkdata (line 288) > > This function requires freq data as input. > > > > > > -- > > > > Zita Patai > > DPhil, Experimental Psychology > > University of Oxford > > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > -- > > > > Zita Patai > > DPhil, Experimental Psychology > > University of Oxford > > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > > Zita Patai > DPhil, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Duncan.Astle at mrc-cbu.cam.ac.uk Fri Nov 16 09:29:22 2012 From: Duncan.Astle at mrc-cbu.cam.ac.uk (Duncan Astle) Date: Fri, 16 Nov 2012 08:29:22 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: <6C066992-C1BA-41CC-AA29-35B933ADE574@gmail.com> References: <50A50249.3010303@donders.ru.nl> <6C066992-C1BA-41CC-AA29-35B933ADE574@gmail.com> Message-ID: I did it that way because the statistics options in fieldtrip need the data to be split into individual conditions for each subject (i.e. one average per condition per subject). Hence the one trial. D. ________________________________________________ Dr. Duncan Astle, Programme Leader Track, British Academy Research Fellow, MRC Cognition and Brain Sciences Unit, Chaucer Road, Cambridge. Duncan.Astle at mrc-cbu.cam.ac.uk From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Vladimir Litvak Sent: 15 November 2012 21:29 To: FieldTrip discussion list Subject: Re: [FieldTrip] error when converting from spm to ft Note that Duncan's suggestions only make sense for a dataset with only one trial. Even then I'm not sure why he had problems with the output as it was but I can check. Vladimir On 15 Nov 2012, at 18:57, Zita Eva Patai > wrote: awesome! thank you Duncan:) Thanks everyone for all the suggestions!! On Thu, Nov 15, 2012 at 6:24 PM, Duncan Astle > wrote: Word up Zita, Try this(replacing the filename for the file you want): D1 = spm_eeg_load('/imaging/as05/EEG data/Load3Easy_TF/wmrtf_efMMspm8_raw_0001'); l3e1=D1.fttimelock; l3e1.dimord='chan_freq_time'; l3e1.powspctrm = squeeze(D1.fttimelock.powspctrm); Extra tip: you first need to separate your conditions such that you have an SPM file for each subject for each condition…….. Let me know how you get on, D. ________________________________________________ Dr. Duncan Astle, Programme Leader Track, British Academy Research Fellow, MRC Cognition and Brain Sciences Unit, Chaucer Road, Cambridge. Duncan.Astle at mrc-cbu.cam.ac.uk From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Zita Eva Patai Sent: 15 November 2012 17:04 To: FieldTrip discussion list Subject: Re: [FieldTrip] error when converting from spm to ft Dear Jörn, Thank you for the quick reply. I will try your suggestion! Many thanks, z On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" > wrote: Dear Zita, The function seems to convert the function not correctly to a freq datastructure - it seems more like raw data to me. freq data requires a .powspctrm field, which should be a matrix of observations x channels x freq x time. So you would need to use cell2mat on your .trial field. Probably you need to permute the dimensions to match this order. Additionally, you will need a .dimord field which which should be 'rpt_chan_freq_time' and you need a .freq field that contains the frequencies in that matrix. Please first make sure that your trials actually have 3 dimensions, else something else in the conversion went wrong. I don't use SPM so no clue if there is a better way than doing it manually. Best, Jörn On 11/14/2012 6:32 PM, Zita Eva Patai wrote: Hello FT-ers In the past i had no problem when converting my data from SPM (where i do preprocessing and averaging) to FT (where I do my cluster-stats and plotting) Currently, I am using the new way to convert (previous version seems outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in the right format, ie: not freq data. But i know that it is...any advice would be much appreciated! Not to mention is warns me my data is not epoched when it is indeed so... Thank you! zita ********************* >> D = spm_eeg_load SPM M/EEG data object Type: evoked Transform: TF 8 conditions 326 channels 20 frequencies 501 samples/trial 8 trials Sampling frequency: 250 Hz Loaded from file C:\Users\Eva Z Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat Use the syntax D(channels, frequencies, samples, trials) to access the data Type "methods('meeg')" for the list of methods performing other operations with the object Type "help meeg/method_name" to get help about methods >> data = spm2ft(D) mapping condition label "11" to condition code 1 mapping condition label "12" to condition code 2 mapping condition label "21" to condition code 3 mapping condition label "22" to condition code 4 mapping condition label "31" to condition code 5 mapping condition label "32" to condition code 6 mapping condition label "41" to condition code 7 mapping condition label "42" to condition code 8 data = fsample: 250.0000 label: {326x1 cell} time: {1x8 cell} trial: {1x8 cell} trialinfo: [8x1 double] cfg: [1x1 struct] >> data2 = ft_checkdata(data, 'datatype', 'freq') Warning: the data does not contain a trial definition, assuming that the trials are consecutive segments of a continuous recording > In utilities\private\warning_once at 81 In utilities\private\fixsampleinfo at 54 In ft_datatype_raw at 91 In ft_checkdata at 170 Error using ft_checkdata (line 288) This function requires freq data as input. -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Fri Nov 16 13:24:12 2012 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Fri, 16 Nov 2012 12:24:12 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: References: <50A50249.3010303@donders.ru.nl> <6C066992-C1BA-41CC-AA29-35B933ADE574@gmail.com> Message-ID: Attached is a new version of fttimelock which outputs different versions of the struct depending on the input and also allows selecting just subset of the data to convert to FT. Duncan's fixes will not be necessary with it. This will be included in next SPM8 update and in SPM12. You should put it in @meeg directory in SPM. Best, Vladimir On Fri, Nov 16, 2012 at 8:29 AM, Duncan Astle < Duncan.Astle at mrc-cbu.cam.ac.uk> wrote: > I did it that way because the statistics options in fieldtrip need the > data to be split into individual conditions for each subject (i.e. one > average per condition per subject). Hence the one trial. **** > > ** ** > > D. **** > > ** ** > > ________________________________________________**** > > Dr. Duncan Astle,**** > > Programme Leader Track,**** > > British Academy Research Fellow,**** > > MRC Cognition and Brain Sciences Unit,**** > > Chaucer Road,**** > > Cambridge.**** > > Duncan.Astle at mrc-cbu.cam.ac.uk**** > > ** ** > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Vladimir Litvak > *Sent:* 15 November 2012 21:29 > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] error when converting from spm to ft**** > > ** ** > > Note that Duncan's suggestions only make sense for a dataset with only one > trial. Even then I'm not sure why he had problems with the output as it was > but I can check.**** > > ** ** > > Vladimir**** > > ** ** > > > On 15 Nov 2012, at 18:57, Zita Eva Patai wrote:** > ** > > awesome! thank you Duncan:)**** > > ** ** > > Thanks everyone for all the suggestions!!**** > > On Thu, Nov 15, 2012 at 6:24 PM, Duncan Astle < > Duncan.Astle at mrc-cbu.cam.ac.uk> wrote:**** > > Word up Zita,**** > > **** > > Try this(replacing the filename for the file you want): **** > > **** > > D1 = spm_eeg_load('/imaging/as05/EEG > data/Load3Easy_TF/wmrtf_efMMspm8_raw_0001');**** > > l3e1=D1.fttimelock;**** > > l3e1.dimord='chan_freq_time';**** > > l3e1.powspctrm = squeeze(D1.fttimelock.powspctrm);**** > > **** > > Extra tip: you first need to separate your conditions such that you have > an SPM file for each subject for each condition……..**** > > **** > > Let me know how you get on,**** > > D.**** > > ________________________________________________**** > > Dr. Duncan Astle,**** > > Programme Leader Track,**** > > British Academy Research Fellow,**** > > MRC Cognition and Brain Sciences Unit,**** > > Chaucer Road,**** > > Cambridge.**** > > Duncan.Astle at mrc-cbu.cam.ac.uk**** > > **** > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Zita Eva Patai > *Sent:* 15 November 2012 17:04 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] error when converting from spm to ft**** > > **** > > Dear Jörn,**** > > **** > > Thank you for the quick reply. I will try your suggestion!**** > > **** > > Many thanks,**** > > z**** > > On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" < > jm.horschig at donders.ru.nl> wrote:**** > > Dear Zita, > > The function seems to convert the function not correctly to a freq > datastructure - it seems more like raw data to me. > > freq data requires a .powspctrm field, which should be a matrix of > observations x channels x freq x time. So you would need to use cell2mat on > your .trial field. Probably you need to permute the dimensions to match > this order. Additionally, you will need a .dimord field which which should > be 'rpt_chan_freq_time' and you need a .freq field that contains the > frequencies in that matrix. Please first make sure that your trials > actually have 3 dimensions, else something else in the conversion went > wrong. > > I don't use SPM so no clue if there is a better way than doing it manually. > > Best, > Jörn**** > > > > On 11/14/2012 6:32 PM, Zita Eva Patai wrote:**** > > Hello FT-ers **** > > **** > > In the past i had no problem when converting my data from SPM (where i do > preprocessing and averaging) to FT (where I do my cluster-stats and > plotting)**** > > **** > > Currently, I am using the new way to convert (previous version seems > outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in > the right format, ie: not freq data. But i know that it is...any advice > would be much appreciated! Not to mention is warns me my data is not > epoched when it is indeed so...**** > > **** > > Thank you!**** > > zita**** > > **** > > ************************* > > *>> D = spm_eeg_load***** > > SPM M/EEG data object**** > > Type: evoked**** > > Transform: TF**** > > 8 conditions**** > > 326 channels**** > > 20 frequencies**** > > 501 samples/trial**** > > 8 trials**** > > Sampling frequency: 250 Hz**** > > Loaded from file C:\Users\Eva Z > Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat**** > > **** > > Use the syntax D(channels, frequencies, samples, trials) to access the data > **** > > Type "methods('meeg')" for the list of methods performing other operations > with the object**** > > Type "help meeg/method_name" to get help about methods**** > > **** > > *>> data = spm2ft(D)***** > > **** > > mapping condition label "11" to condition code 1**** > > mapping condition label "12" to condition code 2**** > > mapping condition label "21" to condition code 3**** > > mapping condition label "22" to condition code 4**** > > mapping condition label "31" to condition code 5**** > > mapping condition label "32" to condition code 6**** > > mapping condition label "41" to condition code 7**** > > mapping condition label "42" to condition code 8**** > > **** > > data = **** > > **** > > fsample: 250.0000**** > > label: {326x1 cell}**** > > time: {1x8 cell}**** > > trial: {1x8 cell}**** > > trialinfo: [8x1 double]**** > > cfg: [1x1 struct]**** > > **** > > **** > > *>> data2 = ft_checkdata(data, 'datatype', 'freq')***** > > **** > > Warning: the data does not contain a trial definition, assuming that the > trials are consecutive segments of a continuous recording **** > > > In utilities\private\warning_once at 81**** > > In utilities\private\fixsampleinfo at 54**** > > In ft_datatype_raw at 91**** > > In ft_checkdata at 170 **** > > Error using ft_checkdata (line 288)**** > > This function requires freq data as input.**** > > > **** > > **** > > -- **** > > **** > > Zita Patai**** > > DPhil, Experimental Psychology**** > > University of Oxford**** > > bcl.psy.ox.ac.uk/people/zita-eva-patai/**** > > **** > > **** > > **** > > _______________________________________________**** > > fieldtrip mailing list**** > > fieldtrip at donders.ru.nl**** > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > > > **** > > -- **** > > Jörn M. Horschig**** > > PhD Student**** > > Donders Institute for Brain, Cognition and Behaviour **** > > Centre for Cognitive Neuroimaging**** > > Radboud University Nijmegen **** > > Neuronal Oscillations Group**** > > FieldTrip Development Team**** > > **** > > P.O. Box 9101**** > > NL-6500 HB Nijmegen**** > > The Netherlands**** > > **** > > Contact:**** > > E-Mail: jm.horschig at donders.ru.nl**** > > Tel: +31-(0)24-36-68493**** > > Web: http://www.ru.nl/donders**** > > **** > > Visiting address:**** > > Trigon, room 2.30**** > > Kapittelweg 29**** > > NL-6525 EN Nijmegen**** > > The Netherlands**** > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > > > **** > > **** > > -- **** > > **** > > Zita Patai**** > > DPhil, Experimental Psychology**** > > University of Oxford**** > > bcl.psy.ox.ac.uk/people/zita-eva-patai/**** > > **** > > **** > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > > > **** > > ** ** > > -- **** > > ** ** > > Zita Patai**** > > DPhil, Experimental Psychology**** > > University of Oxford**** > > bcl.psy.ox.ac.uk/people/zita-eva-patai/**** > > ** ** > > ** ** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fttimelock.m Type: application/octet-stream Size: 3236 bytes Desc: not available URL: From sauer.mpih at googlemail.com Fri Nov 16 14:25:50 2012 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Fri, 16 Nov 2012 14:25:50 +0100 Subject: [FieldTrip] Problem with TFR calculation using multitaper Message-ID: Dear all, I have encountered a problem when trying to calculate the power spectrum of my data and I was wondering if anyone could help me to determine the origin of this problem. For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing and a time window with a length of 500 ms ending up with 10 tapers for the TFR calculation (the freq range is 20 - 200 Hz): cfg = []; cfg.output = 'pow'; cfg.channel = 'MEG'; cfg.method = 'mtmconvol'; cfg.taper = 'dpss'; cfg.keeptrials = 'no'; cfg.foi = [20:1:200]; cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, from -0.8 to 1.2 s cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- 11 Hz cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 500 ms cfg.pad = 'maxperlen'; TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = ft_freqanalysis(cfg,DataOut); After calculation I did a baseline normalization: cfg = []; cfg.baseline = [-0.4 -0.1]; cfg.baselinetype = 'relchange'; TFR_HighGamma{subject,condition} = ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); averaged: cfg = []; cfg.channel = 'ParOcc'; % parietal and occipital channels GA_TFR_HighGamma{condition} = ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); and finally plotted the spectrum: time(1) = 3; % -400 ms time(2) = 27; % 800 ms indFreq = [20 200]; freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); power = mean(power,1); fig = figure; set(fig,'PaperUnits','centimeters'); set(fig,'Units','centimeters'); set(fig,'PaperSize',[15 15]); set(fig,'PaperPosition',[0 0 14 14]); set(gcf,'Color',[1 1 1]); ha = gca; pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); shading interp; xlim([-0.4 0.8]); ylim([40 120]); caxis([-.2 .2]); hold on; ha = gca; plot([0 0],[40 120],'k--','LineWidth',1); set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); set(ha,'YTick',[40 60 80 100 120]); colorbar('SouthOutside'); xlabel('Time [sec]'); ylabel('Frequency [Hz]'); The resulting plot looks strange to me since there is this artifical "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different from the "strange" ones described there. I also attached a screenshot of the MultiplotTFR and there you can see the strange "effect" clearly in channels MLO22 or MRO22 for example. Is something wrong with my TFR calculation? Or does the problem arise from an earlier step in the preprocessing? Any help or advice would be greatly appreciated! Best, Andreas -- Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Spectr.jpg Type: image/jpeg Size: 78593 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MultiplotTFR.JPG Type: image/jpeg Size: 140199 bytes Desc: not available URL: From sauer.mpih at googlemail.com Fri Nov 16 14:36:01 2012 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Fri, 16 Nov 2012 14:36:01 +0100 Subject: [FieldTrip] Problem with TFR calculation using multitaper Message-ID: Dear all, I have encountered a problem when trying to calculate the power spectrum of my data and I was wondering if anyone could help me to determine the origin of this problem. For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing and a time window with a length of 500 ms ending up with 10 tapers for the TFR calculation (the freq range is 20 - 200 Hz): cfg = []; cfg.output = 'pow'; cfg.channel = 'MEG'; cfg.method = 'mtmconvol'; cfg.taper = 'dpss'; cfg.keeptrials = 'no'; cfg.foi = [20:1:200]; cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, from -0.8 to 1.2 s cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- 11 Hz cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 500 ms cfg.pad = 'maxperlen'; TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = ft_freqanalysis(cfg,DataOut); After calculation I did a baseline normalization: cfg = []; cfg.baseline = [-0.4 -0.1]; cfg.baselinetype = 'relchange'; TFR_HighGamma{subject,condition} = ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); averaged: cfg = []; cfg.channel = 'ParOcc'; % parietal and occipital channels GA_TFR_HighGamma{condition} = ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); and finally plotted the spectrum: time(1) = 3; % -400 ms time(2) = 27; % 800 ms indFreq = [20 200]; freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); power = mean(power,1); fig = figure; set(fig,'PaperUnits','centimeters'); set(fig,'Units','centimeters'); set(fig,'PaperSize',[15 15]); set(fig,'PaperPosition',[0 0 14 14]); set(gcf,'Color',[1 1 1]); ha = gca; pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); shading interp; xlim([-0.4 0.8]); ylim([40 120]); caxis([-.2 .2]); hold on; ha = gca; plot([0 0],[40 120],'k--','LineWidth',1); set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); set(ha,'YTick',[40 60 80 100 120]); colorbar('SouthOutside'); xlabel('Time [sec]'); ylabel('Frequency [Hz]'); The resulting plot looks strange to me since there is this artifical "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different from the "strange" ones described there. I also attached a screenshot of the MultiplotTFR and there you can see the strange "effect" clearly in channels MLO22 or MRO22 for example. Is something wrong with my TFR calculation? Or does the problem arise from an earlier step in the preprocessing? Any help or advice would be greatly appreciated! Best, Andreas -- Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Spectr.jpg Type: image/jpeg Size: 78593 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MultiplotTFR.JPG Type: image/jpeg Size: 140199 bytes Desc: not available URL: From f.roux at bcbl.eu Fri Nov 16 14:51:24 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Fri, 16 Nov 2012 14:51:24 +0100 (CET) Subject: [FieldTrip] Problem with TFR calculation using multitaper In-Reply-To: Message-ID: <7d961697-40cb-4095-9d24-fea020903368@thalamus_p> Dear Andreas, if you used a 50 Hz notch filter in your preprocessing, that is probably the reason why you are seeing the 'artificial' cut between 30 and 70 Hz. My guess is that you ran your notch filter on segmented epochs of a few seconds (resulting in a low spectral resolution for your notch filter). This will wipe out a ~10Hz box (in your case I'm just guessing) around the line noise frequency. Running the multitaper on top of that may explain the pattern you are observing. Best, Fred ----- Original Message ----- From: "Andreas Sauer" To: "FieldTrip discussion list" Sent: Friday, November 16, 2012 2:36:01 PM Subject: [FieldTrip] Problem with TFR calculation using multitaper Dear all, I have encountered a problem when trying to calculate the power spectrum of my data and I was wondering if anyone could help me to determine the origin of this problem. For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing and a time window with a length of 500 ms ending up with 10 tapers for the TFR calculation (the freq range is 20 - 200 Hz): cfg = []; cfg.output = 'pow'; cfg.channel = 'MEG'; cfg.method = 'mtmconvol'; cfg.taper = 'dpss'; cfg.keeptrials = 'no'; cfg.foi = [20:1:200]; cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, from -0.8 to 1.2 s cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- 11 Hz cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 500 ms cfg.pad = 'maxperlen'; TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = ft_freqanalysis(cfg,DataOut); After calculation I did a baseline normalization: cfg = []; cfg.baseline = [-0.4 -0.1]; cfg.baselinetype = 'relchange'; TFR_HighGamma{subject,condition} = ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); averaged: cfg = []; cfg.channel = 'ParOcc'; % parietal and occipital channels GA_TFR_HighGamma{condition} = ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); and finally plotted the spectrum: time(1) = 3; % -400 ms time(2) = 27; % 800 ms indFreq = [20 200]; freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); power = mean(power,1); fig = figure; set(fig,'PaperUnits','centimeters'); set(fig,'Units','centimeters'); set(fig,'PaperSize',[15 15]); set(fig,'PaperPosition',[0 0 14 14]); set(gcf,'Color',[1 1 1]); ha = gca; pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); shading interp; xlim([-0.4 0.8]); ylim([40 120]); caxis([-.2 .2]); hold on; ha = gca; plot([0 0],[40 120],'k--','LineWidth',1); set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); set(ha,'YTick',[40 60 80 100 120]); colorbar('SouthOutside'); xlabel('Time [sec]'); ylabel('Frequency [Hz]'); The resulting plot looks strange to me since there is this artifical "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different from the "strange" ones described there. I also attached a screenshot of the MultiplotTFR and there you can see the strange "effect" clearly in channels MLO22 or MRO22 for example. Is something wrong with my TFR calculation? Or does the problem arise from an earlier step in the preprocessing? Any help or advice would be greatly appreciated! Best, Andreas -- Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From a.stolk at fcdonders.ru.nl Fri Nov 16 15:11:05 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Fri, 16 Nov 2012 15:11:05 +0100 (CET) Subject: [FieldTrip] correction for movement tool In-Reply-To: Message-ID: <1845155284.1304271.1353075065072.JavaMail.root@sculptor.zimbra.ru.nl> Hello Inna, Nenad, We're happy to announce that the manuscript previously mentioned ('Online and offline tools for head movement compensation in MEG') has been accepted for publication. The manuscript demonstrates the applicability of the recently discussed methods to a wide range of tasks and experiments and it also presents an overview of the methods out there. It can be found in the literature section of the FieldTrip wiki or directly downloaded from http://fieldtrip.fcdonders.nl/_media/stolk_et_al_-_meg_head_movements_-_20121116.pdf Best regards, Arjen ----- Oorspronkelijk bericht ----- > Van: "Nenad Polomac" > Aan: fieldtrip at science.ru.nl > Verzonden: Donderdag 15 november 2012 09:58:35 > Onderwerp: Re: [FieldTrip] correction for movement tool > Dear Arjen, > Thank you very much for the detailed clarification! > This helped a lot! :) > All the best! > Nenad  > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Fri Nov 16 15:41:36 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Fri, 16 Nov 2012 14:41:36 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: References: <50A50249.3010303@donders.ru.nl> <6C066992-C1BA-41CC-AA29-35B933ADE574@gmail.com> Message-ID: Great, thanks again! On Fri, Nov 16, 2012 at 12:24 PM, Vladimir Litvak wrote: > Attached is a new version of fttimelock which outputs different versions > of the struct depending on the input and also allows selecting just subset > of the data to convert to FT. Duncan's fixes will not be necessary with it. > This will be included in next SPM8 update and in SPM12. You should put it > in @meeg directory in SPM. > > Best, > > Vladimir > > > On Fri, Nov 16, 2012 at 8:29 AM, Duncan Astle < > Duncan.Astle at mrc-cbu.cam.ac.uk> wrote: > >> I did it that way because the statistics options in fieldtrip need the >> data to be split into individual conditions for each subject (i.e. one >> average per condition per subject). Hence the one trial. **** >> >> ** ** >> >> D. **** >> >> ** ** >> >> ________________________________________________**** >> >> Dr. Duncan Astle,**** >> >> Programme Leader Track,**** >> >> British Academy Research Fellow,**** >> >> MRC Cognition and Brain Sciences Unit,**** >> >> Chaucer Road,**** >> >> Cambridge.**** >> >> Duncan.Astle at mrc-cbu.cam.ac.uk**** >> >> ** ** >> >> *From:* fieldtrip-bounces at science.ru.nl [mailto: >> fieldtrip-bounces at science.ru.nl] *On Behalf Of *Vladimir Litvak >> *Sent:* 15 November 2012 21:29 >> >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] error when converting from spm to ft**** >> >> ** ** >> >> Note that Duncan's suggestions only make sense for a dataset with only >> one trial. Even then I'm not sure why he had problems with the output as it >> was but I can check.**** >> >> ** ** >> >> Vladimir**** >> >> ** ** >> >> >> On 15 Nov 2012, at 18:57, Zita Eva Patai wrote:* >> *** >> >> awesome! thank you Duncan:)**** >> >> ** ** >> >> Thanks everyone for all the suggestions!!**** >> >> On Thu, Nov 15, 2012 at 6:24 PM, Duncan Astle < >> Duncan.Astle at mrc-cbu.cam.ac.uk> wrote:**** >> >> Word up Zita,**** >> >> **** >> >> Try this(replacing the filename for the file you want): **** >> >> **** >> >> D1 = spm_eeg_load('/imaging/as05/EEG >> data/Load3Easy_TF/wmrtf_efMMspm8_raw_0001');**** >> >> l3e1=D1.fttimelock;**** >> >> l3e1.dimord='chan_freq_time';**** >> >> l3e1.powspctrm = squeeze(D1.fttimelock.powspctrm);**** >> >> **** >> >> Extra tip: you first need to separate your conditions such that you have >> an SPM file for each subject for each condition……..**** >> >> **** >> >> Let me know how you get on,**** >> >> D.**** >> >> ________________________________________________**** >> >> Dr. Duncan Astle,**** >> >> Programme Leader Track,**** >> >> British Academy Research Fellow,**** >> >> MRC Cognition and Brain Sciences Unit,**** >> >> Chaucer Road,**** >> >> Cambridge.**** >> >> Duncan.Astle at mrc-cbu.cam.ac.uk**** >> >> **** >> >> *From:* fieldtrip-bounces at science.ru.nl [mailto: >> fieldtrip-bounces at science.ru.nl] *On Behalf Of *Zita Eva Patai >> *Sent:* 15 November 2012 17:04 >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] error when converting from spm to ft**** >> >> **** >> >> Dear Jörn,**** >> >> **** >> >> Thank you for the quick reply. I will try your suggestion!**** >> >> **** >> >> Many thanks,**** >> >> z**** >> >> On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" < >> jm.horschig at donders.ru.nl> wrote:**** >> >> Dear Zita, >> >> The function seems to convert the function not correctly to a freq >> datastructure - it seems more like raw data to me. >> >> freq data requires a .powspctrm field, which should be a matrix of >> observations x channels x freq x time. So you would need to use cell2mat on >> your .trial field. Probably you need to permute the dimensions to match >> this order. Additionally, you will need a .dimord field which which should >> be 'rpt_chan_freq_time' and you need a .freq field that contains the >> frequencies in that matrix. Please first make sure that your trials >> actually have 3 dimensions, else something else in the conversion went >> wrong. >> >> I don't use SPM so no clue if there is a better way than doing it >> manually. >> >> Best, >> Jörn**** >> >> >> >> On 11/14/2012 6:32 PM, Zita Eva Patai wrote:**** >> >> Hello FT-ers **** >> >> **** >> >> In the past i had no problem when converting my data from SPM (where i do >> preprocessing and averaging) to FT (where I do my cluster-stats and >> plotting)**** >> >> **** >> >> Currently, I am using the new way to convert (previous version seems >> outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in >> the right format, ie: not freq data. But i know that it is...any advice >> would be much appreciated! Not to mention is warns me my data is not >> epoched when it is indeed so...**** >> >> **** >> >> Thank you!**** >> >> zita**** >> >> **** >> >> ************************* >> >> *>> D = spm_eeg_load***** >> >> SPM M/EEG data object**** >> >> Type: evoked**** >> >> Transform: TF**** >> >> 8 conditions**** >> >> 326 channels**** >> >> 20 frequencies**** >> >> 501 samples/trial**** >> >> 8 trials**** >> >> Sampling frequency: 250 Hz**** >> >> Loaded from file C:\Users\Eva Z >> Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat**** >> >> **** >> >> Use the syntax D(channels, frequencies, samples, trials) to access the >> data**** >> >> Type "methods('meeg')" for the list of methods performing other >> operations with the object**** >> >> Type "help meeg/method_name" to get help about methods**** >> >> **** >> >> *>> data = spm2ft(D)***** >> >> **** >> >> mapping condition label "11" to condition code 1**** >> >> mapping condition label "12" to condition code 2**** >> >> mapping condition label "21" to condition code 3**** >> >> mapping condition label "22" to condition code 4**** >> >> mapping condition label "31" to condition code 5**** >> >> mapping condition label "32" to condition code 6**** >> >> mapping condition label "41" to condition code 7**** >> >> mapping condition label "42" to condition code 8**** >> >> **** >> >> data = **** >> >> **** >> >> fsample: 250.0000**** >> >> label: {326x1 cell}**** >> >> time: {1x8 cell}**** >> >> trial: {1x8 cell}**** >> >> trialinfo: [8x1 double]**** >> >> cfg: [1x1 struct]**** >> >> **** >> >> **** >> >> *>> data2 = ft_checkdata(data, 'datatype', 'freq')***** >> >> **** >> >> Warning: the data does not contain a trial definition, assuming that the >> trials are consecutive segments of a continuous recording **** >> >> > In utilities\private\warning_once at 81**** >> >> In utilities\private\fixsampleinfo at 54**** >> >> In ft_datatype_raw at 91**** >> >> In ft_checkdata at 170 **** >> >> Error using ft_checkdata (line 288)**** >> >> This function requires freq data as input.**** >> >> >> **** >> >> **** >> >> -- **** >> >> **** >> >> Zita Patai**** >> >> DPhil, Experimental Psychology**** >> >> University of Oxford**** >> >> bcl.psy.ox.ac.uk/people/zita-eva-patai/**** >> >> **** >> >> **** >> >> **** >> >> _______________________________________________**** >> >> fieldtrip mailing list**** >> >> fieldtrip at donders.ru.nl**** >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** >> >> >> >> **** >> >> -- **** >> >> Jörn M. Horschig**** >> >> PhD Student**** >> >> Donders Institute for Brain, Cognition and Behaviour **** >> >> Centre for Cognitive Neuroimaging**** >> >> Radboud University Nijmegen **** >> >> Neuronal Oscillations Group**** >> >> FieldTrip Development Team**** >> >> **** >> >> P.O. Box 9101**** >> >> NL-6500 HB Nijmegen**** >> >> The Netherlands**** >> >> **** >> >> Contact:**** >> >> E-Mail: jm.horschig at donders.ru.nl**** >> >> Tel: +31-(0)24-36-68493**** >> >> Web: http://www.ru.nl/donders**** >> >> **** >> >> Visiting address:**** >> >> Trigon, room 2.30**** >> >> Kapittelweg 29**** >> >> NL-6525 EN Nijmegen**** >> >> The Netherlands**** >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** >> >> >> >> **** >> >> **** >> >> -- **** >> >> **** >> >> Zita Patai**** >> >> DPhil, Experimental Psychology**** >> >> University of Oxford**** >> >> bcl.psy.ox.ac.uk/people/zita-eva-patai/**** >> >> **** >> >> **** >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** >> >> >> >> **** >> >> ** ** >> >> -- **** >> >> ** ** >> >> Zita Patai**** >> >> DPhil, Experimental Psychology**** >> >> University of Oxford**** >> >> bcl.psy.ox.ac.uk/people/zita-eva-patai/**** >> >> ** ** >> >> ** ** >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.craddock at uni-leipzig.de Fri Nov 16 16:50:06 2012 From: matt.craddock at uni-leipzig.de (Matt Craddock) Date: Fri, 16 Nov 2012 16:50:06 +0100 Subject: [FieldTrip] Problem with TFR calculation using multitaper In-Reply-To: <7d961697-40cb-4095-9d24-fea020903368@thalamus_p> References: <7d961697-40cb-4095-9d24-fea020903368@thalamus_p> Message-ID: <50A660AE.8000606@uni-leipzig.de> Dear Andreas and Frederic, Another possibility would be a 60 Hz signal (a steady-state evoked potential to monitor refresh rate, for example) running throughout the trial, including in the baseline period. Given that you're using 11 Hz frequency smoothing, this would effectively be smeared across the 49-71 Hz range. You'd have a much higher baseline signal in the 49-71 Hz range (because of the 60 Hz signal appearing in all those frequencies), but the strength of the actual signal in those ranges wouldn't differ. So, the signal-to-baseline ratio would be much lower (because your signal-to-noise ratio is worse), and that'd created the appearance of boundaries at the edges of the frequency smoothing (because at 71 Hz you are still getting the 60Hz noise, but at 72Hz, you are not, so your signal-to-noise ratio dramatically changes). I've attached a pic showing something similar caused by 50 Hz line noise (in EEG, with ~12Hz freq smoothing). So I'd suggest checking the FFT of your data and possibly putting in a notch at 60 Hz if there's a big peak there. Cheers, Matt On 16/11/2012 14:51, Frederic Roux wrote: > > Dear Andreas, > > if you used a 50 Hz notch filter in your > preprocessing, that is probably the reason > why you are seeing the 'artificial' cut > between 30 and 70 Hz. > > My guess is that you ran your notch filter > on segmented epochs of a few seconds (resulting > in a low spectral resolution for your notch filter). > This will wipe out a ~10Hz box (in your case I'm just guessing) > around the line noise frequency. > > Running the multitaper on top of that may explain > the pattern you are observing. > > > Best, > > Fred > ----- Original Message ----- > From: "Andreas Sauer" > To: "FieldTrip discussion list" > Sent: Friday, November 16, 2012 2:36:01 PM > Subject: [FieldTrip] Problem with TFR calculation using multitaper > > > Dear all, > > I have encountered a problem when trying to calculate the power spectrum of my data and I was wondering if anyone could help me to determine the origin of this problem. > > For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing and a time window with a length of 500 ms ending up with 10 tapers for the TFR calculation (the freq range is 20 - 200 Hz): > > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'MEG'; > cfg.method = 'mtmconvol'; > cfg.taper = 'dpss'; > cfg.keeptrials = 'no'; > cfg.foi = [20:1:200]; > cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, from -0.8 to 1.2 s > cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- 11 Hz > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 500 ms > cfg.pad = 'maxperlen'; > > TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = ft_freqanalysis(cfg,DataOut); > > After calculation I did a baseline normalization: > > > cfg = []; > cfg.baseline = [-0.4 -0.1]; > cfg.baselinetype = 'relchange'; > > TFR_HighGamma{subject,condition} = ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); > > averaged: > > > cfg = []; > cfg.channel = 'ParOcc'; % parietal and occipital channels > GA_TFR_HighGamma{condition} = ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); > > and finally plotted the spectrum: > > > time(1) = 3; % -400 ms > time(2) = 27; % 800 ms > indFreq = [20 200]; > freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); > > power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); > power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); > power = mean(power,1); > > fig = figure; > set(fig,'PaperUnits','centimeters'); > set(fig,'Units','centimeters'); > set(fig,'PaperSize',[15 15]); > set(fig,'PaperPosition',[0 0 14 14]); > set(gcf,'Color',[1 1 1]); > > ha = gca; > pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); > set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); > shading interp; > xlim([-0.4 0.8]); > ylim([40 120]); > caxis([-.2 .2]); > hold on; > ha = gca; > plot([0 0],[40 120],'k--','LineWidth',1); > set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); > set(ha,'YTick',[40 60 80 100 120]); > colorbar('SouthOutside'); > xlabel('Time [sec]'); > ylabel('Frequency [Hz]'); > > The resulting plot looks strange to me since there is this artifical "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different from the "strange" ones described there. > I also attached a screenshot of the MultiplotTFR and there you can see the strange "effect" clearly in channels MLO22 or MRO22 for example. > > Is something wrong with my TFR calculation? Or does the problem arise from an earlier step in the preprocessing? > > Any help or advice would be greatly appreciated! > > Best, > > Andreas > -- Dr. Matt Craddock Post-doctoral researcher, Institute of Psychology, University of Leipzig, Seeburgstr. 14-20, 04103 Leipzig, Germany Phone: +49 341 973 95 44 -------------- next part -------------- A non-text attachment was scrubbed... Name: 50HznoiseFilt.png Type: image/png Size: 51346 bytes Desc: not available URL: From f.roux at bcbl.eu Sat Nov 17 12:54:51 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Sat, 17 Nov 2012 12:54:51 +0100 (CET) Subject: [FieldTrip] Problem with TFR calculation using multitaper In-Reply-To: <50A660AE.8000606@uni-leipzig.de> Message-ID: <6f87de3f-b420-409f-8136-5c4712ece41d@thalamus_p> Hi Matt, Hi Andreas, Indeed, I remember seeing strong 60 Hz line noise as a result of the beamer refresh rate (60Hz). Best, Fred ----- Original Message ----- From: "Matt Craddock" To: "FieldTrip discussion list" Sent: Friday, November 16, 2012 4:50:06 PM Subject: Re: [FieldTrip] Problem with TFR calculation using multitaper Dear Andreas and Frederic, Another possibility would be a 60 Hz signal (a steady-state evoked potential to monitor refresh rate, for example) running throughout the trial, including in the baseline period. Given that you're using 11 Hz frequency smoothing, this would effectively be smeared across the 49-71 Hz range. You'd have a much higher baseline signal in the 49-71 Hz range (because of the 60 Hz signal appearing in all those frequencies), but the strength of the actual signal in those ranges wouldn't differ. So, the signal-to-baseline ratio would be much lower (because your signal-to-noise ratio is worse), and that'd created the appearance of boundaries at the edges of the frequency smoothing (because at 71 Hz you are still getting the 60Hz noise, but at 72Hz, you are not, so your signal-to-noise ratio dramatically changes). I've attached a pic showing something similar caused by 50 Hz line noise (in EEG, with ~12Hz freq smoothing). So I'd suggest checking the FFT of your data and possibly putting in a notch at 60 Hz if there's a big peak there. Cheers, Matt On 16/11/2012 14:51, Frederic Roux wrote: > > Dear Andreas, > > if you used a 50 Hz notch filter in your > preprocessing, that is probably the reason > why you are seeing the 'artificial' cut > between 30 and 70 Hz. > > My guess is that you ran your notch filter > on segmented epochs of a few seconds (resulting > in a low spectral resolution for your notch filter). > This will wipe out a ~10Hz box (in your case I'm just guessing) > around the line noise frequency. > > Running the multitaper on top of that may explain > the pattern you are observing. > > > Best, > > Fred > ----- Original Message ----- > From: "Andreas Sauer" > To: "FieldTrip discussion list" > Sent: Friday, November 16, 2012 2:36:01 PM > Subject: [FieldTrip] Problem with TFR calculation using multitaper > > > Dear all, > > I have encountered a problem when trying to calculate the power spectrum of my data and I was wondering if anyone could help me to determine the origin of this problem. > > For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing and a time window with a length of 500 ms ending up with 10 tapers for the TFR calculation (the freq range is 20 - 200 Hz): > > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'MEG'; > cfg.method = 'mtmconvol'; > cfg.taper = 'dpss'; > cfg.keeptrials = 'no'; > cfg.foi = [20:1:200]; > cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, from -0.8 to 1.2 s > cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- 11 Hz > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 500 ms > cfg.pad = 'maxperlen'; > > TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = ft_freqanalysis(cfg,DataOut); > > After calculation I did a baseline normalization: > > > cfg = []; > cfg.baseline = [-0.4 -0.1]; > cfg.baselinetype = 'relchange'; > > TFR_HighGamma{subject,condition} = ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); > > averaged: > > > cfg = []; > cfg.channel = 'ParOcc'; % parietal and occipital channels > GA_TFR_HighGamma{condition} = ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); > > and finally plotted the spectrum: > > > time(1) = 3; % -400 ms > time(2) = 27; % 800 ms > indFreq = [20 200]; > freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); > > power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); > power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); > power = mean(power,1); > > fig = figure; > set(fig,'PaperUnits','centimeters'); > set(fig,'Units','centimeters'); > set(fig,'PaperSize',[15 15]); > set(fig,'PaperPosition',[0 0 14 14]); > set(gcf,'Color',[1 1 1]); > > ha = gca; > pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); > set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); > shading interp; > xlim([-0.4 0.8]); > ylim([40 120]); > caxis([-.2 .2]); > hold on; > ha = gca; > plot([0 0],[40 120],'k--','LineWidth',1); > set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); > set(ha,'YTick',[40 60 80 100 120]); > colorbar('SouthOutside'); > xlabel('Time [sec]'); > ylabel('Frequency [Hz]'); > > The resulting plot looks strange to me since there is this artifical "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different from the "strange" ones described there. > I also attached a screenshot of the MultiplotTFR and there you can see the strange "effect" clearly in channels MLO22 or MRO22 for example. > > Is something wrong with my TFR calculation? Or does the problem arise from an earlier step in the preprocessing? > > Any help or advice would be greatly appreciated! > > Best, > > Andreas > -- Dr. Matt Craddock Post-doctoral researcher, Institute of Psychology, University of Leipzig, Seeburgstr. 14-20, 04103 Leipzig, Germany Phone: +49 341 973 95 44 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From sauer.mpih at googlemail.com Sat Nov 17 15:58:25 2012 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Sat, 17 Nov 2012 15:58:25 +0100 Subject: [FieldTrip] Problem with TFR calculation using multitaper In-Reply-To: References: <50A660AE.8000606@uni-leipzig.de> <6f87de3f-b420-409f-8136-5c4712ece41d@thalamus_p> Message-ID: Hi Matt, Hi Fred, thanks for your answers! It helped a lot! The artifact seems indeed to be due to the 60 Hz refresh rate of our beamer. I filtered the data again and the result is pretty clear (see attached picture - one subject). Thanks again and a nice weekend for you two! Best, Andreas > 2012/11/17 Frederic Roux > >> Hi Matt, Hi Andreas, >> >> Indeed, I remember seeing strong 60 Hz line noise as >> a result of the beamer refresh rate (60Hz). >> >> Best, >> Fred >> >> >> ----- Original Message ----- >> From: "Matt Craddock" >> To: "FieldTrip discussion list" >> Sent: Friday, November 16, 2012 4:50:06 PM >> Subject: Re: [FieldTrip] Problem with TFR calculation using multitaper >> >> Dear Andreas and Frederic, >> >> Another possibility would be a 60 Hz signal (a steady-state evoked >> potential to monitor refresh rate, for example) running throughout the >> trial, including in the baseline period. Given that you're using 11 Hz >> frequency smoothing, this would effectively be smeared across the 49-71 >> Hz range. >> >> You'd have a much higher baseline signal in the 49-71 Hz range (because >> of the 60 Hz signal appearing in all those frequencies), but the >> strength of the actual signal in those ranges wouldn't differ. So, the >> signal-to-baseline ratio would be much lower (because your >> signal-to-noise ratio is worse), and that'd created the appearance of >> boundaries at the edges of the frequency smoothing (because at 71 Hz you >> are still getting the 60Hz noise, but at 72Hz, you are not, so your >> signal-to-noise ratio dramatically changes). >> >> I've attached a pic showing something similar caused by 50 Hz line noise >> (in EEG, with ~12Hz freq smoothing). >> >> So I'd suggest checking the FFT of your data and possibly putting in a >> notch at 60 Hz if there's a big peak there. >> >> Cheers, >> Matt >> >> >> On 16/11/2012 14:51, Frederic Roux wrote: >> > >> > Dear Andreas, >> > >> > if you used a 50 Hz notch filter in your >> > preprocessing, that is probably the reason >> > why you are seeing the 'artificial' cut >> > between 30 and 70 Hz. >> > >> > My guess is that you ran your notch filter >> > on segmented epochs of a few seconds (resulting >> > in a low spectral resolution for your notch filter). >> > This will wipe out a ~10Hz box (in your case I'm just guessing) >> > around the line noise frequency. >> > >> > Running the multitaper on top of that may explain >> > the pattern you are observing. >> > >> > >> > Best, >> > >> > Fred >> > ----- Original Message ----- >> > From: "Andreas Sauer" >> > To: "FieldTrip discussion list" >> > Sent: Friday, November 16, 2012 2:36:01 PM >> > Subject: [FieldTrip] Problem with TFR calculation using multitaper >> > >> > >> > Dear all, >> > >> > I have encountered a problem when trying to calculate the power >> spectrum of my data and I was wondering if anyone could help me to >> determine the origin of this problem. >> > >> > For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing >> and a time window with a length of 500 ms ending up with 10 tapers for the >> TFR calculation (the freq range is 20 - 200 Hz): >> > >> > >> > cfg = []; >> > cfg.output = 'pow'; >> > cfg.channel = 'MEG'; >> > cfg.method = 'mtmconvol'; >> > cfg.taper = 'dpss'; >> > cfg.keeptrials = 'no'; >> > cfg.foi = [20:1:200]; >> > cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, >> from -0.8 to 1.2 s >> > cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- >> 11 Hz >> > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = >> 500 ms >> > cfg.pad = 'maxperlen'; >> > >> > TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = >> ft_freqanalysis(cfg,DataOut); >> > >> > After calculation I did a baseline normalization: >> > >> > >> > cfg = []; >> > cfg.baseline = [-0.4 -0.1]; >> > cfg.baselinetype = 'relchange'; >> > >> > TFR_HighGamma{subject,condition} = >> ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); >> > >> > averaged: >> > >> > >> > cfg = []; >> > cfg.channel = 'ParOcc'; % parietal and occipital channels >> > GA_TFR_HighGamma{condition} = >> ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); >> > >> > and finally plotted the spectrum: >> > >> > >> > time(1) = 3; % -400 ms >> > time(2) = 27; % 800 ms >> > indFreq = [20 200]; >> > freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); >> > >> > power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); >> > power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); >> > power = mean(power,1); >> > >> > fig = figure; >> > set(fig,'PaperUnits','centimeters'); >> > set(fig,'Units','centimeters'); >> > set(fig,'PaperSize',[15 15]); >> > set(fig,'PaperPosition',[0 0 14 14]); >> > set(gcf,'Color',[1 1 1]); >> > >> > ha = gca; >> > >> pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); >> > set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); >> > shading interp; >> > xlim([-0.4 0.8]); >> > ylim([40 120]); >> > caxis([-.2 .2]); >> > hold on; >> > ha = gca; >> > plot([0 0],[40 120],'k--','LineWidth',1); >> > set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); >> > set(ha,'YTick',[40 60 80 100 120]); >> > colorbar('SouthOutside'); >> > xlabel('Time [sec]'); >> > ylabel('Frequency [Hz]'); >> > >> > The resulting plot looks strange to me since there is this artifical >> "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different >> from the "strange" ones described there. >> > I also attached a screenshot of the MultiplotTFR and there you can see >> the strange "effect" clearly in channels MLO22 or MRO22 for example. >> > >> > Is something wrong with my TFR calculation? Or does the problem arise >> from an earlier step in the preprocessing? >> > >> > Any help or advice would be greatly appreciated! >> > >> > Best, >> > >> > Andreas >> > >> >> >> -- >> Dr. Matt Craddock >> >> Post-doctoral researcher, >> Institute of Psychology, >> University of Leipzig, >> Seeburgstr. 14-20, >> 04103 Leipzig, Germany >> Phone: +49 341 973 95 44 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Dipl.-Psych. Andreas Sauer > Max Planck Institute for Brain Research > Deutschordenstraße 46 > 60528 Frankfurt am Main > Germany > > T: +49 69 96769 278 > F: +49 69 96769 327 > Email: sauer.mpih at gmail.com > www.brain.mpg.de > > -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 60HzFiltered.jpg Type: image/jpeg Size: 82747 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Not60HzFiltered.jpg Type: image/jpeg Size: 83986 bytes Desc: not available URL: From m.chait at ucl.ac.uk Mon Nov 19 10:20:08 2012 From: m.chait at ucl.ac.uk (Chait, Maria) Date: Mon, 19 Nov 2012 09:20:08 +0000 Subject: [FieldTrip] Post Doc Position at UCL Ear Institute Message-ID: <3BA3DF582C0B7542AE0CB625F0119AB816FBE0F2@AMSPRD0104MB100.eurprd01.prod.exchangelabs.com> Dear Colleagues, I am writing to point your attention to a research associate (Post Doc) job opening at the UCL Ear Institute and would be grateful if you could distribute the advert to relevant members of your institution. Please note the deadline is this Thursday. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Research Associate (Post Doc)- Ref: 1288813 Closing Date: 22/11/2012 A research associate (Post Doc) position (starting salary £32,055 per annum Inclusive of London allowance) is available to work on a BBSRC funded project that will use psychophysics, eye tracking and MEG functional brain imaging to investigate the neural systems that support listeners ability to detect changes in acoustic scenes. You will be supervised by Dr Maria Chait. The post holder will be based at UCL Ear Institute and MEG scanning will be carried out at UCL's Wellcome Trust Centre for Neuroimaging. Initial funding for this post is available for 36 months. The UCL Ear Institute provides state-of-the-art research facilities across a wide range of disciplines and is one of the foremost centres for hearing, speech and language-related research within Europe. The Wellcome Trust Centre for Neuroimaging is a leading centre for brain imaging, bringing together clinicians and scientists who study higher cognitive function using neuroimaging techniques. Key Requirements Applicants should hold a PhD degree (or equivalent) in an engineering or Neuroscience-related subject and have substantial experience in digital signal processing and computer programming. Previous experience with auditory research and/or functional brain imaging is desirable. Further Details You should apply for this post (Ref #: 1288813) through UCL's online recruitment website, www.ucl.ac.uk/hr/jobs, where you can download a job description and person specifications. For an informal discussion please contact Dr. Maria Chait (m.chait at ucl.ac.uk). Maria Chait PhD m.chait at ucl.ac.uk Senior Lecturer UCL Ear Institute 332 Gray's Inn Road London WC1X 8EE -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron__t at hotmail.com Mon Nov 19 19:11:59 2012 From: aaron__t at hotmail.com (Aaron T) Date: Mon, 19 Nov 2012 10:11:59 -0800 Subject: [FieldTrip] ft_spiketriggeredspectrum questions Message-ID: Hi, I'm trying to get started with dsp and running into some difficulty grasping the proper use of ft_spiketriggeredspectrum and ft_spiketriggeredspectrum_stat. The sample code at the bottom uses LFP data that has already been bandpassed filtered (theta); I am trying to examine spike-lfp statistics in theta, and would greatly appreciate help figuring out how to analyze spike phases. The issues I am having relate to the use of the cfg.method (mtmfft vs convol), foo and timwin/t_ftimwin and foi. As well as perhaps the use of ft_spiketriggeredspectrum_stat generally. 1) Should .foi be specified if the data is already filtered? I changed the code below to restrict foi to a plv (8Hz) I would be able to simplify and understand, but I am guessing I should use theta ranges? I've tried code that replicates (and also values that further limit) the frequency of the bp filter, but am not sure how .foi is intended to be used here. 2) Ive gone through the tutorials, and according to code snippet in the timefrequencyanalysis tutorial tfrhann.freq = "% Array of frequencies of interest (the elements of freq may be different from your cfg.foi input depending on your trial length) ". I'm not quite sure what that means? When I use the single frequency of 8Hz and cfg.timwin = [-0.5 0.5]; %1 second window I receive (for data with 82 trials, single spike channel, 11 lap channels) a 1x151 double array of values as the tfrSample.ang value in the code below (using mtmfft as the cfg.method). The 151 array columns (frequencies) appear to converge on two separate values (in odd and even columns respectively). I'm not understanding what these represent? 3) When I change the timwin to [-0.25 0.25] I receive fewer values (1x7 ), again with what appears to be two converging sets of values, but they are not terribly similar to the 1 second values I am receiving. 4) cfg.method = convol results in a single tfrSample.ang value, but while cfg.t_ftimwin = 4./cfg.foi and cfg.t_ftimwin = 4./cfg.foi yield a somewhat similar answer, cfg.t_ftimwin = 16 ./cfg.foi is completely different. 5) Am I correct that the input for ft_spiketriggeredspectrum_stat should be the decomposed spike data as in the code below (vs spike)? 6) In contrast to the ang method in ft_spiketriggeredspectrum_stat, using angle(stsFFT.fourierspctrm{1}) in Example1 yields an array that I believe represents spikes * lfp channels * the same 151 frequency values. I'm not sure I understand the difference between angle and the ft _stat ang method? 7) is mtmfft just a faster version of fft? Sample Code (multiple examples): if Example1 cfg = []; cfg.method = 'fft'; cfg.timwin = [-0.5 0.5]; cfg.foi = 8; cfg.taper = 'hanning'; cfg.spikechannel = FFTSpikeChannel; cfg.channel = data_lfp.label; stsFFT = ft_spiketriggeredspectrum(cfg, data_all); ang = angle(stsFFT.fourierspctrm{1}); cfgTfr1 = []; cfgTfr1.method = 'ang'; tfr1 = ft_spiketriggeredspectrum_stat(cfgTfr1,stsFFT); end if Example2 cfg.timwin = [-0.25 0.25]; % time window of 500 msec end if Example3 cfg.method = 'mtmfft'; cfg.foi = 8; cfg.t_ftimwin = 8 ./ cfg.foi; % 8 cycles per frequency end if Example4 ConvolSpikeChannel = spike.label{1}; cfg.spikechannel = ConvolSpikeChannel; cfg.method = 'convol'; cfg.foi = 8; cfg.t_ftimwin = 4./cfg.foi; % 4 cycles per frequency stsConvol = ft_spiketriggeredspectrum(cfg, data_all); tfr4 = ft_spiketriggeredspectrum_stat(cfgTfr,stsConvol); end if Example5 cfg.t_ftimwin = 8./cfg.foi; % 8 cycles per frequency, also try 16 cycles end I apologize in advance as I am very new to dsp and suspect my problems may be related to my own ignorance and lack of understanding of the principles and not just fieldtrip usage, so if anyone can make sense out of this much too lengthy post I would greatly appreciate any guidance! Thanks. Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Mon Nov 19 22:16:09 2012 From: luke.bloy at gmail.com (Luke Bloy) Date: Mon, 19 Nov 2012 16:16:09 -0500 Subject: [FieldTrip] reading neuromag Polhemous data Message-ID: <50aaa19a.241f340a.2186.ffffe658@mx.google.com> Hi I'd like to be able to read in the polhemous digitized data that is stored in the fif files alongside the functional data. Has anyone done this? Thanks Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Tue Nov 20 17:10:24 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Tue, 20 Nov 2012 17:10:24 +0100 (CET) Subject: [FieldTrip] ICA decomposition & backprojection In-Reply-To: <36E953F5321EB743AC6B338995A56D63250662@UM-EXCDAG-A01.um.gwdg.de> Message-ID: <88f2a9a2-4d3b-4980-912c-0e90ecf3fa6f@thalamus_p> Dear Patrick, I just stumbled across your post from a while ago. Since I am far from being an expert, take anything I say with a grain of salt. If you reject components in your raw data at MEG sensor level with ICA what will happen is that you will end up with a rank deficient covariance matrix. Assuming that you you reject 3 components, your matrix will have a rank of N-3, instead of N (because you just lost 3 linear independent components), where N is the number of linearly independent time series in your channel x time matrix. So instead of having a Nx3 leadfield matrix, you end up with a N-3x3 leadfield matrix. However, since the inverse problem is anyways heavily underdetermined (ie the number of sensors is way smaller than the possible number of dipoles), this shouldn't matter much as long as you keep the number of components down to a few (eg ECG and EOG). For example rejecting n = 100 components would results in a rank N-100, which I guess could cause some troubles. So my advice would be to keep the number of rejected IC components to a strict minimum (eg 1 or 2 ECG components and 1 or 2 EOG components). You should also compare the results of your beamformer with and without ICA cleaning to see any changes related to the ICA application. Best wishes, Fred ----- Original Message ----- From: "Patrick Jung" To: fieldtrip at science.ru.nl Sent: Wednesday, November 14, 2012 6:24:32 PM Subject: [FieldTrip] ICA decomposition & backprojection Dear Fieldtrippers, if I do ICA in my preprocessing to reject EOG and ECG signals, the new MEG guidelines say that this might alter later source reconstruction and connectivity analyses (which I aim to do). So, worried about this, I wonder if applying ft_rejectcomponent on my raw dataset 1.) automatically modifies the leadfield matrix? 2.) the unmixing (and mixing?) matrix is saved in the new data structure somewhere (to evtl make use of it at later analysis steps)? 3.) automatically stores the information how many and what ICA components were subtracted from the data in my new data structure. Would you generally discourage to apply ICA in the preprocessing when planning source reconstruction and connectivity analysis? It’s a complicated topic for me as a clinician so I hope there is no mixing in my questions ;-) Many thanks for your answers, Patrick _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From liad.glz at gmail.com Wed Nov 21 07:01:56 2012 From: liad.glz at gmail.com (liad glz) Date: Tue, 20 Nov 2012 22:01:56 -0800 Subject: [FieldTrip] Can I use FieldTrip plotting on an existing data? Message-ID: I have two matrices that include EEG data for two experimental conditions (channelsXtimepointsXsubjects). The data has already been preprocessed. I would like to use FieldTrip in order to plot topographic maps for the difference between the conditions, and I see that the function requires many input variables that were manufactured by the previous functions in FieldTrip. Does that mean that I cannot use a function without running all the previous ones on the raw data? Many thanks Liad -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Nov 21 08:46:22 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 21 Nov 2012 08:46:22 +0100 Subject: [FieldTrip] Can I use FieldTrip plotting on an existing data? In-Reply-To: References: Message-ID: Dear Liad, FieldTrip data structures are just Matlab structures, so with some custom Matlab code you should be able to convert any arbitrary data matrix into FT style. The data you have resembles the output of FT's ft_timelockgrandaverage function, with keepindividual='yes' specified. It should look something like this to be compatible with FT: data = label: {152x1 cell} % channel labels avg: [152x900 double] % grand average, chanXtime var: [152x900 double] % variance, chanXtime time: [1x900 double] % time axis, in seconds individual: [10x152x900 double] % subjXchanXtime, individual averages dimord: 'subj_chan_time' % keep as is, dimensionality ordering for the fields Alternatively, you could put the difference data in a 'simple' (single-subject) timelock data structure, which would also allow it to be plotted. This approach is probably the easiest, if all you want to use FT for is plotting the topography of difference. Have a look at http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_defined for how to create a simple timelock data structure. Best, Eelke On 21 November 2012 07:01, liad glz wrote: > I have two matrices that include EEG data for two experimental conditions > (channelsXtimepointsXsubjects). The data has already been preprocessed. I > would like to use FieldTrip in order to plot topographic maps for the > difference between the conditions, and I see that the function requires many > input variables that were manufactured by the previous functions in > FieldTrip. Does that mean that I cannot use a function without running all > the previous ones on the raw data? > > Many thanks > Liad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From patrick.jung at esi-frankfurt.de Wed Nov 21 09:17:17 2012 From: patrick.jung at esi-frankfurt.de (Jung, Patrick) Date: Wed, 21 Nov 2012 08:17:17 +0000 Subject: [FieldTrip] ICA decomposition & backprojection In-Reply-To: <88f2a9a2-4d3b-4980-912c-0e90ecf3fa6f@thalamus_p> References: <36E953F5321EB743AC6B338995A56D63250662@UM-EXCDAG-A01.um.gwdg.de> <88f2a9a2-4d3b-4980-912c-0e90ecf3fa6f@thalamus_p> Message-ID: <36E953F5321EB743AC6B338995A56D63250C7A@UM-EXCDAG-A01.um.gwdg.de> Dear Fred, thanks for your reply and explanation. Your last sentence seems to be a good advice, although time-consuming. I will compare the results of beamforming with and without ICA cleaning. Best, Patrick -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Frederic Roux Sent: 20 November 2012 17:10 To: FieldTrip discussion list Subject: Re: [FieldTrip] ICA decomposition & backprojection Dear Patrick, I just stumbled across your post from a while ago. Since I am far from being an expert, take anything I say with a grain of salt. If you reject components in your raw data at MEG sensor level with ICA what will happen is that you will end up with a rank deficient covariance matrix. Assuming that you you reject 3 components, your matrix will have a rank of N-3, instead of N (because you just lost 3 linear independent components), where N is the number of linearly independent time series in your channel x time matrix. So instead of having a Nx3 leadfield matrix, you end up with a N-3x3 leadfield matrix. However, since the inverse problem is anyways heavily underdetermined (ie the number of sensors is way smaller than the possible number of dipoles), this shouldn't matter much as long as you keep the number of components down to a few (eg ECG and EOG). For example rejecting n = 100 components would results in a rank N-100, which I guess could cause some troubles. So my advice would be to keep the number of rejected IC components to a strict minimum (eg 1 or 2 ECG components and 1 or 2 EOG components). You should also compare the results of your beamformer with and without ICA cleaning to see any changes related to the ICA application. Best wishes, Fred ----- Original Message ----- From: "Patrick Jung" To: fieldtrip at science.ru.nl Sent: Wednesday, November 14, 2012 6:24:32 PM Subject: [FieldTrip] ICA decomposition & backprojection Dear Fieldtrippers, if I do ICA in my preprocessing to reject EOG and ECG signals, the new MEG guidelines say that this might alter later source reconstruction and connectivity analyses (which I aim to do). So, worried about this, I wonder if applying ft_rejectcomponent on my raw dataset 1.) automatically modifies the leadfield matrix? 2.) the unmixing (and mixing?) matrix is saved in the new data structure somewhere (to evtl make use of it at later analysis steps)? 3.) automatically stores the information how many and what ICA components were subtracted from the data in my new data structure. Would you generally discourage to apply ICA in the preprocessing when planning source reconstruction and connectivity analysis? It’s a complicated topic for me as a clinician so I hope there is no mixing in my questions ;-) Many thanks for your answers, Patrick _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jan.schoffelen at donders.ru.nl Wed Nov 21 09:30:40 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 21 Nov 2012 09:30:40 +0100 Subject: [FieldTrip] ICA decomposition & backprojection In-Reply-To: <36E953F5321EB743AC6B338995A56D63250662@UM-EXCDAG-A01.um.gwdg.de> References: <36E953F5321EB743AC6B338995A56D63250662@UM-EXCDAG-A01.um.gwdg.de> Message-ID: Hi Patrick, > 1.) automatically modifies the leadfield matrix? No, not automatically. However, if you construct the leadfields, and use the grad-structure from the ICA-cleaned data, then you should be fine, because the subspace projection is applied both to the time courses and to the gradiometer description. > 2.) the unmixing (and mixing?) matrix is saved in the new data structure somewhere (to evtl make use of it at later analysis steps)? No, the unmixing and mixing matrices are stored in the comp-structure, which you obtain after ft_componentanalysis. They are not passed on to data structures obtained from processing steps downstream. If you want to keep track of this, you should save the comp-structure, or at least the mixing and unmixing matrices (along with the topolabel and label fields). The component time courses are to some extent redundant, because these can be easily computed from the data. > 3.) automatically stores the information how many and what ICA components were subtracted from the data in my new data structure. Yes, this info is stored in data.cfg.component, where data is the output structure after calling ft_rejectcomponent. > Would you generally discourage to apply ICA in the preprocessing when planning source reconstruction and connectivity analysis? No, I wouldn't. Yet it should be applied with care, and I would indeed check the results of the analysis pipeline with and without ICA-cleaning. Cheers, JM Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrick.jung at esi-frankfurt.de Wed Nov 21 09:43:21 2012 From: patrick.jung at esi-frankfurt.de (Jung, Patrick) Date: Wed, 21 Nov 2012 08:43:21 +0000 Subject: [FieldTrip] ICA decomposition & backprojection In-Reply-To: References: <36E953F5321EB743AC6B338995A56D63250662@UM-EXCDAG-A01.um.gwdg.de> Message-ID: <36E953F5321EB743AC6B338995A56D63250CA0@UM-EXCDAG-A01.um.gwdg.de> Thanks, Jan-Mathijs! Your answers made things much clearer to me. Best, Patrick From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of jan-mathijs schoffelen Sent: 21 November 2012 09:31 To: FieldTrip discussion list Subject: Re: [FieldTrip] ICA decomposition & backprojection Hi Patrick, 1.) automatically modifies the leadfield matrix? No, not automatically. However, if you construct the leadfields, and use the grad-structure from the ICA-cleaned data, then you should be fine, because the subspace projection is applied both to the time courses and to the gradiometer description. 2.) the unmixing (and mixing?) matrix is saved in the new data structure somewhere (to evtl make use of it at later analysis steps)? No, the unmixing and mixing matrices are stored in the comp-structure, which you obtain after ft_componentanalysis. They are not passed on to data structures obtained from processing steps downstream. If you want to keep track of this, you should save the comp-structure, or at least the mixing and unmixing matrices (along with the topolabel and label fields). The component time courses are to some extent redundant, because these can be easily computed from the data. 3.) automatically stores the information how many and what ICA components were subtracted from the data in my new data structure. Yes, this info is stored in data.cfg.component, where data is the output structure after calling ft_rejectcomponent. Would you generally discourage to apply ICA in the preprocessing when planning source reconstruction and connectivity analysis? No, I wouldn't. Yet it should be applied with care, and I would indeed check the results of the analysis pipeline with and without ICA-cleaning. Cheers, JM Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mengtongxiao at gmail.com Wed Nov 21 08:20:08 2012 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Wed, 21 Nov 2012 15:20:08 +0800 Subject: [FieldTrip] help Message-ID: Dear all, I am a new user.I want to know if I use it to compute inverse source in cortex,how can i know where are the bordmann ares in source space,in order to compute function connectivity ? thanks a lot, tongxiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Wed Nov 21 11:30:50 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Wed, 21 Nov 2012 11:30:50 +0100 Subject: [FieldTrip] ft_freqstatistics tutorial question Message-ID: Dear all, I have one doubt. I want to calculate ft_freqstatistics on my MEG date obtained form ft_freqanalysis. However, I see now in ft_freqstatistics tutorial that you suggest that operation should be done on planar gradient data. So, the first ft_megplanar and then ft_freqanalysis, ft_combineplanar and ft_freqstatistics. My question is, does this step of calculating planar gradients for time frequency analysis is necessary or not? Could I apply statistic on the data from ft_freqanalysis without any involvement of planar gradients calculation. Thank you in advance! All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Nov 21 12:47:25 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 21 Nov 2012 12:47:25 +0100 Subject: [FieldTrip] ft_freqstatistics tutorial question In-Reply-To: References: Message-ID: Dear Nenad, Strictly speaking, planar gradient transformation is not necessary, so you can just skip those steps if you really want to. However, if you have axial gradiometer data (as I seem to recall from your earlier posts) and want to do TF-analysis and -statistics on sensor level, I would strongly recommend applying a planar gradient transformation. Axial gradiometer data will produce maximal deflections (of opposite polarity) on both sides of a current dipole, while planar gradiometer data produces a positive maximum exactly above the source. If you apply TF-analysis to axial gradiometer data, you will get two spatially separated 'blobs' where there was only a single oscillating dipole in the brain. If you look at power (as is typically done), you will lose the polarity information, and hence interpreting the power topography in terms of brain is nearly impossible with axial gradient data. Best, Eelke On 21 November 2012 11:30, Nenad Polomac wrote: > Dear all, > > I have one doubt. I want to calculate ft_freqstatistics on my MEG date > obtained form ft_freqanalysis. However, I see now in ft_freqstatistics > tutorial that you suggest that operation should be done on planar gradient > data. So, the first ft_megplanar and then ft_freqanalysis, ft_combineplanar > and ft_freqstatistics. My question is, does this step of calculating planar > gradients for time frequency analysis is necessary or not? Could I apply > statistic on the data from ft_freqanalysis without any involvement of planar > gradients calculation. > Thank you in advance! > > All the best! > > Nenad > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Wed Nov 21 14:37:54 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 21 Nov 2012 14:37:54 +0100 Subject: [FieldTrip] help In-Reply-To: References: Message-ID: <50ACD932.4080109@donders.ru.nl> Dear tongxiao, You need to specify an atlas, which will work as a look-up table. When calling ft_sourceplot you need to specify cfg.atlas and point to an atlas file on your harddrive, please have a look here: http://fieldtrip.fcdonders.nl/faq/how_can_i_determine_the_anatomical_label_of_a_source?s[]=atlas Alternatively, you can look up the coordinates manually, e.g. sourceplot in interactive mode allows you to click on a location, and it will return the coordinates in a particular coordinate system (depends on what you put in, could be MNI). Best, Jörn On 11/21/2012 8:20 AM, ?? wrote: > Dear all, > I am a new user.I want to know if I use it to compute inverse source > in cortex,how can i know where are the bordmann ares in source > space,in order to compute function connectivity ? > thanks a lot, > tongxiao > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Wed Nov 21 14:39:56 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Wed, 21 Nov 2012 07:39:56 -0600 Subject: [FieldTrip] help Message-ID: Hello Tongxiao, If you're using your own MR images for source estimation, then you will have had to process the images in Freesurfer before you used Fieldtrip to estimate the sources (see http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate). When you do the segmentation in Freesurfer, you can do an automatic cortical parcellation (http://surfer.nmr.mgh.harvard.edu/fswiki/CorticalParcellation) which will divide the brain up into known regions based on anatomical landmarks; many of these correspond to Brodmann areas. Best, Steve Message: 2 > Date: Wed, 21 Nov 2012 15:20:08 +0800 > From: ?? > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] help > Message-ID: > < > CADiddyVebZ3FCvMqk4J6NymniPrqJaiBHB4nh5zeWCKcNSMSew at mail.gmail.com> > Content-Type: text/plain; charset="gb2312" > > Dear all? > > > I am a new user.I want to know if I use it to compute inverse source in > cortex,how can i know where are the bordmann ares in source space,in order > to compute function connectivity ? > > thanks a lot, > tongxiao > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Nov 21 14:55:10 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 21 Nov 2012 14:55:10 +0100 Subject: [FieldTrip] help In-Reply-To: <50ACD932.4080109@donders.ru.nl> References: <50ACD932.4080109@donders.ru.nl> Message-ID: <50ACDD3E.5050801@donders.ru.nl> of course my answer is only valid when you normalized the brain to a template (and use an atlas that is associated with that template). Pretty sure that Stephen is right in case you are using Freesurfer ;) On 11/21/2012 2:37 PM, "Jörn M. Horschig" wrote: > Dear tongxiao, > > You need to specify an atlas, which will work as a look-up table. When > calling ft_sourceplot you need to specify cfg.atlas and point to an > atlas file on your harddrive, please have a look here: > http://fieldtrip.fcdonders.nl/faq/how_can_i_determine_the_anatomical_label_of_a_source?s[]=atlas > > Alternatively, you can look up the coordinates manually, e.g. > sourceplot in interactive mode allows you to click on a location, and > it will return the coordinates in a particular coordinate system > (depends on what you put in, could be MNI). > > Best, > Jörn > > On 11/21/2012 8:20 AM, ?? wrote: >> Dear all, >> I am a new user.I want to know if I use it to compute inverse source >> in cortex,how can i know where are the bordmann ares in source >> space,in order to compute function connectivity ? >> thanks a lot, >> tongxiao >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail:jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web:http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From ipeiker at uke.de Wed Nov 21 23:37:08 2012 From: ipeiker at uke.de (Ina Peiker) Date: Wed, 21 Nov 2012 23:37:08 +0100 Subject: [FieldTrip] ft_sourcestatistics across time and frequency Message-ID: <50AD5794.2060405@uke.de> Dear fieldtrip users, is there a possibility to perform a cluster-permutation-test on source data across time and frequency, so that clusters are connected not only spatially but also in the time and frequency domain? I did a source reconstruction (beamforming) without selecting a time point or frequency (more exploratively) and now I want to do an explorative statistic across all data. It looks like that: output from ft_sourcegrandaverage for 1 time point and 1 frequency: gm = pos: [6783x3 double] dim: [17 21 19] avg: [1x1 struct] var: [1x1 struct] dimord: 'voxel' trial: [1x40 struct] inside: [3394x1 double] outside: [3389x1 double] df: [6783x1 double] cfg: [1x1 struct] Now, I would like to use ft_sourcestatitistics with a cluster-permuation-test for more than 1 time point and 1 frequency. I tried to concatenate data by increasing dimensions in gm.trial.pow but it did not work. Is something like this implemented for source data? Any other ideas? Thank you very much! Ina -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Martin Zeitz (Vorsitzender), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus From f.roux at bcbl.eu Thu Nov 22 14:19:45 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Thu, 22 Nov 2012 14:19:45 +0100 (CET) Subject: [FieldTrip] planar gradients In-Reply-To: Message-ID: Dear all, I would like to follow up this post with another question related to the planar gradients. I am working on data aquired with a CTF 275 system but at the time of the acquisition there was a number of sensors that were broken. So I end up with n = 258 channels. After running the ft_megplanar function I get n = 516 channels. However, if I try to combine the gradients with ft_combineplanar I get an error saying that I am not providing ctf275_planar but ctf275 data. Is the fact that I do not have n = 275 sensors but 258 confusing the ft_combineplanar function, or is this related to something else? Best, Fred ----- Original Message ----- From: "Eelke Spaak" To: "FieldTrip discussion list" Sent: Wednesday, November 21, 2012 12:47:25 PM Subject: Re: [FieldTrip] ft_freqstatistics tutorial question Dear Nenad, Strictly speaking, planar gradient transformation is not necessary, so you can just skip those steps if you really want to. However, if you have axial gradiometer data (as I seem to recall from your earlier posts) and want to do TF-analysis and -statistics on sensor level, I would strongly recommend applying a planar gradient transformation. Axial gradiometer data will produce maximal deflections (of opposite polarity) on both sides of a current dipole, while planar gradiometer data produces a positive maximum exactly above the source. If you apply TF-analysis to axial gradiometer data, you will get two spatially separated 'blobs' where there was only a single oscillating dipole in the brain. If you look at power (as is typically done), you will lose the polarity information, and hence interpreting the power topography in terms of brain is nearly impossible with axial gradient data. Best, Eelke On 21 November 2012 11:30, Nenad Polomac wrote: > Dear all, > > I have one doubt. I want to calculate ft_freqstatistics on my MEG date > obtained form ft_freqanalysis. However, I see now in ft_freqstatistics > tutorial that you suggest that operation should be done on planar gradient > data. So, the first ft_megplanar and then ft_freqanalysis, ft_combineplanar > and ft_freqstatistics. My question is, does this step of calculating planar > gradients for time frequency analysis is necessary or not? Could I apply > statistic on the data from ft_freqanalysis without any involvement of planar > gradients calculation. > Thank you in advance! > > All the best! > > Nenad > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From m.lizarazu at bcbl.eu Thu Nov 22 14:21:01 2012 From: m.lizarazu at bcbl.eu (Mikel Lizarazu) Date: Thu, 22 Nov 2012 14:21:01 +0100 (CET) Subject: [FieldTrip] headshape realigment Message-ID: <87e6f8bd-38ea-49fe-8468-d50c42496896@thalamus_p> Dear Fieldtrippers, I am working with MEG data from Elekta and T1 images. I am realigning MEG data with T1 images using ft_volumerealign function selecting N,LPA,RPA points. However, I would like to know if there is a possibility to also include the headshape information (isotrak data) in the realignment to obtain a better final result. Many thanks for your answers, Patrick -- Mikel Lizarazu Predoctoral researcher www.bcbl.eu -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at mac.com Thu Nov 22 14:39:19 2012 From: nathanweisz at mac.com (Nathan Weisz) Date: Thu, 22 Nov 2012 14:39:19 +0100 Subject: [FieldTrip] headshape realigment In-Reply-To: <87e6f8bd-38ea-49fe-8468-d50c42496896@thalamus_p> References: <87e6f8bd-38ea-49fe-8468-d50c42496896@thalamus_p> Message-ID: <7ADB9F95-9DA9-4C05-8D12-D2988A4BD056@mac.com> Dear Mikel, see attached file. basically this function segments the fiducial-based-coregistered MR and alters the transformation-matrix to best fit the headshape in a least-squares sense. in practice, if your first coregistration was not too terrible this works quite fine. you can remove some very outlying headshape points as well. see some docs here: https://wiki.cimec.unitn.it/tiki-index.php?page=MRICoreg some steps are quite lengthy (segmentation) and coded in frankenstein-style (i.e. mostly by me). so if you have improvements on the code, we would be happy to get them as well. ciao, nathan On 22.11.2012, at 14:21, Mikel Lizarazu wrote: > Dear Fieldtrippers, > I am working with MEG data from Elekta and T1 images. > I am realigning MEG data with T1 images using ft_volumerealign function selecting N,LPA,RPA points. However, I would like to know if there is a possibility to also include the headshape information (isotrak data) in the realignment to obtain a better final result. > Many thanks for your answers, > Patrick > > -- > Mikel Lizarazu > Predoctoral researcher > www.bcbl.eu > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cimec_coregister.m Type: application/octet-stream Size: 4166 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From max-philipp.stenner at med.ovgu.de Thu Nov 22 19:36:59 2012 From: max-philipp.stenner at med.ovgu.de (Stenner, Max-Philipp) Date: Thu, 22 Nov 2012 18:36:59 +0000 Subject: [FieldTrip] planar gradients In-Reply-To: <4346_1353591466_50AE2AAA_4346_214_1_a9f3579c-9269-4bfa-81b0-641f3c3c2a1e@thalamus_p> References: <4346_1353591466_50AE2AAA_4346_214_1_a9f3579c-9269-4bfa-81b0-641f3c3c2a1e@thalamus_p> Message-ID: Dear Fred, I encountered a similar problem with my CTF275 data and one broken sensor before ft_freqanalysis of the planar (uncombined) data. "Confirming" the channel type with data.grad.chantype = ft_senstype(data); solved the problem (although I have to admit that I never investigated where in the ft script the problem arose). Cheers, Max ________________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Frederic Roux [f.roux at bcbl.eu] Gesendet: Donnerstag, 22. November 2012 14:19 Bis: FieldTrip discussion list Betreff: [FieldTrip] planar gradients Dear all, I would like to follow up this post with another question related to the planar gradients. I am working on data aquired with a CTF 275 system but at the time of the acquisition there was a number of sensors that were broken. So I end up with n = 258 channels. After running the ft_megplanar function I get n = 516 channels. However, if I try to combine the gradients with ft_combineplanar I get an error saying that I am not providing ctf275_planar but ctf275 data. Is the fact that I do not have n = 275 sensors but 258 confusing the ft_combineplanar function, or is this related to something else? Best, Fred ----- Original Message ----- From: "Eelke Spaak" To: "FieldTrip discussion list" Sent: Wednesday, November 21, 2012 12:47:25 PM Subject: Re: [FieldTrip] ft_freqstatistics tutorial question Dear Nenad, Strictly speaking, planar gradient transformation is not necessary, so you can just skip those steps if you really want to. However, if you have axial gradiometer data (as I seem to recall from your earlier posts) and want to do TF-analysis and -statistics on sensor level, I would strongly recommend applying a planar gradient transformation. Axial gradiometer data will produce maximal deflections (of opposite polarity) on both sides of a current dipole, while planar gradiometer data produces a positive maximum exactly above the source. If you apply TF-analysis to axial gradiometer data, you will get two spatially separated 'blobs' where there was only a single oscillating dipole in the brain. If you look at power (as is typically done), you will lose the polarity information, and hence interpreting the power topography in terms of brain is nearly impossible with axial gradient data. Best, Eelke On 21 November 2012 11:30, Nenad Polomac wrote: > Dear all, > > I have one doubt. I want to calculate ft_freqstatistics on my MEG date > obtained form ft_freqanalysis. However, I see now in ft_freqstatistics > tutorial that you suggest that operation should be done on planar gradient > data. So, the first ft_megplanar and then ft_freqanalysis, ft_combineplanar > and ft_freqstatistics. My question is, does this step of calculating planar > gradients for time frequency analysis is necessary or not? Could I apply > statistic on the data from ft_freqanalysis without any involvement of planar > gradients calculation. > Thank you in advance! > > All the best! > > Nenad > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Fri Nov 23 09:48:27 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 23 Nov 2012 09:48:27 +0100 Subject: [FieldTrip] planar gradients In-Reply-To: References: <4346_1353591466_50AE2AAA_4346_214_1_a9f3579c-9269-4bfa-81b0-641f3c3c2a1e@thalamus_p> Message-ID: Dear Fred and Max, This is a known bug in ft_senstype, and people are working on fixing it. See bugzilla: http://bugzilla.fcdonders.nl/show_bug.cgi?id=1288 . If you have anything to add to the bug reports over there, that could be helpful. For now, Max's workaround seems to do the trick. Best, Eelke On 22 November 2012 19:36, Stenner, Max-Philipp wrote: > Dear Fred, > > I encountered a similar problem with my CTF275 data and one broken sensor before ft_freqanalysis of the planar (uncombined) data. "Confirming" the channel type with > > data.grad.chantype = ft_senstype(data); > > solved the problem (although I have to admit that I never investigated where in the ft script the problem arose). > > Cheers, > Max > > ________________________________________ > Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Frederic Roux [f.roux at bcbl.eu] > Gesendet: Donnerstag, 22. November 2012 14:19 > Bis: FieldTrip discussion list > Betreff: [FieldTrip] planar gradients > > Dear all, > > I would like to follow up this post with another question > related to the planar gradients. > > I am working on data aquired with a CTF 275 system but at > the time of the acquisition there was a number of sensors > that were broken. > > So I end up with n = 258 channels. > > After running the ft_megplanar function I get n = 516 channels. > > However, if I try to combine the gradients with > ft_combineplanar > > I get an error saying that I am not providing ctf275_planar but > ctf275 data. > > Is the fact that I do not have n = 275 sensors but 258 confusing > the ft_combineplanar function, or is this related to something else? > > > Best, > > Fred > > ----- Original Message ----- > From: "Eelke Spaak" > To: "FieldTrip discussion list" > Sent: Wednesday, November 21, 2012 12:47:25 PM > Subject: Re: [FieldTrip] ft_freqstatistics tutorial question > > Dear Nenad, > > Strictly speaking, planar gradient transformation is not necessary, so > you can just skip those steps if you really want to. However, if you > have axial gradiometer data (as I seem to recall from your earlier > posts) and want to do TF-analysis and -statistics on sensor level, I > would strongly recommend applying a planar gradient transformation. > > Axial gradiometer data will produce maximal deflections (of opposite > polarity) on both sides of a current dipole, while planar gradiometer > data produces a positive maximum exactly above the source. If you > apply TF-analysis to axial gradiometer data, you will get two > spatially separated 'blobs' where there was only a single oscillating > dipole in the brain. If you look at power (as is typically done), you > will lose the polarity information, and hence interpreting the power > topography in terms of brain is nearly impossible with axial gradient > data. > > Best, > Eelke > > On 21 November 2012 11:30, Nenad Polomac wrote: >> Dear all, >> >> I have one doubt. I want to calculate ft_freqstatistics on my MEG date >> obtained form ft_freqanalysis. However, I see now in ft_freqstatistics >> tutorial that you suggest that operation should be done on planar gradient >> data. So, the first ft_megplanar and then ft_freqanalysis, ft_combineplanar >> and ft_freqstatistics. My question is, does this step of calculating planar >> gradients for time frequency analysis is necessary or not? Could I apply >> statistic on the data from ft_freqanalysis without any involvement of planar >> gradients calculation. >> Thank you in advance! >> >> All the best! >> >> Nenad >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From liad.glz at gmail.com Fri Nov 23 21:58:38 2012 From: liad.glz at gmail.com (liad glz) Date: Fri, 23 Nov 2012 12:58:38 -0800 Subject: [FieldTrip] Can I use FieldTrip plotting on an existing data? In-Reply-To: References: Message-ID: Dear Eelke, Thank you for your reply. It was indeed the answer I was hoping to get. I still have some questions about the variables though: 1. When you refer to 'var', do you mean SDs? SEs? some other measure of variance that I should calculate? 2. In the webpage you referred me to, i saw that I should also define "dof"; I gather that in the case of average across subjects, this refers to the number of subjects. Then, it will be a matrix of CHANxTIME, where all values are identical to the number of subjects. Is this correct? 3. What about the grad & cfg fields? How should I generate these? Many thanks again for your help Liad On Tue, Nov 20, 2012 at 11:46 PM, Eelke Spaak wrote: > Dear Liad, > > FieldTrip data structures are just Matlab structures, so with some > custom Matlab code you should be able to convert any arbitrary data > matrix into FT style. The data you have resembles the output of FT's > ft_timelockgrandaverage function, with keepindividual='yes' specified. > It should look something like this to be compatible with FT: > > data = > > label: {152x1 cell} % channel labels > avg: [152x900 double] % grand average, chanXtime > var: [152x900 double] % variance, chanXtime > time: [1x900 double] % time axis, in seconds > individual: [10x152x900 double] % subjXchanXtime, individual averages > dimord: 'subj_chan_time' % keep as is, dimensionality ordering > for the fields > > Alternatively, you could put the difference data in a 'simple' > (single-subject) timelock data structure, which would also allow it to > be plotted. This approach is probably the easiest, if all you want to > use FT for is plotting the topography of difference. Have a look at > > http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_defined > for how to create a simple timelock data structure. > > Best, > Eelke > > On 21 November 2012 07:01, liad glz wrote: > > I have two matrices that include EEG data for two experimental conditions > > (channelsXtimepointsXsubjects). The data has already been preprocessed. I > > would like to use FieldTrip in order to plot topographic maps for the > > difference between the conditions, and I see that the function requires > many > > input variables that were manufactured by the previous functions in > > FieldTrip. Does that mean that I cannot use a function without running > all > > the previous ones on the raw data? > > > > Many thanks > > Liad > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Sun Nov 25 16:04:09 2012 From: t.marshall at fcdonders.ru.nl (Tom Marshall) Date: Sun, 25 Nov 2012 16:04:09 +0100 Subject: [FieldTrip] ft_channelrepair with channel absent from data Message-ID: <50B23369.5020105@fcdonders.ru.nl> Hi Trippers, I'm having some difficulty reinterpolating some missing channels in my ctf275 data. These are 2 channels that were never recorded because the sensors in question were switched off. Luckily, in the documentation for ft_channelrepair I find: "*For reconstructing channels that are absent in your data*, please define your neighbours by setting cfg.method='template' and call FT_PREPARE_NEIGHBOURS *without* the data argument: cfg.neighbours = ft_prepare_neighbours(cfg); This will include channels that are missing in your in the neighbour-definition." I dutifully define such a neighbours structure: /cfg=[]// //cfg.method='template';// //cfg.template='CTF275_neighb.mat';// //n=ft_prepare_neighbours(cfg);/ This structure of course contains all 275 MEG channels, including the ones that are missing from my data. So I try to reinterpolate: / //% get the 'full' list of channel names// //for i=1:length(n)// // allchans{i,:}=n(i).label;// //end// // //% find the names of the channels that were not recorded// //missingchans=setdiff(allchans,data.label);// // //% repair// //cfg=[];// //cfg.missingchannel=missingchans;// //cfg.neighbours=n;// //cfg.method='spline';// //data_r=ft_channelrepair(cfg,data);/ this fails with: /??? Error using ==> minus// //Matrix dimensions must agree.// // //Error in ==> ft_channelrepair at 279// // d = sens.chanpos - repmat(c, numel(sensidx), 1);/ length(sensidx) is 301 and length(sens.chanpos) is 273, so the error makes sense. However at this point I get a bit stuck as 'sens' is created in line 104-108 by the function 'ft_fetch_sens' which I can't find! 'help ft_fetch_sens', 'which ft_fetch_sens' and 'edit ft_fetch_sens' all fail. I guess I have several questions all at once: 1) Is it actually possible to reinterpolate MEG channels that were never recorded - eg because the channels were deactivated when the acquisition took place? 2) What might be causing the error I'm seeing? 3) Where is ft_fetch_sens? Thanks for help with any of the above! Best, Tom -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Nov 26 10:45:55 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 26 Nov 2012 10:45:55 +0100 Subject: [FieldTrip] ft_channelrepair with channel absent from data In-Reply-To: <50B23369.5020105@fcdonders.ru.nl> References: <50B23369.5020105@fcdonders.ru.nl> Message-ID: <50B33A53.2000701@donders.ru.nl> Hey Tom, > > I guess I have several questions all at once: > 1) Is it actually possible to reinterpolate MEG channels that were > never recorded - eg because the channels were deactivated when the > acquisition took place? Should work, but only with the SSI (=spherical spline interpolation) method. For the nearest neighbour interpolation, the function constructs a list of neuighbouring and constructs a weighted average. The function, however, wants to weigh each sensor according to its distance from the sensor to be reconstructed. That information can only be found in the grad structure, but in the grad structure there are only sensors which were recorded, thus the distance from a missing sensor cannot be measured because its position is missing in the grad structure. SSI should work though, cause it relies on a different rationale. > 2) What might be causing the error I'm seeing? Since you have 301 channels rather than 275, my suspicion is that you include reference gradiometers. This should not fail in principle, though... maybe I can drop by your office to check it out? Got some time right now? > 3) Where is ft_fetch_sens? It's a private function, can be found in FieldTrip/private. You have to cd to that directory in order for Matlab to find it (the idea behind private function is that there are only visible for higher-level function and 'hidden' for all other functions). Best, Jörn > > Thanks for help with any of the above! > Best, > Tom > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email:t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at gmail.com Mon Nov 26 10:56:17 2012 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Mon, 26 Nov 2012 10:56:17 +0100 Subject: [FieldTrip] ft_channelrepair with channel absent from data In-Reply-To: <50B23369.5020105@fcdonders.ru.nl> References: <50B23369.5020105@fcdonders.ru.nl> Message-ID: Hi Tom and Trippers, To add to Jorn's more detailed answer, if you are ever in doubt as to where to find a FT function, which may be hidden in a private directory (and don't know which of the many private directories to search in), then remember that you can always search for functions on the google FT code page, which doesn't hide the private functions! http://code.google.com/p/fieldtrip/source/browse/ and after searching for ft_fetch_sens http://code.google.com/p/fieldtrip/source/search?q=ft_fetch_sens&origq=ft_fetch_sens&btnG=Search+Trunk Johanna 2012/11/25 Tom Marshall > Hi Trippers, > > I'm having some difficulty reinterpolating some missing channels in my > ctf275 data. These are 2 channels that were never recorded because the > sensors in question were switched off. > > Luckily, in the documentation for ft_channelrepair I find: > > "*For reconstructing channels that are absent in your data*, please > define your neighbours by setting cfg.method='template' and call > FT_PREPARE_NEIGHBOURS *without* the data argument: > cfg.neighbours = ft_prepare_neighbours(cfg); > This will include channels that are missing in your in the > neighbour-definition." > > I dutifully define such a neighbours structure: > > *cfg=[]** > **cfg.method='template';** > **cfg.template='CTF275_neighb.mat';** > **n=ft_prepare_neighbours(cfg);* > > This structure of course contains all 275 MEG channels, including the ones > that are missing from my data. > > So I try to reinterpolate: > * > **% get the 'full' list of channel names** > **for i=1:length(n)** > ** allchans{i,:}=n(i).label;** > **end** > ** > **% find the names of the channels that were not recorded** > **missingchans=setdiff(allchans,data.label);** > ** > **% repair** > **cfg=[];** > **cfg.missingchannel=missingchans;** > **cfg.neighbours=n;** > **cfg.method='spline';** > **data_r=ft_channelrepair(cfg,data);* > > this fails with: > > *??? Error using ==> minus** > **Matrix dimensions must agree.** > ** > **Error in ==> ft_channelrepair at 279** > ** d = sens.chanpos - repmat(c, numel(sensidx), 1);* > > length(sensidx) is 301 and length(sens.chanpos) is 273, so the error makes > sense. However at this point I get a bit stuck as 'sens' is created in line > 104-108 by the function 'ft_fetch_sens' which I can't find! 'help > ft_fetch_sens', 'which ft_fetch_sens' and 'edit ft_fetch_sens' all fail. > > I guess I have several questions all at once: > 1) Is it actually possible to reinterpolate MEG channels that were never > recorded - eg because the channels were deactivated when the acquisition > took place? > 2) What might be causing the error I'm seeing? > 3) Where is ft_fetch_sens? > > Thanks for help with any of the above! > Best, > Tom > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.chait at ucl.ac.uk Mon Nov 26 13:56:06 2012 From: m.chait at ucl.ac.uk (Chait, Maria) Date: Mon, 26 Nov 2012 12:56:06 +0000 Subject: [FieldTrip] PhD Position at UCL Ear Institute Message-ID: <3BA3DF582C0B7542AE0CB625F0119AB816FC90CF@AMSPRD0104MB100.eurprd01.prod.exchangelabs.com> Dear Colleagues, I am writing to point your attention to PhD studentship (available for an immediate start) opening at the UCL Ear Institute and would be grateful if you could distribute the advert to relevant members of your institution. A 3 year PhD studentship in auditory cognitive neuroscience is available as part of a research collaboration between the UCL Ear Institute (London, UK) and NTT Communication Science Labs (Nippon Telegraph and Telephone corporation, Atsugi, Japan). The student will be based at the UCL Ear Institute and supervised by Dr. Maria Chait. They will also be working with Prof. Makio Kashino and Dr. Shigeto Furukawa (NTT) and the research program will involve experiments conducted both at UCL and in Japan, requiring occasional travel. The project will use psychophysics, eye tracking, autonomic response measures and MEG functional brain imaging to investigate which features of sound are perceptually salient. Namely, those sounds that automatically capture attention in a busy scene, even when listeners' initial perceptual focus is elsewhere. The UCL Ear Institute provides state-of-the-art research facilities across a wide range of disciplines and is one of the foremost centres for hearing, speech and language-related research within Europe. Key Requirements The position is only available for UK/EU passport holders. Applicants should hold a 1St class, or upper 2nd bachelor's degree (masters degree an advantage) in an engineering or scientific subject. Previous experience with auditory research, functional brain imaging, neuroscience and/or acoustics is desirable. For an informal discussion, or to submit an application please contact Dr. Maria Chait (m.chait at ucl.ac.uk). Applicants should submit a supporting statement, a CV, and the details of two recommenders. Application review begins December 2012 and will continue until the position is filled. The studentship includes fees and a yearly stipend (about £16000; tax free). Maria Chait PhD m.chait at ucl.ac.uk Senior Lecturer UCL Ear Institute 332 Gray's Inn Road London WC1X 8EE -------------- next part -------------- An HTML attachment was scrubbed... URL: From elilife at gmail.com Mon Nov 26 14:38:04 2012 From: elilife at gmail.com (Eliana Garcia) Date: Mon, 26 Nov 2012 14:38:04 +0100 Subject: [FieldTrip] source statistics on event related data Message-ID: Hello Dear Fieldtrip Developers and users, I would like to know if somebody has done before a source statistic analysis on event related potentials from the output of LCMV beamformer. I have some issues with the compatibility of the cfg.parameter =''avg.mom', since it is a cell structure and the functions for grand average and source statistics works normally for double matrixes. I wonder if there is a way to deal with this (not making arranges on the functions or transforming my data to the format m=sourceFIC.avg.pow(voxels,time) double. I would also like to know how to deal with the parameters for source statistics on event related fields (such as: cfg.latency). Thanks a lot! -- Eliana García Cossio Applied Neurotechnology Lab. Graduate School of Neural and Behavioural Science - Max Planck Research School Institute of Medical Psychology and Behavioural Neurobiology Universität Tübingen (+0049) 01 577-8587604 Otfried-Müller-Str. 47, 72076 Tübingen- Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From Daniel.Keeser at med.uni-muenchen.de Mon Nov 26 15:39:04 2012 From: Daniel.Keeser at med.uni-muenchen.de (Keeser, Daniel Dr.) Date: Mon, 26 Nov 2012 15:39:04 +0100 Subject: [FieldTrip] Job offer: Simultaneous EEG and fMRI of neurofeedback In-Reply-To: <36335A466E9D6641BC7260D521A9164A7512FBE3D6@MITEX03N.helios.med.uni-muenchen.de> References: <36335A466E9D6641BC7260D521A9164A7512FBE3D3@MITEX03N.helios.med.uni-muenchen.de>, <36335A466E9D6641BC7260D521A9164A7512FBE3D6@MITEX03N.helios.med.uni-muenchen.de> Message-ID: <36335A466E9D6641BC7260D521A9164A7512FBE3D8@MITEX03N.helios.med.uni-muenchen.de> Simultaneous EEG and fMRI of neurofeedback We are seeking a motivated candidate to support the experimatal set-up, data acquistion and data analysis. The primary objective is to develop a protocol to effectively train electroencephalography (EEG) coherence between specific areas in the brain during the simultaneous recording of functional magnetic resonance imaging (fMRI) protocols. The simultaneous recording and analysis of EEG and fMRI allows to non-invasively gain new insights into brain function. Unlike the post-hoc comparison of different research methods, simultaneous measurements of EEG and fMRI offer the possibility to obtain brain functional data during the same sensory stimulation in EEG and fMRI. The two methods are complementary with respect to the temporal and spatial resolution. The results of previous studies about simultaneous EEG-fMRI indicate that EEG neurofeedback is technically feasible with an appropriate EEG data quality. Additionally, simultaneous functional connectivity MRI (fcMRI) and EEG recordings will provide new insights into the relationship between fcMRI- and associated EEG networks. The change of EEG signals through neurofeedback could lead to an immediate change in fcMRI as specific EEG frequency bands correlate with the fcMRI. Accordingly, the modulation of the EEG by neurofeedback may show a direct influence on the fcMRI. Studies will include simultaneous measurements of fcMRI and EEG with healthy volunteers and offer the opportunity to gain experience in a wide range of methodologies. In our lab we have two BrainAmp MR 32 channles amplifiers (Brain Products) and we succesfully use online correction of MR artifacts. Using this approach, we are able to give feedback to the subjects regarding their own EEG with a time delay of about 1s. We will use BCI2000 combined with Fieldtrip. Experience with BCI 2000 and/or Fieldtrip would be advantageous. Candidates should be well versed with MATLAB and should have at least basic knowledge in C#/C++. The MRi data is acquired using a 3T Siemens MR scanner. The successful applicant will have a strong interest in the research topic and will be capable of working independently. The research fellow will additionally have a master degree (or diploma) in biomedical engineering, neuroscience, informatics or psychology. Experience with fMRI and/or EEG are beneficial. The initial appointment term will be one year, starting January 2013. Salary is according to TV-L 13. Further extensions will depend on availability of funds. Please send an application letter including a brief statement outlining your motivation to apply for this particular position and a Curriculum vitae (CV) to: daniel.keeser at med.uni-muenchen.de Institute for Clinical Radiology, Ludwig-Maximilians-University, 81377 Munich, Germany. Department of Psychiatry and Psychotherapy, Ludwig-Maximilians University, 80333 Munich, Germany. ____________________________________ Dr. Daniel Keeser Post-Doctoral Research Fellow Institute of Clinical Radiology Department of Psychiatry and Psychotherapy University Munich Studienzentrum CERES 80336 Munich, Germany phone: +49 89 5160 9109 fax.: +49 89 2000 87 60 710 email: daniel.keeser at med.uni-muenchen.de http://www.klinikum.uni-muenchen.de/interest-imaging/de/index.html From monikamellem at gmail.com Tue Nov 27 00:22:51 2012 From: monikamellem at gmail.com (Monika Mellem) Date: Mon, 26 Nov 2012 18:22:51 -0500 Subject: [FieldTrip] Coherence of single trials Message-ID: Dear Fieldtrippers, I am trying to calculate coherence estimates on individual trials of our EEG data and then want to perform a within-subjects statistical test, but so far I have not been able to figure out how to do this. I am able to calculate coherence for our 22 subjects and then perform statistics on the grand average, so I understand the basic usage of these functions (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, ft_freqstatistics). But now we want to do statistical testing on individual subjects. Is it possible to keep coherence for individual trials in Fieldtrip as they seem necessary for this statistical analysis? I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and get the cross-spectra of individual trials (I also tried computing the fourier spectra but it made no difference in the following step). However, when computing the coherence in ft_connectivityanalysis, Fieldtrip averages over the trials. Is there a way to output coherence for individual trials instead? Please see the full cfg structure settings below. Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as an input to ft_freqstatistics since previous posts suggested this was for single subject coherence statistics, but our data is paired as the same stimulus appears in the 2 conditions we are comparing. Is there a paired test for single subject coherence testing, or should we use cfg.statistic = 'depsamplesT'? Many thanks for any suggestions you may have! Monika ________________ Monika Mellem PhD Candidate Interdisciplinary Program in Neuroscience Georgetown University Washington, DC msm79 at georgetown.edu 202-687-2687 *********************************************************************** cfg settings for ft_freqanalysis and ft_connectivityanalysis *********************************************************************** cfg = []; cfg.prestim = -0.5; cfg.poststim = 1.5; cfg.foilim = [2 30]; cfg.freqrange = 'low'; % cfg.output = 'fourier'; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.keeptrials = 'yes'; cfg.channel = {'all'}; cfg.channelcmb = {refchan 'all'}; cfgcoh=[]; cfgcoh.channelcmb = cfg.channelcmb; cfgcoh.method = 'coh'; v = genvarname(['CRSP_' condition '_low']); eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around ft_freqanalysis w = genvarname(['COH_' condition '_low']); eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); -------------- next part -------------- An HTML attachment was scrubbed... URL: From sherrykhan78 at gmail.com Tue Nov 27 02:38:46 2012 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Mon, 26 Nov 2012 20:38:46 -0500 Subject: [FieldTrip] Coherence of single trials In-Reply-To: References: Message-ID: Coherence we normally used is event related coherence, which measures the consistency of phase difference across trials between regions/channels, for single trial coherence there is an old paper which discuss this http://brainimaging.waisman.wisc.edu/~lutz/Lachaux_et_all_IJBChaos_2000.pdf I implemented this long time back let me me know if this is some thing of your interest. Sheraz Khan Martinos Center On Mon, Nov 26, 2012 at 6:22 PM, Monika Mellem wrote: > Dear Fieldtrippers, > > I am trying to calculate coherence estimates on individual trials of our > EEG data and then want to perform a within-subjects statistical test, but > so far I have not been able to figure out how to do this. I am able to > calculate coherence for our 22 subjects and then perform statistics on the > grand average, so I understand the basic usage of these functions > (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, > ft_freqstatistics). But now we want to do statistical testing on > individual subjects. Is it possible to keep coherence for individual > trials in Fieldtrip as they seem necessary for this statistical analysis? > > I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and > get the cross-spectra of individual trials (I also tried computing the > fourier spectra but it made no difference in the following step). However, > when computing the coherence in ft_connectivityanalysis, Fieldtrip averages > over the trials. Is there a way to output coherence for individual trials > instead? Please see the full cfg structure settings below. > > Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as > an input to ft_freqstatistics since previous posts suggested this was for > single subject coherence statistics, but our data is paired as the same > stimulus appears in the 2 conditions we are comparing. Is there a paired > test for single subject coherence testing, or should we use cfg.statistic = > 'depsamplesT'? > > Many thanks for any suggestions you may have! > Monika > ________________ > Monika Mellem > PhD Candidate > Interdisciplinary Program in Neuroscience > Georgetown University > Washington, DC > msm79 at georgetown.edu > 202-687-2687 > > *********************************************************************** > cfg settings for ft_freqanalysis and ft_connectivityanalysis > *********************************************************************** > cfg = []; > cfg.prestim = -0.5; > cfg.poststim = 1.5; > cfg.foilim = [2 30]; > cfg.freqrange = 'low'; > % cfg.output = 'fourier'; > cfg.output = 'powandcsd'; > cfg.method = 'mtmconvol'; > cfg.keeptrials = 'yes'; > cfg.channel = {'all'}; > cfg.channelcmb = {refchan 'all'}; > > cfgcoh=[]; > cfgcoh.channelcmb = cfg.channelcmb; > cfgcoh.method = 'coh'; > > v = genvarname(['CRSP_' condition '_low']); > eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around > ft_freqanalysis > > w = genvarname(['COH_' condition '_low']); > eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Nov 27 09:14:34 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 27 Nov 2012 09:14:34 +0100 Subject: [FieldTrip] Coherence of single trials In-Reply-To: References: Message-ID: <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl> Hi Monika, If you want to test across subjects in a paired fashion, you can use depsamplesT. Your dependent variable then should contain for each subject and condition the coherence (which of course should be estimated across all trials belonging to that condition). Even better would be to perform a so-called Z-transformation to the data. For some inspiration you could have a look at the following paper: http://www.jneurosci.org/content/31/18/6750.long Best, Jan-Mathijs On Nov 27, 2012, at 12:22 AM, Monika Mellem wrote: > Dear Fieldtrippers, > > I am trying to calculate coherence estimates on individual trials of our EEG data and then want to perform a within-subjects statistical test, but so far I have not been able to figure out how to do this. I am able to calculate coherence for our 22 subjects and then perform statistics on the grand average, so I understand the basic usage of these functions (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, ft_freqstatistics). But now we want to do statistical testing on individual subjects. Is it possible to keep coherence for individual trials in Fieldtrip as they seem necessary for this statistical analysis? > > I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and get the cross-spectra of individual trials (I also tried computing the fourier spectra but it made no difference in the following step). However, when computing the coherence in ft_connectivityanalysis, Fieldtrip averages over the trials. Is there a way to output coherence for individual trials instead? Please see the full cfg structure settings below. > > Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as an input to ft_freqstatistics since previous posts suggested this was for single subject coherence statistics, but our data is paired as the same stimulus appears in the 2 conditions we are comparing. Is there a paired test for single subject coherence testing, or should we use cfg.statistic = 'depsamplesT'? > > Many thanks for any suggestions you may have! > Monika > ________________ > Monika Mellem > PhD Candidate > Interdisciplinary Program in Neuroscience > Georgetown University > Washington, DC > msm79 at georgetown.edu > 202-687-2687 > > *********************************************************************** > cfg settings for ft_freqanalysis and ft_connectivityanalysis > *********************************************************************** > cfg = []; > cfg.prestim = -0.5; > cfg.poststim = 1.5; > cfg.foilim = [2 30]; > cfg.freqrange = 'low'; > % cfg.output = 'fourier'; > cfg.output = 'powandcsd'; > cfg.method = 'mtmconvol'; > cfg.keeptrials = 'yes'; > cfg.channel = {'all'}; > cfg.channelcmb = {refchan 'all'}; > > cfgcoh=[]; > cfgcoh.channelcmb = cfg.channelcmb; > cfgcoh.method = 'coh'; > > v = genvarname(['CRSP_' condition '_low']); > eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around ft_freqanalysis > > w = genvarname(['COH_' condition '_low']); > eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From monikamellem at gmail.com Tue Nov 27 12:25:52 2012 From: monikamellem at gmail.com (Monika Mellem) Date: Tue, 27 Nov 2012 06:25:52 -0500 Subject: [FieldTrip] Coherence of single trials In-Reply-To: <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl> References: <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl> Message-ID: Thank you Sheraz and Jan-Mathijs for your help! Sheraz, if you do have the code to keep single-trial coherence estimates, I would much appreciate it if you could pass it along (monikamellem at gmail.com). And Jan-Mathijs, okay, the necessary statistics make sense, and I will z-transform the data too. But as far as you know, is there no implementation already in Fieldtrip to keep the single-trial coherence estimates? I assumed setting cfg.keeptrials = 'yes' would do this, but is there something else I'm missing as this doesn't seem to work? I would prefer to try what Fieldtrip has implemented first before integrating Sheraz's code into my version of Fieldtrip. Thank you very much! Monika On Tue, Nov 27, 2012 at 3:14 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Monika, > > If you want to test across subjects in a paired fashion, you can use > depsamplesT. Your dependent variable then should contain for each subject > and condition the coherence (which of course should be estimated across all > trials belonging to that condition). Even better would be to perform a > so-called Z-transformation to the data. For some inspiration you could have > a look at the following paper: > http://www.jneurosci.org/content/31/18/6750.long > > Best, > > Jan-Mathijs > > On Nov 27, 2012, at 12:22 AM, Monika Mellem wrote: > > Dear Fieldtrippers, > > I am trying to calculate coherence estimates on individual trials of our > EEG data and then want to perform a within-subjects statistical test, but > so far I have not been able to figure out how to do this. I am able to > calculate coherence for our 22 subjects and then perform statistics on the > grand average, so I understand the basic usage of these functions > (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, > ft_freqstatistics). But now we want to do statistical testing on > individual subjects. Is it possible to keep coherence for individual > trials in Fieldtrip as they seem necessary for this statistical analysis? > > I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and > get the cross-spectra of individual trials (I also tried computing the > fourier spectra but it made no difference in the following step). However, > when computing the coherence in ft_connectivityanalysis, Fieldtrip averages > over the trials. Is there a way to output coherence for individual trials > instead? Please see the full cfg structure settings below. > > Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as > an input to ft_freqstatistics since previous posts suggested this was for > single subject coherence statistics, but our data is paired as the same > stimulus appears in the 2 conditions we are comparing. Is there a paired > test for single subject coherence testing, or should we use cfg.statistic = > 'depsamplesT'? > > Many thanks for any suggestions you may have! > Monika > ________________ > Monika Mellem > PhD Candidate > Interdisciplinary Program in Neuroscience > Georgetown University > Washington, DC > msm79 at georgetown.edu > 202-687-2687 > > *********************************************************************** > cfg settings for ft_freqanalysis and ft_connectivityanalysis > *********************************************************************** > cfg = []; > cfg.prestim = -0.5; > cfg.poststim = 1.5; > cfg.foilim = [2 30]; > cfg.freqrange = 'low'; > % cfg.output = 'fourier'; > cfg.output = 'powandcsd'; > cfg.method = 'mtmconvol'; > cfg.keeptrials = 'yes'; > cfg.channel = {'all'}; > cfg.channelcmb = {refchan 'all'}; > > cfgcoh=[]; > cfgcoh.channelcmb = cfg.channelcmb; > cfgcoh.method = 'coh'; > > v = genvarname(['CRSP_' condition '_low']); > eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around > ft_freqanalysis > > w = genvarname(['COH_' condition '_low']); > eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Nov 27 12:49:38 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 27 Nov 2012 12:49:38 +0100 Subject: [FieldTrip] Coherence of single trials In-Reply-To: References: <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl> Message-ID: Dear Monika, It may have escaped your attention while digging to the previous posts, but the question has been raised (and answered ;-) ) before. Just for the very very last time I will make the following statement: Single trial coherence estimates cannot be computed! Perhaps the font size and color will make it memorable ;-). This is due to the simple fact that coherence is defined across observations. If you have just a single observation, due to the mathematics involved, the coherence value will be 1. Since you want to do group analysis, I think you really should compute the coherence per condition, where each condition should consist of a sufficient number of trials. Assuming that the time domain data is organised such that you have all trials (irrespective of the condition) in a single structure, do something like this. for each subject cfg = []; cfg.output = 'fourier'; cfg.method = 'mtmfft'/'mtmconvol' cfg.keeptrials = 'yes'; ... freq = ft_freqanalysis(cfg, data); cfg = []; cfg.channelcmb = {something here} cfg.trials = [indices of trials belonging to condition 1]; coh1 = ft_connectivityanalysis(cfg, freq); % compute coherence across the trials for condition 1 cfg.trials = [indices of trials belonging to condition 2]; coh2 = ft_connectivityanalysis(cfg, freq); % compute coherence across the trials for condition 2 end Good luck, Jan-Mathijs On Nov 27, 2012, at 12:25 PM, Monika Mellem wrote: > Thank you Sheraz and Jan-Mathijs for your help! > Sheraz, if you do have the code to keep single-trial coherence estimates, I would much appreciate it if you could pass it along (monikamellem at gmail.com). > And Jan-Mathijs, okay, the necessary statistics make sense, and I will z-transform the data too. But as far as you know, is there no implementation already in Fieldtrip to keep the single-trial coherence estimates? I assumed setting cfg.keeptrials = 'yes' would do this, but is there something else I'm missing as this doesn't seem to work? I would prefer to try what Fieldtrip has implemented first before integrating Sheraz's code into my version of Fieldtrip. > > Thank you very much! > Monika > > > On Tue, Nov 27, 2012 at 3:14 AM, jan-mathijs schoffelen wrote: > Hi Monika, > > If you want to test across subjects in a paired fashion, you can use depsamplesT. Your dependent variable then should contain for each subject and condition the coherence (which of course should be estimated across all trials belonging to that condition). Even better would be to perform a so-called Z-transformation to the data. For some inspiration you could have a look at the following paper: http://www.jneurosci.org/content/31/18/6750.long > > Best, > > Jan-Mathijs > > On Nov 27, 2012, at 12:22 AM, Monika Mellem wrote: > >> Dear Fieldtrippers, >> >> I am trying to calculate coherence estimates on individual trials of our EEG data and then want to perform a within-subjects statistical test, but so far I have not been able to figure out how to do this. I am able to calculate coherence for our 22 subjects and then perform statistics on the grand average, so I understand the basic usage of these functions (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, ft_freqstatistics). But now we want to do statistical testing on individual subjects. Is it possible to keep coherence for individual trials in Fieldtrip as they seem necessary for this statistical analysis? >> >> I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and get the cross-spectra of individual trials (I also tried computing the fourier spectra but it made no difference in the following step). However, when computing the coherence in ft_connectivityanalysis, Fieldtrip averages over the trials. Is there a way to output coherence for individual trials instead? Please see the full cfg structure settings below. >> >> Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as an input to ft_freqstatistics since previous posts suggested this was for single subject coherence statistics, but our data is paired as the same stimulus appears in the 2 conditions we are comparing. Is there a paired test for single subject coherence testing, or should we use cfg.statistic = 'depsamplesT'? >> >> Many thanks for any suggestions you may have! >> Monika >> ________________ >> Monika Mellem >> PhD Candidate >> Interdisciplinary Program in Neuroscience >> Georgetown University >> Washington, DC >> msm79 at georgetown.edu >> 202-687-2687 >> >> *********************************************************************** >> cfg settings for ft_freqanalysis and ft_connectivityanalysis >> *********************************************************************** >> cfg = []; >> cfg.prestim = -0.5; >> cfg.poststim = 1.5; >> cfg.foilim = [2 30]; >> cfg.freqrange = 'low'; >> % cfg.output = 'fourier'; >> cfg.output = 'powandcsd'; >> cfg.method = 'mtmconvol'; >> cfg.keeptrials = 'yes'; >> cfg.channel = {'all'}; >> cfg.channelcmb = {refchan 'all'}; >> >> cfgcoh=[]; >> cfgcoh.channelcmb = cfg.channelcmb; >> cfgcoh.method = 'coh'; >> >> v = genvarname(['CRSP_' condition '_low']); >> eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around ft_freqanalysis >> >> w = genvarname(['COH_' condition '_low']); >> eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sherrykhan78 at gmail.com Tue Nov 27 13:56:05 2012 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Tue, 27 Nov 2012 07:56:05 -0500 Subject: [FieldTrip] Coherence of single trials In-Reply-To: References: <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl> Message-ID: Dear Monika, As Jan-Mathijs correctly mention Coherence is measure across trials, for single trial coherence value is one, the method I mention above also can not escape from this mathematical truth, the associated bias with the method is almost 0.9. Sheraz On Tue, Nov 27, 2012 at 6:49 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Dear Monika, > > It may have escaped your attention while digging to the previous posts, > but the question has been raised (and answered ;-) ) before. Just for the > very very last time I will make the following statement: > > *Single trial coherence estimates cannot be computed!* > * > * > Perhaps the font size and color will make it memorable ;-). This is due to > the simple fact that coherence is defined across observations. If you have > just a single observation, due to the mathematics involved, the coherence > value will be 1. > Since you want to do group analysis, I think you really should compute the > coherence per condition, where each condition should consist of a > sufficient number of trials. Assuming that the time domain data is > organised such that you have all trials (irrespective of the condition) in > a single structure, do something like this. > > for each subject > cfg = []; > cfg.output = 'fourier'; > cfg.method = 'mtmfft'/'mtmconvol' > cfg.keeptrials = 'yes'; > ... > freq = ft_freqanalysis(cfg, data); > > cfg = []; > cfg.channelcmb = {something here} > cfg.trials = [indices of trials belonging to condition 1]; > coh1 = ft_connectivityanalysis(cfg, freq); % compute coherence across > the trials for condition 1 > cfg.trials = [indices of trials belonging to condition 2]; > coh2 = ft_connectivityanalysis(cfg, freq); % compute coherence across > the trials for condition 2 > end > > > Good luck, > > Jan-Mathijs > > > On Nov 27, 2012, at 12:25 PM, Monika Mellem wrote: > > Thank you Sheraz and Jan-Mathijs for your help! > Sheraz, if you do have the code to keep single-trial coherence estimates, > I would much appreciate it if you could pass it along ( > monikamellem at gmail.com). > And Jan-Mathijs, okay, the necessary statistics make sense, and I will > z-transform the data too. But as far as you know, is there no > implementation already in Fieldtrip to keep the single-trial coherence > estimates? I assumed setting cfg.keeptrials = 'yes' would do this, but is > there something else I'm missing as this doesn't seem to work? I would > prefer to try what Fieldtrip has implemented first before integrating > Sheraz's code into my version of Fieldtrip. > > Thank you very much! > Monika > > > On Tue, Nov 27, 2012 at 3:14 AM, jan-mathijs schoffelen < > jan.schoffelen at donders.ru.nl> wrote: > >> Hi Monika, >> >> If you want to test across subjects in a paired fashion, you can use >> depsamplesT. Your dependent variable then should contain for each subject >> and condition the coherence (which of course should be estimated across all >> trials belonging to that condition). Even better would be to perform a >> so-called Z-transformation to the data. For some inspiration you could have >> a look at the following paper: >> http://www.jneurosci.org/content/31/18/6750.long >> >> Best, >> >> Jan-Mathijs >> >> On Nov 27, 2012, at 12:22 AM, Monika Mellem wrote: >> >> Dear Fieldtrippers, >> >> I am trying to calculate coherence estimates on individual trials of our >> EEG data and then want to perform a within-subjects statistical test, but >> so far I have not been able to figure out how to do this. I am able to >> calculate coherence for our 22 subjects and then perform statistics on the >> grand average, so I understand the basic usage of these functions >> (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, >> ft_freqstatistics). But now we want to do statistical testing on >> individual subjects. Is it possible to keep coherence for individual >> trials in Fieldtrip as they seem necessary for this statistical analysis? >> >> I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and >> get the cross-spectra of individual trials (I also tried computing the >> fourier spectra but it made no difference in the following step). However, >> when computing the coherence in ft_connectivityanalysis, Fieldtrip averages >> over the trials. Is there a way to output coherence for individual trials >> instead? Please see the full cfg structure settings below. >> >> Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as >> an input to ft_freqstatistics since previous posts suggested this was for >> single subject coherence statistics, but our data is paired as the same >> stimulus appears in the 2 conditions we are comparing. Is there a paired >> test for single subject coherence testing, or should we use cfg.statistic = >> 'depsamplesT'? >> >> Many thanks for any suggestions you may have! >> Monika >> ________________ >> Monika Mellem >> PhD Candidate >> Interdisciplinary Program in Neuroscience >> Georgetown University >> Washington, DC >> msm79 at georgetown.edu >> 202-687-2687 >> >> *********************************************************************** >> cfg settings for ft_freqanalysis and ft_connectivityanalysis >> *********************************************************************** >> cfg = []; >> cfg.prestim = -0.5; >> cfg.poststim = 1.5; >> cfg.foilim = [2 30]; >> cfg.freqrange = 'low'; >> % cfg.output = 'fourier'; >> cfg.output = 'powandcsd'; >> cfg.method = 'mtmconvol'; >> cfg.keeptrials = 'yes'; >> cfg.channel = {'all'}; >> cfg.channelcmb = {refchan 'all'}; >> >> cfgcoh=[]; >> cfgcoh.channelcmb = cfg.channelcmb; >> cfgcoh.method = 'coh'; >> >> v = genvarname(['CRSP_' condition '_low']); >> eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around >> ft_freqanalysis >> >> w = genvarname(['COH_' condition '_low']); >> eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rieder at med.uni-frankfurt.de Tue Nov 27 14:23:42 2012 From: rieder at med.uni-frankfurt.de (Maria Rieder) Date: Tue, 27 Nov 2012 14:23:42 +0100 Subject: [FieldTrip] problems with construction of grids for individual subjects Message-ID: <50B4BEDE.9020102@med.uni-frankfurt.de> Dear fieldtrip users, I have 2 questions regarding the construction of grids for individual subjects. This is the code I used (the template was build according to the tutorial "Create MNI-aligned grids..."): cfg = []; cfg.write= 'no'; cfg.coordsys= 'ctf'; [segmentedmri] = ft_volumesegment(cfg, mri); cfg = []; cfg.method='singleshell';% or single sphere model vol = ft_prepare_headmodel(cfg, segmentedmri); cfg = []; cfg.grid.warpmni= 'yes'; cfg.grid.template= template_grid; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.mri= mri; grid= ft_prepare_sourcemodel(cfg); 1.It turns out that my script works quite well for most of my subjects, but in case of one single subject I obtain a curious grid which has no grid point in the region of the occipital cortex/cerebellum (2^nd figure plotted in red). As you can see in the first figure the subjects mri look good and also do the template grid (2^nd figure plotted in green). I'm wondering what went wrong. So what options do I have if the warping/transform algorithm goes wrong? 2.Why is the template rotated and shifted when comparing it to the subjects grid (2^nd figure bottom right)? Thank you in advance, Maria -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: clip_image002.jpg Type: image/jpeg Size: 32453 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: clip_image003.png Type: image/png Size: 171403 bytes Desc: not available URL: From Nico.Boehler at UGent.be Tue Nov 27 17:24:39 2012 From: Nico.Boehler at UGent.be (Nico =?iso-8859-1?b?QvZobGVy?=) Date: Tue, 27 Nov 2012 17:24:39 +0100 Subject: [FieldTrip] PhD position vacancy at the Dept of Experimental Psychology, University of Ghent, Belgium Message-ID: <20121127172439.Horde.k8EmBtD6UQ5QtOlHRlezRdA@webmail.ugent.be> We are seeking a highly motivated PhD student for a 4-year project on /the role of selective attention in reward-modulated cognitive control/. The project will be supervised by Nico Boehler in collaboration with Wim Notebaert (http://expsy.ugent.be/staff/cstaff.htm). Our department hosts ten research groups, creating a dynamic environment including regular internal presentation series as well as frequent talks by invited speakers etc. We have access to state-of-the-art equipment including a 64/128-channel Biosemi EEG system and a research-dedicated 3-tesla Siemens MR scanner, as well as eye-tracking devices and TMS. Candidates are expected to have a Master's degree in psychology, (cognitive) neuroscience, or a related discipline on the starting date. He or she will mostly carry out behavioral and EEG experiments, but extensions to fMRI (including MR-compatible EEG) and TMS are possible. Experience with any of these techniques would be an asset. The starting date is flexible (but preferably early 2013). The project will culminate after four years in a PhD thesis. Salary is according to standard Belgian regulations (scholarship: ± ?22.000,? net/year). Although the governing language at Ghent University is Dutch, knowledge of Dutch is not a pre-requisite. Interested candidates should send a CV, motivation letter, and two (email) addresses of potential referees to nico.boehler at ugent.be before February 1st 2013. Informal inquiries can also be sent via email. Nico Boehler Dept. of Experimental Psychology Ghent University Belgium -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron__t at hotmail.com Tue Nov 27 19:24:30 2012 From: aaron__t at hotmail.com (Aaron T) Date: Tue, 27 Nov 2012 10:24:30 -0800 Subject: [FieldTrip] Coherence of single trials In-Reply-To: References: , <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl>, , , Message-ID: On a moderately related note, using a cfg setup that is very similar to Monika's I am encountering dimord errors with ft_connectivityplot I don't understand. cfg = []; cfg.channel = {'all'}; cfg.channelcmb = {refchan 'all'}; v= ft_frequencyanalysis cfg = [];cfg.channel = {refchan 'all'}; w = ft_connectivityanalysis (cfg, v); cfg = []cfg.parameter = 'cohspctrm';cfg.zlim = [0 1]z = ft_connectivityplot (cfg, w); When using .channelcmb in this way I encounter a dimord error: "must be chan_chan_freq or chancmb_freq"). The issue seems to be related to use of ft_frequencyanalysis; v receives an rpttap_chan_freq dimord (as I believe it should), but when subsequently using the .coh method with ft_connectivityanalysis variable w receives a dimord of chan_freq (and even if manually changed thereafter, is subsequently returned to this value by ft_checkdata calls). Is there an alternative way to use .channelcmb to set up channel pairs for analysis in ft_frequencyanalysis for subsequent use with connectivityanalysis and plot? Thanks for any suggestions. Aaron Date: Tue, 27 Nov 2012 07:56:05 -0500 From: sherrykhan78 at gmail.com To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Coherence of single trials Dear Monika, As Jan-Mathijs correctly mention Coherence is measure across trials, for single trial coherence value is one, the method I mention above also can not escape from this mathematical truth, the associated bias with the method is almost 0.9. Sheraz On Tue, Nov 27, 2012 at 6:49 AM, jan-mathijs schoffelen wrote: Dear Monika, It may have escaped your attention while digging to the previous posts, but the question has been raised (and answered ;-) ) before. Just for the very very last time I will make the following statement: Single trial coherence estimates cannot be computed! Perhaps the font size and color will make it memorable ;-). This is due to the simple fact that coherence is defined across observations. If you have just a single observation, due to the mathematics involved, the coherence value will be 1. Since you want to do group analysis, I think you really should compute the coherence per condition, where each condition should consist of a sufficient number of trials. Assuming that the time domain data is organised such that you have all trials (irrespective of the condition) in a single structure, do something like this. for each subject cfg = []; cfg.output = 'fourier'; cfg.method = 'mtmfft'/'mtmconvol' cfg.keeptrials = 'yes'; ... freq = ft_freqanalysis(cfg, data); cfg = []; cfg.channelcmb = {something here} cfg.trials = [indices of trials belonging to condition 1]; coh1 = ft_connectivityanalysis(cfg, freq); % compute coherence across the trials for condition 1 cfg.trials = [indices of trials belonging to condition 2]; coh2 = ft_connectivityanalysis(cfg, freq); % compute coherence across the trials for condition 2end Good luck, Jan-Mathijs On Nov 27, 2012, at 12:25 PM, Monika Mellem wrote: Thank you Sheraz and Jan-Mathijs for your help! Sheraz, if you do have the code to keep single-trial coherence estimates, I would much appreciate it if you could pass it along (monikamellem at gmail.com). And Jan-Mathijs, okay, the necessary statistics make sense, and I will z-transform the data too. But as far as you know, is there no implementation already in Fieldtrip to keep the single-trial coherence estimates? I assumed setting cfg.keeptrials = 'yes' would do this, but is there something else I'm missing as this doesn't seem to work? I would prefer to try what Fieldtrip has implemented first before integrating Sheraz's code into my version of Fieldtrip. Thank you very much! Monika On Tue, Nov 27, 2012 at 3:14 AM, jan-mathijs schoffelen wrote: Hi Monika, If you want to test across subjects in a paired fashion, you can use depsamplesT. Your dependent variable then should contain for each subject and condition the coherence (which of course should be estimated across all trials belonging to that condition). Even better would be to perform a so-called Z-transformation to the data. For some inspiration you could have a look at the following paper: http://www.jneurosci.org/content/31/18/6750.long Best, Jan-Mathijs On Nov 27, 2012, at 12:22 AM, Monika Mellem wrote: Dear Fieldtrippers, I am trying to calculate coherence estimates on individual trials of our EEG data and then want to perform a within-subjects statistical test, but so far I have not been able to figure out how to do this. I am able to calculate coherence for our 22 subjects and then perform statistics on the grand average, so I understand the basic usage of these functions (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, ft_freqstatistics). But now we want to do statistical testing on individual subjects. Is it possible to keep coherence for individual trials in Fieldtrip as they seem necessary for this statistical analysis? I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and get the cross-spectra of individual trials (I also tried computing the fourier spectra but it made no difference in the following step). However, when computing the coherence in ft_connectivityanalysis, Fieldtrip averages over the trials. Is there a way to output coherence for individual trials instead? Please see the full cfg structure settings below. Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as an input to ft_freqstatistics since previous posts suggested this was for single subject coherence statistics, but our data is paired as the same stimulus appears in the 2 conditions we are comparing. Is there a paired test for single subject coherence testing, or should we use cfg.statistic = 'depsamplesT'? Many thanks for any suggestions you may have! Monika ________________Monika Mellem PhD Candidate Interdisciplinary Program in Neuroscience Georgetown University Washington, DC msm79 at georgetown.edu 202-687-2687 *********************************************************************** cfg settings for ft_freqanalysis and ft_connectivityanalysis *********************************************************************** cfg = []; cfg.prestim = -0.5; cfg.poststim = 1.5; cfg.foilim = [2 30]; cfg.freqrange = 'low'; % cfg.output = 'fourier'; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.keeptrials = 'yes'; cfg.channel = {'all'}; cfg.channelcmb = {refchan 'all'}; cfgcoh=[]; cfgcoh.channelcmb = cfg.channelcmb; cfgcoh.method = 'coh'; v = genvarname(['CRSP_' condition '_low']); eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around ft_freqanalysis w = genvarname(['COH_' condition '_low']); eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics,Nijmegen, The Netherlands J.Schoffelen at donders.ru.nlTelephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics,Nijmegen, The Netherlands J.Schoffelen at donders.ru.nlTelephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcgoiv0 at wfu.edu Tue Nov 27 20:26:50 2012 From: mcgoiv0 at wfu.edu (McGowin, Inna) Date: Tue, 27 Nov 2012 14:26:50 -0500 Subject: [FieldTrip] correction for movement tool In-Reply-To: <1845155284.1304271.1353075065072.JavaMail.root@sculptor.zimbra.ru.nl> References: <1845155284.1304271.1353075065072.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Thanks Arjen, I am studying the article now. -------------- next part -------------- An HTML attachment was scrubbed... URL: From am236 at georgetown.edu Tue Nov 27 21:06:17 2012 From: am236 at georgetown.edu (Andrei Medvedev) Date: Tue, 27 Nov 2012 15:06:17 -0500 Subject: [FieldTrip] Coherence of single trials In-Reply-To: References: <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl> Message-ID: <50B51D39.4060009@georgetown.edu> Dear Monika, Indeed, Coh cannot be calculated on single trials, it requires averaging of the cross-spectrum over (some) trials. Customarily, people average ALL trials recorded in a subject and end up with just only one coherence measurement for this subject. Then obviously stats cannot be run on the individual level and only a group analysis can be done (e.g., you have 20 subjects, they give you 20 coherence values and you run your stats on those 20 values). Does this mean that coherence can be analyzed only on a group level? Perhaps not. I suggest the following approach. Coherence can be considered as a 'sample', or 'population', statistic (similar to means, medians, variances etc, which are calculated from a set of data points). Methods of estimating statistical properties of those 'population' measures are well known, they are based on resampling, jackknifing and bootstrapping. Simply put, you can take a SUBSET of your trials (e.g., selecting randomly 50 trials from all 100 trials in a particular subject) and calculate coherence over those 50 selected trials. Then repeat the process of random selection (with replacement, as in jackknifing) a certain number of times (N) and you would have a set of N 'sample' coherences for this subject. Then you can run your stats on those 'sample' coherences for this particular subject thus achieving your goal of the individual subject analysis. Any feedback from the fellows Fieldtripers about this approach? Thank you, Andrei Medvedev Georgetown University. On 11/27/2012 6:49 AM, jan-mathijs schoffelen wrote: > Dear Monika, > > It may have escaped your attention while digging to the previous > posts, but the question has been raised (and answered ;-) ) before. > Just for the very very last time I will make the following statement: > > *Single trialcoherenceestimatescannotbecomputed!* > * > * > Perhaps the font size and color will make it memorable ;-). This is > due to the simple fact that coherence is defined across observations. > If you have just a single observation, due to the mathematics > involved, the coherence value will be 1. > Since you want to do group analysis, I think you really should compute > the coherence per condition, where each condition should consist of a > sufficient number of trials. Assuming that the time domain data is > organised such that you have all trials (irrespective of the > condition) in a single structure, do something like this. > > for each subject > cfg = []; > cfg.output = 'fourier'; > cfg.method = 'mtmfft'/'mtmconvol' > cfg.keeptrials = 'yes'; > ... > freq = ft_freqanalysis(cfg, data); > > cfg = []; > cfg.channelcmb = {something here} > cfg.trials = [indices of trials belonging to condition 1]; > coh1 = ft_connectivityanalysis(cfg, freq); % compute coherence > across the trials for condition 1 > cfg.trials = [indices of trials belonging to condition 2]; > coh2 = ft_connectivityanalysis(cfg, freq); % compute coherence > across the trials for condition 2 > end > > > Good luck, > > Jan-Mathijs > > > On Nov 27, 2012, at 12:25 PM, Monika Mellem wrote: > >> Thank you Sheraz and Jan-Mathijs for your help! >> Sheraz, if you do have the code to keep single-trial coherence >> estimates, I would much appreciate it if you could pass it along >> (monikamellem at gmail.com ). >> And Jan-Mathijs, okay, the necessary statistics make sense, and I >> will z-transform the data too. But as far as you know, is there no >> implementation already in Fieldtrip to keep the single-trial >> coherence estimates? I assumed setting cfg.keeptrials = 'yes' would >> do this, but is there something else I'm missing as this doesn't seem >> to work? I would prefer to try what Fieldtrip has implemented first >> before integrating Sheraz's code into my version of Fieldtrip. >> >> Thank you very much! >> Monika >> >> >> On Tue, Nov 27, 2012 at 3:14 AM, jan-mathijs schoffelen >> > >> wrote: >> >> Hi Monika, >> >> If you want to test across subjects in a paired fashion, you can >> use depsamplesT. Your dependent variable then should contain for >> each subject and condition the coherence (which of course should >> be estimated across all trials belonging to that condition). Even >> better would be to perform a so-called Z-transformation to the >> data. For some inspiration you could have a look at the following >> paper: http://www.jneurosci.org/content/31/18/6750.long >> >> Best, >> >> Jan-Mathijs >> >> On Nov 27, 2012, at 12:22 AM, Monika Mellem wrote: >> >>> Dear Fieldtrippers, >>> >>> I am trying to calculate coherence estimates on individual >>> trials of our EEG data and then want to perform a >>> within-subjects statistical test, but so far I have not been >>> able to figure out how to do this. I am able to calculate >>> coherence for our 22 subjects and then perform statistics on the >>> grand average, so I understand the basic usage of these >>> functions (ft_freqanalysis, ft_connectivityanalysis, >>> ft_freqgrandaverage, ft_freqstatistics). But now we want to do >>> statistical testing on individual subjects. Is it possible to >>> keep coherence for individual trials in Fieldtrip as they seem >>> necessary for this statistical analysis? >>> >>> I am setting cfg.keeptrials = 'yes' as an input to >>> ft_freqanalysis, and get the cross-spectra of individual trials >>> (I also tried computing the fourier spectra but it made no >>> difference in the following step). However, when computing the >>> coherence in ft_connectivityanalysis, Fieldtrip averages over >>> the trials. Is there a way to output coherence for individual >>> trials instead? Please see the full cfg structure settings below. >>> >>> Also, I did look into the option of cfg.statistic = >>> 'indepsamplesZcoh' as an input to ft_freqstatistics since >>> previous posts suggested this was for single subject coherence >>> statistics, but our data is paired as the same stimulus appears >>> in the 2 conditions we are comparing. Is there a paired test >>> for single subject coherence testing, or should we use >>> cfg.statistic = 'depsamplesT'? >>> >>> Many thanks for any suggestions you may have! >>> Monika >>> ________________ >>> Monika Mellem >>> PhD Candidate >>> Interdisciplinary Program in Neuroscience >>> Georgetown University >>> Washington, DC >>> msm79 at georgetown.edu >>> 202-687-2687 >>> >>> *********************************************************************** >>> cfg settings for ft_freqanalysis and ft_connectivityanalysis >>> *********************************************************************** >>> cfg = []; >>> cfg.prestim = -0.5; >>> cfg.poststim = 1.5; >>> cfg.foilim = [2 30]; >>> cfg.freqrange = 'low'; >>> % cfg.output = 'fourier'; >>> cfg.output = 'powandcsd'; >>> cfg.method = 'mtmconvol'; >>> cfg.keeptrials = 'yes'; >>> cfg.channel = {'all'}; >>> cfg.channelcmb = {refchan 'all'}; >>> >>> cfgcoh=[]; >>> cfgcoh.channelcmb = cfg.channelcmb; >>> cfgcoh.method = 'coh'; >>> >>> v = genvarname(['CRSP_' condition '_low']); >>> eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper >>> around ft_freqanalysis >>> >>> w = genvarname(['COH_' condition '_low']); >>> eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Andrei Medvedev, PhD Assistant Professor, Center for Functional and Molecular Imaging Georgetown University Building D, Room 154 4000 Reservoir Rd, NW Washington DC, 20057 Tel.: 202-687-5126 -------------- next part -------------- An HTML attachment was scrubbed... URL: From fanny.lachat at gmail.com Wed Nov 28 16:27:41 2012 From: fanny.lachat at gmail.com (Fanny) Date: Wed, 28 Nov 2012 16:27:41 +0100 Subject: [FieldTrip] averaging FT_FREQANALYSIS. Message-ID: Dear Fieldtrip Users, I have analysed my EEG data using FT_FREQANALYSIS. I am now interested in averaging this time frequency data for each subject and each electrode on particular frequency (for example between 8 & 13 Hz) and on particular time (between for example 1sec & 1.2 sec). My goal is to have for each suject -for the powspctrm only the values that correspond to the results of this average. -for the time and for the freq only 1 number I will alos want to plot the results after. (using ft_topoplotTFR). I have failed to find how to do that. I have tryed many different methods. I even tried calling cfg.method = 'stats'; cfg.statistic = 'mean'; .... Could someone help me ? thank you in advance ------ Fanny -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Nov 28 17:25:04 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 28 Nov 2012 17:25:04 +0100 Subject: [FieldTrip] averaging FT_FREQANALYSIS. In-Reply-To: References: Message-ID: Dear Fanny, You should be able to do all that within ft_freqanalysis directly. I advice you to read the relevant documentation in the tutorials, and walkthrough, on the FT site. To answer your question more directly, however, its helpfull to know the cfg you called ft_freqanalysis with and the datastructure you end up with. I'm guessing you used method = 'mtmconvol'? If interested in a single timewindow you could use method = 'fft', for instance. Specifing a specific frequency band is possible by adding tapers to your frequency of interest (as explained in the documentation). Alternatively, you can use ft_selectdata using 'avgoverfreq' and 'avgovertime' parameters after you did freqanalysis. That might be a quick (but dirty) solution as well. Hope that helps for now, Stephen On 28 November 2012 16:27, Fanny wrote: > Dear Fieldtrip Users, > > I have analysed my EEG data using FT_FREQANALYSIS. > > > I am now interested in averaging this time frequency data for each > subject and each electrode on particular frequency (for example between 8 > & 13 Hz) and on particular time (between for example 1sec & 1.2 sec). > > My goal is to have for each suject > -for the powspctrm only the values that correspond to the results of this > average. > -for the time and for the freq only 1 number > > I will alos want to plot the results after. (using ft_topoplotTFR). > > I have failed to find how to do that. I have tryed many different > methods. I even tried calling cfg.method = 'stats'; > cfg.statistic = 'mean'; > .... > > Could someone help me ? > > thank you in advance > > > ------ > Fanny > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Nov 29 08:56:55 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 29 Nov 2012 08:56:55 +0100 Subject: [FieldTrip] Fwd: planar gradients In-Reply-To: References: <4346_1353591466_50AE2AAA_4346_214_1_a9f3579c-9269-4bfa-81b0-641f3c3c2a1e@thalamus_p> Message-ID: Dear Fred and Max, To follow up on this: we have identified and fixed the problem, as of last night's release. You can see the issue here: http://bugzilla.fcdonders.nl/show_bug.cgi?id=1858 This is a related, but different, bug than the 1288 I posted earlier. To summarize: all output of ft_megplanar should now be recognized correctly as planar gradient data in subsequent steps. If you have data that was generated by ft_megplanar prior to this fix, you can easily patch it by doing: data.grad.type = 'ctf275_planar'; (or xxxx_planar for other axial gradiometer acquisition systems). Feel free to reopen bug 1858 if the issue has not been resolved. Best, Eelke On 23 November 2012 09:48, Eelke Spaak wrote: > Dear Fred and Max, > > This is a known bug in ft_senstype, and people are working on fixing > it. See bugzilla: http://bugzilla.fcdonders.nl/show_bug.cgi?id=1288 . > If you have anything to add to the bug reports over there, that could > be helpful. > > For now, Max's workaround seems to do the trick. > > Best, > Eelke > > On 22 November 2012 19:36, Stenner, Max-Philipp > wrote: > > Dear Fred, > > > > I encountered a similar problem with my CTF275 data and one broken > sensor before ft_freqanalysis of the planar (uncombined) data. "Confirming" > the channel type with > > > > data.grad.chantype = ft_senstype(data); > > > > solved the problem (although I have to admit that I never investigated > where in the ft script the problem arose). > > > > Cheers, > > Max > > > > ________________________________________ > > Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" > im Auftrag von "Frederic Roux [f.roux at bcbl.eu] > > Gesendet: Donnerstag, 22. November 2012 14:19 > > Bis: FieldTrip discussion list > > Betreff: [FieldTrip] planar gradients > > > > Dear all, > > > > I would like to follow up this post with another question > > related to the planar gradients. > > > > I am working on data aquired with a CTF 275 system but at > > the time of the acquisition there was a number of sensors > > that were broken. > > > > So I end up with n = 258 channels. > > > > After running the ft_megplanar function I get n = 516 channels. > > > > However, if I try to combine the gradients with > > ft_combineplanar > > > > I get an error saying that I am not providing ctf275_planar but > > ctf275 data. > > > > Is the fact that I do not have n = 275 sensors but 258 confusing > > the ft_combineplanar function, or is this related to something else? > > > > > > Best, > > > > Fred > > > > ----- Original Message ----- > > From: "Eelke Spaak" > > To: "FieldTrip discussion list" > > Sent: Wednesday, November 21, 2012 12:47:25 PM > > Subject: Re: [FieldTrip] ft_freqstatistics tutorial question > > > > Dear Nenad, > > > > Strictly speaking, planar gradient transformation is not necessary, so > > you can just skip those steps if you really want to. However, if you > > have axial gradiometer data (as I seem to recall from your earlier > > posts) and want to do TF-analysis and -statistics on sensor level, I > > would strongly recommend applying a planar gradient transformation. > > > > Axial gradiometer data will produce maximal deflections (of opposite > > polarity) on both sides of a current dipole, while planar gradiometer > > data produces a positive maximum exactly above the source. If you > > apply TF-analysis to axial gradiometer data, you will get two > > spatially separated 'blobs' where there was only a single oscillating > > dipole in the brain. If you look at power (as is typically done), you > > will lose the polarity information, and hence interpreting the power > > topography in terms of brain is nearly impossible with axial gradient > > data. > > > > Best, > > Eelke > > > > On 21 November 2012 11:30, Nenad Polomac wrote: > >> Dear all, > >> > >> I have one doubt. I want to calculate ft_freqstatistics on my MEG date > >> obtained form ft_freqanalysis. However, I see now in ft_freqstatistics > >> tutorial that you suggest that operation should be done on planar > gradient > >> data. So, the first ft_megplanar and then ft_freqanalysis, > ft_combineplanar > >> and ft_freqstatistics. My question is, does this step of calculating > planar > >> gradients for time frequency analysis is necessary or not? Could I apply > >> statistic on the data from ft_freqanalysis without any involvement of > planar > >> gradients calculation. > >> Thank you in advance! > >> > >> All the best! > >> > >> Nenad > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elilife at gmail.com Thu Nov 29 14:36:55 2012 From: elilife at gmail.com (Eliana Garcia) Date: Thu, 29 Nov 2012 14:36:55 +0100 Subject: [FieldTrip] Source statistics event related fields Message-ID: Hello Dear Fieldtrip Developers and users, I would like to know if somebody has done before a *source statistic analysis on event related potentials* from the output of* LCMV beamformer*. I have some issues with the compatibility of the cfg.parameter =''avg.mom', since it is a cell structure and the functions for grand average and source statistics works normally for double matrixes. I wonder if there is a way to deal with this (not making arranges on the functions or transforming my data to the format m=sourceFIC.avg.pow(voxels, time) double. I would also like to know how to deal with the parameters for source statistics on event related fields (such as: cfg.latency). Thanks a lot! -- Eliana García Cossio Applied Neurotechnology Lab. Graduate School of Neural and Behavioural Science - Max Planck Research School Institute of Medical Psychology and Behavioural Neurobiology Universität Tübingen (+0049) 01 577-8587604 Otfried-Müller-Str. 47, 72076 Tübingen- Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From elilife at gmail.com Thu Nov 29 14:36:55 2012 From: elilife at gmail.com (Eliana Garcia) Date: Thu, 29 Nov 2012 14:36:55 +0100 Subject: [FieldTrip] Source statistics event related fields Message-ID: Hello Dear Fieldtrip Developers and users, I would like to know if somebody has done before a *source statistic analysis on event related potentials* from the output of* LCMV beamformer*. I have some issues with the compatibility of the cfg.parameter =''avg.mom', since it is a cell structure and the functions for grand average and source statistics works normally for double matrixes. I wonder if there is a way to deal with this (not making arranges on the functions or transforming my data to the format m=sourceFIC.avg.pow(voxels, time) double. I would also like to know how to deal with the parameters for source statistics on event related fields (such as: cfg.latency). Thanks a lot! -- Eliana García Cossio Applied Neurotechnology Lab. Graduate School of Neural and Behavioural Science - Max Planck Research School Institute of Medical Psychology and Behavioural Neurobiology Universität Tübingen (+0049) 01 577-8587604 Otfried-Müller-Str. 47, 72076 Tübingen- Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From singhharsimrat at gmail.com Thu Nov 29 14:38:01 2012 From: singhharsimrat at gmail.com (Harsimrat Singh) Date: Thu, 29 Nov 2012 13:38:01 +0000 Subject: [FieldTrip] Best procedure for frontal alpha asymmetry Message-ID: Dear Fieldtrippers I am trying to calculate the difference in the alpha power on the frontal electrodes for a subject wise analysis. Can someone please suggest what will be the correct approach. Run freq analysis with alpha freq (14-18 ) with a resolution of 2Hz on all channels and then do tf.powspctrm (:,left,:,:) –tf.powsprctrm(:,right,:,:) OR run freq analysis on left chans and right chans separately and then do subtraction. Best regards Harsimrat From jm.horschig at donders.ru.nl Thu Nov 29 15:00:58 2012 From: jm.horschig at donders.ru.nl (=?windows-1252?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 29 Nov 2012 15:00:58 +0100 Subject: [FieldTrip] Best procedure for frontal alpha asymmetry In-Reply-To: References: Message-ID: <50B76A9A.7020201@donders.ru.nl> Dear Harsimrat, I got some comments on your mail: 1. The alpha band is conventionally more around 10Hz, 14Hz is kind of the upper bound. 14-18Hz would be lower beta. 2. 2Hz resolution is fine. 3. All colleagues I know are running their frequency analysis on all channels, because there is no reason to separate channels in the analysis pipeline, neither methodologically nor for any other reason. 4. You might want to try to take the relative difference: (tf.powspctrm (:,left,:,:) – tf.powsprctrm(:,right,:,:)) ./ (tf.powspctrm (:,left,:,:) + tf.powsprctrm(:,right,:,:)) or the like (e.g. log ratio), as this gives a normalized difference which makes comparisons across subjects somewhat easier. Also, it is more conventional, see e.g. Thut et al., 2006 for occipital alpha lateralization. Good luck with your analysis! Best, Jörn On 11/29/2012 2:38 PM, Harsimrat Singh wrote: > Dear Fieldtrippers > > I am trying to calculate the difference in the alpha power on the > frontal electrodes for a subject wise analysis. > > Can someone please suggest what will be the correct approach. > > Run freq analysis with alpha freq (14-18 ) with a resolution of 2Hz on > all channels and then do > > tf.powspctrm (:,left,:,:) –tf.powsprctrm(:,right,:,:) > > OR > > run freq analysis on left chans and right chans separately and then do > subtraction. > > Best regards > Harsimrat > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From eelke.spaak at donders.ru.nl Thu Nov 29 15:15:16 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 29 Nov 2012 15:15:16 +0100 Subject: [FieldTrip] Best procedure for frontal alpha asymmetry In-Reply-To: References: Message-ID: Dear Harsimrat, The two approaches should be equivalent, since power data is always computed per channel. Another thing which is probably good to note is that 14-18Hz is not typically called 'alpha activity'. Depending on your research question, it might or might not be appropriate to label it alpha anyway, but it is worth thinking about that. (Typically, alpha would be 8-12Hz, or 7-14Hz or so.) Best, Eelke On 29 November 2012 14:38, Harsimrat Singh wrote: > Dear Fieldtrippers > > I am trying to calculate the difference in the alpha power on the > frontal electrodes for a subject wise analysis. > > Can someone please suggest what will be the correct approach. > > Run freq analysis with alpha freq (14-18 ) with a resolution of 2Hz on > all channels and then do > > tf.powspctrm (:,left,:,:) –tf.powsprctrm(:,right,:,:) > > OR > > run freq analysis on left chans and right chans separately and then do > subtraction. > > Best regards > Harsimrat > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From singhharsimrat at gmail.com Thu Nov 29 19:15:14 2012 From: singhharsimrat at gmail.com (Harsimrat Singh) Date: Thu, 29 Nov 2012 18:15:14 +0000 Subject: [FieldTrip] Best procedure for frontal alpha asymmetry In-Reply-To: References: Message-ID: Thanks Elke and Jorn Apologies for mismatch 'name' and 'freq range'. Actually I went out looking for higher freqs than alpha but didn't change the name. I agree with Elke that the outcome should be same. I think I will go with the convention - freq analysis on all channels and then separating out the ones I need. Best regards Harsimrat On 29 November 2012 14:15, Eelke Spaak wrote: > Dear Harsimrat, > > The two approaches should be equivalent, since power data is always computed > per channel. > > Another thing which is probably good to note is that 14-18Hz is not > typically called 'alpha activity'. Depending on your research question, it > might or might not be appropriate to label it alpha anyway, but it is worth > thinking about that. (Typically, alpha would be 8-12Hz, or 7-14Hz or so.) > > Best, > Eelke > > > On 29 November 2012 14:38, Harsimrat Singh wrote: >> >> Dear Fieldtrippers >> >> I am trying to calculate the difference in the alpha power on the >> frontal electrodes for a subject wise analysis. >> >> Can someone please suggest what will be the correct approach. >> >> Run freq analysis with alpha freq (14-18 ) with a resolution of 2Hz on >> all channels and then do >> >> tf.powspctrm (:,left,:,:) –tf.powsprctrm(:,right,:,:) >> >> OR >> >> run freq analysis on left chans and right chans separately and then do >> subtraction. >> >> Best regards >> Harsimrat >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From khaled.alkamha at gmail.com Fri Nov 30 19:16:26 2012 From: khaled.alkamha at gmail.com (Khaled Al-Kamha) Date: Fri, 30 Nov 2012 21:16:26 +0300 Subject: [FieldTrip] How far FieldTrip can help me ? Message-ID: Hey,, I'm an under-graduated student and i'm working on http://www.physionet.org/pn4/eegmmidb/ dataset for my graduation project, i'm totally interested in Machine Learning Application for Brain Computer Interface Research. I'm trying to get started with Filtering the data for Feature Extraction Part and by a little of search i found the FieldTrip Toolbox. I just want to know if i'm on the right direction by choosing FieldTrip Toolbox for MATLAB. Regards Khaled Al Kamha -------------- next part -------------- An HTML attachment was scrubbed... URL: From batrod at gmail.com Fri Nov 30 21:37:46 2012 From: batrod at gmail.com (Rodolphe Nenert) Date: Fri, 30 Nov 2012 14:37:46 -0600 Subject: [FieldTrip] How far FieldTrip can help me ? In-Reply-To: References: Message-ID: Fieldtrip is an excellent choice for processing and analyzing eeg data ;) That being said, im not sure about what you call "feature extraction", but it will definitely help you to start with your data. Rodolphe Nenert, PhD University of Alabama at Birmingham. On Fri, Nov 30, 2012 at 12:16 PM, Khaled Al-Kamha wrote: > Hey,, > > I'm an under-graduated student and i'm working on > http://www.physionet.org/pn4/eegmmidb/ dataset for my graduation project, > i'm totally interested in Machine Learning Application for Brain Computer > Interface Research. > I'm trying to get started with Filtering the data for Feature Extraction > Part and by a little of search i found the FieldTrip Toolbox. > I just want to know if i'm on the right direction by choosing FieldTrip > Toolbox for MATLAB. > > Regards > Khaled Al Kamha > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From khaled.alkamha at gmail.com Fri Nov 30 23:01:51 2012 From: khaled.alkamha at gmail.com (Khaled Al-Kamha) Date: Sat, 1 Dec 2012 01:01:51 +0300 Subject: [FieldTrip] How far FieldTrip can help me ? In-Reply-To: References: Message-ID: Thanks a lot for your response,, you are right about your uncertainty with what i called "Feature Extraction". My intention in "Feature Extraction" was removing noise and other unnecessary information from the input signals. I think i'll give it a try, thanks again :) Regards, Khaled Al Kamha On Fri, Nov 30, 2012 at 11:37 PM, Rodolphe Nenert wrote: > Fieldtrip is an excellent choice for processing and analyzing eeg data ;) > That being said, im not sure about what you call "feature extraction", but > it will definitely help you to start with your data. > > Rodolphe Nenert, PhD > University of Alabama at Birmingham. > > > On Fri, Nov 30, 2012 at 12:16 PM, Khaled Al-Kamha < > khaled.alkamha at gmail.com> wrote: > >> Hey,, >> >> I'm an under-graduated student and i'm working on >> http://www.physionet.org/pn4/eegmmidb/ dataset for my graduation >> project, i'm totally interested in Machine Learning Application for Brain >> Computer Interface Research. >> I'm trying to get started with Filtering the data for Feature Extraction >> Part and by a little of search i found the FieldTrip Toolbox. >> I just want to know if i'm on the right direction by choosing FieldTrip >> Toolbox for MATLAB. >> >> Regards >> Khaled Al Kamha >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoniilevy at gmail.com Thu Nov 1 10:01:34 2012 From: yoniilevy at gmail.com (Yoni Levy) Date: Thu, 1 Nov 2012 11:01:34 +0200 Subject: [FieldTrip] MNI or CTF coordinates during the construction of individual MNI-based grids Message-ID: Hi all, If I understood correctly from the tutorial, the template_grid should be expressed in MNI coordinates, therefore in 'mm' units. However, following the current tutorial, the resulting template_grid is expressed in 'cm' (because of the CTF system). If I understand correctly, we should add to the tutorial that the template_grid units should be transformed to 'mm' after creating it. The individual warped grid however stays expressed in 'cm' (in the case of CTF). Does that make sense or I might be missing anything here? Thanks, Yoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcoskun at mail.uh.edu Thu Nov 1 17:30:02 2012 From: mcoskun at mail.uh.edu (Mehmet-Akif Coskun) Date: Thu, 01 Nov 2012 11:30:02 -0500 Subject: [FieldTrip] Minimal Stimulus Condition to evoke a detectable MEG response Message-ID: <7280fbc125328.50925d3a@mail.uh.edu> Dear Fieldtrippers, Is there any study that measured the minimal stimulus condition required to evoke a detectable MEG response. We acquire our data using 4D 248 sensor device and our stimulus is 1.8 kg/cm^2. We know this is above average but we also would like to know what is the threshold? Also in many papers that i have seen, the threshold is measured as deflection of skin in mm. Is there a method that i can convert our units to find the deflection of skin? I will greatly appreciate any helps, Thanks in advance, Mehmet -------------- next part -------------- An HTML attachment was scrubbed... URL: From bherrmann at cbs.mpg.de Fri Nov 2 10:10:16 2012 From: bherrmann at cbs.mpg.de (=?utf-8?Q?Bj=C3=B6rn_Herrmann?=) Date: Fri, 2 Nov 2012 10:10:16 +0100 (CET) Subject: [FieldTrip] wavelet fourier output produces sign inverted imaginary part In-Reply-To: <855059066.4809.1351778311397.JavaMail.root@zimbra> Message-ID: <715262839.1275.1351847416532.JavaMail.root@zimbra> Dear fieldtrip users, I observed something strange using ft_freqanalysis with the "wavelet" method that might be important for many/some of you. It seems that the imaginary part of the fourier output (from "wavelet") is sign inverted for the TFR calculated for more than one frequency at once (i.e. cfg.foi = [4 5]) as compared to the TFR calculated independently for the frequencies (i.e., first cfg.foi = 4, and then cfg.foi = 5). This impacts the phase angle which is backwards in case of calculating the TFR for more frequencies in one go. amplitude/power is unaffected and it seems also ITPC calculations. momentary phase and therefore some phase-amplitude coupling measures are, however, affected by this. I attached a bit of code showing the difference: Cf = 5; Sf = 500; dur = 20; freqs = 1:10; cfg = []; cfg.method = 'wavelet'; cfg.output = 'fourier'; cfg.width = 3; cfg.toi = 0:0.01:dur; t = 0:1/Sf:(dur-1/Sf); data = []; data.avg = sin(2*pi*Cf*t+1.1); data.fsample = Sf; data.time = t; data.label = {'channel'}; data.dimord = 'chan_time'; floop = []; for ii = 1 : length(freqs) cfg.foi = freqs(ii); F = ft_freqanalysis(cfg, data); floop(:,ii) = squeeze(F.fourierspctrm); end cfg.foi = freqs; F = ft_freqanalysis(cfg, data); fonego = squeeze(F.fourierspctrm)'; [real(floop(1000,1)), real(fonego(1000,1)); ... imag(floop(1000,1)), imag(fonego(1000,1)); ... angle(floop(1000,1)), angle(fonego(1000,1))] ans = -0.0128 -0.0128 0.0067 -0.0067 2.6605 -2.6605 I thought this might be important for some of you, independently of a bug report i'll try to send later (i have to figure out how this works first). My colleagues and I were unable to fix the problem in the fieldtrip script directly, but a simple solution is to do the following: real(fourier)+(imag(fourier)*-1)*1i Based on some tests i did, I believe the fonego is the wrong one (i.e. using cfg.foi = [4 5]). All the best, Björn From r.vandermeij at donders.ru.nl Fri Nov 2 13:21:06 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Fri, 2 Nov 2012 13:21:06 +0100 Subject: [FieldTrip] wavelet fourier output produces sign inverted imaginary part In-Reply-To: <715262839.1275.1351847416532.JavaMail.root@zimbra> References: <855059066.4809.1351778311397.JavaMail.root@zimbra> <715262839.1275.1351847416532.JavaMail.root@zimbra> Message-ID: Dear Björn, Please note that in your example, you take the complex conjugate transpose of 'fonego'. This changes the sign of the imaginary part of your Fourier coefficients. Please verify whether this is causing the phase-flip you mention in your first paragraph. All the best, Roemer On Fri, Nov 2, 2012 at 10:10 AM, Björn Herrmann wrote: > Dear fieldtrip users, > > I observed something strange using ft_freqanalysis with the "wavelet" > method that might be important for many/some of you. > It seems that the imaginary part of the fourier output (from "wavelet") is > sign inverted for the TFR calculated for more than one frequency at once > (i.e. cfg.foi = [4 5]) as compared to the TFR calculated independently for > the frequencies (i.e., first cfg.foi = 4, and then cfg.foi = 5). This > impacts the phase angle which is backwards in case of calculating the TFR > for more frequencies in one go. amplitude/power is unaffected and it seems > also ITPC calculations. momentary phase and therefore some phase-amplitude > coupling measures are, however, affected by this. I attached a bit of code > showing the difference: > > > Cf = 5; > Sf = 500; > dur = 20; > > freqs = 1:10; > > cfg = []; > cfg.method = 'wavelet'; > cfg.output = 'fourier'; > cfg.width = 3; > cfg.toi = 0:0.01:dur; > > t = 0:1/Sf:(dur-1/Sf); > data = []; > data.avg = sin(2*pi*Cf*t+1.1); > data.fsample = Sf; > data.time = t; > data.label = {'channel'}; > data.dimord = 'chan_time'; > > floop = []; > for ii = 1 : length(freqs) > cfg.foi = freqs(ii); > F = ft_freqanalysis(cfg, data); > floop(:,ii) = squeeze(F.fourierspctrm); > end > cfg.foi = freqs; > F = ft_freqanalysis(cfg, data); > fonego = squeeze(F.fourierspctrm)'; > > [real(floop(1000,1)), real(fonego(1000,1)); ... > imag(floop(1000,1)), imag(fonego(1000,1)); ... > angle(floop(1000,1)), angle(fonego(1000,1))] > > ans = > -0.0128 -0.0128 > 0.0067 -0.0067 > 2.6605 -2.6605 > > > I thought this might be important for some of you, independently of a bug > report i'll try to send later (i have to figure out how this works first). > My colleagues and I were unable to fix the problem in the fieldtrip script > directly, but a simple solution is to do the following: > real(fourier)+(imag(fourier)*-1)*1i > Based on some tests i did, I believe the fonego is the wrong one (i.e. > using cfg.foi = [4 5]). > > All the best, > > Björn > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Roemer van der Meij M.Sc. PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From bherrmann at cbs.mpg.de Fri Nov 2 13:56:20 2012 From: bherrmann at cbs.mpg.de (=?utf-8?Q?Bj=C3=B6rn_Herrmann?=) Date: Fri, 2 Nov 2012 13:56:20 +0100 (CET) Subject: [FieldTrip] wavelet fourier output produces sign inverted imaginary part In-Reply-To: Message-ID: <979548527.3464.1351860980202.JavaMail.root@zimbra> Dear fieldtrip users, I have just received an anser to my email regarding the "sign inverted imaginary part". It seems that I was introducing this error myself in my script by transposing the complex output. I did not know this before that this changes the sign of the imaginary part. a = 3+1i; b = a' b = 3 - 1i hmm. I am very sorry for the mistake and thankful to Matt bringing my attention to this. Thus, it seems fieldtrip does work alright regarding the output. I was working wrong. Björn ------ Björn Herrmann Auditory Cognition Group Max Planck Institute for Human Cognitive and Brain Sciences Stephanstrasse 1a, 04103 Leipzig, Germany phone: ++49 (0)341 9940 2606 email: bherrmann at cbs.mpg.de ----- Ursprüngliche Mail ----- Von: fieldtrip-request at science.ru.nl An: fieldtrip at science.ru.nl Gesendet: Freitag, 2. November 2012 12:00:16 Betreff: fieldtrip Digest, Vol 24, Issue 2 Send fieldtrip mailing list submissions to fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to fieldtrip-request at science.ru.nl You can reach the person managing the list at fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: 1. Minimal Stimulus Condition to evoke a detectable MEG response (Mehmet-Akif Coskun) 2. wavelet fourier output produces sign inverted imaginary part (Bj?rn Herrmann) ---------------------------------------------------------------------- Message: 1 Date: Thu, 01 Nov 2012 11:30:02 -0500 From: Mehmet-Akif Coskun To: FieldTrip discussion list Subject: [FieldTrip] Minimal Stimulus Condition to evoke a detectable MEG response Message-ID: <7280fbc125328.50925d3a at mail.uh.edu> Content-Type: text/plain; charset="us-ascii" Dear Fieldtrippers, Is there any study that measured the minimal stimulus condition required to evoke a detectable MEG response. We acquire our data using 4D 248 sensor device and our stimulus is 1.8 kg/cm^2. We know this is above average but we also would like to know what is the threshold? Also in many papers that i have seen, the threshold is measured as deflection of skin in mm. Is there a method that i can convert our units to find the deflection of skin? I will greatly appreciate any helps, Thanks in advance, Mehmet -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Fri, 2 Nov 2012 10:10:16 +0100 (CET) From: Bj?rn Herrmann To: fieldtrip at science.ru.nl Subject: [FieldTrip] wavelet fourier output produces sign inverted imaginary part Message-ID: <715262839.1275.1351847416532.JavaMail.root at zimbra> Content-Type: text/plain; charset=utf-8 Dear fieldtrip users, I observed something strange using ft_freqanalysis with the "wavelet" method that might be important for many/some of you. It seems that the imaginary part of the fourier output (from "wavelet") is sign inverted for the TFR calculated for more than one frequency at once (i.e. cfg.foi = [4 5]) as compared to the TFR calculated independently for the frequencies (i.e., first cfg.foi = 4, and then cfg.foi = 5). This impacts the phase angle which is backwards in case of calculating the TFR for more frequencies in one go. amplitude/power is unaffected and it seems also ITPC calculations. momentary phase and therefore some phase-amplitude coupling measures are, however, affected by this. I attached a bit of code showing the difference: Cf = 5; Sf = 500; dur = 20; freqs = 1:10; cfg = []; cfg.method = 'wavelet'; cfg.output = 'fourier'; cfg.width = 3; cfg.toi = 0:0.01:dur; t = 0:1/Sf:(dur-1/Sf); data = []; data.avg = sin(2*pi*Cf*t+1.1); data.fsample = Sf; data.time = t; data.label = {'channel'}; data.dimord = 'chan_time'; floop = []; for ii = 1 : length(freqs) cfg.foi = freqs(ii); F = ft_freqanalysis(cfg, data); floop(:,ii) = squeeze(F.fourierspctrm); end cfg.foi = freqs; F = ft_freqanalysis(cfg, data); fonego = squeeze(F.fourierspctrm)'; [real(floop(1000,1)), real(fonego(1000,1)); ... imag(floop(1000,1)), imag(fonego(1000,1)); ... angle(floop(1000,1)), angle(fonego(1000,1))] ans = -0.0128 -0.0128 0.0067 -0.0067 2.6605 -2.6605 I thought this might be important for some of you, independently of a bug report i'll try to send later (i have to figure out how this works first). My colleagues and I were unable to fix the problem in the fieldtrip script directly, but a simple solution is to do the following: real(fourier)+(imag(fourier)*-1)*1i Based on some tests i did, I believe the fonego is the wrong one (i.e. using cfg.foi = [4 5]). All the best, Bj?rn ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 24, Issue 2 **************************************** From polomacnenad at gmail.com Mon Nov 5 17:01:58 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Mon, 5 Nov 2012 17:01:58 +0100 Subject: [FieldTrip] opposite to the ft_appenddata Message-ID: Hi everybody, I would like to know does the fildtrip has some function opposite to the ft_appenddata. I have appended all trials from the two of my conditions in order to have more information for the ICA calculation. Now after ft_rejectcomponent I would like to bring back trials in a previous state. Do you have any advice? Thank you very much! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon Nov 5 17:18:27 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 5 Nov 2012 17:18:27 +0100 Subject: [FieldTrip] opposite to the ft_appenddata In-Reply-To: References: Message-ID: Hi Nenad, If I understand correctly what you want, ft_selectdata is what you are looking for. You can use it to select specific trials or channels (or time windows) from a data set. In the 'old' syntax, if you want trials 1, 3, and 5: data = ft_selectdata(data, 'rpt', [1 3 5]); Of course, the trial indices you will have to provide yourself, for instance by looking at which trials originally came from which dataset (i.e., prior to calling ft_appenddata). Best, Eelke On 5 November 2012 17:01, Nenad Polomac wrote: > Hi everybody, > > I would like to know does the fildtrip has some function opposite to the > ft_appenddata. I have appended all trials from the two of my conditions in > order to have more information for the ICA calculation. Now after > ft_rejectcomponent I would like to bring back trials in a previous state. > Do you have any advice? > > Thank you very much! > > Nenad > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stephen.whitmarsh at gmail.com Mon Nov 5 17:11:26 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 5 Nov 2012 17:11:26 +0100 Subject: [FieldTrip] opposite to the ft_appenddata In-Reply-To: References: Message-ID: Dear Nenad, You could apply ft_rejectcomponent on the original datasets using the extra second input argument ('data') - the function help should be clear enough. Cheers, Stephen On 5 November 2012 17:01, Nenad Polomac wrote: > Hi everybody, > > I would like to know does the fildtrip has some function opposite to the > ft_appenddata. I have appended all trials from the two of my conditions in > order to have more information for the ICA calculation. Now > after ft_rejectcomponent I would like to bring back trials in a previous > state. > Do you have any advice? > > Thank you very much! > > Nenad > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Hirschmann at med.uni-duesseldorf.de Tue Nov 6 14:34:53 2012 From: Jan.Hirschmann at med.uni-duesseldorf.de (Jan.Hirschmann at med.uni-duesseldorf.de) Date: Tue, 6 Nov 2012 14:34:53 +0100 Subject: [FieldTrip] subspace projection Message-ID: <72E993C35FB11743B79FF9286E5B6D8B048E4A8B@Mail2-UKD.VMED.UKD> Dear fieldtrip community, In LCMV beamforming there is an option cfg.lcmv.subspace=X. Does anyone have experience or recommendations regarding this option? Is there a publication in which the rationale is described? From looking at the code it seems that data and lead field are projected onto a subspace spanned by the first X singular vectors of the covariance matrix (correct me if I'm wrong). Seems helpful in my case but I am hesitant to use it without knowing anything about it. Thanks for any comment! Jan -- Jan Hirschmann MSc Neuroscience Institute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Düsseldorf Universitätsstr. 1 40225 Düsseldorf Germany Tel: +49 (0)211 81 18415 Fax: +49 (0)211 81 19033 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Nov 6 14:49:36 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 6 Nov 2012 14:49:36 +0100 Subject: [FieldTrip] subspace projection In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B048E4A8B@Mail2-UKD.VMED.UKD> References: <72E993C35FB11743B79FF9286E5B6D8B048E4A8B@Mail2-UKD.VMED.UKD> Message-ID: <0E290E21-72BD-4E44-A6CE-ADADD1886432@donders.ru.nl> Hi Jan, You can look up the rationale in the work of Kensuke Sekihara. Look for 'eigenspace beamformer'. The implementation in FieldTrip is along these lines (but slightly differently implemented). Best wishes, Jan-Mathijs On Nov 6, 2012, at 2:34 PM, wrote: > Dear fieldtrip community, > > In LCMV beamforming there is an option cfg.lcmv.subspace=X. Does anyone have experience or recommendations regarding this option? Is there a publication in which the rationale is described? From looking at the code it seems that data and lead field are projected onto a subspace spanned by the first X singular vectors of the covariance matrix (correct me if I’m wrong). Seems helpful in my case but I am hesitant to use it without knowing anything about it. > > Thanks for any comment! > Jan > > -- > Jan Hirschmann > MSc Neuroscience > Institute of Clinical Neuroscience and Medical Psychology > Heinrich Heine University Düsseldorf > Universitätsstr. 1 > 40225 Düsseldorf > Germany > Tel: +49 (0)211 81 18415 > Fax: +49 (0)211 81 19033 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Tue Nov 6 16:36:48 2012 From: luke.bloy at gmail.com (Luke Bloy) Date: Tue, 6 Nov 2012 10:36:48 -0500 Subject: [FieldTrip] co registration of the mesh points to the atlas In-Reply-To: References: <508F97DC.9080009@donders.ru.nl> Message-ID: <50992e91.0347e00a.5ced.6484@mx.google.com> Hi Qi, I'm not sure if this is what you are looking for but take a look at the --morph option to mne_setup_source_space. It should let you create corresponding source grids in each of your subjects. -Luke -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of qi li Sent: Wednesday, October 31, 2012 5:39 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] co registration of the mesh points to the atlas Hi Jörn, Thanks a lot! This link is very helpful for my question. Actually, I followed the tutorial of source reconstruction of event-related fields using MNE which clearly states 'recon-all -surfreg -subjid Subject01' this already co-registered the original surface to the standard atlas sphere. So for each individual, their cortical surfaces are aligned at this step. The confusion is when down-sampling by using 'mne_setup_source_space --ico -6', what is exactly done(algorithm) to down-sample from 20,000 nodes to only 8196? This might be crucial for a group analysis so I seek a clarification. Thanks! Qi On Tue, Oct 30, 2012 at 5:03 AM, "Jörn M. Horschig" wrote: > Dear Qi, > > I guess this page might help: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_i > ndividual_head_space_that_are_all_aligned_in_mni_space?s[]=warp > > Best, > Jörn > > > On 10/25/2012 6:00 PM, qi li wrote: >> >> Hi, >> >> Is there any function to co-register the individual cortical mesh >> points(8196 in total) generate by fieldtrip to the standard brain. >> Thanks! >> >> Qi >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour Centre for > Cognitive Neuroimaging Radboud University Nijmegen Neuronal > Oscillations Group FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From harding at cbs.mpg.de Tue Nov 6 17:31:54 2012 From: harding at cbs.mpg.de (Eleanor Harding) Date: Tue, 6 Nov 2012 17:31:54 +0100 (CET) Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? In-Reply-To: <1053338968.6953.1352218543584.JavaMail.root@zimbra> Message-ID: <1002956758.7127.1352219514263.JavaMail.root@zimbra> Dear Fieldtrip community, I intend to run ICA on an EEG dataset with 64 channels (+ 2 eye channels), on epochs which are about 4 seconds long, and I am unsure as to how many independent components I should define (20,65,..?). My question is, is there a 'rule of thumb' for defining how many independent components to analyze for EEG? In the archives I have found only references to MEG datasets with many channels, for example reducing over 200 channels to 80 components. Looking in the literature today I also wasn't able to interpret an answer. If anyone has any information, references, or other input I would be much obliged. Thanks, Ellie -- ------------------------------------------------------------------ Eleanor Harding PhD Student Max Planck Institute for Human Cognitive and Brain Sciences Stephanstraße 1A, 04103 Leipzig, Germany Phone: +49 341 9940-2268 Fax: +49 341 9940 2260 http://www.cbs.mpg.de/~harding From polomacnenad at gmail.com Tue Nov 6 18:34:45 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Tue, 6 Nov 2012 18:34:45 +0100 Subject: [FieldTrip] opposite to the ft_appenddata Message-ID: Thank you very much to both of you! I will use Stephen's suggestion. It fits better with my situation! All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron__t at hotmail.com Tue Nov 6 19:27:44 2012 From: aaron__t at hotmail.com (Aaron T) Date: Tue, 6 Nov 2012 10:27:44 -0800 Subject: [FieldTrip] Beginner questions regarding trialfun and nex data Message-ID: I am trying to read event data from .nex files, and having a wee bit of difficulty. When I use the code cfg = [] cfg.dataset = 'Filename.nex' cfg.trialdef.eventtype = '?' ft_definetrial(cfg); The only event data that is returned is the Strobed channel with a number of values. Using event type = 'gui' yields a similar result. Looking at the example provided in the spikefield tutorial, I have run the same commands on the p029_sort_final_01.nex sample data on the website; this yields similar results (only the Strobed event type is returned, with a number of associated values). These values appear to correspond with the events that would be of interest: Looking at the trialfun_stimon.m code I see the following: hdr = ft_read_header(cfg.dataset); event = ft_read_event(cfg.dataset); correctresponse = 10041; begintrial = 10044; endtrial = 10045; stimon = 10030; distractorChange = 12000; targetChange = 12001; attCnds = 20001:20004; % att in/out by target change first/second I have looked at the sample data in offline sorter and neuroexplorer and cannot figure out from where these values for the Strobed event type (the only event returned by fieldtrip), are being ascertained (e.g., so I could write my own version of trialfun)? Any help very much appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From arno at cerco.ups-tlse.fr Tue Nov 6 19:44:03 2012 From: arno at cerco.ups-tlse.fr (Arnaud Delorme) Date: Tue, 6 Nov 2012 10:44:03 -0800 Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? In-Reply-To: <1002956758.7127.1352219514263.JavaMail.root@zimbra> References: <1002956758.7127.1352219514263.JavaMail.root@zimbra> Message-ID: Dear Ellie, you should decompose your full rank matrix. PCA dimension reduction may seriously affects and bias ICA solutions (I have seen a yet-to-be published report on that). Best, Arno On 6 Nov 2012, at 08:31, Eleanor Harding wrote: > Dear Fieldtrip community, > > I intend to run ICA on an EEG dataset with 64 channels (+ 2 eye channels), on epochs which are about 4 seconds long, and I am unsure as to how many independent components I should define (20,65,..?). > > My question is, is there a 'rule of thumb' for defining how many independent components to analyze for EEG? In the archives I have found only references to MEG datasets with many channels, for example reducing over 200 channels to 80 components. Looking in the literature today I also wasn't able to interpret an answer. > > If anyone has any information, references, or other input I would be much obliged. > > Thanks, > Ellie > > > > -- > ------------------------------------------------------------------ > Eleanor Harding > PhD Student > Max Planck Institute for Human Cognitive and Brain Sciences > Stephanstraße 1A, 04103 Leipzig, Germany > Phone: +49 341 9940-2268 > Fax: +49 341 9940 2260 > http://www.cbs.mpg.de/~harding > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Tue Nov 6 20:03:44 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 6 Nov 2012 20:03:44 +0100 Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? In-Reply-To: References: <1002956758.7127.1352219514263.JavaMail.root@zimbra> Message-ID: Dear Ellie, In addition to Arnaud's comment; if your question is how much components you should specify in your cfg.numcomponent parameter, I would suggest to just leave it at the default ('all'). This will give you as many components as their are channels in your data. Typically, specifying anything less than that will just lead to a number of components (the ones explaining least variance) being discarded. Best, Eelke On 6 November 2012 19:44, Arnaud Delorme wrote: > Dear Ellie, > > you should decompose your full rank matrix. PCA dimension reduction may seriously affects and bias ICA solutions (I have seen a yet-to-be published report on that). > > Best, > > Arno > > On 6 Nov 2012, at 08:31, Eleanor Harding wrote: > >> Dear Fieldtrip community, >> >> I intend to run ICA on an EEG dataset with 64 channels (+ 2 eye channels), on epochs which are about 4 seconds long, and I am unsure as to how many independent components I should define (20,65,..?). >> >> My question is, is there a 'rule of thumb' for defining how many independent components to analyze for EEG? In the archives I have found only references to MEG datasets with many channels, for example reducing over 200 channels to 80 components. Looking in the literature today I also wasn't able to interpret an answer. >> >> If anyone has any information, references, or other input I would be much obliged. >> >> Thanks, >> Ellie >> >> >> >> -- >> ------------------------------------------------------------------ >> Eleanor Harding >> PhD Student >> Max Planck Institute for Human Cognitive and Brain Sciences >> Stephanstraße 1A, 04103 Leipzig, Germany >> Phone: +49 341 9940-2268 >> Fax: +49 341 9940 2260 >> http://www.cbs.mpg.de/~harding >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From harding at cbs.mpg.de Wed Nov 7 11:37:21 2012 From: harding at cbs.mpg.de (Eleanor Harding) Date: Wed, 7 Nov 2012 11:37:21 +0100 (CET) Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? In-Reply-To: Message-ID: <1330528100.2559.1352284641098.JavaMail.root@zimbra> Dear Arno and Eelke, Thanks for the information. I also received the following code suggestion from J.Obleser in house cfg.runica.pca =rank(your_number_of_channels) which I am trying out right now. Cheers, Ellie ----- Original Message ----- From: fieldtrip-request at science.ru.nl To: fieldtrip at science.ru.nl Sent: Tuesday, November 6, 2012 6:34:47 PM Subject: fieldtrip Digest, Vol 24, Issue 5 Send fieldtrip mailing list submissions to fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to fieldtrip-request at science.ru.nl You can reach the person managing the list at fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: 1. subspace projection (Jan.Hirschmann at med.uni-duesseldorf.de) 2. Re: subspace projection (jan-mathijs schoffelen) 3. Re: co registration of the mesh points to the atlas (Luke Bloy) 4. 'rule of thumb' for defining how many independent components to analyze for EEG? (Eleanor Harding) 5. Re: opposite to the ft_appenddata (Nenad Polomac) ---------------------------------------------------------------------- Message: 1 Date: Tue, 6 Nov 2012 14:34:53 +0100 From: To: Subject: [FieldTrip] subspace projection Message-ID: <72E993C35FB11743B79FF9286E5B6D8B048E4A8B at Mail2-UKD.VMED.UKD> Content-Type: text/plain; charset="iso-8859-1" Dear fieldtrip community, In LCMV beamforming there is an option cfg.lcmv.subspace=X. Does anyone have experience or recommendations regarding this option? Is there a publication in which the rationale is described? From looking at the code it seems that data and lead field are projected onto a subspace spanned by the first X singular vectors of the covariance matrix (correct me if I'm wrong). Seems helpful in my case but I am hesitant to use it without knowing anything about it. Thanks for any comment! Jan -- Jan Hirschmann MSc Neuroscience Institute of Clinical Neuroscience and Medical Psychology Heinrich Heine University D?sseldorf Universit?tsstr. 1 40225 D?sseldorf Germany Tel: +49 (0)211 81 18415 Fax: +49 (0)211 81 19033 -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Tue, 6 Nov 2012 14:49:36 +0100 From: jan-mathijs schoffelen To: FieldTrip discussion list Subject: Re: [FieldTrip] subspace projection Message-ID: <0E290E21-72BD-4E44-A6CE-ADADD1886432 at donders.ru.nl> Content-Type: text/plain; charset="windows-1252" Hi Jan, You can look up the rationale in the work of Kensuke Sekihara. Look for 'eigenspace beamformer'. The implementation in FieldTrip is along these lines (but slightly differently implemented). Best wishes, Jan-Mathijs On Nov 6, 2012, at 2:34 PM, wrote: > Dear fieldtrip community, > > In LCMV beamforming there is an option cfg.lcmv.subspace=X. Does anyone have experience or recommendations regarding this option? Is there a publication in which the rationale is described? From looking at the code it seems that data and lead field are projected onto a subspace spanned by the first X singular vectors of the covariance matrix (correct me if I?m wrong). Seems helpful in my case but I am hesitant to use it without knowing anything about it. > > Thanks for any comment! > Jan > > -- > Jan Hirschmann > MSc Neuroscience > Institute of Clinical Neuroscience and Medical Psychology > Heinrich Heine University D?sseldorf > Universit?tsstr. 1 > 40225 D?sseldorf > Germany > Tel: +49 (0)211 81 18415 > Fax: +49 (0)211 81 19033 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 3 Date: Tue, 6 Nov 2012 10:36:48 -0500 From: "Luke Bloy" To: "'FieldTrip discussion list'" Subject: Re: [FieldTrip] co registration of the mesh points to the atlas Message-ID: <50992e91.0347e00a.5ced.6484 at mx.google.com> Content-Type: text/plain; charset="iso-8859-1" Hi Qi, I'm not sure if this is what you are looking for but take a look at the --morph option to mne_setup_source_space. It should let you create corresponding source grids in each of your subjects. -Luke -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of qi li Sent: Wednesday, October 31, 2012 5:39 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] co registration of the mesh points to the atlas Hi J?rn, Thanks a lot! This link is very helpful for my question. Actually, I followed the tutorial of source reconstruction of event-related fields using MNE which clearly states 'recon-all -surfreg -subjid Subject01' this already co-registered the original surface to the standard atlas sphere. So for each individual, their cortical surfaces are aligned at this step. The confusion is when down-sampling by using 'mne_setup_source_space --ico -6', what is exactly done(algorithm) to down-sample from 20,000 nodes to only 8196? This might be crucial for a group analysis so I seek a clarification. Thanks! Qi On Tue, Oct 30, 2012 at 5:03 AM, "J?rn M. Horschig" wrote: > Dear Qi, > > I guess this page might help: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_i > ndividual_head_space_that_are_all_aligned_in_mni_space?s[]=warp > > Best, > J?rn > > > On 10/25/2012 6:00 PM, qi li wrote: >> >> Hi, >> >> Is there any function to co-register the individual cortical mesh >> points(8196 in total) generate by fieldtrip to the standard brain. >> Thanks! >> >> Qi >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour Centre for > Cognitive Neuroimaging Radboud University Nijmegen Neuronal > Oscillations Group FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ------------------------------ Message: 4 Date: Tue, 6 Nov 2012 17:31:54 +0100 (CET) From: Eleanor Harding To: fieldtrip at science.ru.nl Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? Message-ID: <1002956758.7127.1352219514263.JavaMail.root at zimbra> Content-Type: text/plain; charset=utf-8 Dear Fieldtrip community, I intend to run ICA on an EEG dataset with 64 channels (+ 2 eye channels), on epochs which are about 4 seconds long, and I am unsure as to how many independent components I should define (20,65,..?). My question is, is there a 'rule of thumb' for defining how many independent components to analyze for EEG? In the archives I have found only references to MEG datasets with many channels, for example reducing over 200 channels to 80 components. Looking in the literature today I also wasn't able to interpret an answer. If anyone has any information, references, or other input I would be much obliged. Thanks, Ellie -- ------------------------------------------------------------------ Eleanor Harding PhD Student Max Planck Institute for Human Cognitive and Brain Sciences Stephanstra?e 1A, 04103 Leipzig, Germany Phone: +49 341 9940-2268 Fax: +49 341 9940 2260 http://www.cbs.mpg.de/~harding ------------------------------ Message: 5 Date: Tue, 6 Nov 2012 18:34:45 +0100 From: Nenad Polomac To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] opposite to the ft_appenddata Message-ID: Content-Type: text/plain; charset="iso-8859-1" Thank you very much to both of you! I will use Stephen's suggestion. It fits better with my situation! All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 24, Issue 5 **************************************** -- ------------------------------------------------------------------ Eleanor Harding PhD Student Max Planck Institute for Human Cognitive and Brain Sciences Stephanstraße 1A, 04103 Leipzig, Germany Phone: +49 341 9940-2268 Fax: +49 341 9940 2260 http://www.cbs.mpg.de/~harding From matt.craddock at uni-leipzig.de Wed Nov 7 13:44:33 2012 From: matt.craddock at uni-leipzig.de (Matt Craddock) Date: Wed, 07 Nov 2012 13:44:33 +0100 Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? In-Reply-To: References: <1002956758.7127.1352219514263.JavaMail.root@zimbra> Message-ID: <509A57B1.8070709@uni-leipzig.de> On 06/11/2012 19:44, Arnaud Delorme wrote: > Dear Ellie, > > you should decompose your full rank matrix. PCA dimension reduction may seriously affects and bias ICA solutions (I have seen a yet-to-be published report on that). > > Best, > > Arno Dear all, Uh oh. If PCA is off the table, what should be done if the data is not full rank? e.g. if it's in average reference or multiple channels are bridged etc. Is the bias introduced by PCA worse than trying to decompose a matrix which is not full rank as if it were full rank? Wouldn't cfg.runica.pca =rank(your_number_of_channels) always set it to 1, and thus tell runica to reduce to only a single component? Or does setting it to 1 tell runica to detect rank-deficiency and suggest an appropriate reduction? I don't normally run ICA via fieldtrip, so am not sure how to tell it to detect the rank and reduce accordingly; EEGLAB at least asks you about this when it detects rank deficiency (or at least, should do - i've found it a little temperamental on this point, but this is the Fieldtrip list so...). Regards, Matt -- Dr. Matt Craddock Post-doctoral researcher, Institute of Psychology, University of Leipzig, Seeburgstr. 14-20, 04103 Leipzig, Germany Phone: +49 341 973 95 44 From poil.simonshlomo at gmail.com Wed Nov 7 14:21:13 2012 From: poil.simonshlomo at gmail.com (Simon-Shlomo Poil) Date: Wed, 7 Nov 2012 14:21:13 +0100 Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? In-Reply-To: <509A57B1.8070709@uni-leipzig.de> References: <1002956758.7127.1352219514263.JavaMail.root@zimbra> <509A57B1.8070709@uni-leipzig.de> Message-ID: Dear all, My experience with cleaning high-density EEG (i.e. >=129 channels) is that PCA reduction is necessary before ICA. If you do not do the PCA, you (1) spread out your artifactual source across multiple components, (2) you get a lot of components representing single channels, and (3) you need long recordings to get enough data for so many component (i.e. ~30*129^2 as lower limit for 129 components, a rule-of-thumb I have from the EEGLAB website). This also means that we, e.g., recommend our students using the Neurophysiological Biomarker Toolbox to clean data to reduce their 129-channel data to rank 15 ( http://www.nbtwiki.net/doku.php?id=tutorial:compute_independent_component_analysis#.UJpfS4az70E)! It is simply easier for them to understand 15 components than 129 components... However, my opinion is only based on my non-systematical observations.. I don't know if, e.g., reducing a 129 channel Signal to a PCA rank 30 Signal potentially could remove low power neuronal signal (e.g. gamma oscillations)? I look forward to see the report on PCA dimension reduction effects on ICA! Back to Eleanor's question: I would also recommend you to do a full rank ICA for 64 channel data. Good luck with the cleaning. Best regards, Simon-Shlomo Poil 2012/11/7 Matt Craddock > On 06/11/2012 19:44, Arnaud Delorme wrote: > >> Dear Ellie, >> >> you should decompose your full rank matrix. PCA dimension reduction may >> seriously affects and bias ICA solutions (I have seen a yet-to-be published >> report on that). >> >> Best, >> >> Arno >> > > Dear all, > > Uh oh. If PCA is off the table, what should be done if the data is not > full rank? e.g. if it's in average reference or multiple channels are > bridged etc. Is the bias introduced by PCA worse than trying to decompose a > matrix which is not full rank as if it were full rank? > > Wouldn't > > cfg.runica.pca =rank(your_number_of_channels) > > always set it to 1, and thus tell runica to reduce to only a single > component? Or does setting it to 1 tell runica to detect rank-deficiency > and suggest an appropriate reduction? I don't normally run ICA via > fieldtrip, so am not sure how to tell it to detect the rank and reduce > accordingly; EEGLAB at least asks you about this when it detects rank > deficiency (or at least, should do - i've found it a little temperamental > on this point, but this is the Fieldtrip list so...). > > Regards, > Matt > -- > Dr. Matt Craddock > > Post-doctoral researcher, > Institute of Psychology, > University of Leipzig, > Seeburgstr. 14-20, > 04103 Leipzig, Germany > Phone: +49 341 973 95 44 > > ______________________________**_________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip > -- -- Simon-Shlomo Poil Center of MR-Research University Children’s Hospital Zurich Mobile number: +41 (0)76 399 5809 Office number: +41 (0)44 266 3129 Skype: poil.simonshlomo Webpage: http://www.poil.dk/s/ and http://www.nbtwiki.net and http://www.kispi.uzh.ch/Kinderspital/Medizin/mrzentrum_en.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Wed Nov 7 15:00:38 2012 From: luke.bloy at gmail.com (Luke Bloy) Date: Wed, 7 Nov 2012 09:00:38 -0500 Subject: [FieldTrip] using freesurfer cortical atlases Message-ID: <509a6987.9111e00a.5e14.ffffa79a@mx.google.com> Hi, I'm using cortically constrained mne to look at some auditory ERfs. I'm roughly following this tutorial, http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate. What I would like to do is to impart some anatomical information onto my findings. I can load the desikan atlas created by freesurfer using ft_read_atlas, but the points I get from this don't match the points I get from the sourcespace that I created with mne_setup_source -iso -6. Does anyone have any experience with this? Thanks, Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Nov 7 19:21:17 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 7 Nov 2012 19:21:17 +0100 Subject: [FieldTrip] using freesurfer cortical atlases In-Reply-To: <509a6987.9111e00a.5e14.ffffa79a@mx.google.com> References: <509a6987.9111e00a.5e14.ffffa79a@mx.google.com> Message-ID: Hi Luke, If you read in the *.fif sourcemodel using ft_read_headshape, it contains a field called 'orig'. The subfield orig.inuse links the vertices in the high resolution tessellation to the vertices in the sourcemodel. Best Jan-Mathijs On Nov 7, 2012, at 3:00 PM, Luke Bloy wrote: > Hi, > > I’m using cortically constrained mne to look at some auditory ERfs. I’m roughly following this tutorial, http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate. What I would like to do is to impart some anatomical information onto my findings. I can load the desikan atlas created by freesurfer using ft_read_atlas, but the points I get from this don’t match the points I get from the sourcespace that I created with mne_setup_source –iso -6. > > Does anyone have any experience with this? > > Thanks, > Luke > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Thu Nov 8 14:11:12 2012 From: luke.bloy at gmail.com (Luke Bloy) Date: Thu, 8 Nov 2012 08:11:12 -0500 Subject: [FieldTrip] using freesurfer cortical atlases In-Reply-To: References: <509a6987.9111e00a.5e14.ffffa79a@mx.google.com> Message-ID: <509baf71.2a74310a.053a.1035@mx.google.com> Thanks this is will be much faster than my brute force method. From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of jan-mathijs schoffelen Sent: Wednesday, November 07, 2012 1:21 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] using freesurfer cortical atlases Hi Luke, If you read in the *.fif sourcemodel using ft_read_headshape, it contains a field called 'orig'. The subfield orig.inuse links the vertices in the high resolution tessellation to the vertices in the sourcemodel. Best Jan-Mathijs On Nov 7, 2012, at 3:00 PM, Luke Bloy wrote: Hi, I'm using cortically constrained mne to look at some auditory ERfs. I'm roughly following this tutorial, http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate. What I would like to do is to impart some anatomical information onto my findings. I can load the desikan atlas created by freesurfer using ft_read_atlas, but the points I get from this don't match the points I get from the sourcespace that I created with mne_setup_source -iso -6. Does anyone have any experience with this? Thanks, Luke _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Thu Nov 8 16:17:47 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Thu, 8 Nov 2012 16:17:47 +0100 Subject: [FieldTrip] global field power Message-ID: Hi, Is there any options in the fieldtrip to calculate global field power for MEG data? Thank you in advance! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Nov 8 16:32:36 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 8 Nov 2012 16:32:36 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: Hi Nenad, There are several options available for doing this. You can call, for instance, ft_preprocessing with the option cfg.rectify = 'yes', and then compute the mean signal over any or all of time/trials/channels with some custom code. Does this help? If not, please specify your problem a bit more. Best, Eelke On 8 November 2012 16:17, Nenad Polomac wrote: > Hi, > Is there any options in the fieldtrip to calculate global field power for > MEG data? > > Thank you in advance! > > Nenad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jan.schoffelen at donders.ru.nl Thu Nov 8 16:35:57 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 8 Nov 2012 16:35:57 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: Hi Nenad, No, there is not, but I guess you can use matlabs std function for that. Best, Jan-Mathijs On Nov 8, 2012, at 4:17 PM, Nenad Polomac wrote: > Hi, > Is there any options in the fieldtrip to calculate global field power for MEG data? > > Thank you in advance! > > Nenad > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Nov 8 18:02:38 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 8 Nov 2012 18:02:38 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: JM is right, global field power is the std over channels. Apologies for any confusion I may have caused; I did not know the term and thought you meant something like 'total signal power'. Cheers, Eelke Op 8 nov. 2012 16:39 schreef "jan-mathijs schoffelen" < jan.schoffelen at donders.ru.nl> het volgende: > Hi Nenad, > > No, there is not, but I guess you can use matlabs std function for that. > > Best, > > Jan-Mathijs > > On Nov 8, 2012, at 4:17 PM, Nenad Polomac wrote: > > Hi, > Is there any options in the fieldtrip to calculate global field power for > MEG data? > > Thank you in advance! > > Nenad > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From venug001 at crimson.ua.edu Thu Nov 8 18:21:53 2012 From: venug001 at crimson.ua.edu (Gopakumar Venugopalan) Date: Thu, 8 Nov 2012 14:21:53 -0300 Subject: [FieldTrip] request for 4d users In-Reply-To: References: Message-ID: Dear JM, I have simultaneously recorded EEG/MEG data using 4D. Yes they use the 10-20 (or some variant thereof) system for EEG. This information can be extracted from the headers, and it is possible to relabel the channel locations in EEGLAB, and it is also possible to replace the standard xyz coordinates, with the coordinates from your own individual xyz file--generated by 4D (using Polhemus). Hope to hear from you. warm regards gopa On Wed, Oct 31, 2012 at 4:03 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Dear community and 4d-users in particular, > > I am in the process of implementing more robust support in the fileio > module to deal with simultaneous MEG/EEG measurements using the > 4D-neuroimaging system. Specifically, I want to improve the reading of EEG > electrode positions, when these have been digitized using the Polhemus in > combination with the 4D acquisition software. This question has been raised > on this list over a year ago by Margit Schönherr (who kindly sent me a > dataset to work with: thanks Margit), but it would be really helpful if I > could benefit from your knowledge/input. At the moment FT can extract > electrode positions from the header, but it is based on reverse engineering > based on 1 dataset only. Therefore I would like to ask you whether you > could send me some (as small as possible) datasets, which contain digitized > electrode positions (in combination with the corresponding config and > hs_file). This would be much appreciated. > On a related note, Margit's dataset contained electrode positions in > combination with their labels according to the 10/20 convention. Does > anybody know whether information is stored in the file-header that links > the named electrodes to the generic naming scheme 'E1'...'Ex'? > > Thanks for any input, > > JM > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Thu Nov 8 20:34:14 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Thu, 8 Nov 2012 20:34:14 +0100 Subject: [FieldTrip] global field power Message-ID: Dear Jan and Elke, Thank you for your ansewers! I have applied The Matlabs std function on data.avg matrix and it doesn't give me good results. Namely, it returns matrix with [1 x time points] so it reduces number of channels to one, which is not what I want. I believe this is because the sum function sums data column-wise. My question is could I do only sqrt(data.var). Would this result be proper way of calculating global field power? All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Nov 8 20:46:34 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 8 Nov 2012 20:46:34 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: Dear Nenad, The only definition I could find for 'global field power' in the context of EEG is indeed as JM suggested, the standard deviation over channels. Of course, computing this std collapses across the channel dimension, so you end up with a dimensionality of 1 where previously there was the dimensionality of nChannels. If this is not what you are after, you need to give us a clear definition of what you mean by 'global field power'. Best, Eelke On 8 November 2012 20:34, Nenad Polomac wrote: > Dear Jan and Elke, > > Thank you for your ansewers! > I have applied The Matlabs std function on data.avg matrix and it doesn't > give me good results. Namely, it returns matrix with [1 x time points] so > it reduces number of channels to one, which is not what I want. I believe > this is because the sum function sums data column-wise. My question is could > I do only sqrt(data.var). Would this result be proper way of calculating > global field power? > > All the best! > > Nenad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From nathanweisz at mac.com Fri Nov 9 07:28:50 2012 From: nathanweisz at mac.com (Nathan Weisz) Date: Fri, 09 Nov 2012 07:28:50 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: Hi, I think Nenad means something like (untested code): data.GFP=mean(data.avg.^2) or for data.RMS=sqrt(mean(data.avg.^2)) Good luck, n On 08.11.2012, at 20:46, Eelke Spaak wrote: > Dear Nenad, > > The only definition I could find for 'global field power' in the > context of EEG is indeed as JM suggested, the standard deviation over > channels. Of course, computing this std collapses across the channel > dimension, so you end up with a dimensionality of 1 where previously > there was the dimensionality of nChannels. > > If this is not what you are after, you need to give us a clear > definition of what you mean by 'global field power'. > > Best, > Eelke > > On 8 November 2012 20:34, Nenad Polomac wrote: >> Dear Jan and Elke, >> >> Thank you for your ansewers! >> I have applied The Matlabs std function on data.avg matrix and it doesn't >> give me good results. Namely, it returns matrix with [1 x time points] so >> it reduces number of channels to one, which is not what I want. I believe >> this is because the sum function sums data column-wise. My question is could >> I do only sqrt(data.var). Would this result be proper way of calculating >> global field power? >> >> All the best! >> >> Nenad >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Fri Nov 9 08:53:27 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 9 Nov 2012 08:53:27 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: If something like that is what you are after then my first post is still relevant :) Cheers, Eelke On 9 November 2012 07:28, Nathan Weisz wrote: > Hi, > > I think Nenad means something like (untested code): > data.GFP=mean(data.avg.^2) > > or for > data.RMS=sqrt(mean(data.avg.^2)) > > Good luck, > n > > On 08.11.2012, at 20:46, Eelke Spaak wrote: > >> Dear Nenad, >> >> The only definition I could find for 'global field power' in the >> context of EEG is indeed as JM suggested, the standard deviation over >> channels. Of course, computing this std collapses across the channel >> dimension, so you end up with a dimensionality of 1 where previously >> there was the dimensionality of nChannels. >> >> If this is not what you are after, you need to give us a clear >> definition of what you mean by 'global field power'. >> >> Best, >> Eelke >> >> On 8 November 2012 20:34, Nenad Polomac wrote: >>> Dear Jan and Elke, >>> >>> Thank you for your ansewers! >>> I have applied The Matlabs std function on data.avg matrix and it doesn't >>> give me good results. Namely, it returns matrix with [1 x time points] so >>> it reduces number of channels to one, which is not what I want. I believe >>> this is because the sum function sums data column-wise. My question is could >>> I do only sqrt(data.var). Would this result be proper way of calculating >>> global field power? >>> >>> All the best! >>> >>> Nenad >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From g.piantoni at nin.knaw.nl Fri Nov 9 09:09:35 2012 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Fri, 9 Nov 2012 09:09:35 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: Hi, There is an EEGLAB implementation of the original (Lehman's) GFP definition that might help you: https://sccn.ucsd.edu/svn/software/eeglab/external/bioelectromagnetism_ligth/eeg_gfp.m I don't know of any code for Fieldtrip though. Cheers, G On Fri, Nov 9, 2012 at 7:28 AM, Nathan Weisz wrote: > Hi, > > I think Nenad means something like (untested code): > data.GFP=mean(data.avg.^2) > > or for > data.RMS=sqrt(mean(data.avg.^2)) > > Good luck, > n > > On 08.11.2012, at 20:46, Eelke Spaak wrote: > >> Dear Nenad, >> >> The only definition I could find for 'global field power' in the >> context of EEG is indeed as JM suggested, the standard deviation over >> channels. Of course, computing this std collapses across the channel >> dimension, so you end up with a dimensionality of 1 where previously >> there was the dimensionality of nChannels. >> >> If this is not what you are after, you need to give us a clear >> definition of what you mean by 'global field power'. >> >> Best, >> Eelke >> >> On 8 November 2012 20:34, Nenad Polomac wrote: >>> Dear Jan and Elke, >>> >>> Thank you for your ansewers! >>> I have applied The Matlabs std function on data.avg matrix and it doesn't >>> give me good results. Namely, it returns matrix with [1 x time points] so >>> it reduces number of channels to one, which is not what I want. I believe >>> this is because the sum function sums data column-wise. My question is could >>> I do only sqrt(data.var). Would this result be proper way of calculating >>> global field power? >>> >>> All the best! >>> >>> Nenad >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From polomacnenad at gmail.com Fri Nov 9 10:15:49 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Fri, 9 Nov 2012 10:15:49 +0100 Subject: [FieldTrip] global field power Message-ID: Dear all, Thank you very much for your discussion, and sorry if I was confusing. Thank you for your suggestions, I solved my problem now. @Eelke for the global field power I meant this http://www.sciencedirect.com/science/article/pii/0301008284900030 page 235. Thank you very much for you effort! All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank.ye.mei at gmail.com Fri Nov 9 22:50:39 2012 From: frank.ye.mei at gmail.com (Ye Mei) Date: Fri, 09 Nov 2012 16:50:39 -0500 Subject: [FieldTrip] Is FT_VOLUMEREALIGN required for MEG MRI source localization? Message-ID: <509D7AAF.1020003@gmail.com> Dear all, For source localization, do I need to first registrate the subject's MR scan to the coil locations/fiducials? I suppose yes. But, when I looked at the fieldtrip tutorial (http://fieldtrip.fcdonders.nl/tutorial/beamformer), I didn't see the function FT_VOLUMEREALIGN was used? Could someone explain that? Many thanks in advance. Kind regards Ye Mei From a.stolk at fcdonders.ru.nl Sat Nov 10 14:04:52 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Sat, 10 Nov 2012 14:04:52 +0100 (CET) Subject: [FieldTrip] Is FT_VOLUMEREALIGN required for MEG MRI source localization? In-Reply-To: <509D7AAF.1020003@gmail.com> Message-ID: <915729497.1200106.1352552692303.JavaMail.root@sculptor.zimbra.ru.nl> Hi Ye Mei, It is indeed important to have your anatomical MRI aligned to the coordinate system of your electrophysiological recording. ft_volumerealign will not change the anatomical data itself, it only creates a transformation matrix (.transform field) that aligns the anatomy to the intended coordinate system. With respect to the tutorial anatomical data, this procedure was already applied. Namely, the anatomical MRI is already aligned to the CTF (MEG) coordinate system and stored as such. For more details, please see: http://fieldtrip.fcdonders.nl/tutorial/headmodel_meg Hope this answered your question, Arjen ----- Oorspronkelijk bericht ----- > Van: "Ye Mei" > Aan: fieldtrip at science.ru.nl > Verzonden: Vrijdag 9 november 2012 22:50:39 > Onderwerp: [FieldTrip] Is FT_VOLUMEREALIGN required for MEG MRI source localization? > Dear all, > > For source localization, do I need to first registrate the subject's > MR > scan to the coil locations/fiducials? I suppose yes. But, when I > looked > at the fieldtrip tutorial > (http://fieldtrip.fcdonders.nl/tutorial/beamformer), I didn't see the > function FT_VOLUMEREALIGN was used? > > Could someone explain that? > > Many thanks in advance. > > Kind regards > > Ye Mei > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Caroline.Lustenberger at kispi.uzh.ch Sun Nov 11 14:25:31 2012 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Sun, 11 Nov 2012 13:25:31 +0000 Subject: [FieldTrip] Cluster statistics Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A@kispi.uzh.ch> Dear fieldtrip users I tried to perform cluster analysis with fieldtrip. Since I've performed preprocessing/frequency analysis before using fieldtrip, I had to form the specific data structure to use for ft_freqstatistics by myself. I made a a structur as follows: Condition 1 'EEGa': --> 10 subjects: EEGa{1:10} label: {128x1 cell} %128 egi elec. dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Condition 2 'EEGm': EEGm{1:10} label: {128x1 cell} dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Then I performed the following steps: cfg = []; cfg.elec = elec; %was defined before EGI 128 electrodes cfg.neighbours = neighbours; %also successfully defined before cfg.latency = 'all'; %cfg.frequency = 'all'; cfg.channel = 'all';%eleselection % see CHANNELSELECTION cfg.avgovertime = 'no'; %cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'depsamplesT'; cfg.numrandomization = 2^10; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.alpha = 0.05; cfg.clustertail = 0; cfg.feedback = 'gui'; cfg.parameter = 'powspctrm'; cfg.design = [ 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 % subject number 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); The function ft_freqstatistics runs but the stats results are strange. My stats.stat is always -inf and stats.prob always 0 What might be the problem? Thanks and all the best Caroline Von meinem iPhone gesendet -------------- next part -------------- An HTML attachment was scrubbed... URL: From chakalov.ivan at googlemail.com Mon Nov 12 11:16:48 2012 From: chakalov.ivan at googlemail.com (Ivan Chakalov) Date: Mon, 12 Nov 2012 11:16:48 +0100 Subject: [FieldTrip] baseline_normalization Message-ID: Dear Fieldtrippers, I have question regarding the baseline normalization using Time Frequency Analyses on a sensor space-level. I have used “Hanning tapper “for analyzing MEG data with “relchange” (relative change) baseline-normalization. So far I have no idea how to report the obtained results in terms of units or dimensions? Should it be called “relative change of the spectral power”? As I understood, if *Pa* is the spectral power of the post-rigger time-period and *Pb* is the spectral power of the pre-trigger period, the “relchange” value is calculated as: Pa-Pb/Pb Am I correct? Thank you in advanced! Ivan Chakalov -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon Nov 12 11:24:42 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 12 Nov 2012 11:24:42 +0100 Subject: [FieldTrip] baseline_normalization In-Reply-To: References: Message-ID: Dear Ivan, Yes, you are correct. I think "relative change of spectral power" covers what the formula means quite well. Best, Eelke On 12 November 2012 11:16, Ivan Chakalov wrote: > Dear Fieldtrippers, > > I have question regarding the baseline normalization using Time Frequency > Analyses on a sensor space-level. I have used “Hanning tapper “for analyzing > MEG data with “relchange” (relative change) baseline-normalization. So far I > have no idea how to report the obtained results in terms of units or > dimensions? Should it be called “relative change of the spectral power”? As > I understood, if Pa is the spectral power of the post-rigger time-period and > Pb is the spectral power of the pre-trigger period, the “relchange” value is > calculated as: Pa-Pb/Pb > > Am I correct? > > > > Thank you in advanced! > > Ivan Chakalov > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From chakalov.ivan at googlemail.com Mon Nov 12 11:27:47 2012 From: chakalov.ivan at googlemail.com (Ivan Chakalov) Date: Mon, 12 Nov 2012 11:27:47 +0100 Subject: [FieldTrip] baseline_normalization In-Reply-To: References: Message-ID: Thanks a lot! On 12 November 2012 11:24, Eelke Spaak wrote: > Dear Ivan, > > Yes, you are correct. I think "relative change of spectral power" > covers what the formula means quite well. > > Best, > Eelke > > On 12 November 2012 11:16, Ivan Chakalov > wrote: > > Dear Fieldtrippers, > > > > I have question regarding the baseline normalization using Time Frequency > > Analyses on a sensor space-level. I have used “Hanning tapper “for > analyzing > > MEG data with “relchange” (relative change) baseline-normalization. So > far I > > have no idea how to report the obtained results in terms of units or > > dimensions? Should it be called “relative change of the spectral > power”? As > > I understood, if Pa is the spectral power of the post-rigger time-period > and > > Pb is the spectral power of the pre-trigger period, the “relchange” > value is > > calculated as: Pa-Pb/Pb > > > > Am I correct? > > > > > > > > Thank you in advanced! > > > > Ivan Chakalov > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Mon Nov 12 14:30:28 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Mon, 12 Nov 2012 07:30:28 -0600 Subject: [FieldTrip] Cluster statistics Message-ID: Hi Caroline, It looks to me like your grand averages don't have any EEG data in them; here is what mine look like: label: {60x1 cell} time: [1x601 double] individual: [19x60x601 double] dimord: 'subj_chan_time' cfg: [1x1 struct] elec: [1x1 struct] To run cluster statistics your structure has to have that "individual" field, which has the ERPs for each subject (for instance, from mine you can see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). I got mine by importing each subject's data into FieldTrip, and then using ft_timelockgrandaverage() with cfg.keepindividual='yes'. That is my guess about what your problem is, but I could be wrong. After you ran it, did you check stat.posclusters and stat.negclusters? I think those are more important than stat.stat and stat.prob; they tell you which clusters are actually significant (and stat.posclusterslabelmat and stat.negclusterslabelmat tell you where/when the clusters are). Best, Steve Message: 1 > Date: Sun, 11 Nov 2012 13:25:31 +0000 > From: Lustenberger Caroline > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Cluster statistics > Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A at kispi.uzh.ch> > Content-Type: text/plain; charset="utf-8" > > Dear fieldtrip users > > I tried to perform cluster analysis with fieldtrip. Since I've performed > preprocessing/frequency analysis before using fieldtrip, I had to form the > specific > data structure to use for ft_freqstatistics by myself. > > I made a a structur as follows: > Condition 1 'EEGa': > --> 10 subjects: > EEGa{1:10} > label: {128x1 cell} %128 egi elec. > dimord: 'chan_freq' > freq: 1 > powspctrm: [128x1 double] > cumtapcnt: 1 > cfg: [1x1 struct] > > Condition 2 'EEGm': > EEGm{1:10} > label: {128x1 cell} > dimord: 'chan_freq' > freq: 1 > powspctrm: [128x1 double] > cumtapcnt: 1 > cfg: [1x1 struct] > > > Then I performed the following steps: > > cfg = []; > > cfg.elec = elec; %was defined before EGI 128 electrodes > > cfg.neighbours = neighbours; %also successfully defined before > > cfg.latency = 'all'; > > %cfg.frequency = 'all'; > > cfg.channel = 'all';%eleselection % see CHANNELSELECTION > > cfg.avgovertime = 'no'; > > %cfg.avgoverfreq = 'no'; > > cfg.avgoverchan = 'no'; > > cfg.statistic = 'depsamplesT'; > > cfg.numrandomization = 2^10; > > cfg.correctm = 'cluster'; > > cfg.method = 'montecarlo'; > > cfg.clusteralpha = 0.05; > > cfg.alpha = 0.05; > > cfg.alpha = 0.05; > > cfg.clustertail = 0; > > cfg.feedback = 'gui'; > > cfg.parameter = 'powspctrm'; > > cfg.design = [ > > 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 > 9 10 % subject number > > 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number > > cfg.uvar = 1; % "subject" is unit of observation > > cfg.ivar = 2; % "condition" is the independent variable > > stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); > > > > > The function ft_freqstatistics runs but the stats results are strange. > My stats.stat is always -inf > and stats.prob always 0 > > What might be the problem? > > > Thanks and all the best > Caroline > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Caroline.Lustenberger at kispi.uzh.ch Mon Nov 12 14:57:38 2012 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Mon, 12 Nov 2012 13:57:38 +0000 Subject: [FieldTrip] Cluster statistics In-Reply-To: Message-ID: <7C66D90E0C18014E85B44B560D4D5BC81488F224@EXZH1VM.kispi.int> Dear Steve Thank you so much for your fast answering. I try your advices and hope it works. Otherwise I let you know. All the best Caroline ________________________________ Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Politzer-Ahles Gesendet: Montag, 12. November 2012 14:30 An: fieldtrip at science.ru.nl Betreff: Re: [FieldTrip] Cluster statistics Hi Caroline, It looks to me like your grand averages don't have any EEG data in them; here is what mine look like: label: {60x1 cell} time: [1x601 double] individual: [19x60x601 double] dimord: 'subj_chan_time' cfg: [1x1 struct] elec: [1x1 struct] To run cluster statistics your structure has to have that "individual" field, which has the ERPs for each subject (for instance, from mine you can see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). I got mine by importing each subject's data into FieldTrip, and then using ft_timelockgrandaverage() with cfg.keepindividual='yes'. That is my guess about what your problem is, but I could be wrong. After you ran it, did you check stat.posclusters and stat.negclusters? I think those are more important than stat.stat and stat.prob; they tell you which clusters are actually significant (and stat.posclusterslabelmat and stat.negclusterslabelmat tell you where/when the clusters are). Best, Steve Message: 1 Date: Sun, 11 Nov 2012 13:25:31 +0000 From: Lustenberger Caroline > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Cluster statistics Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A at kispi.uzh.ch> Content-Type: text/plain; charset="utf-8" Dear fieldtrip users I tried to perform cluster analysis with fieldtrip. Since I've performed preprocessing/frequency analysis before using fieldtrip, I had to form the specific data structure to use for ft_freqstatistics by myself. I made a a structur as follows: Condition 1 'EEGa': --> 10 subjects: EEGa{1:10} label: {128x1 cell} %128 egi elec. dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Condition 2 'EEGm': EEGm{1:10} label: {128x1 cell} dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Then I performed the following steps: cfg = []; cfg.elec = elec; %was defined before EGI 128 electrodes cfg.neighbours = neighbours; %also successfully defined before cfg.latency = 'all'; %cfg.frequency = 'all'; cfg.channel = 'all';%eleselection % see CHANNELSELECTION cfg.avgovertime = 'no'; %cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'depsamplesT'; cfg.numrandomization = 2^10; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.alpha = 0.05; cfg.clustertail = 0; cfg.feedback = 'gui'; cfg.parameter = 'powspctrm'; cfg.design = [ 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 % subject number 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); The function ft_freqstatistics runs but the stats results are strange. My stats.stat is always -inf and stats.prob always 0 What might be the problem? Thanks and all the best Caroline -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.piantoni at nin.knaw.nl Mon Nov 12 16:17:01 2012 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Mon, 12 Nov 2012 16:17:01 +0100 Subject: [FieldTrip] baseline_normalization In-Reply-To: References: Message-ID: Hi Ivan, If you multiply the values by 100, you get the "percentage change", which is very straightforward to interpret. Cheers, G On Mon, Nov 12, 2012 at 11:24 AM, Eelke Spaak wrote: > Dear Ivan, > > Yes, you are correct. I think "relative change of spectral power" > covers what the formula means quite well. > > Best, > Eelke > > On 12 November 2012 11:16, Ivan Chakalov wrote: >> Dear Fieldtrippers, >> >> I have question regarding the baseline normalization using Time Frequency >> Analyses on a sensor space-level. I have used “Hanning tapper “for analyzing >> MEG data with “relchange” (relative change) baseline-normalization. So far I >> have no idea how to report the obtained results in terms of units or >> dimensions? Should it be called “relative change of the spectral power”? As >> I understood, if Pa is the spectral power of the post-rigger time-period and >> Pb is the spectral power of the pre-trigger period, the “relchange” value is >> calculated as: Pa-Pb/Pb >> >> Am I correct? >> >> >> >> Thank you in advanced! >> >> Ivan Chakalov >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From chakalov.ivan at googlemail.com Mon Nov 12 16:28:51 2012 From: chakalov.ivan at googlemail.com (Ivan Chakalov) Date: Mon, 12 Nov 2012 16:28:51 +0100 Subject: [FieldTrip] baseline_normalization In-Reply-To: References: Message-ID: Thank you, it is a very good idea! Best, Ivan On 12 November 2012 16:17, Gio Piantoni wrote: > Hi Ivan, > > If you multiply the values by 100, you get the "percentage change", > which is very straightforward to interpret. > > Cheers, > G > > On Mon, Nov 12, 2012 at 11:24 AM, Eelke Spaak > wrote: > > Dear Ivan, > > > > Yes, you are correct. I think "relative change of spectral power" > > covers what the formula means quite well. > > > > Best, > > Eelke > > > > On 12 November 2012 11:16, Ivan Chakalov > wrote: > >> Dear Fieldtrippers, > >> > >> I have question regarding the baseline normalization using Time > Frequency > >> Analyses on a sensor space-level. I have used “Hanning tapper “for > analyzing > >> MEG data with “relchange” (relative change) baseline-normalization. So > far I > >> have no idea how to report the obtained results in terms of units or > >> dimensions? Should it be called “relative change of the spectral > power”? As > >> I understood, if Pa is the spectral power of the post-rigger > time-period and > >> Pb is the spectral power of the pre-trigger period, the “relchange” > value is > >> calculated as: Pa-Pb/Pb > >> > >> Am I correct? > >> > >> > >> > >> Thank you in advanced! > >> > >> Ivan Chakalov > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Caroline.Lustenberger at kispi.uzh.ch Mon Nov 12 16:55:35 2012 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Mon, 12 Nov 2012 15:55:35 +0000 Subject: [FieldTrip] Cluster statistics In-Reply-To: Message-ID: <7C66D90E0C18014E85B44B560D4D5BC81488F2C5@EXZH1VM.kispi.int> Dear Steve It seems to work now. However, when I have NaN values in my powerspectrum array, I recieve the following error: ??? Invalid MEX-file 'C:\Users\Caroline\MATLAB_PhD\fieldtrip-20110927\fieldtrip-20110927\statfun\private\nanmean.mexw64': The specified module could not be found. Error in ==> statfun_depsamplesT at 98 avgdiff = nanmean(diffmat,2); Error in ==> statistics_montecarlo at 240 [statobs, cfg] = statfun(cfg, dat, design); Error in ==> ft_freqstatistics at 279 [stat, cfg] = statmethod(cfg, dat, cfg.design); What might be the problem? Is there a detailed documentation about the command ft_freqstatistics, especially about the meanings of the stats output and what kind of input is possible (e.g. t-test, ...) Thanks again for all your help and best wishes Caroline ________________________________ Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Politzer-Ahles Gesendet: Montag, 12. November 2012 14:30 An: fieldtrip at science.ru.nl Betreff: Re: [FieldTrip] Cluster statistics Hi Caroline, It looks to me like your grand averages don't have any EEG data in them; here is what mine look like: label: {60x1 cell} time: [1x601 double] individual: [19x60x601 double] dimord: 'subj_chan_time' cfg: [1x1 struct] elec: [1x1 struct] To run cluster statistics your structure has to have that "individual" field, which has the ERPs for each subject (for instance, from mine you can see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). I got mine by importing each subject's data into FieldTrip, and then using ft_timelockgrandaverage() with cfg.keepindividual='yes'. That is my guess about what your problem is, but I could be wrong. After you ran it, did you check stat.posclusters and stat.negclusters? I think those are more important than stat.stat and stat.prob; they tell you which clusters are actually significant (and stat.posclusterslabelmat and stat.negclusterslabelmat tell you where/when the clusters are). Best, Steve Message: 1 Date: Sun, 11 Nov 2012 13:25:31 +0000 From: Lustenberger Caroline > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Cluster statistics Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A at kispi.uzh.ch> Content-Type: text/plain; charset="utf-8" Dear fieldtrip users I tried to perform cluster analysis with fieldtrip. Since I've performed preprocessing/frequency analysis before using fieldtrip, I had to form the specific data structure to use for ft_freqstatistics by myself. I made a a structur as follows: Condition 1 'EEGa': --> 10 subjects: EEGa{1:10} label: {128x1 cell} %128 egi elec. dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Condition 2 'EEGm': EEGm{1:10} label: {128x1 cell} dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Then I performed the following steps: cfg = []; cfg.elec = elec; %was defined before EGI 128 electrodes cfg.neighbours = neighbours; %also successfully defined before cfg.latency = 'all'; %cfg.frequency = 'all'; cfg.channel = 'all';%eleselection % see CHANNELSELECTION cfg.avgovertime = 'no'; %cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'depsamplesT'; cfg.numrandomization = 2^10; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.alpha = 0.05; cfg.clustertail = 0; cfg.feedback = 'gui'; cfg.parameter = 'powspctrm'; cfg.design = [ 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 % subject number 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); The function ft_freqstatistics runs but the stats results are strange. My stats.stat is always -inf and stats.prob always 0 What might be the problem? Thanks and all the best Caroline -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Mon Nov 12 17:08:28 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 12 Nov 2012 17:08:28 +0100 Subject: [FieldTrip] Cluster statistics In-Reply-To: <7C66D90E0C18014E85B44B560D4D5BC81488F2C5@EXZH1VM.kispi.int> References: <7C66D90E0C18014E85B44B560D4D5BC81488F2C5@EXZH1VM.kispi.int> Message-ID: Dear Caroline, Just to be sure - are you working on a recent version of FieldTrip (your pathname suggests otherwise)? The error seems to suggest you are just missing the mexfile which updating your version might solve. You can take a look at the specific statfun_* functions for details about their output. A very generic overview is giving in the Fieldtrup Walkthrough (see the left dropdown documentation menu on the website) in which the output input-output structure is explained. That might help as well. Cheers, Stephen On 12 November 2012 16:55, Lustenberger Caroline < Caroline.Lustenberger at kispi.uzh.ch> wrote: > ** > Dear Steve > > It seems to work now. However, when I have NaN values in my powerspectrum > array, I recieve the following error: > > ??? Invalid MEX-file > > 'C:\Users\Caroline\MATLAB_PhD\fieldtrip-20110927\fieldtrip-20110927\statfun\private\nanmean.mexw64': > The specified module could not be found. > > Error in ==> statfun_depsamplesT at 98 > avgdiff = nanmean(diffmat,2); > > Error in ==> statistics_montecarlo at 240 > [statobs, cfg] = statfun(cfg, dat, design); > > Error in ==> ft_freqstatistics at 279 > [stat, cfg] = statmethod(cfg, dat, cfg.design); > > What might be the problem? > > Is there a detailed documentation about the command ft_freqstatistics, > especially about the meanings of the stats output and what kind of input is > possible (e.g. t-test, ...) > > Thanks again for all your help and best wishes > Caroline > > > ------------------------------ > *Von:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *Im Auftrag von *Stephen Politzer-Ahles > *Gesendet:* Montag, 12. November 2012 14:30 > *An:* fieldtrip at science.ru.nl > *Betreff:* Re: [FieldTrip] Cluster statistics > > Hi Caroline, > > It looks to me like your grand averages don't have any EEG data in them; > here is what mine look like: > > label: {60x1 cell} > time: [1x601 double] > individual: [19x60x601 double] > dimord: 'subj_chan_time' > cfg: [1x1 struct] > elec: [1x1 struct] > > To run cluster statistics your structure has to have that "individual" > field, which has the ERPs for each subject (for instance, from mine you can > see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). > I got mine by importing each subject's data into FieldTrip, and then using > ft_timelockgrandaverage() with cfg.keepindividual='yes'. > > That is my guess about what your problem is, but I could be wrong. After > you ran it, did you check stat.posclusters and stat.negclusters? I think > those are more important than stat.stat and stat.prob; they tell you which > clusters are actually significant (and stat.posclusterslabelmat and > stat.negclusterslabelmat tell you where/when the clusters are). > > Best, > Steve > > > Message: 1 >> Date: Sun, 11 Nov 2012 13:25:31 +0000 >> From: Lustenberger Caroline >> To: "fieldtrip at science.ru.nl" >> Subject: [FieldTrip] Cluster statistics >> Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A at kispi.uzh.ch> >> Content-Type: text/plain; charset="utf-8" >> >> Dear fieldtrip users >> >> I tried to perform cluster analysis with fieldtrip. Since I've performed >> preprocessing/frequency analysis before using fieldtrip, I had to form the >> specific >> data structure to use for ft_freqstatistics by myself. >> >> I made a a structur as follows: >> Condition 1 'EEGa': >> --> 10 subjects: >> EEGa{1:10} >> label: {128x1 cell} %128 egi elec. >> dimord: 'chan_freq' >> freq: 1 >> powspctrm: [128x1 double] >> cumtapcnt: 1 >> cfg: [1x1 struct] >> >> Condition 2 'EEGm': >> EEGm{1:10} >> label: {128x1 cell} >> dimord: 'chan_freq' >> freq: 1 >> powspctrm: [128x1 double] >> cumtapcnt: 1 >> cfg: [1x1 struct] >> >> >> Then I performed the following steps: >> >> cfg = []; >> >> cfg.elec = elec; %was defined before EGI 128 electrodes >> >> cfg.neighbours = neighbours; %also successfully defined before >> >> cfg.latency = 'all'; >> >> %cfg.frequency = 'all'; >> >> cfg.channel = 'all';%eleselection % see CHANNELSELECTION >> >> cfg.avgovertime = 'no'; >> >> %cfg.avgoverfreq = 'no'; >> >> cfg.avgoverchan = 'no'; >> >> cfg.statistic = 'depsamplesT'; >> >> cfg.numrandomization = 2^10; >> >> cfg.correctm = 'cluster'; >> >> cfg.method = 'montecarlo'; >> >> cfg.clusteralpha = 0.05; >> >> cfg.alpha = 0.05; >> >> cfg.alpha = 0.05; >> >> cfg.clustertail = 0; >> >> cfg.feedback = 'gui'; >> >> cfg.parameter = 'powspctrm'; >> >> cfg.design = [ >> >> 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 >> 9 10 % subject number >> >> 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number >> >> cfg.uvar = 1; % "subject" is unit of observation >> >> cfg.ivar = 2; % "condition" is the independent variable >> >> stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); >> >> >> >> >> The function ft_freqstatistics runs but the stats results are strange. >> My stats.stat is always -inf >> and stats.prob always 0 >> >> What might be the problem? >> >> >> Thanks and all the best >> Caroline >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ulrich.Pomper at charite.de Mon Nov 12 20:01:07 2012 From: Ulrich.Pomper at charite.de (Pomper, Ulrich) Date: Mon, 12 Nov 2012 20:01:07 +0100 Subject: [FieldTrip] =?windows-1252?q?_PhD_position=2C_Department_of_Psych?= =?windows-1252?q?iatry_and_Psychotherapy=2C_Charit=E9_Berlin?= In-Reply-To: <4B78B221-796B-4B89-97B8-BA2A51C0F92D@charite.de> References: <4B78B221-796B-4B89-97B8-BA2A51C0F92D@charite.de> Message-ID: The Department of Psychiatry and Psychotherapy, Charité – Universitätsmedizin Berlin invites applications for a PhD position A Starting Grant of the European Research Council (ERC) will fund the currently open position (initially 24 months). The main objective of this ERC research program is to examine neural markers of multisensory integration and to test a new hypothesis that considers dynamic interplay of synchronized neural populations as a key to multisensory processes. The studies within this program include EEG and other neuroimaging methods. Studies will be conducted in healthy subjects and patients with schizophrenia. Multisensory processes will be examined in a series of experiments requiring both bottom-up and top-down processing. Applicants should have a background in psychology, medicine, biology, physics, engineering, or neuroscience. Basic experience in human EEG or MEG studies, Matlab programming skills, as well as some German language skills for interacting with patients are prerequisites for the position. An interest in neurophysiological studies including clinical populations is expected. Applicants are asked to submit their CV, a motivation letter including information about a possible starting date, 2 names of referees, and documentation of relevant qualifications (e.g., copies of diplomas and/or transcripts of grades) until November 25, 2012, electronically to: daniel.senkowski at charite.de Regards, Daniel Senkowski --------------------------------------------------------------- Daniel Senkowski, Ph.D. Professor of Clinical Neuropsychology Department of Psychiatry and Psychotherapy Charité, University Medicine Berlin St. Hedwig Hospital, Große Hamburger Str. 5-11 10115 Berlin, Germany www.danielsenkowski.com http://psy-ccm.charite.de/en/research/neuroimaging/multisensory_integration -------------- next part -------------- An HTML attachment was scrubbed... URL: From Caroline.Lustenberger at kispi.uzh.ch Tue Nov 13 09:02:22 2012 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Tue, 13 Nov 2012 08:02:22 +0000 Subject: [FieldTrip] Cluster statistics In-Reply-To: Message-ID: <7C66D90E0C18014E85B44B560D4D5BC81488F447@EXZH1VM.kispi.int> Dear Stephen Thank you, It now perfectly works, but I always get this warning I'm not sure how to handle that: Warning: doing a two-sided test without correcting p-values or alpha-level, p-values and alpha-level will reflect one-sided tests per tail cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.clustertail = 0; When I want to test whether my data is significant different (direction not known, therefore two sided) with an alpha level <0.05 do I have to adjust my level to 0.025? All the Best, Caroline ________________________________ Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Whitmarsh Gesendet: Montag, 12. November 2012 17:08 An: FieldTrip discussion list Betreff: Re: [FieldTrip] Cluster statistics Dear Caroline, Just to be sure - are you working on a recent version of FieldTrip (your pathname suggests otherwise)? The error seems to suggest you are just missing the mexfile which updating your version might solve. You can take a look at the specific statfun_* functions for details about their output. A very generic overview is giving in the Fieldtrup Walkthrough (see the left dropdown documentation menu on the website) in which the output input-output structure is explained. That might help as well. Cheers, Stephen On 12 November 2012 16:55, Lustenberger Caroline > wrote: Dear Steve It seems to work now. However, when I have NaN values in my powerspectrum array, I recieve the following error: ??? Invalid MEX-file 'C:\Users\Caroline\MATLAB_PhD\fieldtrip-20110927\fieldtrip-20110927\statfun\private\nanmean.mexw64': The specified module could not be found. Error in ==> statfun_depsamplesT at 98 avgdiff = nanmean(diffmat,2); Error in ==> statistics_montecarlo at 240 [statobs, cfg] = statfun(cfg, dat, design); Error in ==> ft_freqstatistics at 279 [stat, cfg] = statmethod(cfg, dat, cfg.design); What might be the problem? Is there a detailed documentation about the command ft_freqstatistics, especially about the meanings of the stats output and what kind of input is possible (e.g. t-test, ...) Thanks again for all your help and best wishes Caroline ________________________________ Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Politzer-Ahles Gesendet: Montag, 12. November 2012 14:30 An: fieldtrip at science.ru.nl Betreff: Re: [FieldTrip] Cluster statistics Hi Caroline, It looks to me like your grand averages don't have any EEG data in them; here is what mine look like: label: {60x1 cell} time: [1x601 double] individual: [19x60x601 double] dimord: 'subj_chan_time' cfg: [1x1 struct] elec: [1x1 struct] To run cluster statistics your structure has to have that "individual" field, which has the ERPs for each subject (for instance, from mine you can see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). I got mine by importing each subject's data into FieldTrip, and then using ft_timelockgrandaverage() with cfg.keepindividual='yes'. That is my guess about what your problem is, but I could be wrong. After you ran it, did you check stat.posclusters and stat.negclusters? I think those are more important than stat.stat and stat.prob; they tell you which clusters are actually significant (and stat.posclusterslabelmat and stat.negclusterslabelmat tell you where/when the clusters are). Best, Steve Message: 1 Date: Sun, 11 Nov 2012 13:25:31 +0000 From: Lustenberger Caroline > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Cluster statistics Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A at kispi.uzh.ch> Content-Type: text/plain; charset="utf-8" Dear fieldtrip users I tried to perform cluster analysis with fieldtrip. Since I've performed preprocessing/frequency analysis before using fieldtrip, I had to form the specific data structure to use for ft_freqstatistics by myself. I made a a structur as follows: Condition 1 'EEGa': --> 10 subjects: EEGa{1:10} label: {128x1 cell} %128 egi elec. dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Condition 2 'EEGm': EEGm{1:10} label: {128x1 cell} dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Then I performed the following steps: cfg = []; cfg.elec = elec; %was defined before EGI 128 electrodes cfg.neighbours = neighbours; %also successfully defined before cfg.latency = 'all'; %cfg.frequency = 'all'; cfg.channel = 'all';%eleselection % see CHANNELSELECTION cfg.avgovertime = 'no'; %cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'depsamplesT'; cfg.numrandomization = 2^10; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.alpha = 0.05; cfg.clustertail = 0; cfg.feedback = 'gui'; cfg.parameter = 'powspctrm'; cfg.design = [ 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 % subject number 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); The function ft_freqstatistics runs but the stats results are strange. My stats.stat is always -inf and stats.prob always 0 What might be the problem? Thanks and all the best Caroline _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Tue Nov 13 09:27:04 2012 From: julian.keil at gmail.com (Julian Keil) Date: Tue, 13 Nov 2012 09:27:04 +0100 Subject: [FieldTrip] Cluster statistics In-Reply-To: <7C66D90E0C18014E85B44B560D4D5BC81488F447@EXZH1VM.kispi.int> References: <7C66D90E0C18014E85B44B560D4D5BC81488F447@EXZH1VM.kispi.int> Message-ID: Dear Caroline, that's what the option cfg.correcttail = 'alpha'; is for. Good Luck Am 13.11.2012 um 09:02 schrieb Lustenberger Caroline: > Dear Stephen > > Thank you, It now perfectly works, but I always get this warning I'm not sure how to handle that: > > Warning: doing a two-sided test without correcting p-values or alpha-level, > p-values and alpha-level will reflect one-sided tests per tail > > cfg.clusteralpha = 0.05; > > cfg.alpha = 0.05; > > cfg.clustertail = 0; > > When I want to test whether my data is significant different (direction not known, therefore two sided) with an alpha level <0.05 do I have to adjust my level to 0.025? > > All the Best, Caroline > > Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Whitmarsh > Gesendet: Montag, 12. November 2012 17:08 > An: FieldTrip discussion list > Betreff: Re: [FieldTrip] Cluster statistics > > Dear Caroline, > > Just to be sure - are you working on a recent version of FieldTrip (your pathname suggests otherwise)? The error seems to suggest you are just missing the mexfile which updating your version might solve. > > You can take a look at the specific statfun_* functions for details about their output. A very generic overview is giving in the Fieldtrup Walkthrough (see the left dropdown documentation menu on the website) in which the output input-output structure is explained. That might help as well. > > Cheers, > Stephen > > > > On 12 November 2012 16:55, Lustenberger Caroline wrote: > Dear Steve > > It seems to work now. However, when I have NaN values in my powerspectrum array, I recieve the following error: > > ??? Invalid MEX-file > 'C:\Users\Caroline\MATLAB_PhD\fieldtrip-20110927\fieldtrip-20110927\statfun\private\nanmean.mexw64': > The specified module could not be found. > > Error in ==> statfun_depsamplesT at 98 > avgdiff = nanmean(diffmat,2); > > Error in ==> statistics_montecarlo at 240 > [statobs, cfg] = statfun(cfg, dat, design); > > Error in ==> ft_freqstatistics at 279 > [stat, cfg] = statmethod(cfg, dat, cfg.design); > > What might be the problem? > > Is there a detailed documentation about the command ft_freqstatistics, especially about the meanings of the stats output and what kind of input is possible (e.g. t-test, ...) > > Thanks again for all your help and best wishes > Caroline > > > Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Politzer-Ahles > Gesendet: Montag, 12. November 2012 14:30 > An: fieldtrip at science.ru.nl > Betreff: Re: [FieldTrip] Cluster statistics > > Hi Caroline, > > It looks to me like your grand averages don't have any EEG data in them; here is what mine look like: > > label: {60x1 cell} > time: [1x601 double] > individual: [19x60x601 double] > dimord: 'subj_chan_time' > cfg: [1x1 struct] > elec: [1x1 struct] > > To run cluster statistics your structure has to have that "individual" field, which has the ERPs for each subject (for instance, from mine you can see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). I got mine by importing each subject's data into FieldTrip, and then using ft_timelockgrandaverage() with cfg.keepindividual='yes'. > > That is my guess about what your problem is, but I could be wrong. After you ran it, did you check stat.posclusters and stat.negclusters? I think those are more important than stat.stat and stat.prob; they tell you which clusters are actually significant (and stat.posclusterslabelmat and stat.negclusterslabelmat tell you where/when the clusters are). > > Best, > Steve > > > Message: 1 > Date: Sun, 11 Nov 2012 13:25:31 +0000 > From: Lustenberger Caroline > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Cluster statistics > Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A at kispi.uzh.ch> > Content-Type: text/plain; charset="utf-8" > > Dear fieldtrip users > > I tried to perform cluster analysis with fieldtrip. Since I've performed preprocessing/frequency analysis before using fieldtrip, I had to form the specific > data structure to use for ft_freqstatistics by myself. > > I made a a structur as follows: > Condition 1 'EEGa': > --> 10 subjects: > EEGa{1:10} > label: {128x1 cell} %128 egi elec. > dimord: 'chan_freq' > freq: 1 > powspctrm: [128x1 double] > cumtapcnt: 1 > cfg: [1x1 struct] > > Condition 2 'EEGm': > EEGm{1:10} > label: {128x1 cell} > dimord: 'chan_freq' > freq: 1 > powspctrm: [128x1 double] > cumtapcnt: 1 > cfg: [1x1 struct] > > > Then I performed the following steps: > > cfg = []; > > cfg.elec = elec; %was defined before EGI 128 electrodes > > cfg.neighbours = neighbours; %also successfully defined before > > cfg.latency = 'all'; > > %cfg.frequency = 'all'; > > cfg.channel = 'all';%eleselection % see CHANNELSELECTION > > cfg.avgovertime = 'no'; > > %cfg.avgoverfreq = 'no'; > > cfg.avgoverchan = 'no'; > > cfg.statistic = 'depsamplesT'; > > cfg.numrandomization = 2^10; > > cfg.correctm = 'cluster'; > > cfg.method = 'montecarlo'; > > cfg.clusteralpha = 0.05; > > cfg.alpha = 0.05; > > cfg.alpha = 0.05; > > cfg.clustertail = 0; > > cfg.feedback = 'gui'; > > cfg.parameter = 'powspctrm'; > > cfg.design = [ > > 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 % subject number > > 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number > > cfg.uvar = 1; % "subject" is unit of observation > > cfg.ivar = 2; % "condition" is the independent variable > > stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); > > > > > The function ft_freqstatistics runs but the stats results are strange. > My stats.stat is always -inf > and stats.prob always 0 > > What might be the problem? > > > Thanks and all the best > Caroline > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Tue Nov 13 13:58:50 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 13 Nov 2012 06:58:50 -0600 Subject: [FieldTrip] fieldtrip Digest, Vol 24, Issue 16 In-Reply-To: References: Message-ID: Hi Caroline, It looks like your call is missing cfg.correctm = 'cluster'; cfg.tail = 0; Those are both options that I include when I do it; I'm not sure if not having those might be what's giving you the error message. Best, Steve Message: 2 > Date: Tue, 13 Nov 2012 08:02:22 +0000 > From: Lustenberger Caroline > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Cluster statistics > Message-ID: > <7C66D90E0C18014E85B44B560D4D5BC81488F447 at EXZH1VM.kispi.int> > Content-Type: text/plain; charset="us-ascii" > > Dear Stephen > > Thank you, It now perfectly works, but I always get this warning I'm not > sure how to handle that: > > Warning: doing a two-sided test without correcting p-values or alpha-level, > p-values and alpha-level will reflect one-sided tests per tail > > > cfg.clusteralpha = 0.05; > > cfg.alpha = 0.05; > > cfg.clustertail = 0; > > When I want to test whether my data is significant different (direction > not known, therefore two sided) with an alpha level <0.05 do I have to > adjust my level to 0.025? > > All the Best, Caroline > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Caroline.Lustenberger at kispi.uzh.ch Tue Nov 13 14:40:51 2012 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Tue, 13 Nov 2012 13:40:51 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 24, Issue 16 In-Reply-To: Message-ID: <7C66D90E0C18014E85B44B560D4D5BC81488F538@EXZH1VM.kispi.int> Dear Steve Thank you so much for your advice. My script looks now as follows: cfg = []; cfg.elec = elec; cfg.computeprob = 'yes' cfg.neighbours = neighbours; %cfg.latency = 'all'; cfg.frequency = 'all'; cfg.channel = 'all'%'all';%eleselection % see CHANNELSELECTION %cfg.avgovertime = 'no'; %cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'depsamplesT'; cfg.numrandomization = 2^6;% 2^number subjects cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.tail = 0; cfg.clustertail = 0; cfg.correcttail = 'alpha' cfg.feedback = 'gui'; cfg.parameter = 'powspctrm'; % cfg.design = [ % 1 2 3 4 1 2 3 4 % subject number % 1 1 1 1 2 2 2 2 ]; % condition number cfg.design(1,:)=[1:6,1:6] cfg.design(2,:)=[ones(1,6),ones(1,6)+1] cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable stat = ft_freqstatistics(cfg,sd, ld); Do you think this is now correct? We perform statistics on high-density EEG Power values and want to see whether differences that we see doing simple t-test also remain when we correct for multiple comparison. Again many thanks and all the best Caroline ________________________________ Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Politzer-Ahles Gesendet: Dienstag, 13. November 2012 13:59 An: fieldtrip at science.ru.nl Betreff: Re: [FieldTrip] fieldtrip Digest, Vol 24, Issue 16 Hi Caroline, It looks like your call is missing cfg.correctm = 'cluster'; cfg.tail = 0; Those are both options that I include when I do it; I'm not sure if not having those might be what's giving you the error message. Best, Steve Message: 2 Date: Tue, 13 Nov 2012 08:02:22 +0000 From: Lustenberger Caroline > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Cluster statistics Message-ID: <7C66D90E0C18014E85B44B560D4D5BC81488F447 at EXZH1VM.kispi.int> Content-Type: text/plain; charset="us-ascii" Dear Stephen Thank you, It now perfectly works, but I always get this warning I'm not sure how to handle that: Warning: doing a two-sided test without correcting p-values or alpha-level, p-values and alpha-level will reflect one-sided tests per tail cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.clustertail = 0; When I want to test whether my data is significant different (direction not known, therefore two sided) with an alpha level <0.05 do I have to adjust my level to 0.025? All the Best, Caroline -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Tue Nov 13 15:14:08 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 13 Nov 2012 08:14:08 -0600 Subject: [FieldTrip] Cluster statistics Message-ID: Hi Caroline, It looks like your call is missing cfg.correctm = 'cluster'; cfg.tail = 0; Those are both options that I include when I do it; I'm not sure if not having those might be what's giving you the error message. Best, Steve Message: 2 > Date: Tue, 13 Nov 2012 08:02:22 +0000 > From: Lustenberger Caroline > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Cluster statistics > Message-ID: > <7C66D90E0C18014E85B44B560D4D5BC81488F447 at EXZH1VM.kispi.int> > Content-Type: text/plain; charset="us-ascii" > > Dear Stephen > > Thank you, It now perfectly works, but I always get this warning I'm not > sure how to handle that: > > Warning: doing a two-sided test without correcting p-values or alpha-level, > p-values and alpha-level will reflect one-sided tests per tail > > > cfg.clusteralpha = 0.05; > > cfg.alpha = 0.05; > > cfg.clustertail = 0; > > When I want to test whether my data is significant different (direction > not known, therefore two sided) with an alpha level <0.05 do I have to > adjust my level to 0.025? > > All the Best, Caroline > > ________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at mac.com Tue Nov 13 15:49:47 2012 From: nathanweisz at mac.com (Nathan Weisz) Date: Tue, 13 Nov 2012 15:49:47 +0100 Subject: [FieldTrip] postdoc position at CIMeC MEG lab Message-ID: ERC-funded post-doc in conscious perception research Research in the Ongoing Brain Oscillations and Behaviour Lab at the Center for Mind/Brain Sciences focuses on brain activity / connectivity patterns predisposing conscious perception. Our works mostly involves MEG, intracranial EEG and combined TMS/EEG studies. https://sites.google.com/site/obobcimec/ We are currently looking for a candidate at a Postdoc level to strengthen our team. This postdoc is expected to have solid experience with at least one of the aforementioned methods and proficiency in Matlab applied to the analysis of MEG / EEG data. The Center for Mind/Brain Sciences at the University of Trento is an oustanding work-place situated in a beautiful surrounding (e.g. Dolomites, diverse lakes; see http://www.visittrentino.it/en). It offers an international and vibrant research setting with state-of-the-art neuroimaging methodologies, including a research-only MRI scanner, MEG, EEG and TMS, as well as behavioral, eye tracking and motion tracking laboratories. The University of Trento is ranked first among research universities in Italy, and the Trentino region is consistently at the top for quality of life and for the most efficient services in Italy. English is the official language of the CIMeC, where a large proportion of the faculty, post-docs and students come from a wide range of countries outside of Italy. Interested candidates are encouraged to contact me by email at nathan.weisz at unitn.it -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Tue Nov 13 16:25:19 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 13 Nov 2012 09:25:19 -0600 Subject: [FieldTrip] Cluster statistics Message-ID: Hi Caroline, That all looks good to me, as far as I can tell from a quick glance (but I've only ever tried cluster statistics on ERPs, not on time-frequency data, so there might be differences I don't know about). But 2^6 (64) seems like a very small number of randomizations. The rule of thumb I follow (based on the recommendation in the tutorial) is to use 500 the first time, and if I get some marginal or borderline results then re-do it with something like 1000 or even 5000 randomizations just to be sure. 64 randomizations might not be enough to converge on a reliable result (i.e., if you run the same test several times with only 64 randomizations, you might get different results each time, whereas if you run it several times with 1000 or more randomizations your results probably will be stable) Best, Steve > Message: 2 > Date: Tue, 13 Nov 2012 13:40:51 +0000 > From: Lustenberger Caroline > To: FieldTrip discussion list > Subject: Re: [FieldTrip] fieldtrip Digest, Vol 24, Issue 16 > Message-ID: > <7C66D90E0C18014E85B44B560D4D5BC81488F538 at EXZH1VM.kispi.int> > Content-Type: text/plain; charset="us-ascii" > > Dear Steve > > Thank you so much for your advice. My script looks now as follows: > > > cfg = []; > > cfg.elec = elec; > > cfg.computeprob = 'yes' > > cfg.neighbours = neighbours; > > %cfg.latency = 'all'; > > cfg.frequency = 'all'; > > cfg.channel = 'all'%'all';%eleselection % see CHANNELSELECTION > > %cfg.avgovertime = 'no'; > > %cfg.avgoverfreq = 'no'; > > cfg.avgoverchan = 'no'; > > cfg.statistic = 'depsamplesT'; > > cfg.numrandomization = 2^6;% 2^number subjects > > cfg.correctm = 'cluster'; > > cfg.method = 'montecarlo'; > > cfg.clusteralpha = 0.05; > > cfg.alpha = 0.05; > > cfg.tail = 0; > > cfg.clustertail = 0; > > cfg.correcttail = 'alpha' > > cfg.feedback = 'gui'; > > cfg.parameter = 'powspctrm'; > > % cfg.design = [ > > % 1 2 3 4 1 2 3 4 % subject number > > % 1 1 1 1 2 2 2 2 ]; % condition number > > cfg.design(1,:)=[1:6,1:6] > > cfg.design(2,:)=[ones(1,6),ones(1,6)+1] > > cfg.uvar = 1; % "subject" is unit of observation > > cfg.ivar = 2; > > % "condition" is the independent variable > > stat = ft_freqstatistics(cfg,sd, ld); > > > Do you think this is now correct? We perform statistics on high-density > EEG Power values and want to see whether differences that we see doing > simple t-test also remain when we correct for multiple comparison. > > Again many thanks and all the best > Caroline > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Wed Nov 14 10:35:10 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Wed, 14 Nov 2012 10:35:10 +0100 Subject: [FieldTrip] correction for movement tool Message-ID: Dear all, Do you have some tool which can correct data for the movements during MEG measurement? Our data were obtained on the CTF MEG 275 system. All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Wed Nov 14 11:07:50 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Wed, 14 Nov 2012 11:07:50 +0100 (CET) Subject: [FieldTrip] correction for movement tool In-Reply-To: Message-ID: <1692488181.1258768.1352887670587.JavaMail.root@sculptor.zimbra.ru.nl> Hi Nenad, There are a few (online and offline) tools implemented in FieldTrip to deal with head movements in MEG. For instance, have a look here: http://fieldtrip.fcdonders.nl/example/how_to_incorporate_head_movements_in_meg_analysis ft_regressconfound is particularly useful for removing trial-by-trial variance from the data that can be explained by head movements. We found it to have a significant impact on statistical sensitivity. At our institute, we use a real-time head localizer to reposition the subject between and within sessions (prevent/minimalize different head positions ) . http://fieldtrip.fcdonders.nl/faq/how_can_i_monitor_a_subject_s_head_position_during_a_meg_session Currently, it is implemented only  for CTF systems (with the continous head localization upgrade) but we are working on extending its implementation to other systems.    Yours, Arjen ----- Oorspronkelijk bericht ----- > Van: "Nenad Polomac" > Aan: fieldtrip at science.ru.nl > Verzonden: Woensdag 14 november 2012 10:35:10 > Onderwerp: [FieldTrip] correction for movement tool > Dear all, > Do you have some tool which can correct data for the movements during > MEG measurement? Our data were obtained on the CTF MEG 275 system. > All the best! > Nenad > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcgoiv0 at wfu.edu Wed Nov 14 14:31:15 2012 From: mcgoiv0 at wfu.edu (McGowin, Inna) Date: Wed, 14 Nov 2012 08:31:15 -0500 Subject: [FieldTrip] correction for movement tool In-Reply-To: <1692488181.1258768.1352887670587.JavaMail.root@sculptor.zimbra.ru.nl> References: <1692488181.1258768.1352887670587.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Hello Arjen, Thanks for the links on the head motion correction. Could you please point a source or a reference on which the FieldTrip head motion correction method is based? Is it expansion of magnetic scalar potential in spherical harmonics or some other method? How accurate is the correction and what are the limitations for its application; in other words does it correct for motion up to 3 cm or beyond? What is the minimum motion that does not need to be corrected, for example we allow 5 mm? Thanks, Inna On Wed, Nov 14, 2012 at 5:07 AM, Stolk, A. wrote: > Hi Nenad, > > > > There are a few (online and offline) tools implemented in FieldTrip to > deal with head movements in MEG. > > > > For instance, have a look here: > > > http://fieldtrip.fcdonders.nl/example/how_to_incorporate_head_movements_in_meg_analysis > > > > ft_regressconfound is particularly useful for removing trial-by-trial > variance from the data that can be explained by head movements. We found it > to have a significant impact on statistical sensitivity. > > > > At our institute, we use a real-time head localizer to reposition the > subject between and within sessions (prevent/minimalize different head > positions). > > > > > http://fieldtrip.fcdonders.nl/faq/how_can_i_monitor_a_subject_s_head_position_during_a_meg_session > > > Currently, it is implemented only for CTF systems (with the continous head > localization upgrade) but we are working on extending its implementation to > other systems. > > > > Yours, > > Arjen > > ------------------------------ > > *Van: *"Nenad Polomac" > *Aan: *fieldtrip at science.ru.nl > *Verzonden: *Woensdag 14 november 2012 10:35:10 > *Onderwerp: *[FieldTrip] correction for movement tool > > > Dear all, > > Do you have some tool which can correct data for the movements during MEG > measurement? Our data were obtained on the CTF MEG 275 system. > > All the best! > > Nenad > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Inna McGowin -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Wed Nov 14 15:57:26 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Wed, 14 Nov 2012 15:57:26 +0100 (CET) Subject: [FieldTrip] correction for movement tool In-Reply-To: Message-ID: <227289624.1267900.1352905046647.JavaMail.root@sculptor.zimbra.ru.nl> Hi Inna, You're welcome. The offline compensation method suggested (ft_regressconfound) is based on general linear modeling, and not on the  signal space separation method (Taulu et al., 2005, MaxFilter, Neuromag - not implemented in FieldTrip) you are referring to. Head movements blur the topography of the neuronal sources of the MEG signal, increase localization errors, and reduce statistical sensitivity. This GLM-based method is geared to improve statistical sensitivity rather than t opographical blurring and localization bias.  More specifically, it does not interpolate/extrapolate the magnetic field distribution measured by the sensor array to a magnetic field distribution that would have been measured had the sensors been at a desired location. Instead, it removes head movement related trial-by-trial variance from the data, by incorporating head position time-series into a general linear model.   A recently performed study (*) showed that this method improves statictical sensitivity without changing the pattern of activity. This is useful when you're testing an hypothesis, derived from a cognitive research question, because it reduces the risk of false negatives. With respect to your question; in case you are particularly interested in reducing  localization bias, I could recommend you to have a look at Uutela et al., NeuroImage, 2001. The forward calculation correction method suggested there incorporates head position information into the source reconstruction procedure. This method is implemented as ft_headmovement in FieldTrip. I cannot give you any numbers except from the ones reported there, but for all offline methods it holds that you need to be able to  measure the magnetic field distribution in order to know (and interpolate)   it. Hope this answered your question a bit. Feel free to ask more details. Yours, arjen (*) Stolk, Todorovic, Schoffelen & Oostenveld. Online and offline tools for head movement compensation in MEG. NeuroImage, accepted pending revisions. ----- Oorspronkelijk bericht ----- > Van: "Inna McGowin" > Aan: "FieldTrip discussion list" > Verzonden: Woensdag 14 november 2012 14:31:15 > Onderwerp: Re: [FieldTrip] correction for movement tool > Hello Arjen, > Thanks for the links on the head motion correction. > Could you please point a source or a reference on which the FieldTrip > head motion correction method is based? Is it expansion of magnetic > scalar potential in spherical harmonics or some other method? How > accurate is the correction and what are the limitations for its > application; in other words does it correct for motion up to 3 cm or > beyond? > What is the minimum motion that does not need to be corrected, for > example we allow 5 mm? > Thanks, > Inna > On Wed, Nov 14, 2012 at 5:07 AM, Stolk, A. < a.stolk at fcdonders.ru.nl > > wrote: > > Hi Nenad, > >   > > There are a few (online and offline) tools implemented in FieldTrip > > to > > deal with head movements in MEG. > >   > > For instance, have a look here: > > http://fieldtrip.fcdonders.nl/example/how_to_incorporate_head_movements_in_meg_analysis > >   > > ft_regressconfound is particularly useful for removing > > trial-by-trial > > variance from the data that can be explained by head movements. We > > found it to have a significant impact on statistical sensitivity. > >   > > At our institute, we use a real-time head localizer to reposition > > the > > subject between and within sessions (prevent/minimalize different > > head > > positions). > >   > > http://fieldtrip.fcdonders.nl/faq/how_can_i_monitor_a_subject_s_head_position_during_a_meg_session > > Currently, it is implemented only for CTF systems (with the > > continous > > head localization upgrade) but we are working on extending > > its implementation to other systems.   > >   > > Yours, > > Arjen > > > Van: "Nenad Polomac" < polomacnenad at gmail.com > > > > Aan: fieldtrip at science.ru.nl > > > Verzonden: Woensdag 14 november 2012 10:35:10 > > > Onderwerp: [FieldTrip] correction for movement tool > > > Dear all, > > > Do you have some tool which can correct data for the movements > > > during > > > MEG measurement? Our data were obtained on the CTF MEG 275 system. > > > All the best! > > > Nenad > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- > Inna McGowin > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrick.jung at esi-frankfurt.de Wed Nov 14 18:24:32 2012 From: patrick.jung at esi-frankfurt.de (Jung, Patrick) Date: Wed, 14 Nov 2012 17:24:32 +0000 Subject: [FieldTrip] ICA decomposition & backprojection Message-ID: <36E953F5321EB743AC6B338995A56D63250662@UM-EXCDAG-A01.um.gwdg.de> Dear Fieldtrippers, if I do ICA in my preprocessing to reject EOG and ECG signals, the new MEG guidelines say that this might alter later source reconstruction and connectivity analyses (which I aim to do). So, worried about this, I wonder if applying ft_rejectcomponent on my raw dataset 1.) automatically modifies the leadfield matrix? 2.) the unmixing (and mixing?) matrix is saved in the new data structure somewhere (to evtl make use of it at later analysis steps)? 3.) automatically stores the information how many and what ICA components were subtracted from the data in my new data structure. Would you generally discourage to apply ICA in the preprocessing when planning source reconstruction and connectivity analysis? It's a complicated topic for me as a clinician so I hope there is no mixing in my questions ;-) Many thanks for your answers, Patrick -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Wed Nov 14 18:32:19 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Wed, 14 Nov 2012 17:32:19 +0000 Subject: [FieldTrip] error when converting from spm to ft Message-ID: Hello FT-ers In the past i had no problem when converting my data from SPM (where i do preprocessing and averaging) to FT (where I do my cluster-stats and plotting) Currently, I am using the new way to convert (previous version seems outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in the right format, ie: not freq data. But i know that it is...any advice would be much appreciated! Not to mention is warns me my data is not epoched when it is indeed so... Thank you! zita ********************* *>> D = spm_eeg_load* SPM M/EEG data object Type: evoked Transform: TF 8 conditions 326 channels 20 frequencies 501 samples/trial 8 trials Sampling frequency: 250 Hz Loaded from file C:\Users\Eva Z Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat Use the syntax D(channels, frequencies, samples, trials) to access the data Type "methods('meeg')" for the list of methods performing other operations with the object Type "help meeg/method_name" to get help about methods *>> data = spm2ft(D)* mapping condition label "11" to condition code 1 mapping condition label "12" to condition code 2 mapping condition label "21" to condition code 3 mapping condition label "22" to condition code 4 mapping condition label "31" to condition code 5 mapping condition label "32" to condition code 6 mapping condition label "41" to condition code 7 mapping condition label "42" to condition code 8 data = fsample: 250.0000 label: {326x1 cell} time: {1x8 cell} trial: {1x8 cell} trialinfo: [8x1 double] cfg: [1x1 struct] *>> data2 = ft_checkdata(data, 'datatype', 'freq')* Warning: the data does not contain a trial definition, assuming that the trials are consecutive segments of a continuous recording > In utilities\private\warning_once at 81 In utilities\private\fixsampleinfo at 54 In ft_datatype_raw at 91 In ft_checkdata at 170 Error using ft_checkdata (line 288) This function requires freq data as input. -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Wed Nov 14 19:33:51 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Wed, 14 Nov 2012 19:33:51 +0100 Subject: [FieldTrip] correction for movement tool Message-ID: Hello Arjen, Thank you very much for your suggestion. I think it will work in my data. Only thing that concerns me in this tutorial is when in the analysis pipeline I should perform this circumcenter calculation? Because if I do that e.g. before artifact rejection, I will have different numbers of trials in timelock and confound structures. Since in timelock I already removed some trials due to jumps or muscle artifacts. So what is your suggestion for this? Thank you in advance! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Thu Nov 15 08:59:24 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Thu, 15 Nov 2012 08:59:24 +0100 (CET) Subject: [FieldTrip] correction for movement tool In-Reply-To: Message-ID: <1672820011.1274993.1352966364516.JavaMail.root@sculptor.zimbra.ru.nl> Hi Nenad, Thanks for your question . These details need to be added to the wiki.  First; ft_regressconfound can be applied to timelock, freq, and source data. The estimation of  regression coefficients (beta weights of the head position data)  is performed separately for each channel and each latency, in the case of timelock data. Consequently, after compensation, the sensor level data cannot be used anymore for source modeling. To employ the GLM based compensation on the source level, single trial estimates for the cortical locations of interest have to be made from the original sensor level data, preferably using a common spatial filter based on all trials. The beta weights are subsequently estimated for each cortical location and the variance in source amplitude over trials that is explained by the head movement is removed. We therefore recommend to use ft_regressconfound as a final step prior to ft_XXXstatistics . This is indeed in contrast to the ft_rejectXXX functions. Furthermore, make sure you select the same trials in the headposition data as you have selected in your MEG data since you are going to fit the two of them . Second, circumcenter.m (on the wiki) is a helper function that calculates one position and orientation of the head. This saves some degrees of freedom (df=6) as compared to taking into account the x,y,z-coordinates of each coil separately (n=3) as regressors (df=9). When you want to also use the squares, cubes, and derivatives as regressors, this can save quite a bit of degrees. The 'circumcenter' is the geometrical center of the three coils. Hope this answered your questions. Best regards, Arjen ----- Oorspronkelijk bericht ----- > Van: "Nenad Polomac" > Aan: fieldtrip at science.ru.nl > Verzonden: Woensdag 14 november 2012 19:33:51 > Onderwerp: Re: [FieldTrip] correction for movement tool > Hello Arjen, > Thank you very much for your suggestion. I think it will work in my > data. Only thing that concerns me in this tutorial  is when in the > analysis pipeline I should perform this circumcenter calculation? > Because if I do that e.g. before artifact rejection, I will have > different numbers of trials in timelock and confound structures. Since > in timelock I already removed some trials due to jumps or muscle > artifacts. > So what is your suggestion for this? > Thank you in advance! > Nenad > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Thu Nov 15 09:58:35 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Thu, 15 Nov 2012 09:58:35 +0100 Subject: [FieldTrip] correction for movement tool Message-ID: Dear Arjen, Thank you very much for the detailed clarification! This helped a lot! :) All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Nov 15 15:55:05 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 15 Nov 2012 15:55:05 +0100 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: References: Message-ID: <50A50249.3010303@donders.ru.nl> Dear Zita, The function seems to convert the function not correctly to a freq datastructure - it seems more like raw data to me. freq data requires a .powspctrm field, which should be a matrix of observations x channels x freq x time. So you would need to use cell2mat on your .trial field. Probably you need to permute the dimensions to match this order. Additionally, you will need a .dimord field which which should be 'rpt_chan_freq_time' and you need a .freq field that contains the frequencies in that matrix. Please first make sure that your trials actually have 3 dimensions, else something else in the conversion went wrong. I don't use SPM so no clue if there is a better way than doing it manually. Best, Jörn On 11/14/2012 6:32 PM, Zita Eva Patai wrote: > Hello FT-ers > > In the past i had no problem when converting my data from SPM (where i > do preprocessing and averaging) to FT (where I do my cluster-stats and > plotting) > > Currently, I am using the new way to convert (previous version seems > outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not > in the right format, ie: not freq data. But i know that it is...any > advice would be much appreciated! Not to mention is warns me my data > is not epoched when it is indeed so... > > Thank you! > zita > > ********************* > *>> D = spm_eeg_load* > SPM M/EEG data object > Type: evoked > Transform: TF > 8 conditions > 326 channels > 20 frequencies > 501 samples/trial > 8 trials > Sampling frequency: 250 Hz > Loaded from file C:\Users\Eva Z > Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat > > Use the syntax D(channels, frequencies, samples, trials) to access the > data > Type "methods('meeg')" for the list of methods performing other > operations with the object > Type "help meeg/method_name" to get help about methods > > *>> data = spm2ft(D)* > > mapping condition label "11" to condition code 1 > mapping condition label "12" to condition code 2 > mapping condition label "21" to condition code 3 > mapping condition label "22" to condition code 4 > mapping condition label "31" to condition code 5 > mapping condition label "32" to condition code 6 > mapping condition label "41" to condition code 7 > mapping condition label "42" to condition code 8 > > data = > > fsample: 250.0000 > label: {326x1 cell} > time: {1x8 cell} > trial: {1x8 cell} > trialinfo: [8x1 double] > cfg: [1x1 struct] > > > *>> data2 = ft_checkdata(data, 'datatype', 'freq')* > Warning: the data does not contain a trial definition, assuming that > the trials are consecutive segments of a continuous recording > > In utilities\private\warning_once at 81 > In utilities\private\fixsampleinfo at 54 > In ft_datatype_raw at 91 > In ft_checkdata at 170 > Error using ft_checkdata (line 288) > This function requires freq data as input. > > > -- > > Zita Patai > DPhil, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.brovelli at univ-amu.fr Thu Nov 15 17:28:46 2012 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Thu, 15 Nov 2012 17:28:46 +0100 Subject: [FieldTrip] DICS: fixed orientation of sources option Message-ID: <20121115172846.14247fxr0mnn198g@wmelperso1.univmed.fr> Dear all, I have a question regarding the option "fixedori" of DICS (the code from lines 292 to 306 in beamformer_dics.m). If I get it right, you implemented the situation when the first singular value lambda1 is much greater that the second singular value lambda2 of Cs (Cs is given by eq. 4 of Gross et al., 2001, PNAS). I checked in my data and this is not the case. Maybe my data is just a very special case, but I find that the first is a little larger that the second. Here they are: lambda1 = 0.5380; lambda2 = 0.2921; lambda3 = 0.0000; After eq. 9 in Gross (2001), it says that if lambda1 >> lambda2 does not hold, the trace of Cs should be used instead. So, has it been implemented in Fieldtrip somewhere ? And, if not, would you know how to do it ? Thanks a lot bye Andrea From eva.patai at psy.ox.ac.uk Thu Nov 15 17:29:34 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Thu, 15 Nov 2012 16:29:34 +0000 Subject: [FieldTrip] converting from som to ft Message-ID: Hello FT-ers In the past i had no problem when converting my data from SPM (where i do preprocessing and averaging) to FT (where I do my cluster-stats and plotting) Currently, I am using the new way to convert (previous version seems outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in the right format, ie: not freq data. But i know that it is...any advice would be much appreciated! Not to mention is warns me my data is not epoched when it is indeed so... Thank you! zita ********************* *>> D = spm_eeg_load* SPM M/EEG data object Type: evoked Transform: TF 8 conditions 326 channels 20 frequencies 501 samples/trial 8 trials Sampling frequency: 250 Hz Loaded from file C:\Users\Eva Z Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat Use the syntax D(channels, frequencies, samples, trials) to access the data Type "methods('meeg')" for the list of methods performing other operations with the object Type "help meeg/method_name" to get help about methods *>> data = spm2ft(D)* mapping condition label "11" to condition code 1 mapping condition label "12" to condition code 2 mapping condition label "21" to condition code 3 mapping condition label "22" to condition code 4 mapping condition label "31" to condition code 5 mapping condition label "32" to condition code 6 mapping condition label "41" to condition code 7 mapping condition label "42" to condition code 8 data = fsample: 250.0000 label: {326x1 cell} time: {1x8 cell} trial: {1x8 cell} trialinfo: [8x1 double] cfg: [1x1 struct] *>> data2 = ft_checkdata(data, 'datatype', 'freq')* Warning: the data does not contain a trial definition, assuming that the trials are consecutive segments of a continuous recording > In utilities\private\warning_once at 81 In utilities\private\fixsampleinfo at 54 In ft_datatype_raw at 91 In ft_checkdata at 170 Error using ft_checkdata (line 288) This function requires freq data as input. -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Thu Nov 15 17:37:54 2012 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 15 Nov 2012 16:37:54 +0000 Subject: [FieldTrip] converting from som to ft In-Reply-To: References: Message-ID: Dear Zita, You do: freq = D.fttimelock in SPM. The fieldtrip function does not support TF data. Best, Vladimir On Thu, Nov 15, 2012 at 4:29 PM, Zita Eva Patai wrote: > Hello FT-ers > > In the past i had no problem when converting my data from SPM (where i do > preprocessing and averaging) to FT (where I do my cluster-stats and > plotting) > > Currently, I am using the new way to convert (previous version seems > outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in > the right format, ie: not freq data. But i know that it is...any advice > would be much appreciated! Not to mention is warns me my data is not > epoched when it is indeed so... > > Thank you! > zita > > ********************* > *>> D = spm_eeg_load* > SPM M/EEG data object > Type: evoked > Transform: TF > 8 conditions > 326 channels > 20 frequencies > 501 samples/trial > 8 trials > Sampling frequency: 250 Hz > Loaded from file C:\Users\Eva Z > Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat > > Use the syntax D(channels, frequencies, samples, trials) to access the data > Type "methods('meeg')" for the list of methods performing other operations > with the object > Type "help meeg/method_name" to get help about methods > > *>> data = spm2ft(D)* > > mapping condition label "11" to condition code 1 > mapping condition label "12" to condition code 2 > mapping condition label "21" to condition code 3 > mapping condition label "22" to condition code 4 > mapping condition label "31" to condition code 5 > mapping condition label "32" to condition code 6 > mapping condition label "41" to condition code 7 > mapping condition label "42" to condition code 8 > > data = > > fsample: 250.0000 > label: {326x1 cell} > time: {1x8 cell} > trial: {1x8 cell} > trialinfo: [8x1 double] > cfg: [1x1 struct] > > > *>> data2 = ft_checkdata(data, 'datatype', 'freq')* > > Warning: the data does not contain a trial definition, assuming that the > trials are consecutive segments of a continuous recording > > In utilities\private\warning_once at 81 > In utilities\private\fixsampleinfo at 54 > In ft_datatype_raw at 91 > In ft_checkdata at 170 > Error using ft_checkdata (line 288) > This function requires freq data as input. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Thu Nov 15 18:03:58 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Thu, 15 Nov 2012 17:03:58 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: <50A50249.3010303@donders.ru.nl> References: <50A50249.3010303@donders.ru.nl> Message-ID: Dear Jörn, Thank you for the quick reply. I will try your suggestion! Many thanks, z On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Zita, > > The function seems to convert the function not correctly to a freq > datastructure - it seems more like raw data to me. > > freq data requires a .powspctrm field, which should be a matrix of > observations x channels x freq x time. So you would need to use cell2mat on > your .trial field. Probably you need to permute the dimensions to match > this order. Additionally, you will need a .dimord field which which should > be 'rpt_chan_freq_time' and you need a .freq field that contains the > frequencies in that matrix. Please first make sure that your trials > actually have 3 dimensions, else something else in the conversion went > wrong. > > I don't use SPM so no clue if there is a better way than doing it manually. > > Best, > Jörn > > > On 11/14/2012 6:32 PM, Zita Eva Patai wrote: > > Hello FT-ers > > In the past i had no problem when converting my data from SPM (where i > do preprocessing and averaging) to FT (where I do my cluster-stats and > plotting) > > Currently, I am using the new way to convert (previous version seems > outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in > the right format, ie: not freq data. But i know that it is...any advice > would be much appreciated! Not to mention is warns me my data is not > epoched when it is indeed so... > > Thank you! > zita > > ********************* > *>> D = spm_eeg_load* > SPM M/EEG data object > Type: evoked > Transform: TF > 8 conditions > 326 channels > 20 frequencies > 501 samples/trial > 8 trials > Sampling frequency: 250 Hz > Loaded from file C:\Users\Eva Z > Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat > > Use the syntax D(channels, frequencies, samples, trials) to access the > data > Type "methods('meeg')" for the list of methods performing other operations > with the object > Type "help meeg/method_name" to get help about methods > > *>> data = spm2ft(D)* > > mapping condition label "11" to condition code 1 > mapping condition label "12" to condition code 2 > mapping condition label "21" to condition code 3 > mapping condition label "22" to condition code 4 > mapping condition label "31" to condition code 5 > mapping condition label "32" to condition code 6 > mapping condition label "41" to condition code 7 > mapping condition label "42" to condition code 8 > > data = > > fsample: 250.0000 > label: {326x1 cell} > time: {1x8 cell} > trial: {1x8 cell} > trialinfo: [8x1 double] > cfg: [1x1 struct] > > > *>> data2 = ft_checkdata(data, 'datatype', 'freq')* > > Warning: the data does not contain a trial definition, assuming that the > trials are consecutive segments of a continuous recording > > In utilities\private\warning_once at 81 > In utilities\private\fixsampleinfo at 54 > In ft_datatype_raw at 91 > In ft_checkdata at 170 > Error using ft_checkdata (line 288) > This function requires freq data as input. > > > -- > > Zita Patai > DPhil, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Thu Nov 15 18:19:32 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Thu, 15 Nov 2012 17:19:32 +0000 Subject: [FieldTrip] converting from som to ft In-Reply-To: References: Message-ID: Thanks Vladimir! (but does this mean I cannot convert my TF data at all, or i have to do this as a 'loophole' alternative...and then i get my TF data into the right format?) On Thu, Nov 15, 2012 at 4:37 PM, Vladimir Litvak wrote: > Dear Zita, > > You do: > > freq = D.fttimelock > > in SPM. The fieldtrip function does not support TF data. > > Best, > > Vladimir > > > On Thu, Nov 15, 2012 at 4:29 PM, Zita Eva Patai wrote: > >> Hello FT-ers >> >> In the past i had no problem when converting my data from SPM (where i do >> preprocessing and averaging) to FT (where I do my cluster-stats and >> plotting) >> >> Currently, I am using the new way to convert (previous version seems >> outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in >> the right format, ie: not freq data. But i know that it is...any advice >> would be much appreciated! Not to mention is warns me my data is not >> epoched when it is indeed so... >> >> Thank you! >> zita >> >> ********************* >> *>> D = spm_eeg_load* >> SPM M/EEG data object >> Type: evoked >> Transform: TF >> 8 conditions >> 326 channels >> 20 frequencies >> 501 samples/trial >> 8 trials >> Sampling frequency: 250 Hz >> Loaded from file C:\Users\Eva Z >> Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat >> >> Use the syntax D(channels, frequencies, samples, trials) to access the >> data >> Type "methods('meeg')" for the list of methods performing other >> operations with the object >> Type "help meeg/method_name" to get help about methods >> >> *>> data = spm2ft(D)* >> >> mapping condition label "11" to condition code 1 >> mapping condition label "12" to condition code 2 >> mapping condition label "21" to condition code 3 >> mapping condition label "22" to condition code 4 >> mapping condition label "31" to condition code 5 >> mapping condition label "32" to condition code 6 >> mapping condition label "41" to condition code 7 >> mapping condition label "42" to condition code 8 >> >> data = >> >> fsample: 250.0000 >> label: {326x1 cell} >> time: {1x8 cell} >> trial: {1x8 cell} >> trialinfo: [8x1 double] >> cfg: [1x1 struct] >> >> >> *>> data2 = ft_checkdata(data, 'datatype', 'freq')* >> >> Warning: the data does not contain a trial definition, assuming that the >> trials are consecutive segments of a continuous recording >> > In utilities\private\warning_once at 81 >> In utilities\private\fixsampleinfo at 54 >> In ft_datatype_raw at 91 >> In ft_checkdata at 170 >> Error using ft_checkdata (line 288) >> This function requires freq data as input. >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Thu Nov 15 18:53:59 2012 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 15 Nov 2012 17:53:59 +0000 Subject: [FieldTrip] converting from som to ft In-Reply-To: References: Message-ID: I don't see what you mean. This is the intended functionality that supports TF data and produces the right format. Vladimir On 11/15/12, Zita Eva Patai wrote: > Thanks Vladimir! > (but does this mean I cannot convert my TF data at all, or i have to do > this as a 'loophole' alternative...and then i get my TF data into the right > format?) > > On Thu, Nov 15, 2012 at 4:37 PM, Vladimir Litvak > wrote: > >> Dear Zita, >> >> You do: >> >> freq = D.fttimelock >> >> in SPM. The fieldtrip function does not support TF data. >> >> Best, >> >> Vladimir >> >> >> On Thu, Nov 15, 2012 at 4:29 PM, Zita Eva Patai >> wrote: >> >>> Hello FT-ers >>> >>> In the past i had no problem when converting my data from SPM (where i >>> do >>> preprocessing and averaging) to FT (where I do my cluster-stats and >>> plotting) >>> >>> Currently, I am using the new way to convert (previous version seems >>> outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not >>> in >>> the right format, ie: not freq data. But i know that it is...any advice >>> would be much appreciated! Not to mention is warns me my data is not >>> epoched when it is indeed so... >>> >>> Thank you! >>> zita >>> >>> ********************* >>> *>> D = spm_eeg_load* >>> SPM M/EEG data object >>> Type: evoked >>> Transform: TF >>> 8 conditions >>> 326 channels >>> 20 frequencies >>> 501 samples/trial >>> 8 trials >>> Sampling frequency: 250 Hz >>> Loaded from file C:\Users\Eva Z >>> Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat >>> >>> Use the syntax D(channels, frequencies, samples, trials) to access the >>> data >>> Type "methods('meeg')" for the list of methods performing other >>> operations with the object >>> Type "help meeg/method_name" to get help about methods >>> >>> *>> data = spm2ft(D)* >>> >>> mapping condition label "11" to condition code 1 >>> mapping condition label "12" to condition code 2 >>> mapping condition label "21" to condition code 3 >>> mapping condition label "22" to condition code 4 >>> mapping condition label "31" to condition code 5 >>> mapping condition label "32" to condition code 6 >>> mapping condition label "41" to condition code 7 >>> mapping condition label "42" to condition code 8 >>> >>> data = >>> >>> fsample: 250.0000 >>> label: {326x1 cell} >>> time: {1x8 cell} >>> trial: {1x8 cell} >>> trialinfo: [8x1 double] >>> cfg: [1x1 struct] >>> >>> >>> *>> data2 = ft_checkdata(data, 'datatype', 'freq')* >>> >>> Warning: the data does not contain a trial definition, assuming that the >>> trials are consecutive segments of a continuous recording >>> > In utilities\private\warning_once at 81 >>> In utilities\private\fixsampleinfo at 54 >>> In ft_datatype_raw at 91 >>> In ft_checkdata at 170 >>> Error using ft_checkdata (line 288) >>> This function requires freq data as input. >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > > Zita Patai > DPhil, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > From eva.patai at psy.ox.ac.uk Thu Nov 15 19:18:35 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Thu, 15 Nov 2012 18:18:35 +0000 Subject: [FieldTrip] converting from som to ft In-Reply-To: References: Message-ID: Right, got it. Thank you again! On Thu, Nov 15, 2012 at 5:53 PM, Vladimir Litvak wrote: > I don't see what you mean. This is the intended functionality that > supports TF data and produces the right format. > > Vladimir > > On 11/15/12, Zita Eva Patai wrote: > > Thanks Vladimir! > > (but does this mean I cannot convert my TF data at all, or i have to do > > this as a 'loophole' alternative...and then i get my TF data into the > right > > format?) > > > > On Thu, Nov 15, 2012 at 4:37 PM, Vladimir Litvak > > wrote: > > > >> Dear Zita, > >> > >> You do: > >> > >> freq = D.fttimelock > >> > >> in SPM. The fieldtrip function does not support TF data. > >> > >> Best, > >> > >> Vladimir > >> > >> > >> On Thu, Nov 15, 2012 at 4:29 PM, Zita Eva Patai > >> wrote: > >> > >>> Hello FT-ers > >>> > >>> In the past i had no problem when converting my data from SPM (where i > >>> do > >>> preprocessing and averaging) to FT (where I do my cluster-stats and > >>> plotting) > >>> > >>> Currently, I am using the new way to convert (previous version seems > >>> outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not > >>> in > >>> the right format, ie: not freq data. But i know that it is...any advice > >>> would be much appreciated! Not to mention is warns me my data is not > >>> epoched when it is indeed so... > >>> > >>> Thank you! > >>> zita > >>> > >>> ********************* > >>> *>> D = spm_eeg_load* > >>> SPM M/EEG data object > >>> Type: evoked > >>> Transform: TF > >>> 8 conditions > >>> 326 channels > >>> 20 frequencies > >>> 501 samples/trial > >>> 8 trials > >>> Sampling frequency: 250 Hz > >>> Loaded from file C:\Users\Eva Z > >>> Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat > >>> > >>> Use the syntax D(channels, frequencies, samples, trials) to access the > >>> data > >>> Type "methods('meeg')" for the list of methods performing other > >>> operations with the object > >>> Type "help meeg/method_name" to get help about methods > >>> > >>> *>> data = spm2ft(D)* > >>> > >>> mapping condition label "11" to condition code 1 > >>> mapping condition label "12" to condition code 2 > >>> mapping condition label "21" to condition code 3 > >>> mapping condition label "22" to condition code 4 > >>> mapping condition label "31" to condition code 5 > >>> mapping condition label "32" to condition code 6 > >>> mapping condition label "41" to condition code 7 > >>> mapping condition label "42" to condition code 8 > >>> > >>> data = > >>> > >>> fsample: 250.0000 > >>> label: {326x1 cell} > >>> time: {1x8 cell} > >>> trial: {1x8 cell} > >>> trialinfo: [8x1 double] > >>> cfg: [1x1 struct] > >>> > >>> > >>> *>> data2 = ft_checkdata(data, 'datatype', 'freq')* > >>> > >>> Warning: the data does not contain a trial definition, assuming that > the > >>> trials are consecutive segments of a continuous recording > >>> > In utilities\private\warning_once at 81 > >>> In utilities\private\fixsampleinfo at 54 > >>> In ft_datatype_raw at 91 > >>> In ft_checkdata at 170 > >>> Error using ft_checkdata (line 288) > >>> This function requires freq data as input. > >>> > >>> > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> fieldtrip at donders.ru.nl > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >>> > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > > > > > > > > -- > > > > Zita Patai > > DPhil, Experimental Psychology > > University of Oxford > > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Duncan.Astle at mrc-cbu.cam.ac.uk Thu Nov 15 19:24:39 2012 From: Duncan.Astle at mrc-cbu.cam.ac.uk (Duncan Astle) Date: Thu, 15 Nov 2012 18:24:39 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: References: <50A50249.3010303@donders.ru.nl> Message-ID: Word up Zita, Try this(replacing the filename for the file you want): D1 = spm_eeg_load('/imaging/as05/EEG data/Load3Easy_TF/wmrtf_efMMspm8_raw_0001'); l3e1=D1.fttimelock; l3e1.dimord='chan_freq_time'; l3e1.powspctrm = squeeze(D1.fttimelock.powspctrm); Extra tip: you first need to separate your conditions such that you have an SPM file for each subject for each condition........ Let me know how you get on, D. ________________________________________________ Dr. Duncan Astle, Programme Leader Track, British Academy Research Fellow, MRC Cognition and Brain Sciences Unit, Chaucer Road, Cambridge. Duncan.Astle at mrc-cbu.cam.ac.uk From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Zita Eva Patai Sent: 15 November 2012 17:04 To: FieldTrip discussion list Subject: Re: [FieldTrip] error when converting from spm to ft Dear Jörn, Thank you for the quick reply. I will try your suggestion! Many thanks, z On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" > wrote: Dear Zita, The function seems to convert the function not correctly to a freq datastructure - it seems more like raw data to me. freq data requires a .powspctrm field, which should be a matrix of observations x channels x freq x time. So you would need to use cell2mat on your .trial field. Probably you need to permute the dimensions to match this order. Additionally, you will need a .dimord field which which should be 'rpt_chan_freq_time' and you need a .freq field that contains the frequencies in that matrix. Please first make sure that your trials actually have 3 dimensions, else something else in the conversion went wrong. I don't use SPM so no clue if there is a better way than doing it manually. Best, Jörn On 11/14/2012 6:32 PM, Zita Eva Patai wrote: Hello FT-ers In the past i had no problem when converting my data from SPM (where i do preprocessing and averaging) to FT (where I do my cluster-stats and plotting) Currently, I am using the new way to convert (previous version seems outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in the right format, ie: not freq data. But i know that it is...any advice would be much appreciated! Not to mention is warns me my data is not epoched when it is indeed so... Thank you! zita ********************* >> D = spm_eeg_load SPM M/EEG data object Type: evoked Transform: TF 8 conditions 326 channels 20 frequencies 501 samples/trial 8 trials Sampling frequency: 250 Hz Loaded from file C:\Users\Eva Z Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat Use the syntax D(channels, frequencies, samples, trials) to access the data Type "methods('meeg')" for the list of methods performing other operations with the object Type "help meeg/method_name" to get help about methods >> data = spm2ft(D) mapping condition label "11" to condition code 1 mapping condition label "12" to condition code 2 mapping condition label "21" to condition code 3 mapping condition label "22" to condition code 4 mapping condition label "31" to condition code 5 mapping condition label "32" to condition code 6 mapping condition label "41" to condition code 7 mapping condition label "42" to condition code 8 data = fsample: 250.0000 label: {326x1 cell} time: {1x8 cell} trial: {1x8 cell} trialinfo: [8x1 double] cfg: [1x1 struct] >> data2 = ft_checkdata(data, 'datatype', 'freq') Warning: the data does not contain a trial definition, assuming that the trials are consecutive segments of a continuous recording > In utilities\private\warning_once at 81 In utilities\private\fixsampleinfo at 54 In ft_datatype_raw at 91 In ft_checkdata at 170 Error using ft_checkdata (line 288) This function requires freq data as input. -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Thu Nov 15 19:57:21 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Thu, 15 Nov 2012 18:57:21 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: References: <50A50249.3010303@donders.ru.nl> Message-ID: awesome! thank you Duncan:) Thanks everyone for all the suggestions!! On Thu, Nov 15, 2012 at 6:24 PM, Duncan Astle < Duncan.Astle at mrc-cbu.cam.ac.uk> wrote: > Word up Zita,**** > > ** ** > > Try this(replacing the filename for the file you want): **** > > ** ** > > D1 = spm_eeg_load('/imaging/as05/EEG > data/Load3Easy_TF/wmrtf_efMMspm8_raw_0001');**** > > l3e1=D1.fttimelock;**** > > l3e1.dimord='chan_freq_time';**** > > l3e1.powspctrm = squeeze(D1.fttimelock.powspctrm);**** > > ** ** > > Extra tip: you first need to separate your conditions such that you have > an SPM file for each subject for each condition……..**** > > ** ** > > Let me know how you get on,**** > > D.**** > > ________________________________________________**** > > Dr. Duncan Astle,**** > > Programme Leader Track,**** > > British Academy Research Fellow,**** > > MRC Cognition and Brain Sciences Unit,**** > > Chaucer Road,**** > > Cambridge.**** > > Duncan.Astle at mrc-cbu.cam.ac.uk**** > > ** ** > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Zita Eva Patai > *Sent:* 15 November 2012 17:04 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] error when converting from spm to ft**** > > ** ** > > Dear Jörn,**** > > ** ** > > Thank you for the quick reply. I will try your suggestion!**** > > ** ** > > Many thanks,**** > > z**** > > On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" < > jm.horschig at donders.ru.nl> wrote:**** > > Dear Zita, > > The function seems to convert the function not correctly to a freq > datastructure - it seems more like raw data to me. > > freq data requires a .powspctrm field, which should be a matrix of > observations x channels x freq x time. So you would need to use cell2mat on > your .trial field. Probably you need to permute the dimensions to match > this order. Additionally, you will need a .dimord field which which should > be 'rpt_chan_freq_time' and you need a .freq field that contains the > frequencies in that matrix. Please first make sure that your trials > actually have 3 dimensions, else something else in the conversion went > wrong. > > I don't use SPM so no clue if there is a better way than doing it manually. > > Best, > Jörn**** > > > > On 11/14/2012 6:32 PM, Zita Eva Patai wrote:**** > > Hello FT-ers **** > > ** ** > > In the past i had no problem when converting my data from SPM (where i do > preprocessing and averaging) to FT (where I do my cluster-stats and > plotting)**** > > ** ** > > Currently, I am using the new way to convert (previous version seems > outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in > the right format, ie: not freq data. But i know that it is...any advice > would be much appreciated! Not to mention is warns me my data is not > epoched when it is indeed so...**** > > ** ** > > Thank you!**** > > zita**** > > ** ** > > ************************* > > *>> D = spm_eeg_load***** > > SPM M/EEG data object**** > > Type: evoked**** > > Transform: TF**** > > 8 conditions**** > > 326 channels**** > > 20 frequencies**** > > 501 samples/trial**** > > 8 trials**** > > Sampling frequency: 250 Hz**** > > Loaded from file C:\Users\Eva Z > Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat**** > > ** ** > > Use the syntax D(channels, frequencies, samples, trials) to access the data > **** > > Type "methods('meeg')" for the list of methods performing other operations > with the object**** > > Type "help meeg/method_name" to get help about methods**** > > ** ** > > *>> data = spm2ft(D)***** > > ** ** > > mapping condition label "11" to condition code 1**** > > mapping condition label "12" to condition code 2**** > > mapping condition label "21" to condition code 3**** > > mapping condition label "22" to condition code 4**** > > mapping condition label "31" to condition code 5**** > > mapping condition label "32" to condition code 6**** > > mapping condition label "41" to condition code 7**** > > mapping condition label "42" to condition code 8**** > > ** ** > > data = **** > > ** ** > > fsample: 250.0000**** > > label: {326x1 cell}**** > > time: {1x8 cell}**** > > trial: {1x8 cell}**** > > trialinfo: [8x1 double]**** > > cfg: [1x1 struct]**** > > ** ** > > ** ** > > *>> data2 = ft_checkdata(data, 'datatype', 'freq')***** > > **** > > Warning: the data does not contain a trial definition, assuming that the > trials are consecutive segments of a continuous recording **** > > > In utilities\private\warning_once at 81**** > > In utilities\private\fixsampleinfo at 54**** > > In ft_datatype_raw at 91**** > > In ft_checkdata at 170 **** > > Error using ft_checkdata (line 288)**** > > This function requires freq data as input.**** > > > **** > > ** ** > > -- **** > > ** ** > > Zita Patai**** > > DPhil, Experimental Psychology**** > > University of Oxford**** > > bcl.psy.ox.ac.uk/people/zita-eva-patai/**** > > ** ** > > ** ** > > ** ** > > _______________________________________________**** > > fieldtrip mailing list**** > > fieldtrip at donders.ru.nl**** > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > > > > **** > > -- **** > > Jörn M. Horschig**** > > PhD Student**** > > Donders Institute for Brain, Cognition and Behaviour **** > > Centre for Cognitive Neuroimaging**** > > Radboud University Nijmegen **** > > Neuronal Oscillations Group**** > > FieldTrip Development Team**** > > ** ** > > P.O. Box 9101**** > > NL-6500 HB Nijmegen**** > > The Netherlands**** > > ** ** > > Contact:**** > > E-Mail: jm.horschig at donders.ru.nl**** > > Tel: +31-(0)24-36-68493**** > > Web: http://www.ru.nl/donders**** > > ** ** > > Visiting address:**** > > Trigon, room 2.30**** > > Kapittelweg 29**** > > NL-6525 EN Nijmegen**** > > The Netherlands**** > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > > > **** > > ** ** > > -- **** > > ** ** > > Zita Patai**** > > DPhil, Experimental Psychology**** > > University of Oxford**** > > bcl.psy.ox.ac.uk/people/zita-eva-patai/**** > > ** ** > > ** ** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Nov 15 20:35:45 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 15 Nov 2012 20:35:45 +0100 Subject: [FieldTrip] DICS: fixed orientation of sources option In-Reply-To: <20121115172846.14247fxr0mnn198g@wmelperso1.univmed.fr> References: <20121115172846.14247fxr0mnn198g@wmelperso1.univmed.fr> Message-ID: Hi Andrea, If you specify fixedori = 'no', FT will not project the leadfield onto the orientation of maximum power, prior to computing the spatial filter, and this indeed will yield 'lambda-like' behaviour. Note that the essential difference is that with fixedori='yes' a scalar beamformer is computed, with fixedori='no' a vector beamformer is computed. With the powmethod option you can specify whether to take the 'trace', or the first singular value 'lambda1' of the vector beamformer output. As of yet there is no functionality that takes one of the two options depending on the 'singular value spectrum'. Best, JM On Nov 15, 2012, at 5:28 PM, andrea brovelli wrote: > > Dear all, > > I have a question regarding the option "fixedori" of DICS (the code from lines 292 to 306 in beamformer_dics.m). > > If I get it right, you implemented the situation when the first singular value lambda1 is much greater that the second singular value lambda2 of Cs (Cs is given by eq. 4 of Gross et al., 2001, PNAS). > > I checked in my data and this is not the case. Maybe my data is just a very special case, but I find that the first is a little larger that the second. Here they are: > > lambda1 = 0.5380; > lambda2 = 0.2921; > lambda3 = 0.0000; > > After eq. 9 in Gross (2001), it says that if lambda1 >> lambda2 does not hold, the trace of Cs should be used instead. > > So, has it been implemented in Fieldtrip somewhere ? And, if not, would you know how to do it ? > > Thanks a lot > > bye > > Andrea > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Thu Nov 15 22:28:48 2012 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 15 Nov 2012 21:28:48 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: References: <50A50249.3010303@donders.ru.nl> Message-ID: <6C066992-C1BA-41CC-AA29-35B933ADE574@gmail.com> Note that Duncan's suggestions only make sense for a dataset with only one trial. Even then I'm not sure why he had problems with the output as it was but I can check. Vladimir On 15 Nov 2012, at 18:57, Zita Eva Patai wrote: > awesome! thank you Duncan:) > > Thanks everyone for all the suggestions!! > > On Thu, Nov 15, 2012 at 6:24 PM, Duncan Astle wrote: > Word up Zita, > > > > Try this(replacing the filename for the file you want): > > > > D1 = spm_eeg_load('/imaging/as05/EEG data/Load3Easy_TF/wmrtf_efMMspm8_raw_0001'); > > l3e1=D1.fttimelock; > > l3e1.dimord='chan_freq_time'; > > l3e1.powspctrm = squeeze(D1.fttimelock.powspctrm); > > > > Extra tip: you first need to separate your conditions such that you have an SPM file for each subject for each condition…….. > > > > Let me know how you get on, > > D. > > ________________________________________________ > > Dr. Duncan Astle, > > Programme Leader Track, > > British Academy Research Fellow, > > MRC Cognition and Brain Sciences Unit, > > Chaucer Road, > > Cambridge. > > Duncan.Astle at mrc-cbu.cam.ac.uk > > > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Zita Eva Patai > Sent: 15 November 2012 17:04 > To: FieldTrip discussion list > Subject: Re: [FieldTrip] error when converting from spm to ft > > > > Dear Jörn, > > > > Thank you for the quick reply. I will try your suggestion! > > > > Many thanks, > > z > > On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" wrote: > > Dear Zita, > > The function seems to convert the function not correctly to a freq datastructure - it seems more like raw data to me. > > freq data requires a .powspctrm field, which should be a matrix of observations x channels x freq x time. So you would need to use cell2mat on your .trial field. Probably you need to permute the dimensions to match this order. Additionally, you will need a .dimord field which which should be 'rpt_chan_freq_time' and you need a .freq field that contains the frequencies in that matrix. Please first make sure that your trials actually have 3 dimensions, else something else in the conversion went wrong. > > I don't use SPM so no clue if there is a better way than doing it manually. > > Best, > Jörn > > > > On 11/14/2012 6:32 PM, Zita Eva Patai wrote: > > Hello FT-ers > > > > In the past i had no problem when converting my data from SPM (where i do preprocessing and averaging) to FT (where I do my cluster-stats and plotting) > > > > Currently, I am using the new way to convert (previous version seems outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in the right format, ie: not freq data. But i know that it is...any advice would be much appreciated! Not to mention is warns me my data is not epoched when it is indeed so... > > > > Thank you! > > zita > > > > ********************* > > >> D = spm_eeg_load > > SPM M/EEG data object > > Type: evoked > > Transform: TF > > 8 conditions > > 326 channels > > 20 frequencies > > 501 samples/trial > > 8 trials > > Sampling frequency: 250 Hz > > Loaded from file C:\Users\Eva Z Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat > > > > Use the syntax D(channels, frequencies, samples, trials) to access the data > > Type "methods('meeg')" for the list of methods performing other operations with the object > > Type "help meeg/method_name" to get help about methods > > > > >> data = spm2ft(D) > > > > mapping condition label "11" to condition code 1 > > mapping condition label "12" to condition code 2 > > mapping condition label "21" to condition code 3 > > mapping condition label "22" to condition code 4 > > mapping condition label "31" to condition code 5 > > mapping condition label "32" to condition code 6 > > mapping condition label "41" to condition code 7 > > mapping condition label "42" to condition code 8 > > > > data = > > > > fsample: 250.0000 > > label: {326x1 cell} > > time: {1x8 cell} > > trial: {1x8 cell} > > trialinfo: [8x1 double] > > cfg: [1x1 struct] > > > > > > >> data2 = ft_checkdata(data, 'datatype', 'freq') > > > > Warning: the data does not contain a trial definition, assuming that the trials are consecutive segments of a continuous recording > > > In utilities\private\warning_once at 81 > > In utilities\private\fixsampleinfo at 54 > > In ft_datatype_raw at 91 > > In ft_checkdata at 170 > > Error using ft_checkdata (line 288) > > This function requires freq data as input. > > > > > > -- > > > > Zita Patai > > DPhil, Experimental Psychology > > University of Oxford > > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > -- > > > > Zita Patai > > DPhil, Experimental Psychology > > University of Oxford > > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > > Zita Patai > DPhil, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Duncan.Astle at mrc-cbu.cam.ac.uk Fri Nov 16 09:29:22 2012 From: Duncan.Astle at mrc-cbu.cam.ac.uk (Duncan Astle) Date: Fri, 16 Nov 2012 08:29:22 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: <6C066992-C1BA-41CC-AA29-35B933ADE574@gmail.com> References: <50A50249.3010303@donders.ru.nl> <6C066992-C1BA-41CC-AA29-35B933ADE574@gmail.com> Message-ID: I did it that way because the statistics options in fieldtrip need the data to be split into individual conditions for each subject (i.e. one average per condition per subject). Hence the one trial. D. ________________________________________________ Dr. Duncan Astle, Programme Leader Track, British Academy Research Fellow, MRC Cognition and Brain Sciences Unit, Chaucer Road, Cambridge. Duncan.Astle at mrc-cbu.cam.ac.uk From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Vladimir Litvak Sent: 15 November 2012 21:29 To: FieldTrip discussion list Subject: Re: [FieldTrip] error when converting from spm to ft Note that Duncan's suggestions only make sense for a dataset with only one trial. Even then I'm not sure why he had problems with the output as it was but I can check. Vladimir On 15 Nov 2012, at 18:57, Zita Eva Patai > wrote: awesome! thank you Duncan:) Thanks everyone for all the suggestions!! On Thu, Nov 15, 2012 at 6:24 PM, Duncan Astle > wrote: Word up Zita, Try this(replacing the filename for the file you want): D1 = spm_eeg_load('/imaging/as05/EEG data/Load3Easy_TF/wmrtf_efMMspm8_raw_0001'); l3e1=D1.fttimelock; l3e1.dimord='chan_freq_time'; l3e1.powspctrm = squeeze(D1.fttimelock.powspctrm); Extra tip: you first need to separate your conditions such that you have an SPM file for each subject for each condition…….. Let me know how you get on, D. ________________________________________________ Dr. Duncan Astle, Programme Leader Track, British Academy Research Fellow, MRC Cognition and Brain Sciences Unit, Chaucer Road, Cambridge. Duncan.Astle at mrc-cbu.cam.ac.uk From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Zita Eva Patai Sent: 15 November 2012 17:04 To: FieldTrip discussion list Subject: Re: [FieldTrip] error when converting from spm to ft Dear Jörn, Thank you for the quick reply. I will try your suggestion! Many thanks, z On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" > wrote: Dear Zita, The function seems to convert the function not correctly to a freq datastructure - it seems more like raw data to me. freq data requires a .powspctrm field, which should be a matrix of observations x channels x freq x time. So you would need to use cell2mat on your .trial field. Probably you need to permute the dimensions to match this order. Additionally, you will need a .dimord field which which should be 'rpt_chan_freq_time' and you need a .freq field that contains the frequencies in that matrix. Please first make sure that your trials actually have 3 dimensions, else something else in the conversion went wrong. I don't use SPM so no clue if there is a better way than doing it manually. Best, Jörn On 11/14/2012 6:32 PM, Zita Eva Patai wrote: Hello FT-ers In the past i had no problem when converting my data from SPM (where i do preprocessing and averaging) to FT (where I do my cluster-stats and plotting) Currently, I am using the new way to convert (previous version seems outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in the right format, ie: not freq data. But i know that it is...any advice would be much appreciated! Not to mention is warns me my data is not epoched when it is indeed so... Thank you! zita ********************* >> D = spm_eeg_load SPM M/EEG data object Type: evoked Transform: TF 8 conditions 326 channels 20 frequencies 501 samples/trial 8 trials Sampling frequency: 250 Hz Loaded from file C:\Users\Eva Z Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat Use the syntax D(channels, frequencies, samples, trials) to access the data Type "methods('meeg')" for the list of methods performing other operations with the object Type "help meeg/method_name" to get help about methods >> data = spm2ft(D) mapping condition label "11" to condition code 1 mapping condition label "12" to condition code 2 mapping condition label "21" to condition code 3 mapping condition label "22" to condition code 4 mapping condition label "31" to condition code 5 mapping condition label "32" to condition code 6 mapping condition label "41" to condition code 7 mapping condition label "42" to condition code 8 data = fsample: 250.0000 label: {326x1 cell} time: {1x8 cell} trial: {1x8 cell} trialinfo: [8x1 double] cfg: [1x1 struct] >> data2 = ft_checkdata(data, 'datatype', 'freq') Warning: the data does not contain a trial definition, assuming that the trials are consecutive segments of a continuous recording > In utilities\private\warning_once at 81 In utilities\private\fixsampleinfo at 54 In ft_datatype_raw at 91 In ft_checkdata at 170 Error using ft_checkdata (line 288) This function requires freq data as input. -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Fri Nov 16 13:24:12 2012 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Fri, 16 Nov 2012 12:24:12 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: References: <50A50249.3010303@donders.ru.nl> <6C066992-C1BA-41CC-AA29-35B933ADE574@gmail.com> Message-ID: Attached is a new version of fttimelock which outputs different versions of the struct depending on the input and also allows selecting just subset of the data to convert to FT. Duncan's fixes will not be necessary with it. This will be included in next SPM8 update and in SPM12. You should put it in @meeg directory in SPM. Best, Vladimir On Fri, Nov 16, 2012 at 8:29 AM, Duncan Astle < Duncan.Astle at mrc-cbu.cam.ac.uk> wrote: > I did it that way because the statistics options in fieldtrip need the > data to be split into individual conditions for each subject (i.e. one > average per condition per subject). Hence the one trial. **** > > ** ** > > D. **** > > ** ** > > ________________________________________________**** > > Dr. Duncan Astle,**** > > Programme Leader Track,**** > > British Academy Research Fellow,**** > > MRC Cognition and Brain Sciences Unit,**** > > Chaucer Road,**** > > Cambridge.**** > > Duncan.Astle at mrc-cbu.cam.ac.uk**** > > ** ** > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Vladimir Litvak > *Sent:* 15 November 2012 21:29 > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] error when converting from spm to ft**** > > ** ** > > Note that Duncan's suggestions only make sense for a dataset with only one > trial. Even then I'm not sure why he had problems with the output as it was > but I can check.**** > > ** ** > > Vladimir**** > > ** ** > > > On 15 Nov 2012, at 18:57, Zita Eva Patai wrote:** > ** > > awesome! thank you Duncan:)**** > > ** ** > > Thanks everyone for all the suggestions!!**** > > On Thu, Nov 15, 2012 at 6:24 PM, Duncan Astle < > Duncan.Astle at mrc-cbu.cam.ac.uk> wrote:**** > > Word up Zita,**** > > **** > > Try this(replacing the filename for the file you want): **** > > **** > > D1 = spm_eeg_load('/imaging/as05/EEG > data/Load3Easy_TF/wmrtf_efMMspm8_raw_0001');**** > > l3e1=D1.fttimelock;**** > > l3e1.dimord='chan_freq_time';**** > > l3e1.powspctrm = squeeze(D1.fttimelock.powspctrm);**** > > **** > > Extra tip: you first need to separate your conditions such that you have > an SPM file for each subject for each condition……..**** > > **** > > Let me know how you get on,**** > > D.**** > > ________________________________________________**** > > Dr. Duncan Astle,**** > > Programme Leader Track,**** > > British Academy Research Fellow,**** > > MRC Cognition and Brain Sciences Unit,**** > > Chaucer Road,**** > > Cambridge.**** > > Duncan.Astle at mrc-cbu.cam.ac.uk**** > > **** > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Zita Eva Patai > *Sent:* 15 November 2012 17:04 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] error when converting from spm to ft**** > > **** > > Dear Jörn,**** > > **** > > Thank you for the quick reply. I will try your suggestion!**** > > **** > > Many thanks,**** > > z**** > > On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" < > jm.horschig at donders.ru.nl> wrote:**** > > Dear Zita, > > The function seems to convert the function not correctly to a freq > datastructure - it seems more like raw data to me. > > freq data requires a .powspctrm field, which should be a matrix of > observations x channels x freq x time. So you would need to use cell2mat on > your .trial field. Probably you need to permute the dimensions to match > this order. Additionally, you will need a .dimord field which which should > be 'rpt_chan_freq_time' and you need a .freq field that contains the > frequencies in that matrix. Please first make sure that your trials > actually have 3 dimensions, else something else in the conversion went > wrong. > > I don't use SPM so no clue if there is a better way than doing it manually. > > Best, > Jörn**** > > > > On 11/14/2012 6:32 PM, Zita Eva Patai wrote:**** > > Hello FT-ers **** > > **** > > In the past i had no problem when converting my data from SPM (where i do > preprocessing and averaging) to FT (where I do my cluster-stats and > plotting)**** > > **** > > Currently, I am using the new way to convert (previous version seems > outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in > the right format, ie: not freq data. But i know that it is...any advice > would be much appreciated! Not to mention is warns me my data is not > epoched when it is indeed so...**** > > **** > > Thank you!**** > > zita**** > > **** > > ************************* > > *>> D = spm_eeg_load***** > > SPM M/EEG data object**** > > Type: evoked**** > > Transform: TF**** > > 8 conditions**** > > 326 channels**** > > 20 frequencies**** > > 501 samples/trial**** > > 8 trials**** > > Sampling frequency: 250 Hz**** > > Loaded from file C:\Users\Eva Z > Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat**** > > **** > > Use the syntax D(channels, frequencies, samples, trials) to access the data > **** > > Type "methods('meeg')" for the list of methods performing other operations > with the object**** > > Type "help meeg/method_name" to get help about methods**** > > **** > > *>> data = spm2ft(D)***** > > **** > > mapping condition label "11" to condition code 1**** > > mapping condition label "12" to condition code 2**** > > mapping condition label "21" to condition code 3**** > > mapping condition label "22" to condition code 4**** > > mapping condition label "31" to condition code 5**** > > mapping condition label "32" to condition code 6**** > > mapping condition label "41" to condition code 7**** > > mapping condition label "42" to condition code 8**** > > **** > > data = **** > > **** > > fsample: 250.0000**** > > label: {326x1 cell}**** > > time: {1x8 cell}**** > > trial: {1x8 cell}**** > > trialinfo: [8x1 double]**** > > cfg: [1x1 struct]**** > > **** > > **** > > *>> data2 = ft_checkdata(data, 'datatype', 'freq')***** > > **** > > Warning: the data does not contain a trial definition, assuming that the > trials are consecutive segments of a continuous recording **** > > > In utilities\private\warning_once at 81**** > > In utilities\private\fixsampleinfo at 54**** > > In ft_datatype_raw at 91**** > > In ft_checkdata at 170 **** > > Error using ft_checkdata (line 288)**** > > This function requires freq data as input.**** > > > **** > > **** > > -- **** > > **** > > Zita Patai**** > > DPhil, Experimental Psychology**** > > University of Oxford**** > > bcl.psy.ox.ac.uk/people/zita-eva-patai/**** > > **** > > **** > > **** > > _______________________________________________**** > > fieldtrip mailing list**** > > fieldtrip at donders.ru.nl**** > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > > > **** > > -- **** > > Jörn M. Horschig**** > > PhD Student**** > > Donders Institute for Brain, Cognition and Behaviour **** > > Centre for Cognitive Neuroimaging**** > > Radboud University Nijmegen **** > > Neuronal Oscillations Group**** > > FieldTrip Development Team**** > > **** > > P.O. Box 9101**** > > NL-6500 HB Nijmegen**** > > The Netherlands**** > > **** > > Contact:**** > > E-Mail: jm.horschig at donders.ru.nl**** > > Tel: +31-(0)24-36-68493**** > > Web: http://www.ru.nl/donders**** > > **** > > Visiting address:**** > > Trigon, room 2.30**** > > Kapittelweg 29**** > > NL-6525 EN Nijmegen**** > > The Netherlands**** > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > > > **** > > **** > > -- **** > > **** > > Zita Patai**** > > DPhil, Experimental Psychology**** > > University of Oxford**** > > bcl.psy.ox.ac.uk/people/zita-eva-patai/**** > > **** > > **** > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > > > **** > > ** ** > > -- **** > > ** ** > > Zita Patai**** > > DPhil, Experimental Psychology**** > > University of Oxford**** > > bcl.psy.ox.ac.uk/people/zita-eva-patai/**** > > ** ** > > ** ** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fttimelock.m Type: application/octet-stream Size: 3236 bytes Desc: not available URL: From sauer.mpih at googlemail.com Fri Nov 16 14:25:50 2012 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Fri, 16 Nov 2012 14:25:50 +0100 Subject: [FieldTrip] Problem with TFR calculation using multitaper Message-ID: Dear all, I have encountered a problem when trying to calculate the power spectrum of my data and I was wondering if anyone could help me to determine the origin of this problem. For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing and a time window with a length of 500 ms ending up with 10 tapers for the TFR calculation (the freq range is 20 - 200 Hz): cfg = []; cfg.output = 'pow'; cfg.channel = 'MEG'; cfg.method = 'mtmconvol'; cfg.taper = 'dpss'; cfg.keeptrials = 'no'; cfg.foi = [20:1:200]; cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, from -0.8 to 1.2 s cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- 11 Hz cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 500 ms cfg.pad = 'maxperlen'; TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = ft_freqanalysis(cfg,DataOut); After calculation I did a baseline normalization: cfg = []; cfg.baseline = [-0.4 -0.1]; cfg.baselinetype = 'relchange'; TFR_HighGamma{subject,condition} = ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); averaged: cfg = []; cfg.channel = 'ParOcc'; % parietal and occipital channels GA_TFR_HighGamma{condition} = ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); and finally plotted the spectrum: time(1) = 3; % -400 ms time(2) = 27; % 800 ms indFreq = [20 200]; freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); power = mean(power,1); fig = figure; set(fig,'PaperUnits','centimeters'); set(fig,'Units','centimeters'); set(fig,'PaperSize',[15 15]); set(fig,'PaperPosition',[0 0 14 14]); set(gcf,'Color',[1 1 1]); ha = gca; pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); shading interp; xlim([-0.4 0.8]); ylim([40 120]); caxis([-.2 .2]); hold on; ha = gca; plot([0 0],[40 120],'k--','LineWidth',1); set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); set(ha,'YTick',[40 60 80 100 120]); colorbar('SouthOutside'); xlabel('Time [sec]'); ylabel('Frequency [Hz]'); The resulting plot looks strange to me since there is this artifical "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different from the "strange" ones described there. I also attached a screenshot of the MultiplotTFR and there you can see the strange "effect" clearly in channels MLO22 or MRO22 for example. Is something wrong with my TFR calculation? Or does the problem arise from an earlier step in the preprocessing? Any help or advice would be greatly appreciated! Best, Andreas -- Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Spectr.jpg Type: image/jpeg Size: 78593 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MultiplotTFR.JPG Type: image/jpeg Size: 140199 bytes Desc: not available URL: From sauer.mpih at googlemail.com Fri Nov 16 14:36:01 2012 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Fri, 16 Nov 2012 14:36:01 +0100 Subject: [FieldTrip] Problem with TFR calculation using multitaper Message-ID: Dear all, I have encountered a problem when trying to calculate the power spectrum of my data and I was wondering if anyone could help me to determine the origin of this problem. For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing and a time window with a length of 500 ms ending up with 10 tapers for the TFR calculation (the freq range is 20 - 200 Hz): cfg = []; cfg.output = 'pow'; cfg.channel = 'MEG'; cfg.method = 'mtmconvol'; cfg.taper = 'dpss'; cfg.keeptrials = 'no'; cfg.foi = [20:1:200]; cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, from -0.8 to 1.2 s cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- 11 Hz cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 500 ms cfg.pad = 'maxperlen'; TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = ft_freqanalysis(cfg,DataOut); After calculation I did a baseline normalization: cfg = []; cfg.baseline = [-0.4 -0.1]; cfg.baselinetype = 'relchange'; TFR_HighGamma{subject,condition} = ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); averaged: cfg = []; cfg.channel = 'ParOcc'; % parietal and occipital channels GA_TFR_HighGamma{condition} = ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); and finally plotted the spectrum: time(1) = 3; % -400 ms time(2) = 27; % 800 ms indFreq = [20 200]; freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); power = mean(power,1); fig = figure; set(fig,'PaperUnits','centimeters'); set(fig,'Units','centimeters'); set(fig,'PaperSize',[15 15]); set(fig,'PaperPosition',[0 0 14 14]); set(gcf,'Color',[1 1 1]); ha = gca; pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); shading interp; xlim([-0.4 0.8]); ylim([40 120]); caxis([-.2 .2]); hold on; ha = gca; plot([0 0],[40 120],'k--','LineWidth',1); set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); set(ha,'YTick',[40 60 80 100 120]); colorbar('SouthOutside'); xlabel('Time [sec]'); ylabel('Frequency [Hz]'); The resulting plot looks strange to me since there is this artifical "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different from the "strange" ones described there. I also attached a screenshot of the MultiplotTFR and there you can see the strange "effect" clearly in channels MLO22 or MRO22 for example. Is something wrong with my TFR calculation? Or does the problem arise from an earlier step in the preprocessing? Any help or advice would be greatly appreciated! Best, Andreas -- Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Spectr.jpg Type: image/jpeg Size: 78593 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MultiplotTFR.JPG Type: image/jpeg Size: 140199 bytes Desc: not available URL: From f.roux at bcbl.eu Fri Nov 16 14:51:24 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Fri, 16 Nov 2012 14:51:24 +0100 (CET) Subject: [FieldTrip] Problem with TFR calculation using multitaper In-Reply-To: Message-ID: <7d961697-40cb-4095-9d24-fea020903368@thalamus_p> Dear Andreas, if you used a 50 Hz notch filter in your preprocessing, that is probably the reason why you are seeing the 'artificial' cut between 30 and 70 Hz. My guess is that you ran your notch filter on segmented epochs of a few seconds (resulting in a low spectral resolution for your notch filter). This will wipe out a ~10Hz box (in your case I'm just guessing) around the line noise frequency. Running the multitaper on top of that may explain the pattern you are observing. Best, Fred ----- Original Message ----- From: "Andreas Sauer" To: "FieldTrip discussion list" Sent: Friday, November 16, 2012 2:36:01 PM Subject: [FieldTrip] Problem with TFR calculation using multitaper Dear all, I have encountered a problem when trying to calculate the power spectrum of my data and I was wondering if anyone could help me to determine the origin of this problem. For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing and a time window with a length of 500 ms ending up with 10 tapers for the TFR calculation (the freq range is 20 - 200 Hz): cfg = []; cfg.output = 'pow'; cfg.channel = 'MEG'; cfg.method = 'mtmconvol'; cfg.taper = 'dpss'; cfg.keeptrials = 'no'; cfg.foi = [20:1:200]; cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, from -0.8 to 1.2 s cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- 11 Hz cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 500 ms cfg.pad = 'maxperlen'; TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = ft_freqanalysis(cfg,DataOut); After calculation I did a baseline normalization: cfg = []; cfg.baseline = [-0.4 -0.1]; cfg.baselinetype = 'relchange'; TFR_HighGamma{subject,condition} = ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); averaged: cfg = []; cfg.channel = 'ParOcc'; % parietal and occipital channels GA_TFR_HighGamma{condition} = ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); and finally plotted the spectrum: time(1) = 3; % -400 ms time(2) = 27; % 800 ms indFreq = [20 200]; freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); power = mean(power,1); fig = figure; set(fig,'PaperUnits','centimeters'); set(fig,'Units','centimeters'); set(fig,'PaperSize',[15 15]); set(fig,'PaperPosition',[0 0 14 14]); set(gcf,'Color',[1 1 1]); ha = gca; pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); shading interp; xlim([-0.4 0.8]); ylim([40 120]); caxis([-.2 .2]); hold on; ha = gca; plot([0 0],[40 120],'k--','LineWidth',1); set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); set(ha,'YTick',[40 60 80 100 120]); colorbar('SouthOutside'); xlabel('Time [sec]'); ylabel('Frequency [Hz]'); The resulting plot looks strange to me since there is this artifical "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different from the "strange" ones described there. I also attached a screenshot of the MultiplotTFR and there you can see the strange "effect" clearly in channels MLO22 or MRO22 for example. Is something wrong with my TFR calculation? Or does the problem arise from an earlier step in the preprocessing? Any help or advice would be greatly appreciated! Best, Andreas -- Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From a.stolk at fcdonders.ru.nl Fri Nov 16 15:11:05 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Fri, 16 Nov 2012 15:11:05 +0100 (CET) Subject: [FieldTrip] correction for movement tool In-Reply-To: Message-ID: <1845155284.1304271.1353075065072.JavaMail.root@sculptor.zimbra.ru.nl> Hello Inna, Nenad, We're happy to announce that the manuscript previously mentioned ('Online and offline tools for head movement compensation in MEG') has been accepted for publication. The manuscript demonstrates the applicability of the recently discussed methods to a wide range of tasks and experiments and it also presents an overview of the methods out there. It can be found in the literature section of the FieldTrip wiki or directly downloaded from http://fieldtrip.fcdonders.nl/_media/stolk_et_al_-_meg_head_movements_-_20121116.pdf Best regards, Arjen ----- Oorspronkelijk bericht ----- > Van: "Nenad Polomac" > Aan: fieldtrip at science.ru.nl > Verzonden: Donderdag 15 november 2012 09:58:35 > Onderwerp: Re: [FieldTrip] correction for movement tool > Dear Arjen, > Thank you very much for the detailed clarification! > This helped a lot! :) > All the best! > Nenad  > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Fri Nov 16 15:41:36 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Fri, 16 Nov 2012 14:41:36 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: References: <50A50249.3010303@donders.ru.nl> <6C066992-C1BA-41CC-AA29-35B933ADE574@gmail.com> Message-ID: Great, thanks again! On Fri, Nov 16, 2012 at 12:24 PM, Vladimir Litvak wrote: > Attached is a new version of fttimelock which outputs different versions > of the struct depending on the input and also allows selecting just subset > of the data to convert to FT. Duncan's fixes will not be necessary with it. > This will be included in next SPM8 update and in SPM12. You should put it > in @meeg directory in SPM. > > Best, > > Vladimir > > > On Fri, Nov 16, 2012 at 8:29 AM, Duncan Astle < > Duncan.Astle at mrc-cbu.cam.ac.uk> wrote: > >> I did it that way because the statistics options in fieldtrip need the >> data to be split into individual conditions for each subject (i.e. one >> average per condition per subject). Hence the one trial. **** >> >> ** ** >> >> D. **** >> >> ** ** >> >> ________________________________________________**** >> >> Dr. Duncan Astle,**** >> >> Programme Leader Track,**** >> >> British Academy Research Fellow,**** >> >> MRC Cognition and Brain Sciences Unit,**** >> >> Chaucer Road,**** >> >> Cambridge.**** >> >> Duncan.Astle at mrc-cbu.cam.ac.uk**** >> >> ** ** >> >> *From:* fieldtrip-bounces at science.ru.nl [mailto: >> fieldtrip-bounces at science.ru.nl] *On Behalf Of *Vladimir Litvak >> *Sent:* 15 November 2012 21:29 >> >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] error when converting from spm to ft**** >> >> ** ** >> >> Note that Duncan's suggestions only make sense for a dataset with only >> one trial. Even then I'm not sure why he had problems with the output as it >> was but I can check.**** >> >> ** ** >> >> Vladimir**** >> >> ** ** >> >> >> On 15 Nov 2012, at 18:57, Zita Eva Patai wrote:* >> *** >> >> awesome! thank you Duncan:)**** >> >> ** ** >> >> Thanks everyone for all the suggestions!!**** >> >> On Thu, Nov 15, 2012 at 6:24 PM, Duncan Astle < >> Duncan.Astle at mrc-cbu.cam.ac.uk> wrote:**** >> >> Word up Zita,**** >> >> **** >> >> Try this(replacing the filename for the file you want): **** >> >> **** >> >> D1 = spm_eeg_load('/imaging/as05/EEG >> data/Load3Easy_TF/wmrtf_efMMspm8_raw_0001');**** >> >> l3e1=D1.fttimelock;**** >> >> l3e1.dimord='chan_freq_time';**** >> >> l3e1.powspctrm = squeeze(D1.fttimelock.powspctrm);**** >> >> **** >> >> Extra tip: you first need to separate your conditions such that you have >> an SPM file for each subject for each condition……..**** >> >> **** >> >> Let me know how you get on,**** >> >> D.**** >> >> ________________________________________________**** >> >> Dr. Duncan Astle,**** >> >> Programme Leader Track,**** >> >> British Academy Research Fellow,**** >> >> MRC Cognition and Brain Sciences Unit,**** >> >> Chaucer Road,**** >> >> Cambridge.**** >> >> Duncan.Astle at mrc-cbu.cam.ac.uk**** >> >> **** >> >> *From:* fieldtrip-bounces at science.ru.nl [mailto: >> fieldtrip-bounces at science.ru.nl] *On Behalf Of *Zita Eva Patai >> *Sent:* 15 November 2012 17:04 >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] error when converting from spm to ft**** >> >> **** >> >> Dear Jörn,**** >> >> **** >> >> Thank you for the quick reply. I will try your suggestion!**** >> >> **** >> >> Many thanks,**** >> >> z**** >> >> On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" < >> jm.horschig at donders.ru.nl> wrote:**** >> >> Dear Zita, >> >> The function seems to convert the function not correctly to a freq >> datastructure - it seems more like raw data to me. >> >> freq data requires a .powspctrm field, which should be a matrix of >> observations x channels x freq x time. So you would need to use cell2mat on >> your .trial field. Probably you need to permute the dimensions to match >> this order. Additionally, you will need a .dimord field which which should >> be 'rpt_chan_freq_time' and you need a .freq field that contains the >> frequencies in that matrix. Please first make sure that your trials >> actually have 3 dimensions, else something else in the conversion went >> wrong. >> >> I don't use SPM so no clue if there is a better way than doing it >> manually. >> >> Best, >> Jörn**** >> >> >> >> On 11/14/2012 6:32 PM, Zita Eva Patai wrote:**** >> >> Hello FT-ers **** >> >> **** >> >> In the past i had no problem when converting my data from SPM (where i do >> preprocessing and averaging) to FT (where I do my cluster-stats and >> plotting)**** >> >> **** >> >> Currently, I am using the new way to convert (previous version seems >> outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in >> the right format, ie: not freq data. But i know that it is...any advice >> would be much appreciated! Not to mention is warns me my data is not >> epoched when it is indeed so...**** >> >> **** >> >> Thank you!**** >> >> zita**** >> >> **** >> >> ************************* >> >> *>> D = spm_eeg_load***** >> >> SPM M/EEG data object**** >> >> Type: evoked**** >> >> Transform: TF**** >> >> 8 conditions**** >> >> 326 channels**** >> >> 20 frequencies**** >> >> 501 samples/trial**** >> >> 8 trials**** >> >> Sampling frequency: 250 Hz**** >> >> Loaded from file C:\Users\Eva Z >> Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat**** >> >> **** >> >> Use the syntax D(channels, frequencies, samples, trials) to access the >> data**** >> >> Type "methods('meeg')" for the list of methods performing other >> operations with the object**** >> >> Type "help meeg/method_name" to get help about methods**** >> >> **** >> >> *>> data = spm2ft(D)***** >> >> **** >> >> mapping condition label "11" to condition code 1**** >> >> mapping condition label "12" to condition code 2**** >> >> mapping condition label "21" to condition code 3**** >> >> mapping condition label "22" to condition code 4**** >> >> mapping condition label "31" to condition code 5**** >> >> mapping condition label "32" to condition code 6**** >> >> mapping condition label "41" to condition code 7**** >> >> mapping condition label "42" to condition code 8**** >> >> **** >> >> data = **** >> >> **** >> >> fsample: 250.0000**** >> >> label: {326x1 cell}**** >> >> time: {1x8 cell}**** >> >> trial: {1x8 cell}**** >> >> trialinfo: [8x1 double]**** >> >> cfg: [1x1 struct]**** >> >> **** >> >> **** >> >> *>> data2 = ft_checkdata(data, 'datatype', 'freq')***** >> >> **** >> >> Warning: the data does not contain a trial definition, assuming that the >> trials are consecutive segments of a continuous recording **** >> >> > In utilities\private\warning_once at 81**** >> >> In utilities\private\fixsampleinfo at 54**** >> >> In ft_datatype_raw at 91**** >> >> In ft_checkdata at 170 **** >> >> Error using ft_checkdata (line 288)**** >> >> This function requires freq data as input.**** >> >> >> **** >> >> **** >> >> -- **** >> >> **** >> >> Zita Patai**** >> >> DPhil, Experimental Psychology**** >> >> University of Oxford**** >> >> bcl.psy.ox.ac.uk/people/zita-eva-patai/**** >> >> **** >> >> **** >> >> **** >> >> _______________________________________________**** >> >> fieldtrip mailing list**** >> >> fieldtrip at donders.ru.nl**** >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** >> >> >> >> **** >> >> -- **** >> >> Jörn M. Horschig**** >> >> PhD Student**** >> >> Donders Institute for Brain, Cognition and Behaviour **** >> >> Centre for Cognitive Neuroimaging**** >> >> Radboud University Nijmegen **** >> >> Neuronal Oscillations Group**** >> >> FieldTrip Development Team**** >> >> **** >> >> P.O. Box 9101**** >> >> NL-6500 HB Nijmegen**** >> >> The Netherlands**** >> >> **** >> >> Contact:**** >> >> E-Mail: jm.horschig at donders.ru.nl**** >> >> Tel: +31-(0)24-36-68493**** >> >> Web: http://www.ru.nl/donders**** >> >> **** >> >> Visiting address:**** >> >> Trigon, room 2.30**** >> >> Kapittelweg 29**** >> >> NL-6525 EN Nijmegen**** >> >> The Netherlands**** >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** >> >> >> >> **** >> >> **** >> >> -- **** >> >> **** >> >> Zita Patai**** >> >> DPhil, Experimental Psychology**** >> >> University of Oxford**** >> >> bcl.psy.ox.ac.uk/people/zita-eva-patai/**** >> >> **** >> >> **** >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** >> >> >> >> **** >> >> ** ** >> >> -- **** >> >> ** ** >> >> Zita Patai**** >> >> DPhil, Experimental Psychology**** >> >> University of Oxford**** >> >> bcl.psy.ox.ac.uk/people/zita-eva-patai/**** >> >> ** ** >> >> ** ** >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.craddock at uni-leipzig.de Fri Nov 16 16:50:06 2012 From: matt.craddock at uni-leipzig.de (Matt Craddock) Date: Fri, 16 Nov 2012 16:50:06 +0100 Subject: [FieldTrip] Problem with TFR calculation using multitaper In-Reply-To: <7d961697-40cb-4095-9d24-fea020903368@thalamus_p> References: <7d961697-40cb-4095-9d24-fea020903368@thalamus_p> Message-ID: <50A660AE.8000606@uni-leipzig.de> Dear Andreas and Frederic, Another possibility would be a 60 Hz signal (a steady-state evoked potential to monitor refresh rate, for example) running throughout the trial, including in the baseline period. Given that you're using 11 Hz frequency smoothing, this would effectively be smeared across the 49-71 Hz range. You'd have a much higher baseline signal in the 49-71 Hz range (because of the 60 Hz signal appearing in all those frequencies), but the strength of the actual signal in those ranges wouldn't differ. So, the signal-to-baseline ratio would be much lower (because your signal-to-noise ratio is worse), and that'd created the appearance of boundaries at the edges of the frequency smoothing (because at 71 Hz you are still getting the 60Hz noise, but at 72Hz, you are not, so your signal-to-noise ratio dramatically changes). I've attached a pic showing something similar caused by 50 Hz line noise (in EEG, with ~12Hz freq smoothing). So I'd suggest checking the FFT of your data and possibly putting in a notch at 60 Hz if there's a big peak there. Cheers, Matt On 16/11/2012 14:51, Frederic Roux wrote: > > Dear Andreas, > > if you used a 50 Hz notch filter in your > preprocessing, that is probably the reason > why you are seeing the 'artificial' cut > between 30 and 70 Hz. > > My guess is that you ran your notch filter > on segmented epochs of a few seconds (resulting > in a low spectral resolution for your notch filter). > This will wipe out a ~10Hz box (in your case I'm just guessing) > around the line noise frequency. > > Running the multitaper on top of that may explain > the pattern you are observing. > > > Best, > > Fred > ----- Original Message ----- > From: "Andreas Sauer" > To: "FieldTrip discussion list" > Sent: Friday, November 16, 2012 2:36:01 PM > Subject: [FieldTrip] Problem with TFR calculation using multitaper > > > Dear all, > > I have encountered a problem when trying to calculate the power spectrum of my data and I was wondering if anyone could help me to determine the origin of this problem. > > For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing and a time window with a length of 500 ms ending up with 10 tapers for the TFR calculation (the freq range is 20 - 200 Hz): > > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'MEG'; > cfg.method = 'mtmconvol'; > cfg.taper = 'dpss'; > cfg.keeptrials = 'no'; > cfg.foi = [20:1:200]; > cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, from -0.8 to 1.2 s > cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- 11 Hz > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 500 ms > cfg.pad = 'maxperlen'; > > TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = ft_freqanalysis(cfg,DataOut); > > After calculation I did a baseline normalization: > > > cfg = []; > cfg.baseline = [-0.4 -0.1]; > cfg.baselinetype = 'relchange'; > > TFR_HighGamma{subject,condition} = ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); > > averaged: > > > cfg = []; > cfg.channel = 'ParOcc'; % parietal and occipital channels > GA_TFR_HighGamma{condition} = ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); > > and finally plotted the spectrum: > > > time(1) = 3; % -400 ms > time(2) = 27; % 800 ms > indFreq = [20 200]; > freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); > > power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); > power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); > power = mean(power,1); > > fig = figure; > set(fig,'PaperUnits','centimeters'); > set(fig,'Units','centimeters'); > set(fig,'PaperSize',[15 15]); > set(fig,'PaperPosition',[0 0 14 14]); > set(gcf,'Color',[1 1 1]); > > ha = gca; > pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); > set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); > shading interp; > xlim([-0.4 0.8]); > ylim([40 120]); > caxis([-.2 .2]); > hold on; > ha = gca; > plot([0 0],[40 120],'k--','LineWidth',1); > set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); > set(ha,'YTick',[40 60 80 100 120]); > colorbar('SouthOutside'); > xlabel('Time [sec]'); > ylabel('Frequency [Hz]'); > > The resulting plot looks strange to me since there is this artifical "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different from the "strange" ones described there. > I also attached a screenshot of the MultiplotTFR and there you can see the strange "effect" clearly in channels MLO22 or MRO22 for example. > > Is something wrong with my TFR calculation? Or does the problem arise from an earlier step in the preprocessing? > > Any help or advice would be greatly appreciated! > > Best, > > Andreas > -- Dr. Matt Craddock Post-doctoral researcher, Institute of Psychology, University of Leipzig, Seeburgstr. 14-20, 04103 Leipzig, Germany Phone: +49 341 973 95 44 -------------- next part -------------- A non-text attachment was scrubbed... Name: 50HznoiseFilt.png Type: image/png Size: 51346 bytes Desc: not available URL: From f.roux at bcbl.eu Sat Nov 17 12:54:51 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Sat, 17 Nov 2012 12:54:51 +0100 (CET) Subject: [FieldTrip] Problem with TFR calculation using multitaper In-Reply-To: <50A660AE.8000606@uni-leipzig.de> Message-ID: <6f87de3f-b420-409f-8136-5c4712ece41d@thalamus_p> Hi Matt, Hi Andreas, Indeed, I remember seeing strong 60 Hz line noise as a result of the beamer refresh rate (60Hz). Best, Fred ----- Original Message ----- From: "Matt Craddock" To: "FieldTrip discussion list" Sent: Friday, November 16, 2012 4:50:06 PM Subject: Re: [FieldTrip] Problem with TFR calculation using multitaper Dear Andreas and Frederic, Another possibility would be a 60 Hz signal (a steady-state evoked potential to monitor refresh rate, for example) running throughout the trial, including in the baseline period. Given that you're using 11 Hz frequency smoothing, this would effectively be smeared across the 49-71 Hz range. You'd have a much higher baseline signal in the 49-71 Hz range (because of the 60 Hz signal appearing in all those frequencies), but the strength of the actual signal in those ranges wouldn't differ. So, the signal-to-baseline ratio would be much lower (because your signal-to-noise ratio is worse), and that'd created the appearance of boundaries at the edges of the frequency smoothing (because at 71 Hz you are still getting the 60Hz noise, but at 72Hz, you are not, so your signal-to-noise ratio dramatically changes). I've attached a pic showing something similar caused by 50 Hz line noise (in EEG, with ~12Hz freq smoothing). So I'd suggest checking the FFT of your data and possibly putting in a notch at 60 Hz if there's a big peak there. Cheers, Matt On 16/11/2012 14:51, Frederic Roux wrote: > > Dear Andreas, > > if you used a 50 Hz notch filter in your > preprocessing, that is probably the reason > why you are seeing the 'artificial' cut > between 30 and 70 Hz. > > My guess is that you ran your notch filter > on segmented epochs of a few seconds (resulting > in a low spectral resolution for your notch filter). > This will wipe out a ~10Hz box (in your case I'm just guessing) > around the line noise frequency. > > Running the multitaper on top of that may explain > the pattern you are observing. > > > Best, > > Fred > ----- Original Message ----- > From: "Andreas Sauer" > To: "FieldTrip discussion list" > Sent: Friday, November 16, 2012 2:36:01 PM > Subject: [FieldTrip] Problem with TFR calculation using multitaper > > > Dear all, > > I have encountered a problem when trying to calculate the power spectrum of my data and I was wondering if anyone could help me to determine the origin of this problem. > > For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing and a time window with a length of 500 ms ending up with 10 tapers for the TFR calculation (the freq range is 20 - 200 Hz): > > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'MEG'; > cfg.method = 'mtmconvol'; > cfg.taper = 'dpss'; > cfg.keeptrials = 'no'; > cfg.foi = [20:1:200]; > cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, from -0.8 to 1.2 s > cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- 11 Hz > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 500 ms > cfg.pad = 'maxperlen'; > > TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = ft_freqanalysis(cfg,DataOut); > > After calculation I did a baseline normalization: > > > cfg = []; > cfg.baseline = [-0.4 -0.1]; > cfg.baselinetype = 'relchange'; > > TFR_HighGamma{subject,condition} = ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); > > averaged: > > > cfg = []; > cfg.channel = 'ParOcc'; % parietal and occipital channels > GA_TFR_HighGamma{condition} = ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); > > and finally plotted the spectrum: > > > time(1) = 3; % -400 ms > time(2) = 27; % 800 ms > indFreq = [20 200]; > freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); > > power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); > power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); > power = mean(power,1); > > fig = figure; > set(fig,'PaperUnits','centimeters'); > set(fig,'Units','centimeters'); > set(fig,'PaperSize',[15 15]); > set(fig,'PaperPosition',[0 0 14 14]); > set(gcf,'Color',[1 1 1]); > > ha = gca; > pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); > set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); > shading interp; > xlim([-0.4 0.8]); > ylim([40 120]); > caxis([-.2 .2]); > hold on; > ha = gca; > plot([0 0],[40 120],'k--','LineWidth',1); > set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); > set(ha,'YTick',[40 60 80 100 120]); > colorbar('SouthOutside'); > xlabel('Time [sec]'); > ylabel('Frequency [Hz]'); > > The resulting plot looks strange to me since there is this artifical "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different from the "strange" ones described there. > I also attached a screenshot of the MultiplotTFR and there you can see the strange "effect" clearly in channels MLO22 or MRO22 for example. > > Is something wrong with my TFR calculation? Or does the problem arise from an earlier step in the preprocessing? > > Any help or advice would be greatly appreciated! > > Best, > > Andreas > -- Dr. Matt Craddock Post-doctoral researcher, Institute of Psychology, University of Leipzig, Seeburgstr. 14-20, 04103 Leipzig, Germany Phone: +49 341 973 95 44 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From sauer.mpih at googlemail.com Sat Nov 17 15:58:25 2012 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Sat, 17 Nov 2012 15:58:25 +0100 Subject: [FieldTrip] Problem with TFR calculation using multitaper In-Reply-To: References: <50A660AE.8000606@uni-leipzig.de> <6f87de3f-b420-409f-8136-5c4712ece41d@thalamus_p> Message-ID: Hi Matt, Hi Fred, thanks for your answers! It helped a lot! The artifact seems indeed to be due to the 60 Hz refresh rate of our beamer. I filtered the data again and the result is pretty clear (see attached picture - one subject). Thanks again and a nice weekend for you two! Best, Andreas > 2012/11/17 Frederic Roux > >> Hi Matt, Hi Andreas, >> >> Indeed, I remember seeing strong 60 Hz line noise as >> a result of the beamer refresh rate (60Hz). >> >> Best, >> Fred >> >> >> ----- Original Message ----- >> From: "Matt Craddock" >> To: "FieldTrip discussion list" >> Sent: Friday, November 16, 2012 4:50:06 PM >> Subject: Re: [FieldTrip] Problem with TFR calculation using multitaper >> >> Dear Andreas and Frederic, >> >> Another possibility would be a 60 Hz signal (a steady-state evoked >> potential to monitor refresh rate, for example) running throughout the >> trial, including in the baseline period. Given that you're using 11 Hz >> frequency smoothing, this would effectively be smeared across the 49-71 >> Hz range. >> >> You'd have a much higher baseline signal in the 49-71 Hz range (because >> of the 60 Hz signal appearing in all those frequencies), but the >> strength of the actual signal in those ranges wouldn't differ. So, the >> signal-to-baseline ratio would be much lower (because your >> signal-to-noise ratio is worse), and that'd created the appearance of >> boundaries at the edges of the frequency smoothing (because at 71 Hz you >> are still getting the 60Hz noise, but at 72Hz, you are not, so your >> signal-to-noise ratio dramatically changes). >> >> I've attached a pic showing something similar caused by 50 Hz line noise >> (in EEG, with ~12Hz freq smoothing). >> >> So I'd suggest checking the FFT of your data and possibly putting in a >> notch at 60 Hz if there's a big peak there. >> >> Cheers, >> Matt >> >> >> On 16/11/2012 14:51, Frederic Roux wrote: >> > >> > Dear Andreas, >> > >> > if you used a 50 Hz notch filter in your >> > preprocessing, that is probably the reason >> > why you are seeing the 'artificial' cut >> > between 30 and 70 Hz. >> > >> > My guess is that you ran your notch filter >> > on segmented epochs of a few seconds (resulting >> > in a low spectral resolution for your notch filter). >> > This will wipe out a ~10Hz box (in your case I'm just guessing) >> > around the line noise frequency. >> > >> > Running the multitaper on top of that may explain >> > the pattern you are observing. >> > >> > >> > Best, >> > >> > Fred >> > ----- Original Message ----- >> > From: "Andreas Sauer" >> > To: "FieldTrip discussion list" >> > Sent: Friday, November 16, 2012 2:36:01 PM >> > Subject: [FieldTrip] Problem with TFR calculation using multitaper >> > >> > >> > Dear all, >> > >> > I have encountered a problem when trying to calculate the power >> spectrum of my data and I was wondering if anyone could help me to >> determine the origin of this problem. >> > >> > For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing >> and a time window with a length of 500 ms ending up with 10 tapers for the >> TFR calculation (the freq range is 20 - 200 Hz): >> > >> > >> > cfg = []; >> > cfg.output = 'pow'; >> > cfg.channel = 'MEG'; >> > cfg.method = 'mtmconvol'; >> > cfg.taper = 'dpss'; >> > cfg.keeptrials = 'no'; >> > cfg.foi = [20:1:200]; >> > cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, >> from -0.8 to 1.2 s >> > cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- >> 11 Hz >> > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = >> 500 ms >> > cfg.pad = 'maxperlen'; >> > >> > TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = >> ft_freqanalysis(cfg,DataOut); >> > >> > After calculation I did a baseline normalization: >> > >> > >> > cfg = []; >> > cfg.baseline = [-0.4 -0.1]; >> > cfg.baselinetype = 'relchange'; >> > >> > TFR_HighGamma{subject,condition} = >> ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); >> > >> > averaged: >> > >> > >> > cfg = []; >> > cfg.channel = 'ParOcc'; % parietal and occipital channels >> > GA_TFR_HighGamma{condition} = >> ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); >> > >> > and finally plotted the spectrum: >> > >> > >> > time(1) = 3; % -400 ms >> > time(2) = 27; % 800 ms >> > indFreq = [20 200]; >> > freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); >> > >> > power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); >> > power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); >> > power = mean(power,1); >> > >> > fig = figure; >> > set(fig,'PaperUnits','centimeters'); >> > set(fig,'Units','centimeters'); >> > set(fig,'PaperSize',[15 15]); >> > set(fig,'PaperPosition',[0 0 14 14]); >> > set(gcf,'Color',[1 1 1]); >> > >> > ha = gca; >> > >> pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); >> > set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); >> > shading interp; >> > xlim([-0.4 0.8]); >> > ylim([40 120]); >> > caxis([-.2 .2]); >> > hold on; >> > ha = gca; >> > plot([0 0],[40 120],'k--','LineWidth',1); >> > set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); >> > set(ha,'YTick',[40 60 80 100 120]); >> > colorbar('SouthOutside'); >> > xlabel('Time [sec]'); >> > ylabel('Frequency [Hz]'); >> > >> > The resulting plot looks strange to me since there is this artifical >> "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different >> from the "strange" ones described there. >> > I also attached a screenshot of the MultiplotTFR and there you can see >> the strange "effect" clearly in channels MLO22 or MRO22 for example. >> > >> > Is something wrong with my TFR calculation? Or does the problem arise >> from an earlier step in the preprocessing? >> > >> > Any help or advice would be greatly appreciated! >> > >> > Best, >> > >> > Andreas >> > >> >> >> -- >> Dr. Matt Craddock >> >> Post-doctoral researcher, >> Institute of Psychology, >> University of Leipzig, >> Seeburgstr. 14-20, >> 04103 Leipzig, Germany >> Phone: +49 341 973 95 44 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Dipl.-Psych. Andreas Sauer > Max Planck Institute for Brain Research > Deutschordenstraße 46 > 60528 Frankfurt am Main > Germany > > T: +49 69 96769 278 > F: +49 69 96769 327 > Email: sauer.mpih at gmail.com > www.brain.mpg.de > > -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 60HzFiltered.jpg Type: image/jpeg Size: 82747 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Not60HzFiltered.jpg Type: image/jpeg Size: 83986 bytes Desc: not available URL: From m.chait at ucl.ac.uk Mon Nov 19 10:20:08 2012 From: m.chait at ucl.ac.uk (Chait, Maria) Date: Mon, 19 Nov 2012 09:20:08 +0000 Subject: [FieldTrip] Post Doc Position at UCL Ear Institute Message-ID: <3BA3DF582C0B7542AE0CB625F0119AB816FBE0F2@AMSPRD0104MB100.eurprd01.prod.exchangelabs.com> Dear Colleagues, I am writing to point your attention to a research associate (Post Doc) job opening at the UCL Ear Institute and would be grateful if you could distribute the advert to relevant members of your institution. Please note the deadline is this Thursday. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Research Associate (Post Doc)- Ref: 1288813 Closing Date: 22/11/2012 A research associate (Post Doc) position (starting salary £32,055 per annum Inclusive of London allowance) is available to work on a BBSRC funded project that will use psychophysics, eye tracking and MEG functional brain imaging to investigate the neural systems that support listeners ability to detect changes in acoustic scenes. You will be supervised by Dr Maria Chait. The post holder will be based at UCL Ear Institute and MEG scanning will be carried out at UCL's Wellcome Trust Centre for Neuroimaging. Initial funding for this post is available for 36 months. The UCL Ear Institute provides state-of-the-art research facilities across a wide range of disciplines and is one of the foremost centres for hearing, speech and language-related research within Europe. The Wellcome Trust Centre for Neuroimaging is a leading centre for brain imaging, bringing together clinicians and scientists who study higher cognitive function using neuroimaging techniques. Key Requirements Applicants should hold a PhD degree (or equivalent) in an engineering or Neuroscience-related subject and have substantial experience in digital signal processing and computer programming. Previous experience with auditory research and/or functional brain imaging is desirable. Further Details You should apply for this post (Ref #: 1288813) through UCL's online recruitment website, www.ucl.ac.uk/hr/jobs, where you can download a job description and person specifications. For an informal discussion please contact Dr. Maria Chait (m.chait at ucl.ac.uk). Maria Chait PhD m.chait at ucl.ac.uk Senior Lecturer UCL Ear Institute 332 Gray's Inn Road London WC1X 8EE -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron__t at hotmail.com Mon Nov 19 19:11:59 2012 From: aaron__t at hotmail.com (Aaron T) Date: Mon, 19 Nov 2012 10:11:59 -0800 Subject: [FieldTrip] ft_spiketriggeredspectrum questions Message-ID: Hi, I'm trying to get started with dsp and running into some difficulty grasping the proper use of ft_spiketriggeredspectrum and ft_spiketriggeredspectrum_stat. The sample code at the bottom uses LFP data that has already been bandpassed filtered (theta); I am trying to examine spike-lfp statistics in theta, and would greatly appreciate help figuring out how to analyze spike phases. The issues I am having relate to the use of the cfg.method (mtmfft vs convol), foo and timwin/t_ftimwin and foi. As well as perhaps the use of ft_spiketriggeredspectrum_stat generally. 1) Should .foi be specified if the data is already filtered? I changed the code below to restrict foi to a plv (8Hz) I would be able to simplify and understand, but I am guessing I should use theta ranges? I've tried code that replicates (and also values that further limit) the frequency of the bp filter, but am not sure how .foi is intended to be used here. 2) Ive gone through the tutorials, and according to code snippet in the timefrequencyanalysis tutorial tfrhann.freq = "% Array of frequencies of interest (the elements of freq may be different from your cfg.foi input depending on your trial length) ". I'm not quite sure what that means? When I use the single frequency of 8Hz and cfg.timwin = [-0.5 0.5]; %1 second window I receive (for data with 82 trials, single spike channel, 11 lap channels) a 1x151 double array of values as the tfrSample.ang value in the code below (using mtmfft as the cfg.method). The 151 array columns (frequencies) appear to converge on two separate values (in odd and even columns respectively). I'm not understanding what these represent? 3) When I change the timwin to [-0.25 0.25] I receive fewer values (1x7 ), again with what appears to be two converging sets of values, but they are not terribly similar to the 1 second values I am receiving. 4) cfg.method = convol results in a single tfrSample.ang value, but while cfg.t_ftimwin = 4./cfg.foi and cfg.t_ftimwin = 4./cfg.foi yield a somewhat similar answer, cfg.t_ftimwin = 16 ./cfg.foi is completely different. 5) Am I correct that the input for ft_spiketriggeredspectrum_stat should be the decomposed spike data as in the code below (vs spike)? 6) In contrast to the ang method in ft_spiketriggeredspectrum_stat, using angle(stsFFT.fourierspctrm{1}) in Example1 yields an array that I believe represents spikes * lfp channels * the same 151 frequency values. I'm not sure I understand the difference between angle and the ft _stat ang method? 7) is mtmfft just a faster version of fft? Sample Code (multiple examples): if Example1 cfg = []; cfg.method = 'fft'; cfg.timwin = [-0.5 0.5]; cfg.foi = 8; cfg.taper = 'hanning'; cfg.spikechannel = FFTSpikeChannel; cfg.channel = data_lfp.label; stsFFT = ft_spiketriggeredspectrum(cfg, data_all); ang = angle(stsFFT.fourierspctrm{1}); cfgTfr1 = []; cfgTfr1.method = 'ang'; tfr1 = ft_spiketriggeredspectrum_stat(cfgTfr1,stsFFT); end if Example2 cfg.timwin = [-0.25 0.25]; % time window of 500 msec end if Example3 cfg.method = 'mtmfft'; cfg.foi = 8; cfg.t_ftimwin = 8 ./ cfg.foi; % 8 cycles per frequency end if Example4 ConvolSpikeChannel = spike.label{1}; cfg.spikechannel = ConvolSpikeChannel; cfg.method = 'convol'; cfg.foi = 8; cfg.t_ftimwin = 4./cfg.foi; % 4 cycles per frequency stsConvol = ft_spiketriggeredspectrum(cfg, data_all); tfr4 = ft_spiketriggeredspectrum_stat(cfgTfr,stsConvol); end if Example5 cfg.t_ftimwin = 8./cfg.foi; % 8 cycles per frequency, also try 16 cycles end I apologize in advance as I am very new to dsp and suspect my problems may be related to my own ignorance and lack of understanding of the principles and not just fieldtrip usage, so if anyone can make sense out of this much too lengthy post I would greatly appreciate any guidance! Thanks. Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Mon Nov 19 22:16:09 2012 From: luke.bloy at gmail.com (Luke Bloy) Date: Mon, 19 Nov 2012 16:16:09 -0500 Subject: [FieldTrip] reading neuromag Polhemous data Message-ID: <50aaa19a.241f340a.2186.ffffe658@mx.google.com> Hi I'd like to be able to read in the polhemous digitized data that is stored in the fif files alongside the functional data. Has anyone done this? Thanks Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Tue Nov 20 17:10:24 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Tue, 20 Nov 2012 17:10:24 +0100 (CET) Subject: [FieldTrip] ICA decomposition & backprojection In-Reply-To: <36E953F5321EB743AC6B338995A56D63250662@UM-EXCDAG-A01.um.gwdg.de> Message-ID: <88f2a9a2-4d3b-4980-912c-0e90ecf3fa6f@thalamus_p> Dear Patrick, I just stumbled across your post from a while ago. Since I am far from being an expert, take anything I say with a grain of salt. If you reject components in your raw data at MEG sensor level with ICA what will happen is that you will end up with a rank deficient covariance matrix. Assuming that you you reject 3 components, your matrix will have a rank of N-3, instead of N (because you just lost 3 linear independent components), where N is the number of linearly independent time series in your channel x time matrix. So instead of having a Nx3 leadfield matrix, you end up with a N-3x3 leadfield matrix. However, since the inverse problem is anyways heavily underdetermined (ie the number of sensors is way smaller than the possible number of dipoles), this shouldn't matter much as long as you keep the number of components down to a few (eg ECG and EOG). For example rejecting n = 100 components would results in a rank N-100, which I guess could cause some troubles. So my advice would be to keep the number of rejected IC components to a strict minimum (eg 1 or 2 ECG components and 1 or 2 EOG components). You should also compare the results of your beamformer with and without ICA cleaning to see any changes related to the ICA application. Best wishes, Fred ----- Original Message ----- From: "Patrick Jung" To: fieldtrip at science.ru.nl Sent: Wednesday, November 14, 2012 6:24:32 PM Subject: [FieldTrip] ICA decomposition & backprojection Dear Fieldtrippers, if I do ICA in my preprocessing to reject EOG and ECG signals, the new MEG guidelines say that this might alter later source reconstruction and connectivity analyses (which I aim to do). So, worried about this, I wonder if applying ft_rejectcomponent on my raw dataset 1.) automatically modifies the leadfield matrix? 2.) the unmixing (and mixing?) matrix is saved in the new data structure somewhere (to evtl make use of it at later analysis steps)? 3.) automatically stores the information how many and what ICA components were subtracted from the data in my new data structure. Would you generally discourage to apply ICA in the preprocessing when planning source reconstruction and connectivity analysis? It’s a complicated topic for me as a clinician so I hope there is no mixing in my questions ;-) Many thanks for your answers, Patrick _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From liad.glz at gmail.com Wed Nov 21 07:01:56 2012 From: liad.glz at gmail.com (liad glz) Date: Tue, 20 Nov 2012 22:01:56 -0800 Subject: [FieldTrip] Can I use FieldTrip plotting on an existing data? Message-ID: I have two matrices that include EEG data for two experimental conditions (channelsXtimepointsXsubjects). The data has already been preprocessed. I would like to use FieldTrip in order to plot topographic maps for the difference between the conditions, and I see that the function requires many input variables that were manufactured by the previous functions in FieldTrip. Does that mean that I cannot use a function without running all the previous ones on the raw data? Many thanks Liad -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Nov 21 08:46:22 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 21 Nov 2012 08:46:22 +0100 Subject: [FieldTrip] Can I use FieldTrip plotting on an existing data? In-Reply-To: References: Message-ID: Dear Liad, FieldTrip data structures are just Matlab structures, so with some custom Matlab code you should be able to convert any arbitrary data matrix into FT style. The data you have resembles the output of FT's ft_timelockgrandaverage function, with keepindividual='yes' specified. It should look something like this to be compatible with FT: data = label: {152x1 cell} % channel labels avg: [152x900 double] % grand average, chanXtime var: [152x900 double] % variance, chanXtime time: [1x900 double] % time axis, in seconds individual: [10x152x900 double] % subjXchanXtime, individual averages dimord: 'subj_chan_time' % keep as is, dimensionality ordering for the fields Alternatively, you could put the difference data in a 'simple' (single-subject) timelock data structure, which would also allow it to be plotted. This approach is probably the easiest, if all you want to use FT for is plotting the topography of difference. Have a look at http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_defined for how to create a simple timelock data structure. Best, Eelke On 21 November 2012 07:01, liad glz wrote: > I have two matrices that include EEG data for two experimental conditions > (channelsXtimepointsXsubjects). The data has already been preprocessed. I > would like to use FieldTrip in order to plot topographic maps for the > difference between the conditions, and I see that the function requires many > input variables that were manufactured by the previous functions in > FieldTrip. Does that mean that I cannot use a function without running all > the previous ones on the raw data? > > Many thanks > Liad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From patrick.jung at esi-frankfurt.de Wed Nov 21 09:17:17 2012 From: patrick.jung at esi-frankfurt.de (Jung, Patrick) Date: Wed, 21 Nov 2012 08:17:17 +0000 Subject: [FieldTrip] ICA decomposition & backprojection In-Reply-To: <88f2a9a2-4d3b-4980-912c-0e90ecf3fa6f@thalamus_p> References: <36E953F5321EB743AC6B338995A56D63250662@UM-EXCDAG-A01.um.gwdg.de> <88f2a9a2-4d3b-4980-912c-0e90ecf3fa6f@thalamus_p> Message-ID: <36E953F5321EB743AC6B338995A56D63250C7A@UM-EXCDAG-A01.um.gwdg.de> Dear Fred, thanks for your reply and explanation. Your last sentence seems to be a good advice, although time-consuming. I will compare the results of beamforming with and without ICA cleaning. Best, Patrick -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Frederic Roux Sent: 20 November 2012 17:10 To: FieldTrip discussion list Subject: Re: [FieldTrip] ICA decomposition & backprojection Dear Patrick, I just stumbled across your post from a while ago. Since I am far from being an expert, take anything I say with a grain of salt. If you reject components in your raw data at MEG sensor level with ICA what will happen is that you will end up with a rank deficient covariance matrix. Assuming that you you reject 3 components, your matrix will have a rank of N-3, instead of N (because you just lost 3 linear independent components), where N is the number of linearly independent time series in your channel x time matrix. So instead of having a Nx3 leadfield matrix, you end up with a N-3x3 leadfield matrix. However, since the inverse problem is anyways heavily underdetermined (ie the number of sensors is way smaller than the possible number of dipoles), this shouldn't matter much as long as you keep the number of components down to a few (eg ECG and EOG). For example rejecting n = 100 components would results in a rank N-100, which I guess could cause some troubles. So my advice would be to keep the number of rejected IC components to a strict minimum (eg 1 or 2 ECG components and 1 or 2 EOG components). You should also compare the results of your beamformer with and without ICA cleaning to see any changes related to the ICA application. Best wishes, Fred ----- Original Message ----- From: "Patrick Jung" To: fieldtrip at science.ru.nl Sent: Wednesday, November 14, 2012 6:24:32 PM Subject: [FieldTrip] ICA decomposition & backprojection Dear Fieldtrippers, if I do ICA in my preprocessing to reject EOG and ECG signals, the new MEG guidelines say that this might alter later source reconstruction and connectivity analyses (which I aim to do). So, worried about this, I wonder if applying ft_rejectcomponent on my raw dataset 1.) automatically modifies the leadfield matrix? 2.) the unmixing (and mixing?) matrix is saved in the new data structure somewhere (to evtl make use of it at later analysis steps)? 3.) automatically stores the information how many and what ICA components were subtracted from the data in my new data structure. Would you generally discourage to apply ICA in the preprocessing when planning source reconstruction and connectivity analysis? It’s a complicated topic for me as a clinician so I hope there is no mixing in my questions ;-) Many thanks for your answers, Patrick _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jan.schoffelen at donders.ru.nl Wed Nov 21 09:30:40 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 21 Nov 2012 09:30:40 +0100 Subject: [FieldTrip] ICA decomposition & backprojection In-Reply-To: <36E953F5321EB743AC6B338995A56D63250662@UM-EXCDAG-A01.um.gwdg.de> References: <36E953F5321EB743AC6B338995A56D63250662@UM-EXCDAG-A01.um.gwdg.de> Message-ID: Hi Patrick, > 1.) automatically modifies the leadfield matrix? No, not automatically. However, if you construct the leadfields, and use the grad-structure from the ICA-cleaned data, then you should be fine, because the subspace projection is applied both to the time courses and to the gradiometer description. > 2.) the unmixing (and mixing?) matrix is saved in the new data structure somewhere (to evtl make use of it at later analysis steps)? No, the unmixing and mixing matrices are stored in the comp-structure, which you obtain after ft_componentanalysis. They are not passed on to data structures obtained from processing steps downstream. If you want to keep track of this, you should save the comp-structure, or at least the mixing and unmixing matrices (along with the topolabel and label fields). The component time courses are to some extent redundant, because these can be easily computed from the data. > 3.) automatically stores the information how many and what ICA components were subtracted from the data in my new data structure. Yes, this info is stored in data.cfg.component, where data is the output structure after calling ft_rejectcomponent. > Would you generally discourage to apply ICA in the preprocessing when planning source reconstruction and connectivity analysis? No, I wouldn't. Yet it should be applied with care, and I would indeed check the results of the analysis pipeline with and without ICA-cleaning. Cheers, JM Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrick.jung at esi-frankfurt.de Wed Nov 21 09:43:21 2012 From: patrick.jung at esi-frankfurt.de (Jung, Patrick) Date: Wed, 21 Nov 2012 08:43:21 +0000 Subject: [FieldTrip] ICA decomposition & backprojection In-Reply-To: References: <36E953F5321EB743AC6B338995A56D63250662@UM-EXCDAG-A01.um.gwdg.de> Message-ID: <36E953F5321EB743AC6B338995A56D63250CA0@UM-EXCDAG-A01.um.gwdg.de> Thanks, Jan-Mathijs! Your answers made things much clearer to me. Best, Patrick From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of jan-mathijs schoffelen Sent: 21 November 2012 09:31 To: FieldTrip discussion list Subject: Re: [FieldTrip] ICA decomposition & backprojection Hi Patrick, 1.) automatically modifies the leadfield matrix? No, not automatically. However, if you construct the leadfields, and use the grad-structure from the ICA-cleaned data, then you should be fine, because the subspace projection is applied both to the time courses and to the gradiometer description. 2.) the unmixing (and mixing?) matrix is saved in the new data structure somewhere (to evtl make use of it at later analysis steps)? No, the unmixing and mixing matrices are stored in the comp-structure, which you obtain after ft_componentanalysis. They are not passed on to data structures obtained from processing steps downstream. If you want to keep track of this, you should save the comp-structure, or at least the mixing and unmixing matrices (along with the topolabel and label fields). The component time courses are to some extent redundant, because these can be easily computed from the data. 3.) automatically stores the information how many and what ICA components were subtracted from the data in my new data structure. Yes, this info is stored in data.cfg.component, where data is the output structure after calling ft_rejectcomponent. Would you generally discourage to apply ICA in the preprocessing when planning source reconstruction and connectivity analysis? No, I wouldn't. Yet it should be applied with care, and I would indeed check the results of the analysis pipeline with and without ICA-cleaning. Cheers, JM Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mengtongxiao at gmail.com Wed Nov 21 08:20:08 2012 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Wed, 21 Nov 2012 15:20:08 +0800 Subject: [FieldTrip] help Message-ID: Dear all, I am a new user.I want to know if I use it to compute inverse source in cortex,how can i know where are the bordmann ares in source space,in order to compute function connectivity ? thanks a lot, tongxiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Wed Nov 21 11:30:50 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Wed, 21 Nov 2012 11:30:50 +0100 Subject: [FieldTrip] ft_freqstatistics tutorial question Message-ID: Dear all, I have one doubt. I want to calculate ft_freqstatistics on my MEG date obtained form ft_freqanalysis. However, I see now in ft_freqstatistics tutorial that you suggest that operation should be done on planar gradient data. So, the first ft_megplanar and then ft_freqanalysis, ft_combineplanar and ft_freqstatistics. My question is, does this step of calculating planar gradients for time frequency analysis is necessary or not? Could I apply statistic on the data from ft_freqanalysis without any involvement of planar gradients calculation. Thank you in advance! All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Nov 21 12:47:25 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 21 Nov 2012 12:47:25 +0100 Subject: [FieldTrip] ft_freqstatistics tutorial question In-Reply-To: References: Message-ID: Dear Nenad, Strictly speaking, planar gradient transformation is not necessary, so you can just skip those steps if you really want to. However, if you have axial gradiometer data (as I seem to recall from your earlier posts) and want to do TF-analysis and -statistics on sensor level, I would strongly recommend applying a planar gradient transformation. Axial gradiometer data will produce maximal deflections (of opposite polarity) on both sides of a current dipole, while planar gradiometer data produces a positive maximum exactly above the source. If you apply TF-analysis to axial gradiometer data, you will get two spatially separated 'blobs' where there was only a single oscillating dipole in the brain. If you look at power (as is typically done), you will lose the polarity information, and hence interpreting the power topography in terms of brain is nearly impossible with axial gradient data. Best, Eelke On 21 November 2012 11:30, Nenad Polomac wrote: > Dear all, > > I have one doubt. I want to calculate ft_freqstatistics on my MEG date > obtained form ft_freqanalysis. However, I see now in ft_freqstatistics > tutorial that you suggest that operation should be done on planar gradient > data. So, the first ft_megplanar and then ft_freqanalysis, ft_combineplanar > and ft_freqstatistics. My question is, does this step of calculating planar > gradients for time frequency analysis is necessary or not? Could I apply > statistic on the data from ft_freqanalysis without any involvement of planar > gradients calculation. > Thank you in advance! > > All the best! > > Nenad > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Wed Nov 21 14:37:54 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 21 Nov 2012 14:37:54 +0100 Subject: [FieldTrip] help In-Reply-To: References: Message-ID: <50ACD932.4080109@donders.ru.nl> Dear tongxiao, You need to specify an atlas, which will work as a look-up table. When calling ft_sourceplot you need to specify cfg.atlas and point to an atlas file on your harddrive, please have a look here: http://fieldtrip.fcdonders.nl/faq/how_can_i_determine_the_anatomical_label_of_a_source?s[]=atlas Alternatively, you can look up the coordinates manually, e.g. sourceplot in interactive mode allows you to click on a location, and it will return the coordinates in a particular coordinate system (depends on what you put in, could be MNI). Best, Jörn On 11/21/2012 8:20 AM, ?? wrote: > Dear all, > I am a new user.I want to know if I use it to compute inverse source > in cortex,how can i know where are the bordmann ares in source > space,in order to compute function connectivity ? > thanks a lot, > tongxiao > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Wed Nov 21 14:39:56 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Wed, 21 Nov 2012 07:39:56 -0600 Subject: [FieldTrip] help Message-ID: Hello Tongxiao, If you're using your own MR images for source estimation, then you will have had to process the images in Freesurfer before you used Fieldtrip to estimate the sources (see http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate). When you do the segmentation in Freesurfer, you can do an automatic cortical parcellation (http://surfer.nmr.mgh.harvard.edu/fswiki/CorticalParcellation) which will divide the brain up into known regions based on anatomical landmarks; many of these correspond to Brodmann areas. Best, Steve Message: 2 > Date: Wed, 21 Nov 2012 15:20:08 +0800 > From: ?? > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] help > Message-ID: > < > CADiddyVebZ3FCvMqk4J6NymniPrqJaiBHB4nh5zeWCKcNSMSew at mail.gmail.com> > Content-Type: text/plain; charset="gb2312" > > Dear all? > > > I am a new user.I want to know if I use it to compute inverse source in > cortex,how can i know where are the bordmann ares in source space,in order > to compute function connectivity ? > > thanks a lot, > tongxiao > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Nov 21 14:55:10 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 21 Nov 2012 14:55:10 +0100 Subject: [FieldTrip] help In-Reply-To: <50ACD932.4080109@donders.ru.nl> References: <50ACD932.4080109@donders.ru.nl> Message-ID: <50ACDD3E.5050801@donders.ru.nl> of course my answer is only valid when you normalized the brain to a template (and use an atlas that is associated with that template). Pretty sure that Stephen is right in case you are using Freesurfer ;) On 11/21/2012 2:37 PM, "Jörn M. Horschig" wrote: > Dear tongxiao, > > You need to specify an atlas, which will work as a look-up table. When > calling ft_sourceplot you need to specify cfg.atlas and point to an > atlas file on your harddrive, please have a look here: > http://fieldtrip.fcdonders.nl/faq/how_can_i_determine_the_anatomical_label_of_a_source?s[]=atlas > > Alternatively, you can look up the coordinates manually, e.g. > sourceplot in interactive mode allows you to click on a location, and > it will return the coordinates in a particular coordinate system > (depends on what you put in, could be MNI). > > Best, > Jörn > > On 11/21/2012 8:20 AM, ?? wrote: >> Dear all, >> I am a new user.I want to know if I use it to compute inverse source >> in cortex,how can i know where are the bordmann ares in source >> space,in order to compute function connectivity ? >> thanks a lot, >> tongxiao >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail:jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web:http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From ipeiker at uke.de Wed Nov 21 23:37:08 2012 From: ipeiker at uke.de (Ina Peiker) Date: Wed, 21 Nov 2012 23:37:08 +0100 Subject: [FieldTrip] ft_sourcestatistics across time and frequency Message-ID: <50AD5794.2060405@uke.de> Dear fieldtrip users, is there a possibility to perform a cluster-permutation-test on source data across time and frequency, so that clusters are connected not only spatially but also in the time and frequency domain? I did a source reconstruction (beamforming) without selecting a time point or frequency (more exploratively) and now I want to do an explorative statistic across all data. It looks like that: output from ft_sourcegrandaverage for 1 time point and 1 frequency: gm = pos: [6783x3 double] dim: [17 21 19] avg: [1x1 struct] var: [1x1 struct] dimord: 'voxel' trial: [1x40 struct] inside: [3394x1 double] outside: [3389x1 double] df: [6783x1 double] cfg: [1x1 struct] Now, I would like to use ft_sourcestatitistics with a cluster-permuation-test for more than 1 time point and 1 frequency. I tried to concatenate data by increasing dimensions in gm.trial.pow but it did not work. Is something like this implemented for source data? Any other ideas? Thank you very much! Ina -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Martin Zeitz (Vorsitzender), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus From f.roux at bcbl.eu Thu Nov 22 14:19:45 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Thu, 22 Nov 2012 14:19:45 +0100 (CET) Subject: [FieldTrip] planar gradients In-Reply-To: Message-ID: Dear all, I would like to follow up this post with another question related to the planar gradients. I am working on data aquired with a CTF 275 system but at the time of the acquisition there was a number of sensors that were broken. So I end up with n = 258 channels. After running the ft_megplanar function I get n = 516 channels. However, if I try to combine the gradients with ft_combineplanar I get an error saying that I am not providing ctf275_planar but ctf275 data. Is the fact that I do not have n = 275 sensors but 258 confusing the ft_combineplanar function, or is this related to something else? Best, Fred ----- Original Message ----- From: "Eelke Spaak" To: "FieldTrip discussion list" Sent: Wednesday, November 21, 2012 12:47:25 PM Subject: Re: [FieldTrip] ft_freqstatistics tutorial question Dear Nenad, Strictly speaking, planar gradient transformation is not necessary, so you can just skip those steps if you really want to. However, if you have axial gradiometer data (as I seem to recall from your earlier posts) and want to do TF-analysis and -statistics on sensor level, I would strongly recommend applying a planar gradient transformation. Axial gradiometer data will produce maximal deflections (of opposite polarity) on both sides of a current dipole, while planar gradiometer data produces a positive maximum exactly above the source. If you apply TF-analysis to axial gradiometer data, you will get two spatially separated 'blobs' where there was only a single oscillating dipole in the brain. If you look at power (as is typically done), you will lose the polarity information, and hence interpreting the power topography in terms of brain is nearly impossible with axial gradient data. Best, Eelke On 21 November 2012 11:30, Nenad Polomac wrote: > Dear all, > > I have one doubt. I want to calculate ft_freqstatistics on my MEG date > obtained form ft_freqanalysis. However, I see now in ft_freqstatistics > tutorial that you suggest that operation should be done on planar gradient > data. So, the first ft_megplanar and then ft_freqanalysis, ft_combineplanar > and ft_freqstatistics. My question is, does this step of calculating planar > gradients for time frequency analysis is necessary or not? Could I apply > statistic on the data from ft_freqanalysis without any involvement of planar > gradients calculation. > Thank you in advance! > > All the best! > > Nenad > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From m.lizarazu at bcbl.eu Thu Nov 22 14:21:01 2012 From: m.lizarazu at bcbl.eu (Mikel Lizarazu) Date: Thu, 22 Nov 2012 14:21:01 +0100 (CET) Subject: [FieldTrip] headshape realigment Message-ID: <87e6f8bd-38ea-49fe-8468-d50c42496896@thalamus_p> Dear Fieldtrippers, I am working with MEG data from Elekta and T1 images. I am realigning MEG data with T1 images using ft_volumerealign function selecting N,LPA,RPA points. However, I would like to know if there is a possibility to also include the headshape information (isotrak data) in the realignment to obtain a better final result. Many thanks for your answers, Patrick -- Mikel Lizarazu Predoctoral researcher www.bcbl.eu -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at mac.com Thu Nov 22 14:39:19 2012 From: nathanweisz at mac.com (Nathan Weisz) Date: Thu, 22 Nov 2012 14:39:19 +0100 Subject: [FieldTrip] headshape realigment In-Reply-To: <87e6f8bd-38ea-49fe-8468-d50c42496896@thalamus_p> References: <87e6f8bd-38ea-49fe-8468-d50c42496896@thalamus_p> Message-ID: <7ADB9F95-9DA9-4C05-8D12-D2988A4BD056@mac.com> Dear Mikel, see attached file. basically this function segments the fiducial-based-coregistered MR and alters the transformation-matrix to best fit the headshape in a least-squares sense. in practice, if your first coregistration was not too terrible this works quite fine. you can remove some very outlying headshape points as well. see some docs here: https://wiki.cimec.unitn.it/tiki-index.php?page=MRICoreg some steps are quite lengthy (segmentation) and coded in frankenstein-style (i.e. mostly by me). so if you have improvements on the code, we would be happy to get them as well. ciao, nathan On 22.11.2012, at 14:21, Mikel Lizarazu wrote: > Dear Fieldtrippers, > I am working with MEG data from Elekta and T1 images. > I am realigning MEG data with T1 images using ft_volumerealign function selecting N,LPA,RPA points. However, I would like to know if there is a possibility to also include the headshape information (isotrak data) in the realignment to obtain a better final result. > Many thanks for your answers, > Patrick > > -- > Mikel Lizarazu > Predoctoral researcher > www.bcbl.eu > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cimec_coregister.m Type: application/octet-stream Size: 4166 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From max-philipp.stenner at med.ovgu.de Thu Nov 22 19:36:59 2012 From: max-philipp.stenner at med.ovgu.de (Stenner, Max-Philipp) Date: Thu, 22 Nov 2012 18:36:59 +0000 Subject: [FieldTrip] planar gradients In-Reply-To: <4346_1353591466_50AE2AAA_4346_214_1_a9f3579c-9269-4bfa-81b0-641f3c3c2a1e@thalamus_p> References: <4346_1353591466_50AE2AAA_4346_214_1_a9f3579c-9269-4bfa-81b0-641f3c3c2a1e@thalamus_p> Message-ID: Dear Fred, I encountered a similar problem with my CTF275 data and one broken sensor before ft_freqanalysis of the planar (uncombined) data. "Confirming" the channel type with data.grad.chantype = ft_senstype(data); solved the problem (although I have to admit that I never investigated where in the ft script the problem arose). Cheers, Max ________________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Frederic Roux [f.roux at bcbl.eu] Gesendet: Donnerstag, 22. November 2012 14:19 Bis: FieldTrip discussion list Betreff: [FieldTrip] planar gradients Dear all, I would like to follow up this post with another question related to the planar gradients. I am working on data aquired with a CTF 275 system but at the time of the acquisition there was a number of sensors that were broken. So I end up with n = 258 channels. After running the ft_megplanar function I get n = 516 channels. However, if I try to combine the gradients with ft_combineplanar I get an error saying that I am not providing ctf275_planar but ctf275 data. Is the fact that I do not have n = 275 sensors but 258 confusing the ft_combineplanar function, or is this related to something else? Best, Fred ----- Original Message ----- From: "Eelke Spaak" To: "FieldTrip discussion list" Sent: Wednesday, November 21, 2012 12:47:25 PM Subject: Re: [FieldTrip] ft_freqstatistics tutorial question Dear Nenad, Strictly speaking, planar gradient transformation is not necessary, so you can just skip those steps if you really want to. However, if you have axial gradiometer data (as I seem to recall from your earlier posts) and want to do TF-analysis and -statistics on sensor level, I would strongly recommend applying a planar gradient transformation. Axial gradiometer data will produce maximal deflections (of opposite polarity) on both sides of a current dipole, while planar gradiometer data produces a positive maximum exactly above the source. If you apply TF-analysis to axial gradiometer data, you will get two spatially separated 'blobs' where there was only a single oscillating dipole in the brain. If you look at power (as is typically done), you will lose the polarity information, and hence interpreting the power topography in terms of brain is nearly impossible with axial gradient data. Best, Eelke On 21 November 2012 11:30, Nenad Polomac wrote: > Dear all, > > I have one doubt. I want to calculate ft_freqstatistics on my MEG date > obtained form ft_freqanalysis. However, I see now in ft_freqstatistics > tutorial that you suggest that operation should be done on planar gradient > data. So, the first ft_megplanar and then ft_freqanalysis, ft_combineplanar > and ft_freqstatistics. My question is, does this step of calculating planar > gradients for time frequency analysis is necessary or not? Could I apply > statistic on the data from ft_freqanalysis without any involvement of planar > gradients calculation. > Thank you in advance! > > All the best! > > Nenad > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Fri Nov 23 09:48:27 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 23 Nov 2012 09:48:27 +0100 Subject: [FieldTrip] planar gradients In-Reply-To: References: <4346_1353591466_50AE2AAA_4346_214_1_a9f3579c-9269-4bfa-81b0-641f3c3c2a1e@thalamus_p> Message-ID: Dear Fred and Max, This is a known bug in ft_senstype, and people are working on fixing it. See bugzilla: http://bugzilla.fcdonders.nl/show_bug.cgi?id=1288 . If you have anything to add to the bug reports over there, that could be helpful. For now, Max's workaround seems to do the trick. Best, Eelke On 22 November 2012 19:36, Stenner, Max-Philipp wrote: > Dear Fred, > > I encountered a similar problem with my CTF275 data and one broken sensor before ft_freqanalysis of the planar (uncombined) data. "Confirming" the channel type with > > data.grad.chantype = ft_senstype(data); > > solved the problem (although I have to admit that I never investigated where in the ft script the problem arose). > > Cheers, > Max > > ________________________________________ > Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Frederic Roux [f.roux at bcbl.eu] > Gesendet: Donnerstag, 22. November 2012 14:19 > Bis: FieldTrip discussion list > Betreff: [FieldTrip] planar gradients > > Dear all, > > I would like to follow up this post with another question > related to the planar gradients. > > I am working on data aquired with a CTF 275 system but at > the time of the acquisition there was a number of sensors > that were broken. > > So I end up with n = 258 channels. > > After running the ft_megplanar function I get n = 516 channels. > > However, if I try to combine the gradients with > ft_combineplanar > > I get an error saying that I am not providing ctf275_planar but > ctf275 data. > > Is the fact that I do not have n = 275 sensors but 258 confusing > the ft_combineplanar function, or is this related to something else? > > > Best, > > Fred > > ----- Original Message ----- > From: "Eelke Spaak" > To: "FieldTrip discussion list" > Sent: Wednesday, November 21, 2012 12:47:25 PM > Subject: Re: [FieldTrip] ft_freqstatistics tutorial question > > Dear Nenad, > > Strictly speaking, planar gradient transformation is not necessary, so > you can just skip those steps if you really want to. However, if you > have axial gradiometer data (as I seem to recall from your earlier > posts) and want to do TF-analysis and -statistics on sensor level, I > would strongly recommend applying a planar gradient transformation. > > Axial gradiometer data will produce maximal deflections (of opposite > polarity) on both sides of a current dipole, while planar gradiometer > data produces a positive maximum exactly above the source. If you > apply TF-analysis to axial gradiometer data, you will get two > spatially separated 'blobs' where there was only a single oscillating > dipole in the brain. If you look at power (as is typically done), you > will lose the polarity information, and hence interpreting the power > topography in terms of brain is nearly impossible with axial gradient > data. > > Best, > Eelke > > On 21 November 2012 11:30, Nenad Polomac wrote: >> Dear all, >> >> I have one doubt. I want to calculate ft_freqstatistics on my MEG date >> obtained form ft_freqanalysis. However, I see now in ft_freqstatistics >> tutorial that you suggest that operation should be done on planar gradient >> data. So, the first ft_megplanar and then ft_freqanalysis, ft_combineplanar >> and ft_freqstatistics. My question is, does this step of calculating planar >> gradients for time frequency analysis is necessary or not? Could I apply >> statistic on the data from ft_freqanalysis without any involvement of planar >> gradients calculation. >> Thank you in advance! >> >> All the best! >> >> Nenad >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From liad.glz at gmail.com Fri Nov 23 21:58:38 2012 From: liad.glz at gmail.com (liad glz) Date: Fri, 23 Nov 2012 12:58:38 -0800 Subject: [FieldTrip] Can I use FieldTrip plotting on an existing data? In-Reply-To: References: Message-ID: Dear Eelke, Thank you for your reply. It was indeed the answer I was hoping to get. I still have some questions about the variables though: 1. When you refer to 'var', do you mean SDs? SEs? some other measure of variance that I should calculate? 2. In the webpage you referred me to, i saw that I should also define "dof"; I gather that in the case of average across subjects, this refers to the number of subjects. Then, it will be a matrix of CHANxTIME, where all values are identical to the number of subjects. Is this correct? 3. What about the grad & cfg fields? How should I generate these? Many thanks again for your help Liad On Tue, Nov 20, 2012 at 11:46 PM, Eelke Spaak wrote: > Dear Liad, > > FieldTrip data structures are just Matlab structures, so with some > custom Matlab code you should be able to convert any arbitrary data > matrix into FT style. The data you have resembles the output of FT's > ft_timelockgrandaverage function, with keepindividual='yes' specified. > It should look something like this to be compatible with FT: > > data = > > label: {152x1 cell} % channel labels > avg: [152x900 double] % grand average, chanXtime > var: [152x900 double] % variance, chanXtime > time: [1x900 double] % time axis, in seconds > individual: [10x152x900 double] % subjXchanXtime, individual averages > dimord: 'subj_chan_time' % keep as is, dimensionality ordering > for the fields > > Alternatively, you could put the difference data in a 'simple' > (single-subject) timelock data structure, which would also allow it to > be plotted. This approach is probably the easiest, if all you want to > use FT for is plotting the topography of difference. Have a look at > > http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_defined > for how to create a simple timelock data structure. > > Best, > Eelke > > On 21 November 2012 07:01, liad glz wrote: > > I have two matrices that include EEG data for two experimental conditions > > (channelsXtimepointsXsubjects). The data has already been preprocessed. I > > would like to use FieldTrip in order to plot topographic maps for the > > difference between the conditions, and I see that the function requires > many > > input variables that were manufactured by the previous functions in > > FieldTrip. Does that mean that I cannot use a function without running > all > > the previous ones on the raw data? > > > > Many thanks > > Liad > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Sun Nov 25 16:04:09 2012 From: t.marshall at fcdonders.ru.nl (Tom Marshall) Date: Sun, 25 Nov 2012 16:04:09 +0100 Subject: [FieldTrip] ft_channelrepair with channel absent from data Message-ID: <50B23369.5020105@fcdonders.ru.nl> Hi Trippers, I'm having some difficulty reinterpolating some missing channels in my ctf275 data. These are 2 channels that were never recorded because the sensors in question were switched off. Luckily, in the documentation for ft_channelrepair I find: "*For reconstructing channels that are absent in your data*, please define your neighbours by setting cfg.method='template' and call FT_PREPARE_NEIGHBOURS *without* the data argument: cfg.neighbours = ft_prepare_neighbours(cfg); This will include channels that are missing in your in the neighbour-definition." I dutifully define such a neighbours structure: /cfg=[]// //cfg.method='template';// //cfg.template='CTF275_neighb.mat';// //n=ft_prepare_neighbours(cfg);/ This structure of course contains all 275 MEG channels, including the ones that are missing from my data. So I try to reinterpolate: / //% get the 'full' list of channel names// //for i=1:length(n)// // allchans{i,:}=n(i).label;// //end// // //% find the names of the channels that were not recorded// //missingchans=setdiff(allchans,data.label);// // //% repair// //cfg=[];// //cfg.missingchannel=missingchans;// //cfg.neighbours=n;// //cfg.method='spline';// //data_r=ft_channelrepair(cfg,data);/ this fails with: /??? Error using ==> minus// //Matrix dimensions must agree.// // //Error in ==> ft_channelrepair at 279// // d = sens.chanpos - repmat(c, numel(sensidx), 1);/ length(sensidx) is 301 and length(sens.chanpos) is 273, so the error makes sense. However at this point I get a bit stuck as 'sens' is created in line 104-108 by the function 'ft_fetch_sens' which I can't find! 'help ft_fetch_sens', 'which ft_fetch_sens' and 'edit ft_fetch_sens' all fail. I guess I have several questions all at once: 1) Is it actually possible to reinterpolate MEG channels that were never recorded - eg because the channels were deactivated when the acquisition took place? 2) What might be causing the error I'm seeing? 3) Where is ft_fetch_sens? Thanks for help with any of the above! Best, Tom -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Nov 26 10:45:55 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 26 Nov 2012 10:45:55 +0100 Subject: [FieldTrip] ft_channelrepair with channel absent from data In-Reply-To: <50B23369.5020105@fcdonders.ru.nl> References: <50B23369.5020105@fcdonders.ru.nl> Message-ID: <50B33A53.2000701@donders.ru.nl> Hey Tom, > > I guess I have several questions all at once: > 1) Is it actually possible to reinterpolate MEG channels that were > never recorded - eg because the channels were deactivated when the > acquisition took place? Should work, but only with the SSI (=spherical spline interpolation) method. For the nearest neighbour interpolation, the function constructs a list of neuighbouring and constructs a weighted average. The function, however, wants to weigh each sensor according to its distance from the sensor to be reconstructed. That information can only be found in the grad structure, but in the grad structure there are only sensors which were recorded, thus the distance from a missing sensor cannot be measured because its position is missing in the grad structure. SSI should work though, cause it relies on a different rationale. > 2) What might be causing the error I'm seeing? Since you have 301 channels rather than 275, my suspicion is that you include reference gradiometers. This should not fail in principle, though... maybe I can drop by your office to check it out? Got some time right now? > 3) Where is ft_fetch_sens? It's a private function, can be found in FieldTrip/private. You have to cd to that directory in order for Matlab to find it (the idea behind private function is that there are only visible for higher-level function and 'hidden' for all other functions). Best, Jörn > > Thanks for help with any of the above! > Best, > Tom > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email:t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at gmail.com Mon Nov 26 10:56:17 2012 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Mon, 26 Nov 2012 10:56:17 +0100 Subject: [FieldTrip] ft_channelrepair with channel absent from data In-Reply-To: <50B23369.5020105@fcdonders.ru.nl> References: <50B23369.5020105@fcdonders.ru.nl> Message-ID: Hi Tom and Trippers, To add to Jorn's more detailed answer, if you are ever in doubt as to where to find a FT function, which may be hidden in a private directory (and don't know which of the many private directories to search in), then remember that you can always search for functions on the google FT code page, which doesn't hide the private functions! http://code.google.com/p/fieldtrip/source/browse/ and after searching for ft_fetch_sens http://code.google.com/p/fieldtrip/source/search?q=ft_fetch_sens&origq=ft_fetch_sens&btnG=Search+Trunk Johanna 2012/11/25 Tom Marshall > Hi Trippers, > > I'm having some difficulty reinterpolating some missing channels in my > ctf275 data. These are 2 channels that were never recorded because the > sensors in question were switched off. > > Luckily, in the documentation for ft_channelrepair I find: > > "*For reconstructing channels that are absent in your data*, please > define your neighbours by setting cfg.method='template' and call > FT_PREPARE_NEIGHBOURS *without* the data argument: > cfg.neighbours = ft_prepare_neighbours(cfg); > This will include channels that are missing in your in the > neighbour-definition." > > I dutifully define such a neighbours structure: > > *cfg=[]** > **cfg.method='template';** > **cfg.template='CTF275_neighb.mat';** > **n=ft_prepare_neighbours(cfg);* > > This structure of course contains all 275 MEG channels, including the ones > that are missing from my data. > > So I try to reinterpolate: > * > **% get the 'full' list of channel names** > **for i=1:length(n)** > ** allchans{i,:}=n(i).label;** > **end** > ** > **% find the names of the channels that were not recorded** > **missingchans=setdiff(allchans,data.label);** > ** > **% repair** > **cfg=[];** > **cfg.missingchannel=missingchans;** > **cfg.neighbours=n;** > **cfg.method='spline';** > **data_r=ft_channelrepair(cfg,data);* > > this fails with: > > *??? Error using ==> minus** > **Matrix dimensions must agree.** > ** > **Error in ==> ft_channelrepair at 279** > ** d = sens.chanpos - repmat(c, numel(sensidx), 1);* > > length(sensidx) is 301 and length(sens.chanpos) is 273, so the error makes > sense. However at this point I get a bit stuck as 'sens' is created in line > 104-108 by the function 'ft_fetch_sens' which I can't find! 'help > ft_fetch_sens', 'which ft_fetch_sens' and 'edit ft_fetch_sens' all fail. > > I guess I have several questions all at once: > 1) Is it actually possible to reinterpolate MEG channels that were never > recorded - eg because the channels were deactivated when the acquisition > took place? > 2) What might be causing the error I'm seeing? > 3) Where is ft_fetch_sens? > > Thanks for help with any of the above! > Best, > Tom > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.chait at ucl.ac.uk Mon Nov 26 13:56:06 2012 From: m.chait at ucl.ac.uk (Chait, Maria) Date: Mon, 26 Nov 2012 12:56:06 +0000 Subject: [FieldTrip] PhD Position at UCL Ear Institute Message-ID: <3BA3DF582C0B7542AE0CB625F0119AB816FC90CF@AMSPRD0104MB100.eurprd01.prod.exchangelabs.com> Dear Colleagues, I am writing to point your attention to PhD studentship (available for an immediate start) opening at the UCL Ear Institute and would be grateful if you could distribute the advert to relevant members of your institution. A 3 year PhD studentship in auditory cognitive neuroscience is available as part of a research collaboration between the UCL Ear Institute (London, UK) and NTT Communication Science Labs (Nippon Telegraph and Telephone corporation, Atsugi, Japan). The student will be based at the UCL Ear Institute and supervised by Dr. Maria Chait. They will also be working with Prof. Makio Kashino and Dr. Shigeto Furukawa (NTT) and the research program will involve experiments conducted both at UCL and in Japan, requiring occasional travel. The project will use psychophysics, eye tracking, autonomic response measures and MEG functional brain imaging to investigate which features of sound are perceptually salient. Namely, those sounds that automatically capture attention in a busy scene, even when listeners' initial perceptual focus is elsewhere. The UCL Ear Institute provides state-of-the-art research facilities across a wide range of disciplines and is one of the foremost centres for hearing, speech and language-related research within Europe. Key Requirements The position is only available for UK/EU passport holders. Applicants should hold a 1St class, or upper 2nd bachelor's degree (masters degree an advantage) in an engineering or scientific subject. Previous experience with auditory research, functional brain imaging, neuroscience and/or acoustics is desirable. For an informal discussion, or to submit an application please contact Dr. Maria Chait (m.chait at ucl.ac.uk). Applicants should submit a supporting statement, a CV, and the details of two recommenders. Application review begins December 2012 and will continue until the position is filled. The studentship includes fees and a yearly stipend (about £16000; tax free). Maria Chait PhD m.chait at ucl.ac.uk Senior Lecturer UCL Ear Institute 332 Gray's Inn Road London WC1X 8EE -------------- next part -------------- An HTML attachment was scrubbed... URL: From elilife at gmail.com Mon Nov 26 14:38:04 2012 From: elilife at gmail.com (Eliana Garcia) Date: Mon, 26 Nov 2012 14:38:04 +0100 Subject: [FieldTrip] source statistics on event related data Message-ID: Hello Dear Fieldtrip Developers and users, I would like to know if somebody has done before a source statistic analysis on event related potentials from the output of LCMV beamformer. I have some issues with the compatibility of the cfg.parameter =''avg.mom', since it is a cell structure and the functions for grand average and source statistics works normally for double matrixes. I wonder if there is a way to deal with this (not making arranges on the functions or transforming my data to the format m=sourceFIC.avg.pow(voxels,time) double. I would also like to know how to deal with the parameters for source statistics on event related fields (such as: cfg.latency). Thanks a lot! -- Eliana García Cossio Applied Neurotechnology Lab. Graduate School of Neural and Behavioural Science - Max Planck Research School Institute of Medical Psychology and Behavioural Neurobiology Universität Tübingen (+0049) 01 577-8587604 Otfried-Müller-Str. 47, 72076 Tübingen- Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From Daniel.Keeser at med.uni-muenchen.de Mon Nov 26 15:39:04 2012 From: Daniel.Keeser at med.uni-muenchen.de (Keeser, Daniel Dr.) Date: Mon, 26 Nov 2012 15:39:04 +0100 Subject: [FieldTrip] Job offer: Simultaneous EEG and fMRI of neurofeedback In-Reply-To: <36335A466E9D6641BC7260D521A9164A7512FBE3D6@MITEX03N.helios.med.uni-muenchen.de> References: <36335A466E9D6641BC7260D521A9164A7512FBE3D3@MITEX03N.helios.med.uni-muenchen.de>, <36335A466E9D6641BC7260D521A9164A7512FBE3D6@MITEX03N.helios.med.uni-muenchen.de> Message-ID: <36335A466E9D6641BC7260D521A9164A7512FBE3D8@MITEX03N.helios.med.uni-muenchen.de> Simultaneous EEG and fMRI of neurofeedback We are seeking a motivated candidate to support the experimatal set-up, data acquistion and data analysis. The primary objective is to develop a protocol to effectively train electroencephalography (EEG) coherence between specific areas in the brain during the simultaneous recording of functional magnetic resonance imaging (fMRI) protocols. The simultaneous recording and analysis of EEG and fMRI allows to non-invasively gain new insights into brain function. Unlike the post-hoc comparison of different research methods, simultaneous measurements of EEG and fMRI offer the possibility to obtain brain functional data during the same sensory stimulation in EEG and fMRI. The two methods are complementary with respect to the temporal and spatial resolution. The results of previous studies about simultaneous EEG-fMRI indicate that EEG neurofeedback is technically feasible with an appropriate EEG data quality. Additionally, simultaneous functional connectivity MRI (fcMRI) and EEG recordings will provide new insights into the relationship between fcMRI- and associated EEG networks. The change of EEG signals through neurofeedback could lead to an immediate change in fcMRI as specific EEG frequency bands correlate with the fcMRI. Accordingly, the modulation of the EEG by neurofeedback may show a direct influence on the fcMRI. Studies will include simultaneous measurements of fcMRI and EEG with healthy volunteers and offer the opportunity to gain experience in a wide range of methodologies. In our lab we have two BrainAmp MR 32 channles amplifiers (Brain Products) and we succesfully use online correction of MR artifacts. Using this approach, we are able to give feedback to the subjects regarding their own EEG with a time delay of about 1s. We will use BCI2000 combined with Fieldtrip. Experience with BCI 2000 and/or Fieldtrip would be advantageous. Candidates should be well versed with MATLAB and should have at least basic knowledge in C#/C++. The MRi data is acquired using a 3T Siemens MR scanner. The successful applicant will have a strong interest in the research topic and will be capable of working independently. The research fellow will additionally have a master degree (or diploma) in biomedical engineering, neuroscience, informatics or psychology. Experience with fMRI and/or EEG are beneficial. The initial appointment term will be one year, starting January 2013. Salary is according to TV-L 13. Further extensions will depend on availability of funds. Please send an application letter including a brief statement outlining your motivation to apply for this particular position and a Curriculum vitae (CV) to: daniel.keeser at med.uni-muenchen.de Institute for Clinical Radiology, Ludwig-Maximilians-University, 81377 Munich, Germany. Department of Psychiatry and Psychotherapy, Ludwig-Maximilians University, 80333 Munich, Germany. ____________________________________ Dr. Daniel Keeser Post-Doctoral Research Fellow Institute of Clinical Radiology Department of Psychiatry and Psychotherapy University Munich Studienzentrum CERES 80336 Munich, Germany phone: +49 89 5160 9109 fax.: +49 89 2000 87 60 710 email: daniel.keeser at med.uni-muenchen.de http://www.klinikum.uni-muenchen.de/interest-imaging/de/index.html From monikamellem at gmail.com Tue Nov 27 00:22:51 2012 From: monikamellem at gmail.com (Monika Mellem) Date: Mon, 26 Nov 2012 18:22:51 -0500 Subject: [FieldTrip] Coherence of single trials Message-ID: Dear Fieldtrippers, I am trying to calculate coherence estimates on individual trials of our EEG data and then want to perform a within-subjects statistical test, but so far I have not been able to figure out how to do this. I am able to calculate coherence for our 22 subjects and then perform statistics on the grand average, so I understand the basic usage of these functions (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, ft_freqstatistics). But now we want to do statistical testing on individual subjects. Is it possible to keep coherence for individual trials in Fieldtrip as they seem necessary for this statistical analysis? I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and get the cross-spectra of individual trials (I also tried computing the fourier spectra but it made no difference in the following step). However, when computing the coherence in ft_connectivityanalysis, Fieldtrip averages over the trials. Is there a way to output coherence for individual trials instead? Please see the full cfg structure settings below. Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as an input to ft_freqstatistics since previous posts suggested this was for single subject coherence statistics, but our data is paired as the same stimulus appears in the 2 conditions we are comparing. Is there a paired test for single subject coherence testing, or should we use cfg.statistic = 'depsamplesT'? Many thanks for any suggestions you may have! Monika ________________ Monika Mellem PhD Candidate Interdisciplinary Program in Neuroscience Georgetown University Washington, DC msm79 at georgetown.edu 202-687-2687 *********************************************************************** cfg settings for ft_freqanalysis and ft_connectivityanalysis *********************************************************************** cfg = []; cfg.prestim = -0.5; cfg.poststim = 1.5; cfg.foilim = [2 30]; cfg.freqrange = 'low'; % cfg.output = 'fourier'; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.keeptrials = 'yes'; cfg.channel = {'all'}; cfg.channelcmb = {refchan 'all'}; cfgcoh=[]; cfgcoh.channelcmb = cfg.channelcmb; cfgcoh.method = 'coh'; v = genvarname(['CRSP_' condition '_low']); eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around ft_freqanalysis w = genvarname(['COH_' condition '_low']); eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); -------------- next part -------------- An HTML attachment was scrubbed... URL: From sherrykhan78 at gmail.com Tue Nov 27 02:38:46 2012 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Mon, 26 Nov 2012 20:38:46 -0500 Subject: [FieldTrip] Coherence of single trials In-Reply-To: References: Message-ID: Coherence we normally used is event related coherence, which measures the consistency of phase difference across trials between regions/channels, for single trial coherence there is an old paper which discuss this http://brainimaging.waisman.wisc.edu/~lutz/Lachaux_et_all_IJBChaos_2000.pdf I implemented this long time back let me me know if this is some thing of your interest. Sheraz Khan Martinos Center On Mon, Nov 26, 2012 at 6:22 PM, Monika Mellem wrote: > Dear Fieldtrippers, > > I am trying to calculate coherence estimates on individual trials of our > EEG data and then want to perform a within-subjects statistical test, but > so far I have not been able to figure out how to do this. I am able to > calculate coherence for our 22 subjects and then perform statistics on the > grand average, so I understand the basic usage of these functions > (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, > ft_freqstatistics). But now we want to do statistical testing on > individual subjects. Is it possible to keep coherence for individual > trials in Fieldtrip as they seem necessary for this statistical analysis? > > I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and > get the cross-spectra of individual trials (I also tried computing the > fourier spectra but it made no difference in the following step). However, > when computing the coherence in ft_connectivityanalysis, Fieldtrip averages > over the trials. Is there a way to output coherence for individual trials > instead? Please see the full cfg structure settings below. > > Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as > an input to ft_freqstatistics since previous posts suggested this was for > single subject coherence statistics, but our data is paired as the same > stimulus appears in the 2 conditions we are comparing. Is there a paired > test for single subject coherence testing, or should we use cfg.statistic = > 'depsamplesT'? > > Many thanks for any suggestions you may have! > Monika > ________________ > Monika Mellem > PhD Candidate > Interdisciplinary Program in Neuroscience > Georgetown University > Washington, DC > msm79 at georgetown.edu > 202-687-2687 > > *********************************************************************** > cfg settings for ft_freqanalysis and ft_connectivityanalysis > *********************************************************************** > cfg = []; > cfg.prestim = -0.5; > cfg.poststim = 1.5; > cfg.foilim = [2 30]; > cfg.freqrange = 'low'; > % cfg.output = 'fourier'; > cfg.output = 'powandcsd'; > cfg.method = 'mtmconvol'; > cfg.keeptrials = 'yes'; > cfg.channel = {'all'}; > cfg.channelcmb = {refchan 'all'}; > > cfgcoh=[]; > cfgcoh.channelcmb = cfg.channelcmb; > cfgcoh.method = 'coh'; > > v = genvarname(['CRSP_' condition '_low']); > eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around > ft_freqanalysis > > w = genvarname(['COH_' condition '_low']); > eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Nov 27 09:14:34 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 27 Nov 2012 09:14:34 +0100 Subject: [FieldTrip] Coherence of single trials In-Reply-To: References: Message-ID: <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl> Hi Monika, If you want to test across subjects in a paired fashion, you can use depsamplesT. Your dependent variable then should contain for each subject and condition the coherence (which of course should be estimated across all trials belonging to that condition). Even better would be to perform a so-called Z-transformation to the data. For some inspiration you could have a look at the following paper: http://www.jneurosci.org/content/31/18/6750.long Best, Jan-Mathijs On Nov 27, 2012, at 12:22 AM, Monika Mellem wrote: > Dear Fieldtrippers, > > I am trying to calculate coherence estimates on individual trials of our EEG data and then want to perform a within-subjects statistical test, but so far I have not been able to figure out how to do this. I am able to calculate coherence for our 22 subjects and then perform statistics on the grand average, so I understand the basic usage of these functions (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, ft_freqstatistics). But now we want to do statistical testing on individual subjects. Is it possible to keep coherence for individual trials in Fieldtrip as they seem necessary for this statistical analysis? > > I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and get the cross-spectra of individual trials (I also tried computing the fourier spectra but it made no difference in the following step). However, when computing the coherence in ft_connectivityanalysis, Fieldtrip averages over the trials. Is there a way to output coherence for individual trials instead? Please see the full cfg structure settings below. > > Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as an input to ft_freqstatistics since previous posts suggested this was for single subject coherence statistics, but our data is paired as the same stimulus appears in the 2 conditions we are comparing. Is there a paired test for single subject coherence testing, or should we use cfg.statistic = 'depsamplesT'? > > Many thanks for any suggestions you may have! > Monika > ________________ > Monika Mellem > PhD Candidate > Interdisciplinary Program in Neuroscience > Georgetown University > Washington, DC > msm79 at georgetown.edu > 202-687-2687 > > *********************************************************************** > cfg settings for ft_freqanalysis and ft_connectivityanalysis > *********************************************************************** > cfg = []; > cfg.prestim = -0.5; > cfg.poststim = 1.5; > cfg.foilim = [2 30]; > cfg.freqrange = 'low'; > % cfg.output = 'fourier'; > cfg.output = 'powandcsd'; > cfg.method = 'mtmconvol'; > cfg.keeptrials = 'yes'; > cfg.channel = {'all'}; > cfg.channelcmb = {refchan 'all'}; > > cfgcoh=[]; > cfgcoh.channelcmb = cfg.channelcmb; > cfgcoh.method = 'coh'; > > v = genvarname(['CRSP_' condition '_low']); > eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around ft_freqanalysis > > w = genvarname(['COH_' condition '_low']); > eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From monikamellem at gmail.com Tue Nov 27 12:25:52 2012 From: monikamellem at gmail.com (Monika Mellem) Date: Tue, 27 Nov 2012 06:25:52 -0500 Subject: [FieldTrip] Coherence of single trials In-Reply-To: <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl> References: <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl> Message-ID: Thank you Sheraz and Jan-Mathijs for your help! Sheraz, if you do have the code to keep single-trial coherence estimates, I would much appreciate it if you could pass it along (monikamellem at gmail.com). And Jan-Mathijs, okay, the necessary statistics make sense, and I will z-transform the data too. But as far as you know, is there no implementation already in Fieldtrip to keep the single-trial coherence estimates? I assumed setting cfg.keeptrials = 'yes' would do this, but is there something else I'm missing as this doesn't seem to work? I would prefer to try what Fieldtrip has implemented first before integrating Sheraz's code into my version of Fieldtrip. Thank you very much! Monika On Tue, Nov 27, 2012 at 3:14 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Monika, > > If you want to test across subjects in a paired fashion, you can use > depsamplesT. Your dependent variable then should contain for each subject > and condition the coherence (which of course should be estimated across all > trials belonging to that condition). Even better would be to perform a > so-called Z-transformation to the data. For some inspiration you could have > a look at the following paper: > http://www.jneurosci.org/content/31/18/6750.long > > Best, > > Jan-Mathijs > > On Nov 27, 2012, at 12:22 AM, Monika Mellem wrote: > > Dear Fieldtrippers, > > I am trying to calculate coherence estimates on individual trials of our > EEG data and then want to perform a within-subjects statistical test, but > so far I have not been able to figure out how to do this. I am able to > calculate coherence for our 22 subjects and then perform statistics on the > grand average, so I understand the basic usage of these functions > (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, > ft_freqstatistics). But now we want to do statistical testing on > individual subjects. Is it possible to keep coherence for individual > trials in Fieldtrip as they seem necessary for this statistical analysis? > > I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and > get the cross-spectra of individual trials (I also tried computing the > fourier spectra but it made no difference in the following step). However, > when computing the coherence in ft_connectivityanalysis, Fieldtrip averages > over the trials. Is there a way to output coherence for individual trials > instead? Please see the full cfg structure settings below. > > Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as > an input to ft_freqstatistics since previous posts suggested this was for > single subject coherence statistics, but our data is paired as the same > stimulus appears in the 2 conditions we are comparing. Is there a paired > test for single subject coherence testing, or should we use cfg.statistic = > 'depsamplesT'? > > Many thanks for any suggestions you may have! > Monika > ________________ > Monika Mellem > PhD Candidate > Interdisciplinary Program in Neuroscience > Georgetown University > Washington, DC > msm79 at georgetown.edu > 202-687-2687 > > *********************************************************************** > cfg settings for ft_freqanalysis and ft_connectivityanalysis > *********************************************************************** > cfg = []; > cfg.prestim = -0.5; > cfg.poststim = 1.5; > cfg.foilim = [2 30]; > cfg.freqrange = 'low'; > % cfg.output = 'fourier'; > cfg.output = 'powandcsd'; > cfg.method = 'mtmconvol'; > cfg.keeptrials = 'yes'; > cfg.channel = {'all'}; > cfg.channelcmb = {refchan 'all'}; > > cfgcoh=[]; > cfgcoh.channelcmb = cfg.channelcmb; > cfgcoh.method = 'coh'; > > v = genvarname(['CRSP_' condition '_low']); > eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around > ft_freqanalysis > > w = genvarname(['COH_' condition '_low']); > eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Nov 27 12:49:38 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 27 Nov 2012 12:49:38 +0100 Subject: [FieldTrip] Coherence of single trials In-Reply-To: References: <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl> Message-ID: Dear Monika, It may have escaped your attention while digging to the previous posts, but the question has been raised (and answered ;-) ) before. Just for the very very last time I will make the following statement: Single trial coherence estimates cannot be computed! Perhaps the font size and color will make it memorable ;-). This is due to the simple fact that coherence is defined across observations. If you have just a single observation, due to the mathematics involved, the coherence value will be 1. Since you want to do group analysis, I think you really should compute the coherence per condition, where each condition should consist of a sufficient number of trials. Assuming that the time domain data is organised such that you have all trials (irrespective of the condition) in a single structure, do something like this. for each subject cfg = []; cfg.output = 'fourier'; cfg.method = 'mtmfft'/'mtmconvol' cfg.keeptrials = 'yes'; ... freq = ft_freqanalysis(cfg, data); cfg = []; cfg.channelcmb = {something here} cfg.trials = [indices of trials belonging to condition 1]; coh1 = ft_connectivityanalysis(cfg, freq); % compute coherence across the trials for condition 1 cfg.trials = [indices of trials belonging to condition 2]; coh2 = ft_connectivityanalysis(cfg, freq); % compute coherence across the trials for condition 2 end Good luck, Jan-Mathijs On Nov 27, 2012, at 12:25 PM, Monika Mellem wrote: > Thank you Sheraz and Jan-Mathijs for your help! > Sheraz, if you do have the code to keep single-trial coherence estimates, I would much appreciate it if you could pass it along (monikamellem at gmail.com). > And Jan-Mathijs, okay, the necessary statistics make sense, and I will z-transform the data too. But as far as you know, is there no implementation already in Fieldtrip to keep the single-trial coherence estimates? I assumed setting cfg.keeptrials = 'yes' would do this, but is there something else I'm missing as this doesn't seem to work? I would prefer to try what Fieldtrip has implemented first before integrating Sheraz's code into my version of Fieldtrip. > > Thank you very much! > Monika > > > On Tue, Nov 27, 2012 at 3:14 AM, jan-mathijs schoffelen wrote: > Hi Monika, > > If you want to test across subjects in a paired fashion, you can use depsamplesT. Your dependent variable then should contain for each subject and condition the coherence (which of course should be estimated across all trials belonging to that condition). Even better would be to perform a so-called Z-transformation to the data. For some inspiration you could have a look at the following paper: http://www.jneurosci.org/content/31/18/6750.long > > Best, > > Jan-Mathijs > > On Nov 27, 2012, at 12:22 AM, Monika Mellem wrote: > >> Dear Fieldtrippers, >> >> I am trying to calculate coherence estimates on individual trials of our EEG data and then want to perform a within-subjects statistical test, but so far I have not been able to figure out how to do this. I am able to calculate coherence for our 22 subjects and then perform statistics on the grand average, so I understand the basic usage of these functions (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, ft_freqstatistics). But now we want to do statistical testing on individual subjects. Is it possible to keep coherence for individual trials in Fieldtrip as they seem necessary for this statistical analysis? >> >> I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and get the cross-spectra of individual trials (I also tried computing the fourier spectra but it made no difference in the following step). However, when computing the coherence in ft_connectivityanalysis, Fieldtrip averages over the trials. Is there a way to output coherence for individual trials instead? Please see the full cfg structure settings below. >> >> Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as an input to ft_freqstatistics since previous posts suggested this was for single subject coherence statistics, but our data is paired as the same stimulus appears in the 2 conditions we are comparing. Is there a paired test for single subject coherence testing, or should we use cfg.statistic = 'depsamplesT'? >> >> Many thanks for any suggestions you may have! >> Monika >> ________________ >> Monika Mellem >> PhD Candidate >> Interdisciplinary Program in Neuroscience >> Georgetown University >> Washington, DC >> msm79 at georgetown.edu >> 202-687-2687 >> >> *********************************************************************** >> cfg settings for ft_freqanalysis and ft_connectivityanalysis >> *********************************************************************** >> cfg = []; >> cfg.prestim = -0.5; >> cfg.poststim = 1.5; >> cfg.foilim = [2 30]; >> cfg.freqrange = 'low'; >> % cfg.output = 'fourier'; >> cfg.output = 'powandcsd'; >> cfg.method = 'mtmconvol'; >> cfg.keeptrials = 'yes'; >> cfg.channel = {'all'}; >> cfg.channelcmb = {refchan 'all'}; >> >> cfgcoh=[]; >> cfgcoh.channelcmb = cfg.channelcmb; >> cfgcoh.method = 'coh'; >> >> v = genvarname(['CRSP_' condition '_low']); >> eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around ft_freqanalysis >> >> w = genvarname(['COH_' condition '_low']); >> eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sherrykhan78 at gmail.com Tue Nov 27 13:56:05 2012 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Tue, 27 Nov 2012 07:56:05 -0500 Subject: [FieldTrip] Coherence of single trials In-Reply-To: References: <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl> Message-ID: Dear Monika, As Jan-Mathijs correctly mention Coherence is measure across trials, for single trial coherence value is one, the method I mention above also can not escape from this mathematical truth, the associated bias with the method is almost 0.9. Sheraz On Tue, Nov 27, 2012 at 6:49 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Dear Monika, > > It may have escaped your attention while digging to the previous posts, > but the question has been raised (and answered ;-) ) before. Just for the > very very last time I will make the following statement: > > *Single trial coherence estimates cannot be computed!* > * > * > Perhaps the font size and color will make it memorable ;-). This is due to > the simple fact that coherence is defined across observations. If you have > just a single observation, due to the mathematics involved, the coherence > value will be 1. > Since you want to do group analysis, I think you really should compute the > coherence per condition, where each condition should consist of a > sufficient number of trials. Assuming that the time domain data is > organised such that you have all trials (irrespective of the condition) in > a single structure, do something like this. > > for each subject > cfg = []; > cfg.output = 'fourier'; > cfg.method = 'mtmfft'/'mtmconvol' > cfg.keeptrials = 'yes'; > ... > freq = ft_freqanalysis(cfg, data); > > cfg = []; > cfg.channelcmb = {something here} > cfg.trials = [indices of trials belonging to condition 1]; > coh1 = ft_connectivityanalysis(cfg, freq); % compute coherence across > the trials for condition 1 > cfg.trials = [indices of trials belonging to condition 2]; > coh2 = ft_connectivityanalysis(cfg, freq); % compute coherence across > the trials for condition 2 > end > > > Good luck, > > Jan-Mathijs > > > On Nov 27, 2012, at 12:25 PM, Monika Mellem wrote: > > Thank you Sheraz and Jan-Mathijs for your help! > Sheraz, if you do have the code to keep single-trial coherence estimates, > I would much appreciate it if you could pass it along ( > monikamellem at gmail.com). > And Jan-Mathijs, okay, the necessary statistics make sense, and I will > z-transform the data too. But as far as you know, is there no > implementation already in Fieldtrip to keep the single-trial coherence > estimates? I assumed setting cfg.keeptrials = 'yes' would do this, but is > there something else I'm missing as this doesn't seem to work? I would > prefer to try what Fieldtrip has implemented first before integrating > Sheraz's code into my version of Fieldtrip. > > Thank you very much! > Monika > > > On Tue, Nov 27, 2012 at 3:14 AM, jan-mathijs schoffelen < > jan.schoffelen at donders.ru.nl> wrote: > >> Hi Monika, >> >> If you want to test across subjects in a paired fashion, you can use >> depsamplesT. Your dependent variable then should contain for each subject >> and condition the coherence (which of course should be estimated across all >> trials belonging to that condition). Even better would be to perform a >> so-called Z-transformation to the data. For some inspiration you could have >> a look at the following paper: >> http://www.jneurosci.org/content/31/18/6750.long >> >> Best, >> >> Jan-Mathijs >> >> On Nov 27, 2012, at 12:22 AM, Monika Mellem wrote: >> >> Dear Fieldtrippers, >> >> I am trying to calculate coherence estimates on individual trials of our >> EEG data and then want to perform a within-subjects statistical test, but >> so far I have not been able to figure out how to do this. I am able to >> calculate coherence for our 22 subjects and then perform statistics on the >> grand average, so I understand the basic usage of these functions >> (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, >> ft_freqstatistics). But now we want to do statistical testing on >> individual subjects. Is it possible to keep coherence for individual >> trials in Fieldtrip as they seem necessary for this statistical analysis? >> >> I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and >> get the cross-spectra of individual trials (I also tried computing the >> fourier spectra but it made no difference in the following step). However, >> when computing the coherence in ft_connectivityanalysis, Fieldtrip averages >> over the trials. Is there a way to output coherence for individual trials >> instead? Please see the full cfg structure settings below. >> >> Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as >> an input to ft_freqstatistics since previous posts suggested this was for >> single subject coherence statistics, but our data is paired as the same >> stimulus appears in the 2 conditions we are comparing. Is there a paired >> test for single subject coherence testing, or should we use cfg.statistic = >> 'depsamplesT'? >> >> Many thanks for any suggestions you may have! >> Monika >> ________________ >> Monika Mellem >> PhD Candidate >> Interdisciplinary Program in Neuroscience >> Georgetown University >> Washington, DC >> msm79 at georgetown.edu >> 202-687-2687 >> >> *********************************************************************** >> cfg settings for ft_freqanalysis and ft_connectivityanalysis >> *********************************************************************** >> cfg = []; >> cfg.prestim = -0.5; >> cfg.poststim = 1.5; >> cfg.foilim = [2 30]; >> cfg.freqrange = 'low'; >> % cfg.output = 'fourier'; >> cfg.output = 'powandcsd'; >> cfg.method = 'mtmconvol'; >> cfg.keeptrials = 'yes'; >> cfg.channel = {'all'}; >> cfg.channelcmb = {refchan 'all'}; >> >> cfgcoh=[]; >> cfgcoh.channelcmb = cfg.channelcmb; >> cfgcoh.method = 'coh'; >> >> v = genvarname(['CRSP_' condition '_low']); >> eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around >> ft_freqanalysis >> >> w = genvarname(['COH_' condition '_low']); >> eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rieder at med.uni-frankfurt.de Tue Nov 27 14:23:42 2012 From: rieder at med.uni-frankfurt.de (Maria Rieder) Date: Tue, 27 Nov 2012 14:23:42 +0100 Subject: [FieldTrip] problems with construction of grids for individual subjects Message-ID: <50B4BEDE.9020102@med.uni-frankfurt.de> Dear fieldtrip users, I have 2 questions regarding the construction of grids for individual subjects. This is the code I used (the template was build according to the tutorial "Create MNI-aligned grids..."): cfg = []; cfg.write= 'no'; cfg.coordsys= 'ctf'; [segmentedmri] = ft_volumesegment(cfg, mri); cfg = []; cfg.method='singleshell';% or single sphere model vol = ft_prepare_headmodel(cfg, segmentedmri); cfg = []; cfg.grid.warpmni= 'yes'; cfg.grid.template= template_grid; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.mri= mri; grid= ft_prepare_sourcemodel(cfg); 1.It turns out that my script works quite well for most of my subjects, but in case of one single subject I obtain a curious grid which has no grid point in the region of the occipital cortex/cerebellum (2^nd figure plotted in red). As you can see in the first figure the subjects mri look good and also do the template grid (2^nd figure plotted in green). I'm wondering what went wrong. So what options do I have if the warping/transform algorithm goes wrong? 2.Why is the template rotated and shifted when comparing it to the subjects grid (2^nd figure bottom right)? Thank you in advance, Maria -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: clip_image002.jpg Type: image/jpeg Size: 32453 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: clip_image003.png Type: image/png Size: 171403 bytes Desc: not available URL: From Nico.Boehler at UGent.be Tue Nov 27 17:24:39 2012 From: Nico.Boehler at UGent.be (Nico =?iso-8859-1?b?QvZobGVy?=) Date: Tue, 27 Nov 2012 17:24:39 +0100 Subject: [FieldTrip] PhD position vacancy at the Dept of Experimental Psychology, University of Ghent, Belgium Message-ID: <20121127172439.Horde.k8EmBtD6UQ5QtOlHRlezRdA@webmail.ugent.be> We are seeking a highly motivated PhD student for a 4-year project on /the role of selective attention in reward-modulated cognitive control/. The project will be supervised by Nico Boehler in collaboration with Wim Notebaert (http://expsy.ugent.be/staff/cstaff.htm). Our department hosts ten research groups, creating a dynamic environment including regular internal presentation series as well as frequent talks by invited speakers etc. We have access to state-of-the-art equipment including a 64/128-channel Biosemi EEG system and a research-dedicated 3-tesla Siemens MR scanner, as well as eye-tracking devices and TMS. Candidates are expected to have a Master's degree in psychology, (cognitive) neuroscience, or a related discipline on the starting date. He or she will mostly carry out behavioral and EEG experiments, but extensions to fMRI (including MR-compatible EEG) and TMS are possible. Experience with any of these techniques would be an asset. The starting date is flexible (but preferably early 2013). The project will culminate after four years in a PhD thesis. Salary is according to standard Belgian regulations (scholarship: ± ?22.000,? net/year). Although the governing language at Ghent University is Dutch, knowledge of Dutch is not a pre-requisite. Interested candidates should send a CV, motivation letter, and two (email) addresses of potential referees to nico.boehler at ugent.be before February 1st 2013. Informal inquiries can also be sent via email. Nico Boehler Dept. of Experimental Psychology Ghent University Belgium -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron__t at hotmail.com Tue Nov 27 19:24:30 2012 From: aaron__t at hotmail.com (Aaron T) Date: Tue, 27 Nov 2012 10:24:30 -0800 Subject: [FieldTrip] Coherence of single trials In-Reply-To: References: , <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl>, , , Message-ID: On a moderately related note, using a cfg setup that is very similar to Monika's I am encountering dimord errors with ft_connectivityplot I don't understand. cfg = []; cfg.channel = {'all'}; cfg.channelcmb = {refchan 'all'}; v= ft_frequencyanalysis cfg = [];cfg.channel = {refchan 'all'}; w = ft_connectivityanalysis (cfg, v); cfg = []cfg.parameter = 'cohspctrm';cfg.zlim = [0 1]z = ft_connectivityplot (cfg, w); When using .channelcmb in this way I encounter a dimord error: "must be chan_chan_freq or chancmb_freq"). The issue seems to be related to use of ft_frequencyanalysis; v receives an rpttap_chan_freq dimord (as I believe it should), but when subsequently using the .coh method with ft_connectivityanalysis variable w receives a dimord of chan_freq (and even if manually changed thereafter, is subsequently returned to this value by ft_checkdata calls). Is there an alternative way to use .channelcmb to set up channel pairs for analysis in ft_frequencyanalysis for subsequent use with connectivityanalysis and plot? Thanks for any suggestions. Aaron Date: Tue, 27 Nov 2012 07:56:05 -0500 From: sherrykhan78 at gmail.com To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Coherence of single trials Dear Monika, As Jan-Mathijs correctly mention Coherence is measure across trials, for single trial coherence value is one, the method I mention above also can not escape from this mathematical truth, the associated bias with the method is almost 0.9. Sheraz On Tue, Nov 27, 2012 at 6:49 AM, jan-mathijs schoffelen wrote: Dear Monika, It may have escaped your attention while digging to the previous posts, but the question has been raised (and answered ;-) ) before. Just for the very very last time I will make the following statement: Single trial coherence estimates cannot be computed! Perhaps the font size and color will make it memorable ;-). This is due to the simple fact that coherence is defined across observations. If you have just a single observation, due to the mathematics involved, the coherence value will be 1. Since you want to do group analysis, I think you really should compute the coherence per condition, where each condition should consist of a sufficient number of trials. Assuming that the time domain data is organised such that you have all trials (irrespective of the condition) in a single structure, do something like this. for each subject cfg = []; cfg.output = 'fourier'; cfg.method = 'mtmfft'/'mtmconvol' cfg.keeptrials = 'yes'; ... freq = ft_freqanalysis(cfg, data); cfg = []; cfg.channelcmb = {something here} cfg.trials = [indices of trials belonging to condition 1]; coh1 = ft_connectivityanalysis(cfg, freq); % compute coherence across the trials for condition 1 cfg.trials = [indices of trials belonging to condition 2]; coh2 = ft_connectivityanalysis(cfg, freq); % compute coherence across the trials for condition 2end Good luck, Jan-Mathijs On Nov 27, 2012, at 12:25 PM, Monika Mellem wrote: Thank you Sheraz and Jan-Mathijs for your help! Sheraz, if you do have the code to keep single-trial coherence estimates, I would much appreciate it if you could pass it along (monikamellem at gmail.com). And Jan-Mathijs, okay, the necessary statistics make sense, and I will z-transform the data too. But as far as you know, is there no implementation already in Fieldtrip to keep the single-trial coherence estimates? I assumed setting cfg.keeptrials = 'yes' would do this, but is there something else I'm missing as this doesn't seem to work? I would prefer to try what Fieldtrip has implemented first before integrating Sheraz's code into my version of Fieldtrip. Thank you very much! Monika On Tue, Nov 27, 2012 at 3:14 AM, jan-mathijs schoffelen wrote: Hi Monika, If you want to test across subjects in a paired fashion, you can use depsamplesT. Your dependent variable then should contain for each subject and condition the coherence (which of course should be estimated across all trials belonging to that condition). Even better would be to perform a so-called Z-transformation to the data. For some inspiration you could have a look at the following paper: http://www.jneurosci.org/content/31/18/6750.long Best, Jan-Mathijs On Nov 27, 2012, at 12:22 AM, Monika Mellem wrote: Dear Fieldtrippers, I am trying to calculate coherence estimates on individual trials of our EEG data and then want to perform a within-subjects statistical test, but so far I have not been able to figure out how to do this. I am able to calculate coherence for our 22 subjects and then perform statistics on the grand average, so I understand the basic usage of these functions (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, ft_freqstatistics). But now we want to do statistical testing on individual subjects. Is it possible to keep coherence for individual trials in Fieldtrip as they seem necessary for this statistical analysis? I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and get the cross-spectra of individual trials (I also tried computing the fourier spectra but it made no difference in the following step). However, when computing the coherence in ft_connectivityanalysis, Fieldtrip averages over the trials. Is there a way to output coherence for individual trials instead? Please see the full cfg structure settings below. Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as an input to ft_freqstatistics since previous posts suggested this was for single subject coherence statistics, but our data is paired as the same stimulus appears in the 2 conditions we are comparing. Is there a paired test for single subject coherence testing, or should we use cfg.statistic = 'depsamplesT'? Many thanks for any suggestions you may have! Monika ________________Monika Mellem PhD Candidate Interdisciplinary Program in Neuroscience Georgetown University Washington, DC msm79 at georgetown.edu 202-687-2687 *********************************************************************** cfg settings for ft_freqanalysis and ft_connectivityanalysis *********************************************************************** cfg = []; cfg.prestim = -0.5; cfg.poststim = 1.5; cfg.foilim = [2 30]; cfg.freqrange = 'low'; % cfg.output = 'fourier'; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.keeptrials = 'yes'; cfg.channel = {'all'}; cfg.channelcmb = {refchan 'all'}; cfgcoh=[]; cfgcoh.channelcmb = cfg.channelcmb; cfgcoh.method = 'coh'; v = genvarname(['CRSP_' condition '_low']); eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around ft_freqanalysis w = genvarname(['COH_' condition '_low']); eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics,Nijmegen, The Netherlands J.Schoffelen at donders.ru.nlTelephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics,Nijmegen, The Netherlands J.Schoffelen at donders.ru.nlTelephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcgoiv0 at wfu.edu Tue Nov 27 20:26:50 2012 From: mcgoiv0 at wfu.edu (McGowin, Inna) Date: Tue, 27 Nov 2012 14:26:50 -0500 Subject: [FieldTrip] correction for movement tool In-Reply-To: <1845155284.1304271.1353075065072.JavaMail.root@sculptor.zimbra.ru.nl> References: <1845155284.1304271.1353075065072.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Thanks Arjen, I am studying the article now. -------------- next part -------------- An HTML attachment was scrubbed... URL: From am236 at georgetown.edu Tue Nov 27 21:06:17 2012 From: am236 at georgetown.edu (Andrei Medvedev) Date: Tue, 27 Nov 2012 15:06:17 -0500 Subject: [FieldTrip] Coherence of single trials In-Reply-To: References: <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl> Message-ID: <50B51D39.4060009@georgetown.edu> Dear Monika, Indeed, Coh cannot be calculated on single trials, it requires averaging of the cross-spectrum over (some) trials. Customarily, people average ALL trials recorded in a subject and end up with just only one coherence measurement for this subject. Then obviously stats cannot be run on the individual level and only a group analysis can be done (e.g., you have 20 subjects, they give you 20 coherence values and you run your stats on those 20 values). Does this mean that coherence can be analyzed only on a group level? Perhaps not. I suggest the following approach. Coherence can be considered as a 'sample', or 'population', statistic (similar to means, medians, variances etc, which are calculated from a set of data points). Methods of estimating statistical properties of those 'population' measures are well known, they are based on resampling, jackknifing and bootstrapping. Simply put, you can take a SUBSET of your trials (e.g., selecting randomly 50 trials from all 100 trials in a particular subject) and calculate coherence over those 50 selected trials. Then repeat the process of random selection (with replacement, as in jackknifing) a certain number of times (N) and you would have a set of N 'sample' coherences for this subject. Then you can run your stats on those 'sample' coherences for this particular subject thus achieving your goal of the individual subject analysis. Any feedback from the fellows Fieldtripers about this approach? Thank you, Andrei Medvedev Georgetown University. On 11/27/2012 6:49 AM, jan-mathijs schoffelen wrote: > Dear Monika, > > It may have escaped your attention while digging to the previous > posts, but the question has been raised (and answered ;-) ) before. > Just for the very very last time I will make the following statement: > > *Single trialcoherenceestimatescannotbecomputed!* > * > * > Perhaps the font size and color will make it memorable ;-). This is > due to the simple fact that coherence is defined across observations. > If you have just a single observation, due to the mathematics > involved, the coherence value will be 1. > Since you want to do group analysis, I think you really should compute > the coherence per condition, where each condition should consist of a > sufficient number of trials. Assuming that the time domain data is > organised such that you have all trials (irrespective of the > condition) in a single structure, do something like this. > > for each subject > cfg = []; > cfg.output = 'fourier'; > cfg.method = 'mtmfft'/'mtmconvol' > cfg.keeptrials = 'yes'; > ... > freq = ft_freqanalysis(cfg, data); > > cfg = []; > cfg.channelcmb = {something here} > cfg.trials = [indices of trials belonging to condition 1]; > coh1 = ft_connectivityanalysis(cfg, freq); % compute coherence > across the trials for condition 1 > cfg.trials = [indices of trials belonging to condition 2]; > coh2 = ft_connectivityanalysis(cfg, freq); % compute coherence > across the trials for condition 2 > end > > > Good luck, > > Jan-Mathijs > > > On Nov 27, 2012, at 12:25 PM, Monika Mellem wrote: > >> Thank you Sheraz and Jan-Mathijs for your help! >> Sheraz, if you do have the code to keep single-trial coherence >> estimates, I would much appreciate it if you could pass it along >> (monikamellem at gmail.com ). >> And Jan-Mathijs, okay, the necessary statistics make sense, and I >> will z-transform the data too. But as far as you know, is there no >> implementation already in Fieldtrip to keep the single-trial >> coherence estimates? I assumed setting cfg.keeptrials = 'yes' would >> do this, but is there something else I'm missing as this doesn't seem >> to work? I would prefer to try what Fieldtrip has implemented first >> before integrating Sheraz's code into my version of Fieldtrip. >> >> Thank you very much! >> Monika >> >> >> On Tue, Nov 27, 2012 at 3:14 AM, jan-mathijs schoffelen >> > >> wrote: >> >> Hi Monika, >> >> If you want to test across subjects in a paired fashion, you can >> use depsamplesT. Your dependent variable then should contain for >> each subject and condition the coherence (which of course should >> be estimated across all trials belonging to that condition). Even >> better would be to perform a so-called Z-transformation to the >> data. For some inspiration you could have a look at the following >> paper: http://www.jneurosci.org/content/31/18/6750.long >> >> Best, >> >> Jan-Mathijs >> >> On Nov 27, 2012, at 12:22 AM, Monika Mellem wrote: >> >>> Dear Fieldtrippers, >>> >>> I am trying to calculate coherence estimates on individual >>> trials of our EEG data and then want to perform a >>> within-subjects statistical test, but so far I have not been >>> able to figure out how to do this. I am able to calculate >>> coherence for our 22 subjects and then perform statistics on the >>> grand average, so I understand the basic usage of these >>> functions (ft_freqanalysis, ft_connectivityanalysis, >>> ft_freqgrandaverage, ft_freqstatistics). But now we want to do >>> statistical testing on individual subjects. Is it possible to >>> keep coherence for individual trials in Fieldtrip as they seem >>> necessary for this statistical analysis? >>> >>> I am setting cfg.keeptrials = 'yes' as an input to >>> ft_freqanalysis, and get the cross-spectra of individual trials >>> (I also tried computing the fourier spectra but it made no >>> difference in the following step). However, when computing the >>> coherence in ft_connectivityanalysis, Fieldtrip averages over >>> the trials. Is there a way to output coherence for individual >>> trials instead? Please see the full cfg structure settings below. >>> >>> Also, I did look into the option of cfg.statistic = >>> 'indepsamplesZcoh' as an input to ft_freqstatistics since >>> previous posts suggested this was for single subject coherence >>> statistics, but our data is paired as the same stimulus appears >>> in the 2 conditions we are comparing. Is there a paired test >>> for single subject coherence testing, or should we use >>> cfg.statistic = 'depsamplesT'? >>> >>> Many thanks for any suggestions you may have! >>> Monika >>> ________________ >>> Monika Mellem >>> PhD Candidate >>> Interdisciplinary Program in Neuroscience >>> Georgetown University >>> Washington, DC >>> msm79 at georgetown.edu >>> 202-687-2687 >>> >>> *********************************************************************** >>> cfg settings for ft_freqanalysis and ft_connectivityanalysis >>> *********************************************************************** >>> cfg = []; >>> cfg.prestim = -0.5; >>> cfg.poststim = 1.5; >>> cfg.foilim = [2 30]; >>> cfg.freqrange = 'low'; >>> % cfg.output = 'fourier'; >>> cfg.output = 'powandcsd'; >>> cfg.method = 'mtmconvol'; >>> cfg.keeptrials = 'yes'; >>> cfg.channel = {'all'}; >>> cfg.channelcmb = {refchan 'all'}; >>> >>> cfgcoh=[]; >>> cfgcoh.channelcmb = cfg.channelcmb; >>> cfgcoh.method = 'coh'; >>> >>> v = genvarname(['CRSP_' condition '_low']); >>> eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper >>> around ft_freqanalysis >>> >>> w = genvarname(['COH_' condition '_low']); >>> eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Andrei Medvedev, PhD Assistant Professor, Center for Functional and Molecular Imaging Georgetown University Building D, Room 154 4000 Reservoir Rd, NW Washington DC, 20057 Tel.: 202-687-5126 -------------- next part -------------- An HTML attachment was scrubbed... URL: From fanny.lachat at gmail.com Wed Nov 28 16:27:41 2012 From: fanny.lachat at gmail.com (Fanny) Date: Wed, 28 Nov 2012 16:27:41 +0100 Subject: [FieldTrip] averaging FT_FREQANALYSIS. Message-ID: Dear Fieldtrip Users, I have analysed my EEG data using FT_FREQANALYSIS. I am now interested in averaging this time frequency data for each subject and each electrode on particular frequency (for example between 8 & 13 Hz) and on particular time (between for example 1sec & 1.2 sec). My goal is to have for each suject -for the powspctrm only the values that correspond to the results of this average. -for the time and for the freq only 1 number I will alos want to plot the results after. (using ft_topoplotTFR). I have failed to find how to do that. I have tryed many different methods. I even tried calling cfg.method = 'stats'; cfg.statistic = 'mean'; .... Could someone help me ? thank you in advance ------ Fanny -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Nov 28 17:25:04 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 28 Nov 2012 17:25:04 +0100 Subject: [FieldTrip] averaging FT_FREQANALYSIS. In-Reply-To: References: Message-ID: Dear Fanny, You should be able to do all that within ft_freqanalysis directly. I advice you to read the relevant documentation in the tutorials, and walkthrough, on the FT site. To answer your question more directly, however, its helpfull to know the cfg you called ft_freqanalysis with and the datastructure you end up with. I'm guessing you used method = 'mtmconvol'? If interested in a single timewindow you could use method = 'fft', for instance. Specifing a specific frequency band is possible by adding tapers to your frequency of interest (as explained in the documentation). Alternatively, you can use ft_selectdata using 'avgoverfreq' and 'avgovertime' parameters after you did freqanalysis. That might be a quick (but dirty) solution as well. Hope that helps for now, Stephen On 28 November 2012 16:27, Fanny wrote: > Dear Fieldtrip Users, > > I have analysed my EEG data using FT_FREQANALYSIS. > > > I am now interested in averaging this time frequency data for each > subject and each electrode on particular frequency (for example between 8 > & 13 Hz) and on particular time (between for example 1sec & 1.2 sec). > > My goal is to have for each suject > -for the powspctrm only the values that correspond to the results of this > average. > -for the time and for the freq only 1 number > > I will alos want to plot the results after. (using ft_topoplotTFR). > > I have failed to find how to do that. I have tryed many different > methods. I even tried calling cfg.method = 'stats'; > cfg.statistic = 'mean'; > .... > > Could someone help me ? > > thank you in advance > > > ------ > Fanny > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Nov 29 08:56:55 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 29 Nov 2012 08:56:55 +0100 Subject: [FieldTrip] Fwd: planar gradients In-Reply-To: References: <4346_1353591466_50AE2AAA_4346_214_1_a9f3579c-9269-4bfa-81b0-641f3c3c2a1e@thalamus_p> Message-ID: Dear Fred and Max, To follow up on this: we have identified and fixed the problem, as of last night's release. You can see the issue here: http://bugzilla.fcdonders.nl/show_bug.cgi?id=1858 This is a related, but different, bug than the 1288 I posted earlier. To summarize: all output of ft_megplanar should now be recognized correctly as planar gradient data in subsequent steps. If you have data that was generated by ft_megplanar prior to this fix, you can easily patch it by doing: data.grad.type = 'ctf275_planar'; (or xxxx_planar for other axial gradiometer acquisition systems). Feel free to reopen bug 1858 if the issue has not been resolved. Best, Eelke On 23 November 2012 09:48, Eelke Spaak wrote: > Dear Fred and Max, > > This is a known bug in ft_senstype, and people are working on fixing > it. See bugzilla: http://bugzilla.fcdonders.nl/show_bug.cgi?id=1288 . > If you have anything to add to the bug reports over there, that could > be helpful. > > For now, Max's workaround seems to do the trick. > > Best, > Eelke > > On 22 November 2012 19:36, Stenner, Max-Philipp > wrote: > > Dear Fred, > > > > I encountered a similar problem with my CTF275 data and one broken > sensor before ft_freqanalysis of the planar (uncombined) data. "Confirming" > the channel type with > > > > data.grad.chantype = ft_senstype(data); > > > > solved the problem (although I have to admit that I never investigated > where in the ft script the problem arose). > > > > Cheers, > > Max > > > > ________________________________________ > > Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" > im Auftrag von "Frederic Roux [f.roux at bcbl.eu] > > Gesendet: Donnerstag, 22. November 2012 14:19 > > Bis: FieldTrip discussion list > > Betreff: [FieldTrip] planar gradients > > > > Dear all, > > > > I would like to follow up this post with another question > > related to the planar gradients. > > > > I am working on data aquired with a CTF 275 system but at > > the time of the acquisition there was a number of sensors > > that were broken. > > > > So I end up with n = 258 channels. > > > > After running the ft_megplanar function I get n = 516 channels. > > > > However, if I try to combine the gradients with > > ft_combineplanar > > > > I get an error saying that I am not providing ctf275_planar but > > ctf275 data. > > > > Is the fact that I do not have n = 275 sensors but 258 confusing > > the ft_combineplanar function, or is this related to something else? > > > > > > Best, > > > > Fred > > > > ----- Original Message ----- > > From: "Eelke Spaak" > > To: "FieldTrip discussion list" > > Sent: Wednesday, November 21, 2012 12:47:25 PM > > Subject: Re: [FieldTrip] ft_freqstatistics tutorial question > > > > Dear Nenad, > > > > Strictly speaking, planar gradient transformation is not necessary, so > > you can just skip those steps if you really want to. However, if you > > have axial gradiometer data (as I seem to recall from your earlier > > posts) and want to do TF-analysis and -statistics on sensor level, I > > would strongly recommend applying a planar gradient transformation. > > > > Axial gradiometer data will produce maximal deflections (of opposite > > polarity) on both sides of a current dipole, while planar gradiometer > > data produces a positive maximum exactly above the source. If you > > apply TF-analysis to axial gradiometer data, you will get two > > spatially separated 'blobs' where there was only a single oscillating > > dipole in the brain. If you look at power (as is typically done), you > > will lose the polarity information, and hence interpreting the power > > topography in terms of brain is nearly impossible with axial gradient > > data. > > > > Best, > > Eelke > > > > On 21 November 2012 11:30, Nenad Polomac wrote: > >> Dear all, > >> > >> I have one doubt. I want to calculate ft_freqstatistics on my MEG date > >> obtained form ft_freqanalysis. However, I see now in ft_freqstatistics > >> tutorial that you suggest that operation should be done on planar > gradient > >> data. So, the first ft_megplanar and then ft_freqanalysis, > ft_combineplanar > >> and ft_freqstatistics. My question is, does this step of calculating > planar > >> gradients for time frequency analysis is necessary or not? Could I apply > >> statistic on the data from ft_freqanalysis without any involvement of > planar > >> gradients calculation. > >> Thank you in advance! > >> > >> All the best! > >> > >> Nenad > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elilife at gmail.com Thu Nov 29 14:36:55 2012 From: elilife at gmail.com (Eliana Garcia) Date: Thu, 29 Nov 2012 14:36:55 +0100 Subject: [FieldTrip] Source statistics event related fields Message-ID: Hello Dear Fieldtrip Developers and users, I would like to know if somebody has done before a *source statistic analysis on event related potentials* from the output of* LCMV beamformer*. I have some issues with the compatibility of the cfg.parameter =''avg.mom', since it is a cell structure and the functions for grand average and source statistics works normally for double matrixes. I wonder if there is a way to deal with this (not making arranges on the functions or transforming my data to the format m=sourceFIC.avg.pow(voxels, time) double. I would also like to know how to deal with the parameters for source statistics on event related fields (such as: cfg.latency). Thanks a lot! -- Eliana García Cossio Applied Neurotechnology Lab. Graduate School of Neural and Behavioural Science - Max Planck Research School Institute of Medical Psychology and Behavioural Neurobiology Universität Tübingen (+0049) 01 577-8587604 Otfried-Müller-Str. 47, 72076 Tübingen- Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From elilife at gmail.com Thu Nov 29 14:36:55 2012 From: elilife at gmail.com (Eliana Garcia) Date: Thu, 29 Nov 2012 14:36:55 +0100 Subject: [FieldTrip] Source statistics event related fields Message-ID: Hello Dear Fieldtrip Developers and users, I would like to know if somebody has done before a *source statistic analysis on event related potentials* from the output of* LCMV beamformer*. I have some issues with the compatibility of the cfg.parameter =''avg.mom', since it is a cell structure and the functions for grand average and source statistics works normally for double matrixes. I wonder if there is a way to deal with this (not making arranges on the functions or transforming my data to the format m=sourceFIC.avg.pow(voxels, time) double. I would also like to know how to deal with the parameters for source statistics on event related fields (such as: cfg.latency). Thanks a lot! -- Eliana García Cossio Applied Neurotechnology Lab. Graduate School of Neural and Behavioural Science - Max Planck Research School Institute of Medical Psychology and Behavioural Neurobiology Universität Tübingen (+0049) 01 577-8587604 Otfried-Müller-Str. 47, 72076 Tübingen- Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From singhharsimrat at gmail.com Thu Nov 29 14:38:01 2012 From: singhharsimrat at gmail.com (Harsimrat Singh) Date: Thu, 29 Nov 2012 13:38:01 +0000 Subject: [FieldTrip] Best procedure for frontal alpha asymmetry Message-ID: Dear Fieldtrippers I am trying to calculate the difference in the alpha power on the frontal electrodes for a subject wise analysis. Can someone please suggest what will be the correct approach. Run freq analysis with alpha freq (14-18 ) with a resolution of 2Hz on all channels and then do tf.powspctrm (:,left,:,:) –tf.powsprctrm(:,right,:,:) OR run freq analysis on left chans and right chans separately and then do subtraction. Best regards Harsimrat From jm.horschig at donders.ru.nl Thu Nov 29 15:00:58 2012 From: jm.horschig at donders.ru.nl (=?windows-1252?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 29 Nov 2012 15:00:58 +0100 Subject: [FieldTrip] Best procedure for frontal alpha asymmetry In-Reply-To: References: Message-ID: <50B76A9A.7020201@donders.ru.nl> Dear Harsimrat, I got some comments on your mail: 1. The alpha band is conventionally more around 10Hz, 14Hz is kind of the upper bound. 14-18Hz would be lower beta. 2. 2Hz resolution is fine. 3. All colleagues I know are running their frequency analysis on all channels, because there is no reason to separate channels in the analysis pipeline, neither methodologically nor for any other reason. 4. You might want to try to take the relative difference: (tf.powspctrm (:,left,:,:) – tf.powsprctrm(:,right,:,:)) ./ (tf.powspctrm (:,left,:,:) + tf.powsprctrm(:,right,:,:)) or the like (e.g. log ratio), as this gives a normalized difference which makes comparisons across subjects somewhat easier. Also, it is more conventional, see e.g. Thut et al., 2006 for occipital alpha lateralization. Good luck with your analysis! Best, Jörn On 11/29/2012 2:38 PM, Harsimrat Singh wrote: > Dear Fieldtrippers > > I am trying to calculate the difference in the alpha power on the > frontal electrodes for a subject wise analysis. > > Can someone please suggest what will be the correct approach. > > Run freq analysis with alpha freq (14-18 ) with a resolution of 2Hz on > all channels and then do > > tf.powspctrm (:,left,:,:) –tf.powsprctrm(:,right,:,:) > > OR > > run freq analysis on left chans and right chans separately and then do > subtraction. > > Best regards > Harsimrat > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From eelke.spaak at donders.ru.nl Thu Nov 29 15:15:16 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 29 Nov 2012 15:15:16 +0100 Subject: [FieldTrip] Best procedure for frontal alpha asymmetry In-Reply-To: References: Message-ID: Dear Harsimrat, The two approaches should be equivalent, since power data is always computed per channel. Another thing which is probably good to note is that 14-18Hz is not typically called 'alpha activity'. Depending on your research question, it might or might not be appropriate to label it alpha anyway, but it is worth thinking about that. (Typically, alpha would be 8-12Hz, or 7-14Hz or so.) Best, Eelke On 29 November 2012 14:38, Harsimrat Singh wrote: > Dear Fieldtrippers > > I am trying to calculate the difference in the alpha power on the > frontal electrodes for a subject wise analysis. > > Can someone please suggest what will be the correct approach. > > Run freq analysis with alpha freq (14-18 ) with a resolution of 2Hz on > all channels and then do > > tf.powspctrm (:,left,:,:) –tf.powsprctrm(:,right,:,:) > > OR > > run freq analysis on left chans and right chans separately and then do > subtraction. > > Best regards > Harsimrat > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From singhharsimrat at gmail.com Thu Nov 29 19:15:14 2012 From: singhharsimrat at gmail.com (Harsimrat Singh) Date: Thu, 29 Nov 2012 18:15:14 +0000 Subject: [FieldTrip] Best procedure for frontal alpha asymmetry In-Reply-To: References: Message-ID: Thanks Elke and Jorn Apologies for mismatch 'name' and 'freq range'. Actually I went out looking for higher freqs than alpha but didn't change the name. I agree with Elke that the outcome should be same. I think I will go with the convention - freq analysis on all channels and then separating out the ones I need. Best regards Harsimrat On 29 November 2012 14:15, Eelke Spaak wrote: > Dear Harsimrat, > > The two approaches should be equivalent, since power data is always computed > per channel. > > Another thing which is probably good to note is that 14-18Hz is not > typically called 'alpha activity'. Depending on your research question, it > might or might not be appropriate to label it alpha anyway, but it is worth > thinking about that. (Typically, alpha would be 8-12Hz, or 7-14Hz or so.) > > Best, > Eelke > > > On 29 November 2012 14:38, Harsimrat Singh wrote: >> >> Dear Fieldtrippers >> >> I am trying to calculate the difference in the alpha power on the >> frontal electrodes for a subject wise analysis. >> >> Can someone please suggest what will be the correct approach. >> >> Run freq analysis with alpha freq (14-18 ) with a resolution of 2Hz on >> all channels and then do >> >> tf.powspctrm (:,left,:,:) –tf.powsprctrm(:,right,:,:) >> >> OR >> >> run freq analysis on left chans and right chans separately and then do >> subtraction. >> >> Best regards >> Harsimrat >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From khaled.alkamha at gmail.com Fri Nov 30 19:16:26 2012 From: khaled.alkamha at gmail.com (Khaled Al-Kamha) Date: Fri, 30 Nov 2012 21:16:26 +0300 Subject: [FieldTrip] How far FieldTrip can help me ? Message-ID: Hey,, I'm an under-graduated student and i'm working on http://www.physionet.org/pn4/eegmmidb/ dataset for my graduation project, i'm totally interested in Machine Learning Application for Brain Computer Interface Research. I'm trying to get started with Filtering the data for Feature Extraction Part and by a little of search i found the FieldTrip Toolbox. I just want to know if i'm on the right direction by choosing FieldTrip Toolbox for MATLAB. Regards Khaled Al Kamha -------------- next part -------------- An HTML attachment was scrubbed... URL: From batrod at gmail.com Fri Nov 30 21:37:46 2012 From: batrod at gmail.com (Rodolphe Nenert) Date: Fri, 30 Nov 2012 14:37:46 -0600 Subject: [FieldTrip] How far FieldTrip can help me ? In-Reply-To: References: Message-ID: Fieldtrip is an excellent choice for processing and analyzing eeg data ;) That being said, im not sure about what you call "feature extraction", but it will definitely help you to start with your data. Rodolphe Nenert, PhD University of Alabama at Birmingham. On Fri, Nov 30, 2012 at 12:16 PM, Khaled Al-Kamha wrote: > Hey,, > > I'm an under-graduated student and i'm working on > http://www.physionet.org/pn4/eegmmidb/ dataset for my graduation project, > i'm totally interested in Machine Learning Application for Brain Computer > Interface Research. > I'm trying to get started with Filtering the data for Feature Extraction > Part and by a little of search i found the FieldTrip Toolbox. > I just want to know if i'm on the right direction by choosing FieldTrip > Toolbox for MATLAB. > > Regards > Khaled Al Kamha > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From khaled.alkamha at gmail.com Fri Nov 30 23:01:51 2012 From: khaled.alkamha at gmail.com (Khaled Al-Kamha) Date: Sat, 1 Dec 2012 01:01:51 +0300 Subject: [FieldTrip] How far FieldTrip can help me ? In-Reply-To: References: Message-ID: Thanks a lot for your response,, you are right about your uncertainty with what i called "Feature Extraction". My intention in "Feature Extraction" was removing noise and other unnecessary information from the input signals. I think i'll give it a try, thanks again :) Regards, Khaled Al Kamha On Fri, Nov 30, 2012 at 11:37 PM, Rodolphe Nenert wrote: > Fieldtrip is an excellent choice for processing and analyzing eeg data ;) > That being said, im not sure about what you call "feature extraction", but > it will definitely help you to start with your data. > > Rodolphe Nenert, PhD > University of Alabama at Birmingham. > > > On Fri, Nov 30, 2012 at 12:16 PM, Khaled Al-Kamha < > khaled.alkamha at gmail.com> wrote: > >> Hey,, >> >> I'm an under-graduated student and i'm working on >> http://www.physionet.org/pn4/eegmmidb/ dataset for my graduation >> project, i'm totally interested in Machine Learning Application for Brain >> Computer Interface Research. >> I'm trying to get started with Filtering the data for Feature Extraction >> Part and by a little of search i found the FieldTrip Toolbox. >> I just want to know if i'm on the right direction by choosing FieldTrip >> Toolbox for MATLAB. >> >> Regards >> Khaled Al Kamha >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoniilevy at gmail.com Thu Nov 1 10:01:34 2012 From: yoniilevy at gmail.com (Yoni Levy) Date: Thu, 1 Nov 2012 11:01:34 +0200 Subject: [FieldTrip] MNI or CTF coordinates during the construction of individual MNI-based grids Message-ID: Hi all, If I understood correctly from the tutorial, the template_grid should be expressed in MNI coordinates, therefore in 'mm' units. However, following the current tutorial, the resulting template_grid is expressed in 'cm' (because of the CTF system). If I understand correctly, we should add to the tutorial that the template_grid units should be transformed to 'mm' after creating it. The individual warped grid however stays expressed in 'cm' (in the case of CTF). Does that make sense or I might be missing anything here? Thanks, Yoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcoskun at mail.uh.edu Thu Nov 1 17:30:02 2012 From: mcoskun at mail.uh.edu (Mehmet-Akif Coskun) Date: Thu, 01 Nov 2012 11:30:02 -0500 Subject: [FieldTrip] Minimal Stimulus Condition to evoke a detectable MEG response Message-ID: <7280fbc125328.50925d3a@mail.uh.edu> Dear Fieldtrippers, Is there any study that measured the minimal stimulus condition required to evoke a detectable MEG response. We acquire our data using 4D 248 sensor device and our stimulus is 1.8 kg/cm^2. We know this is above average but we also would like to know what is the threshold? Also in many papers that i have seen, the threshold is measured as deflection of skin in mm. Is there a method that i can convert our units to find the deflection of skin? I will greatly appreciate any helps, Thanks in advance, Mehmet -------------- next part -------------- An HTML attachment was scrubbed... URL: From bherrmann at cbs.mpg.de Fri Nov 2 10:10:16 2012 From: bherrmann at cbs.mpg.de (=?utf-8?Q?Bj=C3=B6rn_Herrmann?=) Date: Fri, 2 Nov 2012 10:10:16 +0100 (CET) Subject: [FieldTrip] wavelet fourier output produces sign inverted imaginary part In-Reply-To: <855059066.4809.1351778311397.JavaMail.root@zimbra> Message-ID: <715262839.1275.1351847416532.JavaMail.root@zimbra> Dear fieldtrip users, I observed something strange using ft_freqanalysis with the "wavelet" method that might be important for many/some of you. It seems that the imaginary part of the fourier output (from "wavelet") is sign inverted for the TFR calculated for more than one frequency at once (i.e. cfg.foi = [4 5]) as compared to the TFR calculated independently for the frequencies (i.e., first cfg.foi = 4, and then cfg.foi = 5). This impacts the phase angle which is backwards in case of calculating the TFR for more frequencies in one go. amplitude/power is unaffected and it seems also ITPC calculations. momentary phase and therefore some phase-amplitude coupling measures are, however, affected by this. I attached a bit of code showing the difference: Cf = 5; Sf = 500; dur = 20; freqs = 1:10; cfg = []; cfg.method = 'wavelet'; cfg.output = 'fourier'; cfg.width = 3; cfg.toi = 0:0.01:dur; t = 0:1/Sf:(dur-1/Sf); data = []; data.avg = sin(2*pi*Cf*t+1.1); data.fsample = Sf; data.time = t; data.label = {'channel'}; data.dimord = 'chan_time'; floop = []; for ii = 1 : length(freqs) cfg.foi = freqs(ii); F = ft_freqanalysis(cfg, data); floop(:,ii) = squeeze(F.fourierspctrm); end cfg.foi = freqs; F = ft_freqanalysis(cfg, data); fonego = squeeze(F.fourierspctrm)'; [real(floop(1000,1)), real(fonego(1000,1)); ... imag(floop(1000,1)), imag(fonego(1000,1)); ... angle(floop(1000,1)), angle(fonego(1000,1))] ans = -0.0128 -0.0128 0.0067 -0.0067 2.6605 -2.6605 I thought this might be important for some of you, independently of a bug report i'll try to send later (i have to figure out how this works first). My colleagues and I were unable to fix the problem in the fieldtrip script directly, but a simple solution is to do the following: real(fourier)+(imag(fourier)*-1)*1i Based on some tests i did, I believe the fonego is the wrong one (i.e. using cfg.foi = [4 5]). All the best, Björn From r.vandermeij at donders.ru.nl Fri Nov 2 13:21:06 2012 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Fri, 2 Nov 2012 13:21:06 +0100 Subject: [FieldTrip] wavelet fourier output produces sign inverted imaginary part In-Reply-To: <715262839.1275.1351847416532.JavaMail.root@zimbra> References: <855059066.4809.1351778311397.JavaMail.root@zimbra> <715262839.1275.1351847416532.JavaMail.root@zimbra> Message-ID: Dear Björn, Please note that in your example, you take the complex conjugate transpose of 'fonego'. This changes the sign of the imaginary part of your Fourier coefficients. Please verify whether this is causing the phase-flip you mention in your first paragraph. All the best, Roemer On Fri, Nov 2, 2012 at 10:10 AM, Björn Herrmann wrote: > Dear fieldtrip users, > > I observed something strange using ft_freqanalysis with the "wavelet" > method that might be important for many/some of you. > It seems that the imaginary part of the fourier output (from "wavelet") is > sign inverted for the TFR calculated for more than one frequency at once > (i.e. cfg.foi = [4 5]) as compared to the TFR calculated independently for > the frequencies (i.e., first cfg.foi = 4, and then cfg.foi = 5). This > impacts the phase angle which is backwards in case of calculating the TFR > for more frequencies in one go. amplitude/power is unaffected and it seems > also ITPC calculations. momentary phase and therefore some phase-amplitude > coupling measures are, however, affected by this. I attached a bit of code > showing the difference: > > > Cf = 5; > Sf = 500; > dur = 20; > > freqs = 1:10; > > cfg = []; > cfg.method = 'wavelet'; > cfg.output = 'fourier'; > cfg.width = 3; > cfg.toi = 0:0.01:dur; > > t = 0:1/Sf:(dur-1/Sf); > data = []; > data.avg = sin(2*pi*Cf*t+1.1); > data.fsample = Sf; > data.time = t; > data.label = {'channel'}; > data.dimord = 'chan_time'; > > floop = []; > for ii = 1 : length(freqs) > cfg.foi = freqs(ii); > F = ft_freqanalysis(cfg, data); > floop(:,ii) = squeeze(F.fourierspctrm); > end > cfg.foi = freqs; > F = ft_freqanalysis(cfg, data); > fonego = squeeze(F.fourierspctrm)'; > > [real(floop(1000,1)), real(fonego(1000,1)); ... > imag(floop(1000,1)), imag(fonego(1000,1)); ... > angle(floop(1000,1)), angle(fonego(1000,1))] > > ans = > -0.0128 -0.0128 > 0.0067 -0.0067 > 2.6605 -2.6605 > > > I thought this might be important for some of you, independently of a bug > report i'll try to send later (i have to figure out how this works first). > My colleagues and I were unable to fix the problem in the fieldtrip script > directly, but a simple solution is to do the following: > real(fourier)+(imag(fourier)*-1)*1i > Based on some tests i did, I believe the fonego is the wrong one (i.e. > using cfg.foi = [4 5]). > > All the best, > > Björn > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Roemer van der Meij M.Sc. PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From bherrmann at cbs.mpg.de Fri Nov 2 13:56:20 2012 From: bherrmann at cbs.mpg.de (=?utf-8?Q?Bj=C3=B6rn_Herrmann?=) Date: Fri, 2 Nov 2012 13:56:20 +0100 (CET) Subject: [FieldTrip] wavelet fourier output produces sign inverted imaginary part In-Reply-To: Message-ID: <979548527.3464.1351860980202.JavaMail.root@zimbra> Dear fieldtrip users, I have just received an anser to my email regarding the "sign inverted imaginary part". It seems that I was introducing this error myself in my script by transposing the complex output. I did not know this before that this changes the sign of the imaginary part. a = 3+1i; b = a' b = 3 - 1i hmm. I am very sorry for the mistake and thankful to Matt bringing my attention to this. Thus, it seems fieldtrip does work alright regarding the output. I was working wrong. Björn ------ Björn Herrmann Auditory Cognition Group Max Planck Institute for Human Cognitive and Brain Sciences Stephanstrasse 1a, 04103 Leipzig, Germany phone: ++49 (0)341 9940 2606 email: bherrmann at cbs.mpg.de ----- Ursprüngliche Mail ----- Von: fieldtrip-request at science.ru.nl An: fieldtrip at science.ru.nl Gesendet: Freitag, 2. November 2012 12:00:16 Betreff: fieldtrip Digest, Vol 24, Issue 2 Send fieldtrip mailing list submissions to fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to fieldtrip-request at science.ru.nl You can reach the person managing the list at fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: 1. Minimal Stimulus Condition to evoke a detectable MEG response (Mehmet-Akif Coskun) 2. wavelet fourier output produces sign inverted imaginary part (Bj?rn Herrmann) ---------------------------------------------------------------------- Message: 1 Date: Thu, 01 Nov 2012 11:30:02 -0500 From: Mehmet-Akif Coskun To: FieldTrip discussion list Subject: [FieldTrip] Minimal Stimulus Condition to evoke a detectable MEG response Message-ID: <7280fbc125328.50925d3a at mail.uh.edu> Content-Type: text/plain; charset="us-ascii" Dear Fieldtrippers, Is there any study that measured the minimal stimulus condition required to evoke a detectable MEG response. We acquire our data using 4D 248 sensor device and our stimulus is 1.8 kg/cm^2. We know this is above average but we also would like to know what is the threshold? Also in many papers that i have seen, the threshold is measured as deflection of skin in mm. Is there a method that i can convert our units to find the deflection of skin? I will greatly appreciate any helps, Thanks in advance, Mehmet -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Fri, 2 Nov 2012 10:10:16 +0100 (CET) From: Bj?rn Herrmann To: fieldtrip at science.ru.nl Subject: [FieldTrip] wavelet fourier output produces sign inverted imaginary part Message-ID: <715262839.1275.1351847416532.JavaMail.root at zimbra> Content-Type: text/plain; charset=utf-8 Dear fieldtrip users, I observed something strange using ft_freqanalysis with the "wavelet" method that might be important for many/some of you. It seems that the imaginary part of the fourier output (from "wavelet") is sign inverted for the TFR calculated for more than one frequency at once (i.e. cfg.foi = [4 5]) as compared to the TFR calculated independently for the frequencies (i.e., first cfg.foi = 4, and then cfg.foi = 5). This impacts the phase angle which is backwards in case of calculating the TFR for more frequencies in one go. amplitude/power is unaffected and it seems also ITPC calculations. momentary phase and therefore some phase-amplitude coupling measures are, however, affected by this. I attached a bit of code showing the difference: Cf = 5; Sf = 500; dur = 20; freqs = 1:10; cfg = []; cfg.method = 'wavelet'; cfg.output = 'fourier'; cfg.width = 3; cfg.toi = 0:0.01:dur; t = 0:1/Sf:(dur-1/Sf); data = []; data.avg = sin(2*pi*Cf*t+1.1); data.fsample = Sf; data.time = t; data.label = {'channel'}; data.dimord = 'chan_time'; floop = []; for ii = 1 : length(freqs) cfg.foi = freqs(ii); F = ft_freqanalysis(cfg, data); floop(:,ii) = squeeze(F.fourierspctrm); end cfg.foi = freqs; F = ft_freqanalysis(cfg, data); fonego = squeeze(F.fourierspctrm)'; [real(floop(1000,1)), real(fonego(1000,1)); ... imag(floop(1000,1)), imag(fonego(1000,1)); ... angle(floop(1000,1)), angle(fonego(1000,1))] ans = -0.0128 -0.0128 0.0067 -0.0067 2.6605 -2.6605 I thought this might be important for some of you, independently of a bug report i'll try to send later (i have to figure out how this works first). My colleagues and I were unable to fix the problem in the fieldtrip script directly, but a simple solution is to do the following: real(fourier)+(imag(fourier)*-1)*1i Based on some tests i did, I believe the fonego is the wrong one (i.e. using cfg.foi = [4 5]). All the best, Bj?rn ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 24, Issue 2 **************************************** From polomacnenad at gmail.com Mon Nov 5 17:01:58 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Mon, 5 Nov 2012 17:01:58 +0100 Subject: [FieldTrip] opposite to the ft_appenddata Message-ID: Hi everybody, I would like to know does the fildtrip has some function opposite to the ft_appenddata. I have appended all trials from the two of my conditions in order to have more information for the ICA calculation. Now after ft_rejectcomponent I would like to bring back trials in a previous state. Do you have any advice? Thank you very much! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon Nov 5 17:18:27 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 5 Nov 2012 17:18:27 +0100 Subject: [FieldTrip] opposite to the ft_appenddata In-Reply-To: References: Message-ID: Hi Nenad, If I understand correctly what you want, ft_selectdata is what you are looking for. You can use it to select specific trials or channels (or time windows) from a data set. In the 'old' syntax, if you want trials 1, 3, and 5: data = ft_selectdata(data, 'rpt', [1 3 5]); Of course, the trial indices you will have to provide yourself, for instance by looking at which trials originally came from which dataset (i.e., prior to calling ft_appenddata). Best, Eelke On 5 November 2012 17:01, Nenad Polomac wrote: > Hi everybody, > > I would like to know does the fildtrip has some function opposite to the > ft_appenddata. I have appended all trials from the two of my conditions in > order to have more information for the ICA calculation. Now after > ft_rejectcomponent I would like to bring back trials in a previous state. > Do you have any advice? > > Thank you very much! > > Nenad > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stephen.whitmarsh at gmail.com Mon Nov 5 17:11:26 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 5 Nov 2012 17:11:26 +0100 Subject: [FieldTrip] opposite to the ft_appenddata In-Reply-To: References: Message-ID: Dear Nenad, You could apply ft_rejectcomponent on the original datasets using the extra second input argument ('data') - the function help should be clear enough. Cheers, Stephen On 5 November 2012 17:01, Nenad Polomac wrote: > Hi everybody, > > I would like to know does the fildtrip has some function opposite to the > ft_appenddata. I have appended all trials from the two of my conditions in > order to have more information for the ICA calculation. Now > after ft_rejectcomponent I would like to bring back trials in a previous > state. > Do you have any advice? > > Thank you very much! > > Nenad > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jan.Hirschmann at med.uni-duesseldorf.de Tue Nov 6 14:34:53 2012 From: Jan.Hirschmann at med.uni-duesseldorf.de (Jan.Hirschmann at med.uni-duesseldorf.de) Date: Tue, 6 Nov 2012 14:34:53 +0100 Subject: [FieldTrip] subspace projection Message-ID: <72E993C35FB11743B79FF9286E5B6D8B048E4A8B@Mail2-UKD.VMED.UKD> Dear fieldtrip community, In LCMV beamforming there is an option cfg.lcmv.subspace=X. Does anyone have experience or recommendations regarding this option? Is there a publication in which the rationale is described? From looking at the code it seems that data and lead field are projected onto a subspace spanned by the first X singular vectors of the covariance matrix (correct me if I'm wrong). Seems helpful in my case but I am hesitant to use it without knowing anything about it. Thanks for any comment! Jan -- Jan Hirschmann MSc Neuroscience Institute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Düsseldorf Universitätsstr. 1 40225 Düsseldorf Germany Tel: +49 (0)211 81 18415 Fax: +49 (0)211 81 19033 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Nov 6 14:49:36 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 6 Nov 2012 14:49:36 +0100 Subject: [FieldTrip] subspace projection In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B048E4A8B@Mail2-UKD.VMED.UKD> References: <72E993C35FB11743B79FF9286E5B6D8B048E4A8B@Mail2-UKD.VMED.UKD> Message-ID: <0E290E21-72BD-4E44-A6CE-ADADD1886432@donders.ru.nl> Hi Jan, You can look up the rationale in the work of Kensuke Sekihara. Look for 'eigenspace beamformer'. The implementation in FieldTrip is along these lines (but slightly differently implemented). Best wishes, Jan-Mathijs On Nov 6, 2012, at 2:34 PM, wrote: > Dear fieldtrip community, > > In LCMV beamforming there is an option cfg.lcmv.subspace=X. Does anyone have experience or recommendations regarding this option? Is there a publication in which the rationale is described? From looking at the code it seems that data and lead field are projected onto a subspace spanned by the first X singular vectors of the covariance matrix (correct me if I’m wrong). Seems helpful in my case but I am hesitant to use it without knowing anything about it. > > Thanks for any comment! > Jan > > -- > Jan Hirschmann > MSc Neuroscience > Institute of Clinical Neuroscience and Medical Psychology > Heinrich Heine University Düsseldorf > Universitätsstr. 1 > 40225 Düsseldorf > Germany > Tel: +49 (0)211 81 18415 > Fax: +49 (0)211 81 19033 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Tue Nov 6 16:36:48 2012 From: luke.bloy at gmail.com (Luke Bloy) Date: Tue, 6 Nov 2012 10:36:48 -0500 Subject: [FieldTrip] co registration of the mesh points to the atlas In-Reply-To: References: <508F97DC.9080009@donders.ru.nl> Message-ID: <50992e91.0347e00a.5ced.6484@mx.google.com> Hi Qi, I'm not sure if this is what you are looking for but take a look at the --morph option to mne_setup_source_space. It should let you create corresponding source grids in each of your subjects. -Luke -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of qi li Sent: Wednesday, October 31, 2012 5:39 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] co registration of the mesh points to the atlas Hi Jörn, Thanks a lot! This link is very helpful for my question. Actually, I followed the tutorial of source reconstruction of event-related fields using MNE which clearly states 'recon-all -surfreg -subjid Subject01' this already co-registered the original surface to the standard atlas sphere. So for each individual, their cortical surfaces are aligned at this step. The confusion is when down-sampling by using 'mne_setup_source_space --ico -6', what is exactly done(algorithm) to down-sample from 20,000 nodes to only 8196? This might be crucial for a group analysis so I seek a clarification. Thanks! Qi On Tue, Oct 30, 2012 at 5:03 AM, "Jörn M. Horschig" wrote: > Dear Qi, > > I guess this page might help: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_i > ndividual_head_space_that_are_all_aligned_in_mni_space?s[]=warp > > Best, > Jörn > > > On 10/25/2012 6:00 PM, qi li wrote: >> >> Hi, >> >> Is there any function to co-register the individual cortical mesh >> points(8196 in total) generate by fieldtrip to the standard brain. >> Thanks! >> >> Qi >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour Centre for > Cognitive Neuroimaging Radboud University Nijmegen Neuronal > Oscillations Group FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From harding at cbs.mpg.de Tue Nov 6 17:31:54 2012 From: harding at cbs.mpg.de (Eleanor Harding) Date: Tue, 6 Nov 2012 17:31:54 +0100 (CET) Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? In-Reply-To: <1053338968.6953.1352218543584.JavaMail.root@zimbra> Message-ID: <1002956758.7127.1352219514263.JavaMail.root@zimbra> Dear Fieldtrip community, I intend to run ICA on an EEG dataset with 64 channels (+ 2 eye channels), on epochs which are about 4 seconds long, and I am unsure as to how many independent components I should define (20,65,..?). My question is, is there a 'rule of thumb' for defining how many independent components to analyze for EEG? In the archives I have found only references to MEG datasets with many channels, for example reducing over 200 channels to 80 components. Looking in the literature today I also wasn't able to interpret an answer. If anyone has any information, references, or other input I would be much obliged. Thanks, Ellie -- ------------------------------------------------------------------ Eleanor Harding PhD Student Max Planck Institute for Human Cognitive and Brain Sciences Stephanstraße 1A, 04103 Leipzig, Germany Phone: +49 341 9940-2268 Fax: +49 341 9940 2260 http://www.cbs.mpg.de/~harding From polomacnenad at gmail.com Tue Nov 6 18:34:45 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Tue, 6 Nov 2012 18:34:45 +0100 Subject: [FieldTrip] opposite to the ft_appenddata Message-ID: Thank you very much to both of you! I will use Stephen's suggestion. It fits better with my situation! All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron__t at hotmail.com Tue Nov 6 19:27:44 2012 From: aaron__t at hotmail.com (Aaron T) Date: Tue, 6 Nov 2012 10:27:44 -0800 Subject: [FieldTrip] Beginner questions regarding trialfun and nex data Message-ID: I am trying to read event data from .nex files, and having a wee bit of difficulty. When I use the code cfg = [] cfg.dataset = 'Filename.nex' cfg.trialdef.eventtype = '?' ft_definetrial(cfg); The only event data that is returned is the Strobed channel with a number of values. Using event type = 'gui' yields a similar result. Looking at the example provided in the spikefield tutorial, I have run the same commands on the p029_sort_final_01.nex sample data on the website; this yields similar results (only the Strobed event type is returned, with a number of associated values). These values appear to correspond with the events that would be of interest: Looking at the trialfun_stimon.m code I see the following: hdr = ft_read_header(cfg.dataset); event = ft_read_event(cfg.dataset); correctresponse = 10041; begintrial = 10044; endtrial = 10045; stimon = 10030; distractorChange = 12000; targetChange = 12001; attCnds = 20001:20004; % att in/out by target change first/second I have looked at the sample data in offline sorter and neuroexplorer and cannot figure out from where these values for the Strobed event type (the only event returned by fieldtrip), are being ascertained (e.g., so I could write my own version of trialfun)? Any help very much appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From arno at cerco.ups-tlse.fr Tue Nov 6 19:44:03 2012 From: arno at cerco.ups-tlse.fr (Arnaud Delorme) Date: Tue, 6 Nov 2012 10:44:03 -0800 Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? In-Reply-To: <1002956758.7127.1352219514263.JavaMail.root@zimbra> References: <1002956758.7127.1352219514263.JavaMail.root@zimbra> Message-ID: Dear Ellie, you should decompose your full rank matrix. PCA dimension reduction may seriously affects and bias ICA solutions (I have seen a yet-to-be published report on that). Best, Arno On 6 Nov 2012, at 08:31, Eleanor Harding wrote: > Dear Fieldtrip community, > > I intend to run ICA on an EEG dataset with 64 channels (+ 2 eye channels), on epochs which are about 4 seconds long, and I am unsure as to how many independent components I should define (20,65,..?). > > My question is, is there a 'rule of thumb' for defining how many independent components to analyze for EEG? In the archives I have found only references to MEG datasets with many channels, for example reducing over 200 channels to 80 components. Looking in the literature today I also wasn't able to interpret an answer. > > If anyone has any information, references, or other input I would be much obliged. > > Thanks, > Ellie > > > > -- > ------------------------------------------------------------------ > Eleanor Harding > PhD Student > Max Planck Institute for Human Cognitive and Brain Sciences > Stephanstraße 1A, 04103 Leipzig, Germany > Phone: +49 341 9940-2268 > Fax: +49 341 9940 2260 > http://www.cbs.mpg.de/~harding > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Tue Nov 6 20:03:44 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 6 Nov 2012 20:03:44 +0100 Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? In-Reply-To: References: <1002956758.7127.1352219514263.JavaMail.root@zimbra> Message-ID: Dear Ellie, In addition to Arnaud's comment; if your question is how much components you should specify in your cfg.numcomponent parameter, I would suggest to just leave it at the default ('all'). This will give you as many components as their are channels in your data. Typically, specifying anything less than that will just lead to a number of components (the ones explaining least variance) being discarded. Best, Eelke On 6 November 2012 19:44, Arnaud Delorme wrote: > Dear Ellie, > > you should decompose your full rank matrix. PCA dimension reduction may seriously affects and bias ICA solutions (I have seen a yet-to-be published report on that). > > Best, > > Arno > > On 6 Nov 2012, at 08:31, Eleanor Harding wrote: > >> Dear Fieldtrip community, >> >> I intend to run ICA on an EEG dataset with 64 channels (+ 2 eye channels), on epochs which are about 4 seconds long, and I am unsure as to how many independent components I should define (20,65,..?). >> >> My question is, is there a 'rule of thumb' for defining how many independent components to analyze for EEG? In the archives I have found only references to MEG datasets with many channels, for example reducing over 200 channels to 80 components. Looking in the literature today I also wasn't able to interpret an answer. >> >> If anyone has any information, references, or other input I would be much obliged. >> >> Thanks, >> Ellie >> >> >> >> -- >> ------------------------------------------------------------------ >> Eleanor Harding >> PhD Student >> Max Planck Institute for Human Cognitive and Brain Sciences >> Stephanstraße 1A, 04103 Leipzig, Germany >> Phone: +49 341 9940-2268 >> Fax: +49 341 9940 2260 >> http://www.cbs.mpg.de/~harding >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From harding at cbs.mpg.de Wed Nov 7 11:37:21 2012 From: harding at cbs.mpg.de (Eleanor Harding) Date: Wed, 7 Nov 2012 11:37:21 +0100 (CET) Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? In-Reply-To: Message-ID: <1330528100.2559.1352284641098.JavaMail.root@zimbra> Dear Arno and Eelke, Thanks for the information. I also received the following code suggestion from J.Obleser in house cfg.runica.pca =rank(your_number_of_channels) which I am trying out right now. Cheers, Ellie ----- Original Message ----- From: fieldtrip-request at science.ru.nl To: fieldtrip at science.ru.nl Sent: Tuesday, November 6, 2012 6:34:47 PM Subject: fieldtrip Digest, Vol 24, Issue 5 Send fieldtrip mailing list submissions to fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to fieldtrip-request at science.ru.nl You can reach the person managing the list at fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: 1. subspace projection (Jan.Hirschmann at med.uni-duesseldorf.de) 2. Re: subspace projection (jan-mathijs schoffelen) 3. Re: co registration of the mesh points to the atlas (Luke Bloy) 4. 'rule of thumb' for defining how many independent components to analyze for EEG? (Eleanor Harding) 5. Re: opposite to the ft_appenddata (Nenad Polomac) ---------------------------------------------------------------------- Message: 1 Date: Tue, 6 Nov 2012 14:34:53 +0100 From: To: Subject: [FieldTrip] subspace projection Message-ID: <72E993C35FB11743B79FF9286E5B6D8B048E4A8B at Mail2-UKD.VMED.UKD> Content-Type: text/plain; charset="iso-8859-1" Dear fieldtrip community, In LCMV beamforming there is an option cfg.lcmv.subspace=X. Does anyone have experience or recommendations regarding this option? Is there a publication in which the rationale is described? From looking at the code it seems that data and lead field are projected onto a subspace spanned by the first X singular vectors of the covariance matrix (correct me if I'm wrong). Seems helpful in my case but I am hesitant to use it without knowing anything about it. Thanks for any comment! Jan -- Jan Hirschmann MSc Neuroscience Institute of Clinical Neuroscience and Medical Psychology Heinrich Heine University D?sseldorf Universit?tsstr. 1 40225 D?sseldorf Germany Tel: +49 (0)211 81 18415 Fax: +49 (0)211 81 19033 -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Tue, 6 Nov 2012 14:49:36 +0100 From: jan-mathijs schoffelen To: FieldTrip discussion list Subject: Re: [FieldTrip] subspace projection Message-ID: <0E290E21-72BD-4E44-A6CE-ADADD1886432 at donders.ru.nl> Content-Type: text/plain; charset="windows-1252" Hi Jan, You can look up the rationale in the work of Kensuke Sekihara. Look for 'eigenspace beamformer'. The implementation in FieldTrip is along these lines (but slightly differently implemented). Best wishes, Jan-Mathijs On Nov 6, 2012, at 2:34 PM, wrote: > Dear fieldtrip community, > > In LCMV beamforming there is an option cfg.lcmv.subspace=X. Does anyone have experience or recommendations regarding this option? Is there a publication in which the rationale is described? From looking at the code it seems that data and lead field are projected onto a subspace spanned by the first X singular vectors of the covariance matrix (correct me if I?m wrong). Seems helpful in my case but I am hesitant to use it without knowing anything about it. > > Thanks for any comment! > Jan > > -- > Jan Hirschmann > MSc Neuroscience > Institute of Clinical Neuroscience and Medical Psychology > Heinrich Heine University D?sseldorf > Universit?tsstr. 1 > 40225 D?sseldorf > Germany > Tel: +49 (0)211 81 18415 > Fax: +49 (0)211 81 19033 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 3 Date: Tue, 6 Nov 2012 10:36:48 -0500 From: "Luke Bloy" To: "'FieldTrip discussion list'" Subject: Re: [FieldTrip] co registration of the mesh points to the atlas Message-ID: <50992e91.0347e00a.5ced.6484 at mx.google.com> Content-Type: text/plain; charset="iso-8859-1" Hi Qi, I'm not sure if this is what you are looking for but take a look at the --morph option to mne_setup_source_space. It should let you create corresponding source grids in each of your subjects. -Luke -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of qi li Sent: Wednesday, October 31, 2012 5:39 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] co registration of the mesh points to the atlas Hi J?rn, Thanks a lot! This link is very helpful for my question. Actually, I followed the tutorial of source reconstruction of event-related fields using MNE which clearly states 'recon-all -surfreg -subjid Subject01' this already co-registered the original surface to the standard atlas sphere. So for each individual, their cortical surfaces are aligned at this step. The confusion is when down-sampling by using 'mne_setup_source_space --ico -6', what is exactly done(algorithm) to down-sample from 20,000 nodes to only 8196? This might be crucial for a group analysis so I seek a clarification. Thanks! Qi On Tue, Oct 30, 2012 at 5:03 AM, "J?rn M. Horschig" wrote: > Dear Qi, > > I guess this page might help: > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_i > ndividual_head_space_that_are_all_aligned_in_mni_space?s[]=warp > > Best, > J?rn > > > On 10/25/2012 6:00 PM, qi li wrote: >> >> Hi, >> >> Is there any function to co-register the individual cortical mesh >> points(8196 in total) generate by fieldtrip to the standard brain. >> Thanks! >> >> Qi >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour Centre for > Cognitive Neuroimaging Radboud University Nijmegen Neuronal > Oscillations Group FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ------------------------------ Message: 4 Date: Tue, 6 Nov 2012 17:31:54 +0100 (CET) From: Eleanor Harding To: fieldtrip at science.ru.nl Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? Message-ID: <1002956758.7127.1352219514263.JavaMail.root at zimbra> Content-Type: text/plain; charset=utf-8 Dear Fieldtrip community, I intend to run ICA on an EEG dataset with 64 channels (+ 2 eye channels), on epochs which are about 4 seconds long, and I am unsure as to how many independent components I should define (20,65,..?). My question is, is there a 'rule of thumb' for defining how many independent components to analyze for EEG? In the archives I have found only references to MEG datasets with many channels, for example reducing over 200 channels to 80 components. Looking in the literature today I also wasn't able to interpret an answer. If anyone has any information, references, or other input I would be much obliged. Thanks, Ellie -- ------------------------------------------------------------------ Eleanor Harding PhD Student Max Planck Institute for Human Cognitive and Brain Sciences Stephanstra?e 1A, 04103 Leipzig, Germany Phone: +49 341 9940-2268 Fax: +49 341 9940 2260 http://www.cbs.mpg.de/~harding ------------------------------ Message: 5 Date: Tue, 6 Nov 2012 18:34:45 +0100 From: Nenad Polomac To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] opposite to the ft_appenddata Message-ID: Content-Type: text/plain; charset="iso-8859-1" Thank you very much to both of you! I will use Stephen's suggestion. It fits better with my situation! All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 24, Issue 5 **************************************** -- ------------------------------------------------------------------ Eleanor Harding PhD Student Max Planck Institute for Human Cognitive and Brain Sciences Stephanstraße 1A, 04103 Leipzig, Germany Phone: +49 341 9940-2268 Fax: +49 341 9940 2260 http://www.cbs.mpg.de/~harding From matt.craddock at uni-leipzig.de Wed Nov 7 13:44:33 2012 From: matt.craddock at uni-leipzig.de (Matt Craddock) Date: Wed, 07 Nov 2012 13:44:33 +0100 Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? In-Reply-To: References: <1002956758.7127.1352219514263.JavaMail.root@zimbra> Message-ID: <509A57B1.8070709@uni-leipzig.de> On 06/11/2012 19:44, Arnaud Delorme wrote: > Dear Ellie, > > you should decompose your full rank matrix. PCA dimension reduction may seriously affects and bias ICA solutions (I have seen a yet-to-be published report on that). > > Best, > > Arno Dear all, Uh oh. If PCA is off the table, what should be done if the data is not full rank? e.g. if it's in average reference or multiple channels are bridged etc. Is the bias introduced by PCA worse than trying to decompose a matrix which is not full rank as if it were full rank? Wouldn't cfg.runica.pca =rank(your_number_of_channels) always set it to 1, and thus tell runica to reduce to only a single component? Or does setting it to 1 tell runica to detect rank-deficiency and suggest an appropriate reduction? I don't normally run ICA via fieldtrip, so am not sure how to tell it to detect the rank and reduce accordingly; EEGLAB at least asks you about this when it detects rank deficiency (or at least, should do - i've found it a little temperamental on this point, but this is the Fieldtrip list so...). Regards, Matt -- Dr. Matt Craddock Post-doctoral researcher, Institute of Psychology, University of Leipzig, Seeburgstr. 14-20, 04103 Leipzig, Germany Phone: +49 341 973 95 44 From poil.simonshlomo at gmail.com Wed Nov 7 14:21:13 2012 From: poil.simonshlomo at gmail.com (Simon-Shlomo Poil) Date: Wed, 7 Nov 2012 14:21:13 +0100 Subject: [FieldTrip] 'rule of thumb' for defining how many independent components to analyze for EEG? In-Reply-To: <509A57B1.8070709@uni-leipzig.de> References: <1002956758.7127.1352219514263.JavaMail.root@zimbra> <509A57B1.8070709@uni-leipzig.de> Message-ID: Dear all, My experience with cleaning high-density EEG (i.e. >=129 channels) is that PCA reduction is necessary before ICA. If you do not do the PCA, you (1) spread out your artifactual source across multiple components, (2) you get a lot of components representing single channels, and (3) you need long recordings to get enough data for so many component (i.e. ~30*129^2 as lower limit for 129 components, a rule-of-thumb I have from the EEGLAB website). This also means that we, e.g., recommend our students using the Neurophysiological Biomarker Toolbox to clean data to reduce their 129-channel data to rank 15 ( http://www.nbtwiki.net/doku.php?id=tutorial:compute_independent_component_analysis#.UJpfS4az70E)! It is simply easier for them to understand 15 components than 129 components... However, my opinion is only based on my non-systematical observations.. I don't know if, e.g., reducing a 129 channel Signal to a PCA rank 30 Signal potentially could remove low power neuronal signal (e.g. gamma oscillations)? I look forward to see the report on PCA dimension reduction effects on ICA! Back to Eleanor's question: I would also recommend you to do a full rank ICA for 64 channel data. Good luck with the cleaning. Best regards, Simon-Shlomo Poil 2012/11/7 Matt Craddock > On 06/11/2012 19:44, Arnaud Delorme wrote: > >> Dear Ellie, >> >> you should decompose your full rank matrix. PCA dimension reduction may >> seriously affects and bias ICA solutions (I have seen a yet-to-be published >> report on that). >> >> Best, >> >> Arno >> > > Dear all, > > Uh oh. If PCA is off the table, what should be done if the data is not > full rank? e.g. if it's in average reference or multiple channels are > bridged etc. Is the bias introduced by PCA worse than trying to decompose a > matrix which is not full rank as if it were full rank? > > Wouldn't > > cfg.runica.pca =rank(your_number_of_channels) > > always set it to 1, and thus tell runica to reduce to only a single > component? Or does setting it to 1 tell runica to detect rank-deficiency > and suggest an appropriate reduction? I don't normally run ICA via > fieldtrip, so am not sure how to tell it to detect the rank and reduce > accordingly; EEGLAB at least asks you about this when it detects rank > deficiency (or at least, should do - i've found it a little temperamental > on this point, but this is the Fieldtrip list so...). > > Regards, > Matt > -- > Dr. Matt Craddock > > Post-doctoral researcher, > Institute of Psychology, > University of Leipzig, > Seeburgstr. 14-20, > 04103 Leipzig, Germany > Phone: +49 341 973 95 44 > > ______________________________**_________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip > -- -- Simon-Shlomo Poil Center of MR-Research University Children’s Hospital Zurich Mobile number: +41 (0)76 399 5809 Office number: +41 (0)44 266 3129 Skype: poil.simonshlomo Webpage: http://www.poil.dk/s/ and http://www.nbtwiki.net and http://www.kispi.uzh.ch/Kinderspital/Medizin/mrzentrum_en.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Wed Nov 7 15:00:38 2012 From: luke.bloy at gmail.com (Luke Bloy) Date: Wed, 7 Nov 2012 09:00:38 -0500 Subject: [FieldTrip] using freesurfer cortical atlases Message-ID: <509a6987.9111e00a.5e14.ffffa79a@mx.google.com> Hi, I'm using cortically constrained mne to look at some auditory ERfs. I'm roughly following this tutorial, http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate. What I would like to do is to impart some anatomical information onto my findings. I can load the desikan atlas created by freesurfer using ft_read_atlas, but the points I get from this don't match the points I get from the sourcespace that I created with mne_setup_source -iso -6. Does anyone have any experience with this? Thanks, Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Nov 7 19:21:17 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 7 Nov 2012 19:21:17 +0100 Subject: [FieldTrip] using freesurfer cortical atlases In-Reply-To: <509a6987.9111e00a.5e14.ffffa79a@mx.google.com> References: <509a6987.9111e00a.5e14.ffffa79a@mx.google.com> Message-ID: Hi Luke, If you read in the *.fif sourcemodel using ft_read_headshape, it contains a field called 'orig'. The subfield orig.inuse links the vertices in the high resolution tessellation to the vertices in the sourcemodel. Best Jan-Mathijs On Nov 7, 2012, at 3:00 PM, Luke Bloy wrote: > Hi, > > I’m using cortically constrained mne to look at some auditory ERfs. I’m roughly following this tutorial, http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate. What I would like to do is to impart some anatomical information onto my findings. I can load the desikan atlas created by freesurfer using ft_read_atlas, but the points I get from this don’t match the points I get from the sourcespace that I created with mne_setup_source –iso -6. > > Does anyone have any experience with this? > > Thanks, > Luke > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Thu Nov 8 14:11:12 2012 From: luke.bloy at gmail.com (Luke Bloy) Date: Thu, 8 Nov 2012 08:11:12 -0500 Subject: [FieldTrip] using freesurfer cortical atlases In-Reply-To: References: <509a6987.9111e00a.5e14.ffffa79a@mx.google.com> Message-ID: <509baf71.2a74310a.053a.1035@mx.google.com> Thanks this is will be much faster than my brute force method. From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of jan-mathijs schoffelen Sent: Wednesday, November 07, 2012 1:21 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] using freesurfer cortical atlases Hi Luke, If you read in the *.fif sourcemodel using ft_read_headshape, it contains a field called 'orig'. The subfield orig.inuse links the vertices in the high resolution tessellation to the vertices in the sourcemodel. Best Jan-Mathijs On Nov 7, 2012, at 3:00 PM, Luke Bloy wrote: Hi, I'm using cortically constrained mne to look at some auditory ERfs. I'm roughly following this tutorial, http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate. What I would like to do is to impart some anatomical information onto my findings. I can load the desikan atlas created by freesurfer using ft_read_atlas, but the points I get from this don't match the points I get from the sourcespace that I created with mne_setup_source -iso -6. Does anyone have any experience with this? Thanks, Luke _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Thu Nov 8 16:17:47 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Thu, 8 Nov 2012 16:17:47 +0100 Subject: [FieldTrip] global field power Message-ID: Hi, Is there any options in the fieldtrip to calculate global field power for MEG data? Thank you in advance! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Nov 8 16:32:36 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 8 Nov 2012 16:32:36 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: Hi Nenad, There are several options available for doing this. You can call, for instance, ft_preprocessing with the option cfg.rectify = 'yes', and then compute the mean signal over any or all of time/trials/channels with some custom code. Does this help? If not, please specify your problem a bit more. Best, Eelke On 8 November 2012 16:17, Nenad Polomac wrote: > Hi, > Is there any options in the fieldtrip to calculate global field power for > MEG data? > > Thank you in advance! > > Nenad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jan.schoffelen at donders.ru.nl Thu Nov 8 16:35:57 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 8 Nov 2012 16:35:57 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: Hi Nenad, No, there is not, but I guess you can use matlabs std function for that. Best, Jan-Mathijs On Nov 8, 2012, at 4:17 PM, Nenad Polomac wrote: > Hi, > Is there any options in the fieldtrip to calculate global field power for MEG data? > > Thank you in advance! > > Nenad > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Nov 8 18:02:38 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 8 Nov 2012 18:02:38 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: JM is right, global field power is the std over channels. Apologies for any confusion I may have caused; I did not know the term and thought you meant something like 'total signal power'. Cheers, Eelke Op 8 nov. 2012 16:39 schreef "jan-mathijs schoffelen" < jan.schoffelen at donders.ru.nl> het volgende: > Hi Nenad, > > No, there is not, but I guess you can use matlabs std function for that. > > Best, > > Jan-Mathijs > > On Nov 8, 2012, at 4:17 PM, Nenad Polomac wrote: > > Hi, > Is there any options in the fieldtrip to calculate global field power for > MEG data? > > Thank you in advance! > > Nenad > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From venug001 at crimson.ua.edu Thu Nov 8 18:21:53 2012 From: venug001 at crimson.ua.edu (Gopakumar Venugopalan) Date: Thu, 8 Nov 2012 14:21:53 -0300 Subject: [FieldTrip] request for 4d users In-Reply-To: References: Message-ID: Dear JM, I have simultaneously recorded EEG/MEG data using 4D. Yes they use the 10-20 (or some variant thereof) system for EEG. This information can be extracted from the headers, and it is possible to relabel the channel locations in EEGLAB, and it is also possible to replace the standard xyz coordinates, with the coordinates from your own individual xyz file--generated by 4D (using Polhemus). Hope to hear from you. warm regards gopa On Wed, Oct 31, 2012 at 4:03 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Dear community and 4d-users in particular, > > I am in the process of implementing more robust support in the fileio > module to deal with simultaneous MEG/EEG measurements using the > 4D-neuroimaging system. Specifically, I want to improve the reading of EEG > electrode positions, when these have been digitized using the Polhemus in > combination with the 4D acquisition software. This question has been raised > on this list over a year ago by Margit Schönherr (who kindly sent me a > dataset to work with: thanks Margit), but it would be really helpful if I > could benefit from your knowledge/input. At the moment FT can extract > electrode positions from the header, but it is based on reverse engineering > based on 1 dataset only. Therefore I would like to ask you whether you > could send me some (as small as possible) datasets, which contain digitized > electrode positions (in combination with the corresponding config and > hs_file). This would be much appreciated. > On a related note, Margit's dataset contained electrode positions in > combination with their labels according to the 10/20 convention. Does > anybody know whether information is stored in the file-header that links > the named electrodes to the generic naming scheme 'E1'...'Ex'? > > Thanks for any input, > > JM > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Thu Nov 8 20:34:14 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Thu, 8 Nov 2012 20:34:14 +0100 Subject: [FieldTrip] global field power Message-ID: Dear Jan and Elke, Thank you for your ansewers! I have applied The Matlabs std function on data.avg matrix and it doesn't give me good results. Namely, it returns matrix with [1 x time points] so it reduces number of channels to one, which is not what I want. I believe this is because the sum function sums data column-wise. My question is could I do only sqrt(data.var). Would this result be proper way of calculating global field power? All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Nov 8 20:46:34 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 8 Nov 2012 20:46:34 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: Dear Nenad, The only definition I could find for 'global field power' in the context of EEG is indeed as JM suggested, the standard deviation over channels. Of course, computing this std collapses across the channel dimension, so you end up with a dimensionality of 1 where previously there was the dimensionality of nChannels. If this is not what you are after, you need to give us a clear definition of what you mean by 'global field power'. Best, Eelke On 8 November 2012 20:34, Nenad Polomac wrote: > Dear Jan and Elke, > > Thank you for your ansewers! > I have applied The Matlabs std function on data.avg matrix and it doesn't > give me good results. Namely, it returns matrix with [1 x time points] so > it reduces number of channels to one, which is not what I want. I believe > this is because the sum function sums data column-wise. My question is could > I do only sqrt(data.var). Would this result be proper way of calculating > global field power? > > All the best! > > Nenad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From nathanweisz at mac.com Fri Nov 9 07:28:50 2012 From: nathanweisz at mac.com (Nathan Weisz) Date: Fri, 09 Nov 2012 07:28:50 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: Hi, I think Nenad means something like (untested code): data.GFP=mean(data.avg.^2) or for data.RMS=sqrt(mean(data.avg.^2)) Good luck, n On 08.11.2012, at 20:46, Eelke Spaak wrote: > Dear Nenad, > > The only definition I could find for 'global field power' in the > context of EEG is indeed as JM suggested, the standard deviation over > channels. Of course, computing this std collapses across the channel > dimension, so you end up with a dimensionality of 1 where previously > there was the dimensionality of nChannels. > > If this is not what you are after, you need to give us a clear > definition of what you mean by 'global field power'. > > Best, > Eelke > > On 8 November 2012 20:34, Nenad Polomac wrote: >> Dear Jan and Elke, >> >> Thank you for your ansewers! >> I have applied The Matlabs std function on data.avg matrix and it doesn't >> give me good results. Namely, it returns matrix with [1 x time points] so >> it reduces number of channels to one, which is not what I want. I believe >> this is because the sum function sums data column-wise. My question is could >> I do only sqrt(data.var). Would this result be proper way of calculating >> global field power? >> >> All the best! >> >> Nenad >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Fri Nov 9 08:53:27 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 9 Nov 2012 08:53:27 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: If something like that is what you are after then my first post is still relevant :) Cheers, Eelke On 9 November 2012 07:28, Nathan Weisz wrote: > Hi, > > I think Nenad means something like (untested code): > data.GFP=mean(data.avg.^2) > > or for > data.RMS=sqrt(mean(data.avg.^2)) > > Good luck, > n > > On 08.11.2012, at 20:46, Eelke Spaak wrote: > >> Dear Nenad, >> >> The only definition I could find for 'global field power' in the >> context of EEG is indeed as JM suggested, the standard deviation over >> channels. Of course, computing this std collapses across the channel >> dimension, so you end up with a dimensionality of 1 where previously >> there was the dimensionality of nChannels. >> >> If this is not what you are after, you need to give us a clear >> definition of what you mean by 'global field power'. >> >> Best, >> Eelke >> >> On 8 November 2012 20:34, Nenad Polomac wrote: >>> Dear Jan and Elke, >>> >>> Thank you for your ansewers! >>> I have applied The Matlabs std function on data.avg matrix and it doesn't >>> give me good results. Namely, it returns matrix with [1 x time points] so >>> it reduces number of channels to one, which is not what I want. I believe >>> this is because the sum function sums data column-wise. My question is could >>> I do only sqrt(data.var). Would this result be proper way of calculating >>> global field power? >>> >>> All the best! >>> >>> Nenad >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From g.piantoni at nin.knaw.nl Fri Nov 9 09:09:35 2012 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Fri, 9 Nov 2012 09:09:35 +0100 Subject: [FieldTrip] global field power In-Reply-To: References: Message-ID: Hi, There is an EEGLAB implementation of the original (Lehman's) GFP definition that might help you: https://sccn.ucsd.edu/svn/software/eeglab/external/bioelectromagnetism_ligth/eeg_gfp.m I don't know of any code for Fieldtrip though. Cheers, G On Fri, Nov 9, 2012 at 7:28 AM, Nathan Weisz wrote: > Hi, > > I think Nenad means something like (untested code): > data.GFP=mean(data.avg.^2) > > or for > data.RMS=sqrt(mean(data.avg.^2)) > > Good luck, > n > > On 08.11.2012, at 20:46, Eelke Spaak wrote: > >> Dear Nenad, >> >> The only definition I could find for 'global field power' in the >> context of EEG is indeed as JM suggested, the standard deviation over >> channels. Of course, computing this std collapses across the channel >> dimension, so you end up with a dimensionality of 1 where previously >> there was the dimensionality of nChannels. >> >> If this is not what you are after, you need to give us a clear >> definition of what you mean by 'global field power'. >> >> Best, >> Eelke >> >> On 8 November 2012 20:34, Nenad Polomac wrote: >>> Dear Jan and Elke, >>> >>> Thank you for your ansewers! >>> I have applied The Matlabs std function on data.avg matrix and it doesn't >>> give me good results. Namely, it returns matrix with [1 x time points] so >>> it reduces number of channels to one, which is not what I want. I believe >>> this is because the sum function sums data column-wise. My question is could >>> I do only sqrt(data.var). Would this result be proper way of calculating >>> global field power? >>> >>> All the best! >>> >>> Nenad >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From polomacnenad at gmail.com Fri Nov 9 10:15:49 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Fri, 9 Nov 2012 10:15:49 +0100 Subject: [FieldTrip] global field power Message-ID: Dear all, Thank you very much for your discussion, and sorry if I was confusing. Thank you for your suggestions, I solved my problem now. @Eelke for the global field power I meant this http://www.sciencedirect.com/science/article/pii/0301008284900030 page 235. Thank you very much for you effort! All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank.ye.mei at gmail.com Fri Nov 9 22:50:39 2012 From: frank.ye.mei at gmail.com (Ye Mei) Date: Fri, 09 Nov 2012 16:50:39 -0500 Subject: [FieldTrip] Is FT_VOLUMEREALIGN required for MEG MRI source localization? Message-ID: <509D7AAF.1020003@gmail.com> Dear all, For source localization, do I need to first registrate the subject's MR scan to the coil locations/fiducials? I suppose yes. But, when I looked at the fieldtrip tutorial (http://fieldtrip.fcdonders.nl/tutorial/beamformer), I didn't see the function FT_VOLUMEREALIGN was used? Could someone explain that? Many thanks in advance. Kind regards Ye Mei From a.stolk at fcdonders.ru.nl Sat Nov 10 14:04:52 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Sat, 10 Nov 2012 14:04:52 +0100 (CET) Subject: [FieldTrip] Is FT_VOLUMEREALIGN required for MEG MRI source localization? In-Reply-To: <509D7AAF.1020003@gmail.com> Message-ID: <915729497.1200106.1352552692303.JavaMail.root@sculptor.zimbra.ru.nl> Hi Ye Mei, It is indeed important to have your anatomical MRI aligned to the coordinate system of your electrophysiological recording. ft_volumerealign will not change the anatomical data itself, it only creates a transformation matrix (.transform field) that aligns the anatomy to the intended coordinate system. With respect to the tutorial anatomical data, this procedure was already applied. Namely, the anatomical MRI is already aligned to the CTF (MEG) coordinate system and stored as such. For more details, please see: http://fieldtrip.fcdonders.nl/tutorial/headmodel_meg Hope this answered your question, Arjen ----- Oorspronkelijk bericht ----- > Van: "Ye Mei" > Aan: fieldtrip at science.ru.nl > Verzonden: Vrijdag 9 november 2012 22:50:39 > Onderwerp: [FieldTrip] Is FT_VOLUMEREALIGN required for MEG MRI source localization? > Dear all, > > For source localization, do I need to first registrate the subject's > MR > scan to the coil locations/fiducials? I suppose yes. But, when I > looked > at the fieldtrip tutorial > (http://fieldtrip.fcdonders.nl/tutorial/beamformer), I didn't see the > function FT_VOLUMEREALIGN was used? > > Could someone explain that? > > Many thanks in advance. > > Kind regards > > Ye Mei > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Caroline.Lustenberger at kispi.uzh.ch Sun Nov 11 14:25:31 2012 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Sun, 11 Nov 2012 13:25:31 +0000 Subject: [FieldTrip] Cluster statistics Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A@kispi.uzh.ch> Dear fieldtrip users I tried to perform cluster analysis with fieldtrip. Since I've performed preprocessing/frequency analysis before using fieldtrip, I had to form the specific data structure to use for ft_freqstatistics by myself. I made a a structur as follows: Condition 1 'EEGa': --> 10 subjects: EEGa{1:10} label: {128x1 cell} %128 egi elec. dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Condition 2 'EEGm': EEGm{1:10} label: {128x1 cell} dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Then I performed the following steps: cfg = []; cfg.elec = elec; %was defined before EGI 128 electrodes cfg.neighbours = neighbours; %also successfully defined before cfg.latency = 'all'; %cfg.frequency = 'all'; cfg.channel = 'all';%eleselection % see CHANNELSELECTION cfg.avgovertime = 'no'; %cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'depsamplesT'; cfg.numrandomization = 2^10; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.alpha = 0.05; cfg.clustertail = 0; cfg.feedback = 'gui'; cfg.parameter = 'powspctrm'; cfg.design = [ 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 % subject number 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); The function ft_freqstatistics runs but the stats results are strange. My stats.stat is always -inf and stats.prob always 0 What might be the problem? Thanks and all the best Caroline Von meinem iPhone gesendet -------------- next part -------------- An HTML attachment was scrubbed... URL: From chakalov.ivan at googlemail.com Mon Nov 12 11:16:48 2012 From: chakalov.ivan at googlemail.com (Ivan Chakalov) Date: Mon, 12 Nov 2012 11:16:48 +0100 Subject: [FieldTrip] baseline_normalization Message-ID: Dear Fieldtrippers, I have question regarding the baseline normalization using Time Frequency Analyses on a sensor space-level. I have used “Hanning tapper “for analyzing MEG data with “relchange” (relative change) baseline-normalization. So far I have no idea how to report the obtained results in terms of units or dimensions? Should it be called “relative change of the spectral power”? As I understood, if *Pa* is the spectral power of the post-rigger time-period and *Pb* is the spectral power of the pre-trigger period, the “relchange” value is calculated as: Pa-Pb/Pb Am I correct? Thank you in advanced! Ivan Chakalov -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon Nov 12 11:24:42 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 12 Nov 2012 11:24:42 +0100 Subject: [FieldTrip] baseline_normalization In-Reply-To: References: Message-ID: Dear Ivan, Yes, you are correct. I think "relative change of spectral power" covers what the formula means quite well. Best, Eelke On 12 November 2012 11:16, Ivan Chakalov wrote: > Dear Fieldtrippers, > > I have question regarding the baseline normalization using Time Frequency > Analyses on a sensor space-level. I have used “Hanning tapper “for analyzing > MEG data with “relchange” (relative change) baseline-normalization. So far I > have no idea how to report the obtained results in terms of units or > dimensions? Should it be called “relative change of the spectral power”? As > I understood, if Pa is the spectral power of the post-rigger time-period and > Pb is the spectral power of the pre-trigger period, the “relchange” value is > calculated as: Pa-Pb/Pb > > Am I correct? > > > > Thank you in advanced! > > Ivan Chakalov > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From chakalov.ivan at googlemail.com Mon Nov 12 11:27:47 2012 From: chakalov.ivan at googlemail.com (Ivan Chakalov) Date: Mon, 12 Nov 2012 11:27:47 +0100 Subject: [FieldTrip] baseline_normalization In-Reply-To: References: Message-ID: Thanks a lot! On 12 November 2012 11:24, Eelke Spaak wrote: > Dear Ivan, > > Yes, you are correct. I think "relative change of spectral power" > covers what the formula means quite well. > > Best, > Eelke > > On 12 November 2012 11:16, Ivan Chakalov > wrote: > > Dear Fieldtrippers, > > > > I have question regarding the baseline normalization using Time Frequency > > Analyses on a sensor space-level. I have used “Hanning tapper “for > analyzing > > MEG data with “relchange” (relative change) baseline-normalization. So > far I > > have no idea how to report the obtained results in terms of units or > > dimensions? Should it be called “relative change of the spectral > power”? As > > I understood, if Pa is the spectral power of the post-rigger time-period > and > > Pb is the spectral power of the pre-trigger period, the “relchange” > value is > > calculated as: Pa-Pb/Pb > > > > Am I correct? > > > > > > > > Thank you in advanced! > > > > Ivan Chakalov > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Mon Nov 12 14:30:28 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Mon, 12 Nov 2012 07:30:28 -0600 Subject: [FieldTrip] Cluster statistics Message-ID: Hi Caroline, It looks to me like your grand averages don't have any EEG data in them; here is what mine look like: label: {60x1 cell} time: [1x601 double] individual: [19x60x601 double] dimord: 'subj_chan_time' cfg: [1x1 struct] elec: [1x1 struct] To run cluster statistics your structure has to have that "individual" field, which has the ERPs for each subject (for instance, from mine you can see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). I got mine by importing each subject's data into FieldTrip, and then using ft_timelockgrandaverage() with cfg.keepindividual='yes'. That is my guess about what your problem is, but I could be wrong. After you ran it, did you check stat.posclusters and stat.negclusters? I think those are more important than stat.stat and stat.prob; they tell you which clusters are actually significant (and stat.posclusterslabelmat and stat.negclusterslabelmat tell you where/when the clusters are). Best, Steve Message: 1 > Date: Sun, 11 Nov 2012 13:25:31 +0000 > From: Lustenberger Caroline > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Cluster statistics > Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A at kispi.uzh.ch> > Content-Type: text/plain; charset="utf-8" > > Dear fieldtrip users > > I tried to perform cluster analysis with fieldtrip. Since I've performed > preprocessing/frequency analysis before using fieldtrip, I had to form the > specific > data structure to use for ft_freqstatistics by myself. > > I made a a structur as follows: > Condition 1 'EEGa': > --> 10 subjects: > EEGa{1:10} > label: {128x1 cell} %128 egi elec. > dimord: 'chan_freq' > freq: 1 > powspctrm: [128x1 double] > cumtapcnt: 1 > cfg: [1x1 struct] > > Condition 2 'EEGm': > EEGm{1:10} > label: {128x1 cell} > dimord: 'chan_freq' > freq: 1 > powspctrm: [128x1 double] > cumtapcnt: 1 > cfg: [1x1 struct] > > > Then I performed the following steps: > > cfg = []; > > cfg.elec = elec; %was defined before EGI 128 electrodes > > cfg.neighbours = neighbours; %also successfully defined before > > cfg.latency = 'all'; > > %cfg.frequency = 'all'; > > cfg.channel = 'all';%eleselection % see CHANNELSELECTION > > cfg.avgovertime = 'no'; > > %cfg.avgoverfreq = 'no'; > > cfg.avgoverchan = 'no'; > > cfg.statistic = 'depsamplesT'; > > cfg.numrandomization = 2^10; > > cfg.correctm = 'cluster'; > > cfg.method = 'montecarlo'; > > cfg.clusteralpha = 0.05; > > cfg.alpha = 0.05; > > cfg.alpha = 0.05; > > cfg.clustertail = 0; > > cfg.feedback = 'gui'; > > cfg.parameter = 'powspctrm'; > > cfg.design = [ > > 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 > 9 10 % subject number > > 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number > > cfg.uvar = 1; % "subject" is unit of observation > > cfg.ivar = 2; % "condition" is the independent variable > > stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); > > > > > The function ft_freqstatistics runs but the stats results are strange. > My stats.stat is always -inf > and stats.prob always 0 > > What might be the problem? > > > Thanks and all the best > Caroline > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Caroline.Lustenberger at kispi.uzh.ch Mon Nov 12 14:57:38 2012 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Mon, 12 Nov 2012 13:57:38 +0000 Subject: [FieldTrip] Cluster statistics In-Reply-To: Message-ID: <7C66D90E0C18014E85B44B560D4D5BC81488F224@EXZH1VM.kispi.int> Dear Steve Thank you so much for your fast answering. I try your advices and hope it works. Otherwise I let you know. All the best Caroline ________________________________ Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Politzer-Ahles Gesendet: Montag, 12. November 2012 14:30 An: fieldtrip at science.ru.nl Betreff: Re: [FieldTrip] Cluster statistics Hi Caroline, It looks to me like your grand averages don't have any EEG data in them; here is what mine look like: label: {60x1 cell} time: [1x601 double] individual: [19x60x601 double] dimord: 'subj_chan_time' cfg: [1x1 struct] elec: [1x1 struct] To run cluster statistics your structure has to have that "individual" field, which has the ERPs for each subject (for instance, from mine you can see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). I got mine by importing each subject's data into FieldTrip, and then using ft_timelockgrandaverage() with cfg.keepindividual='yes'. That is my guess about what your problem is, but I could be wrong. After you ran it, did you check stat.posclusters and stat.negclusters? I think those are more important than stat.stat and stat.prob; they tell you which clusters are actually significant (and stat.posclusterslabelmat and stat.negclusterslabelmat tell you where/when the clusters are). Best, Steve Message: 1 Date: Sun, 11 Nov 2012 13:25:31 +0000 From: Lustenberger Caroline > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Cluster statistics Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A at kispi.uzh.ch> Content-Type: text/plain; charset="utf-8" Dear fieldtrip users I tried to perform cluster analysis with fieldtrip. Since I've performed preprocessing/frequency analysis before using fieldtrip, I had to form the specific data structure to use for ft_freqstatistics by myself. I made a a structur as follows: Condition 1 'EEGa': --> 10 subjects: EEGa{1:10} label: {128x1 cell} %128 egi elec. dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Condition 2 'EEGm': EEGm{1:10} label: {128x1 cell} dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Then I performed the following steps: cfg = []; cfg.elec = elec; %was defined before EGI 128 electrodes cfg.neighbours = neighbours; %also successfully defined before cfg.latency = 'all'; %cfg.frequency = 'all'; cfg.channel = 'all';%eleselection % see CHANNELSELECTION cfg.avgovertime = 'no'; %cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'depsamplesT'; cfg.numrandomization = 2^10; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.alpha = 0.05; cfg.clustertail = 0; cfg.feedback = 'gui'; cfg.parameter = 'powspctrm'; cfg.design = [ 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 % subject number 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); The function ft_freqstatistics runs but the stats results are strange. My stats.stat is always -inf and stats.prob always 0 What might be the problem? Thanks and all the best Caroline -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.piantoni at nin.knaw.nl Mon Nov 12 16:17:01 2012 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Mon, 12 Nov 2012 16:17:01 +0100 Subject: [FieldTrip] baseline_normalization In-Reply-To: References: Message-ID: Hi Ivan, If you multiply the values by 100, you get the "percentage change", which is very straightforward to interpret. Cheers, G On Mon, Nov 12, 2012 at 11:24 AM, Eelke Spaak wrote: > Dear Ivan, > > Yes, you are correct. I think "relative change of spectral power" > covers what the formula means quite well. > > Best, > Eelke > > On 12 November 2012 11:16, Ivan Chakalov wrote: >> Dear Fieldtrippers, >> >> I have question regarding the baseline normalization using Time Frequency >> Analyses on a sensor space-level. I have used “Hanning tapper “for analyzing >> MEG data with “relchange” (relative change) baseline-normalization. So far I >> have no idea how to report the obtained results in terms of units or >> dimensions? Should it be called “relative change of the spectral power”? As >> I understood, if Pa is the spectral power of the post-rigger time-period and >> Pb is the spectral power of the pre-trigger period, the “relchange” value is >> calculated as: Pa-Pb/Pb >> >> Am I correct? >> >> >> >> Thank you in advanced! >> >> Ivan Chakalov >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From chakalov.ivan at googlemail.com Mon Nov 12 16:28:51 2012 From: chakalov.ivan at googlemail.com (Ivan Chakalov) Date: Mon, 12 Nov 2012 16:28:51 +0100 Subject: [FieldTrip] baseline_normalization In-Reply-To: References: Message-ID: Thank you, it is a very good idea! Best, Ivan On 12 November 2012 16:17, Gio Piantoni wrote: > Hi Ivan, > > If you multiply the values by 100, you get the "percentage change", > which is very straightforward to interpret. > > Cheers, > G > > On Mon, Nov 12, 2012 at 11:24 AM, Eelke Spaak > wrote: > > Dear Ivan, > > > > Yes, you are correct. I think "relative change of spectral power" > > covers what the formula means quite well. > > > > Best, > > Eelke > > > > On 12 November 2012 11:16, Ivan Chakalov > wrote: > >> Dear Fieldtrippers, > >> > >> I have question regarding the baseline normalization using Time > Frequency > >> Analyses on a sensor space-level. I have used “Hanning tapper “for > analyzing > >> MEG data with “relchange” (relative change) baseline-normalization. So > far I > >> have no idea how to report the obtained results in terms of units or > >> dimensions? Should it be called “relative change of the spectral > power”? As > >> I understood, if Pa is the spectral power of the post-rigger > time-period and > >> Pb is the spectral power of the pre-trigger period, the “relchange” > value is > >> calculated as: Pa-Pb/Pb > >> > >> Am I correct? > >> > >> > >> > >> Thank you in advanced! > >> > >> Ivan Chakalov > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Caroline.Lustenberger at kispi.uzh.ch Mon Nov 12 16:55:35 2012 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Mon, 12 Nov 2012 15:55:35 +0000 Subject: [FieldTrip] Cluster statistics In-Reply-To: Message-ID: <7C66D90E0C18014E85B44B560D4D5BC81488F2C5@EXZH1VM.kispi.int> Dear Steve It seems to work now. However, when I have NaN values in my powerspectrum array, I recieve the following error: ??? Invalid MEX-file 'C:\Users\Caroline\MATLAB_PhD\fieldtrip-20110927\fieldtrip-20110927\statfun\private\nanmean.mexw64': The specified module could not be found. Error in ==> statfun_depsamplesT at 98 avgdiff = nanmean(diffmat,2); Error in ==> statistics_montecarlo at 240 [statobs, cfg] = statfun(cfg, dat, design); Error in ==> ft_freqstatistics at 279 [stat, cfg] = statmethod(cfg, dat, cfg.design); What might be the problem? Is there a detailed documentation about the command ft_freqstatistics, especially about the meanings of the stats output and what kind of input is possible (e.g. t-test, ...) Thanks again for all your help and best wishes Caroline ________________________________ Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Politzer-Ahles Gesendet: Montag, 12. November 2012 14:30 An: fieldtrip at science.ru.nl Betreff: Re: [FieldTrip] Cluster statistics Hi Caroline, It looks to me like your grand averages don't have any EEG data in them; here is what mine look like: label: {60x1 cell} time: [1x601 double] individual: [19x60x601 double] dimord: 'subj_chan_time' cfg: [1x1 struct] elec: [1x1 struct] To run cluster statistics your structure has to have that "individual" field, which has the ERPs for each subject (for instance, from mine you can see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). I got mine by importing each subject's data into FieldTrip, and then using ft_timelockgrandaverage() with cfg.keepindividual='yes'. That is my guess about what your problem is, but I could be wrong. After you ran it, did you check stat.posclusters and stat.negclusters? I think those are more important than stat.stat and stat.prob; they tell you which clusters are actually significant (and stat.posclusterslabelmat and stat.negclusterslabelmat tell you where/when the clusters are). Best, Steve Message: 1 Date: Sun, 11 Nov 2012 13:25:31 +0000 From: Lustenberger Caroline > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Cluster statistics Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A at kispi.uzh.ch> Content-Type: text/plain; charset="utf-8" Dear fieldtrip users I tried to perform cluster analysis with fieldtrip. Since I've performed preprocessing/frequency analysis before using fieldtrip, I had to form the specific data structure to use for ft_freqstatistics by myself. I made a a structur as follows: Condition 1 'EEGa': --> 10 subjects: EEGa{1:10} label: {128x1 cell} %128 egi elec. dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Condition 2 'EEGm': EEGm{1:10} label: {128x1 cell} dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Then I performed the following steps: cfg = []; cfg.elec = elec; %was defined before EGI 128 electrodes cfg.neighbours = neighbours; %also successfully defined before cfg.latency = 'all'; %cfg.frequency = 'all'; cfg.channel = 'all';%eleselection % see CHANNELSELECTION cfg.avgovertime = 'no'; %cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'depsamplesT'; cfg.numrandomization = 2^10; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.alpha = 0.05; cfg.clustertail = 0; cfg.feedback = 'gui'; cfg.parameter = 'powspctrm'; cfg.design = [ 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 % subject number 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); The function ft_freqstatistics runs but the stats results are strange. My stats.stat is always -inf and stats.prob always 0 What might be the problem? Thanks and all the best Caroline -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Mon Nov 12 17:08:28 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Mon, 12 Nov 2012 17:08:28 +0100 Subject: [FieldTrip] Cluster statistics In-Reply-To: <7C66D90E0C18014E85B44B560D4D5BC81488F2C5@EXZH1VM.kispi.int> References: <7C66D90E0C18014E85B44B560D4D5BC81488F2C5@EXZH1VM.kispi.int> Message-ID: Dear Caroline, Just to be sure - are you working on a recent version of FieldTrip (your pathname suggests otherwise)? The error seems to suggest you are just missing the mexfile which updating your version might solve. You can take a look at the specific statfun_* functions for details about their output. A very generic overview is giving in the Fieldtrup Walkthrough (see the left dropdown documentation menu on the website) in which the output input-output structure is explained. That might help as well. Cheers, Stephen On 12 November 2012 16:55, Lustenberger Caroline < Caroline.Lustenberger at kispi.uzh.ch> wrote: > ** > Dear Steve > > It seems to work now. However, when I have NaN values in my powerspectrum > array, I recieve the following error: > > ??? Invalid MEX-file > > 'C:\Users\Caroline\MATLAB_PhD\fieldtrip-20110927\fieldtrip-20110927\statfun\private\nanmean.mexw64': > The specified module could not be found. > > Error in ==> statfun_depsamplesT at 98 > avgdiff = nanmean(diffmat,2); > > Error in ==> statistics_montecarlo at 240 > [statobs, cfg] = statfun(cfg, dat, design); > > Error in ==> ft_freqstatistics at 279 > [stat, cfg] = statmethod(cfg, dat, cfg.design); > > What might be the problem? > > Is there a detailed documentation about the command ft_freqstatistics, > especially about the meanings of the stats output and what kind of input is > possible (e.g. t-test, ...) > > Thanks again for all your help and best wishes > Caroline > > > ------------------------------ > *Von:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *Im Auftrag von *Stephen Politzer-Ahles > *Gesendet:* Montag, 12. November 2012 14:30 > *An:* fieldtrip at science.ru.nl > *Betreff:* Re: [FieldTrip] Cluster statistics > > Hi Caroline, > > It looks to me like your grand averages don't have any EEG data in them; > here is what mine look like: > > label: {60x1 cell} > time: [1x601 double] > individual: [19x60x601 double] > dimord: 'subj_chan_time' > cfg: [1x1 struct] > elec: [1x1 struct] > > To run cluster statistics your structure has to have that "individual" > field, which has the ERPs for each subject (for instance, from mine you can > see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). > I got mine by importing each subject's data into FieldTrip, and then using > ft_timelockgrandaverage() with cfg.keepindividual='yes'. > > That is my guess about what your problem is, but I could be wrong. After > you ran it, did you check stat.posclusters and stat.negclusters? I think > those are more important than stat.stat and stat.prob; they tell you which > clusters are actually significant (and stat.posclusterslabelmat and > stat.negclusterslabelmat tell you where/when the clusters are). > > Best, > Steve > > > Message: 1 >> Date: Sun, 11 Nov 2012 13:25:31 +0000 >> From: Lustenberger Caroline >> To: "fieldtrip at science.ru.nl" >> Subject: [FieldTrip] Cluster statistics >> Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A at kispi.uzh.ch> >> Content-Type: text/plain; charset="utf-8" >> >> Dear fieldtrip users >> >> I tried to perform cluster analysis with fieldtrip. Since I've performed >> preprocessing/frequency analysis before using fieldtrip, I had to form the >> specific >> data structure to use for ft_freqstatistics by myself. >> >> I made a a structur as follows: >> Condition 1 'EEGa': >> --> 10 subjects: >> EEGa{1:10} >> label: {128x1 cell} %128 egi elec. >> dimord: 'chan_freq' >> freq: 1 >> powspctrm: [128x1 double] >> cumtapcnt: 1 >> cfg: [1x1 struct] >> >> Condition 2 'EEGm': >> EEGm{1:10} >> label: {128x1 cell} >> dimord: 'chan_freq' >> freq: 1 >> powspctrm: [128x1 double] >> cumtapcnt: 1 >> cfg: [1x1 struct] >> >> >> Then I performed the following steps: >> >> cfg = []; >> >> cfg.elec = elec; %was defined before EGI 128 electrodes >> >> cfg.neighbours = neighbours; %also successfully defined before >> >> cfg.latency = 'all'; >> >> %cfg.frequency = 'all'; >> >> cfg.channel = 'all';%eleselection % see CHANNELSELECTION >> >> cfg.avgovertime = 'no'; >> >> %cfg.avgoverfreq = 'no'; >> >> cfg.avgoverchan = 'no'; >> >> cfg.statistic = 'depsamplesT'; >> >> cfg.numrandomization = 2^10; >> >> cfg.correctm = 'cluster'; >> >> cfg.method = 'montecarlo'; >> >> cfg.clusteralpha = 0.05; >> >> cfg.alpha = 0.05; >> >> cfg.alpha = 0.05; >> >> cfg.clustertail = 0; >> >> cfg.feedback = 'gui'; >> >> cfg.parameter = 'powspctrm'; >> >> cfg.design = [ >> >> 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 >> 9 10 % subject number >> >> 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number >> >> cfg.uvar = 1; % "subject" is unit of observation >> >> cfg.ivar = 2; % "condition" is the independent variable >> >> stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); >> >> >> >> >> The function ft_freqstatistics runs but the stats results are strange. >> My stats.stat is always -inf >> and stats.prob always 0 >> >> What might be the problem? >> >> >> Thanks and all the best >> Caroline >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ulrich.Pomper at charite.de Mon Nov 12 20:01:07 2012 From: Ulrich.Pomper at charite.de (Pomper, Ulrich) Date: Mon, 12 Nov 2012 20:01:07 +0100 Subject: [FieldTrip] =?windows-1252?q?_PhD_position=2C_Department_of_Psych?= =?windows-1252?q?iatry_and_Psychotherapy=2C_Charit=E9_Berlin?= In-Reply-To: <4B78B221-796B-4B89-97B8-BA2A51C0F92D@charite.de> References: <4B78B221-796B-4B89-97B8-BA2A51C0F92D@charite.de> Message-ID: The Department of Psychiatry and Psychotherapy, Charité – Universitätsmedizin Berlin invites applications for a PhD position A Starting Grant of the European Research Council (ERC) will fund the currently open position (initially 24 months). The main objective of this ERC research program is to examine neural markers of multisensory integration and to test a new hypothesis that considers dynamic interplay of synchronized neural populations as a key to multisensory processes. The studies within this program include EEG and other neuroimaging methods. Studies will be conducted in healthy subjects and patients with schizophrenia. Multisensory processes will be examined in a series of experiments requiring both bottom-up and top-down processing. Applicants should have a background in psychology, medicine, biology, physics, engineering, or neuroscience. Basic experience in human EEG or MEG studies, Matlab programming skills, as well as some German language skills for interacting with patients are prerequisites for the position. An interest in neurophysiological studies including clinical populations is expected. Applicants are asked to submit their CV, a motivation letter including information about a possible starting date, 2 names of referees, and documentation of relevant qualifications (e.g., copies of diplomas and/or transcripts of grades) until November 25, 2012, electronically to: daniel.senkowski at charite.de Regards, Daniel Senkowski --------------------------------------------------------------- Daniel Senkowski, Ph.D. Professor of Clinical Neuropsychology Department of Psychiatry and Psychotherapy Charité, University Medicine Berlin St. Hedwig Hospital, Große Hamburger Str. 5-11 10115 Berlin, Germany www.danielsenkowski.com http://psy-ccm.charite.de/en/research/neuroimaging/multisensory_integration -------------- next part -------------- An HTML attachment was scrubbed... URL: From Caroline.Lustenberger at kispi.uzh.ch Tue Nov 13 09:02:22 2012 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Tue, 13 Nov 2012 08:02:22 +0000 Subject: [FieldTrip] Cluster statistics In-Reply-To: Message-ID: <7C66D90E0C18014E85B44B560D4D5BC81488F447@EXZH1VM.kispi.int> Dear Stephen Thank you, It now perfectly works, but I always get this warning I'm not sure how to handle that: Warning: doing a two-sided test without correcting p-values or alpha-level, p-values and alpha-level will reflect one-sided tests per tail cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.clustertail = 0; When I want to test whether my data is significant different (direction not known, therefore two sided) with an alpha level <0.05 do I have to adjust my level to 0.025? All the Best, Caroline ________________________________ Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Whitmarsh Gesendet: Montag, 12. November 2012 17:08 An: FieldTrip discussion list Betreff: Re: [FieldTrip] Cluster statistics Dear Caroline, Just to be sure - are you working on a recent version of FieldTrip (your pathname suggests otherwise)? The error seems to suggest you are just missing the mexfile which updating your version might solve. You can take a look at the specific statfun_* functions for details about their output. A very generic overview is giving in the Fieldtrup Walkthrough (see the left dropdown documentation menu on the website) in which the output input-output structure is explained. That might help as well. Cheers, Stephen On 12 November 2012 16:55, Lustenberger Caroline > wrote: Dear Steve It seems to work now. However, when I have NaN values in my powerspectrum array, I recieve the following error: ??? Invalid MEX-file 'C:\Users\Caroline\MATLAB_PhD\fieldtrip-20110927\fieldtrip-20110927\statfun\private\nanmean.mexw64': The specified module could not be found. Error in ==> statfun_depsamplesT at 98 avgdiff = nanmean(diffmat,2); Error in ==> statistics_montecarlo at 240 [statobs, cfg] = statfun(cfg, dat, design); Error in ==> ft_freqstatistics at 279 [stat, cfg] = statmethod(cfg, dat, cfg.design); What might be the problem? Is there a detailed documentation about the command ft_freqstatistics, especially about the meanings of the stats output and what kind of input is possible (e.g. t-test, ...) Thanks again for all your help and best wishes Caroline ________________________________ Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Politzer-Ahles Gesendet: Montag, 12. November 2012 14:30 An: fieldtrip at science.ru.nl Betreff: Re: [FieldTrip] Cluster statistics Hi Caroline, It looks to me like your grand averages don't have any EEG data in them; here is what mine look like: label: {60x1 cell} time: [1x601 double] individual: [19x60x601 double] dimord: 'subj_chan_time' cfg: [1x1 struct] elec: [1x1 struct] To run cluster statistics your structure has to have that "individual" field, which has the ERPs for each subject (for instance, from mine you can see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). I got mine by importing each subject's data into FieldTrip, and then using ft_timelockgrandaverage() with cfg.keepindividual='yes'. That is my guess about what your problem is, but I could be wrong. After you ran it, did you check stat.posclusters and stat.negclusters? I think those are more important than stat.stat and stat.prob; they tell you which clusters are actually significant (and stat.posclusterslabelmat and stat.negclusterslabelmat tell you where/when the clusters are). Best, Steve Message: 1 Date: Sun, 11 Nov 2012 13:25:31 +0000 From: Lustenberger Caroline > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Cluster statistics Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A at kispi.uzh.ch> Content-Type: text/plain; charset="utf-8" Dear fieldtrip users I tried to perform cluster analysis with fieldtrip. Since I've performed preprocessing/frequency analysis before using fieldtrip, I had to form the specific data structure to use for ft_freqstatistics by myself. I made a a structur as follows: Condition 1 'EEGa': --> 10 subjects: EEGa{1:10} label: {128x1 cell} %128 egi elec. dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Condition 2 'EEGm': EEGm{1:10} label: {128x1 cell} dimord: 'chan_freq' freq: 1 powspctrm: [128x1 double] cumtapcnt: 1 cfg: [1x1 struct] Then I performed the following steps: cfg = []; cfg.elec = elec; %was defined before EGI 128 electrodes cfg.neighbours = neighbours; %also successfully defined before cfg.latency = 'all'; %cfg.frequency = 'all'; cfg.channel = 'all';%eleselection % see CHANNELSELECTION cfg.avgovertime = 'no'; %cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'depsamplesT'; cfg.numrandomization = 2^10; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.alpha = 0.05; cfg.clustertail = 0; cfg.feedback = 'gui'; cfg.parameter = 'powspctrm'; cfg.design = [ 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 % subject number 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); The function ft_freqstatistics runs but the stats results are strange. My stats.stat is always -inf and stats.prob always 0 What might be the problem? Thanks and all the best Caroline _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Tue Nov 13 09:27:04 2012 From: julian.keil at gmail.com (Julian Keil) Date: Tue, 13 Nov 2012 09:27:04 +0100 Subject: [FieldTrip] Cluster statistics In-Reply-To: <7C66D90E0C18014E85B44B560D4D5BC81488F447@EXZH1VM.kispi.int> References: <7C66D90E0C18014E85B44B560D4D5BC81488F447@EXZH1VM.kispi.int> Message-ID: Dear Caroline, that's what the option cfg.correcttail = 'alpha'; is for. Good Luck Am 13.11.2012 um 09:02 schrieb Lustenberger Caroline: > Dear Stephen > > Thank you, It now perfectly works, but I always get this warning I'm not sure how to handle that: > > Warning: doing a two-sided test without correcting p-values or alpha-level, > p-values and alpha-level will reflect one-sided tests per tail > > cfg.clusteralpha = 0.05; > > cfg.alpha = 0.05; > > cfg.clustertail = 0; > > When I want to test whether my data is significant different (direction not known, therefore two sided) with an alpha level <0.05 do I have to adjust my level to 0.025? > > All the Best, Caroline > > Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Whitmarsh > Gesendet: Montag, 12. November 2012 17:08 > An: FieldTrip discussion list > Betreff: Re: [FieldTrip] Cluster statistics > > Dear Caroline, > > Just to be sure - are you working on a recent version of FieldTrip (your pathname suggests otherwise)? The error seems to suggest you are just missing the mexfile which updating your version might solve. > > You can take a look at the specific statfun_* functions for details about their output. A very generic overview is giving in the Fieldtrup Walkthrough (see the left dropdown documentation menu on the website) in which the output input-output structure is explained. That might help as well. > > Cheers, > Stephen > > > > On 12 November 2012 16:55, Lustenberger Caroline wrote: > Dear Steve > > It seems to work now. However, when I have NaN values in my powerspectrum array, I recieve the following error: > > ??? Invalid MEX-file > 'C:\Users\Caroline\MATLAB_PhD\fieldtrip-20110927\fieldtrip-20110927\statfun\private\nanmean.mexw64': > The specified module could not be found. > > Error in ==> statfun_depsamplesT at 98 > avgdiff = nanmean(diffmat,2); > > Error in ==> statistics_montecarlo at 240 > [statobs, cfg] = statfun(cfg, dat, design); > > Error in ==> ft_freqstatistics at 279 > [stat, cfg] = statmethod(cfg, dat, cfg.design); > > What might be the problem? > > Is there a detailed documentation about the command ft_freqstatistics, especially about the meanings of the stats output and what kind of input is possible (e.g. t-test, ...) > > Thanks again for all your help and best wishes > Caroline > > > Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Politzer-Ahles > Gesendet: Montag, 12. November 2012 14:30 > An: fieldtrip at science.ru.nl > Betreff: Re: [FieldTrip] Cluster statistics > > Hi Caroline, > > It looks to me like your grand averages don't have any EEG data in them; here is what mine look like: > > label: {60x1 cell} > time: [1x601 double] > individual: [19x60x601 double] > dimord: 'subj_chan_time' > cfg: [1x1 struct] > elec: [1x1 struct] > > To run cluster statistics your structure has to have that "individual" field, which has the ERPs for each subject (for instance, from mine you can see I had 19 subjects with a 60-channel cap, and 601 samples in the epoch). I got mine by importing each subject's data into FieldTrip, and then using ft_timelockgrandaverage() with cfg.keepindividual='yes'. > > That is my guess about what your problem is, but I could be wrong. After you ran it, did you check stat.posclusters and stat.negclusters? I think those are more important than stat.stat and stat.prob; they tell you which clusters are actually significant (and stat.posclusterslabelmat and stat.negclusterslabelmat tell you where/when the clusters are). > > Best, > Steve > > > Message: 1 > Date: Sun, 11 Nov 2012 13:25:31 +0000 > From: Lustenberger Caroline > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Cluster statistics > Message-ID: <2B94F80C-7331-45B9-86BF-2ED1123B680A at kispi.uzh.ch> > Content-Type: text/plain; charset="utf-8" > > Dear fieldtrip users > > I tried to perform cluster analysis with fieldtrip. Since I've performed preprocessing/frequency analysis before using fieldtrip, I had to form the specific > data structure to use for ft_freqstatistics by myself. > > I made a a structur as follows: > Condition 1 'EEGa': > --> 10 subjects: > EEGa{1:10} > label: {128x1 cell} %128 egi elec. > dimord: 'chan_freq' > freq: 1 > powspctrm: [128x1 double] > cumtapcnt: 1 > cfg: [1x1 struct] > > Condition 2 'EEGm': > EEGm{1:10} > label: {128x1 cell} > dimord: 'chan_freq' > freq: 1 > powspctrm: [128x1 double] > cumtapcnt: 1 > cfg: [1x1 struct] > > > Then I performed the following steps: > > cfg = []; > > cfg.elec = elec; %was defined before EGI 128 electrodes > > cfg.neighbours = neighbours; %also successfully defined before > > cfg.latency = 'all'; > > %cfg.frequency = 'all'; > > cfg.channel = 'all';%eleselection % see CHANNELSELECTION > > cfg.avgovertime = 'no'; > > %cfg.avgoverfreq = 'no'; > > cfg.avgoverchan = 'no'; > > cfg.statistic = 'depsamplesT'; > > cfg.numrandomization = 2^10; > > cfg.correctm = 'cluster'; > > cfg.method = 'montecarlo'; > > cfg.clusteralpha = 0.05; > > cfg.alpha = 0.05; > > cfg.alpha = 0.05; > > cfg.clustertail = 0; > > cfg.feedback = 'gui'; > > cfg.parameter = 'powspctrm'; > > cfg.design = [ > > 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 % subject number > > 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 ]; % condition number > > cfg.uvar = 1; % "subject" is unit of observation > > cfg.ivar = 2; % "condition" is the independent variable > > stat = ft_freqstatistics(cfg, EEGa{:}, EEGm{:}); > > > > > The function ft_freqstatistics runs but the stats results are strange. > My stats.stat is always -inf > and stats.prob always 0 > > What might be the problem? > > > Thanks and all the best > Caroline > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Tue Nov 13 13:58:50 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 13 Nov 2012 06:58:50 -0600 Subject: [FieldTrip] fieldtrip Digest, Vol 24, Issue 16 In-Reply-To: References: Message-ID: Hi Caroline, It looks like your call is missing cfg.correctm = 'cluster'; cfg.tail = 0; Those are both options that I include when I do it; I'm not sure if not having those might be what's giving you the error message. Best, Steve Message: 2 > Date: Tue, 13 Nov 2012 08:02:22 +0000 > From: Lustenberger Caroline > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Cluster statistics > Message-ID: > <7C66D90E0C18014E85B44B560D4D5BC81488F447 at EXZH1VM.kispi.int> > Content-Type: text/plain; charset="us-ascii" > > Dear Stephen > > Thank you, It now perfectly works, but I always get this warning I'm not > sure how to handle that: > > Warning: doing a two-sided test without correcting p-values or alpha-level, > p-values and alpha-level will reflect one-sided tests per tail > > > cfg.clusteralpha = 0.05; > > cfg.alpha = 0.05; > > cfg.clustertail = 0; > > When I want to test whether my data is significant different (direction > not known, therefore two sided) with an alpha level <0.05 do I have to > adjust my level to 0.025? > > All the Best, Caroline > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Caroline.Lustenberger at kispi.uzh.ch Tue Nov 13 14:40:51 2012 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Tue, 13 Nov 2012 13:40:51 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 24, Issue 16 In-Reply-To: Message-ID: <7C66D90E0C18014E85B44B560D4D5BC81488F538@EXZH1VM.kispi.int> Dear Steve Thank you so much for your advice. My script looks now as follows: cfg = []; cfg.elec = elec; cfg.computeprob = 'yes' cfg.neighbours = neighbours; %cfg.latency = 'all'; cfg.frequency = 'all'; cfg.channel = 'all'%'all';%eleselection % see CHANNELSELECTION %cfg.avgovertime = 'no'; %cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.statistic = 'depsamplesT'; cfg.numrandomization = 2^6;% 2^number subjects cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.tail = 0; cfg.clustertail = 0; cfg.correcttail = 'alpha' cfg.feedback = 'gui'; cfg.parameter = 'powspctrm'; % cfg.design = [ % 1 2 3 4 1 2 3 4 % subject number % 1 1 1 1 2 2 2 2 ]; % condition number cfg.design(1,:)=[1:6,1:6] cfg.design(2,:)=[ones(1,6),ones(1,6)+1] cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % "condition" is the independent variable stat = ft_freqstatistics(cfg,sd, ld); Do you think this is now correct? We perform statistics on high-density EEG Power values and want to see whether differences that we see doing simple t-test also remain when we correct for multiple comparison. Again many thanks and all the best Caroline ________________________________ Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Stephen Politzer-Ahles Gesendet: Dienstag, 13. November 2012 13:59 An: fieldtrip at science.ru.nl Betreff: Re: [FieldTrip] fieldtrip Digest, Vol 24, Issue 16 Hi Caroline, It looks like your call is missing cfg.correctm = 'cluster'; cfg.tail = 0; Those are both options that I include when I do it; I'm not sure if not having those might be what's giving you the error message. Best, Steve Message: 2 Date: Tue, 13 Nov 2012 08:02:22 +0000 From: Lustenberger Caroline > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Cluster statistics Message-ID: <7C66D90E0C18014E85B44B560D4D5BC81488F447 at EXZH1VM.kispi.int> Content-Type: text/plain; charset="us-ascii" Dear Stephen Thank you, It now perfectly works, but I always get this warning I'm not sure how to handle that: Warning: doing a two-sided test without correcting p-values or alpha-level, p-values and alpha-level will reflect one-sided tests per tail cfg.clusteralpha = 0.05; cfg.alpha = 0.05; cfg.clustertail = 0; When I want to test whether my data is significant different (direction not known, therefore two sided) with an alpha level <0.05 do I have to adjust my level to 0.025? All the Best, Caroline -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Tue Nov 13 15:14:08 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 13 Nov 2012 08:14:08 -0600 Subject: [FieldTrip] Cluster statistics Message-ID: Hi Caroline, It looks like your call is missing cfg.correctm = 'cluster'; cfg.tail = 0; Those are both options that I include when I do it; I'm not sure if not having those might be what's giving you the error message. Best, Steve Message: 2 > Date: Tue, 13 Nov 2012 08:02:22 +0000 > From: Lustenberger Caroline > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Cluster statistics > Message-ID: > <7C66D90E0C18014E85B44B560D4D5BC81488F447 at EXZH1VM.kispi.int> > Content-Type: text/plain; charset="us-ascii" > > Dear Stephen > > Thank you, It now perfectly works, but I always get this warning I'm not > sure how to handle that: > > Warning: doing a two-sided test without correcting p-values or alpha-level, > p-values and alpha-level will reflect one-sided tests per tail > > > cfg.clusteralpha = 0.05; > > cfg.alpha = 0.05; > > cfg.clustertail = 0; > > When I want to test whether my data is significant different (direction > not known, therefore two sided) with an alpha level <0.05 do I have to > adjust my level to 0.025? > > All the Best, Caroline > > ________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at mac.com Tue Nov 13 15:49:47 2012 From: nathanweisz at mac.com (Nathan Weisz) Date: Tue, 13 Nov 2012 15:49:47 +0100 Subject: [FieldTrip] postdoc position at CIMeC MEG lab Message-ID: ERC-funded post-doc in conscious perception research Research in the Ongoing Brain Oscillations and Behaviour Lab at the Center for Mind/Brain Sciences focuses on brain activity / connectivity patterns predisposing conscious perception. Our works mostly involves MEG, intracranial EEG and combined TMS/EEG studies. https://sites.google.com/site/obobcimec/ We are currently looking for a candidate at a Postdoc level to strengthen our team. This postdoc is expected to have solid experience with at least one of the aforementioned methods and proficiency in Matlab applied to the analysis of MEG / EEG data. The Center for Mind/Brain Sciences at the University of Trento is an oustanding work-place situated in a beautiful surrounding (e.g. Dolomites, diverse lakes; see http://www.visittrentino.it/en). It offers an international and vibrant research setting with state-of-the-art neuroimaging methodologies, including a research-only MRI scanner, MEG, EEG and TMS, as well as behavioral, eye tracking and motion tracking laboratories. The University of Trento is ranked first among research universities in Italy, and the Trentino region is consistently at the top for quality of life and for the most efficient services in Italy. English is the official language of the CIMeC, where a large proportion of the faculty, post-docs and students come from a wide range of countries outside of Italy. Interested candidates are encouraged to contact me by email at nathan.weisz at unitn.it -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Tue Nov 13 16:25:19 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 13 Nov 2012 09:25:19 -0600 Subject: [FieldTrip] Cluster statistics Message-ID: Hi Caroline, That all looks good to me, as far as I can tell from a quick glance (but I've only ever tried cluster statistics on ERPs, not on time-frequency data, so there might be differences I don't know about). But 2^6 (64) seems like a very small number of randomizations. The rule of thumb I follow (based on the recommendation in the tutorial) is to use 500 the first time, and if I get some marginal or borderline results then re-do it with something like 1000 or even 5000 randomizations just to be sure. 64 randomizations might not be enough to converge on a reliable result (i.e., if you run the same test several times with only 64 randomizations, you might get different results each time, whereas if you run it several times with 1000 or more randomizations your results probably will be stable) Best, Steve > Message: 2 > Date: Tue, 13 Nov 2012 13:40:51 +0000 > From: Lustenberger Caroline > To: FieldTrip discussion list > Subject: Re: [FieldTrip] fieldtrip Digest, Vol 24, Issue 16 > Message-ID: > <7C66D90E0C18014E85B44B560D4D5BC81488F538 at EXZH1VM.kispi.int> > Content-Type: text/plain; charset="us-ascii" > > Dear Steve > > Thank you so much for your advice. My script looks now as follows: > > > cfg = []; > > cfg.elec = elec; > > cfg.computeprob = 'yes' > > cfg.neighbours = neighbours; > > %cfg.latency = 'all'; > > cfg.frequency = 'all'; > > cfg.channel = 'all'%'all';%eleselection % see CHANNELSELECTION > > %cfg.avgovertime = 'no'; > > %cfg.avgoverfreq = 'no'; > > cfg.avgoverchan = 'no'; > > cfg.statistic = 'depsamplesT'; > > cfg.numrandomization = 2^6;% 2^number subjects > > cfg.correctm = 'cluster'; > > cfg.method = 'montecarlo'; > > cfg.clusteralpha = 0.05; > > cfg.alpha = 0.05; > > cfg.tail = 0; > > cfg.clustertail = 0; > > cfg.correcttail = 'alpha' > > cfg.feedback = 'gui'; > > cfg.parameter = 'powspctrm'; > > % cfg.design = [ > > % 1 2 3 4 1 2 3 4 % subject number > > % 1 1 1 1 2 2 2 2 ]; % condition number > > cfg.design(1,:)=[1:6,1:6] > > cfg.design(2,:)=[ones(1,6),ones(1,6)+1] > > cfg.uvar = 1; % "subject" is unit of observation > > cfg.ivar = 2; > > % "condition" is the independent variable > > stat = ft_freqstatistics(cfg,sd, ld); > > > Do you think this is now correct? We perform statistics on high-density > EEG Power values and want to see whether differences that we see doing > simple t-test also remain when we correct for multiple comparison. > > Again many thanks and all the best > Caroline > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Wed Nov 14 10:35:10 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Wed, 14 Nov 2012 10:35:10 +0100 Subject: [FieldTrip] correction for movement tool Message-ID: Dear all, Do you have some tool which can correct data for the movements during MEG measurement? Our data were obtained on the CTF MEG 275 system. All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Wed Nov 14 11:07:50 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Wed, 14 Nov 2012 11:07:50 +0100 (CET) Subject: [FieldTrip] correction for movement tool In-Reply-To: Message-ID: <1692488181.1258768.1352887670587.JavaMail.root@sculptor.zimbra.ru.nl> Hi Nenad, There are a few (online and offline) tools implemented in FieldTrip to deal with head movements in MEG. For instance, have a look here: http://fieldtrip.fcdonders.nl/example/how_to_incorporate_head_movements_in_meg_analysis ft_regressconfound is particularly useful for removing trial-by-trial variance from the data that can be explained by head movements. We found it to have a significant impact on statistical sensitivity. At our institute, we use a real-time head localizer to reposition the subject between and within sessions (prevent/minimalize different head positions ) . http://fieldtrip.fcdonders.nl/faq/how_can_i_monitor_a_subject_s_head_position_during_a_meg_session Currently, it is implemented only  for CTF systems (with the continous head localization upgrade) but we are working on extending its implementation to other systems.    Yours, Arjen ----- Oorspronkelijk bericht ----- > Van: "Nenad Polomac" > Aan: fieldtrip at science.ru.nl > Verzonden: Woensdag 14 november 2012 10:35:10 > Onderwerp: [FieldTrip] correction for movement tool > Dear all, > Do you have some tool which can correct data for the movements during > MEG measurement? Our data were obtained on the CTF MEG 275 system. > All the best! > Nenad > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcgoiv0 at wfu.edu Wed Nov 14 14:31:15 2012 From: mcgoiv0 at wfu.edu (McGowin, Inna) Date: Wed, 14 Nov 2012 08:31:15 -0500 Subject: [FieldTrip] correction for movement tool In-Reply-To: <1692488181.1258768.1352887670587.JavaMail.root@sculptor.zimbra.ru.nl> References: <1692488181.1258768.1352887670587.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Hello Arjen, Thanks for the links on the head motion correction. Could you please point a source or a reference on which the FieldTrip head motion correction method is based? Is it expansion of magnetic scalar potential in spherical harmonics or some other method? How accurate is the correction and what are the limitations for its application; in other words does it correct for motion up to 3 cm or beyond? What is the minimum motion that does not need to be corrected, for example we allow 5 mm? Thanks, Inna On Wed, Nov 14, 2012 at 5:07 AM, Stolk, A. wrote: > Hi Nenad, > > > > There are a few (online and offline) tools implemented in FieldTrip to > deal with head movements in MEG. > > > > For instance, have a look here: > > > http://fieldtrip.fcdonders.nl/example/how_to_incorporate_head_movements_in_meg_analysis > > > > ft_regressconfound is particularly useful for removing trial-by-trial > variance from the data that can be explained by head movements. We found it > to have a significant impact on statistical sensitivity. > > > > At our institute, we use a real-time head localizer to reposition the > subject between and within sessions (prevent/minimalize different head > positions). > > > > > http://fieldtrip.fcdonders.nl/faq/how_can_i_monitor_a_subject_s_head_position_during_a_meg_session > > > Currently, it is implemented only for CTF systems (with the continous head > localization upgrade) but we are working on extending its implementation to > other systems. > > > > Yours, > > Arjen > > ------------------------------ > > *Van: *"Nenad Polomac" > *Aan: *fieldtrip at science.ru.nl > *Verzonden: *Woensdag 14 november 2012 10:35:10 > *Onderwerp: *[FieldTrip] correction for movement tool > > > Dear all, > > Do you have some tool which can correct data for the movements during MEG > measurement? Our data were obtained on the CTF MEG 275 system. > > All the best! > > Nenad > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Inna McGowin -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Wed Nov 14 15:57:26 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Wed, 14 Nov 2012 15:57:26 +0100 (CET) Subject: [FieldTrip] correction for movement tool In-Reply-To: Message-ID: <227289624.1267900.1352905046647.JavaMail.root@sculptor.zimbra.ru.nl> Hi Inna, You're welcome. The offline compensation method suggested (ft_regressconfound) is based on general linear modeling, and not on the  signal space separation method (Taulu et al., 2005, MaxFilter, Neuromag - not implemented in FieldTrip) you are referring to. Head movements blur the topography of the neuronal sources of the MEG signal, increase localization errors, and reduce statistical sensitivity. This GLM-based method is geared to improve statistical sensitivity rather than t opographical blurring and localization bias.  More specifically, it does not interpolate/extrapolate the magnetic field distribution measured by the sensor array to a magnetic field distribution that would have been measured had the sensors been at a desired location. Instead, it removes head movement related trial-by-trial variance from the data, by incorporating head position time-series into a general linear model.   A recently performed study (*) showed that this method improves statictical sensitivity without changing the pattern of activity. This is useful when you're testing an hypothesis, derived from a cognitive research question, because it reduces the risk of false negatives. With respect to your question; in case you are particularly interested in reducing  localization bias, I could recommend you to have a look at Uutela et al., NeuroImage, 2001. The forward calculation correction method suggested there incorporates head position information into the source reconstruction procedure. This method is implemented as ft_headmovement in FieldTrip. I cannot give you any numbers except from the ones reported there, but for all offline methods it holds that you need to be able to  measure the magnetic field distribution in order to know (and interpolate)   it. Hope this answered your question a bit. Feel free to ask more details. Yours, arjen (*) Stolk, Todorovic, Schoffelen & Oostenveld. Online and offline tools for head movement compensation in MEG. NeuroImage, accepted pending revisions. ----- Oorspronkelijk bericht ----- > Van: "Inna McGowin" > Aan: "FieldTrip discussion list" > Verzonden: Woensdag 14 november 2012 14:31:15 > Onderwerp: Re: [FieldTrip] correction for movement tool > Hello Arjen, > Thanks for the links on the head motion correction. > Could you please point a source or a reference on which the FieldTrip > head motion correction method is based? Is it expansion of magnetic > scalar potential in spherical harmonics or some other method? How > accurate is the correction and what are the limitations for its > application; in other words does it correct for motion up to 3 cm or > beyond? > What is the minimum motion that does not need to be corrected, for > example we allow 5 mm? > Thanks, > Inna > On Wed, Nov 14, 2012 at 5:07 AM, Stolk, A. < a.stolk at fcdonders.ru.nl > > wrote: > > Hi Nenad, > >   > > There are a few (online and offline) tools implemented in FieldTrip > > to > > deal with head movements in MEG. > >   > > For instance, have a look here: > > http://fieldtrip.fcdonders.nl/example/how_to_incorporate_head_movements_in_meg_analysis > >   > > ft_regressconfound is particularly useful for removing > > trial-by-trial > > variance from the data that can be explained by head movements. We > > found it to have a significant impact on statistical sensitivity. > >   > > At our institute, we use a real-time head localizer to reposition > > the > > subject between and within sessions (prevent/minimalize different > > head > > positions). > >   > > http://fieldtrip.fcdonders.nl/faq/how_can_i_monitor_a_subject_s_head_position_during_a_meg_session > > Currently, it is implemented only for CTF systems (with the > > continous > > head localization upgrade) but we are working on extending > > its implementation to other systems.   > >   > > Yours, > > Arjen > > > Van: "Nenad Polomac" < polomacnenad at gmail.com > > > > Aan: fieldtrip at science.ru.nl > > > Verzonden: Woensdag 14 november 2012 10:35:10 > > > Onderwerp: [FieldTrip] correction for movement tool > > > Dear all, > > > Do you have some tool which can correct data for the movements > > > during > > > MEG measurement? Our data were obtained on the CTF MEG 275 system. > > > All the best! > > > Nenad > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- > Inna McGowin > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrick.jung at esi-frankfurt.de Wed Nov 14 18:24:32 2012 From: patrick.jung at esi-frankfurt.de (Jung, Patrick) Date: Wed, 14 Nov 2012 17:24:32 +0000 Subject: [FieldTrip] ICA decomposition & backprojection Message-ID: <36E953F5321EB743AC6B338995A56D63250662@UM-EXCDAG-A01.um.gwdg.de> Dear Fieldtrippers, if I do ICA in my preprocessing to reject EOG and ECG signals, the new MEG guidelines say that this might alter later source reconstruction and connectivity analyses (which I aim to do). So, worried about this, I wonder if applying ft_rejectcomponent on my raw dataset 1.) automatically modifies the leadfield matrix? 2.) the unmixing (and mixing?) matrix is saved in the new data structure somewhere (to evtl make use of it at later analysis steps)? 3.) automatically stores the information how many and what ICA components were subtracted from the data in my new data structure. Would you generally discourage to apply ICA in the preprocessing when planning source reconstruction and connectivity analysis? It's a complicated topic for me as a clinician so I hope there is no mixing in my questions ;-) Many thanks for your answers, Patrick -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Wed Nov 14 18:32:19 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Wed, 14 Nov 2012 17:32:19 +0000 Subject: [FieldTrip] error when converting from spm to ft Message-ID: Hello FT-ers In the past i had no problem when converting my data from SPM (where i do preprocessing and averaging) to FT (where I do my cluster-stats and plotting) Currently, I am using the new way to convert (previous version seems outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in the right format, ie: not freq data. But i know that it is...any advice would be much appreciated! Not to mention is warns me my data is not epoched when it is indeed so... Thank you! zita ********************* *>> D = spm_eeg_load* SPM M/EEG data object Type: evoked Transform: TF 8 conditions 326 channels 20 frequencies 501 samples/trial 8 trials Sampling frequency: 250 Hz Loaded from file C:\Users\Eva Z Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat Use the syntax D(channels, frequencies, samples, trials) to access the data Type "methods('meeg')" for the list of methods performing other operations with the object Type "help meeg/method_name" to get help about methods *>> data = spm2ft(D)* mapping condition label "11" to condition code 1 mapping condition label "12" to condition code 2 mapping condition label "21" to condition code 3 mapping condition label "22" to condition code 4 mapping condition label "31" to condition code 5 mapping condition label "32" to condition code 6 mapping condition label "41" to condition code 7 mapping condition label "42" to condition code 8 data = fsample: 250.0000 label: {326x1 cell} time: {1x8 cell} trial: {1x8 cell} trialinfo: [8x1 double] cfg: [1x1 struct] *>> data2 = ft_checkdata(data, 'datatype', 'freq')* Warning: the data does not contain a trial definition, assuming that the trials are consecutive segments of a continuous recording > In utilities\private\warning_once at 81 In utilities\private\fixsampleinfo at 54 In ft_datatype_raw at 91 In ft_checkdata at 170 Error using ft_checkdata (line 288) This function requires freq data as input. -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Wed Nov 14 19:33:51 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Wed, 14 Nov 2012 19:33:51 +0100 Subject: [FieldTrip] correction for movement tool Message-ID: Hello Arjen, Thank you very much for your suggestion. I think it will work in my data. Only thing that concerns me in this tutorial is when in the analysis pipeline I should perform this circumcenter calculation? Because if I do that e.g. before artifact rejection, I will have different numbers of trials in timelock and confound structures. Since in timelock I already removed some trials due to jumps or muscle artifacts. So what is your suggestion for this? Thank you in advance! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk at fcdonders.ru.nl Thu Nov 15 08:59:24 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Thu, 15 Nov 2012 08:59:24 +0100 (CET) Subject: [FieldTrip] correction for movement tool In-Reply-To: Message-ID: <1672820011.1274993.1352966364516.JavaMail.root@sculptor.zimbra.ru.nl> Hi Nenad, Thanks for your question . These details need to be added to the wiki.  First; ft_regressconfound can be applied to timelock, freq, and source data. The estimation of  regression coefficients (beta weights of the head position data)  is performed separately for each channel and each latency, in the case of timelock data. Consequently, after compensation, the sensor level data cannot be used anymore for source modeling. To employ the GLM based compensation on the source level, single trial estimates for the cortical locations of interest have to be made from the original sensor level data, preferably using a common spatial filter based on all trials. The beta weights are subsequently estimated for each cortical location and the variance in source amplitude over trials that is explained by the head movement is removed. We therefore recommend to use ft_regressconfound as a final step prior to ft_XXXstatistics . This is indeed in contrast to the ft_rejectXXX functions. Furthermore, make sure you select the same trials in the headposition data as you have selected in your MEG data since you are going to fit the two of them . Second, circumcenter.m (on the wiki) is a helper function that calculates one position and orientation of the head. This saves some degrees of freedom (df=6) as compared to taking into account the x,y,z-coordinates of each coil separately (n=3) as regressors (df=9). When you want to also use the squares, cubes, and derivatives as regressors, this can save quite a bit of degrees. The 'circumcenter' is the geometrical center of the three coils. Hope this answered your questions. Best regards, Arjen ----- Oorspronkelijk bericht ----- > Van: "Nenad Polomac" > Aan: fieldtrip at science.ru.nl > Verzonden: Woensdag 14 november 2012 19:33:51 > Onderwerp: Re: [FieldTrip] correction for movement tool > Hello Arjen, > Thank you very much for your suggestion. I think it will work in my > data. Only thing that concerns me in this tutorial  is when in the > analysis pipeline I should perform this circumcenter calculation? > Because if I do that e.g. before artifact rejection, I will have > different numbers of trials in timelock and confound structures. Since > in timelock I already removed some trials due to jumps or muscle > artifacts. > So what is your suggestion for this? > Thank you in advance! > Nenad > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Thu Nov 15 09:58:35 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Thu, 15 Nov 2012 09:58:35 +0100 Subject: [FieldTrip] correction for movement tool Message-ID: Dear Arjen, Thank you very much for the detailed clarification! This helped a lot! :) All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Nov 15 15:55:05 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 15 Nov 2012 15:55:05 +0100 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: References: Message-ID: <50A50249.3010303@donders.ru.nl> Dear Zita, The function seems to convert the function not correctly to a freq datastructure - it seems more like raw data to me. freq data requires a .powspctrm field, which should be a matrix of observations x channels x freq x time. So you would need to use cell2mat on your .trial field. Probably you need to permute the dimensions to match this order. Additionally, you will need a .dimord field which which should be 'rpt_chan_freq_time' and you need a .freq field that contains the frequencies in that matrix. Please first make sure that your trials actually have 3 dimensions, else something else in the conversion went wrong. I don't use SPM so no clue if there is a better way than doing it manually. Best, Jörn On 11/14/2012 6:32 PM, Zita Eva Patai wrote: > Hello FT-ers > > In the past i had no problem when converting my data from SPM (where i > do preprocessing and averaging) to FT (where I do my cluster-stats and > plotting) > > Currently, I am using the new way to convert (previous version seems > outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not > in the right format, ie: not freq data. But i know that it is...any > advice would be much appreciated! Not to mention is warns me my data > is not epoched when it is indeed so... > > Thank you! > zita > > ********************* > *>> D = spm_eeg_load* > SPM M/EEG data object > Type: evoked > Transform: TF > 8 conditions > 326 channels > 20 frequencies > 501 samples/trial > 8 trials > Sampling frequency: 250 Hz > Loaded from file C:\Users\Eva Z > Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat > > Use the syntax D(channels, frequencies, samples, trials) to access the > data > Type "methods('meeg')" for the list of methods performing other > operations with the object > Type "help meeg/method_name" to get help about methods > > *>> data = spm2ft(D)* > > mapping condition label "11" to condition code 1 > mapping condition label "12" to condition code 2 > mapping condition label "21" to condition code 3 > mapping condition label "22" to condition code 4 > mapping condition label "31" to condition code 5 > mapping condition label "32" to condition code 6 > mapping condition label "41" to condition code 7 > mapping condition label "42" to condition code 8 > > data = > > fsample: 250.0000 > label: {326x1 cell} > time: {1x8 cell} > trial: {1x8 cell} > trialinfo: [8x1 double] > cfg: [1x1 struct] > > > *>> data2 = ft_checkdata(data, 'datatype', 'freq')* > Warning: the data does not contain a trial definition, assuming that > the trials are consecutive segments of a continuous recording > > In utilities\private\warning_once at 81 > In utilities\private\fixsampleinfo at 54 > In ft_datatype_raw at 91 > In ft_checkdata at 170 > Error using ft_checkdata (line 288) > This function requires freq data as input. > > > -- > > Zita Patai > DPhil, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.brovelli at univ-amu.fr Thu Nov 15 17:28:46 2012 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Thu, 15 Nov 2012 17:28:46 +0100 Subject: [FieldTrip] DICS: fixed orientation of sources option Message-ID: <20121115172846.14247fxr0mnn198g@wmelperso1.univmed.fr> Dear all, I have a question regarding the option "fixedori" of DICS (the code from lines 292 to 306 in beamformer_dics.m). If I get it right, you implemented the situation when the first singular value lambda1 is much greater that the second singular value lambda2 of Cs (Cs is given by eq. 4 of Gross et al., 2001, PNAS). I checked in my data and this is not the case. Maybe my data is just a very special case, but I find that the first is a little larger that the second. Here they are: lambda1 = 0.5380; lambda2 = 0.2921; lambda3 = 0.0000; After eq. 9 in Gross (2001), it says that if lambda1 >> lambda2 does not hold, the trace of Cs should be used instead. So, has it been implemented in Fieldtrip somewhere ? And, if not, would you know how to do it ? Thanks a lot bye Andrea From eva.patai at psy.ox.ac.uk Thu Nov 15 17:29:34 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Thu, 15 Nov 2012 16:29:34 +0000 Subject: [FieldTrip] converting from som to ft Message-ID: Hello FT-ers In the past i had no problem when converting my data from SPM (where i do preprocessing and averaging) to FT (where I do my cluster-stats and plotting) Currently, I am using the new way to convert (previous version seems outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in the right format, ie: not freq data. But i know that it is...any advice would be much appreciated! Not to mention is warns me my data is not epoched when it is indeed so... Thank you! zita ********************* *>> D = spm_eeg_load* SPM M/EEG data object Type: evoked Transform: TF 8 conditions 326 channels 20 frequencies 501 samples/trial 8 trials Sampling frequency: 250 Hz Loaded from file C:\Users\Eva Z Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat Use the syntax D(channels, frequencies, samples, trials) to access the data Type "methods('meeg')" for the list of methods performing other operations with the object Type "help meeg/method_name" to get help about methods *>> data = spm2ft(D)* mapping condition label "11" to condition code 1 mapping condition label "12" to condition code 2 mapping condition label "21" to condition code 3 mapping condition label "22" to condition code 4 mapping condition label "31" to condition code 5 mapping condition label "32" to condition code 6 mapping condition label "41" to condition code 7 mapping condition label "42" to condition code 8 data = fsample: 250.0000 label: {326x1 cell} time: {1x8 cell} trial: {1x8 cell} trialinfo: [8x1 double] cfg: [1x1 struct] *>> data2 = ft_checkdata(data, 'datatype', 'freq')* Warning: the data does not contain a trial definition, assuming that the trials are consecutive segments of a continuous recording > In utilities\private\warning_once at 81 In utilities\private\fixsampleinfo at 54 In ft_datatype_raw at 91 In ft_checkdata at 170 Error using ft_checkdata (line 288) This function requires freq data as input. -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Thu Nov 15 17:37:54 2012 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 15 Nov 2012 16:37:54 +0000 Subject: [FieldTrip] converting from som to ft In-Reply-To: References: Message-ID: Dear Zita, You do: freq = D.fttimelock in SPM. The fieldtrip function does not support TF data. Best, Vladimir On Thu, Nov 15, 2012 at 4:29 PM, Zita Eva Patai wrote: > Hello FT-ers > > In the past i had no problem when converting my data from SPM (where i do > preprocessing and averaging) to FT (where I do my cluster-stats and > plotting) > > Currently, I am using the new way to convert (previous version seems > outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in > the right format, ie: not freq data. But i know that it is...any advice > would be much appreciated! Not to mention is warns me my data is not > epoched when it is indeed so... > > Thank you! > zita > > ********************* > *>> D = spm_eeg_load* > SPM M/EEG data object > Type: evoked > Transform: TF > 8 conditions > 326 channels > 20 frequencies > 501 samples/trial > 8 trials > Sampling frequency: 250 Hz > Loaded from file C:\Users\Eva Z > Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat > > Use the syntax D(channels, frequencies, samples, trials) to access the data > Type "methods('meeg')" for the list of methods performing other operations > with the object > Type "help meeg/method_name" to get help about methods > > *>> data = spm2ft(D)* > > mapping condition label "11" to condition code 1 > mapping condition label "12" to condition code 2 > mapping condition label "21" to condition code 3 > mapping condition label "22" to condition code 4 > mapping condition label "31" to condition code 5 > mapping condition label "32" to condition code 6 > mapping condition label "41" to condition code 7 > mapping condition label "42" to condition code 8 > > data = > > fsample: 250.0000 > label: {326x1 cell} > time: {1x8 cell} > trial: {1x8 cell} > trialinfo: [8x1 double] > cfg: [1x1 struct] > > > *>> data2 = ft_checkdata(data, 'datatype', 'freq')* > > Warning: the data does not contain a trial definition, assuming that the > trials are consecutive segments of a continuous recording > > In utilities\private\warning_once at 81 > In utilities\private\fixsampleinfo at 54 > In ft_datatype_raw at 91 > In ft_checkdata at 170 > Error using ft_checkdata (line 288) > This function requires freq data as input. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Thu Nov 15 18:03:58 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Thu, 15 Nov 2012 17:03:58 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: <50A50249.3010303@donders.ru.nl> References: <50A50249.3010303@donders.ru.nl> Message-ID: Dear Jörn, Thank you for the quick reply. I will try your suggestion! Many thanks, z On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Zita, > > The function seems to convert the function not correctly to a freq > datastructure - it seems more like raw data to me. > > freq data requires a .powspctrm field, which should be a matrix of > observations x channels x freq x time. So you would need to use cell2mat on > your .trial field. Probably you need to permute the dimensions to match > this order. Additionally, you will need a .dimord field which which should > be 'rpt_chan_freq_time' and you need a .freq field that contains the > frequencies in that matrix. Please first make sure that your trials > actually have 3 dimensions, else something else in the conversion went > wrong. > > I don't use SPM so no clue if there is a better way than doing it manually. > > Best, > Jörn > > > On 11/14/2012 6:32 PM, Zita Eva Patai wrote: > > Hello FT-ers > > In the past i had no problem when converting my data from SPM (where i > do preprocessing and averaging) to FT (where I do my cluster-stats and > plotting) > > Currently, I am using the new way to convert (previous version seems > outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in > the right format, ie: not freq data. But i know that it is...any advice > would be much appreciated! Not to mention is warns me my data is not > epoched when it is indeed so... > > Thank you! > zita > > ********************* > *>> D = spm_eeg_load* > SPM M/EEG data object > Type: evoked > Transform: TF > 8 conditions > 326 channels > 20 frequencies > 501 samples/trial > 8 trials > Sampling frequency: 250 Hz > Loaded from file C:\Users\Eva Z > Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat > > Use the syntax D(channels, frequencies, samples, trials) to access the > data > Type "methods('meeg')" for the list of methods performing other operations > with the object > Type "help meeg/method_name" to get help about methods > > *>> data = spm2ft(D)* > > mapping condition label "11" to condition code 1 > mapping condition label "12" to condition code 2 > mapping condition label "21" to condition code 3 > mapping condition label "22" to condition code 4 > mapping condition label "31" to condition code 5 > mapping condition label "32" to condition code 6 > mapping condition label "41" to condition code 7 > mapping condition label "42" to condition code 8 > > data = > > fsample: 250.0000 > label: {326x1 cell} > time: {1x8 cell} > trial: {1x8 cell} > trialinfo: [8x1 double] > cfg: [1x1 struct] > > > *>> data2 = ft_checkdata(data, 'datatype', 'freq')* > > Warning: the data does not contain a trial definition, assuming that the > trials are consecutive segments of a continuous recording > > In utilities\private\warning_once at 81 > In utilities\private\fixsampleinfo at 54 > In ft_datatype_raw at 91 > In ft_checkdata at 170 > Error using ft_checkdata (line 288) > This function requires freq data as input. > > > -- > > Zita Patai > DPhil, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Thu Nov 15 18:19:32 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Thu, 15 Nov 2012 17:19:32 +0000 Subject: [FieldTrip] converting from som to ft In-Reply-To: References: Message-ID: Thanks Vladimir! (but does this mean I cannot convert my TF data at all, or i have to do this as a 'loophole' alternative...and then i get my TF data into the right format?) On Thu, Nov 15, 2012 at 4:37 PM, Vladimir Litvak wrote: > Dear Zita, > > You do: > > freq = D.fttimelock > > in SPM. The fieldtrip function does not support TF data. > > Best, > > Vladimir > > > On Thu, Nov 15, 2012 at 4:29 PM, Zita Eva Patai wrote: > >> Hello FT-ers >> >> In the past i had no problem when converting my data from SPM (where i do >> preprocessing and averaging) to FT (where I do my cluster-stats and >> plotting) >> >> Currently, I am using the new way to convert (previous version seems >> outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in >> the right format, ie: not freq data. But i know that it is...any advice >> would be much appreciated! Not to mention is warns me my data is not >> epoched when it is indeed so... >> >> Thank you! >> zita >> >> ********************* >> *>> D = spm_eeg_load* >> SPM M/EEG data object >> Type: evoked >> Transform: TF >> 8 conditions >> 326 channels >> 20 frequencies >> 501 samples/trial >> 8 trials >> Sampling frequency: 250 Hz >> Loaded from file C:\Users\Eva Z >> Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat >> >> Use the syntax D(channels, frequencies, samples, trials) to access the >> data >> Type "methods('meeg')" for the list of methods performing other >> operations with the object >> Type "help meeg/method_name" to get help about methods >> >> *>> data = spm2ft(D)* >> >> mapping condition label "11" to condition code 1 >> mapping condition label "12" to condition code 2 >> mapping condition label "21" to condition code 3 >> mapping condition label "22" to condition code 4 >> mapping condition label "31" to condition code 5 >> mapping condition label "32" to condition code 6 >> mapping condition label "41" to condition code 7 >> mapping condition label "42" to condition code 8 >> >> data = >> >> fsample: 250.0000 >> label: {326x1 cell} >> time: {1x8 cell} >> trial: {1x8 cell} >> trialinfo: [8x1 double] >> cfg: [1x1 struct] >> >> >> *>> data2 = ft_checkdata(data, 'datatype', 'freq')* >> >> Warning: the data does not contain a trial definition, assuming that the >> trials are consecutive segments of a continuous recording >> > In utilities\private\warning_once at 81 >> In utilities\private\fixsampleinfo at 54 >> In ft_datatype_raw at 91 >> In ft_checkdata at 170 >> Error using ft_checkdata (line 288) >> This function requires freq data as input. >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Thu Nov 15 18:53:59 2012 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 15 Nov 2012 17:53:59 +0000 Subject: [FieldTrip] converting from som to ft In-Reply-To: References: Message-ID: I don't see what you mean. This is the intended functionality that supports TF data and produces the right format. Vladimir On 11/15/12, Zita Eva Patai wrote: > Thanks Vladimir! > (but does this mean I cannot convert my TF data at all, or i have to do > this as a 'loophole' alternative...and then i get my TF data into the right > format?) > > On Thu, Nov 15, 2012 at 4:37 PM, Vladimir Litvak > wrote: > >> Dear Zita, >> >> You do: >> >> freq = D.fttimelock >> >> in SPM. The fieldtrip function does not support TF data. >> >> Best, >> >> Vladimir >> >> >> On Thu, Nov 15, 2012 at 4:29 PM, Zita Eva Patai >> wrote: >> >>> Hello FT-ers >>> >>> In the past i had no problem when converting my data from SPM (where i >>> do >>> preprocessing and averaging) to FT (where I do my cluster-stats and >>> plotting) >>> >>> Currently, I am using the new way to convert (previous version seems >>> outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not >>> in >>> the right format, ie: not freq data. But i know that it is...any advice >>> would be much appreciated! Not to mention is warns me my data is not >>> epoched when it is indeed so... >>> >>> Thank you! >>> zita >>> >>> ********************* >>> *>> D = spm_eeg_load* >>> SPM M/EEG data object >>> Type: evoked >>> Transform: TF >>> 8 conditions >>> 326 channels >>> 20 frequencies >>> 501 samples/trial >>> 8 trials >>> Sampling frequency: 250 Hz >>> Loaded from file C:\Users\Eva Z >>> Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat >>> >>> Use the syntax D(channels, frequencies, samples, trials) to access the >>> data >>> Type "methods('meeg')" for the list of methods performing other >>> operations with the object >>> Type "help meeg/method_name" to get help about methods >>> >>> *>> data = spm2ft(D)* >>> >>> mapping condition label "11" to condition code 1 >>> mapping condition label "12" to condition code 2 >>> mapping condition label "21" to condition code 3 >>> mapping condition label "22" to condition code 4 >>> mapping condition label "31" to condition code 5 >>> mapping condition label "32" to condition code 6 >>> mapping condition label "41" to condition code 7 >>> mapping condition label "42" to condition code 8 >>> >>> data = >>> >>> fsample: 250.0000 >>> label: {326x1 cell} >>> time: {1x8 cell} >>> trial: {1x8 cell} >>> trialinfo: [8x1 double] >>> cfg: [1x1 struct] >>> >>> >>> *>> data2 = ft_checkdata(data, 'datatype', 'freq')* >>> >>> Warning: the data does not contain a trial definition, assuming that the >>> trials are consecutive segments of a continuous recording >>> > In utilities\private\warning_once at 81 >>> In utilities\private\fixsampleinfo at 54 >>> In ft_datatype_raw at 91 >>> In ft_checkdata at 170 >>> Error using ft_checkdata (line 288) >>> This function requires freq data as input. >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > > Zita Patai > DPhil, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > From eva.patai at psy.ox.ac.uk Thu Nov 15 19:18:35 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Thu, 15 Nov 2012 18:18:35 +0000 Subject: [FieldTrip] converting from som to ft In-Reply-To: References: Message-ID: Right, got it. Thank you again! On Thu, Nov 15, 2012 at 5:53 PM, Vladimir Litvak wrote: > I don't see what you mean. This is the intended functionality that > supports TF data and produces the right format. > > Vladimir > > On 11/15/12, Zita Eva Patai wrote: > > Thanks Vladimir! > > (but does this mean I cannot convert my TF data at all, or i have to do > > this as a 'loophole' alternative...and then i get my TF data into the > right > > format?) > > > > On Thu, Nov 15, 2012 at 4:37 PM, Vladimir Litvak > > wrote: > > > >> Dear Zita, > >> > >> You do: > >> > >> freq = D.fttimelock > >> > >> in SPM. The fieldtrip function does not support TF data. > >> > >> Best, > >> > >> Vladimir > >> > >> > >> On Thu, Nov 15, 2012 at 4:29 PM, Zita Eva Patai > >> wrote: > >> > >>> Hello FT-ers > >>> > >>> In the past i had no problem when converting my data from SPM (where i > >>> do > >>> preprocessing and averaging) to FT (where I do my cluster-stats and > >>> plotting) > >>> > >>> Currently, I am using the new way to convert (previous version seems > >>> outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not > >>> in > >>> the right format, ie: not freq data. But i know that it is...any advice > >>> would be much appreciated! Not to mention is warns me my data is not > >>> epoched when it is indeed so... > >>> > >>> Thank you! > >>> zita > >>> > >>> ********************* > >>> *>> D = spm_eeg_load* > >>> SPM M/EEG data object > >>> Type: evoked > >>> Transform: TF > >>> 8 conditions > >>> 326 channels > >>> 20 frequencies > >>> 501 samples/trial > >>> 8 trials > >>> Sampling frequency: 250 Hz > >>> Loaded from file C:\Users\Eva Z > >>> Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat > >>> > >>> Use the syntax D(channels, frequencies, samples, trials) to access the > >>> data > >>> Type "methods('meeg')" for the list of methods performing other > >>> operations with the object > >>> Type "help meeg/method_name" to get help about methods > >>> > >>> *>> data = spm2ft(D)* > >>> > >>> mapping condition label "11" to condition code 1 > >>> mapping condition label "12" to condition code 2 > >>> mapping condition label "21" to condition code 3 > >>> mapping condition label "22" to condition code 4 > >>> mapping condition label "31" to condition code 5 > >>> mapping condition label "32" to condition code 6 > >>> mapping condition label "41" to condition code 7 > >>> mapping condition label "42" to condition code 8 > >>> > >>> data = > >>> > >>> fsample: 250.0000 > >>> label: {326x1 cell} > >>> time: {1x8 cell} > >>> trial: {1x8 cell} > >>> trialinfo: [8x1 double] > >>> cfg: [1x1 struct] > >>> > >>> > >>> *>> data2 = ft_checkdata(data, 'datatype', 'freq')* > >>> > >>> Warning: the data does not contain a trial definition, assuming that > the > >>> trials are consecutive segments of a continuous recording > >>> > In utilities\private\warning_once at 81 > >>> In utilities\private\fixsampleinfo at 54 > >>> In ft_datatype_raw at 91 > >>> In ft_checkdata at 170 > >>> Error using ft_checkdata (line 288) > >>> This function requires freq data as input. > >>> > >>> > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> fieldtrip at donders.ru.nl > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >>> > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > > > > > > > > -- > > > > Zita Patai > > DPhil, Experimental Psychology > > University of Oxford > > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Duncan.Astle at mrc-cbu.cam.ac.uk Thu Nov 15 19:24:39 2012 From: Duncan.Astle at mrc-cbu.cam.ac.uk (Duncan Astle) Date: Thu, 15 Nov 2012 18:24:39 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: References: <50A50249.3010303@donders.ru.nl> Message-ID: Word up Zita, Try this(replacing the filename for the file you want): D1 = spm_eeg_load('/imaging/as05/EEG data/Load3Easy_TF/wmrtf_efMMspm8_raw_0001'); l3e1=D1.fttimelock; l3e1.dimord='chan_freq_time'; l3e1.powspctrm = squeeze(D1.fttimelock.powspctrm); Extra tip: you first need to separate your conditions such that you have an SPM file for each subject for each condition........ Let me know how you get on, D. ________________________________________________ Dr. Duncan Astle, Programme Leader Track, British Academy Research Fellow, MRC Cognition and Brain Sciences Unit, Chaucer Road, Cambridge. Duncan.Astle at mrc-cbu.cam.ac.uk From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Zita Eva Patai Sent: 15 November 2012 17:04 To: FieldTrip discussion list Subject: Re: [FieldTrip] error when converting from spm to ft Dear Jörn, Thank you for the quick reply. I will try your suggestion! Many thanks, z On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" > wrote: Dear Zita, The function seems to convert the function not correctly to a freq datastructure - it seems more like raw data to me. freq data requires a .powspctrm field, which should be a matrix of observations x channels x freq x time. So you would need to use cell2mat on your .trial field. Probably you need to permute the dimensions to match this order. Additionally, you will need a .dimord field which which should be 'rpt_chan_freq_time' and you need a .freq field that contains the frequencies in that matrix. Please first make sure that your trials actually have 3 dimensions, else something else in the conversion went wrong. I don't use SPM so no clue if there is a better way than doing it manually. Best, Jörn On 11/14/2012 6:32 PM, Zita Eva Patai wrote: Hello FT-ers In the past i had no problem when converting my data from SPM (where i do preprocessing and averaging) to FT (where I do my cluster-stats and plotting) Currently, I am using the new way to convert (previous version seems outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in the right format, ie: not freq data. But i know that it is...any advice would be much appreciated! Not to mention is warns me my data is not epoched when it is indeed so... Thank you! zita ********************* >> D = spm_eeg_load SPM M/EEG data object Type: evoked Transform: TF 8 conditions 326 channels 20 frequencies 501 samples/trial 8 trials Sampling frequency: 250 Hz Loaded from file C:\Users\Eva Z Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat Use the syntax D(channels, frequencies, samples, trials) to access the data Type "methods('meeg')" for the list of methods performing other operations with the object Type "help meeg/method_name" to get help about methods >> data = spm2ft(D) mapping condition label "11" to condition code 1 mapping condition label "12" to condition code 2 mapping condition label "21" to condition code 3 mapping condition label "22" to condition code 4 mapping condition label "31" to condition code 5 mapping condition label "32" to condition code 6 mapping condition label "41" to condition code 7 mapping condition label "42" to condition code 8 data = fsample: 250.0000 label: {326x1 cell} time: {1x8 cell} trial: {1x8 cell} trialinfo: [8x1 double] cfg: [1x1 struct] >> data2 = ft_checkdata(data, 'datatype', 'freq') Warning: the data does not contain a trial definition, assuming that the trials are consecutive segments of a continuous recording > In utilities\private\warning_once at 81 In utilities\private\fixsampleinfo at 54 In ft_datatype_raw at 91 In ft_checkdata at 170 Error using ft_checkdata (line 288) This function requires freq data as input. -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Thu Nov 15 19:57:21 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Thu, 15 Nov 2012 18:57:21 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: References: <50A50249.3010303@donders.ru.nl> Message-ID: awesome! thank you Duncan:) Thanks everyone for all the suggestions!! On Thu, Nov 15, 2012 at 6:24 PM, Duncan Astle < Duncan.Astle at mrc-cbu.cam.ac.uk> wrote: > Word up Zita,**** > > ** ** > > Try this(replacing the filename for the file you want): **** > > ** ** > > D1 = spm_eeg_load('/imaging/as05/EEG > data/Load3Easy_TF/wmrtf_efMMspm8_raw_0001');**** > > l3e1=D1.fttimelock;**** > > l3e1.dimord='chan_freq_time';**** > > l3e1.powspctrm = squeeze(D1.fttimelock.powspctrm);**** > > ** ** > > Extra tip: you first need to separate your conditions such that you have > an SPM file for each subject for each condition……..**** > > ** ** > > Let me know how you get on,**** > > D.**** > > ________________________________________________**** > > Dr. Duncan Astle,**** > > Programme Leader Track,**** > > British Academy Research Fellow,**** > > MRC Cognition and Brain Sciences Unit,**** > > Chaucer Road,**** > > Cambridge.**** > > Duncan.Astle at mrc-cbu.cam.ac.uk**** > > ** ** > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Zita Eva Patai > *Sent:* 15 November 2012 17:04 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] error when converting from spm to ft**** > > ** ** > > Dear Jörn,**** > > ** ** > > Thank you for the quick reply. I will try your suggestion!**** > > ** ** > > Many thanks,**** > > z**** > > On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" < > jm.horschig at donders.ru.nl> wrote:**** > > Dear Zita, > > The function seems to convert the function not correctly to a freq > datastructure - it seems more like raw data to me. > > freq data requires a .powspctrm field, which should be a matrix of > observations x channels x freq x time. So you would need to use cell2mat on > your .trial field. Probably you need to permute the dimensions to match > this order. Additionally, you will need a .dimord field which which should > be 'rpt_chan_freq_time' and you need a .freq field that contains the > frequencies in that matrix. Please first make sure that your trials > actually have 3 dimensions, else something else in the conversion went > wrong. > > I don't use SPM so no clue if there is a better way than doing it manually. > > Best, > Jörn**** > > > > On 11/14/2012 6:32 PM, Zita Eva Patai wrote:**** > > Hello FT-ers **** > > ** ** > > In the past i had no problem when converting my data from SPM (where i do > preprocessing and averaging) to FT (where I do my cluster-stats and > plotting)**** > > ** ** > > Currently, I am using the new way to convert (previous version seems > outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in > the right format, ie: not freq data. But i know that it is...any advice > would be much appreciated! Not to mention is warns me my data is not > epoched when it is indeed so...**** > > ** ** > > Thank you!**** > > zita**** > > ** ** > > ************************* > > *>> D = spm_eeg_load***** > > SPM M/EEG data object**** > > Type: evoked**** > > Transform: TF**** > > 8 conditions**** > > 326 channels**** > > 20 frequencies**** > > 501 samples/trial**** > > 8 trials**** > > Sampling frequency: 250 Hz**** > > Loaded from file C:\Users\Eva Z > Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat**** > > ** ** > > Use the syntax D(channels, frequencies, samples, trials) to access the data > **** > > Type "methods('meeg')" for the list of methods performing other operations > with the object**** > > Type "help meeg/method_name" to get help about methods**** > > ** ** > > *>> data = spm2ft(D)***** > > ** ** > > mapping condition label "11" to condition code 1**** > > mapping condition label "12" to condition code 2**** > > mapping condition label "21" to condition code 3**** > > mapping condition label "22" to condition code 4**** > > mapping condition label "31" to condition code 5**** > > mapping condition label "32" to condition code 6**** > > mapping condition label "41" to condition code 7**** > > mapping condition label "42" to condition code 8**** > > ** ** > > data = **** > > ** ** > > fsample: 250.0000**** > > label: {326x1 cell}**** > > time: {1x8 cell}**** > > trial: {1x8 cell}**** > > trialinfo: [8x1 double]**** > > cfg: [1x1 struct]**** > > ** ** > > ** ** > > *>> data2 = ft_checkdata(data, 'datatype', 'freq')***** > > **** > > Warning: the data does not contain a trial definition, assuming that the > trials are consecutive segments of a continuous recording **** > > > In utilities\private\warning_once at 81**** > > In utilities\private\fixsampleinfo at 54**** > > In ft_datatype_raw at 91**** > > In ft_checkdata at 170 **** > > Error using ft_checkdata (line 288)**** > > This function requires freq data as input.**** > > > **** > > ** ** > > -- **** > > ** ** > > Zita Patai**** > > DPhil, Experimental Psychology**** > > University of Oxford**** > > bcl.psy.ox.ac.uk/people/zita-eva-patai/**** > > ** ** > > ** ** > > ** ** > > _______________________________________________**** > > fieldtrip mailing list**** > > fieldtrip at donders.ru.nl**** > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > > > > **** > > -- **** > > Jörn M. Horschig**** > > PhD Student**** > > Donders Institute for Brain, Cognition and Behaviour **** > > Centre for Cognitive Neuroimaging**** > > Radboud University Nijmegen **** > > Neuronal Oscillations Group**** > > FieldTrip Development Team**** > > ** ** > > P.O. Box 9101**** > > NL-6500 HB Nijmegen**** > > The Netherlands**** > > ** ** > > Contact:**** > > E-Mail: jm.horschig at donders.ru.nl**** > > Tel: +31-(0)24-36-68493**** > > Web: http://www.ru.nl/donders**** > > ** ** > > Visiting address:**** > > Trigon, room 2.30**** > > Kapittelweg 29**** > > NL-6525 EN Nijmegen**** > > The Netherlands**** > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > > > **** > > ** ** > > -- **** > > ** ** > > Zita Patai**** > > DPhil, Experimental Psychology**** > > University of Oxford**** > > bcl.psy.ox.ac.uk/people/zita-eva-patai/**** > > ** ** > > ** ** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Nov 15 20:35:45 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 15 Nov 2012 20:35:45 +0100 Subject: [FieldTrip] DICS: fixed orientation of sources option In-Reply-To: <20121115172846.14247fxr0mnn198g@wmelperso1.univmed.fr> References: <20121115172846.14247fxr0mnn198g@wmelperso1.univmed.fr> Message-ID: Hi Andrea, If you specify fixedori = 'no', FT will not project the leadfield onto the orientation of maximum power, prior to computing the spatial filter, and this indeed will yield 'lambda-like' behaviour. Note that the essential difference is that with fixedori='yes' a scalar beamformer is computed, with fixedori='no' a vector beamformer is computed. With the powmethod option you can specify whether to take the 'trace', or the first singular value 'lambda1' of the vector beamformer output. As of yet there is no functionality that takes one of the two options depending on the 'singular value spectrum'. Best, JM On Nov 15, 2012, at 5:28 PM, andrea brovelli wrote: > > Dear all, > > I have a question regarding the option "fixedori" of DICS (the code from lines 292 to 306 in beamformer_dics.m). > > If I get it right, you implemented the situation when the first singular value lambda1 is much greater that the second singular value lambda2 of Cs (Cs is given by eq. 4 of Gross et al., 2001, PNAS). > > I checked in my data and this is not the case. Maybe my data is just a very special case, but I find that the first is a little larger that the second. Here they are: > > lambda1 = 0.5380; > lambda2 = 0.2921; > lambda3 = 0.0000; > > After eq. 9 in Gross (2001), it says that if lambda1 >> lambda2 does not hold, the trace of Cs should be used instead. > > So, has it been implemented in Fieldtrip somewhere ? And, if not, would you know how to do it ? > > Thanks a lot > > bye > > Andrea > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Thu Nov 15 22:28:48 2012 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 15 Nov 2012 21:28:48 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: References: <50A50249.3010303@donders.ru.nl> Message-ID: <6C066992-C1BA-41CC-AA29-35B933ADE574@gmail.com> Note that Duncan's suggestions only make sense for a dataset with only one trial. Even then I'm not sure why he had problems with the output as it was but I can check. Vladimir On 15 Nov 2012, at 18:57, Zita Eva Patai wrote: > awesome! thank you Duncan:) > > Thanks everyone for all the suggestions!! > > On Thu, Nov 15, 2012 at 6:24 PM, Duncan Astle wrote: > Word up Zita, > > > > Try this(replacing the filename for the file you want): > > > > D1 = spm_eeg_load('/imaging/as05/EEG data/Load3Easy_TF/wmrtf_efMMspm8_raw_0001'); > > l3e1=D1.fttimelock; > > l3e1.dimord='chan_freq_time'; > > l3e1.powspctrm = squeeze(D1.fttimelock.powspctrm); > > > > Extra tip: you first need to separate your conditions such that you have an SPM file for each subject for each condition…….. > > > > Let me know how you get on, > > D. > > ________________________________________________ > > Dr. Duncan Astle, > > Programme Leader Track, > > British Academy Research Fellow, > > MRC Cognition and Brain Sciences Unit, > > Chaucer Road, > > Cambridge. > > Duncan.Astle at mrc-cbu.cam.ac.uk > > > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Zita Eva Patai > Sent: 15 November 2012 17:04 > To: FieldTrip discussion list > Subject: Re: [FieldTrip] error when converting from spm to ft > > > > Dear Jörn, > > > > Thank you for the quick reply. I will try your suggestion! > > > > Many thanks, > > z > > On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" wrote: > > Dear Zita, > > The function seems to convert the function not correctly to a freq datastructure - it seems more like raw data to me. > > freq data requires a .powspctrm field, which should be a matrix of observations x channels x freq x time. So you would need to use cell2mat on your .trial field. Probably you need to permute the dimensions to match this order. Additionally, you will need a .dimord field which which should be 'rpt_chan_freq_time' and you need a .freq field that contains the frequencies in that matrix. Please first make sure that your trials actually have 3 dimensions, else something else in the conversion went wrong. > > I don't use SPM so no clue if there is a better way than doing it manually. > > Best, > Jörn > > > > On 11/14/2012 6:32 PM, Zita Eva Patai wrote: > > Hello FT-ers > > > > In the past i had no problem when converting my data from SPM (where i do preprocessing and averaging) to FT (where I do my cluster-stats and plotting) > > > > Currently, I am using the new way to convert (previous version seems outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in the right format, ie: not freq data. But i know that it is...any advice would be much appreciated! Not to mention is warns me my data is not epoched when it is indeed so... > > > > Thank you! > > zita > > > > ********************* > > >> D = spm_eeg_load > > SPM M/EEG data object > > Type: evoked > > Transform: TF > > 8 conditions > > 326 channels > > 20 frequencies > > 501 samples/trial > > 8 trials > > Sampling frequency: 250 Hz > > Loaded from file C:\Users\Eva Z Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat > > > > Use the syntax D(channels, frequencies, samples, trials) to access the data > > Type "methods('meeg')" for the list of methods performing other operations with the object > > Type "help meeg/method_name" to get help about methods > > > > >> data = spm2ft(D) > > > > mapping condition label "11" to condition code 1 > > mapping condition label "12" to condition code 2 > > mapping condition label "21" to condition code 3 > > mapping condition label "22" to condition code 4 > > mapping condition label "31" to condition code 5 > > mapping condition label "32" to condition code 6 > > mapping condition label "41" to condition code 7 > > mapping condition label "42" to condition code 8 > > > > data = > > > > fsample: 250.0000 > > label: {326x1 cell} > > time: {1x8 cell} > > trial: {1x8 cell} > > trialinfo: [8x1 double] > > cfg: [1x1 struct] > > > > > > >> data2 = ft_checkdata(data, 'datatype', 'freq') > > > > Warning: the data does not contain a trial definition, assuming that the trials are consecutive segments of a continuous recording > > > In utilities\private\warning_once at 81 > > In utilities\private\fixsampleinfo at 54 > > In ft_datatype_raw at 91 > > In ft_checkdata at 170 > > Error using ft_checkdata (line 288) > > This function requires freq data as input. > > > > > > -- > > > > Zita Patai > > DPhil, Experimental Psychology > > University of Oxford > > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > -- > > > > Zita Patai > > DPhil, Experimental Psychology > > University of Oxford > > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > > Zita Patai > DPhil, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From Duncan.Astle at mrc-cbu.cam.ac.uk Fri Nov 16 09:29:22 2012 From: Duncan.Astle at mrc-cbu.cam.ac.uk (Duncan Astle) Date: Fri, 16 Nov 2012 08:29:22 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: <6C066992-C1BA-41CC-AA29-35B933ADE574@gmail.com> References: <50A50249.3010303@donders.ru.nl> <6C066992-C1BA-41CC-AA29-35B933ADE574@gmail.com> Message-ID: I did it that way because the statistics options in fieldtrip need the data to be split into individual conditions for each subject (i.e. one average per condition per subject). Hence the one trial. D. ________________________________________________ Dr. Duncan Astle, Programme Leader Track, British Academy Research Fellow, MRC Cognition and Brain Sciences Unit, Chaucer Road, Cambridge. Duncan.Astle at mrc-cbu.cam.ac.uk From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Vladimir Litvak Sent: 15 November 2012 21:29 To: FieldTrip discussion list Subject: Re: [FieldTrip] error when converting from spm to ft Note that Duncan's suggestions only make sense for a dataset with only one trial. Even then I'm not sure why he had problems with the output as it was but I can check. Vladimir On 15 Nov 2012, at 18:57, Zita Eva Patai > wrote: awesome! thank you Duncan:) Thanks everyone for all the suggestions!! On Thu, Nov 15, 2012 at 6:24 PM, Duncan Astle > wrote: Word up Zita, Try this(replacing the filename for the file you want): D1 = spm_eeg_load('/imaging/as05/EEG data/Load3Easy_TF/wmrtf_efMMspm8_raw_0001'); l3e1=D1.fttimelock; l3e1.dimord='chan_freq_time'; l3e1.powspctrm = squeeze(D1.fttimelock.powspctrm); Extra tip: you first need to separate your conditions such that you have an SPM file for each subject for each condition…….. Let me know how you get on, D. ________________________________________________ Dr. Duncan Astle, Programme Leader Track, British Academy Research Fellow, MRC Cognition and Brain Sciences Unit, Chaucer Road, Cambridge. Duncan.Astle at mrc-cbu.cam.ac.uk From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Zita Eva Patai Sent: 15 November 2012 17:04 To: FieldTrip discussion list Subject: Re: [FieldTrip] error when converting from spm to ft Dear Jörn, Thank you for the quick reply. I will try your suggestion! Many thanks, z On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" > wrote: Dear Zita, The function seems to convert the function not correctly to a freq datastructure - it seems more like raw data to me. freq data requires a .powspctrm field, which should be a matrix of observations x channels x freq x time. So you would need to use cell2mat on your .trial field. Probably you need to permute the dimensions to match this order. Additionally, you will need a .dimord field which which should be 'rpt_chan_freq_time' and you need a .freq field that contains the frequencies in that matrix. Please first make sure that your trials actually have 3 dimensions, else something else in the conversion went wrong. I don't use SPM so no clue if there is a better way than doing it manually. Best, Jörn On 11/14/2012 6:32 PM, Zita Eva Patai wrote: Hello FT-ers In the past i had no problem when converting my data from SPM (where i do preprocessing and averaging) to FT (where I do my cluster-stats and plotting) Currently, I am using the new way to convert (previous version seems outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in the right format, ie: not freq data. But i know that it is...any advice would be much appreciated! Not to mention is warns me my data is not epoched when it is indeed so... Thank you! zita ********************* >> D = spm_eeg_load SPM M/EEG data object Type: evoked Transform: TF 8 conditions 326 channels 20 frequencies 501 samples/trial 8 trials Sampling frequency: 250 Hz Loaded from file C:\Users\Eva Z Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat Use the syntax D(channels, frequencies, samples, trials) to access the data Type "methods('meeg')" for the list of methods performing other operations with the object Type "help meeg/method_name" to get help about methods >> data = spm2ft(D) mapping condition label "11" to condition code 1 mapping condition label "12" to condition code 2 mapping condition label "21" to condition code 3 mapping condition label "22" to condition code 4 mapping condition label "31" to condition code 5 mapping condition label "32" to condition code 6 mapping condition label "41" to condition code 7 mapping condition label "42" to condition code 8 data = fsample: 250.0000 label: {326x1 cell} time: {1x8 cell} trial: {1x8 cell} trialinfo: [8x1 double] cfg: [1x1 struct] >> data2 = ft_checkdata(data, 'datatype', 'freq') Warning: the data does not contain a trial definition, assuming that the trials are consecutive segments of a continuous recording > In utilities\private\warning_once at 81 In utilities\private\fixsampleinfo at 54 In ft_datatype_raw at 91 In ft_checkdata at 170 Error using ft_checkdata (line 288) This function requires freq data as input. -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Fri Nov 16 13:24:12 2012 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Fri, 16 Nov 2012 12:24:12 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: References: <50A50249.3010303@donders.ru.nl> <6C066992-C1BA-41CC-AA29-35B933ADE574@gmail.com> Message-ID: Attached is a new version of fttimelock which outputs different versions of the struct depending on the input and also allows selecting just subset of the data to convert to FT. Duncan's fixes will not be necessary with it. This will be included in next SPM8 update and in SPM12. You should put it in @meeg directory in SPM. Best, Vladimir On Fri, Nov 16, 2012 at 8:29 AM, Duncan Astle < Duncan.Astle at mrc-cbu.cam.ac.uk> wrote: > I did it that way because the statistics options in fieldtrip need the > data to be split into individual conditions for each subject (i.e. one > average per condition per subject). Hence the one trial. **** > > ** ** > > D. **** > > ** ** > > ________________________________________________**** > > Dr. Duncan Astle,**** > > Programme Leader Track,**** > > British Academy Research Fellow,**** > > MRC Cognition and Brain Sciences Unit,**** > > Chaucer Road,**** > > Cambridge.**** > > Duncan.Astle at mrc-cbu.cam.ac.uk**** > > ** ** > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Vladimir Litvak > *Sent:* 15 November 2012 21:29 > > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] error when converting from spm to ft**** > > ** ** > > Note that Duncan's suggestions only make sense for a dataset with only one > trial. Even then I'm not sure why he had problems with the output as it was > but I can check.**** > > ** ** > > Vladimir**** > > ** ** > > > On 15 Nov 2012, at 18:57, Zita Eva Patai wrote:** > ** > > awesome! thank you Duncan:)**** > > ** ** > > Thanks everyone for all the suggestions!!**** > > On Thu, Nov 15, 2012 at 6:24 PM, Duncan Astle < > Duncan.Astle at mrc-cbu.cam.ac.uk> wrote:**** > > Word up Zita,**** > > **** > > Try this(replacing the filename for the file you want): **** > > **** > > D1 = spm_eeg_load('/imaging/as05/EEG > data/Load3Easy_TF/wmrtf_efMMspm8_raw_0001');**** > > l3e1=D1.fttimelock;**** > > l3e1.dimord='chan_freq_time';**** > > l3e1.powspctrm = squeeze(D1.fttimelock.powspctrm);**** > > **** > > Extra tip: you first need to separate your conditions such that you have > an SPM file for each subject for each condition……..**** > > **** > > Let me know how you get on,**** > > D.**** > > ________________________________________________**** > > Dr. Duncan Astle,**** > > Programme Leader Track,**** > > British Academy Research Fellow,**** > > MRC Cognition and Brain Sciences Unit,**** > > Chaucer Road,**** > > Cambridge.**** > > Duncan.Astle at mrc-cbu.cam.ac.uk**** > > **** > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Zita Eva Patai > *Sent:* 15 November 2012 17:04 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] error when converting from spm to ft**** > > **** > > Dear Jörn,**** > > **** > > Thank you for the quick reply. I will try your suggestion!**** > > **** > > Many thanks,**** > > z**** > > On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" < > jm.horschig at donders.ru.nl> wrote:**** > > Dear Zita, > > The function seems to convert the function not correctly to a freq > datastructure - it seems more like raw data to me. > > freq data requires a .powspctrm field, which should be a matrix of > observations x channels x freq x time. So you would need to use cell2mat on > your .trial field. Probably you need to permute the dimensions to match > this order. Additionally, you will need a .dimord field which which should > be 'rpt_chan_freq_time' and you need a .freq field that contains the > frequencies in that matrix. Please first make sure that your trials > actually have 3 dimensions, else something else in the conversion went > wrong. > > I don't use SPM so no clue if there is a better way than doing it manually. > > Best, > Jörn**** > > > > On 11/14/2012 6:32 PM, Zita Eva Patai wrote:**** > > Hello FT-ers **** > > **** > > In the past i had no problem when converting my data from SPM (where i do > preprocessing and averaging) to FT (where I do my cluster-stats and > plotting)**** > > **** > > Currently, I am using the new way to convert (previous version seems > outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in > the right format, ie: not freq data. But i know that it is...any advice > would be much appreciated! Not to mention is warns me my data is not > epoched when it is indeed so...**** > > **** > > Thank you!**** > > zita**** > > **** > > ************************* > > *>> D = spm_eeg_load***** > > SPM M/EEG data object**** > > Type: evoked**** > > Transform: TF**** > > 8 conditions**** > > 326 channels**** > > 20 frequencies**** > > 501 samples/trial**** > > 8 trials**** > > Sampling frequency: 250 Hz**** > > Loaded from file C:\Users\Eva Z > Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat**** > > **** > > Use the syntax D(channels, frequencies, samples, trials) to access the data > **** > > Type "methods('meeg')" for the list of methods performing other operations > with the object**** > > Type "help meeg/method_name" to get help about methods**** > > **** > > *>> data = spm2ft(D)***** > > **** > > mapping condition label "11" to condition code 1**** > > mapping condition label "12" to condition code 2**** > > mapping condition label "21" to condition code 3**** > > mapping condition label "22" to condition code 4**** > > mapping condition label "31" to condition code 5**** > > mapping condition label "32" to condition code 6**** > > mapping condition label "41" to condition code 7**** > > mapping condition label "42" to condition code 8**** > > **** > > data = **** > > **** > > fsample: 250.0000**** > > label: {326x1 cell}**** > > time: {1x8 cell}**** > > trial: {1x8 cell}**** > > trialinfo: [8x1 double]**** > > cfg: [1x1 struct]**** > > **** > > **** > > *>> data2 = ft_checkdata(data, 'datatype', 'freq')***** > > **** > > Warning: the data does not contain a trial definition, assuming that the > trials are consecutive segments of a continuous recording **** > > > In utilities\private\warning_once at 81**** > > In utilities\private\fixsampleinfo at 54**** > > In ft_datatype_raw at 91**** > > In ft_checkdata at 170 **** > > Error using ft_checkdata (line 288)**** > > This function requires freq data as input.**** > > > **** > > **** > > -- **** > > **** > > Zita Patai**** > > DPhil, Experimental Psychology**** > > University of Oxford**** > > bcl.psy.ox.ac.uk/people/zita-eva-patai/**** > > **** > > **** > > **** > > _______________________________________________**** > > fieldtrip mailing list**** > > fieldtrip at donders.ru.nl**** > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > > > **** > > -- **** > > Jörn M. Horschig**** > > PhD Student**** > > Donders Institute for Brain, Cognition and Behaviour **** > > Centre for Cognitive Neuroimaging**** > > Radboud University Nijmegen **** > > Neuronal Oscillations Group**** > > FieldTrip Development Team**** > > **** > > P.O. Box 9101**** > > NL-6500 HB Nijmegen**** > > The Netherlands**** > > **** > > Contact:**** > > E-Mail: jm.horschig at donders.ru.nl**** > > Tel: +31-(0)24-36-68493**** > > Web: http://www.ru.nl/donders**** > > **** > > Visiting address:**** > > Trigon, room 2.30**** > > Kapittelweg 29**** > > NL-6525 EN Nijmegen**** > > The Netherlands**** > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > > > **** > > **** > > -- **** > > **** > > Zita Patai**** > > DPhil, Experimental Psychology**** > > University of Oxford**** > > bcl.psy.ox.ac.uk/people/zita-eva-patai/**** > > **** > > **** > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > > > **** > > ** ** > > -- **** > > ** ** > > Zita Patai**** > > DPhil, Experimental Psychology**** > > University of Oxford**** > > bcl.psy.ox.ac.uk/people/zita-eva-patai/**** > > ** ** > > ** ** > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fttimelock.m Type: application/octet-stream Size: 3236 bytes Desc: not available URL: From sauer.mpih at googlemail.com Fri Nov 16 14:25:50 2012 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Fri, 16 Nov 2012 14:25:50 +0100 Subject: [FieldTrip] Problem with TFR calculation using multitaper Message-ID: Dear all, I have encountered a problem when trying to calculate the power spectrum of my data and I was wondering if anyone could help me to determine the origin of this problem. For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing and a time window with a length of 500 ms ending up with 10 tapers for the TFR calculation (the freq range is 20 - 200 Hz): cfg = []; cfg.output = 'pow'; cfg.channel = 'MEG'; cfg.method = 'mtmconvol'; cfg.taper = 'dpss'; cfg.keeptrials = 'no'; cfg.foi = [20:1:200]; cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, from -0.8 to 1.2 s cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- 11 Hz cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 500 ms cfg.pad = 'maxperlen'; TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = ft_freqanalysis(cfg,DataOut); After calculation I did a baseline normalization: cfg = []; cfg.baseline = [-0.4 -0.1]; cfg.baselinetype = 'relchange'; TFR_HighGamma{subject,condition} = ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); averaged: cfg = []; cfg.channel = 'ParOcc'; % parietal and occipital channels GA_TFR_HighGamma{condition} = ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); and finally plotted the spectrum: time(1) = 3; % -400 ms time(2) = 27; % 800 ms indFreq = [20 200]; freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); power = mean(power,1); fig = figure; set(fig,'PaperUnits','centimeters'); set(fig,'Units','centimeters'); set(fig,'PaperSize',[15 15]); set(fig,'PaperPosition',[0 0 14 14]); set(gcf,'Color',[1 1 1]); ha = gca; pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); shading interp; xlim([-0.4 0.8]); ylim([40 120]); caxis([-.2 .2]); hold on; ha = gca; plot([0 0],[40 120],'k--','LineWidth',1); set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); set(ha,'YTick',[40 60 80 100 120]); colorbar('SouthOutside'); xlabel('Time [sec]'); ylabel('Frequency [Hz]'); The resulting plot looks strange to me since there is this artifical "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different from the "strange" ones described there. I also attached a screenshot of the MultiplotTFR and there you can see the strange "effect" clearly in channels MLO22 or MRO22 for example. Is something wrong with my TFR calculation? Or does the problem arise from an earlier step in the preprocessing? Any help or advice would be greatly appreciated! Best, Andreas -- Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Spectr.jpg Type: image/jpeg Size: 78593 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MultiplotTFR.JPG Type: image/jpeg Size: 140199 bytes Desc: not available URL: From sauer.mpih at googlemail.com Fri Nov 16 14:36:01 2012 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Fri, 16 Nov 2012 14:36:01 +0100 Subject: [FieldTrip] Problem with TFR calculation using multitaper Message-ID: Dear all, I have encountered a problem when trying to calculate the power spectrum of my data and I was wondering if anyone could help me to determine the origin of this problem. For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing and a time window with a length of 500 ms ending up with 10 tapers for the TFR calculation (the freq range is 20 - 200 Hz): cfg = []; cfg.output = 'pow'; cfg.channel = 'MEG'; cfg.method = 'mtmconvol'; cfg.taper = 'dpss'; cfg.keeptrials = 'no'; cfg.foi = [20:1:200]; cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, from -0.8 to 1.2 s cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- 11 Hz cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 500 ms cfg.pad = 'maxperlen'; TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = ft_freqanalysis(cfg,DataOut); After calculation I did a baseline normalization: cfg = []; cfg.baseline = [-0.4 -0.1]; cfg.baselinetype = 'relchange'; TFR_HighGamma{subject,condition} = ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); averaged: cfg = []; cfg.channel = 'ParOcc'; % parietal and occipital channels GA_TFR_HighGamma{condition} = ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); and finally plotted the spectrum: time(1) = 3; % -400 ms time(2) = 27; % 800 ms indFreq = [20 200]; freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); power = mean(power,1); fig = figure; set(fig,'PaperUnits','centimeters'); set(fig,'Units','centimeters'); set(fig,'PaperSize',[15 15]); set(fig,'PaperPosition',[0 0 14 14]); set(gcf,'Color',[1 1 1]); ha = gca; pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); shading interp; xlim([-0.4 0.8]); ylim([40 120]); caxis([-.2 .2]); hold on; ha = gca; plot([0 0],[40 120],'k--','LineWidth',1); set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); set(ha,'YTick',[40 60 80 100 120]); colorbar('SouthOutside'); xlabel('Time [sec]'); ylabel('Frequency [Hz]'); The resulting plot looks strange to me since there is this artifical "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different from the "strange" ones described there. I also attached a screenshot of the MultiplotTFR and there you can see the strange "effect" clearly in channels MLO22 or MRO22 for example. Is something wrong with my TFR calculation? Or does the problem arise from an earlier step in the preprocessing? Any help or advice would be greatly appreciated! Best, Andreas -- Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Spectr.jpg Type: image/jpeg Size: 78593 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MultiplotTFR.JPG Type: image/jpeg Size: 140199 bytes Desc: not available URL: From f.roux at bcbl.eu Fri Nov 16 14:51:24 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Fri, 16 Nov 2012 14:51:24 +0100 (CET) Subject: [FieldTrip] Problem with TFR calculation using multitaper In-Reply-To: Message-ID: <7d961697-40cb-4095-9d24-fea020903368@thalamus_p> Dear Andreas, if you used a 50 Hz notch filter in your preprocessing, that is probably the reason why you are seeing the 'artificial' cut between 30 and 70 Hz. My guess is that you ran your notch filter on segmented epochs of a few seconds (resulting in a low spectral resolution for your notch filter). This will wipe out a ~10Hz box (in your case I'm just guessing) around the line noise frequency. Running the multitaper on top of that may explain the pattern you are observing. Best, Fred ----- Original Message ----- From: "Andreas Sauer" To: "FieldTrip discussion list" Sent: Friday, November 16, 2012 2:36:01 PM Subject: [FieldTrip] Problem with TFR calculation using multitaper Dear all, I have encountered a problem when trying to calculate the power spectrum of my data and I was wondering if anyone could help me to determine the origin of this problem. For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing and a time window with a length of 500 ms ending up with 10 tapers for the TFR calculation (the freq range is 20 - 200 Hz): cfg = []; cfg.output = 'pow'; cfg.channel = 'MEG'; cfg.method = 'mtmconvol'; cfg.taper = 'dpss'; cfg.keeptrials = 'no'; cfg.foi = [20:1:200]; cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, from -0.8 to 1.2 s cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- 11 Hz cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 500 ms cfg.pad = 'maxperlen'; TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = ft_freqanalysis(cfg,DataOut); After calculation I did a baseline normalization: cfg = []; cfg.baseline = [-0.4 -0.1]; cfg.baselinetype = 'relchange'; TFR_HighGamma{subject,condition} = ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); averaged: cfg = []; cfg.channel = 'ParOcc'; % parietal and occipital channels GA_TFR_HighGamma{condition} = ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); and finally plotted the spectrum: time(1) = 3; % -400 ms time(2) = 27; % 800 ms indFreq = [20 200]; freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); power = mean(power,1); fig = figure; set(fig,'PaperUnits','centimeters'); set(fig,'Units','centimeters'); set(fig,'PaperSize',[15 15]); set(fig,'PaperPosition',[0 0 14 14]); set(gcf,'Color',[1 1 1]); ha = gca; pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); shading interp; xlim([-0.4 0.8]); ylim([40 120]); caxis([-.2 .2]); hold on; ha = gca; plot([0 0],[40 120],'k--','LineWidth',1); set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); set(ha,'YTick',[40 60 80 100 120]); colorbar('SouthOutside'); xlabel('Time [sec]'); ylabel('Frequency [Hz]'); The resulting plot looks strange to me since there is this artifical "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different from the "strange" ones described there. I also attached a screenshot of the MultiplotTFR and there you can see the strange "effect" clearly in channels MLO22 or MRO22 for example. Is something wrong with my TFR calculation? Or does the problem arise from an earlier step in the preprocessing? Any help or advice would be greatly appreciated! Best, Andreas -- Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From a.stolk at fcdonders.ru.nl Fri Nov 16 15:11:05 2012 From: a.stolk at fcdonders.ru.nl (Stolk, A.) Date: Fri, 16 Nov 2012 15:11:05 +0100 (CET) Subject: [FieldTrip] correction for movement tool In-Reply-To: Message-ID: <1845155284.1304271.1353075065072.JavaMail.root@sculptor.zimbra.ru.nl> Hello Inna, Nenad, We're happy to announce that the manuscript previously mentioned ('Online and offline tools for head movement compensation in MEG') has been accepted for publication. The manuscript demonstrates the applicability of the recently discussed methods to a wide range of tasks and experiments and it also presents an overview of the methods out there. It can be found in the literature section of the FieldTrip wiki or directly downloaded from http://fieldtrip.fcdonders.nl/_media/stolk_et_al_-_meg_head_movements_-_20121116.pdf Best regards, Arjen ----- Oorspronkelijk bericht ----- > Van: "Nenad Polomac" > Aan: fieldtrip at science.ru.nl > Verzonden: Donderdag 15 november 2012 09:58:35 > Onderwerp: Re: [FieldTrip] correction for movement tool > Dear Arjen, > Thank you very much for the detailed clarification! > This helped a lot! :) > All the best! > Nenad  > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Fri Nov 16 15:41:36 2012 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Fri, 16 Nov 2012 14:41:36 +0000 Subject: [FieldTrip] error when converting from spm to ft In-Reply-To: References: <50A50249.3010303@donders.ru.nl> <6C066992-C1BA-41CC-AA29-35B933ADE574@gmail.com> Message-ID: Great, thanks again! On Fri, Nov 16, 2012 at 12:24 PM, Vladimir Litvak wrote: > Attached is a new version of fttimelock which outputs different versions > of the struct depending on the input and also allows selecting just subset > of the data to convert to FT. Duncan's fixes will not be necessary with it. > This will be included in next SPM8 update and in SPM12. You should put it > in @meeg directory in SPM. > > Best, > > Vladimir > > > On Fri, Nov 16, 2012 at 8:29 AM, Duncan Astle < > Duncan.Astle at mrc-cbu.cam.ac.uk> wrote: > >> I did it that way because the statistics options in fieldtrip need the >> data to be split into individual conditions for each subject (i.e. one >> average per condition per subject). Hence the one trial. **** >> >> ** ** >> >> D. **** >> >> ** ** >> >> ________________________________________________**** >> >> Dr. Duncan Astle,**** >> >> Programme Leader Track,**** >> >> British Academy Research Fellow,**** >> >> MRC Cognition and Brain Sciences Unit,**** >> >> Chaucer Road,**** >> >> Cambridge.**** >> >> Duncan.Astle at mrc-cbu.cam.ac.uk**** >> >> ** ** >> >> *From:* fieldtrip-bounces at science.ru.nl [mailto: >> fieldtrip-bounces at science.ru.nl] *On Behalf Of *Vladimir Litvak >> *Sent:* 15 November 2012 21:29 >> >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] error when converting from spm to ft**** >> >> ** ** >> >> Note that Duncan's suggestions only make sense for a dataset with only >> one trial. Even then I'm not sure why he had problems with the output as it >> was but I can check.**** >> >> ** ** >> >> Vladimir**** >> >> ** ** >> >> >> On 15 Nov 2012, at 18:57, Zita Eva Patai wrote:* >> *** >> >> awesome! thank you Duncan:)**** >> >> ** ** >> >> Thanks everyone for all the suggestions!!**** >> >> On Thu, Nov 15, 2012 at 6:24 PM, Duncan Astle < >> Duncan.Astle at mrc-cbu.cam.ac.uk> wrote:**** >> >> Word up Zita,**** >> >> **** >> >> Try this(replacing the filename for the file you want): **** >> >> **** >> >> D1 = spm_eeg_load('/imaging/as05/EEG >> data/Load3Easy_TF/wmrtf_efMMspm8_raw_0001');**** >> >> l3e1=D1.fttimelock;**** >> >> l3e1.dimord='chan_freq_time';**** >> >> l3e1.powspctrm = squeeze(D1.fttimelock.powspctrm);**** >> >> **** >> >> Extra tip: you first need to separate your conditions such that you have >> an SPM file for each subject for each condition……..**** >> >> **** >> >> Let me know how you get on,**** >> >> D.**** >> >> ________________________________________________**** >> >> Dr. Duncan Astle,**** >> >> Programme Leader Track,**** >> >> British Academy Research Fellow,**** >> >> MRC Cognition and Brain Sciences Unit,**** >> >> Chaucer Road,**** >> >> Cambridge.**** >> >> Duncan.Astle at mrc-cbu.cam.ac.uk**** >> >> **** >> >> *From:* fieldtrip-bounces at science.ru.nl [mailto: >> fieldtrip-bounces at science.ru.nl] *On Behalf Of *Zita Eva Patai >> *Sent:* 15 November 2012 17:04 >> *To:* FieldTrip discussion list >> *Subject:* Re: [FieldTrip] error when converting from spm to ft**** >> >> **** >> >> Dear Jörn,**** >> >> **** >> >> Thank you for the quick reply. I will try your suggestion!**** >> >> **** >> >> Many thanks,**** >> >> z**** >> >> On Thu, Nov 15, 2012 at 2:55 PM, "Jörn M. Horschig" < >> jm.horschig at donders.ru.nl> wrote:**** >> >> Dear Zita, >> >> The function seems to convert the function not correctly to a freq >> datastructure - it seems more like raw data to me. >> >> freq data requires a .powspctrm field, which should be a matrix of >> observations x channels x freq x time. So you would need to use cell2mat on >> your .trial field. Probably you need to permute the dimensions to match >> this order. Additionally, you will need a .dimord field which which should >> be 'rpt_chan_freq_time' and you need a .freq field that contains the >> frequencies in that matrix. Please first make sure that your trials >> actually have 3 dimensions, else something else in the conversion went >> wrong. >> >> I don't use SPM so no clue if there is a better way than doing it >> manually. >> >> Best, >> Jörn**** >> >> >> >> On 11/14/2012 6:32 PM, Zita Eva Patai wrote:**** >> >> Hello FT-ers **** >> >> **** >> >> In the past i had no problem when converting my data from SPM (where i do >> preprocessing and averaging) to FT (where I do my cluster-stats and >> plotting)**** >> >> **** >> >> Currently, I am using the new way to convert (previous version seems >> outdated 'nspm2ftrip') and I am hitting a wall: it says my data is not in >> the right format, ie: not freq data. But i know that it is...any advice >> would be much appreciated! Not to mention is warns me my data is not >> epoched when it is indeed so...**** >> >> **** >> >> Thank you!**** >> >> zita**** >> >> **** >> >> ************************* >> >> *>> D = spm_eeg_load***** >> >> SPM M/EEG data object**** >> >> Type: evoked**** >> >> Transform: TF**** >> >> 8 conditions**** >> >> 326 channels**** >> >> 20 frequencies**** >> >> 501 samples/trial**** >> >> 8 trials**** >> >> Sampling frequency: 250 Hz**** >> >> Loaded from file C:\Users\Eva Z >> Patai\Documents\MATLAB\epoched_data\tf\rmtf_rs01_timecorr.mat**** >> >> **** >> >> Use the syntax D(channels, frequencies, samples, trials) to access the >> data**** >> >> Type "methods('meeg')" for the list of methods performing other >> operations with the object**** >> >> Type "help meeg/method_name" to get help about methods**** >> >> **** >> >> *>> data = spm2ft(D)***** >> >> **** >> >> mapping condition label "11" to condition code 1**** >> >> mapping condition label "12" to condition code 2**** >> >> mapping condition label "21" to condition code 3**** >> >> mapping condition label "22" to condition code 4**** >> >> mapping condition label "31" to condition code 5**** >> >> mapping condition label "32" to condition code 6**** >> >> mapping condition label "41" to condition code 7**** >> >> mapping condition label "42" to condition code 8**** >> >> **** >> >> data = **** >> >> **** >> >> fsample: 250.0000**** >> >> label: {326x1 cell}**** >> >> time: {1x8 cell}**** >> >> trial: {1x8 cell}**** >> >> trialinfo: [8x1 double]**** >> >> cfg: [1x1 struct]**** >> >> **** >> >> **** >> >> *>> data2 = ft_checkdata(data, 'datatype', 'freq')***** >> >> **** >> >> Warning: the data does not contain a trial definition, assuming that the >> trials are consecutive segments of a continuous recording **** >> >> > In utilities\private\warning_once at 81**** >> >> In utilities\private\fixsampleinfo at 54**** >> >> In ft_datatype_raw at 91**** >> >> In ft_checkdata at 170 **** >> >> Error using ft_checkdata (line 288)**** >> >> This function requires freq data as input.**** >> >> >> **** >> >> **** >> >> -- **** >> >> **** >> >> Zita Patai**** >> >> DPhil, Experimental Psychology**** >> >> University of Oxford**** >> >> bcl.psy.ox.ac.uk/people/zita-eva-patai/**** >> >> **** >> >> **** >> >> **** >> >> _______________________________________________**** >> >> fieldtrip mailing list**** >> >> fieldtrip at donders.ru.nl**** >> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** >> >> >> >> **** >> >> -- **** >> >> Jörn M. Horschig**** >> >> PhD Student**** >> >> Donders Institute for Brain, Cognition and Behaviour **** >> >> Centre for Cognitive Neuroimaging**** >> >> Radboud University Nijmegen **** >> >> Neuronal Oscillations Group**** >> >> FieldTrip Development Team**** >> >> **** >> >> P.O. Box 9101**** >> >> NL-6500 HB Nijmegen**** >> >> The Netherlands**** >> >> **** >> >> Contact:**** >> >> E-Mail: jm.horschig at donders.ru.nl**** >> >> Tel: +31-(0)24-36-68493**** >> >> Web: http://www.ru.nl/donders**** >> >> **** >> >> Visiting address:**** >> >> Trigon, room 2.30**** >> >> Kapittelweg 29**** >> >> NL-6525 EN Nijmegen**** >> >> The Netherlands**** >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** >> >> >> >> **** >> >> **** >> >> -- **** >> >> **** >> >> Zita Patai**** >> >> DPhil, Experimental Psychology**** >> >> University of Oxford**** >> >> bcl.psy.ox.ac.uk/people/zita-eva-patai/**** >> >> **** >> >> **** >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** >> >> >> >> **** >> >> ** ** >> >> -- **** >> >> ** ** >> >> Zita Patai**** >> >> DPhil, Experimental Psychology**** >> >> University of Oxford**** >> >> bcl.psy.ox.ac.uk/people/zita-eva-patai/**** >> >> ** ** >> >> ** ** >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Zita Patai DPhil, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.craddock at uni-leipzig.de Fri Nov 16 16:50:06 2012 From: matt.craddock at uni-leipzig.de (Matt Craddock) Date: Fri, 16 Nov 2012 16:50:06 +0100 Subject: [FieldTrip] Problem with TFR calculation using multitaper In-Reply-To: <7d961697-40cb-4095-9d24-fea020903368@thalamus_p> References: <7d961697-40cb-4095-9d24-fea020903368@thalamus_p> Message-ID: <50A660AE.8000606@uni-leipzig.de> Dear Andreas and Frederic, Another possibility would be a 60 Hz signal (a steady-state evoked potential to monitor refresh rate, for example) running throughout the trial, including in the baseline period. Given that you're using 11 Hz frequency smoothing, this would effectively be smeared across the 49-71 Hz range. You'd have a much higher baseline signal in the 49-71 Hz range (because of the 60 Hz signal appearing in all those frequencies), but the strength of the actual signal in those ranges wouldn't differ. So, the signal-to-baseline ratio would be much lower (because your signal-to-noise ratio is worse), and that'd created the appearance of boundaries at the edges of the frequency smoothing (because at 71 Hz you are still getting the 60Hz noise, but at 72Hz, you are not, so your signal-to-noise ratio dramatically changes). I've attached a pic showing something similar caused by 50 Hz line noise (in EEG, with ~12Hz freq smoothing). So I'd suggest checking the FFT of your data and possibly putting in a notch at 60 Hz if there's a big peak there. Cheers, Matt On 16/11/2012 14:51, Frederic Roux wrote: > > Dear Andreas, > > if you used a 50 Hz notch filter in your > preprocessing, that is probably the reason > why you are seeing the 'artificial' cut > between 30 and 70 Hz. > > My guess is that you ran your notch filter > on segmented epochs of a few seconds (resulting > in a low spectral resolution for your notch filter). > This will wipe out a ~10Hz box (in your case I'm just guessing) > around the line noise frequency. > > Running the multitaper on top of that may explain > the pattern you are observing. > > > Best, > > Fred > ----- Original Message ----- > From: "Andreas Sauer" > To: "FieldTrip discussion list" > Sent: Friday, November 16, 2012 2:36:01 PM > Subject: [FieldTrip] Problem with TFR calculation using multitaper > > > Dear all, > > I have encountered a problem when trying to calculate the power spectrum of my data and I was wondering if anyone could help me to determine the origin of this problem. > > For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing and a time window with a length of 500 ms ending up with 10 tapers for the TFR calculation (the freq range is 20 - 200 Hz): > > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'MEG'; > cfg.method = 'mtmconvol'; > cfg.taper = 'dpss'; > cfg.keeptrials = 'no'; > cfg.foi = [20:1:200]; > cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, from -0.8 to 1.2 s > cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- 11 Hz > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 500 ms > cfg.pad = 'maxperlen'; > > TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = ft_freqanalysis(cfg,DataOut); > > After calculation I did a baseline normalization: > > > cfg = []; > cfg.baseline = [-0.4 -0.1]; > cfg.baselinetype = 'relchange'; > > TFR_HighGamma{subject,condition} = ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); > > averaged: > > > cfg = []; > cfg.channel = 'ParOcc'; % parietal and occipital channels > GA_TFR_HighGamma{condition} = ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); > > and finally plotted the spectrum: > > > time(1) = 3; % -400 ms > time(2) = 27; % 800 ms > indFreq = [20 200]; > freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); > > power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); > power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); > power = mean(power,1); > > fig = figure; > set(fig,'PaperUnits','centimeters'); > set(fig,'Units','centimeters'); > set(fig,'PaperSize',[15 15]); > set(fig,'PaperPosition',[0 0 14 14]); > set(gcf,'Color',[1 1 1]); > > ha = gca; > pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); > set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); > shading interp; > xlim([-0.4 0.8]); > ylim([40 120]); > caxis([-.2 .2]); > hold on; > ha = gca; > plot([0 0],[40 120],'k--','LineWidth',1); > set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); > set(ha,'YTick',[40 60 80 100 120]); > colorbar('SouthOutside'); > xlabel('Time [sec]'); > ylabel('Frequency [Hz]'); > > The resulting plot looks strange to me since there is this artifical "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different from the "strange" ones described there. > I also attached a screenshot of the MultiplotTFR and there you can see the strange "effect" clearly in channels MLO22 or MRO22 for example. > > Is something wrong with my TFR calculation? Or does the problem arise from an earlier step in the preprocessing? > > Any help or advice would be greatly appreciated! > > Best, > > Andreas > -- Dr. Matt Craddock Post-doctoral researcher, Institute of Psychology, University of Leipzig, Seeburgstr. 14-20, 04103 Leipzig, Germany Phone: +49 341 973 95 44 -------------- next part -------------- A non-text attachment was scrubbed... Name: 50HznoiseFilt.png Type: image/png Size: 51346 bytes Desc: not available URL: From f.roux at bcbl.eu Sat Nov 17 12:54:51 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Sat, 17 Nov 2012 12:54:51 +0100 (CET) Subject: [FieldTrip] Problem with TFR calculation using multitaper In-Reply-To: <50A660AE.8000606@uni-leipzig.de> Message-ID: <6f87de3f-b420-409f-8136-5c4712ece41d@thalamus_p> Hi Matt, Hi Andreas, Indeed, I remember seeing strong 60 Hz line noise as a result of the beamer refresh rate (60Hz). Best, Fred ----- Original Message ----- From: "Matt Craddock" To: "FieldTrip discussion list" Sent: Friday, November 16, 2012 4:50:06 PM Subject: Re: [FieldTrip] Problem with TFR calculation using multitaper Dear Andreas and Frederic, Another possibility would be a 60 Hz signal (a steady-state evoked potential to monitor refresh rate, for example) running throughout the trial, including in the baseline period. Given that you're using 11 Hz frequency smoothing, this would effectively be smeared across the 49-71 Hz range. You'd have a much higher baseline signal in the 49-71 Hz range (because of the 60 Hz signal appearing in all those frequencies), but the strength of the actual signal in those ranges wouldn't differ. So, the signal-to-baseline ratio would be much lower (because your signal-to-noise ratio is worse), and that'd created the appearance of boundaries at the edges of the frequency smoothing (because at 71 Hz you are still getting the 60Hz noise, but at 72Hz, you are not, so your signal-to-noise ratio dramatically changes). I've attached a pic showing something similar caused by 50 Hz line noise (in EEG, with ~12Hz freq smoothing). So I'd suggest checking the FFT of your data and possibly putting in a notch at 60 Hz if there's a big peak there. Cheers, Matt On 16/11/2012 14:51, Frederic Roux wrote: > > Dear Andreas, > > if you used a 50 Hz notch filter in your > preprocessing, that is probably the reason > why you are seeing the 'artificial' cut > between 30 and 70 Hz. > > My guess is that you ran your notch filter > on segmented epochs of a few seconds (resulting > in a low spectral resolution for your notch filter). > This will wipe out a ~10Hz box (in your case I'm just guessing) > around the line noise frequency. > > Running the multitaper on top of that may explain > the pattern you are observing. > > > Best, > > Fred > ----- Original Message ----- > From: "Andreas Sauer" > To: "FieldTrip discussion list" > Sent: Friday, November 16, 2012 2:36:01 PM > Subject: [FieldTrip] Problem with TFR calculation using multitaper > > > Dear all, > > I have encountered a problem when trying to calculate the power spectrum of my data and I was wondering if anyone could help me to determine the origin of this problem. > > For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing and a time window with a length of 500 ms ending up with 10 tapers for the TFR calculation (the freq range is 20 - 200 Hz): > > > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'MEG'; > cfg.method = 'mtmconvol'; > cfg.taper = 'dpss'; > cfg.keeptrials = 'no'; > cfg.foi = [20:1:200]; > cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, from -0.8 to 1.2 s > cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- 11 Hz > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 500 ms > cfg.pad = 'maxperlen'; > > TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = ft_freqanalysis(cfg,DataOut); > > After calculation I did a baseline normalization: > > > cfg = []; > cfg.baseline = [-0.4 -0.1]; > cfg.baselinetype = 'relchange'; > > TFR_HighGamma{subject,condition} = ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); > > averaged: > > > cfg = []; > cfg.channel = 'ParOcc'; % parietal and occipital channels > GA_TFR_HighGamma{condition} = ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); > > and finally plotted the spectrum: > > > time(1) = 3; % -400 ms > time(2) = 27; % 800 ms > indFreq = [20 200]; > freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); > > power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); > power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); > power = mean(power,1); > > fig = figure; > set(fig,'PaperUnits','centimeters'); > set(fig,'Units','centimeters'); > set(fig,'PaperSize',[15 15]); > set(fig,'PaperPosition',[0 0 14 14]); > set(gcf,'Color',[1 1 1]); > > ha = gca; > pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); > set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); > shading interp; > xlim([-0.4 0.8]); > ylim([40 120]); > caxis([-.2 .2]); > hold on; > ha = gca; > plot([0 0],[40 120],'k--','LineWidth',1); > set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); > set(ha,'YTick',[40 60 80 100 120]); > colorbar('SouthOutside'); > xlabel('Time [sec]'); > ylabel('Frequency [Hz]'); > > The resulting plot looks strange to me since there is this artifical "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different from the "strange" ones described there. > I also attached a screenshot of the MultiplotTFR and there you can see the strange "effect" clearly in channels MLO22 or MRO22 for example. > > Is something wrong with my TFR calculation? Or does the problem arise from an earlier step in the preprocessing? > > Any help or advice would be greatly appreciated! > > Best, > > Andreas > -- Dr. Matt Craddock Post-doctoral researcher, Institute of Psychology, University of Leipzig, Seeburgstr. 14-20, 04103 Leipzig, Germany Phone: +49 341 973 95 44 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From sauer.mpih at googlemail.com Sat Nov 17 15:58:25 2012 From: sauer.mpih at googlemail.com (Andreas Sauer) Date: Sat, 17 Nov 2012 15:58:25 +0100 Subject: [FieldTrip] Problem with TFR calculation using multitaper In-Reply-To: References: <50A660AE.8000606@uni-leipzig.de> <6f87de3f-b420-409f-8136-5c4712ece41d@thalamus_p> Message-ID: Hi Matt, Hi Fred, thanks for your answers! It helped a lot! The artifact seems indeed to be due to the 60 Hz refresh rate of our beamer. I filtered the data again and the result is pretty clear (see attached picture - one subject). Thanks again and a nice weekend for you two! Best, Andreas > 2012/11/17 Frederic Roux > >> Hi Matt, Hi Andreas, >> >> Indeed, I remember seeing strong 60 Hz line noise as >> a result of the beamer refresh rate (60Hz). >> >> Best, >> Fred >> >> >> ----- Original Message ----- >> From: "Matt Craddock" >> To: "FieldTrip discussion list" >> Sent: Friday, November 16, 2012 4:50:06 PM >> Subject: Re: [FieldTrip] Problem with TFR calculation using multitaper >> >> Dear Andreas and Frederic, >> >> Another possibility would be a 60 Hz signal (a steady-state evoked >> potential to monitor refresh rate, for example) running throughout the >> trial, including in the baseline period. Given that you're using 11 Hz >> frequency smoothing, this would effectively be smeared across the 49-71 >> Hz range. >> >> You'd have a much higher baseline signal in the 49-71 Hz range (because >> of the 60 Hz signal appearing in all those frequencies), but the >> strength of the actual signal in those ranges wouldn't differ. So, the >> signal-to-baseline ratio would be much lower (because your >> signal-to-noise ratio is worse), and that'd created the appearance of >> boundaries at the edges of the frequency smoothing (because at 71 Hz you >> are still getting the 60Hz noise, but at 72Hz, you are not, so your >> signal-to-noise ratio dramatically changes). >> >> I've attached a pic showing something similar caused by 50 Hz line noise >> (in EEG, with ~12Hz freq smoothing). >> >> So I'd suggest checking the FFT of your data and possibly putting in a >> notch at 60 Hz if there's a big peak there. >> >> Cheers, >> Matt >> >> >> On 16/11/2012 14:51, Frederic Roux wrote: >> > >> > Dear Andreas, >> > >> > if you used a 50 Hz notch filter in your >> > preprocessing, that is probably the reason >> > why you are seeing the 'artificial' cut >> > between 30 and 70 Hz. >> > >> > My guess is that you ran your notch filter >> > on segmented epochs of a few seconds (resulting >> > in a low spectral resolution for your notch filter). >> > This will wipe out a ~10Hz box (in your case I'm just guessing) >> > around the line noise frequency. >> > >> > Running the multitaper on top of that may explain >> > the pattern you are observing. >> > >> > >> > Best, >> > >> > Fred >> > ----- Original Message ----- >> > From: "Andreas Sauer" >> > To: "FieldTrip discussion list" >> > Sent: Friday, November 16, 2012 2:36:01 PM >> > Subject: [FieldTrip] Problem with TFR calculation using multitaper >> > >> > >> > Dear all, >> > >> > I have encountered a problem when trying to calculate the power >> spectrum of my data and I was wondering if anyone could help me to >> determine the origin of this problem. >> > >> > For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing >> and a time window with a length of 500 ms ending up with 10 tapers for the >> TFR calculation (the freq range is 20 - 200 Hz): >> > >> > >> > cfg = []; >> > cfg.output = 'pow'; >> > cfg.channel = 'MEG'; >> > cfg.method = 'mtmconvol'; >> > cfg.taper = 'dpss'; >> > cfg.keeptrials = 'no'; >> > cfg.foi = [20:1:200]; >> > cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, >> from -0.8 to 1.2 s >> > cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- >> 11 Hz >> > cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = >> 500 ms >> > cfg.pad = 'maxperlen'; >> > >> > TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = >> ft_freqanalysis(cfg,DataOut); >> > >> > After calculation I did a baseline normalization: >> > >> > >> > cfg = []; >> > cfg.baseline = [-0.4 -0.1]; >> > cfg.baselinetype = 'relchange'; >> > >> > TFR_HighGamma{subject,condition} = >> ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); >> > >> > averaged: >> > >> > >> > cfg = []; >> > cfg.channel = 'ParOcc'; % parietal and occipital channels >> > GA_TFR_HighGamma{condition} = >> ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); >> > >> > and finally plotted the spectrum: >> > >> > >> > time(1) = 3; % -400 ms >> > time(2) = 27; % 800 ms >> > indFreq = [20 200]; >> > freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); >> > >> > power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); >> > power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); >> > power = mean(power,1); >> > >> > fig = figure; >> > set(fig,'PaperUnits','centimeters'); >> > set(fig,'Units','centimeters'); >> > set(fig,'PaperSize',[15 15]); >> > set(fig,'PaperPosition',[0 0 14 14]); >> > set(gcf,'Color',[1 1 1]); >> > >> > ha = gca; >> > >> pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); >> > set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); >> > shading interp; >> > xlim([-0.4 0.8]); >> > ylim([40 120]); >> > caxis([-.2 .2]); >> > hold on; >> > ha = gca; >> > plot([0 0],[40 120],'k--','LineWidth',1); >> > set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); >> > set(ha,'YTick',[40 60 80 100 120]); >> > colorbar('SouthOutside'); >> > xlabel('Time [sec]'); >> > ylabel('Frequency [Hz]'); >> > >> > The resulting plot looks strange to me since there is this artifical >> "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different >> from the "strange" ones described there. >> > I also attached a screenshot of the MultiplotTFR and there you can see >> the strange "effect" clearly in channels MLO22 or MRO22 for example. >> > >> > Is something wrong with my TFR calculation? Or does the problem arise >> from an earlier step in the preprocessing? >> > >> > Any help or advice would be greatly appreciated! >> > >> > Best, >> > >> > Andreas >> > >> >> >> -- >> Dr. Matt Craddock >> >> Post-doctoral researcher, >> Institute of Psychology, >> University of Leipzig, >> Seeburgstr. 14-20, >> 04103 Leipzig, Germany >> Phone: +49 341 973 95 44 >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Dipl.-Psych. Andreas Sauer > Max Planck Institute for Brain Research > Deutschordenstraße 46 > 60528 Frankfurt am Main > Germany > > T: +49 69 96769 278 > F: +49 69 96769 327 > Email: sauer.mpih at gmail.com > www.brain.mpg.de > > -- Dipl.-Psych. Andreas Sauer Max Planck Institute for Brain Research Deutschordenstraße 46 60528 Frankfurt am Main Germany T: +49 69 96769 278 F: +49 69 96769 327 Email: sauer.mpih at gmail.com www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 60HzFiltered.jpg Type: image/jpeg Size: 82747 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Not60HzFiltered.jpg Type: image/jpeg Size: 83986 bytes Desc: not available URL: From m.chait at ucl.ac.uk Mon Nov 19 10:20:08 2012 From: m.chait at ucl.ac.uk (Chait, Maria) Date: Mon, 19 Nov 2012 09:20:08 +0000 Subject: [FieldTrip] Post Doc Position at UCL Ear Institute Message-ID: <3BA3DF582C0B7542AE0CB625F0119AB816FBE0F2@AMSPRD0104MB100.eurprd01.prod.exchangelabs.com> Dear Colleagues, I am writing to point your attention to a research associate (Post Doc) job opening at the UCL Ear Institute and would be grateful if you could distribute the advert to relevant members of your institution. Please note the deadline is this Thursday. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Research Associate (Post Doc)- Ref: 1288813 Closing Date: 22/11/2012 A research associate (Post Doc) position (starting salary £32,055 per annum Inclusive of London allowance) is available to work on a BBSRC funded project that will use psychophysics, eye tracking and MEG functional brain imaging to investigate the neural systems that support listeners ability to detect changes in acoustic scenes. You will be supervised by Dr Maria Chait. The post holder will be based at UCL Ear Institute and MEG scanning will be carried out at UCL's Wellcome Trust Centre for Neuroimaging. Initial funding for this post is available for 36 months. The UCL Ear Institute provides state-of-the-art research facilities across a wide range of disciplines and is one of the foremost centres for hearing, speech and language-related research within Europe. The Wellcome Trust Centre for Neuroimaging is a leading centre for brain imaging, bringing together clinicians and scientists who study higher cognitive function using neuroimaging techniques. Key Requirements Applicants should hold a PhD degree (or equivalent) in an engineering or Neuroscience-related subject and have substantial experience in digital signal processing and computer programming. Previous experience with auditory research and/or functional brain imaging is desirable. Further Details You should apply for this post (Ref #: 1288813) through UCL's online recruitment website, www.ucl.ac.uk/hr/jobs, where you can download a job description and person specifications. For an informal discussion please contact Dr. Maria Chait (m.chait at ucl.ac.uk). Maria Chait PhD m.chait at ucl.ac.uk Senior Lecturer UCL Ear Institute 332 Gray's Inn Road London WC1X 8EE -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron__t at hotmail.com Mon Nov 19 19:11:59 2012 From: aaron__t at hotmail.com (Aaron T) Date: Mon, 19 Nov 2012 10:11:59 -0800 Subject: [FieldTrip] ft_spiketriggeredspectrum questions Message-ID: Hi, I'm trying to get started with dsp and running into some difficulty grasping the proper use of ft_spiketriggeredspectrum and ft_spiketriggeredspectrum_stat. The sample code at the bottom uses LFP data that has already been bandpassed filtered (theta); I am trying to examine spike-lfp statistics in theta, and would greatly appreciate help figuring out how to analyze spike phases. The issues I am having relate to the use of the cfg.method (mtmfft vs convol), foo and timwin/t_ftimwin and foi. As well as perhaps the use of ft_spiketriggeredspectrum_stat generally. 1) Should .foi be specified if the data is already filtered? I changed the code below to restrict foi to a plv (8Hz) I would be able to simplify and understand, but I am guessing I should use theta ranges? I've tried code that replicates (and also values that further limit) the frequency of the bp filter, but am not sure how .foi is intended to be used here. 2) Ive gone through the tutorials, and according to code snippet in the timefrequencyanalysis tutorial tfrhann.freq = "% Array of frequencies of interest (the elements of freq may be different from your cfg.foi input depending on your trial length) ". I'm not quite sure what that means? When I use the single frequency of 8Hz and cfg.timwin = [-0.5 0.5]; %1 second window I receive (for data with 82 trials, single spike channel, 11 lap channels) a 1x151 double array of values as the tfrSample.ang value in the code below (using mtmfft as the cfg.method). The 151 array columns (frequencies) appear to converge on two separate values (in odd and even columns respectively). I'm not understanding what these represent? 3) When I change the timwin to [-0.25 0.25] I receive fewer values (1x7 ), again with what appears to be two converging sets of values, but they are not terribly similar to the 1 second values I am receiving. 4) cfg.method = convol results in a single tfrSample.ang value, but while cfg.t_ftimwin = 4./cfg.foi and cfg.t_ftimwin = 4./cfg.foi yield a somewhat similar answer, cfg.t_ftimwin = 16 ./cfg.foi is completely different. 5) Am I correct that the input for ft_spiketriggeredspectrum_stat should be the decomposed spike data as in the code below (vs spike)? 6) In contrast to the ang method in ft_spiketriggeredspectrum_stat, using angle(stsFFT.fourierspctrm{1}) in Example1 yields an array that I believe represents spikes * lfp channels * the same 151 frequency values. I'm not sure I understand the difference between angle and the ft _stat ang method? 7) is mtmfft just a faster version of fft? Sample Code (multiple examples): if Example1 cfg = []; cfg.method = 'fft'; cfg.timwin = [-0.5 0.5]; cfg.foi = 8; cfg.taper = 'hanning'; cfg.spikechannel = FFTSpikeChannel; cfg.channel = data_lfp.label; stsFFT = ft_spiketriggeredspectrum(cfg, data_all); ang = angle(stsFFT.fourierspctrm{1}); cfgTfr1 = []; cfgTfr1.method = 'ang'; tfr1 = ft_spiketriggeredspectrum_stat(cfgTfr1,stsFFT); end if Example2 cfg.timwin = [-0.25 0.25]; % time window of 500 msec end if Example3 cfg.method = 'mtmfft'; cfg.foi = 8; cfg.t_ftimwin = 8 ./ cfg.foi; % 8 cycles per frequency end if Example4 ConvolSpikeChannel = spike.label{1}; cfg.spikechannel = ConvolSpikeChannel; cfg.method = 'convol'; cfg.foi = 8; cfg.t_ftimwin = 4./cfg.foi; % 4 cycles per frequency stsConvol = ft_spiketriggeredspectrum(cfg, data_all); tfr4 = ft_spiketriggeredspectrum_stat(cfgTfr,stsConvol); end if Example5 cfg.t_ftimwin = 8./cfg.foi; % 8 cycles per frequency, also try 16 cycles end I apologize in advance as I am very new to dsp and suspect my problems may be related to my own ignorance and lack of understanding of the principles and not just fieldtrip usage, so if anyone can make sense out of this much too lengthy post I would greatly appreciate any guidance! Thanks. Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Mon Nov 19 22:16:09 2012 From: luke.bloy at gmail.com (Luke Bloy) Date: Mon, 19 Nov 2012 16:16:09 -0500 Subject: [FieldTrip] reading neuromag Polhemous data Message-ID: <50aaa19a.241f340a.2186.ffffe658@mx.google.com> Hi I'd like to be able to read in the polhemous digitized data that is stored in the fif files alongside the functional data. Has anyone done this? Thanks Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Tue Nov 20 17:10:24 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Tue, 20 Nov 2012 17:10:24 +0100 (CET) Subject: [FieldTrip] ICA decomposition & backprojection In-Reply-To: <36E953F5321EB743AC6B338995A56D63250662@UM-EXCDAG-A01.um.gwdg.de> Message-ID: <88f2a9a2-4d3b-4980-912c-0e90ecf3fa6f@thalamus_p> Dear Patrick, I just stumbled across your post from a while ago. Since I am far from being an expert, take anything I say with a grain of salt. If you reject components in your raw data at MEG sensor level with ICA what will happen is that you will end up with a rank deficient covariance matrix. Assuming that you you reject 3 components, your matrix will have a rank of N-3, instead of N (because you just lost 3 linear independent components), where N is the number of linearly independent time series in your channel x time matrix. So instead of having a Nx3 leadfield matrix, you end up with a N-3x3 leadfield matrix. However, since the inverse problem is anyways heavily underdetermined (ie the number of sensors is way smaller than the possible number of dipoles), this shouldn't matter much as long as you keep the number of components down to a few (eg ECG and EOG). For example rejecting n = 100 components would results in a rank N-100, which I guess could cause some troubles. So my advice would be to keep the number of rejected IC components to a strict minimum (eg 1 or 2 ECG components and 1 or 2 EOG components). You should also compare the results of your beamformer with and without ICA cleaning to see any changes related to the ICA application. Best wishes, Fred ----- Original Message ----- From: "Patrick Jung" To: fieldtrip at science.ru.nl Sent: Wednesday, November 14, 2012 6:24:32 PM Subject: [FieldTrip] ICA decomposition & backprojection Dear Fieldtrippers, if I do ICA in my preprocessing to reject EOG and ECG signals, the new MEG guidelines say that this might alter later source reconstruction and connectivity analyses (which I aim to do). So, worried about this, I wonder if applying ft_rejectcomponent on my raw dataset 1.) automatically modifies the leadfield matrix? 2.) the unmixing (and mixing?) matrix is saved in the new data structure somewhere (to evtl make use of it at later analysis steps)? 3.) automatically stores the information how many and what ICA components were subtracted from the data in my new data structure. Would you generally discourage to apply ICA in the preprocessing when planning source reconstruction and connectivity analysis? It’s a complicated topic for me as a clinician so I hope there is no mixing in my questions ;-) Many thanks for your answers, Patrick _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From liad.glz at gmail.com Wed Nov 21 07:01:56 2012 From: liad.glz at gmail.com (liad glz) Date: Tue, 20 Nov 2012 22:01:56 -0800 Subject: [FieldTrip] Can I use FieldTrip plotting on an existing data? Message-ID: I have two matrices that include EEG data for two experimental conditions (channelsXtimepointsXsubjects). The data has already been preprocessed. I would like to use FieldTrip in order to plot topographic maps for the difference between the conditions, and I see that the function requires many input variables that were manufactured by the previous functions in FieldTrip. Does that mean that I cannot use a function without running all the previous ones on the raw data? Many thanks Liad -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Nov 21 08:46:22 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 21 Nov 2012 08:46:22 +0100 Subject: [FieldTrip] Can I use FieldTrip plotting on an existing data? In-Reply-To: References: Message-ID: Dear Liad, FieldTrip data structures are just Matlab structures, so with some custom Matlab code you should be able to convert any arbitrary data matrix into FT style. The data you have resembles the output of FT's ft_timelockgrandaverage function, with keepindividual='yes' specified. It should look something like this to be compatible with FT: data = label: {152x1 cell} % channel labels avg: [152x900 double] % grand average, chanXtime var: [152x900 double] % variance, chanXtime time: [1x900 double] % time axis, in seconds individual: [10x152x900 double] % subjXchanXtime, individual averages dimord: 'subj_chan_time' % keep as is, dimensionality ordering for the fields Alternatively, you could put the difference data in a 'simple' (single-subject) timelock data structure, which would also allow it to be plotted. This approach is probably the easiest, if all you want to use FT for is plotting the topography of difference. Have a look at http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_defined for how to create a simple timelock data structure. Best, Eelke On 21 November 2012 07:01, liad glz wrote: > I have two matrices that include EEG data for two experimental conditions > (channelsXtimepointsXsubjects). The data has already been preprocessed. I > would like to use FieldTrip in order to plot topographic maps for the > difference between the conditions, and I see that the function requires many > input variables that were manufactured by the previous functions in > FieldTrip. Does that mean that I cannot use a function without running all > the previous ones on the raw data? > > Many thanks > Liad > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From patrick.jung at esi-frankfurt.de Wed Nov 21 09:17:17 2012 From: patrick.jung at esi-frankfurt.de (Jung, Patrick) Date: Wed, 21 Nov 2012 08:17:17 +0000 Subject: [FieldTrip] ICA decomposition & backprojection In-Reply-To: <88f2a9a2-4d3b-4980-912c-0e90ecf3fa6f@thalamus_p> References: <36E953F5321EB743AC6B338995A56D63250662@UM-EXCDAG-A01.um.gwdg.de> <88f2a9a2-4d3b-4980-912c-0e90ecf3fa6f@thalamus_p> Message-ID: <36E953F5321EB743AC6B338995A56D63250C7A@UM-EXCDAG-A01.um.gwdg.de> Dear Fred, thanks for your reply and explanation. Your last sentence seems to be a good advice, although time-consuming. I will compare the results of beamforming with and without ICA cleaning. Best, Patrick -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Frederic Roux Sent: 20 November 2012 17:10 To: FieldTrip discussion list Subject: Re: [FieldTrip] ICA decomposition & backprojection Dear Patrick, I just stumbled across your post from a while ago. Since I am far from being an expert, take anything I say with a grain of salt. If you reject components in your raw data at MEG sensor level with ICA what will happen is that you will end up with a rank deficient covariance matrix. Assuming that you you reject 3 components, your matrix will have a rank of N-3, instead of N (because you just lost 3 linear independent components), where N is the number of linearly independent time series in your channel x time matrix. So instead of having a Nx3 leadfield matrix, you end up with a N-3x3 leadfield matrix. However, since the inverse problem is anyways heavily underdetermined (ie the number of sensors is way smaller than the possible number of dipoles), this shouldn't matter much as long as you keep the number of components down to a few (eg ECG and EOG). For example rejecting n = 100 components would results in a rank N-100, which I guess could cause some troubles. So my advice would be to keep the number of rejected IC components to a strict minimum (eg 1 or 2 ECG components and 1 or 2 EOG components). You should also compare the results of your beamformer with and without ICA cleaning to see any changes related to the ICA application. Best wishes, Fred ----- Original Message ----- From: "Patrick Jung" To: fieldtrip at science.ru.nl Sent: Wednesday, November 14, 2012 6:24:32 PM Subject: [FieldTrip] ICA decomposition & backprojection Dear Fieldtrippers, if I do ICA in my preprocessing to reject EOG and ECG signals, the new MEG guidelines say that this might alter later source reconstruction and connectivity analyses (which I aim to do). So, worried about this, I wonder if applying ft_rejectcomponent on my raw dataset 1.) automatically modifies the leadfield matrix? 2.) the unmixing (and mixing?) matrix is saved in the new data structure somewhere (to evtl make use of it at later analysis steps)? 3.) automatically stores the information how many and what ICA components were subtracted from the data in my new data structure. Would you generally discourage to apply ICA in the preprocessing when planning source reconstruction and connectivity analysis? It’s a complicated topic for me as a clinician so I hope there is no mixing in my questions ;-) Many thanks for your answers, Patrick _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jan.schoffelen at donders.ru.nl Wed Nov 21 09:30:40 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 21 Nov 2012 09:30:40 +0100 Subject: [FieldTrip] ICA decomposition & backprojection In-Reply-To: <36E953F5321EB743AC6B338995A56D63250662@UM-EXCDAG-A01.um.gwdg.de> References: <36E953F5321EB743AC6B338995A56D63250662@UM-EXCDAG-A01.um.gwdg.de> Message-ID: Hi Patrick, > 1.) automatically modifies the leadfield matrix? No, not automatically. However, if you construct the leadfields, and use the grad-structure from the ICA-cleaned data, then you should be fine, because the subspace projection is applied both to the time courses and to the gradiometer description. > 2.) the unmixing (and mixing?) matrix is saved in the new data structure somewhere (to evtl make use of it at later analysis steps)? No, the unmixing and mixing matrices are stored in the comp-structure, which you obtain after ft_componentanalysis. They are not passed on to data structures obtained from processing steps downstream. If you want to keep track of this, you should save the comp-structure, or at least the mixing and unmixing matrices (along with the topolabel and label fields). The component time courses are to some extent redundant, because these can be easily computed from the data. > 3.) automatically stores the information how many and what ICA components were subtracted from the data in my new data structure. Yes, this info is stored in data.cfg.component, where data is the output structure after calling ft_rejectcomponent. > Would you generally discourage to apply ICA in the preprocessing when planning source reconstruction and connectivity analysis? No, I wouldn't. Yet it should be applied with care, and I would indeed check the results of the analysis pipeline with and without ICA-cleaning. Cheers, JM Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrick.jung at esi-frankfurt.de Wed Nov 21 09:43:21 2012 From: patrick.jung at esi-frankfurt.de (Jung, Patrick) Date: Wed, 21 Nov 2012 08:43:21 +0000 Subject: [FieldTrip] ICA decomposition & backprojection In-Reply-To: References: <36E953F5321EB743AC6B338995A56D63250662@UM-EXCDAG-A01.um.gwdg.de> Message-ID: <36E953F5321EB743AC6B338995A56D63250CA0@UM-EXCDAG-A01.um.gwdg.de> Thanks, Jan-Mathijs! Your answers made things much clearer to me. Best, Patrick From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of jan-mathijs schoffelen Sent: 21 November 2012 09:31 To: FieldTrip discussion list Subject: Re: [FieldTrip] ICA decomposition & backprojection Hi Patrick, 1.) automatically modifies the leadfield matrix? No, not automatically. However, if you construct the leadfields, and use the grad-structure from the ICA-cleaned data, then you should be fine, because the subspace projection is applied both to the time courses and to the gradiometer description. 2.) the unmixing (and mixing?) matrix is saved in the new data structure somewhere (to evtl make use of it at later analysis steps)? No, the unmixing and mixing matrices are stored in the comp-structure, which you obtain after ft_componentanalysis. They are not passed on to data structures obtained from processing steps downstream. If you want to keep track of this, you should save the comp-structure, or at least the mixing and unmixing matrices (along with the topolabel and label fields). The component time courses are to some extent redundant, because these can be easily computed from the data. 3.) automatically stores the information how many and what ICA components were subtracted from the data in my new data structure. Yes, this info is stored in data.cfg.component, where data is the output structure after calling ft_rejectcomponent. Would you generally discourage to apply ICA in the preprocessing when planning source reconstruction and connectivity analysis? No, I wouldn't. Yet it should be applied with care, and I would indeed check the results of the analysis pipeline with and without ICA-cleaning. Cheers, JM Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mengtongxiao at gmail.com Wed Nov 21 08:20:08 2012 From: mengtongxiao at gmail.com (=?GB2312?B?s8LRqQ==?=) Date: Wed, 21 Nov 2012 15:20:08 +0800 Subject: [FieldTrip] help Message-ID: Dear all, I am a new user.I want to know if I use it to compute inverse source in cortex,how can i know where are the bordmann ares in source space,in order to compute function connectivity ? thanks a lot, tongxiao -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Wed Nov 21 11:30:50 2012 From: polomacnenad at gmail.com (Nenad Polomac) Date: Wed, 21 Nov 2012 11:30:50 +0100 Subject: [FieldTrip] ft_freqstatistics tutorial question Message-ID: Dear all, I have one doubt. I want to calculate ft_freqstatistics on my MEG date obtained form ft_freqanalysis. However, I see now in ft_freqstatistics tutorial that you suggest that operation should be done on planar gradient data. So, the first ft_megplanar and then ft_freqanalysis, ft_combineplanar and ft_freqstatistics. My question is, does this step of calculating planar gradients for time frequency analysis is necessary or not? Could I apply statistic on the data from ft_freqanalysis without any involvement of planar gradients calculation. Thank you in advance! All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Nov 21 12:47:25 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 21 Nov 2012 12:47:25 +0100 Subject: [FieldTrip] ft_freqstatistics tutorial question In-Reply-To: References: Message-ID: Dear Nenad, Strictly speaking, planar gradient transformation is not necessary, so you can just skip those steps if you really want to. However, if you have axial gradiometer data (as I seem to recall from your earlier posts) and want to do TF-analysis and -statistics on sensor level, I would strongly recommend applying a planar gradient transformation. Axial gradiometer data will produce maximal deflections (of opposite polarity) on both sides of a current dipole, while planar gradiometer data produces a positive maximum exactly above the source. If you apply TF-analysis to axial gradiometer data, you will get two spatially separated 'blobs' where there was only a single oscillating dipole in the brain. If you look at power (as is typically done), you will lose the polarity information, and hence interpreting the power topography in terms of brain is nearly impossible with axial gradient data. Best, Eelke On 21 November 2012 11:30, Nenad Polomac wrote: > Dear all, > > I have one doubt. I want to calculate ft_freqstatistics on my MEG date > obtained form ft_freqanalysis. However, I see now in ft_freqstatistics > tutorial that you suggest that operation should be done on planar gradient > data. So, the first ft_megplanar and then ft_freqanalysis, ft_combineplanar > and ft_freqstatistics. My question is, does this step of calculating planar > gradients for time frequency analysis is necessary or not? Could I apply > statistic on the data from ft_freqanalysis without any involvement of planar > gradients calculation. > Thank you in advance! > > All the best! > > Nenad > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Wed Nov 21 14:37:54 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 21 Nov 2012 14:37:54 +0100 Subject: [FieldTrip] help In-Reply-To: References: Message-ID: <50ACD932.4080109@donders.ru.nl> Dear tongxiao, You need to specify an atlas, which will work as a look-up table. When calling ft_sourceplot you need to specify cfg.atlas and point to an atlas file on your harddrive, please have a look here: http://fieldtrip.fcdonders.nl/faq/how_can_i_determine_the_anatomical_label_of_a_source?s[]=atlas Alternatively, you can look up the coordinates manually, e.g. sourceplot in interactive mode allows you to click on a location, and it will return the coordinates in a particular coordinate system (depends on what you put in, could be MNI). Best, Jörn On 11/21/2012 8:20 AM, ?? wrote: > Dear all, > I am a new user.I want to know if I use it to compute inverse source > in cortex,how can i know where are the bordmann ares in source > space,in order to compute function connectivity ? > thanks a lot, > tongxiao > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Wed Nov 21 14:39:56 2012 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Wed, 21 Nov 2012 07:39:56 -0600 Subject: [FieldTrip] help Message-ID: Hello Tongxiao, If you're using your own MR images for source estimation, then you will have had to process the images in Freesurfer before you used Fieldtrip to estimate the sources (see http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate). When you do the segmentation in Freesurfer, you can do an automatic cortical parcellation (http://surfer.nmr.mgh.harvard.edu/fswiki/CorticalParcellation) which will divide the brain up into known regions based on anatomical landmarks; many of these correspond to Brodmann areas. Best, Steve Message: 2 > Date: Wed, 21 Nov 2012 15:20:08 +0800 > From: ?? > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] help > Message-ID: > < > CADiddyVebZ3FCvMqk4J6NymniPrqJaiBHB4nh5zeWCKcNSMSew at mail.gmail.com> > Content-Type: text/plain; charset="gb2312" > > Dear all? > > > I am a new user.I want to know if I use it to compute inverse source in > cortex,how can i know where are the bordmann ares in source space,in order > to compute function connectivity ? > > thanks a lot, > tongxiao > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Nov 21 14:55:10 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 21 Nov 2012 14:55:10 +0100 Subject: [FieldTrip] help In-Reply-To: <50ACD932.4080109@donders.ru.nl> References: <50ACD932.4080109@donders.ru.nl> Message-ID: <50ACDD3E.5050801@donders.ru.nl> of course my answer is only valid when you normalized the brain to a template (and use an atlas that is associated with that template). Pretty sure that Stephen is right in case you are using Freesurfer ;) On 11/21/2012 2:37 PM, "Jörn M. Horschig" wrote: > Dear tongxiao, > > You need to specify an atlas, which will work as a look-up table. When > calling ft_sourceplot you need to specify cfg.atlas and point to an > atlas file on your harddrive, please have a look here: > http://fieldtrip.fcdonders.nl/faq/how_can_i_determine_the_anatomical_label_of_a_source?s[]=atlas > > Alternatively, you can look up the coordinates manually, e.g. > sourceplot in interactive mode allows you to click on a location, and > it will return the coordinates in a particular coordinate system > (depends on what you put in, could be MNI). > > Best, > Jörn > > On 11/21/2012 8:20 AM, ?? wrote: >> Dear all, >> I am a new user.I want to know if I use it to compute inverse source >> in cortex,how can i know where are the bordmann ares in source >> space,in order to compute function connectivity ? >> thanks a lot, >> tongxiao >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail:jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web:http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From ipeiker at uke.de Wed Nov 21 23:37:08 2012 From: ipeiker at uke.de (Ina Peiker) Date: Wed, 21 Nov 2012 23:37:08 +0100 Subject: [FieldTrip] ft_sourcestatistics across time and frequency Message-ID: <50AD5794.2060405@uke.de> Dear fieldtrip users, is there a possibility to perform a cluster-permutation-test on source data across time and frequency, so that clusters are connected not only spatially but also in the time and frequency domain? I did a source reconstruction (beamforming) without selecting a time point or frequency (more exploratively) and now I want to do an explorative statistic across all data. It looks like that: output from ft_sourcegrandaverage for 1 time point and 1 frequency: gm = pos: [6783x3 double] dim: [17 21 19] avg: [1x1 struct] var: [1x1 struct] dimord: 'voxel' trial: [1x40 struct] inside: [3394x1 double] outside: [3389x1 double] df: [6783x1 double] cfg: [1x1 struct] Now, I would like to use ft_sourcestatitistics with a cluster-permuation-test for more than 1 time point and 1 frequency. I tried to concatenate data by increasing dimensions in gm.trial.pow but it did not work. Is something like this implemented for source data? Any other ideas? Thank you very much! Ina -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Martin Zeitz (Vorsitzender), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus From f.roux at bcbl.eu Thu Nov 22 14:19:45 2012 From: f.roux at bcbl.eu (Frederic Roux) Date: Thu, 22 Nov 2012 14:19:45 +0100 (CET) Subject: [FieldTrip] planar gradients In-Reply-To: Message-ID: Dear all, I would like to follow up this post with another question related to the planar gradients. I am working on data aquired with a CTF 275 system but at the time of the acquisition there was a number of sensors that were broken. So I end up with n = 258 channels. After running the ft_megplanar function I get n = 516 channels. However, if I try to combine the gradients with ft_combineplanar I get an error saying that I am not providing ctf275_planar but ctf275 data. Is the fact that I do not have n = 275 sensors but 258 confusing the ft_combineplanar function, or is this related to something else? Best, Fred ----- Original Message ----- From: "Eelke Spaak" To: "FieldTrip discussion list" Sent: Wednesday, November 21, 2012 12:47:25 PM Subject: Re: [FieldTrip] ft_freqstatistics tutorial question Dear Nenad, Strictly speaking, planar gradient transformation is not necessary, so you can just skip those steps if you really want to. However, if you have axial gradiometer data (as I seem to recall from your earlier posts) and want to do TF-analysis and -statistics on sensor level, I would strongly recommend applying a planar gradient transformation. Axial gradiometer data will produce maximal deflections (of opposite polarity) on both sides of a current dipole, while planar gradiometer data produces a positive maximum exactly above the source. If you apply TF-analysis to axial gradiometer data, you will get two spatially separated 'blobs' where there was only a single oscillating dipole in the brain. If you look at power (as is typically done), you will lose the polarity information, and hence interpreting the power topography in terms of brain is nearly impossible with axial gradient data. Best, Eelke On 21 November 2012 11:30, Nenad Polomac wrote: > Dear all, > > I have one doubt. I want to calculate ft_freqstatistics on my MEG date > obtained form ft_freqanalysis. However, I see now in ft_freqstatistics > tutorial that you suggest that operation should be done on planar gradient > data. So, the first ft_megplanar and then ft_freqanalysis, ft_combineplanar > and ft_freqstatistics. My question is, does this step of calculating planar > gradients for time frequency analysis is necessary or not? Could I apply > statistic on the data from ft_freqanalysis without any involvement of planar > gradients calculation. > Thank you in advance! > > All the best! > > Nenad > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From m.lizarazu at bcbl.eu Thu Nov 22 14:21:01 2012 From: m.lizarazu at bcbl.eu (Mikel Lizarazu) Date: Thu, 22 Nov 2012 14:21:01 +0100 (CET) Subject: [FieldTrip] headshape realigment Message-ID: <87e6f8bd-38ea-49fe-8468-d50c42496896@thalamus_p> Dear Fieldtrippers, I am working with MEG data from Elekta and T1 images. I am realigning MEG data with T1 images using ft_volumerealign function selecting N,LPA,RPA points. However, I would like to know if there is a possibility to also include the headshape information (isotrak data) in the realignment to obtain a better final result. Many thanks for your answers, Patrick -- Mikel Lizarazu Predoctoral researcher www.bcbl.eu -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at mac.com Thu Nov 22 14:39:19 2012 From: nathanweisz at mac.com (Nathan Weisz) Date: Thu, 22 Nov 2012 14:39:19 +0100 Subject: [FieldTrip] headshape realigment In-Reply-To: <87e6f8bd-38ea-49fe-8468-d50c42496896@thalamus_p> References: <87e6f8bd-38ea-49fe-8468-d50c42496896@thalamus_p> Message-ID: <7ADB9F95-9DA9-4C05-8D12-D2988A4BD056@mac.com> Dear Mikel, see attached file. basically this function segments the fiducial-based-coregistered MR and alters the transformation-matrix to best fit the headshape in a least-squares sense. in practice, if your first coregistration was not too terrible this works quite fine. you can remove some very outlying headshape points as well. see some docs here: https://wiki.cimec.unitn.it/tiki-index.php?page=MRICoreg some steps are quite lengthy (segmentation) and coded in frankenstein-style (i.e. mostly by me). so if you have improvements on the code, we would be happy to get them as well. ciao, nathan On 22.11.2012, at 14:21, Mikel Lizarazu wrote: > Dear Fieldtrippers, > I am working with MEG data from Elekta and T1 images. > I am realigning MEG data with T1 images using ft_volumerealign function selecting N,LPA,RPA points. However, I would like to know if there is a possibility to also include the headshape information (isotrak data) in the realignment to obtain a better final result. > Many thanks for your answers, > Patrick > > -- > Mikel Lizarazu > Predoctoral researcher > www.bcbl.eu > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cimec_coregister.m Type: application/octet-stream Size: 4166 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From max-philipp.stenner at med.ovgu.de Thu Nov 22 19:36:59 2012 From: max-philipp.stenner at med.ovgu.de (Stenner, Max-Philipp) Date: Thu, 22 Nov 2012 18:36:59 +0000 Subject: [FieldTrip] planar gradients In-Reply-To: <4346_1353591466_50AE2AAA_4346_214_1_a9f3579c-9269-4bfa-81b0-641f3c3c2a1e@thalamus_p> References: <4346_1353591466_50AE2AAA_4346_214_1_a9f3579c-9269-4bfa-81b0-641f3c3c2a1e@thalamus_p> Message-ID: Dear Fred, I encountered a similar problem with my CTF275 data and one broken sensor before ft_freqanalysis of the planar (uncombined) data. "Confirming" the channel type with data.grad.chantype = ft_senstype(data); solved the problem (although I have to admit that I never investigated where in the ft script the problem arose). Cheers, Max ________________________________________ Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Frederic Roux [f.roux at bcbl.eu] Gesendet: Donnerstag, 22. November 2012 14:19 Bis: FieldTrip discussion list Betreff: [FieldTrip] planar gradients Dear all, I would like to follow up this post with another question related to the planar gradients. I am working on data aquired with a CTF 275 system but at the time of the acquisition there was a number of sensors that were broken. So I end up with n = 258 channels. After running the ft_megplanar function I get n = 516 channels. However, if I try to combine the gradients with ft_combineplanar I get an error saying that I am not providing ctf275_planar but ctf275 data. Is the fact that I do not have n = 275 sensors but 258 confusing the ft_combineplanar function, or is this related to something else? Best, Fred ----- Original Message ----- From: "Eelke Spaak" To: "FieldTrip discussion list" Sent: Wednesday, November 21, 2012 12:47:25 PM Subject: Re: [FieldTrip] ft_freqstatistics tutorial question Dear Nenad, Strictly speaking, planar gradient transformation is not necessary, so you can just skip those steps if you really want to. However, if you have axial gradiometer data (as I seem to recall from your earlier posts) and want to do TF-analysis and -statistics on sensor level, I would strongly recommend applying a planar gradient transformation. Axial gradiometer data will produce maximal deflections (of opposite polarity) on both sides of a current dipole, while planar gradiometer data produces a positive maximum exactly above the source. If you apply TF-analysis to axial gradiometer data, you will get two spatially separated 'blobs' where there was only a single oscillating dipole in the brain. If you look at power (as is typically done), you will lose the polarity information, and hence interpreting the power topography in terms of brain is nearly impossible with axial gradient data. Best, Eelke On 21 November 2012 11:30, Nenad Polomac wrote: > Dear all, > > I have one doubt. I want to calculate ft_freqstatistics on my MEG date > obtained form ft_freqanalysis. However, I see now in ft_freqstatistics > tutorial that you suggest that operation should be done on planar gradient > data. So, the first ft_megplanar and then ft_freqanalysis, ft_combineplanar > and ft_freqstatistics. My question is, does this step of calculating planar > gradients for time frequency analysis is necessary or not? Could I apply > statistic on the data from ft_freqanalysis without any involvement of planar > gradients calculation. > Thank you in advance! > > All the best! > > Nenad > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Fri Nov 23 09:48:27 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 23 Nov 2012 09:48:27 +0100 Subject: [FieldTrip] planar gradients In-Reply-To: References: <4346_1353591466_50AE2AAA_4346_214_1_a9f3579c-9269-4bfa-81b0-641f3c3c2a1e@thalamus_p> Message-ID: Dear Fred and Max, This is a known bug in ft_senstype, and people are working on fixing it. See bugzilla: http://bugzilla.fcdonders.nl/show_bug.cgi?id=1288 . If you have anything to add to the bug reports over there, that could be helpful. For now, Max's workaround seems to do the trick. Best, Eelke On 22 November 2012 19:36, Stenner, Max-Philipp wrote: > Dear Fred, > > I encountered a similar problem with my CTF275 data and one broken sensor before ft_freqanalysis of the planar (uncombined) data. "Confirming" the channel type with > > data.grad.chantype = ft_senstype(data); > > solved the problem (although I have to admit that I never investigated where in the ft script the problem arose). > > Cheers, > Max > > ________________________________________ > Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Frederic Roux [f.roux at bcbl.eu] > Gesendet: Donnerstag, 22. November 2012 14:19 > Bis: FieldTrip discussion list > Betreff: [FieldTrip] planar gradients > > Dear all, > > I would like to follow up this post with another question > related to the planar gradients. > > I am working on data aquired with a CTF 275 system but at > the time of the acquisition there was a number of sensors > that were broken. > > So I end up with n = 258 channels. > > After running the ft_megplanar function I get n = 516 channels. > > However, if I try to combine the gradients with > ft_combineplanar > > I get an error saying that I am not providing ctf275_planar but > ctf275 data. > > Is the fact that I do not have n = 275 sensors but 258 confusing > the ft_combineplanar function, or is this related to something else? > > > Best, > > Fred > > ----- Original Message ----- > From: "Eelke Spaak" > To: "FieldTrip discussion list" > Sent: Wednesday, November 21, 2012 12:47:25 PM > Subject: Re: [FieldTrip] ft_freqstatistics tutorial question > > Dear Nenad, > > Strictly speaking, planar gradient transformation is not necessary, so > you can just skip those steps if you really want to. However, if you > have axial gradiometer data (as I seem to recall from your earlier > posts) and want to do TF-analysis and -statistics on sensor level, I > would strongly recommend applying a planar gradient transformation. > > Axial gradiometer data will produce maximal deflections (of opposite > polarity) on both sides of a current dipole, while planar gradiometer > data produces a positive maximum exactly above the source. If you > apply TF-analysis to axial gradiometer data, you will get two > spatially separated 'blobs' where there was only a single oscillating > dipole in the brain. If you look at power (as is typically done), you > will lose the polarity information, and hence interpreting the power > topography in terms of brain is nearly impossible with axial gradient > data. > > Best, > Eelke > > On 21 November 2012 11:30, Nenad Polomac wrote: >> Dear all, >> >> I have one doubt. I want to calculate ft_freqstatistics on my MEG date >> obtained form ft_freqanalysis. However, I see now in ft_freqstatistics >> tutorial that you suggest that operation should be done on planar gradient >> data. So, the first ft_megplanar and then ft_freqanalysis, ft_combineplanar >> and ft_freqstatistics. My question is, does this step of calculating planar >> gradients for time frequency analysis is necessary or not? Could I apply >> statistic on the data from ft_freqanalysis without any involvement of planar >> gradients calculation. >> Thank you in advance! >> >> All the best! >> >> Nenad >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From liad.glz at gmail.com Fri Nov 23 21:58:38 2012 From: liad.glz at gmail.com (liad glz) Date: Fri, 23 Nov 2012 12:58:38 -0800 Subject: [FieldTrip] Can I use FieldTrip plotting on an existing data? In-Reply-To: References: Message-ID: Dear Eelke, Thank you for your reply. It was indeed the answer I was hoping to get. I still have some questions about the variables though: 1. When you refer to 'var', do you mean SDs? SEs? some other measure of variance that I should calculate? 2. In the webpage you referred me to, i saw that I should also define "dof"; I gather that in the case of average across subjects, this refers to the number of subjects. Then, it will be a matrix of CHANxTIME, where all values are identical to the number of subjects. Is this correct? 3. What about the grad & cfg fields? How should I generate these? Many thanks again for your help Liad On Tue, Nov 20, 2012 at 11:46 PM, Eelke Spaak wrote: > Dear Liad, > > FieldTrip data structures are just Matlab structures, so with some > custom Matlab code you should be able to convert any arbitrary data > matrix into FT style. The data you have resembles the output of FT's > ft_timelockgrandaverage function, with keepindividual='yes' specified. > It should look something like this to be compatible with FT: > > data = > > label: {152x1 cell} % channel labels > avg: [152x900 double] % grand average, chanXtime > var: [152x900 double] % variance, chanXtime > time: [1x900 double] % time axis, in seconds > individual: [10x152x900 double] % subjXchanXtime, individual averages > dimord: 'subj_chan_time' % keep as is, dimensionality ordering > for the fields > > Alternatively, you could put the difference data in a 'simple' > (single-subject) timelock data structure, which would also allow it to > be plotted. This approach is probably the easiest, if all you want to > use FT for is plotting the topography of difference. Have a look at > > http://fieldtrip.fcdonders.nl/faq/how_are_the_various_data_structures_defined > for how to create a simple timelock data structure. > > Best, > Eelke > > On 21 November 2012 07:01, liad glz wrote: > > I have two matrices that include EEG data for two experimental conditions > > (channelsXtimepointsXsubjects). The data has already been preprocessed. I > > would like to use FieldTrip in order to plot topographic maps for the > > difference between the conditions, and I see that the function requires > many > > input variables that were manufactured by the previous functions in > > FieldTrip. Does that mean that I cannot use a function without running > all > > the previous ones on the raw data? > > > > Many thanks > > Liad > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Sun Nov 25 16:04:09 2012 From: t.marshall at fcdonders.ru.nl (Tom Marshall) Date: Sun, 25 Nov 2012 16:04:09 +0100 Subject: [FieldTrip] ft_channelrepair with channel absent from data Message-ID: <50B23369.5020105@fcdonders.ru.nl> Hi Trippers, I'm having some difficulty reinterpolating some missing channels in my ctf275 data. These are 2 channels that were never recorded because the sensors in question were switched off. Luckily, in the documentation for ft_channelrepair I find: "*For reconstructing channels that are absent in your data*, please define your neighbours by setting cfg.method='template' and call FT_PREPARE_NEIGHBOURS *without* the data argument: cfg.neighbours = ft_prepare_neighbours(cfg); This will include channels that are missing in your in the neighbour-definition." I dutifully define such a neighbours structure: /cfg=[]// //cfg.method='template';// //cfg.template='CTF275_neighb.mat';// //n=ft_prepare_neighbours(cfg);/ This structure of course contains all 275 MEG channels, including the ones that are missing from my data. So I try to reinterpolate: / //% get the 'full' list of channel names// //for i=1:length(n)// // allchans{i,:}=n(i).label;// //end// // //% find the names of the channels that were not recorded// //missingchans=setdiff(allchans,data.label);// // //% repair// //cfg=[];// //cfg.missingchannel=missingchans;// //cfg.neighbours=n;// //cfg.method='spline';// //data_r=ft_channelrepair(cfg,data);/ this fails with: /??? Error using ==> minus// //Matrix dimensions must agree.// // //Error in ==> ft_channelrepair at 279// // d = sens.chanpos - repmat(c, numel(sensidx), 1);/ length(sensidx) is 301 and length(sens.chanpos) is 273, so the error makes sense. However at this point I get a bit stuck as 'sens' is created in line 104-108 by the function 'ft_fetch_sens' which I can't find! 'help ft_fetch_sens', 'which ft_fetch_sens' and 'edit ft_fetch_sens' all fail. I guess I have several questions all at once: 1) Is it actually possible to reinterpolate MEG channels that were never recorded - eg because the channels were deactivated when the acquisition took place? 2) What might be causing the error I'm seeing? 3) Where is ft_fetch_sens? Thanks for help with any of the above! Best, Tom -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Nov 26 10:45:55 2012 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 26 Nov 2012 10:45:55 +0100 Subject: [FieldTrip] ft_channelrepair with channel absent from data In-Reply-To: <50B23369.5020105@fcdonders.ru.nl> References: <50B23369.5020105@fcdonders.ru.nl> Message-ID: <50B33A53.2000701@donders.ru.nl> Hey Tom, > > I guess I have several questions all at once: > 1) Is it actually possible to reinterpolate MEG channels that were > never recorded - eg because the channels were deactivated when the > acquisition took place? Should work, but only with the SSI (=spherical spline interpolation) method. For the nearest neighbour interpolation, the function constructs a list of neuighbouring and constructs a weighted average. The function, however, wants to weigh each sensor according to its distance from the sensor to be reconstructed. That information can only be found in the grad structure, but in the grad structure there are only sensors which were recorded, thus the distance from a missing sensor cannot be measured because its position is missing in the grad structure. SSI should work though, cause it relies on a different rationale. > 2) What might be causing the error I'm seeing? Since you have 301 channels rather than 275, my suspicion is that you include reference gradiometers. This should not fail in principle, though... maybe I can drop by your office to check it out? Got some time right now? > 3) Where is ft_fetch_sens? It's a private function, can be found in FieldTrip/private. You have to cd to that directory in order for Matlab to find it (the idea behind private function is that there are only visible for higher-level function and 'hidden' for all other functions). Best, Jörn > > Thanks for help with any of the above! > Best, > Tom > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email:t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at gmail.com Mon Nov 26 10:56:17 2012 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Mon, 26 Nov 2012 10:56:17 +0100 Subject: [FieldTrip] ft_channelrepair with channel absent from data In-Reply-To: <50B23369.5020105@fcdonders.ru.nl> References: <50B23369.5020105@fcdonders.ru.nl> Message-ID: Hi Tom and Trippers, To add to Jorn's more detailed answer, if you are ever in doubt as to where to find a FT function, which may be hidden in a private directory (and don't know which of the many private directories to search in), then remember that you can always search for functions on the google FT code page, which doesn't hide the private functions! http://code.google.com/p/fieldtrip/source/browse/ and after searching for ft_fetch_sens http://code.google.com/p/fieldtrip/source/search?q=ft_fetch_sens&origq=ft_fetch_sens&btnG=Search+Trunk Johanna 2012/11/25 Tom Marshall > Hi Trippers, > > I'm having some difficulty reinterpolating some missing channels in my > ctf275 data. These are 2 channels that were never recorded because the > sensors in question were switched off. > > Luckily, in the documentation for ft_channelrepair I find: > > "*For reconstructing channels that are absent in your data*, please > define your neighbours by setting cfg.method='template' and call > FT_PREPARE_NEIGHBOURS *without* the data argument: > cfg.neighbours = ft_prepare_neighbours(cfg); > This will include channels that are missing in your in the > neighbour-definition." > > I dutifully define such a neighbours structure: > > *cfg=[]** > **cfg.method='template';** > **cfg.template='CTF275_neighb.mat';** > **n=ft_prepare_neighbours(cfg);* > > This structure of course contains all 275 MEG channels, including the ones > that are missing from my data. > > So I try to reinterpolate: > * > **% get the 'full' list of channel names** > **for i=1:length(n)** > ** allchans{i,:}=n(i).label;** > **end** > ** > **% find the names of the channels that were not recorded** > **missingchans=setdiff(allchans,data.label);** > ** > **% repair** > **cfg=[];** > **cfg.missingchannel=missingchans;** > **cfg.neighbours=n;** > **cfg.method='spline';** > **data_r=ft_channelrepair(cfg,data);* > > this fails with: > > *??? Error using ==> minus** > **Matrix dimensions must agree.** > ** > **Error in ==> ft_channelrepair at 279** > ** d = sens.chanpos - repmat(c, numel(sensidx), 1);* > > length(sensidx) is 301 and length(sens.chanpos) is 273, so the error makes > sense. However at this point I get a bit stuck as 'sens' is created in line > 104-108 by the function 'ft_fetch_sens' which I can't find! 'help > ft_fetch_sens', 'which ft_fetch_sens' and 'edit ft_fetch_sens' all fail. > > I guess I have several questions all at once: > 1) Is it actually possible to reinterpolate MEG channels that were never > recorded - eg because the channels were deactivated when the acquisition > took place? > 2) What might be causing the error I'm seeing? > 3) Where is ft_fetch_sens? > > Thanks for help with any of the above! > Best, > Tom > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.chait at ucl.ac.uk Mon Nov 26 13:56:06 2012 From: m.chait at ucl.ac.uk (Chait, Maria) Date: Mon, 26 Nov 2012 12:56:06 +0000 Subject: [FieldTrip] PhD Position at UCL Ear Institute Message-ID: <3BA3DF582C0B7542AE0CB625F0119AB816FC90CF@AMSPRD0104MB100.eurprd01.prod.exchangelabs.com> Dear Colleagues, I am writing to point your attention to PhD studentship (available for an immediate start) opening at the UCL Ear Institute and would be grateful if you could distribute the advert to relevant members of your institution. A 3 year PhD studentship in auditory cognitive neuroscience is available as part of a research collaboration between the UCL Ear Institute (London, UK) and NTT Communication Science Labs (Nippon Telegraph and Telephone corporation, Atsugi, Japan). The student will be based at the UCL Ear Institute and supervised by Dr. Maria Chait. They will also be working with Prof. Makio Kashino and Dr. Shigeto Furukawa (NTT) and the research program will involve experiments conducted both at UCL and in Japan, requiring occasional travel. The project will use psychophysics, eye tracking, autonomic response measures and MEG functional brain imaging to investigate which features of sound are perceptually salient. Namely, those sounds that automatically capture attention in a busy scene, even when listeners' initial perceptual focus is elsewhere. The UCL Ear Institute provides state-of-the-art research facilities across a wide range of disciplines and is one of the foremost centres for hearing, speech and language-related research within Europe. Key Requirements The position is only available for UK/EU passport holders. Applicants should hold a 1St class, or upper 2nd bachelor's degree (masters degree an advantage) in an engineering or scientific subject. Previous experience with auditory research, functional brain imaging, neuroscience and/or acoustics is desirable. For an informal discussion, or to submit an application please contact Dr. Maria Chait (m.chait at ucl.ac.uk). Applicants should submit a supporting statement, a CV, and the details of two recommenders. Application review begins December 2012 and will continue until the position is filled. The studentship includes fees and a yearly stipend (about £16000; tax free). Maria Chait PhD m.chait at ucl.ac.uk Senior Lecturer UCL Ear Institute 332 Gray's Inn Road London WC1X 8EE -------------- next part -------------- An HTML attachment was scrubbed... URL: From elilife at gmail.com Mon Nov 26 14:38:04 2012 From: elilife at gmail.com (Eliana Garcia) Date: Mon, 26 Nov 2012 14:38:04 +0100 Subject: [FieldTrip] source statistics on event related data Message-ID: Hello Dear Fieldtrip Developers and users, I would like to know if somebody has done before a source statistic analysis on event related potentials from the output of LCMV beamformer. I have some issues with the compatibility of the cfg.parameter =''avg.mom', since it is a cell structure and the functions for grand average and source statistics works normally for double matrixes. I wonder if there is a way to deal with this (not making arranges on the functions or transforming my data to the format m=sourceFIC.avg.pow(voxels,time) double. I would also like to know how to deal with the parameters for source statistics on event related fields (such as: cfg.latency). Thanks a lot! -- Eliana García Cossio Applied Neurotechnology Lab. Graduate School of Neural and Behavioural Science - Max Planck Research School Institute of Medical Psychology and Behavioural Neurobiology Universität Tübingen (+0049) 01 577-8587604 Otfried-Müller-Str. 47, 72076 Tübingen- Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From Daniel.Keeser at med.uni-muenchen.de Mon Nov 26 15:39:04 2012 From: Daniel.Keeser at med.uni-muenchen.de (Keeser, Daniel Dr.) Date: Mon, 26 Nov 2012 15:39:04 +0100 Subject: [FieldTrip] Job offer: Simultaneous EEG and fMRI of neurofeedback In-Reply-To: <36335A466E9D6641BC7260D521A9164A7512FBE3D6@MITEX03N.helios.med.uni-muenchen.de> References: <36335A466E9D6641BC7260D521A9164A7512FBE3D3@MITEX03N.helios.med.uni-muenchen.de>, <36335A466E9D6641BC7260D521A9164A7512FBE3D6@MITEX03N.helios.med.uni-muenchen.de> Message-ID: <36335A466E9D6641BC7260D521A9164A7512FBE3D8@MITEX03N.helios.med.uni-muenchen.de> Simultaneous EEG and fMRI of neurofeedback We are seeking a motivated candidate to support the experimatal set-up, data acquistion and data analysis. The primary objective is to develop a protocol to effectively train electroencephalography (EEG) coherence between specific areas in the brain during the simultaneous recording of functional magnetic resonance imaging (fMRI) protocols. The simultaneous recording and analysis of EEG and fMRI allows to non-invasively gain new insights into brain function. Unlike the post-hoc comparison of different research methods, simultaneous measurements of EEG and fMRI offer the possibility to obtain brain functional data during the same sensory stimulation in EEG and fMRI. The two methods are complementary with respect to the temporal and spatial resolution. The results of previous studies about simultaneous EEG-fMRI indicate that EEG neurofeedback is technically feasible with an appropriate EEG data quality. Additionally, simultaneous functional connectivity MRI (fcMRI) and EEG recordings will provide new insights into the relationship between fcMRI- and associated EEG networks. The change of EEG signals through neurofeedback could lead to an immediate change in fcMRI as specific EEG frequency bands correlate with the fcMRI. Accordingly, the modulation of the EEG by neurofeedback may show a direct influence on the fcMRI. Studies will include simultaneous measurements of fcMRI and EEG with healthy volunteers and offer the opportunity to gain experience in a wide range of methodologies. In our lab we have two BrainAmp MR 32 channles amplifiers (Brain Products) and we succesfully use online correction of MR artifacts. Using this approach, we are able to give feedback to the subjects regarding their own EEG with a time delay of about 1s. We will use BCI2000 combined with Fieldtrip. Experience with BCI 2000 and/or Fieldtrip would be advantageous. Candidates should be well versed with MATLAB and should have at least basic knowledge in C#/C++. The MRi data is acquired using a 3T Siemens MR scanner. The successful applicant will have a strong interest in the research topic and will be capable of working independently. The research fellow will additionally have a master degree (or diploma) in biomedical engineering, neuroscience, informatics or psychology. Experience with fMRI and/or EEG are beneficial. The initial appointment term will be one year, starting January 2013. Salary is according to TV-L 13. Further extensions will depend on availability of funds. Please send an application letter including a brief statement outlining your motivation to apply for this particular position and a Curriculum vitae (CV) to: daniel.keeser at med.uni-muenchen.de Institute for Clinical Radiology, Ludwig-Maximilians-University, 81377 Munich, Germany. Department of Psychiatry and Psychotherapy, Ludwig-Maximilians University, 80333 Munich, Germany. ____________________________________ Dr. Daniel Keeser Post-Doctoral Research Fellow Institute of Clinical Radiology Department of Psychiatry and Psychotherapy University Munich Studienzentrum CERES 80336 Munich, Germany phone: +49 89 5160 9109 fax.: +49 89 2000 87 60 710 email: daniel.keeser at med.uni-muenchen.de http://www.klinikum.uni-muenchen.de/interest-imaging/de/index.html From monikamellem at gmail.com Tue Nov 27 00:22:51 2012 From: monikamellem at gmail.com (Monika Mellem) Date: Mon, 26 Nov 2012 18:22:51 -0500 Subject: [FieldTrip] Coherence of single trials Message-ID: Dear Fieldtrippers, I am trying to calculate coherence estimates on individual trials of our EEG data and then want to perform a within-subjects statistical test, but so far I have not been able to figure out how to do this. I am able to calculate coherence for our 22 subjects and then perform statistics on the grand average, so I understand the basic usage of these functions (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, ft_freqstatistics). But now we want to do statistical testing on individual subjects. Is it possible to keep coherence for individual trials in Fieldtrip as they seem necessary for this statistical analysis? I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and get the cross-spectra of individual trials (I also tried computing the fourier spectra but it made no difference in the following step). However, when computing the coherence in ft_connectivityanalysis, Fieldtrip averages over the trials. Is there a way to output coherence for individual trials instead? Please see the full cfg structure settings below. Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as an input to ft_freqstatistics since previous posts suggested this was for single subject coherence statistics, but our data is paired as the same stimulus appears in the 2 conditions we are comparing. Is there a paired test for single subject coherence testing, or should we use cfg.statistic = 'depsamplesT'? Many thanks for any suggestions you may have! Monika ________________ Monika Mellem PhD Candidate Interdisciplinary Program in Neuroscience Georgetown University Washington, DC msm79 at georgetown.edu 202-687-2687 *********************************************************************** cfg settings for ft_freqanalysis and ft_connectivityanalysis *********************************************************************** cfg = []; cfg.prestim = -0.5; cfg.poststim = 1.5; cfg.foilim = [2 30]; cfg.freqrange = 'low'; % cfg.output = 'fourier'; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.keeptrials = 'yes'; cfg.channel = {'all'}; cfg.channelcmb = {refchan 'all'}; cfgcoh=[]; cfgcoh.channelcmb = cfg.channelcmb; cfgcoh.method = 'coh'; v = genvarname(['CRSP_' condition '_low']); eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around ft_freqanalysis w = genvarname(['COH_' condition '_low']); eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); -------------- next part -------------- An HTML attachment was scrubbed... URL: From sherrykhan78 at gmail.com Tue Nov 27 02:38:46 2012 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Mon, 26 Nov 2012 20:38:46 -0500 Subject: [FieldTrip] Coherence of single trials In-Reply-To: References: Message-ID: Coherence we normally used is event related coherence, which measures the consistency of phase difference across trials between regions/channels, for single trial coherence there is an old paper which discuss this http://brainimaging.waisman.wisc.edu/~lutz/Lachaux_et_all_IJBChaos_2000.pdf I implemented this long time back let me me know if this is some thing of your interest. Sheraz Khan Martinos Center On Mon, Nov 26, 2012 at 6:22 PM, Monika Mellem wrote: > Dear Fieldtrippers, > > I am trying to calculate coherence estimates on individual trials of our > EEG data and then want to perform a within-subjects statistical test, but > so far I have not been able to figure out how to do this. I am able to > calculate coherence for our 22 subjects and then perform statistics on the > grand average, so I understand the basic usage of these functions > (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, > ft_freqstatistics). But now we want to do statistical testing on > individual subjects. Is it possible to keep coherence for individual > trials in Fieldtrip as they seem necessary for this statistical analysis? > > I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and > get the cross-spectra of individual trials (I also tried computing the > fourier spectra but it made no difference in the following step). However, > when computing the coherence in ft_connectivityanalysis, Fieldtrip averages > over the trials. Is there a way to output coherence for individual trials > instead? Please see the full cfg structure settings below. > > Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as > an input to ft_freqstatistics since previous posts suggested this was for > single subject coherence statistics, but our data is paired as the same > stimulus appears in the 2 conditions we are comparing. Is there a paired > test for single subject coherence testing, or should we use cfg.statistic = > 'depsamplesT'? > > Many thanks for any suggestions you may have! > Monika > ________________ > Monika Mellem > PhD Candidate > Interdisciplinary Program in Neuroscience > Georgetown University > Washington, DC > msm79 at georgetown.edu > 202-687-2687 > > *********************************************************************** > cfg settings for ft_freqanalysis and ft_connectivityanalysis > *********************************************************************** > cfg = []; > cfg.prestim = -0.5; > cfg.poststim = 1.5; > cfg.foilim = [2 30]; > cfg.freqrange = 'low'; > % cfg.output = 'fourier'; > cfg.output = 'powandcsd'; > cfg.method = 'mtmconvol'; > cfg.keeptrials = 'yes'; > cfg.channel = {'all'}; > cfg.channelcmb = {refchan 'all'}; > > cfgcoh=[]; > cfgcoh.channelcmb = cfg.channelcmb; > cfgcoh.method = 'coh'; > > v = genvarname(['CRSP_' condition '_low']); > eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around > ft_freqanalysis > > w = genvarname(['COH_' condition '_low']); > eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Nov 27 09:14:34 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 27 Nov 2012 09:14:34 +0100 Subject: [FieldTrip] Coherence of single trials In-Reply-To: References: Message-ID: <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl> Hi Monika, If you want to test across subjects in a paired fashion, you can use depsamplesT. Your dependent variable then should contain for each subject and condition the coherence (which of course should be estimated across all trials belonging to that condition). Even better would be to perform a so-called Z-transformation to the data. For some inspiration you could have a look at the following paper: http://www.jneurosci.org/content/31/18/6750.long Best, Jan-Mathijs On Nov 27, 2012, at 12:22 AM, Monika Mellem wrote: > Dear Fieldtrippers, > > I am trying to calculate coherence estimates on individual trials of our EEG data and then want to perform a within-subjects statistical test, but so far I have not been able to figure out how to do this. I am able to calculate coherence for our 22 subjects and then perform statistics on the grand average, so I understand the basic usage of these functions (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, ft_freqstatistics). But now we want to do statistical testing on individual subjects. Is it possible to keep coherence for individual trials in Fieldtrip as they seem necessary for this statistical analysis? > > I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and get the cross-spectra of individual trials (I also tried computing the fourier spectra but it made no difference in the following step). However, when computing the coherence in ft_connectivityanalysis, Fieldtrip averages over the trials. Is there a way to output coherence for individual trials instead? Please see the full cfg structure settings below. > > Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as an input to ft_freqstatistics since previous posts suggested this was for single subject coherence statistics, but our data is paired as the same stimulus appears in the 2 conditions we are comparing. Is there a paired test for single subject coherence testing, or should we use cfg.statistic = 'depsamplesT'? > > Many thanks for any suggestions you may have! > Monika > ________________ > Monika Mellem > PhD Candidate > Interdisciplinary Program in Neuroscience > Georgetown University > Washington, DC > msm79 at georgetown.edu > 202-687-2687 > > *********************************************************************** > cfg settings for ft_freqanalysis and ft_connectivityanalysis > *********************************************************************** > cfg = []; > cfg.prestim = -0.5; > cfg.poststim = 1.5; > cfg.foilim = [2 30]; > cfg.freqrange = 'low'; > % cfg.output = 'fourier'; > cfg.output = 'powandcsd'; > cfg.method = 'mtmconvol'; > cfg.keeptrials = 'yes'; > cfg.channel = {'all'}; > cfg.channelcmb = {refchan 'all'}; > > cfgcoh=[]; > cfgcoh.channelcmb = cfg.channelcmb; > cfgcoh.method = 'coh'; > > v = genvarname(['CRSP_' condition '_low']); > eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around ft_freqanalysis > > w = genvarname(['COH_' condition '_low']); > eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From monikamellem at gmail.com Tue Nov 27 12:25:52 2012 From: monikamellem at gmail.com (Monika Mellem) Date: Tue, 27 Nov 2012 06:25:52 -0500 Subject: [FieldTrip] Coherence of single trials In-Reply-To: <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl> References: <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl> Message-ID: Thank you Sheraz and Jan-Mathijs for your help! Sheraz, if you do have the code to keep single-trial coherence estimates, I would much appreciate it if you could pass it along (monikamellem at gmail.com). And Jan-Mathijs, okay, the necessary statistics make sense, and I will z-transform the data too. But as far as you know, is there no implementation already in Fieldtrip to keep the single-trial coherence estimates? I assumed setting cfg.keeptrials = 'yes' would do this, but is there something else I'm missing as this doesn't seem to work? I would prefer to try what Fieldtrip has implemented first before integrating Sheraz's code into my version of Fieldtrip. Thank you very much! Monika On Tue, Nov 27, 2012 at 3:14 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Monika, > > If you want to test across subjects in a paired fashion, you can use > depsamplesT. Your dependent variable then should contain for each subject > and condition the coherence (which of course should be estimated across all > trials belonging to that condition). Even better would be to perform a > so-called Z-transformation to the data. For some inspiration you could have > a look at the following paper: > http://www.jneurosci.org/content/31/18/6750.long > > Best, > > Jan-Mathijs > > On Nov 27, 2012, at 12:22 AM, Monika Mellem wrote: > > Dear Fieldtrippers, > > I am trying to calculate coherence estimates on individual trials of our > EEG data and then want to perform a within-subjects statistical test, but > so far I have not been able to figure out how to do this. I am able to > calculate coherence for our 22 subjects and then perform statistics on the > grand average, so I understand the basic usage of these functions > (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, > ft_freqstatistics). But now we want to do statistical testing on > individual subjects. Is it possible to keep coherence for individual > trials in Fieldtrip as they seem necessary for this statistical analysis? > > I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and > get the cross-spectra of individual trials (I also tried computing the > fourier spectra but it made no difference in the following step). However, > when computing the coherence in ft_connectivityanalysis, Fieldtrip averages > over the trials. Is there a way to output coherence for individual trials > instead? Please see the full cfg structure settings below. > > Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as > an input to ft_freqstatistics since previous posts suggested this was for > single subject coherence statistics, but our data is paired as the same > stimulus appears in the 2 conditions we are comparing. Is there a paired > test for single subject coherence testing, or should we use cfg.statistic = > 'depsamplesT'? > > Many thanks for any suggestions you may have! > Monika > ________________ > Monika Mellem > PhD Candidate > Interdisciplinary Program in Neuroscience > Georgetown University > Washington, DC > msm79 at georgetown.edu > 202-687-2687 > > *********************************************************************** > cfg settings for ft_freqanalysis and ft_connectivityanalysis > *********************************************************************** > cfg = []; > cfg.prestim = -0.5; > cfg.poststim = 1.5; > cfg.foilim = [2 30]; > cfg.freqrange = 'low'; > % cfg.output = 'fourier'; > cfg.output = 'powandcsd'; > cfg.method = 'mtmconvol'; > cfg.keeptrials = 'yes'; > cfg.channel = {'all'}; > cfg.channelcmb = {refchan 'all'}; > > cfgcoh=[]; > cfgcoh.channelcmb = cfg.channelcmb; > cfgcoh.method = 'coh'; > > v = genvarname(['CRSP_' condition '_low']); > eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around > ft_freqanalysis > > w = genvarname(['COH_' condition '_low']); > eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Nov 27 12:49:38 2012 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 27 Nov 2012 12:49:38 +0100 Subject: [FieldTrip] Coherence of single trials In-Reply-To: References: <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl> Message-ID: Dear Monika, It may have escaped your attention while digging to the previous posts, but the question has been raised (and answered ;-) ) before. Just for the very very last time I will make the following statement: Single trial coherence estimates cannot be computed! Perhaps the font size and color will make it memorable ;-). This is due to the simple fact that coherence is defined across observations. If you have just a single observation, due to the mathematics involved, the coherence value will be 1. Since you want to do group analysis, I think you really should compute the coherence per condition, where each condition should consist of a sufficient number of trials. Assuming that the time domain data is organised such that you have all trials (irrespective of the condition) in a single structure, do something like this. for each subject cfg = []; cfg.output = 'fourier'; cfg.method = 'mtmfft'/'mtmconvol' cfg.keeptrials = 'yes'; ... freq = ft_freqanalysis(cfg, data); cfg = []; cfg.channelcmb = {something here} cfg.trials = [indices of trials belonging to condition 1]; coh1 = ft_connectivityanalysis(cfg, freq); % compute coherence across the trials for condition 1 cfg.trials = [indices of trials belonging to condition 2]; coh2 = ft_connectivityanalysis(cfg, freq); % compute coherence across the trials for condition 2 end Good luck, Jan-Mathijs On Nov 27, 2012, at 12:25 PM, Monika Mellem wrote: > Thank you Sheraz and Jan-Mathijs for your help! > Sheraz, if you do have the code to keep single-trial coherence estimates, I would much appreciate it if you could pass it along (monikamellem at gmail.com). > And Jan-Mathijs, okay, the necessary statistics make sense, and I will z-transform the data too. But as far as you know, is there no implementation already in Fieldtrip to keep the single-trial coherence estimates? I assumed setting cfg.keeptrials = 'yes' would do this, but is there something else I'm missing as this doesn't seem to work? I would prefer to try what Fieldtrip has implemented first before integrating Sheraz's code into my version of Fieldtrip. > > Thank you very much! > Monika > > > On Tue, Nov 27, 2012 at 3:14 AM, jan-mathijs schoffelen wrote: > Hi Monika, > > If you want to test across subjects in a paired fashion, you can use depsamplesT. Your dependent variable then should contain for each subject and condition the coherence (which of course should be estimated across all trials belonging to that condition). Even better would be to perform a so-called Z-transformation to the data. For some inspiration you could have a look at the following paper: http://www.jneurosci.org/content/31/18/6750.long > > Best, > > Jan-Mathijs > > On Nov 27, 2012, at 12:22 AM, Monika Mellem wrote: > >> Dear Fieldtrippers, >> >> I am trying to calculate coherence estimates on individual trials of our EEG data and then want to perform a within-subjects statistical test, but so far I have not been able to figure out how to do this. I am able to calculate coherence for our 22 subjects and then perform statistics on the grand average, so I understand the basic usage of these functions (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, ft_freqstatistics). But now we want to do statistical testing on individual subjects. Is it possible to keep coherence for individual trials in Fieldtrip as they seem necessary for this statistical analysis? >> >> I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and get the cross-spectra of individual trials (I also tried computing the fourier spectra but it made no difference in the following step). However, when computing the coherence in ft_connectivityanalysis, Fieldtrip averages over the trials. Is there a way to output coherence for individual trials instead? Please see the full cfg structure settings below. >> >> Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as an input to ft_freqstatistics since previous posts suggested this was for single subject coherence statistics, but our data is paired as the same stimulus appears in the 2 conditions we are comparing. Is there a paired test for single subject coherence testing, or should we use cfg.statistic = 'depsamplesT'? >> >> Many thanks for any suggestions you may have! >> Monika >> ________________ >> Monika Mellem >> PhD Candidate >> Interdisciplinary Program in Neuroscience >> Georgetown University >> Washington, DC >> msm79 at georgetown.edu >> 202-687-2687 >> >> *********************************************************************** >> cfg settings for ft_freqanalysis and ft_connectivityanalysis >> *********************************************************************** >> cfg = []; >> cfg.prestim = -0.5; >> cfg.poststim = 1.5; >> cfg.foilim = [2 30]; >> cfg.freqrange = 'low'; >> % cfg.output = 'fourier'; >> cfg.output = 'powandcsd'; >> cfg.method = 'mtmconvol'; >> cfg.keeptrials = 'yes'; >> cfg.channel = {'all'}; >> cfg.channelcmb = {refchan 'all'}; >> >> cfgcoh=[]; >> cfgcoh.channelcmb = cfg.channelcmb; >> cfgcoh.method = 'coh'; >> >> v = genvarname(['CRSP_' condition '_low']); >> eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around ft_freqanalysis >> >> w = genvarname(['COH_' condition '_low']); >> eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sherrykhan78 at gmail.com Tue Nov 27 13:56:05 2012 From: sherrykhan78 at gmail.com (Sheraz Khan) Date: Tue, 27 Nov 2012 07:56:05 -0500 Subject: [FieldTrip] Coherence of single trials In-Reply-To: References: <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl> Message-ID: Dear Monika, As Jan-Mathijs correctly mention Coherence is measure across trials, for single trial coherence value is one, the method I mention above also can not escape from this mathematical truth, the associated bias with the method is almost 0.9. Sheraz On Tue, Nov 27, 2012 at 6:49 AM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Dear Monika, > > It may have escaped your attention while digging to the previous posts, > but the question has been raised (and answered ;-) ) before. Just for the > very very last time I will make the following statement: > > *Single trial coherence estimates cannot be computed!* > * > * > Perhaps the font size and color will make it memorable ;-). This is due to > the simple fact that coherence is defined across observations. If you have > just a single observation, due to the mathematics involved, the coherence > value will be 1. > Since you want to do group analysis, I think you really should compute the > coherence per condition, where each condition should consist of a > sufficient number of trials. Assuming that the time domain data is > organised such that you have all trials (irrespective of the condition) in > a single structure, do something like this. > > for each subject > cfg = []; > cfg.output = 'fourier'; > cfg.method = 'mtmfft'/'mtmconvol' > cfg.keeptrials = 'yes'; > ... > freq = ft_freqanalysis(cfg, data); > > cfg = []; > cfg.channelcmb = {something here} > cfg.trials = [indices of trials belonging to condition 1]; > coh1 = ft_connectivityanalysis(cfg, freq); % compute coherence across > the trials for condition 1 > cfg.trials = [indices of trials belonging to condition 2]; > coh2 = ft_connectivityanalysis(cfg, freq); % compute coherence across > the trials for condition 2 > end > > > Good luck, > > Jan-Mathijs > > > On Nov 27, 2012, at 12:25 PM, Monika Mellem wrote: > > Thank you Sheraz and Jan-Mathijs for your help! > Sheraz, if you do have the code to keep single-trial coherence estimates, > I would much appreciate it if you could pass it along ( > monikamellem at gmail.com). > And Jan-Mathijs, okay, the necessary statistics make sense, and I will > z-transform the data too. But as far as you know, is there no > implementation already in Fieldtrip to keep the single-trial coherence > estimates? I assumed setting cfg.keeptrials = 'yes' would do this, but is > there something else I'm missing as this doesn't seem to work? I would > prefer to try what Fieldtrip has implemented first before integrating > Sheraz's code into my version of Fieldtrip. > > Thank you very much! > Monika > > > On Tue, Nov 27, 2012 at 3:14 AM, jan-mathijs schoffelen < > jan.schoffelen at donders.ru.nl> wrote: > >> Hi Monika, >> >> If you want to test across subjects in a paired fashion, you can use >> depsamplesT. Your dependent variable then should contain for each subject >> and condition the coherence (which of course should be estimated across all >> trials belonging to that condition). Even better would be to perform a >> so-called Z-transformation to the data. For some inspiration you could have >> a look at the following paper: >> http://www.jneurosci.org/content/31/18/6750.long >> >> Best, >> >> Jan-Mathijs >> >> On Nov 27, 2012, at 12:22 AM, Monika Mellem wrote: >> >> Dear Fieldtrippers, >> >> I am trying to calculate coherence estimates on individual trials of our >> EEG data and then want to perform a within-subjects statistical test, but >> so far I have not been able to figure out how to do this. I am able to >> calculate coherence for our 22 subjects and then perform statistics on the >> grand average, so I understand the basic usage of these functions >> (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, >> ft_freqstatistics). But now we want to do statistical testing on >> individual subjects. Is it possible to keep coherence for individual >> trials in Fieldtrip as they seem necessary for this statistical analysis? >> >> I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and >> get the cross-spectra of individual trials (I also tried computing the >> fourier spectra but it made no difference in the following step). However, >> when computing the coherence in ft_connectivityanalysis, Fieldtrip averages >> over the trials. Is there a way to output coherence for individual trials >> instead? Please see the full cfg structure settings below. >> >> Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as >> an input to ft_freqstatistics since previous posts suggested this was for >> single subject coherence statistics, but our data is paired as the same >> stimulus appears in the 2 conditions we are comparing. Is there a paired >> test for single subject coherence testing, or should we use cfg.statistic = >> 'depsamplesT'? >> >> Many thanks for any suggestions you may have! >> Monika >> ________________ >> Monika Mellem >> PhD Candidate >> Interdisciplinary Program in Neuroscience >> Georgetown University >> Washington, DC >> msm79 at georgetown.edu >> 202-687-2687 >> >> *********************************************************************** >> cfg settings for ft_freqanalysis and ft_connectivityanalysis >> *********************************************************************** >> cfg = []; >> cfg.prestim = -0.5; >> cfg.poststim = 1.5; >> cfg.foilim = [2 30]; >> cfg.freqrange = 'low'; >> % cfg.output = 'fourier'; >> cfg.output = 'powandcsd'; >> cfg.method = 'mtmconvol'; >> cfg.keeptrials = 'yes'; >> cfg.channel = {'all'}; >> cfg.channelcmb = {refchan 'all'}; >> >> cfgcoh=[]; >> cfgcoh.channelcmb = cfg.channelcmb; >> cfgcoh.method = 'coh'; >> >> v = genvarname(['CRSP_' condition '_low']); >> eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around >> ft_freqanalysis >> >> w = genvarname(['COH_' condition '_low']); >> eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rieder at med.uni-frankfurt.de Tue Nov 27 14:23:42 2012 From: rieder at med.uni-frankfurt.de (Maria Rieder) Date: Tue, 27 Nov 2012 14:23:42 +0100 Subject: [FieldTrip] problems with construction of grids for individual subjects Message-ID: <50B4BEDE.9020102@med.uni-frankfurt.de> Dear fieldtrip users, I have 2 questions regarding the construction of grids for individual subjects. This is the code I used (the template was build according to the tutorial "Create MNI-aligned grids..."): cfg = []; cfg.write= 'no'; cfg.coordsys= 'ctf'; [segmentedmri] = ft_volumesegment(cfg, mri); cfg = []; cfg.method='singleshell';% or single sphere model vol = ft_prepare_headmodel(cfg, segmentedmri); cfg = []; cfg.grid.warpmni= 'yes'; cfg.grid.template= template_grid; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.mri= mri; grid= ft_prepare_sourcemodel(cfg); 1.It turns out that my script works quite well for most of my subjects, but in case of one single subject I obtain a curious grid which has no grid point in the region of the occipital cortex/cerebellum (2^nd figure plotted in red). As you can see in the first figure the subjects mri look good and also do the template grid (2^nd figure plotted in green). I'm wondering what went wrong. So what options do I have if the warping/transform algorithm goes wrong? 2.Why is the template rotated and shifted when comparing it to the subjects grid (2^nd figure bottom right)? Thank you in advance, Maria -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: clip_image002.jpg Type: image/jpeg Size: 32453 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: clip_image003.png Type: image/png Size: 171403 bytes Desc: not available URL: From Nico.Boehler at UGent.be Tue Nov 27 17:24:39 2012 From: Nico.Boehler at UGent.be (Nico =?iso-8859-1?b?QvZobGVy?=) Date: Tue, 27 Nov 2012 17:24:39 +0100 Subject: [FieldTrip] PhD position vacancy at the Dept of Experimental Psychology, University of Ghent, Belgium Message-ID: <20121127172439.Horde.k8EmBtD6UQ5QtOlHRlezRdA@webmail.ugent.be> We are seeking a highly motivated PhD student for a 4-year project on /the role of selective attention in reward-modulated cognitive control/. The project will be supervised by Nico Boehler in collaboration with Wim Notebaert (http://expsy.ugent.be/staff/cstaff.htm). Our department hosts ten research groups, creating a dynamic environment including regular internal presentation series as well as frequent talks by invited speakers etc. We have access to state-of-the-art equipment including a 64/128-channel Biosemi EEG system and a research-dedicated 3-tesla Siemens MR scanner, as well as eye-tracking devices and TMS. Candidates are expected to have a Master's degree in psychology, (cognitive) neuroscience, or a related discipline on the starting date. He or she will mostly carry out behavioral and EEG experiments, but extensions to fMRI (including MR-compatible EEG) and TMS are possible. Experience with any of these techniques would be an asset. The starting date is flexible (but preferably early 2013). The project will culminate after four years in a PhD thesis. Salary is according to standard Belgian regulations (scholarship: ± ?22.000,? net/year). Although the governing language at Ghent University is Dutch, knowledge of Dutch is not a pre-requisite. Interested candidates should send a CV, motivation letter, and two (email) addresses of potential referees to nico.boehler at ugent.be before February 1st 2013. Informal inquiries can also be sent via email. Nico Boehler Dept. of Experimental Psychology Ghent University Belgium -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron__t at hotmail.com Tue Nov 27 19:24:30 2012 From: aaron__t at hotmail.com (Aaron T) Date: Tue, 27 Nov 2012 10:24:30 -0800 Subject: [FieldTrip] Coherence of single trials In-Reply-To: References: , <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl>, , , Message-ID: On a moderately related note, using a cfg setup that is very similar to Monika's I am encountering dimord errors with ft_connectivityplot I don't understand. cfg = []; cfg.channel = {'all'}; cfg.channelcmb = {refchan 'all'}; v= ft_frequencyanalysis cfg = [];cfg.channel = {refchan 'all'}; w = ft_connectivityanalysis (cfg, v); cfg = []cfg.parameter = 'cohspctrm';cfg.zlim = [0 1]z = ft_connectivityplot (cfg, w); When using .channelcmb in this way I encounter a dimord error: "must be chan_chan_freq or chancmb_freq"). The issue seems to be related to use of ft_frequencyanalysis; v receives an rpttap_chan_freq dimord (as I believe it should), but when subsequently using the .coh method with ft_connectivityanalysis variable w receives a dimord of chan_freq (and even if manually changed thereafter, is subsequently returned to this value by ft_checkdata calls). Is there an alternative way to use .channelcmb to set up channel pairs for analysis in ft_frequencyanalysis for subsequent use with connectivityanalysis and plot? Thanks for any suggestions. Aaron Date: Tue, 27 Nov 2012 07:56:05 -0500 From: sherrykhan78 at gmail.com To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Coherence of single trials Dear Monika, As Jan-Mathijs correctly mention Coherence is measure across trials, for single trial coherence value is one, the method I mention above also can not escape from this mathematical truth, the associated bias with the method is almost 0.9. Sheraz On Tue, Nov 27, 2012 at 6:49 AM, jan-mathijs schoffelen wrote: Dear Monika, It may have escaped your attention while digging to the previous posts, but the question has been raised (and answered ;-) ) before. Just for the very very last time I will make the following statement: Single trial coherence estimates cannot be computed! Perhaps the font size and color will make it memorable ;-). This is due to the simple fact that coherence is defined across observations. If you have just a single observation, due to the mathematics involved, the coherence value will be 1. Since you want to do group analysis, I think you really should compute the coherence per condition, where each condition should consist of a sufficient number of trials. Assuming that the time domain data is organised such that you have all trials (irrespective of the condition) in a single structure, do something like this. for each subject cfg = []; cfg.output = 'fourier'; cfg.method = 'mtmfft'/'mtmconvol' cfg.keeptrials = 'yes'; ... freq = ft_freqanalysis(cfg, data); cfg = []; cfg.channelcmb = {something here} cfg.trials = [indices of trials belonging to condition 1]; coh1 = ft_connectivityanalysis(cfg, freq); % compute coherence across the trials for condition 1 cfg.trials = [indices of trials belonging to condition 2]; coh2 = ft_connectivityanalysis(cfg, freq); % compute coherence across the trials for condition 2end Good luck, Jan-Mathijs On Nov 27, 2012, at 12:25 PM, Monika Mellem wrote: Thank you Sheraz and Jan-Mathijs for your help! Sheraz, if you do have the code to keep single-trial coherence estimates, I would much appreciate it if you could pass it along (monikamellem at gmail.com). And Jan-Mathijs, okay, the necessary statistics make sense, and I will z-transform the data too. But as far as you know, is there no implementation already in Fieldtrip to keep the single-trial coherence estimates? I assumed setting cfg.keeptrials = 'yes' would do this, but is there something else I'm missing as this doesn't seem to work? I would prefer to try what Fieldtrip has implemented first before integrating Sheraz's code into my version of Fieldtrip. Thank you very much! Monika On Tue, Nov 27, 2012 at 3:14 AM, jan-mathijs schoffelen wrote: Hi Monika, If you want to test across subjects in a paired fashion, you can use depsamplesT. Your dependent variable then should contain for each subject and condition the coherence (which of course should be estimated across all trials belonging to that condition). Even better would be to perform a so-called Z-transformation to the data. For some inspiration you could have a look at the following paper: http://www.jneurosci.org/content/31/18/6750.long Best, Jan-Mathijs On Nov 27, 2012, at 12:22 AM, Monika Mellem wrote: Dear Fieldtrippers, I am trying to calculate coherence estimates on individual trials of our EEG data and then want to perform a within-subjects statistical test, but so far I have not been able to figure out how to do this. I am able to calculate coherence for our 22 subjects and then perform statistics on the grand average, so I understand the basic usage of these functions (ft_freqanalysis, ft_connectivityanalysis, ft_freqgrandaverage, ft_freqstatistics). But now we want to do statistical testing on individual subjects. Is it possible to keep coherence for individual trials in Fieldtrip as they seem necessary for this statistical analysis? I am setting cfg.keeptrials = 'yes' as an input to ft_freqanalysis, and get the cross-spectra of individual trials (I also tried computing the fourier spectra but it made no difference in the following step). However, when computing the coherence in ft_connectivityanalysis, Fieldtrip averages over the trials. Is there a way to output coherence for individual trials instead? Please see the full cfg structure settings below. Also, I did look into the option of cfg.statistic = 'indepsamplesZcoh' as an input to ft_freqstatistics since previous posts suggested this was for single subject coherence statistics, but our data is paired as the same stimulus appears in the 2 conditions we are comparing. Is there a paired test for single subject coherence testing, or should we use cfg.statistic = 'depsamplesT'? Many thanks for any suggestions you may have! Monika ________________Monika Mellem PhD Candidate Interdisciplinary Program in Neuroscience Georgetown University Washington, DC msm79 at georgetown.edu 202-687-2687 *********************************************************************** cfg settings for ft_freqanalysis and ft_connectivityanalysis *********************************************************************** cfg = []; cfg.prestim = -0.5; cfg.poststim = 1.5; cfg.foilim = [2 30]; cfg.freqrange = 'low'; % cfg.output = 'fourier'; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.keeptrials = 'yes'; cfg.channel = {'all'}; cfg.channelcmb = {refchan 'all'}; cfgcoh=[]; cfgcoh.channelcmb = cfg.channelcmb; cfgcoh.method = 'coh'; v = genvarname(['CRSP_' condition '_low']); eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper around ft_freqanalysis w = genvarname(['COH_' condition '_low']); eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics,Nijmegen, The Netherlands J.Schoffelen at donders.ru.nlTelephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics,Nijmegen, The Netherlands J.Schoffelen at donders.ru.nlTelephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcgoiv0 at wfu.edu Tue Nov 27 20:26:50 2012 From: mcgoiv0 at wfu.edu (McGowin, Inna) Date: Tue, 27 Nov 2012 14:26:50 -0500 Subject: [FieldTrip] correction for movement tool In-Reply-To: <1845155284.1304271.1353075065072.JavaMail.root@sculptor.zimbra.ru.nl> References: <1845155284.1304271.1353075065072.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: Thanks Arjen, I am studying the article now. -------------- next part -------------- An HTML attachment was scrubbed... URL: From am236 at georgetown.edu Tue Nov 27 21:06:17 2012 From: am236 at georgetown.edu (Andrei Medvedev) Date: Tue, 27 Nov 2012 15:06:17 -0500 Subject: [FieldTrip] Coherence of single trials In-Reply-To: References: <008768D7-25E3-4941-8997-1699F94940D4@donders.ru.nl> Message-ID: <50B51D39.4060009@georgetown.edu> Dear Monika, Indeed, Coh cannot be calculated on single trials, it requires averaging of the cross-spectrum over (some) trials. Customarily, people average ALL trials recorded in a subject and end up with just only one coherence measurement for this subject. Then obviously stats cannot be run on the individual level and only a group analysis can be done (e.g., you have 20 subjects, they give you 20 coherence values and you run your stats on those 20 values). Does this mean that coherence can be analyzed only on a group level? Perhaps not. I suggest the following approach. Coherence can be considered as a 'sample', or 'population', statistic (similar to means, medians, variances etc, which are calculated from a set of data points). Methods of estimating statistical properties of those 'population' measures are well known, they are based on resampling, jackknifing and bootstrapping. Simply put, you can take a SUBSET of your trials (e.g., selecting randomly 50 trials from all 100 trials in a particular subject) and calculate coherence over those 50 selected trials. Then repeat the process of random selection (with replacement, as in jackknifing) a certain number of times (N) and you would have a set of N 'sample' coherences for this subject. Then you can run your stats on those 'sample' coherences for this particular subject thus achieving your goal of the individual subject analysis. Any feedback from the fellows Fieldtripers about this approach? Thank you, Andrei Medvedev Georgetown University. On 11/27/2012 6:49 AM, jan-mathijs schoffelen wrote: > Dear Monika, > > It may have escaped your attention while digging to the previous > posts, but the question has been raised (and answered ;-) ) before. > Just for the very very last time I will make the following statement: > > *Single trialcoherenceestimatescannotbecomputed!* > * > * > Perhaps the font size and color will make it memorable ;-). This is > due to the simple fact that coherence is defined across observations. > If you have just a single observation, due to the mathematics > involved, the coherence value will be 1. > Since you want to do group analysis, I think you really should compute > the coherence per condition, where each condition should consist of a > sufficient number of trials. Assuming that the time domain data is > organised such that you have all trials (irrespective of the > condition) in a single structure, do something like this. > > for each subject > cfg = []; > cfg.output = 'fourier'; > cfg.method = 'mtmfft'/'mtmconvol' > cfg.keeptrials = 'yes'; > ... > freq = ft_freqanalysis(cfg, data); > > cfg = []; > cfg.channelcmb = {something here} > cfg.trials = [indices of trials belonging to condition 1]; > coh1 = ft_connectivityanalysis(cfg, freq); % compute coherence > across the trials for condition 1 > cfg.trials = [indices of trials belonging to condition 2]; > coh2 = ft_connectivityanalysis(cfg, freq); % compute coherence > across the trials for condition 2 > end > > > Good luck, > > Jan-Mathijs > > > On Nov 27, 2012, at 12:25 PM, Monika Mellem wrote: > >> Thank you Sheraz and Jan-Mathijs for your help! >> Sheraz, if you do have the code to keep single-trial coherence >> estimates, I would much appreciate it if you could pass it along >> (monikamellem at gmail.com ). >> And Jan-Mathijs, okay, the necessary statistics make sense, and I >> will z-transform the data too. But as far as you know, is there no >> implementation already in Fieldtrip to keep the single-trial >> coherence estimates? I assumed setting cfg.keeptrials = 'yes' would >> do this, but is there something else I'm missing as this doesn't seem >> to work? I would prefer to try what Fieldtrip has implemented first >> before integrating Sheraz's code into my version of Fieldtrip. >> >> Thank you very much! >> Monika >> >> >> On Tue, Nov 27, 2012 at 3:14 AM, jan-mathijs schoffelen >> > >> wrote: >> >> Hi Monika, >> >> If you want to test across subjects in a paired fashion, you can >> use depsamplesT. Your dependent variable then should contain for >> each subject and condition the coherence (which of course should >> be estimated across all trials belonging to that condition). Even >> better would be to perform a so-called Z-transformation to the >> data. For some inspiration you could have a look at the following >> paper: http://www.jneurosci.org/content/31/18/6750.long >> >> Best, >> >> Jan-Mathijs >> >> On Nov 27, 2012, at 12:22 AM, Monika Mellem wrote: >> >>> Dear Fieldtrippers, >>> >>> I am trying to calculate coherence estimates on individual >>> trials of our EEG data and then want to perform a >>> within-subjects statistical test, but so far I have not been >>> able to figure out how to do this. I am able to calculate >>> coherence for our 22 subjects and then perform statistics on the >>> grand average, so I understand the basic usage of these >>> functions (ft_freqanalysis, ft_connectivityanalysis, >>> ft_freqgrandaverage, ft_freqstatistics). But now we want to do >>> statistical testing on individual subjects. Is it possible to >>> keep coherence for individual trials in Fieldtrip as they seem >>> necessary for this statistical analysis? >>> >>> I am setting cfg.keeptrials = 'yes' as an input to >>> ft_freqanalysis, and get the cross-spectra of individual trials >>> (I also tried computing the fourier spectra but it made no >>> difference in the following step). However, when computing the >>> coherence in ft_connectivityanalysis, Fieldtrip averages over >>> the trials. Is there a way to output coherence for individual >>> trials instead? Please see the full cfg structure settings below. >>> >>> Also, I did look into the option of cfg.statistic = >>> 'indepsamplesZcoh' as an input to ft_freqstatistics since >>> previous posts suggested this was for single subject coherence >>> statistics, but our data is paired as the same stimulus appears >>> in the 2 conditions we are comparing. Is there a paired test >>> for single subject coherence testing, or should we use >>> cfg.statistic = 'depsamplesT'? >>> >>> Many thanks for any suggestions you may have! >>> Monika >>> ________________ >>> Monika Mellem >>> PhD Candidate >>> Interdisciplinary Program in Neuroscience >>> Georgetown University >>> Washington, DC >>> msm79 at georgetown.edu >>> 202-687-2687 >>> >>> *********************************************************************** >>> cfg settings for ft_freqanalysis and ft_connectivityanalysis >>> *********************************************************************** >>> cfg = []; >>> cfg.prestim = -0.5; >>> cfg.poststim = 1.5; >>> cfg.foilim = [2 30]; >>> cfg.freqrange = 'low'; >>> % cfg.output = 'fourier'; >>> cfg.output = 'powandcsd'; >>> cfg.method = 'mtmconvol'; >>> cfg.keeptrials = 'yes'; >>> cfg.channel = {'all'}; >>> cfg.channelcmb = {refchan 'all'}; >>> >>> cfgcoh=[]; >>> cfgcoh.channelcmb = cfg.channelcmb; >>> cfgcoh.method = 'coh'; >>> >>> v = genvarname(['CRSP_' condition '_low']); >>> eval([v '= ft_multitaper_powcoh_EGI(cfg, data);']); %Wrapper >>> around ft_freqanalysis >>> >>> w = genvarname(['COH_' condition '_low']); >>> eval([w '= ft_connectivityanalysis(cfgcoh, ' v ');']); >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Andrei Medvedev, PhD Assistant Professor, Center for Functional and Molecular Imaging Georgetown University Building D, Room 154 4000 Reservoir Rd, NW Washington DC, 20057 Tel.: 202-687-5126 -------------- next part -------------- An HTML attachment was scrubbed... URL: From fanny.lachat at gmail.com Wed Nov 28 16:27:41 2012 From: fanny.lachat at gmail.com (Fanny) Date: Wed, 28 Nov 2012 16:27:41 +0100 Subject: [FieldTrip] averaging FT_FREQANALYSIS. Message-ID: Dear Fieldtrip Users, I have analysed my EEG data using FT_FREQANALYSIS. I am now interested in averaging this time frequency data for each subject and each electrode on particular frequency (for example between 8 & 13 Hz) and on particular time (between for example 1sec & 1.2 sec). My goal is to have for each suject -for the powspctrm only the values that correspond to the results of this average. -for the time and for the freq only 1 number I will alos want to plot the results after. (using ft_topoplotTFR). I have failed to find how to do that. I have tryed many different methods. I even tried calling cfg.method = 'stats'; cfg.statistic = 'mean'; .... Could someone help me ? thank you in advance ------ Fanny -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Nov 28 17:25:04 2012 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 28 Nov 2012 17:25:04 +0100 Subject: [FieldTrip] averaging FT_FREQANALYSIS. In-Reply-To: References: Message-ID: Dear Fanny, You should be able to do all that within ft_freqanalysis directly. I advice you to read the relevant documentation in the tutorials, and walkthrough, on the FT site. To answer your question more directly, however, its helpfull to know the cfg you called ft_freqanalysis with and the datastructure you end up with. I'm guessing you used method = 'mtmconvol'? If interested in a single timewindow you could use method = 'fft', for instance. Specifing a specific frequency band is possible by adding tapers to your frequency of interest (as explained in the documentation). Alternatively, you can use ft_selectdata using 'avgoverfreq' and 'avgovertime' parameters after you did freqanalysis. That might be a quick (but dirty) solution as well. Hope that helps for now, Stephen On 28 November 2012 16:27, Fanny wrote: > Dear Fieldtrip Users, > > I have analysed my EEG data using FT_FREQANALYSIS. > > > I am now interested in averaging this time frequency data for each > subject and each electrode on particular frequency (for example between 8 > & 13 Hz) and on particular time (between for example 1sec & 1.2 sec). > > My goal is to have for each suject > -for the powspctrm only the values that correspond to the results of this > average. > -for the time and for the freq only 1 number > > I will alos want to plot the results after. (using ft_topoplotTFR). > > I have failed to find how to do that. I have tryed many different > methods. I even tried calling cfg.method = 'stats'; > cfg.statistic = 'mean'; > .... > > Could someone help me ? > > thank you in advance > > > ------ > Fanny > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Nov 29 08:56:55 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 29 Nov 2012 08:56:55 +0100 Subject: [FieldTrip] Fwd: planar gradients In-Reply-To: References: <4346_1353591466_50AE2AAA_4346_214_1_a9f3579c-9269-4bfa-81b0-641f3c3c2a1e@thalamus_p> Message-ID: Dear Fred and Max, To follow up on this: we have identified and fixed the problem, as of last night's release. You can see the issue here: http://bugzilla.fcdonders.nl/show_bug.cgi?id=1858 This is a related, but different, bug than the 1288 I posted earlier. To summarize: all output of ft_megplanar should now be recognized correctly as planar gradient data in subsequent steps. If you have data that was generated by ft_megplanar prior to this fix, you can easily patch it by doing: data.grad.type = 'ctf275_planar'; (or xxxx_planar for other axial gradiometer acquisition systems). Feel free to reopen bug 1858 if the issue has not been resolved. Best, Eelke On 23 November 2012 09:48, Eelke Spaak wrote: > Dear Fred and Max, > > This is a known bug in ft_senstype, and people are working on fixing > it. See bugzilla: http://bugzilla.fcdonders.nl/show_bug.cgi?id=1288 . > If you have anything to add to the bug reports over there, that could > be helpful. > > For now, Max's workaround seems to do the trick. > > Best, > Eelke > > On 22 November 2012 19:36, Stenner, Max-Philipp > wrote: > > Dear Fred, > > > > I encountered a similar problem with my CTF275 data and one broken > sensor before ft_freqanalysis of the planar (uncombined) data. "Confirming" > the channel type with > > > > data.grad.chantype = ft_senstype(data); > > > > solved the problem (although I have to admit that I never investigated > where in the ft script the problem arose). > > > > Cheers, > > Max > > > > ________________________________________ > > Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" > im Auftrag von "Frederic Roux [f.roux at bcbl.eu] > > Gesendet: Donnerstag, 22. November 2012 14:19 > > Bis: FieldTrip discussion list > > Betreff: [FieldTrip] planar gradients > > > > Dear all, > > > > I would like to follow up this post with another question > > related to the planar gradients. > > > > I am working on data aquired with a CTF 275 system but at > > the time of the acquisition there was a number of sensors > > that were broken. > > > > So I end up with n = 258 channels. > > > > After running the ft_megplanar function I get n = 516 channels. > > > > However, if I try to combine the gradients with > > ft_combineplanar > > > > I get an error saying that I am not providing ctf275_planar but > > ctf275 data. > > > > Is the fact that I do not have n = 275 sensors but 258 confusing > > the ft_combineplanar function, or is this related to something else? > > > > > > Best, > > > > Fred > > > > ----- Original Message ----- > > From: "Eelke Spaak" > > To: "FieldTrip discussion list" > > Sent: Wednesday, November 21, 2012 12:47:25 PM > > Subject: Re: [FieldTrip] ft_freqstatistics tutorial question > > > > Dear Nenad, > > > > Strictly speaking, planar gradient transformation is not necessary, so > > you can just skip those steps if you really want to. However, if you > > have axial gradiometer data (as I seem to recall from your earlier > > posts) and want to do TF-analysis and -statistics on sensor level, I > > would strongly recommend applying a planar gradient transformation. > > > > Axial gradiometer data will produce maximal deflections (of opposite > > polarity) on both sides of a current dipole, while planar gradiometer > > data produces a positive maximum exactly above the source. If you > > apply TF-analysis to axial gradiometer data, you will get two > > spatially separated 'blobs' where there was only a single oscillating > > dipole in the brain. If you look at power (as is typically done), you > > will lose the polarity information, and hence interpreting the power > > topography in terms of brain is nearly impossible with axial gradient > > data. > > > > Best, > > Eelke > > > > On 21 November 2012 11:30, Nenad Polomac wrote: > >> Dear all, > >> > >> I have one doubt. I want to calculate ft_freqstatistics on my MEG date > >> obtained form ft_freqanalysis. However, I see now in ft_freqstatistics > >> tutorial that you suggest that operation should be done on planar > gradient > >> data. So, the first ft_megplanar and then ft_freqanalysis, > ft_combineplanar > >> and ft_freqstatistics. My question is, does this step of calculating > planar > >> gradients for time frequency analysis is necessary or not? Could I apply > >> statistic on the data from ft_freqanalysis without any involvement of > planar > >> gradients calculation. > >> Thank you in advance! > >> > >> All the best! > >> > >> Nenad > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elilife at gmail.com Thu Nov 29 14:36:55 2012 From: elilife at gmail.com (Eliana Garcia) Date: Thu, 29 Nov 2012 14:36:55 +0100 Subject: [FieldTrip] Source statistics event related fields Message-ID: Hello Dear Fieldtrip Developers and users, I would like to know if somebody has done before a *source statistic analysis on event related potentials* from the output of* LCMV beamformer*. I have some issues with the compatibility of the cfg.parameter =''avg.mom', since it is a cell structure and the functions for grand average and source statistics works normally for double matrixes. I wonder if there is a way to deal with this (not making arranges on the functions or transforming my data to the format m=sourceFIC.avg.pow(voxels, time) double. I would also like to know how to deal with the parameters for source statistics on event related fields (such as: cfg.latency). Thanks a lot! -- Eliana García Cossio Applied Neurotechnology Lab. Graduate School of Neural and Behavioural Science - Max Planck Research School Institute of Medical Psychology and Behavioural Neurobiology Universität Tübingen (+0049) 01 577-8587604 Otfried-Müller-Str. 47, 72076 Tübingen- Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From elilife at gmail.com Thu Nov 29 14:36:55 2012 From: elilife at gmail.com (Eliana Garcia) Date: Thu, 29 Nov 2012 14:36:55 +0100 Subject: [FieldTrip] Source statistics event related fields Message-ID: Hello Dear Fieldtrip Developers and users, I would like to know if somebody has done before a *source statistic analysis on event related potentials* from the output of* LCMV beamformer*. I have some issues with the compatibility of the cfg.parameter =''avg.mom', since it is a cell structure and the functions for grand average and source statistics works normally for double matrixes. I wonder if there is a way to deal with this (not making arranges on the functions or transforming my data to the format m=sourceFIC.avg.pow(voxels, time) double. I would also like to know how to deal with the parameters for source statistics on event related fields (such as: cfg.latency). Thanks a lot! -- Eliana García Cossio Applied Neurotechnology Lab. Graduate School of Neural and Behavioural Science - Max Planck Research School Institute of Medical Psychology and Behavioural Neurobiology Universität Tübingen (+0049) 01 577-8587604 Otfried-Müller-Str. 47, 72076 Tübingen- Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From singhharsimrat at gmail.com Thu Nov 29 14:38:01 2012 From: singhharsimrat at gmail.com (Harsimrat Singh) Date: Thu, 29 Nov 2012 13:38:01 +0000 Subject: [FieldTrip] Best procedure for frontal alpha asymmetry Message-ID: Dear Fieldtrippers I am trying to calculate the difference in the alpha power on the frontal electrodes for a subject wise analysis. Can someone please suggest what will be the correct approach. Run freq analysis with alpha freq (14-18 ) with a resolution of 2Hz on all channels and then do tf.powspctrm (:,left,:,:) –tf.powsprctrm(:,right,:,:) OR run freq analysis on left chans and right chans separately and then do subtraction. Best regards Harsimrat From jm.horschig at donders.ru.nl Thu Nov 29 15:00:58 2012 From: jm.horschig at donders.ru.nl (=?windows-1252?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 29 Nov 2012 15:00:58 +0100 Subject: [FieldTrip] Best procedure for frontal alpha asymmetry In-Reply-To: References: Message-ID: <50B76A9A.7020201@donders.ru.nl> Dear Harsimrat, I got some comments on your mail: 1. The alpha band is conventionally more around 10Hz, 14Hz is kind of the upper bound. 14-18Hz would be lower beta. 2. 2Hz resolution is fine. 3. All colleagues I know are running their frequency analysis on all channels, because there is no reason to separate channels in the analysis pipeline, neither methodologically nor for any other reason. 4. You might want to try to take the relative difference: (tf.powspctrm (:,left,:,:) – tf.powsprctrm(:,right,:,:)) ./ (tf.powspctrm (:,left,:,:) + tf.powsprctrm(:,right,:,:)) or the like (e.g. log ratio), as this gives a normalized difference which makes comparisons across subjects somewhat easier. Also, it is more conventional, see e.g. Thut et al., 2006 for occipital alpha lateralization. Good luck with your analysis! Best, Jörn On 11/29/2012 2:38 PM, Harsimrat Singh wrote: > Dear Fieldtrippers > > I am trying to calculate the difference in the alpha power on the > frontal electrodes for a subject wise analysis. > > Can someone please suggest what will be the correct approach. > > Run freq analysis with alpha freq (14-18 ) with a resolution of 2Hz on > all channels and then do > > tf.powspctrm (:,left,:,:) –tf.powsprctrm(:,right,:,:) > > OR > > run freq analysis on left chans and right chans separately and then do > subtraction. > > Best regards > Harsimrat > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From eelke.spaak at donders.ru.nl Thu Nov 29 15:15:16 2012 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 29 Nov 2012 15:15:16 +0100 Subject: [FieldTrip] Best procedure for frontal alpha asymmetry In-Reply-To: References: Message-ID: Dear Harsimrat, The two approaches should be equivalent, since power data is always computed per channel. Another thing which is probably good to note is that 14-18Hz is not typically called 'alpha activity'. Depending on your research question, it might or might not be appropriate to label it alpha anyway, but it is worth thinking about that. (Typically, alpha would be 8-12Hz, or 7-14Hz or so.) Best, Eelke On 29 November 2012 14:38, Harsimrat Singh wrote: > Dear Fieldtrippers > > I am trying to calculate the difference in the alpha power on the > frontal electrodes for a subject wise analysis. > > Can someone please suggest what will be the correct approach. > > Run freq analysis with alpha freq (14-18 ) with a resolution of 2Hz on > all channels and then do > > tf.powspctrm (:,left,:,:) –tf.powsprctrm(:,right,:,:) > > OR > > run freq analysis on left chans and right chans separately and then do > subtraction. > > Best regards > Harsimrat > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From singhharsimrat at gmail.com Thu Nov 29 19:15:14 2012 From: singhharsimrat at gmail.com (Harsimrat Singh) Date: Thu, 29 Nov 2012 18:15:14 +0000 Subject: [FieldTrip] Best procedure for frontal alpha asymmetry In-Reply-To: References: Message-ID: Thanks Elke and Jorn Apologies for mismatch 'name' and 'freq range'. Actually I went out looking for higher freqs than alpha but didn't change the name. I agree with Elke that the outcome should be same. I think I will go with the convention - freq analysis on all channels and then separating out the ones I need. Best regards Harsimrat On 29 November 2012 14:15, Eelke Spaak wrote: > Dear Harsimrat, > > The two approaches should be equivalent, since power data is always computed > per channel. > > Another thing which is probably good to note is that 14-18Hz is not > typically called 'alpha activity'. Depending on your research question, it > might or might not be appropriate to label it alpha anyway, but it is worth > thinking about that. (Typically, alpha would be 8-12Hz, or 7-14Hz or so.) > > Best, > Eelke > > > On 29 November 2012 14:38, Harsimrat Singh wrote: >> >> Dear Fieldtrippers >> >> I am trying to calculate the difference in the alpha power on the >> frontal electrodes for a subject wise analysis. >> >> Can someone please suggest what will be the correct approach. >> >> Run freq analysis with alpha freq (14-18 ) with a resolution of 2Hz on >> all channels and then do >> >> tf.powspctrm (:,left,:,:) –tf.powsprctrm(:,right,:,:) >> >> OR >> >> run freq analysis on left chans and right chans separately and then do >> subtraction. >> >> Best regards >> Harsimrat >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From khaled.alkamha at gmail.com Fri Nov 30 19:16:26 2012 From: khaled.alkamha at gmail.com (Khaled Al-Kamha) Date: Fri, 30 Nov 2012 21:16:26 +0300 Subject: [FieldTrip] How far FieldTrip can help me ? Message-ID: Hey,, I'm an under-graduated student and i'm working on http://www.physionet.org/pn4/eegmmidb/ dataset for my graduation project, i'm totally interested in Machine Learning Application for Brain Computer Interface Research. I'm trying to get started with Filtering the data for Feature Extraction Part and by a little of search i found the FieldTrip Toolbox. I just want to know if i'm on the right direction by choosing FieldTrip Toolbox for MATLAB. Regards Khaled Al Kamha -------------- next part -------------- An HTML attachment was scrubbed... URL: From batrod at gmail.com Fri Nov 30 21:37:46 2012 From: batrod at gmail.com (Rodolphe Nenert) Date: Fri, 30 Nov 2012 14:37:46 -0600 Subject: [FieldTrip] How far FieldTrip can help me ? In-Reply-To: References: Message-ID: Fieldtrip is an excellent choice for processing and analyzing eeg data ;) That being said, im not sure about what you call "feature extraction", but it will definitely help you to start with your data. Rodolphe Nenert, PhD University of Alabama at Birmingham. On Fri, Nov 30, 2012 at 12:16 PM, Khaled Al-Kamha wrote: > Hey,, > > I'm an under-graduated student and i'm working on > http://www.physionet.org/pn4/eegmmidb/ dataset for my graduation project, > i'm totally interested in Machine Learning Application for Brain Computer > Interface Research. > I'm trying to get started with Filtering the data for Feature Extraction > Part and by a little of search i found the FieldTrip Toolbox. > I just want to know if i'm on the right direction by choosing FieldTrip > Toolbox for MATLAB. > > Regards > Khaled Al Kamha > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From khaled.alkamha at gmail.com Fri Nov 30 23:01:51 2012 From: khaled.alkamha at gmail.com (Khaled Al-Kamha) Date: Sat, 1 Dec 2012 01:01:51 +0300 Subject: [FieldTrip] How far FieldTrip can help me ? In-Reply-To: References: Message-ID: Thanks a lot for your response,, you are right about your uncertainty with what i called "Feature Extraction". My intention in "Feature Extraction" was removing noise and other unnecessary information from the input signals. I think i'll give it a try, thanks again :) Regards, Khaled Al Kamha On Fri, Nov 30, 2012 at 11:37 PM, Rodolphe Nenert wrote: > Fieldtrip is an excellent choice for processing and analyzing eeg data ;) > That being said, im not sure about what you call "feature extraction", but > it will definitely help you to start with your data. > > Rodolphe Nenert, PhD > University of Alabama at Birmingham. > > > On Fri, Nov 30, 2012 at 12:16 PM, Khaled Al-Kamha < > khaled.alkamha at gmail.com> wrote: > >> Hey,, >> >> I'm an under-graduated student and i'm working on >> http://www.physionet.org/pn4/eegmmidb/ dataset for my graduation >> project, i'm totally interested in Machine Learning Application for Brain >> Computer Interface Research. >> I'm trying to get started with Filtering the data for Feature Extraction >> Part and by a little of search i found the FieldTrip Toolbox. >> I just want to know if i'm on the right direction by choosing FieldTrip >> Toolbox for MATLAB. >> >> Regards >> Khaled Al Kamha >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: