From v.piai.research at gmail.com Wed Jan 1 18:32:41 2014 From: v.piai.research at gmail.com (Vitoria Piai) Date: Wed, 01 Jan 2014 18:32:41 +0100 Subject: [FieldTrip] source-level phase coherence (following beamforming extended tutorial) Message-ID: <52C45139.7040806@gmail.com> Dear FT-ers, Sticking to the Dutch tradition, my best wishes for 2014, first of all! I'm trying to compute phase coherence between two sources of activity that I previously localised with DICS (one anterior and one posterior source, see figure if needed). It was suggested to me I'd use the approach explained in the beamforming extended tutorial, in particular "Localization of cortical sources that are coherent with the EMG". If I follow that approach (copied here below) cfg = []; cfg.method = 'dics'; cfg.refchan = 'EMGlft'; cfg.frequency = 20; cfg.vol = hdm; cfg.grid = sourcemodel; source_coh_lft = ft_sourceanalysis(cfg, freq_csd); I get stuck at the definition of cfg.refchan because I already know my sources of interest, so there's no "sensor" I can use for this. So I'm wondering whether there is another way to define the refchan or whether this specific approach is not the most appropriate. Intuitively, I myself had first chosen the approach discussed in the tutorial connectivity extended, in particular "Source-level cortico-cortical connectivity in MEG data". When then computing the LCMV, I had the positions in grid.pos for the maximum activity both for the anterior and the posterior activity taken from the data shown in the figure. Would this be the most appropriate/best way of getting the phase coherence between these two sources? Or is there another method I should use? Any thoughts or suggestions are most welcome! Thanks a lot, Vitória -------------- next part -------------- A non-text attachment was scrubbed... Name: example.png Type: image/png Size: 139285 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Wed Jan 1 21:19:52 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 1 Jan 2014 21:19:52 +0100 Subject: [FieldTrip] source-level phase coherence (following beamforming extended tutorial) In-Reply-To: <52C45139.7040806@gmail.com> References: <52C45139.7040806@gmail.com> Message-ID: <72A80E1C-8D85-41B3-B5A1-D9EC0B73DEDD@donders.ru.nl> Hi Vitoria, > Intuitively, I myself had first chosen the approach discussed in the tutorial connectivity extended, in particular "Source-level cortico-cortical connectivity in MEG data". When then computing the LCMV, I had the positions in grid.pos for the maximum activity both for the anterior and the posterior activity taken from the data shown in the figure. Would this be the most appropriate/best way of getting the phase coherence between these two sources? Yes, this would be one way of doing it. Note that by just focussing on two dipolar sources, and not accounting for the spatial structure in the coherence, you may run the risk in over-interpreting any difference across conditions (in particular in the presence of differences in source power). More about this can be found in the paper Joachim and I published in HBM, in 2009. Best wishes, Jan-Mathijs > > Any thoughts or suggestions are most welcome! > Thanks a lot, Vitória > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From i.e.j.de.vries at student.vu.nl Thu Jan 2 02:23:04 2014 From: i.e.j.de.vries at student.vu.nl (Vries, I.E.J. de) Date: Thu, 2 Jan 2014 01:23:04 +0000 Subject: [FieldTrip] Units in 'vertical' multiplot Message-ID: <19DD7427D34B7E47B33093FB4C3CFDD201094E8CEF@PEXMB001B.vu.local> Hi all, I'm using multiplot with the 'vertical' layout, i.e. channels are plotted as singleplot subplots. I'm doing this for the raw time series and for the power spectra. But I cannot find how to put units in the subplot, so I can actually see what the power is at which frequency. Also in the normal time series the units are not visible. Even if I use multiplot with a layout of the EEG cap the units on the graphs are not visible. Anyone an idea how to make the units visible? thanks and a happy new year! Ingmar -------------- next part -------------- An HTML attachment was scrubbed... URL: From mje.mads at gmail.com Fri Jan 3 11:44:58 2014 From: mje.mads at gmail.com (Mads Jensen) Date: Fri, 03 Jan 2014 11:44:58 +0100 Subject: [FieldTrip] cannot combine planar grads with ft_combineplaner Message-ID: <52C694AA.3000903@gmail.com> Hi all, I have a problem with ft_combineplanar. It does not seem to combine the planar gradiometors when called. I have tried with timelocked data and epoched data, both are the same. However, grandaveraged data (ft_timelockgrandaverage) create a structure with combined data. Does anybody have an idea what the problem might be or how I can find the problem? I have Neuromag Triux data and is using the most recent Fieldtrip from the git-repo. best wish, mads From gianpaolo.demarchi at unitn.it Fri Jan 3 15:09:00 2014 From: gianpaolo.demarchi at unitn.it (Demarchi, Gianpaolo) Date: Fri, 3 Jan 2014 15:09:00 +0100 Subject: [FieldTrip] cannot combine planar grads with ft_combineplaner In-Reply-To: <52C694AA.3000903@gmail.com> References: <52C694AA.3000903@gmail.com> Message-ID: Hi Mads, you’re not alone! In fact I was going to open a bug on that these days, since I’m getting similar (non) results. With a previous ft version (6499, so more than one year old), everything seems to work fine, i.e. I get (for a Vectorview 306 channel input) as a ft_combineplanar output: avgdatacmbOLD = time: [1x1537 double] label: {204x1 cell} grad: [1x1 struct] cfg: [1x1 struct] fsample: 256 sampleinfo: [1 1537] avg: [204x1537 double] dimord: 'chan_time' so, correctly combined, whereas if I do the same with a recent (svn-ed) version, with the same input, I get: avgdatacmb = time: [1x1537 double] label: {306x1 cell} grad: [1x1 struct] cfg: [1x1 struct] fsample: 256 sampleinfo: [1 1537] avg: [306x1537 double] dimord: ‘chan_time' so I get back my original, non combined, 306 channels … I tried to track the problem before opening a bug, and it seems that the problem lays in my input data label, which is: >> avgdata.label ans = 'MEG0113' 'MEG0112' 'MEG0111' etc … The problem seems to be around lines 102-ff of ft_combineplanar, since ft_senstype(data) on my data wrongly returns ‘neuromag306’ ( that are in principle ‘MEG 0113’ etc ...) instead of ‘neuromag306alt’ ( ‘MEG0113’ without spaces), and then in the following two lines sel_dH/sel_dV are empty, since there’s never a match between my data label (‘MEG0113’ …) and the output of ft_senstype/ft_senslabel (‘MEG 0113’ … with spaces). So, there’s something wrong in the ft_senstype step, but I didn’t have time to fully track it … @roboos: am I missing something obvious, or should I file a bug!? My two €-cents, Gianpaolo Il giorno 03/gen/2014, alle ore 11:44, Mads Jensen > ha scritto: Hi all, I have a problem with ft_combineplanar. It does not seem to combine the planar gradiometors when called. I have tried with timelocked data and epoched data, both are the same. However, grandaveraged data (ft_timelockgrandaverage) create a structure with combined data. Does anybody have an idea what the problem might be or how I can find the problem? I have Neuromag Triux data and is using the most recent Fieldtrip from the git-repo. best wish, mads _______________________________________________ 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 victorias at dsv.su.se Fri Jan 3 16:38:32 2014 From: victorias at dsv.su.se (=?UTF-8?Q?Victoria_Schr=C3=B6der?=) Date: Fri, 03 Jan 2014 16:38:32 +0100 Subject: [FieldTrip] connectivity analysis with rereferenced EEG data Message-ID: <79fcd6c08e426c01441ce7c5453efc6a@dsv.su.se> Hello I am trying to do a connectivity analysis with Fieldtrip. I recorded the EEG data with a BioSemi system without choosing a reference channel. Thus i need to select a reference in Fieldtrip. I did that during ft_preprocessing(cfg) by using the following code: cfg.reref='yes'; cfg.refchannel='all'; Data=ft_preprocessing(cfg); however when i later want to do the ft_mvaranalysis(cfg, Data) i get the following error: Matrix must be positive definite I read that this error probably occurs because the cfg.reref procedure changes the ranks of the data matrix.However, i need to rereference my data. Do somebody know a solution? All the best and thank you in advance Victoria From ingenieureniso at gmail.com Fri Jan 3 20:45:35 2014 From: ingenieureniso at gmail.com (ingenieur eniso) Date: Fri, 3 Jan 2014 20:45:35 +0100 Subject: [FieldTrip] Empirical Bayesian for the EEG Inverse Problem Message-ID: Dear all, I am using the interpolation methods to 3D EEG mapping, and now I want to apply the bayesian approach for the EEG Inverse Problem but I am blocked to calculate the posterior probability. Please can anyone help me ? I hope you will send me positive and helpful response. Thanks a lot in advance! Best, ahmed -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jan 6 09:21:12 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 06 Jan 2014 09:21:12 +0100 Subject: [FieldTrip] connectivity analysis with rereferenced EEG data In-Reply-To: <79fcd6c08e426c01441ce7c5453efc6a@dsv.su.se> References: <79fcd6c08e426c01441ce7c5453efc6a@dsv.su.se> Message-ID: <52CA6778.1040902@donders.ru.nl> Hi Victoria, exactly, since the rank of your matrix is reduced, you need to remove one channel from your data before computing the connectivity. I am not sure whether it is best to compute EEG-connectivity with average-referenced data or with a single channel reference. In case of a single-channel reference, you can of course remove the reference channel, so that'd be the easiest in that sense. Maybe check http://www.ncbi.nlm.nih.gov/pubmed/10619414 and related papers and decide for yourself how to reference ;) Best, Jörn On 1/3/2014 4:38 PM, Victoria Schröder wrote: > Hello > > I am trying to do a connectivity analysis with Fieldtrip. I recorded > the EEG data with a BioSemi system without choosing a reference channel. > Thus i need to select a reference in Fieldtrip. I did that during > ft_preprocessing(cfg) by using the following code: > cfg.reref='yes'; > cfg.refchannel='all'; > Data=ft_preprocessing(cfg); > > however when i later want to do the ft_mvaranalysis(cfg, Data) i get > the following error: > Matrix must be positive definite > > I read that this error probably occurs because the cfg.reref procedure > changes the ranks of the data matrix.However, i need to rereference my > data. > > Do somebody know a solution? > > All the best and thank you in advance > Victoria > _______________________________________________ > 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 victorias at dsv.su.se Mon Jan 6 14:18:19 2014 From: victorias at dsv.su.se (=?UTF-8?Q?Victoria_Schr=C3=B6der?=) Date: Mon, 06 Jan 2014 14:18:19 +0100 Subject: [FieldTrip] connectivity analysis with rereferenced EEG data In-Reply-To: <52CA6778.1040902@donders.ru.nl> References: <79fcd6c08e426c01441ce7c5453efc6a@dsv.su.se> <52CA6778.1040902@donders.ru.nl> Message-ID: <2d24d3dbe9d30f92b991b39ba51b4a1f@dsv.su.se> Thank you very much Jörn! Have a nice day Best Victoria 2014-01-06 09:21 skrev Jörn M. Horschig: > Hi Victoria, > > exactly, since the rank of your matrix is reduced, you need to remove > one channel from your data before computing the connectivity. I am > not > sure whether it is best to compute EEG-connectivity with > average-referenced data or with a single channel reference. In case > of > a single-channel reference, you can of course remove the reference > channel, so that'd be the easiest in that sense. Maybe check > http://www.ncbi.nlm.nih.gov/pubmed/10619414 and related papers and > decide for yourself how to reference ;) > > Best, > Jörn > > > On 1/3/2014 4:38 PM, Victoria Schröder wrote: >> Hello >> >> I am trying to do a connectivity analysis with Fieldtrip. I recorded >> the EEG data with a BioSemi system without choosing a reference >> channel. >> Thus i need to select a reference in Fieldtrip. I did that during >> ft_preprocessing(cfg) by using the following code: >> cfg.reref='yes'; >> cfg.refchannel='all'; >> Data=ft_preprocessing(cfg); >> >> however when i later want to do the ft_mvaranalysis(cfg, Data) i get >> the following error: >> Matrix must be positive definite >> >> I read that this error probably occurs because the cfg.reref >> procedure changes the ranks of the data matrix.However, i need to >> rereference my data. >> >> Do somebody know a solution? >> >> All the best and thank you in advance >> Victoria >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Mon Jan 6 15:22:54 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 06 Jan 2014 15:22:54 +0100 Subject: [FieldTrip] Job vacancy in Kleve, Germany Message-ID: <52CABC3E.2020101@donders.ru.nl> Forwarded message: Please find enclosed a job vacancy at the Rhine-Waal University of Applied Sciences in Germany for a Research Assistant (Wissenschaftliche/r Mitarbeiter/in für digitale Signaverarbeitung und Datenfusion mit Schwerpunkt in dem Bereich BCI) in German Language. -- 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 -------------- A non-text attachment was scrubbed... Name: Ausschreibung_13_F1_13.pdf Type: application/pdf Size: 47747 bytes Desc: not available URL: From mje.mads at gmail.com Mon Jan 6 21:26:56 2014 From: mje.mads at gmail.com (Mads Jensen) Date: Mon, 06 Jan 2014 21:26:56 +0100 Subject: [FieldTrip] cannot combine planar grads with ft_combineplaner In-Reply-To: References: <52C694AA.3000903@gmail.com> Message-ID: <52CB1190.4030002@gmail.com> Hi Gianpaolo, Thanks, that is good to know and much appreciated your two €-cents. best, mads On 01/03/2014 03:09 PM, Demarchi, Gianpaolo wrote: > Hi Mads, > you’re not alone! > In fact I was going to open a bug on that these days, since I’m getting > similar (non) results. > > With a previous ft version (6499, so more than one year old), everything > seems to work fine, i.e. I get (for a Vectorview 306 channel input) > as a ft_combineplanar output: > > avgdatacmbOLD = > > time: [1x1537 double] > label: {204x1 cell} > grad: [1x1 struct] > cfg: [1x1 struct] > fsample: 256 > sampleinfo: [1 1537] > avg: [204x1537 double] > dimord: 'chan_time' > > so, correctly combined, whereas if I do the same with a recent (svn-ed) > version, with the same input, I get: > > avgdatacmb = > > time: [1x1537 double] > label: {306x1 cell} > grad: [1x1 struct] > cfg: [1x1 struct] > fsample: 256 > sampleinfo: [1 1537] > avg: [306x1537 double] > dimord: ‘chan_time' > > so I get back my original, non combined, 306 channels … > > I tried to track the problem before opening a bug, and it seems that the > problem lays in my input data label, which is: > > >> avgdata.label > > ans = > > 'MEG0113' > 'MEG0112' > 'MEG0111' > > etc … > > The problem seems to be around lines 102-ff of ft_combineplanar, > since ft_senstype(data) on my data wrongly returns ‘neuromag306’ ( that > are in principle ‘MEG 0113’ etc ...) instead of ‘neuromag306alt’ ( > ‘MEG0113’ without spaces), and then in the following two lines > sel_dH/sel_dV are empty, since there’s never a match between my data > label (‘MEG0113’ …) and the output of ft_senstype/ft_senslabel (‘MEG > 0113’ … with spaces). > So, there’s something wrong in the ft_senstype step, but I didn’t have > time to fully track it … > @roboos: am I missing something obvious, or should I file a bug!? > > My two €-cents, > Gianpaolo > > > Il giorno 03/gen/2014, alle ore 11:44, Mads Jensen > ha scritto: > >> Hi all, >> >> I have a problem with ft_combineplanar. It does not seem to combine the >> planar gradiometors when called. >> >> I have tried with timelocked data and epoched data, both are the same. >> However, grandaveraged data (ft_timelockgrandaverage) create a structure >> with combined data. Does anybody have an idea what the problem might be >> or how I can find the problem? >> >> I have Neuromag Triux data and is using the most recent Fieldtrip from >> the git-repo. >> >> best wish, >> mads >> _______________________________________________ >> 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 bertram0611 at pku.edu.cn Tue Jan 7 09:42:02 2014 From: bertram0611 at pku.edu.cn (=?utf-8?B?6JSh5p6X?=) Date: Tue, 7 Jan 2014 16:42:02 +0800 (CST) Subject: [FieldTrip] =?gbk?q?How_to_plot_ERP_waveforms?= Message-ID: <836381241.21725.1389084122918.JavaMail.root@bj-mail07.pku.edu.cn> Dear fieldtripers, I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: %%preprocessing 40 subjects nsubjects = [1:40]; for i=1:length (nsubjects) j = nsubjects(i); cfg = []; cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); cfg.trialdef.eventtype = 'trial'; cfg.trialdef.eventvalue = [14]; %markers cfg = ft_definetrial(cfg); cfg.channel = {'all'}; data_14 = ft_preprocessing(cfg); cfg.trialdef.eventvalue = [24]; %markers cfg = ft_definetrial(cfg); cfg.channel = {'all'}; data_24 = ft_preprocessing(cfg); cfg.trialdef.eventvalue = [34]; %markers cfg = ft_definetrial(cfg); cfg.channel = {'all'}; data_34 = ft_preprocessing(cfg); cfg.trialdef.eventvalue = [44]; %markers cfg = ft_definetrial(cfg); cfg.channel = {'all'}; data_44 = ft_preprocessing(cfg); outfil = strcat('/EEG/data_s', sprintf('%02d', j)); save(outfil, 'data_14','data_24','data_34','data_44'); clear data_14* data_24* data_34* data_44*; end %% calculate the ERP of each subject nsubject = [1:40]; for i=1:length (nsubject) j=nsubject(1,i); load (sprintf('/EEG/data_s%02d',j)); cfg = []; cfg.latency = [-0.2 1.0]; cfg.covariance = 'no'; cfg.blcovariance = 'no'; avg_14=ft_timelockanalysis(cfg,data_14); avg_24=ft_timelockanalysis(cfg,data_24); avg_34=ft_timelockanalysis(cfg,data_34); avg_44=ft_timelockanalysis(cfg,data_44); cfg = []; cfg.baseline = [-0.2 0]; cfg.baselinetype = 'absolute'; base_14= ft_timelockbaseline(cfg, avg_14); base_24= ft_timelockbaseline(cfg, avg_24); base_34= ft_timelockbaseline(cfg, avg_34); base_44= ft_timelockbaseline(cfg, avg_44); outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); clear avg* data*; end %% calculate the grand average of the 40 subjects %%grand average cfg = []; nsubject = [1:40]; for i=1:length (nsubject) j=nsubject(1,i); load(sprintf('/EEG/baseERP_resp_s%02d',j)); sub_14(i).ERP= avg_14; sub_24(i).ERP= avg_24; sub_34(i).ERP= avg_34; sub_44(i).ERP= avg_44; clear avg* end grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double outfil = strcat('/EEG/n40_grandavgERP_resp'); save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); %%plotting load /EEG/n40_grandavgERP_resp; cfg = []; cfg.layout = 'EEG1010.lay'; cfg.xlim = [-0.2 1.0]; cfg.baseline = 'no'; cfg.interactive = 'no'; cfg.showlabels = 'yes'; cfg.colorbar = 'yes'; figure; ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); -- Lin Cai Department of Psychology, Peking University, Beijing 100871, P.R.China -------------- next part -------------- A non-text attachment was scrubbed... Name: 搜狗截图14年01月07日1641_1.png Type: image/png Size: 25160 bytes Desc: not available URL: From eelke.spaak at donders.ru.nl Tue Jan 7 09:47:42 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 7 Jan 2014 09:47:42 +0100 Subject: [FieldTrip] How to plot ERP waveforms In-Reply-To: <836381241.21725.1389084122918.JavaMail.root@bj-mail07.pku.edu.cn> References: <836381241.21725.1389084122918.JavaMail.root@bj-mail07.pku.edu.cn> Message-ID: Dear Lin Cai, Could it be that the range of values is very different across the four input arguments? You could check the max(tl.avg(:)) and min(tl.avg(:)) of each of the four structures to verify this. While you're at it, I would also check for NaNs. Best, Eelke On 7 January 2014 09:42, 蔡林 wrote: > Dear fieldtripers, > > I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: > > > %%preprocessing 40 subjects > nsubjects = [1:40]; > for i=1:length (nsubjects) > j = nsubjects(i); > cfg = []; > cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); > cfg.trialdef.eventtype = 'trial'; > cfg.trialdef.eventvalue = [14]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_14 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [24]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_24 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [34]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_34 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [44]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_44 = ft_preprocessing(cfg); > > outfil = strcat('/EEG/data_s', sprintf('%02d', j)); > save(outfil, 'data_14','data_24','data_34','data_44'); > clear data_14* data_24* data_34* data_44*; > end > %% calculate the ERP of each subject > nsubject = [1:40]; > > for i=1:length (nsubject) > j=nsubject(1,i); > load (sprintf('/EEG/data_s%02d',j)); > > cfg = []; > cfg.latency = [-0.2 1.0]; > cfg.covariance = 'no'; > cfg.blcovariance = 'no'; > > avg_14=ft_timelockanalysis(cfg,data_14); > avg_24=ft_timelockanalysis(cfg,data_24); > avg_34=ft_timelockanalysis(cfg,data_34); > avg_44=ft_timelockanalysis(cfg,data_44); > > cfg = []; > cfg.baseline = [-0.2 0]; > cfg.baselinetype = 'absolute'; > base_14= ft_timelockbaseline(cfg, avg_14); > base_24= ft_timelockbaseline(cfg, avg_24); > base_34= ft_timelockbaseline(cfg, avg_34); > base_44= ft_timelockbaseline(cfg, avg_44); > > outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); > save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); > clear avg* data*; > end > %% calculate the grand average of the 40 subjects > %%grand average > cfg = []; > nsubject = [1:40]; > > for i=1:length (nsubject) > j=nsubject(1,i); > load(sprintf('/EEG/baseERP_resp_s%02d',j)); > > sub_14(i).ERP= avg_14; > sub_24(i).ERP= avg_24; > sub_34(i).ERP= avg_34; > sub_44(i).ERP= avg_44; > clear avg* > end > > grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C > grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer > grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic > grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double > > outfil = strcat('/EEG/n40_grandavgERP_resp'); > save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); > %%plotting > load /EEG/n40_grandavgERP_resp; > > cfg = []; > cfg.layout = 'EEG1010.lay'; > cfg.xlim = [-0.2 1.0]; > > cfg.baseline = 'no'; > cfg.interactive = 'no'; > cfg.showlabels = 'yes'; > cfg.colorbar = 'yes'; > > figure; > ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); > > > -- > Lin Cai > Department of Psychology, Peking University, Beijing 100871, P.R.China > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Tue Jan 7 10:02:46 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Tue, 07 Jan 2014 10:02:46 +0100 Subject: [FieldTrip] How to plot ERP waveforms In-Reply-To: <836381241.21725.1389084122918.JavaMail.root@bj-mail07.pku.edu.cn> References: <836381241.21725.1389084122918.JavaMail.root@bj-mail07.pku.edu.cn> Message-ID: <52CBC2B6.30300@donders.ru.nl> Hi, tricky problem, and a very nasty one, but it's a simple one in the end ;) Once you call ft_definetrial you get back a cfg with a .trl matrix. Upon the next call to ft_definetrial, FieldTrip checks for the presence of cfg.trl, and if so returns immediately (because ft_definetrial has been called before). Thus, in the beginning when you compute data_14, data_24, etc, they will all be based on the same trl. Therefore, the same data will be computed and all four plots will overlap. You need to change the name of the output argument for each ft_definetrial call to be unique to resolve this, something like: cfg_14 = ft_definetrial(cfg); cfg_14.channel = {'all'}; data_14 = ft_preprocessing(cfg_14); cfg.trialdef.eventvalue = [24]; %markers cfg_24 = ft_definetrial(cfg); cfg_24.channel = {'all'}; data_24 = ft_preprocessing(cfg_24); Best, Jörn On 1/7/2014 9:42 AM, 蔡林 wrote: > Dear fieldtripers, > > I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: > > > %%preprocessing 40 subjects > nsubjects = [1:40]; > for i=1:length (nsubjects) > j = nsubjects(i); > cfg = []; > cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); > cfg.trialdef.eventtype = 'trial'; > cfg.trialdef.eventvalue = [14]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_14 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [24]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_24 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [34]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_34 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [44]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_44 = ft_preprocessing(cfg); > > outfil = strcat('/EEG/data_s', sprintf('%02d', j)); > save(outfil, 'data_14','data_24','data_34','data_44'); > clear data_14* data_24* data_34* data_44*; > end > %% calculate the ERP of each subject > nsubject = [1:40]; > > for i=1:length (nsubject) > j=nsubject(1,i); > load (sprintf('/EEG/data_s%02d',j)); > > cfg = []; > cfg.latency = [-0.2 1.0]; > cfg.covariance = 'no'; > cfg.blcovariance = 'no'; > > avg_14=ft_timelockanalysis(cfg,data_14); > avg_24=ft_timelockanalysis(cfg,data_24); > avg_34=ft_timelockanalysis(cfg,data_34); > avg_44=ft_timelockanalysis(cfg,data_44); > > cfg = []; > cfg.baseline = [-0.2 0]; > cfg.baselinetype = 'absolute'; > base_14= ft_timelockbaseline(cfg, avg_14); > base_24= ft_timelockbaseline(cfg, avg_24); > base_34= ft_timelockbaseline(cfg, avg_34); > base_44= ft_timelockbaseline(cfg, avg_44); > > outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); > save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); > clear avg* data*; > end > %% calculate the grand average of the 40 subjects > %%grand average > cfg = []; > nsubject = [1:40]; > > for i=1:length (nsubject) > j=nsubject(1,i); > load(sprintf('/EEG/baseERP_resp_s%02d',j)); > > sub_14(i).ERP= avg_14; > sub_24(i).ERP= avg_24; > sub_34(i).ERP= avg_34; > sub_44(i).ERP= avg_44; > clear avg* > end > > grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C > grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer > grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic > grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double > > outfil = strcat('/EEG/n40_grandavgERP_resp'); > save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); > %%plotting > load /EEG/n40_grandavgERP_resp; > > cfg = []; > cfg.layout = 'EEG1010.lay'; > cfg.xlim = [-0.2 1.0]; > > cfg.baseline = 'no'; > cfg.interactive = 'no'; > cfg.showlabels = 'yes'; > cfg.colorbar = 'yes'; > > figure; > ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); > > > > > _______________________________________________ > 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 bertram0611 at pku.edu.cn Tue Jan 7 11:50:44 2014 From: bertram0611 at pku.edu.cn (=?utf-8?B?6JSh5p6X?=) Date: Tue, 7 Jan 2014 18:50:44 +0800 (CST) Subject: [FieldTrip] =?utf-8?b?5Zue5aSN77yaIFJlOiAgSG93IHRvIHBsb3QgRVJQ?= =?utf-8?q?_waveforms?= In-Reply-To: <52CBC2B6.30300@donders.ru.nl> Message-ID: <290894445.22433.1389091844555.JavaMail.root@bj-mail07.pku.edu.cn> Hi, I can run my codes according to what you told me. And I saw four conditions in a figure. Thanks for your help. But there are still something wrong with my codes. Because I saw warnings in the Command Window in Matlab. As follows: Warning: the trial definition in the configuration is inconsistent with the actual data > In utilities\private\warning_once at 158 In utilities\private\fixsampleinfo at 68 In ft_datatype_raw at 154 In ft_checkdata at 298 In ft_preprocessing at 240 In outputplot at 5 Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording > In utilities\private\warning_once at 158 In utilities\private\fixsampleinfo at 79 In ft_datatype_raw at 154 In ft_checkdata at 298 In ft_preprocessing at 240 In outputplot at 5 preprocessing preprocessing trial 1 from 1 the call to "ft_preprocessing" took 0 seconds ******** Why the data were preprocessed from trial 1 to 1???? Am I right in the whole codes? Thank you in advance. Lin Cai ----- 原始邮件 ----- 发件人: Jörn M. Horschig 收件人: FieldTrip discussion list 已发送邮件: Tue, 07 Jan 2014 17:02:46 +0800 (CST) 主题: Re: [FieldTrip] How to plot ERP waveforms Hi, tricky problem, and a very nasty one, but it's a simple one in the end ;) Once you call ft_definetrial you get back a cfg with a .trl matrix. Upon the next call to ft_definetrial, FieldTrip checks for the presence of cfg.trl, and if so returns immediately (because ft_definetrial has been called before). Thus, in the beginning when you compute data_14, data_24, etc, they will all be based on the same trl. Therefore, the same data will be computed and all four plots will overlap. You need to change the name of the output argument for each ft_definetrial call to be unique to resolve this, something like: cfg_14 = ft_definetrial(cfg); cfg_14.channel = {'all'}; data_14 = ft_preprocessing(cfg_14); cfg.trialdef.eventvalue = [24]; %markers cfg_24 = ft_definetrial(cfg); cfg_24.channel = {'all'}; data_24 = ft_preprocessing(cfg_24); Best, Jörn On 1/7/2014 9:42 AM, 蔡林 wrote: > Dear fieldtripers, > > I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: > > > %%preprocessing 40 subjects > nsubjects = [1:40]; > for i=1:length (nsubjects) > j = nsubjects(i); > cfg = []; > cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); > cfg.trialdef.eventtype = 'trial'; > cfg.trialdef.eventvalue = [14]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_14 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [24]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_24 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [34]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_34 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [44]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_44 = ft_preprocessing(cfg); > > outfil = strcat('/EEG/data_s', sprintf('%02d', j)); > save(outfil, 'data_14','data_24','data_34','data_44'); > clear data_14* data_24* data_34* data_44*; > end > %% calculate the ERP of each subject > nsubject = [1:40]; > > for i=1:length (nsubject) > j=nsubject(1,i); > load (sprintf('/EEG/data_s%02d',j)); > > cfg = []; > cfg.latency = [-0.2 1.0]; > cfg.covariance = 'no'; > cfg.blcovariance = 'no'; > > avg_14=ft_timelockanalysis(cfg,data_14); > avg_24=ft_timelockanalysis(cfg,data_24); > avg_34=ft_timelockanalysis(cfg,data_34); > avg_44=ft_timelockanalysis(cfg,data_44); > > cfg = []; > cfg.baseline = [-0.2 0]; > cfg.baselinetype = 'absolute'; > base_14= ft_timelockbaseline(cfg, avg_14); > base_24= ft_timelockbaseline(cfg, avg_24); > base_34= ft_timelockbaseline(cfg, avg_34); > base_44= ft_timelockbaseline(cfg, avg_44); > > outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); > save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); > clear avg* data*; > end > %% calculate the grand average of the 40 subjects > %%grand average > cfg = []; > nsubject = [1:40]; > > for i=1:length (nsubject) > j=nsubject(1,i); > load(sprintf('/EEG/baseERP_resp_s%02d',j)); > > sub_14(i).ERP= avg_14; > sub_24(i).ERP= avg_24; > sub_34(i).ERP= avg_34; > sub_44(i).ERP= avg_44; > clear avg* > end > > grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C > grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer > grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic > grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double > > outfil = strcat('/EEG/n40_grandavgERP_resp'); > save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); > %%plotting > load /EEG/n40_grandavgERP_resp; > > cfg = []; > cfg.layout = 'EEG1010.lay'; > cfg.xlim = [-0.2 1.0]; > > cfg.baseline = 'no'; > cfg.interactive = 'no'; > cfg.showlabels = 'yes'; > cfg.colorbar = 'yes'; > > figure; > ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); > > > > > _______________________________________________ > 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 -- Lin Cai Department of Psychology, Peking University, Beijing 100871, P.R.China From jm.horschig at donders.ru.nl Tue Jan 7 12:12:31 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Tue, 07 Jan 2014 12:12:31 +0100 Subject: [FieldTrip] =?utf-8?b?5Zue5aSN77yaIFJlOiAgSG93IHRvIHBsb3QgRVJQ?= =?utf-8?q?_waveforms?= In-Reply-To: <290894445.22433.1389091844555.JavaMail.root@bj-mail07.pku.edu.cn> References: <290894445.22433.1389091844555.JavaMail.root@bj-mail07.pku.edu.cn> Message-ID: <52CBE11F.3030005@donders.ru.nl> Hi Lin Cai, check whether your trl-matrix (matrices) makes sense. The error means that e.g. according to the sampleinfo there should be a different number of trials than your data contains or stuff the like. So, just at it says, some inconsistency between the sampleinfo field (which is part of the trl-matrix) and your data. Best, Jörn On 1/7/2014 11:50 AM, 蔡林 wrote: > Hi, > > I can run my codes according to what you told me. And I saw four conditions in a figure. Thanks for your help. > > But there are still something wrong with my codes. Because I saw warnings in the Command Window in Matlab. > > As follows: > > Warning: the trial definition in the configuration is inconsistent with the actual data >> In utilities\private\warning_once at 158 > In utilities\private\fixsampleinfo at 68 > In ft_datatype_raw at 154 > In ft_checkdata at 298 > In ft_preprocessing at 240 > In outputplot at 5 > Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a > continuous recording >> In utilities\private\warning_once at 158 > In utilities\private\fixsampleinfo at 79 > In ft_datatype_raw at 154 > In ft_checkdata at 298 > In ft_preprocessing at 240 > In outputplot at 5 > preprocessing > preprocessing trial 1 from 1 > > the call to "ft_preprocessing" took 0 seconds > > ******** > Why the data were preprocessed from trial 1 to 1???? > Am I right in the whole codes? > > Thank you in advance. > > Lin Cai > > ----- 原始邮件 ----- > 发件人: Jörn M. Horschig > 收件人: FieldTrip discussion list > 已发送邮件: Tue, 07 Jan 2014 17:02:46 +0800 (CST) > 主题: Re: [FieldTrip] How to plot ERP waveforms > > Hi, > > tricky problem, and a very nasty one, but it's a simple one in the end ;) > > Once you call ft_definetrial you get back a cfg with a .trl matrix. Upon > the next call to ft_definetrial, FieldTrip checks for the presence of > cfg.trl, and if so returns immediately (because ft_definetrial has been > called before). Thus, in the beginning when you compute data_14, > data_24, etc, they will all be based on the same trl. Therefore, the > same data will be computed and all four plots will overlap. > You need to change the name of the output argument for each > ft_definetrial call to be unique to resolve this, something like: > > > cfg_14 = ft_definetrial(cfg); > cfg_14.channel = {'all'}; > data_14 = ft_preprocessing(cfg_14); > > cfg.trialdef.eventvalue = [24]; %markers > cfg_24 = ft_definetrial(cfg); > cfg_24.channel = {'all'}; > data_24 = ft_preprocessing(cfg_24); > > > > Best, > Jörn > > On 1/7/2014 9:42 AM, 蔡林 wrote: >> Dear fieldtripers, >> >> I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: >> >> >> %%preprocessing 40 subjects >> nsubjects = [1:40]; >> for i=1:length (nsubjects) >> j = nsubjects(i); >> cfg = []; >> cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); >> cfg.trialdef.eventtype = 'trial'; >> cfg.trialdef.eventvalue = [14]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_14 = ft_preprocessing(cfg); >> >> cfg.trialdef.eventvalue = [24]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_24 = ft_preprocessing(cfg); >> >> cfg.trialdef.eventvalue = [34]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_34 = ft_preprocessing(cfg); >> >> cfg.trialdef.eventvalue = [44]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_44 = ft_preprocessing(cfg); >> >> outfil = strcat('/EEG/data_s', sprintf('%02d', j)); >> save(outfil, 'data_14','data_24','data_34','data_44'); >> clear data_14* data_24* data_34* data_44*; >> end >> %% calculate the ERP of each subject >> nsubject = [1:40]; >> >> for i=1:length (nsubject) >> j=nsubject(1,i); >> load (sprintf('/EEG/data_s%02d',j)); >> >> cfg = []; >> cfg.latency = [-0.2 1.0]; >> cfg.covariance = 'no'; >> cfg.blcovariance = 'no'; >> >> avg_14=ft_timelockanalysis(cfg,data_14); >> avg_24=ft_timelockanalysis(cfg,data_24); >> avg_34=ft_timelockanalysis(cfg,data_34); >> avg_44=ft_timelockanalysis(cfg,data_44); >> >> cfg = []; >> cfg.baseline = [-0.2 0]; >> cfg.baselinetype = 'absolute'; >> base_14= ft_timelockbaseline(cfg, avg_14); >> base_24= ft_timelockbaseline(cfg, avg_24); >> base_34= ft_timelockbaseline(cfg, avg_34); >> base_44= ft_timelockbaseline(cfg, avg_44); >> >> outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); >> save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); >> clear avg* data*; >> end >> %% calculate the grand average of the 40 subjects >> %%grand average >> cfg = []; >> nsubject = [1:40]; >> >> for i=1:length (nsubject) >> j=nsubject(1,i); >> load(sprintf('/EEG/baseERP_resp_s%02d',j)); >> >> sub_14(i).ERP= avg_14; >> sub_24(i).ERP= avg_24; >> sub_34(i).ERP= avg_34; >> sub_44(i).ERP= avg_44; >> clear avg* >> end >> >> grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C >> grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer >> grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic >> grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double >> >> outfil = strcat('/EEG/n40_grandavgERP_resp'); >> save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); >> %%plotting >> load /EEG/n40_grandavgERP_resp; >> >> cfg = []; >> cfg.layout = 'EEG1010.lay'; >> cfg.xlim = [-0.2 1.0]; >> >> cfg.baseline = 'no'; >> cfg.interactive = 'no'; >> cfg.showlabels = 'yes'; >> cfg.colorbar = 'yes'; >> >> figure; >> ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); >> >> >> >> >> _______________________________________________ >> 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 nheugel89 at gmail.com Tue Jan 7 19:12:50 2014 From: nheugel89 at gmail.com (Nicholas Heugel) Date: Tue, 7 Jan 2014 12:12:50 -0600 Subject: [FieldTrip] Error after MNE In-Reply-To: References: <17F395A3-5627-4410-9030-97FF73B52C9B@donders.ru.nl> Message-ID: Do you know if there is any update on the bug I encountered? Does it look like an issue with setting up the analysis or is it an actual bug in the code? Thanks for your assistance. Nicholas On Wed, Dec 11, 2013 at 7:42 PM, Nicholas Heugel wrote: > I did as you asked. I put it in the core category with the error as the > title > > > On Wed, Dec 11, 2013 at 2:04 AM, jan-mathijs schoffelen < > jan.schoffelen at donders.ru.nl> wrote: > >> Hi Nicholas, >> >> It seems that the fif files lacks some information that FieldTrip assumes >> to be present. I would say that this can only be caused by the fact that >> the version of mne_make_source_space you used does not write the triangle >> area information into the fif file. Could you go to bugzilla.fcdonders.nl, >> create yourself an account, and file the issue as a bug? Please then also >> upload the fif-file you mentioned. I'll have a look at it and make the >> ft_read_headshape function more robust. In the mean time you could comment >> out line 421. >> >> Best, >> Jan-Mathijs >> >> >> >> On Dec 10, 2013, at 6:23 PM, Nicholas Heugel wrote: >> >> I a trying to go through the tutorial for the >> >> - Source reconstruction of event-related fields using minimum-norm >> estimate >> >> I am able to run everything up to the MNE with no problem, and it >> seems like the MNE portion works. But when I run the command bnd = >> ft_read_headshape('Subject01-oct-6-src.fif', 'format', 'mne_source'); >> and then plot it to visualize the source space. I get the error Reference >> to non-existent field 'use_tri_area'. Error in ft_read_headshape (line 421) >> shape.area = [src(1).use_tri_area(:); src(2).use_tri_area(:)]; >> I have looked on this site and online and can't find an explanation >> of what is wrong or how to fix the problem. Any help would be appreciated. >> I am using an Anatomical MRI scan for the head model analysis, the skull >> is present and I manually am Identifying the fiducials. Also, a few >> steps earlier it had me check the white matter segmentation done by >> Freesurfer and that worked fine and what I get closely resembles the >> tutorial. So I think the problem is somewhere in the MNE I am just not >> sure where. Any help would be appreciated. Thank you for your time. >> >> Nicholas >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 7 19:28:40 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 7 Jan 2014 19:28:40 +0100 Subject: [FieldTrip] Error after MNE In-Reply-To: References: <17F395A3-5627-4410-9030-97FF73B52C9B@donders.ru.nl> Message-ID: <0E646317-B08F-4C53-8D47-9D06A08BD5F0@donders.ru.nl> I don't know: did you follow up on bugzilla bug 2419? As mentioned in my earlier mail, for the time being you can work around it by commenting out line 421 in your local version of ft_read_headshape. Jan-Mathijs On Jan 7, 2014, at 7:12 PM, Nicholas Heugel wrote: > Do you know if there is any update on the bug I encountered? Does it look like an issue with setting up the analysis or is it an actual bug in the code? Thanks for your assistance. > > Nicholas > > > On Wed, Dec 11, 2013 at 7:42 PM, Nicholas Heugel wrote: > I did as you asked. I put it in the core category with the error as the title > > > On Wed, Dec 11, 2013 at 2:04 AM, jan-mathijs schoffelen wrote: > Hi Nicholas, > > It seems that the fif files lacks some information that FieldTrip assumes to be present. I would say that this can only be caused by the fact that the version of mne_make_source_space you used does not write the triangle area information into the fif file. Could you go to bugzilla.fcdonders.nl, create yourself an account, and file the issue as a bug? Please then also upload the fif-file you mentioned. I'll have a look at it and make the ft_read_headshape function more robust. In the mean time you could comment out line 421. > > Best, > Jan-Mathijs > > > > On Dec 10, 2013, at 6:23 PM, Nicholas Heugel wrote: > >> I a trying to go through the tutorial for the >> Source reconstruction of event-related fields using minimum-norm estimate >> >> I am able to run everything up to the MNE with no problem, and it seems like the MNE portion works. But when I run the command bnd = ft_read_headshape('Subject01-oct-6-src.fif', 'format', 'mne_source'); >> and then plot it to visualize the source space. I get the error Reference to non-existent field 'use_tri_area'. Error in ft_read_headshape (line 421) shape.area = [src(1).use_tri_area(:); src(2).use_tri_area(:)]; >> I have looked on this site and online and can't find an explanation of what is wrong or how to fix the problem. Any help would be appreciated. I am using an Anatomical MRI scan for the head model analysis, the skull is present and I manually am Identifying the fiducials. Also, a few steps earlier it had me check the white matter segmentation done by Freesurfer and that worked fine and what I get closely resembles the tutorial. So I think the problem is somewhere in the MNE I am just not sure where. Any help would be appreciated. Thank you for your time. >> Nicholas >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From nheugel89 at gmail.com Tue Jan 7 19:31:50 2014 From: nheugel89 at gmail.com (Nicholas Heugel) Date: Tue, 7 Jan 2014 12:31:50 -0600 Subject: [FieldTrip] Error after MNE In-Reply-To: <0E646317-B08F-4C53-8D47-9D06A08BD5F0@donders.ru.nl> References: <17F395A3-5627-4410-9030-97FF73B52C9B@donders.ru.nl> <0E646317-B08F-4C53-8D47-9D06A08BD5F0@donders.ru.nl> Message-ID: Ya I had posted it on bugzilla and I think you had accepted the bug, I was just wondering if you had made any progress on it or determined a cause. Nicholas On Tue, Jan 7, 2014 at 12:28 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > I don't know: did you follow up on bugzilla bug 2419? As mentioned in my > earlier mail, for the time being you can work around it by commenting out > line 421 in your local version of ft_read_headshape. > > Jan-Mathijs > > > > > On Jan 7, 2014, at 7:12 PM, Nicholas Heugel wrote: > > Do you know if there is any update on the bug I encountered? Does it look > like an issue with setting up the analysis or is it an actual bug in the > code? Thanks for your assistance. > > Nicholas > > > On Wed, Dec 11, 2013 at 7:42 PM, Nicholas Heugel wrote: > >> I did as you asked. I put it in the core category with the error as the >> title >> >> >> On Wed, Dec 11, 2013 at 2:04 AM, jan-mathijs schoffelen < >> jan.schoffelen at donders.ru.nl> wrote: >> >>> Hi Nicholas, >>> >>> It seems that the fif files lacks some information that FieldTrip >>> assumes to be present. I would say that this can only be caused by the fact >>> that the version of mne_make_source_space you used does not write the >>> triangle area information into the fif file. Could you go to >>> bugzilla.fcdonders.nl, create yourself an account, and file the issue >>> as a bug? Please then also upload the fif-file you mentioned. I'll have a >>> look at it and make the ft_read_headshape function more robust. In the mean >>> time you could comment out line 421. >>> >>> Best, >>> Jan-Mathijs >>> >>> >>> >>> On Dec 10, 2013, at 6:23 PM, Nicholas Heugel wrote: >>> >>> I a trying to go through the tutorial for the >>> >>> - Source reconstruction of event-related fields using minimum-norm >>> estimate >>> >>> I am able to run everything up to the MNE with no problem, and it >>> seems like the MNE portion works. But when I run the command bnd = >>> ft_read_headshape('Subject01-oct-6-src.fif', 'format', 'mne_source'); >>> and then plot it to visualize the source space. I get the error Reference >>> to non-existent field 'use_tri_area'. Error in ft_read_headshape (line 421) >>> shape.area = [src(1).use_tri_area(:); src(2).use_tri_area(:)]; >>> I have looked on this site and online and can't find an explanation >>> of what is wrong or how to fix the problem. Any help would be appreciated. >>> I am using an Anatomical MRI scan for the head model analysis, the skull >>> is present and I manually am Identifying the fiducials. Also, a few >>> steps earlier it had me check the white matter segmentation done by >>> Freesurfer and that worked fine and what I get closely resembles the >>> tutorial. So I think the problem is somewhere in the MNE I am just not >>> sure where. Any help would be appreciated. Thank you for your time. >>> >>> Nicholas >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bertram0611 at pku.edu.cn Wed Jan 8 12:46:22 2014 From: bertram0611 at pku.edu.cn (=?utf-8?B?6JSh5p6X?=) Date: Wed, 8 Jan 2014 19:46:22 +0800 (CST) Subject: [FieldTrip] =?utf-8?b?5Zue5aSN77yaIFJlOiAg5Zue5aSN77yaIFJlOiAg?= =?utf-8?q?How_to_plot_ERP_waveforms?= In-Reply-To: <52CBE11F.3030005@donders.ru.nl> Message-ID: <956707425.31180.1389181582986.JavaMail.root@bj-mail07.pku.edu.cn> I can not understand what you mean. Please give me some detail infomation about how to solve this problem. ----- 原始邮件 ----- 发件人: Jörn M. Horschig 收件人: FieldTrip discussion list 已发送邮件: Tue, 07 Jan 2014 19:12:31 +0800 (CST) 主题: Re: [FieldTrip] 回复: Re: How to plot ERP waveforms Hi Lin Cai, check whether your trl-matrix (matrices) makes sense. The error means that e.g. according to the sampleinfo there should be a different number of trials than your data contains or stuff the like. So, just at it says, some inconsistency between the sampleinfo field (which is part of the trl-matrix) and your data. Best, Jörn On 1/7/2014 11:50 AM, 蔡林 wrote: > Hi, > > I can run my codes according to what you told me. And I saw four conditions in a figure. Thanks for your help. > > But there are still something wrong with my codes. Because I saw warnings in the Command Window in Matlab. > > As follows: > > Warning: the trial definition in the configuration is inconsistent with the actual data >> In utilities\private\warning_once at 158 > In utilities\private\fixsampleinfo at 68 > In ft_datatype_raw at 154 > In ft_checkdata at 298 > In ft_preprocessing at 240 > In outputplot at 5 > Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a > continuous recording >> In utilities\private\warning_once at 158 > In utilities\private\fixsampleinfo at 79 > In ft_datatype_raw at 154 > In ft_checkdata at 298 > In ft_preprocessing at 240 > In outputplot at 5 > preprocessing > preprocessing trial 1 from 1 > > the call to "ft_preprocessing" took 0 seconds > > ******** > Why the data were preprocessed from trial 1 to 1???? > Am I right in the whole codes? > > Thank you in advance. > > Lin Cai > > ----- 原始邮件 ----- > 发件人: Jörn M. Horschig > 收件人: FieldTrip discussion list > 已发送邮件: Tue, 07 Jan 2014 17:02:46 +0800 (CST) > 主题: Re: [FieldTrip] How to plot ERP waveforms > > Hi, > > tricky problem, and a very nasty one, but it's a simple one in the end ;) > > Once you call ft_definetrial you get back a cfg with a .trl matrix. Upon > the next call to ft_definetrial, FieldTrip checks for the presence of > cfg.trl, and if so returns immediately (because ft_definetrial has been > called before). Thus, in the beginning when you compute data_14, > data_24, etc, they will all be based on the same trl. Therefore, the > same data will be computed and all four plots will overlap. > You need to change the name of the output argument for each > ft_definetrial call to be unique to resolve this, something like: > > > cfg_14 = ft_definetrial(cfg); > cfg_14.channel = {'all'}; > data_14 = ft_preprocessing(cfg_14); > > cfg.trialdef.eventvalue = [24]; %markers > cfg_24 = ft_definetrial(cfg); > cfg_24.channel = {'all'}; > data_24 = ft_preprocessing(cfg_24); > > > > Best, > Jörn > > On 1/7/2014 9:42 AM, 蔡林 wrote: >> Dear fieldtripers, >> >> I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: >> >> >> %%preprocessing 40 subjects >> nsubjects = [1:40]; >> for i=1:length (nsubjects) >> j = nsubjects(i); >> cfg = []; >> cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); >> cfg.trialdef.eventtype = 'trial'; >> cfg.trialdef.eventvalue = [14]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_14 = ft_preprocessing(cfg); >> >> cfg.trialdef.eventvalue = [24]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_24 = ft_preprocessing(cfg); >> >> cfg.trialdef.eventvalue = [34]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_34 = ft_preprocessing(cfg); >> >> cfg.trialdef.eventvalue = [44]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_44 = ft_preprocessing(cfg); >> >> outfil = strcat('/EEG/data_s', sprintf('%02d', j)); >> save(outfil, 'data_14','data_24','data_34','data_44'); >> clear data_14* data_24* data_34* data_44*; >> end >> %% calculate the ERP of each subject >> nsubject = [1:40]; >> >> for i=1:length (nsubject) >> j=nsubject(1,i); >> load (sprintf('/EEG/data_s%02d',j)); >> >> cfg = []; >> cfg.latency = [-0.2 1.0]; >> cfg.covariance = 'no'; >> cfg.blcovariance = 'no'; >> >> avg_14=ft_timelockanalysis(cfg,data_14); >> avg_24=ft_timelockanalysis(cfg,data_24); >> avg_34=ft_timelockanalysis(cfg,data_34); >> avg_44=ft_timelockanalysis(cfg,data_44); >> >> cfg = []; >> cfg.baseline = [-0.2 0]; >> cfg.baselinetype = 'absolute'; >> base_14= ft_timelockbaseline(cfg, avg_14); >> base_24= ft_timelockbaseline(cfg, avg_24); >> base_34= ft_timelockbaseline(cfg, avg_34); >> base_44= ft_timelockbaseline(cfg, avg_44); >> >> outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); >> save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); >> clear avg* data*; >> end >> %% calculate the grand average of the 40 subjects >> %%grand average >> cfg = []; >> nsubject = [1:40]; >> >> for i=1:length (nsubject) >> j=nsubject(1,i); >> load(sprintf('/EEG/baseERP_resp_s%02d',j)); >> >> sub_14(i).ERP= avg_14; >> sub_24(i).ERP= avg_24; >> sub_34(i).ERP= avg_34; >> sub_44(i).ERP= avg_44; >> clear avg* >> end >> >> grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C >> grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer >> grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic >> grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double >> >> outfil = strcat('/EEG/n40_grandavgERP_resp'); >> save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); >> %%plotting >> load /EEG/n40_grandavgERP_resp; >> >> cfg = []; >> cfg.layout = 'EEG1010.lay'; >> cfg.xlim = [-0.2 1.0]; >> >> cfg.baseline = 'no'; >> cfg.interactive = 'no'; >> cfg.showlabels = 'yes'; >> cfg.colorbar = 'yes'; >> >> figure; >> ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); >> >> >> >> >> _______________________________________________ >> 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 -- Lin Cai Department of Psychology, Peking University, Beijing 100871, P.R.China From jm.horschig at donders.ru.nl Wed Jan 8 12:52:38 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Wed, 08 Jan 2014 12:52:38 +0100 Subject: [FieldTrip] =?utf-8?b?5Zue5aSN77yaIFJlOiAg5Zue5aSN77yaIFJlOiAg?= =?utf-8?q?How_to_plot_ERP_waveforms?= In-Reply-To: <956707425.31180.1389181582986.JavaMail.root@bj-mail07.pku.edu.cn> References: <956707425.31180.1389181582986.JavaMail.root@bj-mail07.pku.edu.cn> Message-ID: <52CD3C06.5080002@donders.ru.nl> Hi Lin Cai, you have to solve it yourself by checking your data and cfg. I cannot help with that. Best, Jörn On 1/8/2014 12:46 PM, 蔡林 wrote: > I can not understand what you mean. Please give me some detail infomation about how to solve this problem. > ----- 原始邮件 ----- > 发件人: Jörn M. Horschig > 收件人: FieldTrip discussion list > 已发送邮件: Tue, 07 Jan 2014 19:12:31 +0800 (CST) > 主题: Re: [FieldTrip] 回复: Re: How to plot ERP waveforms > > Hi Lin Cai, > > check whether your trl-matrix (matrices) makes sense. The error means > that e.g. according to the sampleinfo there should be a different number > of trials than your data contains or stuff the like. So, just at it > says, some inconsistency between the sampleinfo field (which is part of > the trl-matrix) and your data. > > Best, > Jörn > > On 1/7/2014 11:50 AM, 蔡林 wrote: >> Hi, >> >> I can run my codes according to what you told me. And I saw four conditions in a figure. Thanks for your help. >> >> But there are still something wrong with my codes. Because I saw warnings in the Command Window in Matlab. >> >> As follows: >> >> Warning: the trial definition in the configuration is inconsistent with the actual data >>> In utilities\private\warning_once at 158 >> In utilities\private\fixsampleinfo at 68 >> In ft_datatype_raw at 154 >> In ft_checkdata at 298 >> In ft_preprocessing at 240 >> In outputplot at 5 >> Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a >> continuous recording >>> In utilities\private\warning_once at 158 >> In utilities\private\fixsampleinfo at 79 >> In ft_datatype_raw at 154 >> In ft_checkdata at 298 >> In ft_preprocessing at 240 >> In outputplot at 5 >> preprocessing >> preprocessing trial 1 from 1 >> >> the call to "ft_preprocessing" took 0 seconds >> >> ******** >> Why the data were preprocessed from trial 1 to 1???? >> Am I right in the whole codes? >> >> Thank you in advance. >> >> Lin Cai >> >> ----- 原始邮件 ----- >> 发件人: Jörn M. Horschig >> 收件人: FieldTrip discussion list >> 已发送邮件: Tue, 07 Jan 2014 17:02:46 +0800 (CST) >> 主题: Re: [FieldTrip] How to plot ERP waveforms >> >> Hi, >> >> tricky problem, and a very nasty one, but it's a simple one in the end ;) >> >> Once you call ft_definetrial you get back a cfg with a .trl matrix. Upon >> the next call to ft_definetrial, FieldTrip checks for the presence of >> cfg.trl, and if so returns immediately (because ft_definetrial has been >> called before). Thus, in the beginning when you compute data_14, >> data_24, etc, they will all be based on the same trl. Therefore, the >> same data will be computed and all four plots will overlap. >> You need to change the name of the output argument for each >> ft_definetrial call to be unique to resolve this, something like: >> >> >> cfg_14 = ft_definetrial(cfg); >> cfg_14.channel = {'all'}; >> data_14 = ft_preprocessing(cfg_14); >> >> cfg.trialdef.eventvalue = [24]; %markers >> cfg_24 = ft_definetrial(cfg); >> cfg_24.channel = {'all'}; >> data_24 = ft_preprocessing(cfg_24); >> >> >> >> Best, >> Jörn >> >> On 1/7/2014 9:42 AM, 蔡林 wrote: >>> Dear fieldtripers, >>> >>> I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: >>> >>> >>> %%preprocessing 40 subjects >>> nsubjects = [1:40]; >>> for i=1:length (nsubjects) >>> j = nsubjects(i); >>> cfg = []; >>> cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); >>> cfg.trialdef.eventtype = 'trial'; >>> cfg.trialdef.eventvalue = [14]; %markers >>> cfg = ft_definetrial(cfg); >>> cfg.channel = {'all'}; >>> data_14 = ft_preprocessing(cfg); >>> >>> cfg.trialdef.eventvalue = [24]; %markers >>> cfg = ft_definetrial(cfg); >>> cfg.channel = {'all'}; >>> data_24 = ft_preprocessing(cfg); >>> >>> cfg.trialdef.eventvalue = [34]; %markers >>> cfg = ft_definetrial(cfg); >>> cfg.channel = {'all'}; >>> data_34 = ft_preprocessing(cfg); >>> >>> cfg.trialdef.eventvalue = [44]; %markers >>> cfg = ft_definetrial(cfg); >>> cfg.channel = {'all'}; >>> data_44 = ft_preprocessing(cfg); >>> >>> outfil = strcat('/EEG/data_s', sprintf('%02d', j)); >>> save(outfil, 'data_14','data_24','data_34','data_44'); >>> clear data_14* data_24* data_34* data_44*; >>> end >>> %% calculate the ERP of each subject >>> nsubject = [1:40]; >>> >>> for i=1:length (nsubject) >>> j=nsubject(1,i); >>> load (sprintf('/EEG/data_s%02d',j)); >>> >>> cfg = []; >>> cfg.latency = [-0.2 1.0]; >>> cfg.covariance = 'no'; >>> cfg.blcovariance = 'no'; >>> >>> avg_14=ft_timelockanalysis(cfg,data_14); >>> avg_24=ft_timelockanalysis(cfg,data_24); >>> avg_34=ft_timelockanalysis(cfg,data_34); >>> avg_44=ft_timelockanalysis(cfg,data_44); >>> >>> cfg = []; >>> cfg.baseline = [-0.2 0]; >>> cfg.baselinetype = 'absolute'; >>> base_14= ft_timelockbaseline(cfg, avg_14); >>> base_24= ft_timelockbaseline(cfg, avg_24); >>> base_34= ft_timelockbaseline(cfg, avg_34); >>> base_44= ft_timelockbaseline(cfg, avg_44); >>> >>> outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); >>> save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); >>> clear avg* data*; >>> end >>> %% calculate the grand average of the 40 subjects >>> %%grand average >>> cfg = []; >>> nsubject = [1:40]; >>> >>> for i=1:length (nsubject) >>> j=nsubject(1,i); >>> load(sprintf('/EEG/baseERP_resp_s%02d',j)); >>> >>> sub_14(i).ERP= avg_14; >>> sub_24(i).ERP= avg_24; >>> sub_34(i).ERP= avg_34; >>> sub_44(i).ERP= avg_44; >>> clear avg* >>> end >>> >>> grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C >>> grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer >>> grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic >>> grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double >>> >>> outfil = strcat('/EEG/n40_grandavgERP_resp'); >>> save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); >>> %%plotting >>> load /EEG/n40_grandavgERP_resp; >>> >>> cfg = []; >>> cfg.layout = 'EEG1010.lay'; >>> cfg.xlim = [-0.2 1.0]; >>> >>> cfg.baseline = 'no'; >>> cfg.interactive = 'no'; >>> cfg.showlabels = 'yes'; >>> cfg.colorbar = 'yes'; >>> >>> figure; >>> ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); >>> >>> >>> >>> >>> _______________________________________________ >>> 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 j.herring at fcdonders.ru.nl Wed Jan 8 15:20:57 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 8 Jan 2014 15:20:57 +0100 (CET) Subject: [FieldTrip] PhD position Ghent University, Belgium Message-ID: <00aa01cf0c7c$d9c35950$8d4a0bf0$@herring@fcdonders.ru.nl> PhD position at the Dept of Experimental Psychology, Ghent University, Belgium We are seeking a highly motivated PhD student for a 4-year position at the Dept. of Experimental Psychology under the supervision of Ruth Krebs and Nico Boehler. One central focus of our labs is the investigation of the interaction between reward processing and cognitive control (see http://users.ugent.be/~rkrebs/index_files/publications.html for related publications). Our department hosts several research groups in the realm of cognitive psychology and cognitive neuroscience, creating a dynamic research environment including regular internal talk series as well as presentations by invited speakers. We have access to state-of-the-art equipment including a research-dedicated 3-tesla MR scanner (Siemens), a 64/128-channel EEG system (Biosemi), as well as an MR-compatible EEG system and TMS. Candidates are expected to have a Master's degree in psychology, (cognitive) neuroscience, or a closely related discipline on the starting date. He or she will mostly carry out behavioral and fMRI experiments, but extensions to EEG (including MR-compatible EEG) are possible. Experience with neuroimaging methods as well as programming skills would be highly appreciated. The starting date is flexible, but preferably in spring 2014. 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 contact information (email) of potential referees to ruth.krebs at ugent.be before February 1st 2014. Ruth Krebs Dept. of Experimental Psychology, Ghent University Henri Dunantlaan 2 9000 Ghent Belgium -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Thu Jan 9 18:56:40 2014 From: luke.bloy at gmail.com (Luke Bloy) Date: Thu, 9 Jan 2014 12:56:40 -0500 Subject: [FieldTrip] Units of ft_dipolefitting Message-ID: Hi, I'd like to check the units returned for the moment returned by the ft_dipolefitting routine. There doesn't seem to be any unit fields in the returned structure. Additionally, ft_compute_leadfield.m doesn't say much about the units. From looking at it I assume the length unit (m/cm/mm) is inherited from the vol and sens objects but I'm not sure about the other units. Thanks. Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jan 10 07:56:52 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 10 Jan 2014 07:56:52 +0100 Subject: [FieldTrip] PhD positions in Freiburg, Germany Message-ID: <52CF99B4.4080102@donders.ru.nl> Forwarded message: University of Freiburg, Germany, has acquired a large research cluster "BrainLinks-BrainTools" within the German Excellence Initiative. Aiming to develop medical technology which directly interacts with the nervous system, it unites the life sciences, engineering, and clinical applications. Within the cluster, PhD positions (100% TV-L E13) are open at the novel lab of Michael Tangermann, addressing research topics in the context of Brain-Computer Interfaces (BCI) and stroke rehabilitation: 1. Development of theories (statistics, mathematics) and algorithms in the field of machine learning for BCI applications, with special emphasis on adaptive and invariant methods for the decoding of mental states and brain networks in real-time. 2. Paradigm development, software implementation, execution and analysis of EEG experiments with (German speaking) patients and healthy users. Requirements: * excellent MSc / Diploma degree * a major in e.g. machine learning / artificial intelligence, cognitive science, neuroscience, mathematics, computer science / informatics, physics * a strong interest in the combination of theoretical and experimental research in a highly interdisciplinary field. Starting date: asap. For further information please read the full PhD call available at: > Contact: Dr. Michael Tangermann, michael.tangermann at blbt.uni-freiburg.de > -- 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 fgrande at cbs.mpg.de Fri Jan 10 15:54:56 2014 From: fgrande at cbs.mpg.de (Federico Grande) Date: Fri, 10 Jan 2014 15:54:56 +0100 (CET) Subject: [FieldTrip] SVD and ICA Message-ID: <50243943.4859.1389365696412.JavaMail.root@zimbra> Hello everyone, In order to remove the artefacts like blink eyes or hearbeat, I wanted to apply ICA to my data. I've been told that is better to apply first SVD and then ICA, but I don't really know how to apply it. What do you recommend me in order to do it? I've not found any tutorial for doing it. All help and information ins greatly welcomed. Thank you very much, King Regards, Federico Grande From d.lozanosoldevilla at fcdonders.ru.nl Fri Jan 10 16:13:13 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Fri, 10 Jan 2014 16:13:13 +0100 (CET) Subject: [FieldTrip] SVD and ICA In-Reply-To: <50243943.4859.1389365696412.JavaMail.root@zimbra> Message-ID: <1280547173.4657638.1389366793780.JavaMail.root@sculptor.zimbra.ru.nl> Hi Federico, You might want to have a look to the different ICA algorithms ft_componentanalysis has and see how to choose the proper option. For example, if you select cfg.method='runica' then cfg.runica.pca = number of components you want to reduce your data. Check help ft_componentanalysis for details best, Diego ----- Original Message ----- > From: "Federico Grande" > To: fieldtrip at science.ru.nl > Sent: Friday, 10 January, 2014 3:54:56 PM > Subject: [FieldTrip] SVD and ICA > Hello everyone, > > In order to remove the artefacts like blink eyes or hearbeat, I wanted > to apply ICA to my data. I've been told that is better to apply first > SVD and then ICA, but I don't really know how to apply it. What do you > recommend me in order to do it? I've not found any tutorial for doing > it. All help and information ins greatly welcomed. > > Thank you very much, > > King Regards, > > Federico Grande > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ From fgrande at cbs.mpg.de Fri Jan 10 18:14:28 2014 From: fgrande at cbs.mpg.de (Federico Grande) Date: Fri, 10 Jan 2014 18:14:28 +0100 (CET) Subject: [FieldTrip] SVD and ICA In-Reply-To: <1280547173.4657638.1389366793780.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1427843396.5968.1389374068812.JavaMail.root@zimbra> Aham, that is what I've done, do the runica method, but I didn´t use the parameter pca: pca are not principal component analysis associated to SSP? I have used SSS (signal space separation) instead of SSP. It would work also? And also I don´t know what number of components do I want to reduce my data. How can I know which is the optimal number? Thank you Diego, Federico ----- Original Message ----- From: "Lozano Soldevilla, D. (Diego)" To: "FieldTrip discussion list" Sent: Friday, January 10, 2014 4:13:13 PM Subject: Re: [FieldTrip] SVD and ICA Hi Federico, You might want to have a look to the different ICA algorithms ft_componentanalysis has and see how to choose the proper option. For example, if you select cfg.method='runica' then cfg.runica.pca = number of components you want to reduce your data. Check help ft_componentanalysis for details best, Diego ----- Original Message ----- > From: "Federico Grande" > To: fieldtrip at science.ru.nl > Sent: Friday, 10 January, 2014 3:54:56 PM > Subject: [FieldTrip] SVD and ICA > Hello everyone, > > In order to remove the artefacts like blink eyes or hearbeat, I wanted > to apply ICA to my data. I've been told that is better to apply first > SVD and then ICA, but I don't really know how to apply it. What do you > recommend me in order to do it? I've not found any tutorial for doing > it. All help and information ins greatly welcomed. > > Thank you very much, > > King Regards, > > Federico Grande > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From aestnth at hum.au.dk Fri Jan 10 18:18:03 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Fri, 10 Jan 2014 18:18:03 +0100 Subject: [FieldTrip] SVD and ICA Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Fri Jan 10 18:27:17 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Fri, 10 Jan 2014 18:27:17 +0100 (CET) Subject: [FieldTrip] SVD and ICA In-Reply-To: <1427843396.5968.1389374068812.JavaMail.root@zimbra> Message-ID: <1593461380.4660324.1389374837434.JavaMail.root@sculptor.zimbra.ru.nl> Hi Federico, I don't follow you. What's SSP? In any case, what I explained it's the way that I know to reduce data dimensionality prior ICA computation. I don't know a procedure to know optimal number of PCA component but here 25 were used: http://www.ncbi.nlm.nih.gov/pubmed/19699307 best, Diego ----- Original Message ----- > From: "Federico Grande" > To: "Diego Lozano" , "FieldTrip discussion list" > Sent: Friday, 10 January, 2014 6:14:28 PM > Subject: Re: [FieldTrip] SVD and ICA > Aham, that is what I've done, do the runica method, but I didn´t use > the parameter pca: pca are not principal component analysis associated > to SSP? I have used SSS (signal space separation) instead of SSP. It > would work also? And also I don´t know what number of components do I > want to reduce my data. How can I know which is the optimal number? > > Thank you Diego, > > Federico > > ----- Original Message ----- > From: "Lozano Soldevilla, D. (Diego)" > > To: "FieldTrip discussion list" > Sent: Friday, January 10, 2014 4:13:13 PM > Subject: Re: [FieldTrip] SVD and ICA > > Hi Federico, > > You might want to have a look to the different ICA algorithms > ft_componentanalysis has and see how to choose the proper option. For > example, if you select cfg.method='runica' then cfg.runica.pca = > number of components you want to reduce your data. > > Check help ft_componentanalysis for details > > best, > Diego > > > ----- Original Message ----- > > From: "Federico Grande" > > To: fieldtrip at science.ru.nl > > Sent: Friday, 10 January, 2014 3:54:56 PM > > Subject: [FieldTrip] SVD and ICA > > Hello everyone, > > > > In order to remove the artefacts like blink eyes or hearbeat, I > > wanted > > to apply ICA to my data. I've been told that is better to apply > > first > > SVD and then ICA, but I don't really know how to apply it. What do > > you > > recommend me in order to do it? I've not found any tutorial for > > doing > > it. All help and information ins greatly welcomed. > > > > Thank you very much, > > > > King Regards, > > > > Federico Grande > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ From fgrande at cbs.mpg.de Sat Jan 11 12:37:38 2014 From: fgrande at cbs.mpg.de (Federico Grande) Date: Sat, 11 Jan 2014 12:37:38 +0100 (CET) Subject: [FieldTrip] SVD and ICA In-Reply-To: <1593461380.4660324.1389374837434.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <403977934.633.1389440258730.JavaMail.root@zimbra> Hi Diego, I'm sorry, I was probably not clear enough. When you uses SSP (Signal Space Projection), to process the rawdata, it projects the data in 8 or 10 PCA, but when you uses SSS in the rawdata, it has a much higher amount of components , around 150 or almost 200. That is the reason that makes me having no idea about how should I reduce it. Cheers, Federico ----- Mensaje original ----- De: "Lozano Soldevilla, D. (Diego)" Para: "FieldTrip discussion list" Enviados: Viernes, 10 de Enero 2014 18:27:17 Asunto: Re: [FieldTrip] SVD and ICA Hi Federico, I don't follow you. What's SSP? In any case, what I explained it's the way that I know to reduce data dimensionality prior ICA computation. I don't know a procedure to know optimal number of PCA component but here 25 were used: http://www.ncbi.nlm.nih.gov/pubmed/19699307 best, Diego ----- Original Message ----- > From: "Federico Grande" > To: "Diego Lozano" , "FieldTrip discussion list" > Sent: Friday, 10 January, 2014 6:14:28 PM > Subject: Re: [FieldTrip] SVD and ICA > Aham, that is what I've done, do the runica method, but I didn´t use > the parameter pca: pca are not principal component analysis associated > to SSP? I have used SSS (signal space separation) instead of SSP. It > would work also? And also I don´t know what number of components do I > want to reduce my data. How can I know which is the optimal number? > > Thank you Diego, > > Federico > > ----- Original Message ----- > From: "Lozano Soldevilla, D. (Diego)" > > To: "FieldTrip discussion list" > Sent: Friday, January 10, 2014 4:13:13 PM > Subject: Re: [FieldTrip] SVD and ICA > > Hi Federico, > > You might want to have a look to the different ICA algorithms > ft_componentanalysis has and see how to choose the proper option. For > example, if you select cfg.method='runica' then cfg.runica.pca = > number of components you want to reduce your data. > > Check help ft_componentanalysis for details > > best, > Diego > > > ----- Original Message ----- > > From: "Federico Grande" > > To: fieldtrip at science.ru.nl > > Sent: Friday, 10 January, 2014 3:54:56 PM > > Subject: [FieldTrip] SVD and ICA > > Hello everyone, > > > > In order to remove the artefacts like blink eyes or hearbeat, I > > wanted > > to apply ICA to my data. I've been told that is better to apply > > first > > SVD and then ICA, but I don't really know how to apply it. What do > > you > > recommend me in order to do it? I've not found any tutorial for > > doing > > it. All help and information ins greatly welcomed. > > > > Thank you very much, > > > > King Regards, > > > > Federico Grande > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From aestnth at hum.au.dk Sat Jan 11 12:41:12 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Sat, 11 Jan 2014 12:41:12 +0100 Subject: [FieldTrip] SVD and ICA Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Sat Jan 11 13:47:56 2014 From: pgoodin at swin.edu.au (Peter Goodin) Date: Sat, 11 Jan 2014 12:47:56 +0000 Subject: [FieldTrip] SVD and ICA In-Reply-To: <403977934.633.1389440258730.JavaMail.root@zimbra> References: <1593461380.4660324.1389374837434.JavaMail.root@sculptor.zimbra.ru.nl>, <403977934.633.1389440258730.JavaMail.root@zimbra> Message-ID: Hi Federico, Seeing as how you've stated using SSS, I'm going to assume you're using a neuromag system which has decreased the dimensionality of your data already through the extraction of "B-out" components. There are two options - the first is to use runica and and reduce the number of components to ~70 through PCA (covered in a couple of posts on this list). The second is to use the fastica algorithm which will automagically calculate the optimal amount of components to be extracted from the data. ICA will typically give far more components than SSP will projectors as ICA a model free method (so includes things such as EOG + ECG + EMG + external arefact + brain components). SSP however is model based and will only return projectors based on input (such as examples of eye blinks / ECG). Hope this helps, Peter __________________________ Peter Goodin, BSc (Hons), Ph.D Candidate. Brain and Psychological Sciences Research Centre (BPsych) Swinburne University, Hawthorn, Vic, 3122 Monash Alfred Psychiatry Research Centre (MAPrc) Level 4, 607 St Kilda Road, Melbourne 3004 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Federico Grande [fgrande at cbs.mpg.de] Sent: Saturday, 11 January 2014 10:37 PM To: Diego Lozano; FieldTrip discussion list Subject: Re: [FieldTrip] SVD and ICA Hi Diego, I'm sorry, I was probably not clear enough. When you uses SSP (Signal Space Projection), to process the rawdata, it projects the data in 8 or 10 PCA, but when you uses SSS in the rawdata, it has a much higher amount of components , around 150 or almost 200. That is the reason that makes me having no idea about how should I reduce it. Cheers, Federico ----- Mensaje original ----- De: "Lozano Soldevilla, D. (Diego)" Para: "FieldTrip discussion list" Enviados: Viernes, 10 de Enero 2014 18:27:17 Asunto: Re: [FieldTrip] SVD and ICA Hi Federico, I don't follow you. What's SSP? In any case, what I explained it's the way that I know to reduce data dimensionality prior ICA computation. I don't know a procedure to know optimal number of PCA component but here 25 were used: http://www.ncbi.nlm.nih.gov/pubmed/19699307 best, Diego ----- Original Message ----- > From: "Federico Grande" > To: "Diego Lozano" , "FieldTrip discussion list" > Sent: Friday, 10 January, 2014 6:14:28 PM > Subject: Re: [FieldTrip] SVD and ICA > Aham, that is what I've done, do the runica method, but I didn´t use > the parameter pca: pca are not principal component analysis associated > to SSP? I have used SSS (signal space separation) instead of SSP. It > would work also? And also I don´t know what number of components do I > want to reduce my data. How can I know which is the optimal number? > > Thank you Diego, > > Federico > > ----- Original Message ----- > From: "Lozano Soldevilla, D. (Diego)" > > To: "FieldTrip discussion list" > Sent: Friday, January 10, 2014 4:13:13 PM > Subject: Re: [FieldTrip] SVD and ICA > > Hi Federico, > > You might want to have a look to the different ICA algorithms > ft_componentanalysis has and see how to choose the proper option. For > example, if you select cfg.method='runica' then cfg.runica.pca = > number of components you want to reduce your data. > > Check help ft_componentanalysis for details > > best, > Diego > > > ----- Original Message ----- > > From: "Federico Grande" > > To: fieldtrip at science.ru.nl > > Sent: Friday, 10 January, 2014 3:54:56 PM > > Subject: [FieldTrip] SVD and ICA > > Hello everyone, > > > > In order to remove the artefacts like blink eyes or hearbeat, I > > wanted > > to apply ICA to my data. I've been told that is better to apply > > first > > SVD and then ICA, but I don't really know how to apply it. What do > > you > > recommend me in order to do it? I've not found any tutorial for > > doing > > it. All help and information ins greatly welcomed. > > > > Thank you very much, > > > > King Regards, > > > > Federico Grande > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ _______________________________________________ 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 ayobimpe2004 at hotmail.com Mon Jan 13 10:24:09 2014 From: ayobimpe2004 at hotmail.com (Azeez Adebimpe) Date: Mon, 13 Jan 2014 10:24:09 +0100 Subject: [FieldTrip] Source level statistics Message-ID: Dear all, I have sources for the same condition and I am not sure of if my design matrix is ok. I want to test to be sure that there is no significant difference between the group. Please can somebody help me with the design matrix? Azeez Adebimpe -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Mon Jan 13 10:27:28 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Mon, 13 Jan 2014 10:27:28 +0100 Subject: [FieldTrip] Source level statistics Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Tue Jan 14 07:19:37 2014 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Tue, 14 Jan 2014 06:19:37 +0000 Subject: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series Message-ID: Hi all, Reading through the discussion list, I see others have also had some issues with creating grand averaged source space time series (ERFs) and subsequent statistical analysis, but I can't see any solutions.... Questions: How can I create time series (ERFs) for grand averaged source space data? And, how can I do cluster analysis on these (yet to be created) grand averaged source space ERFs? I have used ft_SOURCEANALYSIS with method 'lcmv' for individual participants to generate source space time series, in data.avg.mom. Subsequently I used ft_sourcegrandaverage to combine source space data across subjects. However my grand averaged source data.avg only contains 'pow' and no 'mom'. Eg, no time series for the grand averaged source space data. As such, I can not do cluster analysis on grand averaged ERFs in source space. It appears that ft_sourcestatistics only works with parameters that have not more than one value per grid point (e.g. pow, nai etc) and is unable to work with ERF time series? Is this true? Can any one help with this? Much obliged. Kaelasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Tue Jan 14 07:23:04 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Tue, 14 Jan 2014 07:23:04 +0100 Subject: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 14 07:52:09 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 14 Jan 2014 07:52:09 +0100 Subject: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series In-Reply-To: References: Message-ID: Hi Kaelasha, You actually don't need to use ft_sourcegrandaverage if your goal is to do statistics. Ft_sourcestatistics in principle knows how to deal with multiple inputs. Thus, rather than doing cfg = []; cfg.keepindividual = 'yes'; grandavg = ft_sourcegrandaverage(cfg, subjectdata{:}); you can do something like this cfg = your cfg to ft_sourcestatistics stat = ft_sourcestatistics(cfg, grandavg{:}); Now, the question boils down to 'how to fool ft_sourcestatistics to swallow my data?'. The following should more or less work (but requires some manual labour): The time courses at the voxel level are present in source.avg.mom. These are most likely 3xN, 3 dipole orientations times N time points. In order to reduce this, one can project the orientation along the first pca-axis. This can be achieved by a call to ft_sourcedescriptives with cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place with cfg.fixedori = 'yes'. Then, you could do something like: pow = zeros(size(source.pos,1),length(source.time); pow(source.inside,:) = cat(1,source.avg.mom{source.inside}); source.avg.pow = pow; Just to be sure, add a time-axis to the source structure, i.e. source.time = tlck.time (tlck being the data structure used to create the lcmv-output). I think this should bring you close to doing statistics. Best, Jan-Mathijs On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote: > Hi all, > > Reading through the discussion list, I see others have also had some issues with creating grand averaged source space time series (ERFs) and subsequent statistical analysis, but I can't see any solutions.... > > Questions: > How can I create time series (ERFs) for grand averaged source space data? > And, how can I do cluster analysis on these (yet to be created) grand averaged source space ERFs? > > > I have used ft_SOURCEANALYSIS with method 'lcmv' for individual participants to generate source space time series, in data.avg.mom. > > Subsequently I used ft_sourcegrandaverage to combine source space data across subjects. > > However my grand averaged source data.avg only contains 'pow' and no 'mom'. Eg, no time series for the grand averaged source space data. > > As such, I can not do cluster analysis on grand averaged ERFs in source space. > > It appears that ft_sourcestatistics only works with parameters that have not more than one value per grid point (e.g. pow, nai etc) and is unable to work with ERF time series? Is this true? > > Can any one help with this? > > Much obliged. > Kaelasha > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 14 09:24:55 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 14 Jan 2014 09:24:55 +0100 Subject: [FieldTrip] ft_volumerealign: issue when coregistering to headshape Message-ID: <74251E8E-6F80-463B-8073-7D81FC311B00@donders.ru.nl> Dear all, I have fixed a somewhat critical issue in ft_volumerealign. Please disregard this e-mail (i.e. don't worry about it) if you have never used this function to coregister your anatomical MRI to a headshape (with cfg.headshape = something) in the past couple of months (starting from October 2013). The long story short: when supplying ft_volumerealign with a headshape in the configuration, the function tries to register the anatomical MRI to this headshape, by creating a 3D model of the scalp surface (based on the MRI) and using an iterative closest point algorithm for registration. So far so good. Yet, as of revision 8576 (committed to svn on Sept 30 2013) I added an interactive alignment step to this procedure, because the icp-algorithm is known to behave well only if the point clouds are already approximately registered. That is, in my experience an approximate registration based on the fiducials only was not always sufficient to achieve a nice coregistration. This being said, the introduction of this additional interactive step also introduced a bug, in that the transformation matrix that was estimated with the icp-algorithm was not properly dealt with. Actually, this information was never used for the registration and as a result the coregistration matrix outputted in ft_volumerealign was the one that resulted from the interactive realignment only. Not a total disaster, because I expect the user to get an as good as possible coregistration by hand to begin with, but also not how it should be. My apologies for any inconvenience caused. The issue has been fixed as of svn revision 9096. Happy computing, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Wed Jan 15 09:14:16 2014 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Wed, 15 Jan 2014 08:14:16 +0000 Subject: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series In-Reply-To: References: , Message-ID: Hi Jan-Mathijs, Thanks for this response. I still have a question though. You mentioned that it is not necessary to use ft_sourcegrandaverage to perform statistical analysis with source space ERFs across multiple participants. However, what you appeared to suggest in your email, does appear to still use a grand average, e.g. you wrote: >you can do something like this >cfg = your cfg to ft_sourcestatistics >stat = ft_sourcestatistics(cfg, grandavg{:}); Having played around with it a bit more, I am still unclear how to use multiple inputs (e.g., multiple subjects source data) when using ft_sourcestatistics. I had thought that ft_sourcegrandavarge was a necessity. Can you make this a bit clearer? Also, I did go back and use cfg.fixedori='yes' when calling my first ft_srouceanalysis and moved also my source.avg.mom data into source.avg.pow as you suggested, but this still leaves me with the question above- how to use multiple subjects source data in ft_sourcestatistics? Once again, any help from anyone would be much appreciated! Kaelasha ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] Sent: Tuesday, 14 January 2014 5:52 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series Hi Kaelasha, You actually don't need to use ft_sourcegrandaverage if your goal is to do statistics. Ft_sourcestatistics in principle knows how to deal with multiple inputs. Thus, rather than doing cfg = []; cfg.keepindividual = 'yes'; grandavg = ft_sourcegrandaverage(cfg, subjectdata{:}); you can do something like this cfg = your cfg to ft_sourcestatistics stat = ft_sourcestatistics(cfg, grandavg{:}); Now, the question boils down to 'how to fool ft_sourcestatistics to swallow my data?'. The following should more or less work (but requires some manual labour): The time courses at the voxel level are present in source.avg.mom. These are most likely 3xN, 3 dipole orientations times N time points. In order to reduce this, one can project the orientation along the first pca-axis. This can be achieved by a call to ft_sourcedescriptives with cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place with cfg.fixedori = 'yes'. Then, you could do something like: pow = zeros(size(source.pos,1),length(source.time); pow(source.inside,:) = cat(1,source.avg.mom{source.inside}); source.avg.pow = pow; Just to be sure, add a time-axis to the source structure, i.e. source.time = tlck.time (tlck being the data structure used to create the lcmv-output). I think this should bring you close to doing statistics. Best, Jan-Mathijs On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote: Hi all, Reading through the discussion list, I see others have also had some issues with creating grand averaged source space time series (ERFs) and subsequent statistical analysis, but I can't see any solutions.... Questions: How can I create time series (ERFs) for grand averaged source space data? And, how can I do cluster analysis on these (yet to be created) grand averaged source space ERFs? I have used ft_SOURCEANALYSIS with method 'lcmv' for individual participants to generate source space time series, in data.avg.mom. Subsequently I used ft_sourcegrandaverage to combine source space data across subjects. However my grand averaged source data.avg only contains 'pow' and no 'mom'. Eg, no time series for the grand averaged source space data. As such, I can not do cluster analysis on grand averaged ERFs in source space. It appears that ft_sourcestatistics only works with parameters that have not more than one value per grid point (e.g. pow, nai etc) and is unable to work with ERF time series? Is this true? Can any one help with this? Much obliged. Kaelasha _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Wed Jan 15 09:20:24 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Wed, 15 Jan 2014 09:20:24 +0100 Subject: [FieldTrip] =?utf-8?q?ft=5Fsourcestatistics_and_sourcegrandaverag?= =?utf-8?q?e_=09time=09series?= Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thomas.Baumgarten at med.uni-duesseldorf.de Wed Jan 15 09:35:07 2014 From: Thomas.Baumgarten at med.uni-duesseldorf.de (Thomas.Baumgarten at med.uni-duesseldorf.de) Date: Wed, 15 Jan 2014 08:35:07 +0000 Subject: [FieldTrip] Problems with statistics for circular data Message-ID: <6C58B92C2519E64688A9E25C7A0D07236E38677D@MAIL1-UKD.VMED.UKD> Dear FieldTrip users, I am working on a set of circular data (phase angles of ongoing oscillations computed via Hilbert transform) and would like to statistically compare two conditions (A,B). For this, I use the circular statistics toolbox for matlab by P. Berens. I worked on this problem from two different angles: 1. First, I tried to directly compare the two conditions via the Watson-Williams two-sample test (function: circ_wwtest). Unfortunately, this didn't work out, since the test requires an average resultant vector length of > 0.45 for n >= 11 entries/ subjects, an assumption which is not met by my data. 2. Second, I tried to calculate the angle of difference between the two conditions (angle(A) - angle(B)) and then used the one-sample mean angle test (function: circ_mtest) to test if the resulting angle of difference is significantly different from zero. Here, the following problems arise: Since the resulting angles for A and B range from -pi to +pi, there are cases when the subtraction of the two angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) - (B = -pi) = 2pi), resulting in an error from the circ_mtest function. I tried to solve this problem by using a modulus (2pi) operation (i.e. by 'cleaning out' the redundant circumventions while at the same time preserving the angle information), but unfortunately this didn't work out either. The only other option I can think of would be to generate surrogate data (i.e. a matrix with the same dimensions as the matrix with the angles of difference , only filled with zeros) and to apply a cluster-based permutation test (similar to ft_freqstatitics). Although this would take care of my multiple-comparison problem, I am not quite sure if the cluster correction is still valid in this case and if this test would work for circular data. I would greatly appreciate any comments and advice on this matter. Thanks for your help, Thomas Thomas Baumgarten, PhD Student Institute of Clinical Neuroscience and Medical Psychology, Medical Faculty, Heinrich-Heine-University Düsseldorf, Universitätsstraße 1, 40225 Düsseldorf, Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias.staudigl at uni-konstanz.de Wed Jan 15 10:19:04 2014 From: tobias.staudigl at uni-konstanz.de (Tobias Staudigl) Date: Wed, 15 Jan 2014 10:19:04 +0100 Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: <6C58B92C2519E64688A9E25C7A0D07236E38677D@MAIL1-UKD.VMED.UKD> References: <6C58B92C2519E64688A9E25C7A0D07236E38677D@MAIL1-UKD.VMED.UKD> Message-ID: <52D65288.3070207@uni-konstanz.de> Dear Thomas, try using circ_dist.m (in the circ_stats toolbox by Berens). This should solve the circular difference issue. all the best, Tobias Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: > > Dear FieldTrip users, > > I am working on a set of circular data (phase angles of ongoing > oscillations computed via Hilbert transform) and would like to > statistically compare two conditions (A,B). For this, I use the > circular statistics toolbox for matlab by P. Berens. I worked on this > problem from two different angles: > > 1. First, I tried to directly compare the two conditions via the > Watson-Williams two-sample test (function: circ_wwtest). > Unfortunately, this didn't work out, since the test requires an > average resultant vector length of > 0.45 for n >= 11 entries/ > subjects, an assumption which is not met by my data. > > 2. Second, I tried to calculate the angle of difference between the > two conditions (angle(A) -- angle(B)) and then used the one-sample > mean angle test (function: circ_mtest) to test if the resulting angle > of difference is significantly different from zero. Here, the > following problems arise: Since the resulting angles for A and B range > from --pi to +pi, there are cases when the subtraction of the two > angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) -- > (B = -pi) = 2pi), resulting in an error from the circ_mtest function. > I tried to solve this problem by using a modulus (2pi) operation (i.e. > by 'cleaning out' the redundant circumventions while at the same time > preserving the angle information), but unfortunately this didn't work > out either. > > The only other option I can think of would be to generate surrogate > data (i.e. a matrix with the same dimensions as the matrix with the > angles of difference , only filled with zeros) and to apply a > cluster-based permutation test (similar to ft_freqstatitics). Although > this would take care of my multiple-comparison problem, I am not quite > sure if the cluster correction is still valid in this case and if this > test would work for circular data. > > I would greatly appreciate any comments and advice on this matter. > > Thanks for your help, > > Thomas > > Thomas Baumgarten, PhD Student > > Institute of Clinical Neuroscience and Medical Psychology, Medical > Faculty, Heinrich-Heine-University Düsseldorf, Universitätsstraße 1, > 40225 Düsseldorf, Germany > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Tobias Staudigl Fachbereich Psychologie - ZPR Postfach ZPR 78457 Konstanz ZPR, Haus 12 Tel.: +49 (0)7531 / 88 - 5703 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jan 15 11:18:53 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 15 Jan 2014 11:18:53 +0100 Subject: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series In-Reply-To: References: , Message-ID: <14425A96-E395-4757-904B-5AFB8FEED3EB@donders.ru.nl> Hi Kaelasha, Sorry for being unclear. You can do something like: stat = ft_sourcestatistics(cfg, data1, data2, data3, data4, ....), or stat = ft_sourcestatistics(cfg, data{:}); where data is a cell-array of structures (1 cell for each participant/condition). Best, Jan-Mathijs On Jan 15, 2014, at 9:14 AM, Kaelasha Tyler wrote: > Hi Jan-Mathijs, > > Thanks for this response. > I still have a question though. > You mentioned that it is not necessary to use ft_sourcegrandaverage to perform statistical analysis with source space ERFs across multiple participants. However, what you appeared to suggest in your email, does appear to still use a grand average, e.g. you wrote: > > >you can do something like this > > >cfg = your cfg to ft_sourcestatistics > >stat = ft_sourcestatistics(cfg, grandavg{:}); > > Having played around with it a bit more, I am still unclear how to use multiple inputs (e.g., multiple subjects source data) when using ft_sourcestatistics. I had thought that ft_sourcegrandavarge was a necessity. > Can you make this a bit clearer? > > Also, I did go back and use cfg.fixedori='yes' when calling my first ft_srouceanalysis and moved also my source.avg.mom data into source.avg.pow as you suggested, but this still leaves me with the question above- how to use multiple subjects source data in ft_sourcestatistics? > > Once again, any help from anyone would be much appreciated! > > Kaelasha > > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] > Sent: Tuesday, 14 January 2014 5:52 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series > > Hi Kaelasha, > > You actually don't need to use ft_sourcegrandaverage if your goal is to do statistics. Ft_sourcestatistics in principle knows how to deal with multiple inputs. > Thus, > rather than doing > > cfg = []; > cfg.keepindividual = 'yes'; > grandavg = ft_sourcegrandaverage(cfg, subjectdata{:}); > > you can do something like this > > cfg = your cfg to ft_sourcestatistics > stat = ft_sourcestatistics(cfg, grandavg{:}); > > Now, the question boils down to 'how to fool ft_sourcestatistics to swallow my data?'. > > The following should more or less work (but requires some manual labour): > > The time courses at the voxel level are present in source.avg.mom. These are most likely 3xN, 3 dipole orientations times N time points. In order to reduce this, one can project the orientation along the first pca-axis. This can be achieved by a call to ft_sourcedescriptives with cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place with cfg.fixedori = 'yes'. > Then, you could do something like: > > pow = zeros(size(source.pos,1),length(source.time); > pow(source.inside,:) = cat(1,source.avg.mom{source.inside}); > source.avg.pow = pow; > > Just to be sure, add a time-axis to the source structure, i.e. source.time = tlck.time (tlck being the data structure used to create the lcmv-output). > > I think this should bring you close to doing statistics. > > Best, > Jan-Mathijs > > > > On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote: > >> Hi all, >> >> Reading through the discussion list, I see others have also had some issues with creating grand averaged source space time series (ERFs) and subsequent statistical analysis, but I can't see any solutions.... >> >> Questions: >> How can I create time series (ERFs) for grand averaged source space data? >> And, how can I do cluster analysis on these (yet to be created) grand averaged source space ERFs? >> >> >> I have used ft_SOURCEANALYSIS with method 'lcmv' for individual participants to generate source space time series, in data.avg.mom. >> >> Subsequently I used ft_sourcegrandaverage to combine source space data across subjects. >> >> However my grand averaged source data.avg only contains 'pow' and no 'mom'. Eg, no time series for the grand averaged source space data. >> >> As such, I can not do cluster analysis on grand averaged ERFs in source space. >> >> It appears that ft_sourcestatistics only works with parameters that have not more than one value per grid point (e.g. pow, nai etc) and is unable to work with ERF time series? Is this true? >> >> Can any one help with this? >> >> Much obliged. >> Kaelasha >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrecravo at gmail.com Wed Jan 15 13:04:53 2014 From: andrecravo at gmail.com (Andre Cravo) Date: Wed, 15 Jan 2014 10:04:53 -0200 Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: <52D65288.3070207@uni-konstanz.de> References: <6C58B92C2519E64688A9E25C7A0D07236E38677D@MAIL1-UKD.VMED.UKD> <52D65288.3070207@uni-konstanz.de> Message-ID: Dear Thomas, Is it a paired test? If you are interested, I have implemented some paired t-tests for circular data based on Zar's book. Best -- Andre M. Cravo Center for Mathematics, Computation and Cognition Federal University of ABC., Brazil http://neuro.ufabc.edu.br/timing On 15 January 2014 07:19, Tobias Staudigl wrote: > Dear Thomas, > > try using circ_dist.m (in the circ_stats toolbox by Berens). > This should solve the circular difference issue. > > all the best, > Tobias > > Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: > > Dear FieldTrip users, > > I am working on a set of circular data (phase angles of ongoing oscillations > computed via Hilbert transform) and would like to statistically compare two > conditions (A,B). For this, I use the circular statistics toolbox for matlab > by P. Berens. I worked on this problem from two different angles: > > 1. First, I tried to directly compare the two conditions via the > Watson-Williams two-sample test (function: circ_wwtest). Unfortunately, this > didn’t work out, since the test requires an average resultant vector length > of > 0.45 for n >= 11 entries/ subjects, an assumption which is not met by > my data. > > 2. Second, I tried to calculate the angle of difference between the two > conditions (angle(A) – angle(B)) and then used the one-sample mean angle > test (function: circ_mtest) to test if the resulting angle of difference is > significantly different from zero. Here, the following problems arise: Since > the resulting angles for A and B range from –pi to +pi, there are cases when > the subtraction of the two angles results in roughly +2pi or -2pi (e.g. > cases where (A = pi) – (B = -pi) = 2pi), resulting in an error from the > circ_mtest function. I tried to solve this problem by using a modulus (2pi) > operation (i.e. by ‘cleaning out’ the redundant circumventions while at the > same time preserving the angle information), but unfortunately this didn’t > work out either. > > The only other option I can think of would be to generate surrogate data > (i.e. a matrix with the same dimensions as the matrix with the angles of > difference , only filled with zeros) and to apply a cluster-based > permutation test (similar to ft_freqstatitics). Although this would take > care of my multiple-comparison problem, I am not quite sure if the cluster > correction is still valid in this case and if this test would work for > circular data. > > I would greatly appreciate any comments and advice on this matter. > > Thanks for your help, > > Thomas > > > > > > Thomas Baumgarten, PhD Student > > Institute of Clinical Neuroscience and Medical Psychology, Medical Faculty, > Heinrich-Heine-University Düsseldorf, Universitätsstraße 1, 40225 > Düsseldorf, Germany > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Dr. Tobias Staudigl > Fachbereich Psychologie - ZPR > Postfach ZPR > 78457 Konstanz > ZPR, Haus 12 > Tel.: +49 (0)7531 / 88 - 5703 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From pierre.megevand at gmail.com Wed Jan 15 15:47:30 2014 From: pierre.megevand at gmail.com (=?ISO-8859-1?Q?Pierre_M=E9gevand?=) Date: Wed, 15 Jan 2014 09:47:30 -0500 Subject: [FieldTrip] Problems with statistics for circular data Message-ID: Dear Thomas, When the assumptions of the parametric Watson-Williams test aren't met, you can use non-parametric statistical tests for circular data, such as Watson's Yr or U2 tests. The Yr test is implemented in the MATLAB toolbox PhasePACK by Daniel Rizzuto: cmean_test.m function, https://github.com/iandol/spikes/tree/master/Various/PhasePACK). You can find matlab code for the U2 test here: http://www.mathworks.com/matlabcentral/fileexchange/43543-watsons-u2-statistic-based-permutation-test-for-circular-data. I programmed this; it runs very slowly, so if anyone is interested in looking into it I'm sure we could make it much better. Pierre -- Pierre Mégevand, MD, PhD Post-doctoral research fellow Laboratory for Multimodal Human Brain Mapping Feinstein Institute for Medical Research Manhasset, NY, USA On Wed, Jan 15, 2014 at 5:20 AM, wrote: > 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. Re: Problems with statistics for circular data (Tobias Staudigl) > 2. Re: ft_sourcestatistics and sourcegrandaverage time series > (jan-mathijs schoffelen) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 15 Jan 2014 10:19:04 +0100 > From: Tobias Staudigl > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Problems with statistics for circular data > Message-ID: <52D65288.3070207 at uni-konstanz.de> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Dear Thomas, > > try using circ_dist.m (in the circ_stats toolbox by Berens). > This should solve the circular difference issue. > > all the best, > Tobias > > Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: > > > > Dear FieldTrip users, > > > > I am working on a set of circular data (phase angles of ongoing > > oscillations computed via Hilbert transform) and would like to > > statistically compare two conditions (A,B). For this, I use the > > circular statistics toolbox for matlab by P. Berens. I worked on this > > problem from two different angles: > > > > 1. First, I tried to directly compare the two conditions via the > > Watson-Williams two-sample test (function: circ_wwtest). > > Unfortunately, this didn't work out, since the test requires an > > average resultant vector length of > 0.45 for n >= 11 entries/ > > subjects, an assumption which is not met by my data. > > > > 2. Second, I tried to calculate the angle of difference between the > > two conditions (angle(A) -- angle(B)) and then used the one-sample > > mean angle test (function: circ_mtest) to test if the resulting angle > > of difference is significantly different from zero. Here, the > > following problems arise: Since the resulting angles for A and B range > > from --pi to +pi, there are cases when the subtraction of the two > > angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) -- > > (B = -pi) = 2pi), resulting in an error from the circ_mtest function. > > I tried to solve this problem by using a modulus (2pi) operation (i.e. > > by 'cleaning out' the redundant circumventions while at the same time > > preserving the angle information), but unfortunately this didn't work > > out either. > > > > The only other option I can think of would be to generate surrogate > > data (i.e. a matrix with the same dimensions as the matrix with the > > angles of difference , only filled with zeros) and to apply a > > cluster-based permutation test (similar to ft_freqstatitics). Although > > this would take care of my multiple-comparison problem, I am not quite > > sure if the cluster correction is still valid in this case and if this > > test would work for circular data. > > > > I would greatly appreciate any comments and advice on this matter. > > > > Thanks for your help, > > > > Thomas > > > > Thomas Baumgarten, PhD Student > > > > Institute of Clinical Neuroscience and Medical Psychology, Medical > > Faculty, Heinrich-Heine-University D?sseldorf, Universit?tsstra?e 1, > > 40225 D?sseldorf, Germany > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Dr. Tobias Staudigl > Fachbereich Psychologie - ZPR > Postfach ZPR > 78457 Konstanz > ZPR, Haus 12 > Tel.: +49 (0)7531 / 88 - 5703 > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140115/c71480a1/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Wed, 15 Jan 2014 11:18:53 +0100 > From: jan-mathijs schoffelen > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage > time series > Message-ID: <14425A96-E395-4757-904B-5AFB8FEED3EB at donders.ru.nl> > Content-Type: text/plain; charset="us-ascii" > > Hi Kaelasha, > > Sorry for being unclear. You can do something like: > > stat = ft_sourcestatistics(cfg, data1, data2, data3, data4, ....), or stat > = ft_sourcestatistics(cfg, data{:}); where data is a cell-array of > structures (1 cell for each participant/condition). > > Best, > Jan-Mathijs > > > > > On Jan 15, 2014, at 9:14 AM, Kaelasha Tyler wrote: > > > Hi Jan-Mathijs, > > > > Thanks for this response. > > I still have a question though. > > You mentioned that it is not necessary to use ft_sourcegrandaverage to > perform statistical analysis with source space ERFs across multiple > participants. However, what you appeared to suggest in your email, does > appear to still use a grand average, e.g. you wrote: > > > > >you can do something like this > > > > >cfg = your cfg to ft_sourcestatistics > > >stat = ft_sourcestatistics(cfg, grandavg{:}); > > > > Having played around with it a bit more, I am still unclear how to use > multiple inputs (e.g., multiple subjects source data) when using > ft_sourcestatistics. I had thought that ft_sourcegrandavarge was a > necessity. > > Can you make this a bit clearer? > > > > Also, I did go back and use cfg.fixedori='yes' when calling my first > ft_srouceanalysis and moved also my source.avg.mom data into source.avg.pow > as you suggested, but this still leaves me with the question above- how to > use multiple subjects source data in ft_sourcestatistics? > > > > Once again, any help from anyone would be much appreciated! > > > > Kaelasha > > > > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] > on behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] > > Sent: Tuesday, 14 January 2014 5:52 PM > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time > series > > > > Hi Kaelasha, > > > > You actually don't need to use ft_sourcegrandaverage if your goal is to > do statistics. Ft_sourcestatistics in principle knows how to deal with > multiple inputs. > > Thus, > > rather than doing > > > > cfg = []; > > cfg.keepindividual = 'yes'; > > grandavg = ft_sourcegrandaverage(cfg, subjectdata{:}); > > > > you can do something like this > > > > cfg = your cfg to ft_sourcestatistics > > stat = ft_sourcestatistics(cfg, grandavg{:}); > > > > Now, the question boils down to 'how to fool ft_sourcestatistics to > swallow my data?'. > > > > The following should more or less work (but requires some manual labour): > > > > The time courses at the voxel level are present in source.avg.mom. These > are most likely 3xN, 3 dipole orientations times N time points. In order to > reduce this, one can project the orientation along the first pca-axis. This > can be achieved by a call to ft_sourcedescriptives with > cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place > with cfg.fixedori = 'yes'. > > Then, you could do something like: > > > > pow = zeros(size(source.pos,1),length(source.time); > > pow(source.inside,:) = cat(1,source.avg.mom{source.inside}); > > source.avg.pow = pow; > > > > Just to be sure, add a time-axis to the source structure, i.e. > source.time = tlck.time (tlck being the data structure used to create the > lcmv-output). > > > > I think this should bring you close to doing statistics. > > > > Best, > > Jan-Mathijs > > > > > > > > On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote: > > > >> Hi all, > >> > >> Reading through the discussion list, I see others have also had some > issues with creating grand averaged source space time series (ERFs) and > subsequent statistical analysis, but I can't see any solutions.... > >> > >> Questions: > >> How can I create time series (ERFs) for grand averaged source space > data? > >> And, how can I do cluster analysis on these (yet to be created) grand > averaged source space ERFs? > >> > >> > >> I have used ft_SOURCEANALYSIS with method 'lcmv' for individual > participants to generate source space time series, in data.avg.mom. > >> > >> Subsequently I used ft_sourcegrandaverage to combine source space data > across subjects. > >> > >> However my grand averaged source data.avg only contains 'pow' and no > 'mom'. Eg, no time series for the grand averaged source space data. > >> > >> As such, I can not do cluster analysis on grand averaged ERFs in source > space. > >> > >> It appears that ft_sourcestatistics only works with parameters that > have not more than one value per grid point (e.g. pow, nai etc) and is > unable to work with ERF time series? Is this true? > >> > >> Can any one help with this? > >> > >> Much obliged. > >> Kaelasha > >> > >> > >> > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > Jan-Mathijs Schoffelen, MD PhD > > > > Donders Institute for Brain, Cognition and Behaviour, > > Centre for Cognitive Neuroimaging, > > Radboud University Nijmegen, The Netherlands > > > > Max Planck Institute for Psycholinguistics, > > Nijmegen, The Netherlands > > > > J.Schoffelen at donders.ru.nl > > Telephone: +31-24-3614793 > > > > http://www.hettaligebrein.nl > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140115/a1878500/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 38, Issue 18 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thomas.Baumgarten at med.uni-duesseldorf.de Wed Jan 15 16:07:37 2014 From: Thomas.Baumgarten at med.uni-duesseldorf.de (Thomas.Baumgarten at med.uni-duesseldorf.de) Date: Wed, 15 Jan 2014 15:07:37 +0000 Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: <52D65288.3070207@uni-konstanz.de> References: <6C58B92C2519E64688A9E25C7A0D07236E38677D@MAIL1-UKD.VMED.UKD> <52D65288.3070207@uni-konstanz.de> Message-ID: <6C58B92C2519E64688A9E25C7A0D07236E387058@MAIL1-UKD.VMED.UKD> Dear Tobias, Thank you for the hint! Indeed, this makes the calculation of the circular difference much easier and the resulting values stay between -pi and pi. Sorry that I didn't think of this, since the purpose of the function is rather obvious. Best regards, Thomas Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Tobias Staudigl Gesendet: Mittwoch, 15. Januar 2014 10:19 An: FieldTrip discussion list Betreff: Re: [FieldTrip] Problems with statistics for circular data Dear Thomas, try using circ_dist.m (in the circ_stats toolbox by Berens). This should solve the circular difference issue. all the best, Tobias Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: Dear FieldTrip users, I am working on a set of circular data (phase angles of ongoing oscillations computed via Hilbert transform) and would like to statistically compare two conditions (A,B). For this, I use the circular statistics toolbox for matlab by P. Berens. I worked on this problem from two different angles: 1. First, I tried to directly compare the two conditions via the Watson-Williams two-sample test (function: circ_wwtest). Unfortunately, this didn't work out, since the test requires an average resultant vector length of > 0.45 for n >= 11 entries/ subjects, an assumption which is not met by my data. 2. Second, I tried to calculate the angle of difference between the two conditions (angle(A) - angle(B)) and then used the one-sample mean angle test (function: circ_mtest) to test if the resulting angle of difference is significantly different from zero. Here, the following problems arise: Since the resulting angles for A and B range from -pi to +pi, there are cases when the subtraction of the two angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) - (B = -pi) = 2pi), resulting in an error from the circ_mtest function. I tried to solve this problem by using a modulus (2pi) operation (i.e. by 'cleaning out' the redundant circumventions while at the same time preserving the angle information), but unfortunately this didn't work out either. The only other option I can think of would be to generate surrogate data (i.e. a matrix with the same dimensions as the matrix with the angles of difference , only filled with zeros) and to apply a cluster-based permutation test (similar to ft_freqstatitics). Although this would take care of my multiple-comparison problem, I am not quite sure if the cluster correction is still valid in this case and if this test would work for circular data. I would greatly appreciate any comments and advice on this matter. Thanks for your help, Thomas Thomas Baumgarten, PhD Student Institute of Clinical Neuroscience and Medical Psychology, Medical Faculty, Heinrich-Heine-University Düsseldorf, Universitätsstraße 1, 40225 Düsseldorf, Germany _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Tobias Staudigl Fachbereich Psychologie - ZPR Postfach ZPR 78457 Konstanz ZPR, Haus 12 Tel.: +49 (0)7531 / 88 - 5703 -------------- next part -------------- An HTML attachment was scrubbed... URL: From strauss at cbs.mpg.de Wed Jan 15 16:42:23 2014 From: strauss at cbs.mpg.de (Antje Strauss) Date: Wed, 15 Jan 2014 16:42:23 +0100 (CET) Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: Message-ID: <1136676999.7333.1389800543739.JavaMail.root@zimbra> Dear Thomas, my experience with EEG data is that your resultant vector length will hardly ever exceed 0.45 making the Watson-Williams test unapplicable. But I used a solution suggested by Niko Busch and colleagues in 2009 (J Neuroscience). There, they introduce a measure called "bifurcation index" which you could calculate for each time-frequency bin and then run a fieldtrip style cluster permutation statistic against zero. Best, Antje > Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: > > Dear FieldTrip users, > > I am working on a set of circular data (phase angles of ongoing oscillations > computed via Hilbert transform) and would like to statistically compare two > conditions (A,B). For this, I use the circular statistics toolbox for matlab > by P. Berens. I worked on this problem from two different angles: > > 1. First, I tried to directly compare the two conditions via the > Watson-Williams two-sample test (function: circ_wwtest). Unfortunately, this > didn?t work out, since the test requires an average resultant vector length > of > 0.45 for n >= 11 entries/ subjects, an assumption which is not met by > my data. > > 2. Second, I tried to calculate the angle of difference between the two > conditions (angle(A) ? angle(B)) and then used the one-sample mean angle > test (function: circ_mtest) to test if the resulting angle of difference is > significantly different from zero. Here, the following problems arise: Since > the resulting angles for A and B range from ?pi to +pi, there are cases when > the subtraction of the two angles results in roughly +2pi or -2pi (e.g. > cases where (A = pi) ? (B = -pi) = 2pi), resulting in an error from the > circ_mtest function. I tried to solve this problem by using a modulus (2pi) > operation (i.e. by ?cleaning out? the redundant circumventions while at the > same time preserving the angle information), but unfortunately this didn?t > work out either. > > The only other option I can think of would be to generate surrogate data > (i.e. a matrix with the same dimensions as the matrix with the angles of > difference , only filled with zeros) and to apply a cluster-based > permutation test (similar to ft_freqstatitics). Although this would take > care of my multiple-comparison problem, I am not quite sure if the cluster > correction is still valid in this case and if this test would work for > circular data. > > I would greatly appreciate any comments and advice on this matter. > > Thanks for your help, > > Thomas > > > > > > Thomas Baumgarten, PhD Student > > Institute of Clinical Neuroscience and Medical Psychology, Medical Faculty, > Heinrich-Heine-University D?sseldorf, Universit?tsstra?e 1, 40225 > D?sseldorf, Germany > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Dr. Tobias Staudigl > Fachbereich Psychologie - ZPR > Postfach ZPR > 78457 Konstanz > ZPR, Haus 12 > Tel.: +49 (0)7531 / 88 - 5703 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Antje Strauß, M.A. Auditory Cognition Research Group Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a - Leipzig, Germany (p) +49 (0)341 9940 2482 (e) strauss at cbs.mpg.de From sklein at berkeley.edu Wed Jan 15 16:50:07 2014 From: sklein at berkeley.edu (Stanley A. KLEIN) Date: Wed, 15 Jan 2014 10:50:07 -0500 Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: <6C58B92C2519E64688A9E25C7A0D07236E387058@MAIL1-UKD.VMED.UKD> References: <6C58B92C2519E64688A9E25C7A0D07236E38677D@MAIL1-UKD.VMED.UKD> <52D65288.3070207@uni-konstanz.de> <6C58B92C2519E64688A9E25C7A0D07236E387058@MAIL1-UKD.VMED.UKD> Message-ID: Could someone clarify for me the solution for dealing with circular data. Suppose I simple want to calculate the standard deviation of measuring the phase of something. Since the distribution isn't Gaussian, what does one do other than permutation cluster analysis sort of stuff (but not for calculating standard deviation). Stan On Wed, Jan 15, 2014 at 10:07 AM, wrote: > Dear Tobias, > > Thank you for the hint! Indeed, this makes the calculation of the circular > difference much easier and the resulting values stay between -pi and pi. > Sorry that I didn’t think of this, since the purpose of the function is > rather obvious. > > > > Best regards, > > Thomas > > > > *Von:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *Im Auftrag von *Tobias Staudigl > *Gesendet:* Mittwoch, 15. Januar 2014 10:19 > *An:* FieldTrip discussion list > *Betreff:* Re: [FieldTrip] Problems with statistics for circular data > > > > Dear Thomas, > > try using circ_dist.m (in the circ_stats toolbox by Berens). > This should solve the circular difference issue. > > all the best, > Tobias > > Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: > > Dear FieldTrip users, > > I am working on a set of circular data (phase angles of ongoing > oscillations computed via Hilbert transform) and would like to > statistically compare two conditions (A,B). For this, I use the circular > statistics toolbox for matlab by P. Berens. I worked on this problem from > two different angles: > > 1. First, I tried to directly compare the two conditions via the > Watson-Williams two-sample test (function: circ_wwtest). Unfortunately, > this didn’t work out, since the test requires an average resultant vector > length of > 0.45 for n >= 11 entries/ subjects, an assumption which is not > met by my data. > > 2. Second, I tried to calculate the angle of difference between the two > conditions (angle(A) – angle(B)) and then used the one-sample mean angle > test (function: circ_mtest) to test if the resulting angle of difference is > significantly different from zero. Here, the following problems arise: > Since the resulting angles for A and B range from –pi to +pi, there are > cases when the subtraction of the two angles results in roughly +2pi or > -2pi (e.g. cases where (A = pi) – (B = -pi) = 2pi), resulting in an error > from the circ_mtest function. I tried to solve this problem by using a > modulus (2pi) operation (i.e. by ‘cleaning out’ the redundant > circumventions while at the same time preserving the angle information), > but unfortunately this didn’t work out either. > > The only other option I can think of would be to generate surrogate data > (i.e. a matrix with the same dimensions as the matrix with the angles of > difference , only filled with zeros) and to apply a cluster-based > permutation test (similar to ft_freqstatitics). Although this would take > care of my multiple-comparison problem, I am not quite sure if the cluster > correction is still valid in this case and if this test would work for > circular data. > > I would greatly appreciate any comments and advice on this matter. > > Thanks for your help, > > Thomas > > > > > > Thomas Baumgarten, PhD Student > > Institute of Clinical Neuroscience and Medical Psychology, Medical > Faculty, Heinrich-Heine-University Düsseldorf, Universitätsstraße 1, 40225 > Düsseldorf, Germany > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > > Dr. Tobias Staudigl > > Fachbereich Psychologie - ZPR > > Postfach ZPR > > 78457 Konstanz > > ZPR, Haus 12 > > Tel.: +49 (0)7531 / 88 - 5703 > > > _______________________________________________ > 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 Thomas.Baumgarten at med.uni-duesseldorf.de Thu Jan 16 07:52:58 2014 From: Thomas.Baumgarten at med.uni-duesseldorf.de (Thomas.Baumgarten at med.uni-duesseldorf.de) Date: Thu, 16 Jan 2014 06:52:58 +0000 Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: References: Message-ID: <6C58B92C2519E64688A9E25C7A0D07236E387103@MAIL1-UKD.VMED.UKD> Dear Pierre, Thank you very much for your quick reply. I downloaded the scripts for the two non-parametrical tests and will give it a try. Again, thanks for the help! Best regards, Thomas Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Pierre Mégevand Gesendet: Mittwoch, 15. Januar 2014 15:48 An: fieldtrip at science.ru.nl Betreff: Re: [FieldTrip] Problems with statistics for circular data Dear Thomas, When the assumptions of the parametric Watson-Williams test aren't met, you can use non-parametric statistical tests for circular data, such as Watson's Yr or U2 tests. The Yr test is implemented in the MATLAB toolbox PhasePACK by Daniel Rizzuto: cmean_test.m function, https://github.com/iandol/spikes/tree/master/Various/PhasePACK). You can find matlab code for the U2 test here: http://www.mathworks.com/matlabcentral/fileexchange/43543-watsons-u2-statistic-based-permutation-test-for-circular-data. I programmed this; it runs very slowly, so if anyone is interested in looking into it I'm sure we could make it much better. Pierre -- Pierre Mégevand, MD, PhD Post-doctoral research fellow Laboratory for Multimodal Human Brain Mapping Feinstein Institute for Medical Research Manhasset, NY, USA On Wed, Jan 15, 2014 at 5:20 AM, > wrote: 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. Re: Problems with statistics for circular data (Tobias Staudigl) 2. Re: ft_sourcestatistics and sourcegrandaverage time series (jan-mathijs schoffelen) ---------------------------------------------------------------------- Message: 1 Date: Wed, 15 Jan 2014 10:19:04 +0100 From: Tobias Staudigl > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Problems with statistics for circular data Message-ID: <52D65288.3070207 at uni-konstanz.de> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Dear Thomas, try using circ_dist.m (in the circ_stats toolbox by Berens). This should solve the circular difference issue. all the best, Tobias Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: > > Dear FieldTrip users, > > I am working on a set of circular data (phase angles of ongoing > oscillations computed via Hilbert transform) and would like to > statistically compare two conditions (A,B). For this, I use the > circular statistics toolbox for matlab by P. Berens. I worked on this > problem from two different angles: > > 1. First, I tried to directly compare the two conditions via the > Watson-Williams two-sample test (function: circ_wwtest). > Unfortunately, this didn't work out, since the test requires an > average resultant vector length of > 0.45 for n >= 11 entries/ > subjects, an assumption which is not met by my data. > > 2. Second, I tried to calculate the angle of difference between the > two conditions (angle(A) -- angle(B)) and then used the one-sample > mean angle test (function: circ_mtest) to test if the resulting angle > of difference is significantly different from zero. Here, the > following problems arise: Since the resulting angles for A and B range > from --pi to +pi, there are cases when the subtraction of the two > angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) -- > (B = -pi) = 2pi), resulting in an error from the circ_mtest function. > I tried to solve this problem by using a modulus (2pi) operation (i.e. > by 'cleaning out' the redundant circumventions while at the same time > preserving the angle information), but unfortunately this didn't work > out either. > > The only other option I can think of would be to generate surrogate > data (i.e. a matrix with the same dimensions as the matrix with the > angles of difference , only filled with zeros) and to apply a > cluster-based permutation test (similar to ft_freqstatitics). Although > this would take care of my multiple-comparison problem, I am not quite > sure if the cluster correction is still valid in this case and if this > test would work for circular data. > > I would greatly appreciate any comments and advice on this matter. > > Thanks for your help, > > Thomas > > Thomas Baumgarten, PhD Student > > Institute of Clinical Neuroscience and Medical Psychology, Medical > Faculty, Heinrich-Heine-University D?sseldorf, Universit?tsstra?e 1, > 40225 D?sseldorf, Germany > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Tobias Staudigl Fachbereich Psychologie - ZPR Postfach ZPR 78457 Konstanz ZPR, Haus 12 Tel.: +49 (0)7531 / 88 - 5703 -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Wed, 15 Jan 2014 11:18:53 +0100 From: jan-mathijs schoffelen > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series Message-ID: <14425A96-E395-4757-904B-5AFB8FEED3EB at donders.ru.nl> Content-Type: text/plain; charset="us-ascii" Hi Kaelasha, Sorry for being unclear. You can do something like: stat = ft_sourcestatistics(cfg, data1, data2, data3, data4, ....), or stat = ft_sourcestatistics(cfg, data{:}); where data is a cell-array of structures (1 cell for each participant/condition). Best, Jan-Mathijs On Jan 15, 2014, at 9:14 AM, Kaelasha Tyler wrote: > Hi Jan-Mathijs, > > Thanks for this response. > I still have a question though. > You mentioned that it is not necessary to use ft_sourcegrandaverage to perform statistical analysis with source space ERFs across multiple participants. However, what you appeared to suggest in your email, does appear to still use a grand average, e.g. you wrote: > > >you can do something like this > > >cfg = your cfg to ft_sourcestatistics > >stat = ft_sourcestatistics(cfg, grandavg{:}); > > Having played around with it a bit more, I am still unclear how to use multiple inputs (e.g., multiple subjects source data) when using ft_sourcestatistics. I had thought that ft_sourcegrandavarge was a necessity. > Can you make this a bit clearer? > > Also, I did go back and use cfg.fixedori='yes' when calling my first ft_srouceanalysis and moved also my source.avg.mom data into source.avg.pow as you suggested, but this still leaves me with the question above- how to use multiple subjects source data in ft_sourcestatistics? > > Once again, any help from anyone would be much appreciated! > > Kaelasha > > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] > Sent: Tuesday, 14 January 2014 5:52 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series > > Hi Kaelasha, > > You actually don't need to use ft_sourcegrandaverage if your goal is to do statistics. Ft_sourcestatistics in principle knows how to deal with multiple inputs. > Thus, > rather than doing > > cfg = []; > cfg.keepindividual = 'yes'; > grandavg = ft_sourcegrandaverage(cfg, subjectdata{:}); > > you can do something like this > > cfg = your cfg to ft_sourcestatistics > stat = ft_sourcestatistics(cfg, grandavg{:}); > > Now, the question boils down to 'how to fool ft_sourcestatistics to swallow my data?'. > > The following should more or less work (but requires some manual labour): > > The time courses at the voxel level are present in source.avg.mom. These are most likely 3xN, 3 dipole orientations times N time points. In order to reduce this, one can project the orientation along the first pca-axis. This can be achieved by a call to ft_sourcedescriptives with cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place with cfg.fixedori = 'yes'. > Then, you could do something like: > > pow = zeros(size(source.pos,1),length(source.time); > pow(source.inside,:) = cat(1,source.avg.mom{source.inside}); > source.avg.pow = pow; > > Just to be sure, add a time-axis to the source structure, i.e. source.time = tlck.time (tlck being the data structure used to create the lcmv-output). > > I think this should bring you close to doing statistics. > > Best, > Jan-Mathijs > > > > On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote: > >> Hi all, >> >> Reading through the discussion list, I see others have also had some issues with creating grand averaged source space time series (ERFs) and subsequent statistical analysis, but I can't see any solutions.... >> >> Questions: >> How can I create time series (ERFs) for grand averaged source space data? >> And, how can I do cluster analysis on these (yet to be created) grand averaged source space ERFs? >> >> >> I have used ft_SOURCEANALYSIS with method 'lcmv' for individual participants to generate source space time series, in data.avg.mom. >> >> Subsequently I used ft_sourcegrandaverage to combine source space data across subjects. >> >> However my grand averaged source data.avg only contains 'pow' and no 'mom'. Eg, no time series for the grand averaged source space data. >> >> As such, I can not do cluster analysis on grand averaged ERFs in source space. >> >> It appears that ft_sourcestatistics only works with parameters that have not more than one value per grid point (e.g. pow, nai etc) and is unable to work with ERF time series? Is this true? >> >> Can any one help with this? >> >> Much obliged. >> Kaelasha >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 38, Issue 18 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Thu Jan 16 07:58:52 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Thu, 16 Jan 2014 07:58:52 +0100 Subject: [FieldTrip] Problems with statistics for circular data Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bertram0611 at pku.edu.cn Thu Jan 16 10:27:40 2014 From: bertram0611 at pku.edu.cn (=?utf-8?B?6JSh5p6X?=) Date: Thu, 16 Jan 2014 17:27:40 +0800 (CST) Subject: [FieldTrip] =?gbk?q?something_wrong_with_my_permutation_test_for_?= =?gbk?q?ERP?= Message-ID: <1496187365.22750.1389864460364.JavaMail.root@bj-mail07.pku.edu.cn> Dear fieldtripers, I have already understood the tuitorials about how to do a permutation test for ERP analysis. I made some codes to do that. But I got some strange results and plots. And I couldnot find problems about my codes. %%%%%%%%%%%Codes: cfg = []; cfg.keepindividual = 'yes'; cfg.channel = 'all'; avg_12 = ft_timelockgrandaverage (cfg, data_12(:).ERP); avg_22 = ft_timelockgrandaverage (cfg, data_22(:).ERP); clear data*; outfil = strcat('/EEG/Discourse_Exp2/n16_grandavg_keeptrial_all_12vs22'); save(outfil, 'avg_12', 'avg_22'); load /EEG/Discourse_Exp2/n16_grandavg_keeptrial_all_12vs22; load (sprintf('E:/EEG/Discourse_Exp2/neighbours_Lin.mat')); % cfgneigh.neighbourdist = 42; %or 45, define the cluster neighbours % select all channels within 40 mm distance of the current channel as neighbours % cfgneigh.elec = elec; % read channel locations and labels from this file cfg.neighbours = neighbours_build; % load J:/new_4_names/data_valence/fieldtrip/elec_60; % cfgneigh.neighbourdist = 42; % select all channels within 36 mm distance of the current channel as neighbours % cfgneigh.elec = elec; % read channel locations and labels from this file % cfg.neighbours = ft_prepare_neighbours(cfgneigh); cfg.channel = {'all'}; cfg.method = 'montecarlo'; % cfg.design = [1:24 1:24; ones(1,24), ones(1,24) * 2]; cfg.design = [1:16 1:16; ones(1,16), ones(1,16) * 2]; cfg.uvar = 1; % subject number (unit variable) on line 1 of the design matrix cfg.ivar = 2; % condition number (independent variable) on line 2 of the design matrix cfg.latency = [0.2 1]; cfg.avgovertime = 'no';%(default = 'no') cfg.numrandomization = 1000; cfg.correctm = 'cluster'; cfg.alpha = 0.05; cfg.tail = 0; % one-or two-sided testing cfg.clusterstatistic = 'maxsum'; % maximum sum of t-values within one cluster is the test statistic cfg.clusterthreshold = 'parametric'; % paired-sample t-test for the uncorrected t-values cfg.clusteralpha = 0.05; cfg.clustertail = 0; % two-sided testing; cfg.statistic = 'depsamplesT'; statis_all_12vs22 = ft_timelockstatistics(cfg, avg_12, avg_22); outfil = strcat('/EEG/Discourse_Exp2/n16_statis_all_12vs22'); save(outfil, 'statis_all_12vs22') %%%%%clustor plot load /EEG/Discourse_Exp2/n16_grandavgERP_resp; load /EEG/Discourse_Exp2/n16_statis_all_12vs22; GA_RvsC = grandavg_12; GA_RvsC.avg = grandavg_22.avg - grandavg_12.avg; figure; timestep = 0.05; %(in seconds) sampling_rate = 500; sample_count = length(statis_all_12vs22.time); j = [0:timestep:1]; % Temporal endpoints (in seconds) of the ERP average computed in each subplot m = [1:timestep*500:sample_count]; % temporal endpoints in MEEG samples pos_cluster_pvals = [statis_all_12vs22.posclusters(:).prob]; pos_signif_clust = find(pos_cluster_pvals < statis_all_12vs22.cfg.alpha); pos = ismember(statis_all_12vs22.posclusterslabelmat, pos_signif_clust); neg_cluster_pvals = [statis_all_12vs22.negclusters(:).prob]; neg_signif_clust = find(neg_cluster_pvals < statis_all_12vs22.cfg.alpha); neg = ismember(statis_all_12vs22.negclusterslabelmat, neg_signif_clust); pos = statis_all_12vs22.posclusterslabelmat == 1; % or == 2, or 3, etc. neg = statis_all_12vs22.negclusterslabelmat == 1; for k = 1:16; subplot(4,4,k); cfg = []; cfg.layout = 'Lin_use.lay'; cfg.xlim=[j(k) j(k+1)]; %cfg.zlim = [-1.0e-13 1.0e-13]; pos_int = all(pos(:, m(k):m(k+1)), 2); neg_int = all(neg(:, m(k):m(k+1)), 2); cfg.highlight = 'on'; cfg.highlightchannel = find(pos_int | neg_int); cfg.comment = 'xlim'; cfg.commentpos = 'title'; ft_topoplotER(cfg, GA_RvsC); end Please help me. Thanks a lot! -- Lin Cai Department of Psychology, Peking University, Beijing 100871, P.R.China -------------- next part -------------- A non-text attachment was scrubbed... Name: strange2.jpg Type: image/jpeg Size: 150724 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: strange.jpg Type: image/jpeg Size: 49512 bytes Desc: not available URL: From f.roux at bcbl.eu Thu Jan 16 13:00:24 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 16 Jan 2014 13:00:24 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing Message-ID: <897231397.337853.1389873624028.JavaMail.root@bcbl.eu> Dear all, does anyone know of a good method to downsample MEG-data acquired with a CTF system before reading it into Matlab/fieldtrip. I remember that there is a command-line tool provided by CTF which can do preprocessing, but I don't remember exactly if it does the job. Or does anyone know of a good alternative solution? Best, Fred From andrecravo at gmail.com Thu Jan 16 13:04:30 2014 From: andrecravo at gmail.com (Andre Cravo) Date: Thu, 16 Jan 2014 10:04:30 -0200 Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: <6C58B92C2519E64688A9E25C7A0D07236E387103@MAIL1-UKD.VMED.UKD> References: <6C58B92C2519E64688A9E25C7A0D07236E387103@MAIL1-UKD.VMED.UKD> Message-ID: Dear Thomas, Please find attached two scripts with parametric paired t-tests for circular data. The first is for first order data, so the input are two vectors with the data. The second one is for second order data, so you need four vectors as inputs: two with the phase values and two with the respective mean resultant length for each phase value. This is important since in second order data(as when you are comparing data from different participants) you should give higher weights to values that are more concentrated around their mean phase. I wrote the scripts to myself, so they are not as commented as they should be, but I hope they are straight forward enough. Please write me if you have any doubts or find any mistakes. Best -- Andre M. Cravo Center for Mathematics, Computation and Cognition Federal University of ABC., Brazil http://neuro.ufabc.edu.br/timing On 16 January 2014 04:52, wrote: > Dear Pierre, > > > > Thank you very much for your quick reply. I downloaded the scripts for the > two non-parametrical tests and will give it a try. Again, thanks for the > help! > > > > Best regards, > > Thomas > > > > Von: fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Pierre Mégevand > Gesendet: Mittwoch, 15. Januar 2014 15:48 > An: fieldtrip at science.ru.nl > > > Betreff: Re: [FieldTrip] Problems with statistics for circular data > > > > Dear Thomas, > > > > When the assumptions of the parametric Watson-Williams test aren't met, you > can use non-parametric statistical tests for circular data, such as Watson's > Yr or U2 tests. > > > > The Yr test is implemented in the MATLAB toolbox PhasePACK by Daniel > Rizzuto: cmean_test.m function, > https://github.com/iandol/spikes/tree/master/Various/PhasePACK). > > > > You can find matlab code for the U2 test here: > http://www.mathworks.com/matlabcentral/fileexchange/43543-watsons-u2-statistic-based-permutation-test-for-circular-data. > I programmed this; it runs very slowly, so if anyone is interested in > looking into it I'm sure we could make it much better. > > > > Pierre > > -- > > Pierre Mégevand, MD, PhD > > Post-doctoral research fellow > > Laboratory for Multimodal Human Brain Mapping > > Feinstein Institute for Medical Research > > Manhasset, NY, USA > > > > On Wed, Jan 15, 2014 at 5:20 AM, wrote: > > 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. Re: Problems with statistics for circular data (Tobias Staudigl) > 2. Re: ft_sourcestatistics and sourcegrandaverage time series > (jan-mathijs schoffelen) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 15 Jan 2014 10:19:04 +0100 > From: Tobias Staudigl > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Problems with statistics for circular data > Message-ID: <52D65288.3070207 at uni-konstanz.de> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > > > Dear Thomas, > > try using circ_dist.m (in the circ_stats toolbox by Berens). > This should solve the circular difference issue. > > all the best, > Tobias > > Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: >> >> Dear FieldTrip users, >> >> I am working on a set of circular data (phase angles of ongoing >> oscillations computed via Hilbert transform) and would like to >> statistically compare two conditions (A,B). For this, I use the >> circular statistics toolbox for matlab by P. Berens. I worked on this >> problem from two different angles: >> >> 1. First, I tried to directly compare the two conditions via the >> Watson-Williams two-sample test (function: circ_wwtest). >> Unfortunately, this didn't work out, since the test requires an >> average resultant vector length of > 0.45 for n >= 11 entries/ >> subjects, an assumption which is not met by my data. >> >> 2. Second, I tried to calculate the angle of difference between the >> two conditions (angle(A) -- angle(B)) and then used the one-sample > >> mean angle test (function: circ_mtest) to test if the resulting angle >> of difference is significantly different from zero. Here, the >> following problems arise: Since the resulting angles for A and B range >> from --pi to +pi, there are cases when the subtraction of the two >> angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) -- > >> (B = -pi) = 2pi), resulting in an error from the circ_mtest function. >> I tried to solve this problem by using a modulus (2pi) operation (i.e. >> by 'cleaning out' the redundant circumventions while at the same time >> preserving the angle information), but unfortunately this didn't work >> out either. >> >> The only other option I can think of would be to generate surrogate >> data (i.e. a matrix with the same dimensions as the matrix with the >> angles of difference , only filled with zeros) and to apply a >> cluster-based permutation test (similar to ft_freqstatitics). Although >> this would take care of my multiple-comparison problem, I am not quite >> sure if the cluster correction is still valid in this case and if this >> test would work for circular data. >> >> I would greatly appreciate any comments and advice on this matter. >> >> Thanks for your help, >> >> Thomas >> >> Thomas Baumgarten, PhD Student >> >> Institute of Clinical Neuroscience and Medical Psychology, Medical >> Faculty, Heinrich-Heine-University D?sseldorf, Universit?tsstra?e 1, >> 40225 D?sseldorf, Germany > >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Dr. Tobias Staudigl > Fachbereich Psychologie - ZPR > Postfach ZPR > 78457 Konstanz > ZPR, Haus 12 > Tel.: +49 (0)7531 / 88 - 5703 > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > > ------------------------------ > > Message: 2 > Date: Wed, 15 Jan 2014 11:18:53 +0100 > From: jan-mathijs schoffelen > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage > time series > Message-ID: <14425A96-E395-4757-904B-5AFB8FEED3EB at donders.ru.nl> > Content-Type: text/plain; charset="us-ascii" > > Hi Kaelasha, > > Sorry for being unclear. You can do something like: > > stat = ft_sourcestatistics(cfg, data1, data2, data3, data4, ....), or stat = > ft_sourcestatistics(cfg, data{:}); where data is a cell-array of structures > (1 cell for each participant/condition). > > Best, > Jan-Mathijs > > > > > On Jan 15, 2014, at 9:14 AM, Kaelasha Tyler wrote: > >> Hi Jan-Mathijs, >> >> Thanks for this response. >> I still have a question though. >> You mentioned that it is not necessary to use ft_sourcegrandaverage to >> perform statistical analysis with source space ERFs across multiple >> participants. However, what you appeared to suggest in your email, does >> appear to still use a grand average, e.g. you wrote: >> >> >you can do something like this >> >> >cfg = your cfg to ft_sourcestatistics >> >stat = ft_sourcestatistics(cfg, grandavg{:}); >> >> Having played around with it a bit more, I am still unclear how to use >> multiple inputs (e.g., multiple subjects source data) when using >> ft_sourcestatistics. I had thought that ft_sourcegrandavarge was a >> necessity. >> Can you make this a bit clearer? >> >> Also, I did go back and use cfg.fixedori='yes' when calling my first >> ft_srouceanalysis and moved also my source.avg.mom data into source.avg.pow >> as you suggested, but this still leaves me with the question above- how to >> use multiple subjects source data in ft_sourcestatistics? >> >> Once again, any help from anyone would be much appreciated! >> >> Kaelasha >> >> From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on >> behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] >> Sent: Tuesday, 14 January 2014 5:52 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time >> series >> >> Hi Kaelasha, >> >> You actually don't need to use ft_sourcegrandaverage if your goal is to do >> statistics. Ft_sourcestatistics in principle knows how to deal with multiple >> inputs. >> Thus, >> rather than doing >> >> cfg = []; >> cfg.keepindividual = 'yes'; >> grandavg = ft_sourcegrandaverage(cfg, subjectdata{:}); >> >> you can do something like this >> >> cfg = your cfg to ft_sourcestatistics >> stat = ft_sourcestatistics(cfg, grandavg{:}); >> >> Now, the question boils down to 'how to fool ft_sourcestatistics to >> swallow my data?'. >> >> The following should more or less work (but requires some manual labour): >> >> The time courses at the voxel level are present in source.avg.mom. These >> are most likely 3xN, 3 dipole orientations times N time points. In order to >> reduce this, one can project the orientation along the first pca-axis. This >> can be achieved by a call to ft_sourcedescriptives with >> cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place >> with cfg.fixedori = 'yes'. >> Then, you could do something like: >> >> pow = zeros(size(source.pos,1),length(source.time); >> pow(source.inside,:) = cat(1,source.avg.mom{source.inside}); >> source.avg.pow = pow; >> >> Just to be sure, add a time-axis to the source structure, i.e. source.time >> = tlck.time (tlck being the data structure used to create the lcmv-output). >> >> I think this should bring you close to doing statistics. >> >> Best, >> Jan-Mathijs >> >> >> >> On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote: >> >>> Hi all, >>> >>> Reading through the discussion list, I see others have also had some >>> issues with creating grand averaged source space time series (ERFs) and >>> subsequent statistical analysis, but I can't see any solutions.... >>> >>> Questions: >>> How can I create time series (ERFs) for grand averaged source space data? >>> And, how can I do cluster analysis on these (yet to be created) grand >>> averaged source space ERFs? >>> >>> >>> I have used ft_SOURCEANALYSIS with method 'lcmv' for individual >>> participants to generate source space time series, in data.avg.mom. >>> >>> Subsequently I used ft_sourcegrandaverage to combine source space data >>> across subjects. >>> >>> However my grand averaged source data.avg only contains 'pow' and no >>> 'mom'. Eg, no time series for the grand averaged source space data. >>> >>> As such, I can not do cluster analysis on grand averaged ERFs in source >>> space. >>> >>> It appears that ft_sourcestatistics only works with parameters that have >>> not more than one value per grid point (e.g. pow, nai etc) and is unable to >>> work with ERF time series? Is this true? >>> >>> Can any one help with this? >>> >>> Much obliged. >>> Kaelasha > >>> >>> >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl > >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > > ------------------------------ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 38, Issue 18 > ***************************************** > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: circ_ttest_p_first.m Type: text/x-objcsrc Size: 1167 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: circ_ttest_p_second.m Type: text/x-objcsrc Size: 1188 bytes Desc: not available URL: From eelke.spaak at donders.ru.nl Thu Jan 16 13:16:06 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 16 Jan 2014 13:16:06 +0100 Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: <897231397.337853.1389873624028.JavaMail.root@bcbl.eu> References: <897231397.337853.1389873624028.JavaMail.root@bcbl.eu> Message-ID: Hi Fred, What about ft_resampledata? This is of course applied only after reading it in, but I'm not sure if it matters. Best, Eelke On 16 January 2014 13:00, Frédéric Roux wrote: > Dear all, > > does anyone know of a good method to downsample MEG-data > acquired with a CTF system before reading it into Matlab/fieldtrip. > > I remember that there is a command-line tool provided by CTF which can do > preprocessing, but I don't remember exactly if it does the job. > > Or does anyone know of a good alternative solution? > > Best, > Fred > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From j.herring at fcdonders.ru.nl Thu Jan 16 13:22:07 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 16 Jan 2014 13:22:07 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: <897231397.337853.1389873624028.JavaMail.root@bcbl.eu> References: <897231397.337853.1389873624028.JavaMail.root@bcbl.eu> Message-ID: <008801cf12b5$929f55d0$b7de0170$@herring@fcdonders.ru.nl> Hi Fred, If memory is an issue you could try reading-in the data per channel, resample, and appending afterwards. Best, Jim -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Frédéric Roux Sent: donderdag 16 januari 2014 13:00 To: FieldTrip discussion list Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear all, does anyone know of a good method to downsample MEG-data acquired with a CTF system before reading it into Matlab/fieldtrip. I remember that there is a command-line tool provided by CTF which can do preprocessing, but I don't remember exactly if it does the job. Or does anyone know of a good alternative solution? Best, Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hweeling.lee at gmail.com Thu Jan 16 13:22:14 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 16 Jan 2014 13:22:14 +0100 Subject: [FieldTrip] problem with ICA Message-ID: Dear all, I've collected data using a 128 channel EEG cap, and I tried to perform ICA on the data. However, I got an error message with fieldtrip on Matlab. Here's the error message: the input is raw data with 127 channels and 1 trials selecting 123 channels baseline correcting data scaling data with 1 over 148.247820 concatenating data. concatenated data matrix size 123x2789000 starting decomposition using runica Input data size [123,2789000] = 123 channels, 2789000 frames/nFinding 123 ICA components using logistic ICA. Decomposing 184 frames per ICA weight ((15129)^2 = 2789000 weights, Initial learning rate will be 0.001, block size 75. Learning rate will be multiplied by 0.9 whenever angledelta >= 60 deg. More than 32 channels: default stopping weight change 1E-7 Training will end when wchange < 1e-07 or after 512 steps. Online bias adjustment will be used. Removing mean of each channel ... Final training data range: -3.46556 to 6.39436 Computing the sphering matrix... Starting weights are the identity matrix ... Sphering the data ... Beginning ICA training ... Data has rank 119. Cannot compute 123 components. the call to "ft_componentanalysis" took 148 seconds Could someone please let me know what went wrong? Thanks! Cheers, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at fcdonders.ru.nl Thu Jan 16 13:30:30 2014 From: stan.vanpelt at fcdonders.ru.nl (Stan van Pelt) Date: Thu, 16 Jan 2014 13:30:30 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: References: <897231397.337853.1389873624028.JavaMail.root@bcbl.eu> Message-ID: <00a201cf12b6$be30c9d0$3a925d70$@vanpelt@fcdonders.ru.nl> Hi Frederic, You might be able to do that with CTF software, most likely DataEditor. Best, Stan -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak Sent: donderdag 16 januari 2014 13:16 To: FieldTrip discussion list Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Hi Fred, What about ft_resampledata? This is of course applied only after reading it in, but I'm not sure if it matters. Best, Eelke On 16 January 2014 13:00, Frédéric Roux wrote: > Dear all, > > does anyone know of a good method to downsample MEG-data acquired with > a CTF system before reading it into Matlab/fieldtrip. > > I remember that there is a command-line tool provided by CTF which can > do preprocessing, but I don't remember exactly if it does the job. > > Or does anyone know of a good alternative solution? > > Best, > Fred > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From f.roux at bcbl.eu Thu Jan 16 13:30:28 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 16 Jan 2014 13:30:28 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: <008801cf12b5$929f55d0$b7de0170$@herring@fcdonders.ru.nl> Message-ID: <145116688.338728.1389875428825.JavaMail.root@bcbl.eu> Hi Jim, Hi Eelke, thanks for the fast response. My issue is that I would like to use ft_definetrial to get to my trigger events, hence the reason why I want to downsample the raw-data before accessing it with ft. But technically, I guess I should be able to write up my own trigger detection code. It's just more convenient without having to do that extra step. I thought I'd ask before doing that. In any case if anyone comes up with an idea how to do the downsampling on the raw-data, please let me know. Best, Fred Frédéric Roux ----- Original Message ----- From: "J.D. Herring (Jim)" To: "FieldTrip discussion list" Sent: Thursday, January 16, 2014 1:22:07 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Hi Fred, If memory is an issue you could try reading-in the data per channel, resample, and appending afterwards. Best, Jim -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Frédéric Roux Sent: donderdag 16 januari 2014 13:00 To: FieldTrip discussion list Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear all, does anyone know of a good method to downsample MEG-data acquired with a CTF system before reading it into Matlab/fieldtrip. I remember that there is a command-line tool provided by CTF which can do preprocessing, but I don't remember exactly if it does the job. Or does anyone know of a good alternative solution? Best, Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From aaron.schurger at gmail.com Thu Jan 16 13:42:53 2014 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Thu, 16 Jan 2014 13:42:53 +0100 Subject: [FieldTrip] problem with ICA In-Reply-To: References: Message-ID: Sounds like you may have done something to your data, like interpolating channels, before you ran ICA. It is OK to filter your data before running ICA, and some other operations are OK too, but if you do anything that mixes activity from different channels in any way, then you can run into problems with ICA (and results from ICA can be invalid). Aaron On Thu, Jan 16, 2014 at 1:22 PM, Hwee Ling Lee wrote: > Dear all, > > I've collected data using a 128 channel EEG cap, and I tried to perform ICA > on the data. However, I got an error message with fieldtrip on Matlab. > Here's the error message: > > the input is raw data with 127 channels and 1 trials > selecting 123 channels > baseline correcting data > scaling data with 1 over 148.247820 > concatenating data. > concatenated data matrix size 123x2789000 > starting decomposition using runica > > Input data size [123,2789000] = 123 channels, 2789000 frames/nFinding 123 > ICA components using logistic ICA. > Decomposing 184 frames per ICA weight ((15129)^2 = 2789000 weights, Initial > learning rate will be 0.001, block size 75. > Learning rate will be multiplied by 0.9 whenever angledelta >= 60 deg. > More than 32 channels: default stopping weight change 1E-7 > Training will end when wchange < 1e-07 or after 512 steps. > Online bias adjustment will be used. > Removing mean of each channel ... > Final training data range: -3.46556 to 6.39436 > Computing the sphering matrix... > Starting weights are the identity matrix ... > Sphering the data ... > Beginning ICA training ... > Data has rank 119. Cannot compute 123 components. > the call to "ft_componentanalysis" took 148 seconds > > Could someone please let me know what went wrong? > > Thanks! > > Cheers, > Hweeling > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Senior researcher Laboratory of Cognitive Neuroscience Brain-Mind Institute, Department of Life Sciences École Polytechnique Fédérale de Lausanne Station 19, AI 2101 1015 Lausanne, Switzerland +41 21 693 1771 aaron.schurger at epfl.ch http://lnco.epfl.ch/ From eelke.spaak at donders.ru.nl Thu Jan 16 13:54:29 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 16 Jan 2014 13:54:29 +0100 Subject: [FieldTrip] problem with ICA In-Reply-To: References: Message-ID: Hi Hweeling, To add to Aaron's explanation, you can instruct the algorithm to use a subspace projection of your data by specifying cfg.runica.pca = N, where N is the rank of your data (in your case 119, it seems). Best, Eelke On 16 January 2014 13:42, Aaron Schurger wrote: > Sounds like you may have done something to your data, like > interpolating channels, before you ran ICA. It is OK to filter your > data before running ICA, and some other operations are OK too, but if > you do anything that mixes activity from different channels in any > way, then you can run into problems with ICA (and results from ICA can > be invalid). > Aaron > > On Thu, Jan 16, 2014 at 1:22 PM, Hwee Ling Lee wrote: >> Dear all, >> >> I've collected data using a 128 channel EEG cap, and I tried to perform ICA >> on the data. However, I got an error message with fieldtrip on Matlab. >> Here's the error message: >> >> the input is raw data with 127 channels and 1 trials >> selecting 123 channels >> baseline correcting data >> scaling data with 1 over 148.247820 >> concatenating data. >> concatenated data matrix size 123x2789000 >> starting decomposition using runica >> >> Input data size [123,2789000] = 123 channels, 2789000 frames/nFinding 123 >> ICA components using logistic ICA. >> Decomposing 184 frames per ICA weight ((15129)^2 = 2789000 weights, Initial >> learning rate will be 0.001, block size 75. >> Learning rate will be multiplied by 0.9 whenever angledelta >= 60 deg. >> More than 32 channels: default stopping weight change 1E-7 >> Training will end when wchange < 1e-07 or after 512 steps. >> Online bias adjustment will be used. >> Removing mean of each channel ... >> Final training data range: -3.46556 to 6.39436 >> Computing the sphering matrix... >> Starting weights are the identity matrix ... >> Sphering the data ... >> Beginning ICA training ... >> Data has rank 119. Cannot compute 123 components. >> the call to "ft_componentanalysis" took 148 seconds >> >> Could someone please let me know what went wrong? >> >> Thanks! >> >> Cheers, >> Hweeling >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Aaron Schurger, PhD > Senior researcher > Laboratory of Cognitive Neuroscience > Brain-Mind Institute, Department of Life Sciences > École Polytechnique Fédérale de Lausanne > Station 19, AI 2101 > 1015 Lausanne, Switzerland > +41 21 693 1771 > aaron.schurger at epfl.ch > http://lnco.epfl.ch/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From litvak.vladimir at gmail.com Thu Jan 16 13:57:25 2014 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 16 Jan 2014 12:57:25 +0000 Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: <145116688.338728.1389875428825.JavaMail.root@bcbl.eu> References: <145116688.338728.1389875428825.JavaMail.root@bcbl.eu> Message-ID: Dear Fred, The CTF command line tool is called newDs . There is a configuration file that you should set-up to specify that you want it to downsample. I used it a long time ago but I can try to find out more details if you can't figure it out yourself. The documentation for the function should be in CTF PDF files. Best, Vladimir On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux wrote: > Hi Jim, Hi Eelke, > > thanks for the fast response. > > My issue is that I would like to use ft_definetrial > to get to my trigger events, hence the reason why > I want to downsample the raw-data before accessing it > with ft. > > But technically, I guess I should be able to write up > my own trigger detection code. It's just more convenient > without having to do that extra step. > > I thought I'd ask before doing that. > > In any case if anyone comes up with an idea how to do the > downsampling on the raw-data, please let me know. > > Best, > Fred > > > > Frédéric Roux > > ----- Original Message ----- > From: "J.D. Herring (Jim)" > To: "FieldTrip discussion list" > Sent: Thursday, January 16, 2014 1:22:07 PM > Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > Hi Fred, > > If memory is an issue you could try reading-in the data per channel, > resample, and appending afterwards. > > Best, > > Jim > > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Frédéric Roux > Sent: donderdag 16 januari 2014 13:00 > To: FieldTrip discussion list > Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > Dear all, > > does anyone know of a good method to downsample MEG-data acquired with a > CTF system before reading it into Matlab/fieldtrip. > > I remember that there is a command-line tool provided by CTF which can do > preprocessing, but I don't remember exactly if it does the job. > > Or does anyone know of a good alternative solution? > > Best, > Fred > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Thu Jan 16 14:10:58 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 16 Jan 2014 14:10:58 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: Message-ID: <2116649278.339295.1389877858745.JavaMail.root@bcbl.eu> Hi Vladimir, yes now I remember - newDs - will give it a try. Thanks a lot everyone for the fast and helpful comments! Fred ----- Original Message ----- From: "Vladimir Litvak" To: "FieldTrip discussion list" Sent: Thursday, January 16, 2014 1:57:25 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear Fred, The CTF command line tool is called newDs . There is a configuration file that you should set-up to specify that you want it to downsample. I used it a long time ago but I can try to find out more details if you can't figure it out yourself. The documentation for the function should be in CTF PDF files. Best, Vladimir On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: Hi Jim, Hi Eelke, thanks for the fast response. My issue is that I would like to use ft_definetrial to get to my trigger events, hence the reason why I want to downsample the raw-data before accessing it with ft. But technically, I guess I should be able to write up my own trigger detection code. It's just more convenient without having to do that extra step. I thought I'd ask before doing that. In any case if anyone comes up with an idea how to do the downsampling on the raw-data, please let me know. Best, Fred Frédéric Roux ----- Original Message ----- From: "J.D. Herring (Jim)" < j.herring at fcdonders.ru.nl > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Thursday, January 16, 2014 1:22:07 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Hi Fred, If memory is an issue you could try reading-in the data per channel, resample, and appending afterwards. Best, Jim -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto: fieldtrip-bounces at science.ru.nl ] On Behalf Of Frédéric Roux Sent: donderdag 16 januari 2014 13:00 To: FieldTrip discussion list Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear all, does anyone know of a good method to downsample MEG-data acquired with a CTF system before reading it into Matlab/fieldtrip. I remember that there is a command-line tool provided by CTF which can do preprocessing, but I don't remember exactly if it does the job. Or does anyone know of a good alternative solution? Best, Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From litvak.vladimir at gmail.com Thu Jan 16 14:28:03 2014 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 16 Jan 2014 13:28:03 +0000 Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: <2116649278.339295.1389877858745.JavaMail.root@bcbl.eu> References: <2116649278.339295.1389877858745.JavaMail.root@bcbl.eu> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: warning1.txt URL: -------------- next part -------------- Here is my old code. Actually the config file is just for filtering but I think you must low-pass before downsampling as it won't do it automatically. It might do more than you need as I also had to convert pseudo-epoched to continuous data. Vladimir On Thu, Jan 16, 2014 at 1:10 PM, Frédéric Roux wrote: > Hi Vladimir, > > yes now I remember - newDs - will give it a try. > > Thanks a lot everyone for the fast and helpful comments! > > Fred > > ----- Original Message ----- > From: "Vladimir Litvak" > To: "FieldTrip discussion list" > Sent: Thursday, January 16, 2014 1:57:25 PM > Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > > > Dear Fred, > > > The CTF command line tool is called newDs . There is a configuration file > that you should set-up to specify that you want it to downsample. I used it > a long time ago but I can try to find out more details if you can't figure > it out yourself. The documentation for the function should be in CTF PDF > files. > > > Best, > > > Vladimir > > > > On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: > > > Hi Jim, Hi Eelke, > > thanks for the fast response. > > My issue is that I would like to use ft_definetrial > to get to my trigger events, hence the reason why > I want to downsample the raw-data before accessing it > with ft. > > But technically, I guess I should be able to write up > my own trigger detection code. It's just more convenient > without having to do that extra step. > > I thought I'd ask before doing that. > > In any case if anyone comes up with an idea how to do the > downsampling on the raw-data, please let me know. > > Best, > Fred > > > > Frédéric Roux > > > ----- Original Message ----- > From: "J.D. Herring (Jim)" < j.herring at fcdonders.ru.nl > > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > > Sent: Thursday, January 16, 2014 1:22:07 PM > Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > Hi Fred, > > > If memory is an issue you could try reading-in the data per channel, > resample, and appending afterwards. > > Best, > > Jim > > > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl > [mailto: fieldtrip-bounces at science.ru.nl ] On Behalf Of Frédéric Roux > Sent: donderdag 16 januari 2014 13:00 > To: FieldTrip discussion list > > > Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > Dear all, > > does anyone know of a good method to downsample MEG-data acquired with a > CTF system before reading it into Matlab/fieldtrip. > > I remember that there is a command-line tool provided by CTF which can do > preprocessing, but I don't remember exactly if it does the job. > > Or does anyone know of a good alternative solution? > > Best, > Fred > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > 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: processing.cfg Type: application/octet-stream Size: 1237 bytes Desc: not available URL: From f.roux at bcbl.eu Thu Jan 16 15:51:06 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 16 Jan 2014 15:51:06 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: Message-ID: <1097371150.341210.1389883866905.JavaMail.root@bcbl.eu> Hi Vladimir, looks like the shell-script got blocked my the mail-server. would you mind sending it to froux at bcbl.eu ? Thanks, Fred Frédéric Roux ----- Original Message ----- From: "Vladimir Litvak" To: "FieldTrip discussion list" Sent: Thursday, January 16, 2014 2:28:03 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing [Text File:warning1.txt] Here is my old code. Actually the config file is just for filtering but I think you must low-pass before downsampling as it won't do it automatically. It might do more than you need as I also had to convert pseudo-epoched to continuous data. Vladimir On Thu, Jan 16, 2014 at 1:10 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: Hi Vladimir, yes now I remember - newDs - will give it a try. Thanks a lot everyone for the fast and helpful comments! Fred ----- Original Message ----- From: "Vladimir Litvak" < litvak.vladimir at gmail.com > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Thursday, January 16, 2014 1:57:25 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear Fred, The CTF command line tool is called newDs . There is a configuration file that you should set-up to specify that you want it to downsample. I used it a long time ago but I can try to find out more details if you can't figure it out yourself. The documentation for the function should be in CTF PDF files. Best, Vladimir On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: Hi Jim, Hi Eelke, thanks for the fast response. My issue is that I would like to use ft_definetrial to get to my trigger events, hence the reason why I want to downsample the raw-data before accessing it with ft. But technically, I guess I should be able to write up my own trigger detection code. It's just more convenient without having to do that extra step. I thought I'd ask before doing that. In any case if anyone comes up with an idea how to do the downsampling on the raw-data, please let me know. Best, Fred Frédéric Roux ----- Original Message ----- From: "J.D. Herring (Jim)" < j.herring at fcdonders.ru.nl > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Thursday, January 16, 2014 1:22:07 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Hi Fred, If memory is an issue you could try reading-in the data per channel, resample, and appending afterwards. Best, Jim -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto: fieldtrip-bounces at science.ru.nl ] On Behalf Of Frédéric Roux Sent: donderdag 16 januari 2014 13:00 To: FieldTrip discussion list Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear all, does anyone know of a good method to downsample MEG-data acquired with a CTF system before reading it into Matlab/fieldtrip. I remember that there is a command-line tool provided by CTF which can do preprocessing, but I don't remember exactly if it does the job. Or does anyone know of a good alternative solution? Best, Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ 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 litvak.vladimir at gmail.com Thu Jan 16 15:58:31 2014 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 16 Jan 2014 14:58:31 +0000 Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: <1097371150.341210.1389883866905.JavaMail.root@bcbl.eu> References: <1097371150.341210.1389883866905.JavaMail.root@bcbl.eu> Message-ID: Here it is, just in case some else will need it in the future. #!/bin/sh files=`ls -1Ad ${1}` for f in $files do newSingleTrialDs $f ./s_`basename $f` newDs -f -filter processing.cfg -resample 8 ./s_`basename $f` ./r_`basename $f` rm -rf ./s_`basename $f` done On Thu, Jan 16, 2014 at 2:51 PM, Frédéric Roux wrote: > Hi Vladimir, > > looks like the shell-script got blocked my the mail-server. > would you mind sending it to froux at bcbl.eu ? > > Thanks, > > Fred > > Frédéric Roux > > ----- Original Message ----- > From: "Vladimir Litvak" > To: "FieldTrip discussion list" > Sent: Thursday, January 16, 2014 2:28:03 PM > Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > > [Text File:warning1.txt] > > > > Here is my old code. Actually the config file is just for filtering but I > think you must low-pass before downsampling as it won't do it > automatically. It might do more than you need as I also had to convert > pseudo-epoched to continuous data. > > > Vladimir > > > > On Thu, Jan 16, 2014 at 1:10 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: > > > Hi Vladimir, > > yes now I remember - newDs - will give it a try. > > Thanks a lot everyone for the fast and helpful comments! > > Fred > > > ----- Original Message ----- > From: "Vladimir Litvak" < litvak.vladimir at gmail.com > > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > > > > Sent: Thursday, January 16, 2014 1:57:25 PM > Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > > > Dear Fred, > > > The CTF command line tool is called newDs . There is a configuration file > that you should set-up to specify that you want it to downsample. I used it > a long time ago but I can try to find out more details if you can't figure > it out yourself. The documentation for the function should be in CTF PDF > files. > > > Best, > > > Vladimir > > > > On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: > > > Hi Jim, Hi Eelke, > > thanks for the fast response. > > My issue is that I would like to use ft_definetrial > to get to my trigger events, hence the reason why > I want to downsample the raw-data before accessing it > with ft. > > But technically, I guess I should be able to write up > my own trigger detection code. It's just more convenient > without having to do that extra step. > > I thought I'd ask before doing that. > > In any case if anyone comes up with an idea how to do the > downsampling on the raw-data, please let me know. > > Best, > Fred > > > > Frédéric Roux > > > ----- Original Message ----- > From: "J.D. Herring (Jim)" < j.herring at fcdonders.ru.nl > > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > > Sent: Thursday, January 16, 2014 1:22:07 PM > Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > Hi Fred, > > > If memory is an issue you could try reading-in the data per channel, > resample, and appending afterwards. > > Best, > > Jim > > > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl > [mailto: fieldtrip-bounces at science.ru.nl ] On Behalf Of Frédéric Roux > Sent: donderdag 16 januari 2014 13:00 > To: FieldTrip discussion list > > > Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > Dear all, > > does anyone know of a good method to downsample MEG-data acquired with a > CTF system before reading it into Matlab/fieldtrip. > > I remember that there is a command-line tool provided by CTF which can do > preprocessing, but I don't remember exactly if it does the job. > > Or does anyone know of a good alternative solution? > > Best, > Fred > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > 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 hweeling.lee at gmail.com Thu Jan 16 16:09:13 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 16 Jan 2014 16:09:13 +0100 Subject: [FieldTrip] problem with ICA In-Reply-To: References: Message-ID: Hi, Thanks for suggestion. Actually, prior to running ICA, I did a notch filter of 50 Hz and also to remove cardioballistic effects based on the ECG channel. Does it consider to be mixing the channels? Cheers, Hweeling On 16 January 2014 13:54, Eelke Spaak wrote: > Hi Hweeling, > > To add to Aaron's explanation, you can instruct the algorithm to use a > subspace projection of your data by specifying cfg.runica.pca = N, > where N is the rank of your data (in your case 119, it seems). > > Best, > Eelke > > On 16 January 2014 13:42, Aaron Schurger wrote: > > Sounds like you may have done something to your data, like > > interpolating channels, before you ran ICA. It is OK to filter your > > data before running ICA, and some other operations are OK too, but if > > you do anything that mixes activity from different channels in any > > way, then you can run into problems with ICA (and results from ICA can > > be invalid). > > Aaron > > > > On Thu, Jan 16, 2014 at 1:22 PM, Hwee Ling Lee > wrote: > >> Dear all, > >> > >> I've collected data using a 128 channel EEG cap, and I tried to perform > ICA > >> on the data. However, I got an error message with fieldtrip on Matlab. > >> Here's the error message: > >> > >> the input is raw data with 127 channels and 1 trials > >> selecting 123 channels > >> baseline correcting data > >> scaling data with 1 over 148.247820 > >> concatenating data. > >> concatenated data matrix size 123x2789000 > >> starting decomposition using runica > >> > >> Input data size [123,2789000] = 123 channels, 2789000 frames/nFinding > 123 > >> ICA components using logistic ICA. > >> Decomposing 184 frames per ICA weight ((15129)^2 = 2789000 weights, > Initial > >> learning rate will be 0.001, block size 75. > >> Learning rate will be multiplied by 0.9 whenever angledelta >= 60 deg. > >> More than 32 channels: default stopping weight change 1E-7 > >> Training will end when wchange < 1e-07 or after 512 steps. > >> Online bias adjustment will be used. > >> Removing mean of each channel ... > >> Final training data range: -3.46556 to 6.39436 > >> Computing the sphering matrix... > >> Starting weights are the identity matrix ... > >> Sphering the data ... > >> Beginning ICA training ... > >> Data has rank 119. Cannot compute 123 components. > >> the call to "ft_componentanalysis" took 148 seconds > >> > >> Could someone please let me know what went wrong? > >> > >> Thanks! > >> > >> Cheers, > >> Hweeling > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > -- > > Aaron Schurger, PhD > > Senior researcher > > Laboratory of Cognitive Neuroscience > > Brain-Mind Institute, Department of Life Sciences > > École Polytechnique Fédérale de Lausanne > > Station 19, AI 2101 > > 1015 Lausanne, Switzerland > > +41 21 693 1771 > > aaron.schurger at epfl.ch > > http://lnco.epfl.ch/ > > > > _______________________________________________ > > 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 > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Thu Jan 16 17:17:01 2014 From: mcantor at umich.edu (Max Cantor) Date: Thu, 16 Jan 2014 11:17:01 -0500 Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: References: <1097371150.341210.1389883866905.JavaMail.root@bcbl.eu> Message-ID: Hi, So I'm having an issue involving, well I think the issue may not be the downsampling per se, but it does involve attempting to recreate a code similar to the above but in fieldtrip. I'm currently attempting two different methods: 1. Method One: Define trials as a cfg_(condition), with the preprocessing parameters contained within the cfg. Then preprocess the cfg_condition. Finally, downsample using ft_resampledata 2. Method Two: Preprocess the data by channel in a for loop, then concatenate using ft_appenddata, followed by epoching, and finally downsampling. In the original version of this method I downsampled in the for loop, as doing it without downsampling in the loop still strains my computers memory, but when I do that the epoching doesn't seem to work for reasons I partially understand, but in any case can't figure out a workaround for that would be reasonably straightforward. In any case, when I do either of these methods, I run into an error: 1. For the first method reading and preprocessing trial 1 from 100 getCTFdata: dataList error: points=21086:21085 trial=1 points/trial=1584000 No. of trials=1 2. The Second method Attempted to access data.time.%cell(1); index out of bounds because numel(data.time.%cell)=0. Error in ft_resampledata (line 149) firstsmp(itr) = data.time{itr}(1); Again, I'm not entirely convinced the issue is with downsampling per se, but that is my best guess at the moment. Any help would be greatly appreciated. Max Cantor Research Assistant Computational Neurolinguistics Lab University of Michigan On Thu, Jan 16, 2014 at 9:58 AM, Vladimir Litvak wrote: > Here it is, just in case some else will need it in the future. > > #!/bin/sh > files=`ls -1Ad ${1}` > > for f in $files > do > newSingleTrialDs $f ./s_`basename $f` > newDs -f -filter processing.cfg -resample 8 ./s_`basename $f` > ./r_`basename $f` > rm -rf ./s_`basename $f` > done > > > > > On Thu, Jan 16, 2014 at 2:51 PM, Frédéric Roux wrote: > >> Hi Vladimir, >> >> looks like the shell-script got blocked my the mail-server. >> would you mind sending it to froux at bcbl.eu ? >> >> Thanks, >> >> Fred >> >> Frédéric Roux >> >> ----- Original Message ----- >> From: "Vladimir Litvak" >> To: "FieldTrip discussion list" >> Sent: Thursday, January 16, 2014 2:28:03 PM >> Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing >> >> >> [Text File:warning1.txt] >> >> >> >> Here is my old code. Actually the config file is just for filtering but I >> think you must low-pass before downsampling as it won't do it >> automatically. It might do more than you need as I also had to convert >> pseudo-epoched to continuous data. >> >> >> Vladimir >> >> >> >> On Thu, Jan 16, 2014 at 1:10 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: >> >> >> Hi Vladimir, >> >> yes now I remember - newDs - will give it a try. >> >> Thanks a lot everyone for the fast and helpful comments! >> >> Fred >> >> >> ----- Original Message ----- >> From: "Vladimir Litvak" < litvak.vladimir at gmail.com > >> To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > >> >> >> Sent: Thursday, January 16, 2014 1:57:25 PM >> Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing >> >> >> >> Dear Fred, >> >> >> The CTF command line tool is called newDs . There is a configuration file >> that you should set-up to specify that you want it to downsample. I used it >> a long time ago but I can try to find out more details if you can't figure >> it out yourself. The documentation for the function should be in CTF PDF >> files. >> >> >> Best, >> >> >> Vladimir >> >> >> >> On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: >> >> >> Hi Jim, Hi Eelke, >> >> thanks for the fast response. >> >> My issue is that I would like to use ft_definetrial >> to get to my trigger events, hence the reason why >> I want to downsample the raw-data before accessing it >> with ft. >> >> But technically, I guess I should be able to write up >> my own trigger detection code. It's just more convenient >> without having to do that extra step. >> >> I thought I'd ask before doing that. >> >> In any case if anyone comes up with an idea how to do the >> downsampling on the raw-data, please let me know. >> >> Best, >> Fred >> >> >> >> Frédéric Roux >> >> >> ----- Original Message ----- >> From: "J.D. Herring (Jim)" < j.herring at fcdonders.ru.nl > >> To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > >> Sent: Thursday, January 16, 2014 1:22:07 PM >> Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing >> >> Hi Fred, >> >> >> If memory is an issue you could try reading-in the data per channel, >> resample, and appending afterwards. >> >> Best, >> >> Jim >> >> >> -----Original Message----- >> From: fieldtrip-bounces at science.ru.nl >> [mailto: fieldtrip-bounces at science.ru.nl ] On Behalf Of Frédéric Roux >> Sent: donderdag 16 januari 2014 13:00 >> To: FieldTrip discussion list >> >> >> Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing >> >> Dear all, >> >> does anyone know of a good method to downsample MEG-data acquired with a >> CTF system before reading it into Matlab/fieldtrip. >> >> I remember that there is a command-line tool provided by CTF which can do >> preprocessing, but I don't remember exactly if it does the job. >> >> Or does anyone know of a good alternative solution? >> >> Best, >> Fred >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Thu Jan 16 20:32:53 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 16 Jan 2014 20:32:53 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: Message-ID: <1884515464.344585.1389900773892.JavaMail.root@bcbl.eu> Thanks Vladimir, this is very helpful. Best, Fred ----- Original Message ----- From: "Vladimir Litvak" To: "FieldTrip discussion list" Sent: Thursday, January 16, 2014 3:58:31 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Here it is, just in case some else will need it in the future. #!/bin/sh files=`ls -1Ad ${1}` for f in $files do newSingleTrialDs $f ./s_`basename $f` newDs -f -filter processing.cfg -resample 8 ./s_`basename $f` ./r_`basename $f` rm -rf ./s_`basename $f` done On Thu, Jan 16, 2014 at 2:51 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: Hi Vladimir, looks like the shell-script got blocked my the mail-server. would you mind sending it to froux at bcbl.eu ? Thanks, Fred Frédéric Roux ----- Original Message ----- From: "Vladimir Litvak" < litvak.vladimir at gmail.com > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Thursday, January 16, 2014 2:28:03 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing [Text File:warning1.txt] Here is my old code. Actually the config file is just for filtering but I think you must low-pass before downsampling as it won't do it automatically. It might do more than you need as I also had to convert pseudo-epoched to continuous data. Vladimir On Thu, Jan 16, 2014 at 1:10 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: Hi Vladimir, yes now I remember - newDs - will give it a try. Thanks a lot everyone for the fast and helpful comments! Fred ----- Original Message ----- From: "Vladimir Litvak" < litvak.vladimir at gmail.com > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Thursday, January 16, 2014 1:57:25 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear Fred, The CTF command line tool is called newDs . There is a configuration file that you should set-up to specify that you want it to downsample. I used it a long time ago but I can try to find out more details if you can't figure it out yourself. The documentation for the function should be in CTF PDF files. Best, Vladimir On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: Hi Jim, Hi Eelke, thanks for the fast response. My issue is that I would like to use ft_definetrial to get to my trigger events, hence the reason why I want to downsample the raw-data before accessing it with ft. But technically, I guess I should be able to write up my own trigger detection code. It's just more convenient without having to do that extra step. I thought I'd ask before doing that. In any case if anyone comes up with an idea how to do the downsampling on the raw-data, please let me know. Best, Fred Frédéric Roux ----- Original Message ----- From: "J.D. Herring (Jim)" < j.herring at fcdonders.ru.nl > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Thursday, January 16, 2014 1:22:07 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Hi Fred, If memory is an issue you could try reading-in the data per channel, resample, and appending afterwards. Best, Jim -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto: fieldtrip-bounces at science.ru.nl ] On Behalf Of Frédéric Roux Sent: donderdag 16 januari 2014 13:00 To: FieldTrip discussion list Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear all, does anyone know of a good method to downsample MEG-data acquired with a CTF system before reading it into Matlab/fieldtrip. I remember that there is a command-line tool provided by CTF which can do preprocessing, but I don't remember exactly if it does the job. Or does anyone know of a good alternative solution? Best, Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From berryv.dberg at gmail.com Thu Jan 16 23:11:50 2014 From: berryv.dberg at gmail.com (berry van den berg) Date: Thu, 16 Jan 2014 14:11:50 -0800 Subject: [FieldTrip] ft_statistics_montecarlo runs slow under ubuntu 13.10 Message-ID: Dear Fieldtrip experts, This might be an odd question, but maybe someone has an idea where to start. I just got a fancy new laptop (gigabyte p34g) and dual boot with ubuntu and windows. I usually work in Ubuntu for analysis, so I ran a time freq statistics analysis and noticed that ft_statistics_montecarlo runs extremely slow under Ubuntu.... In windows it runs at normal speed. The difference is huge, 97 seconds vs, 2 seconds for 100 iterations, 24 subjects. Speed also doesnt seem influenced by averaging over freq or/and time, it is just slow. It is not the cpu clock speed (ubuntu nicely utilizes turbo mode, running max 3ghz), the cpu is not fully utilized though (only 30 percent or so)... I run matlab 2013b, fieldtrip 20140115 Specs are 8gb ram; only 4gb utilized. 4700HQ cpu Any ideas, because I am clueless Cheers, -- Berry van den Berg berryv.dberg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Sun Jan 19 12:21:36 2014 From: roeysc at gmail.com (Roey Schurr) Date: Sun, 19 Jan 2014 13:21:36 +0200 Subject: [FieldTrip] Creating a head model using OPENMEEG - Intersecting mesh error Message-ID: Dear fieldtrippers, I am writing you after encountering an error using the OPENMEEG method for creating a head model, which I need for source reconstruction of EEG data (using 19 electrodes), e.g.: ... triangles 5018 and 5129 are intersecting triangles 5305 and 5781 are intersecting triangles 5879 and 5907 are intersecting !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!! WARNING !!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Mesh is self intersecting ! ... 2 meshes are intersecting ! It seems to be the same problem reported by Olivia about two years ago: http://mailman.science.ru.nl/pipermail/fieldtrip/2012-March/004881.html In what follows I will describe the main steps in my script: 1) I create a segmented 'brain','skull','scalp' mri structure of the subject: cfg.output = {'brain','skull','scalp'}; [bss_segmentedmri] = ft_volumesegment(cfg, mri); 2) I try using ft_sourceanalysis 3) which in turn tries to compute the leadfield using ft_compute_leadfield through ft_leadfield_openmeeg. yes this doesn't work, and I get the following error: Error using fprintf Invalid file identifier. Use fopen to generate a valid file identifier. Error in ft_leadfield_openmeeg (line 112) fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, sens.chanpos(ii,:)); Since it is crucial that I use a realistic head model, do you have any suggestions? Any advice would be greatly appreciated! Thank you, and have a nice week, roey -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Sun Jan 19 12:35:47 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Sun, 19 Jan 2014 12:35:47 +0100 Subject: [FieldTrip] =?utf-8?q?Creating_a_head_model_using_OPENMEEG_-_Inte?= =?utf-8?q?rsecting_=09mesh__error?= Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dominik.bach at uzh.ch Sun Jan 19 14:07:30 2014 From: dominik.bach at uzh.ch (Dominik R Bach) Date: Sun, 19 Jan 2014 14:07:30 +0100 Subject: [FieldTrip] Postdoc position in comparative/computational emotion neuroscience at University of Zurich, starting 2014 Message-ID: <52DBCE12.7040905@uzh.ch> Applications are invited for a post-doctoral position to work on the neurobiology of anxiety and fear, with a methodical focus on either MEG, high-field MRI, or computational modelling. The Comparative Emotion Neuroscience Group (www.bachlab.org) currently hosts 1 PostDoc, 3 PhD students, and several support staff, and is looking for a second post-doctoral fellow. The group's aim is to develop formal models of animal and human defensive emotions (panic, fear, anxiety), characterise their neuroanatomy and the underlying neural computations using neuroimaging techniques (fMRI, M/EEG) in humans, andapply this knowledge to psychiatric syndromes involving pathological emotions. The laboratory offers a friendly and collaborative research environment, a research-dedicated 3T MRI scanner, a fully equipped psychological/psychophysiological testing facility, access to EEG, and collaboration with MEG and 7T MRI facilities. The position is funded by the Swiss National Science Foundation for 3 years and paid according to work experience, usually in grade 18. The lab, behavioural testing facilities, EEG, and 3T scanner are located in the Department of Psychiatry, University of Zurich, Switzerland.** The successfull applicant will have either (a) an undergraduate degree in physics/engineering/mathematics/computer science, and a PhD in cognitive neuroscience, or (b) an undergraduate degree in biology/psychology/neuroscience, and a PhD in neuroscience with a computational or technological focus. The candidate will be experienced in human experimentation, in particular fMRI or M/EEG. Fluent English is mandatory, German is not. We are looking for a highly motivated individal with interest in neurobiology who develops independent research ideas within the group's framework. Starting date is 2014. Applications are accepted until the position is filled. Applicants should send, in one merged PDF, a CV, publication list, letter of intent with a statement of research interest, and the name and contact of two references to: jobs at bachlab.org -- Dominik R Bach University of Zurich www.bachlab.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gregor.Volberg at psychologie.uni-regensburg.de Mon Jan 20 12:21:26 2014 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Mon, 20 Jan 2014 12:21:26 +0100 Subject: [FieldTrip] Antw: Creating a head model using OPENMEEG - Intersecting mesh error In-Reply-To: References: Message-ID: <52DD14C60200005700015398@gwsmtp1.uni-regensburg.de> Dear Roey, just two or three hints that might be helpful: I assume that the segmentation itself was successful; you can check this with ft_plot_vol for each of your tissues. Given that the segmentation is correct and the tissue borders are not intersecting, the error occurred during the mesh construction. I experienced that the number of triangles used for the mesh is often critical, with large numbers producing self-intersections. You could play around a bit with the number of triangles used for each compartement as specified in cfg.numvertices. Then, check the effect on the resulting volume. You do not need to call the ft_sourceanalysis for that; there is the funktion om_check_vol in the external/openmeeg folder that checks the integrity of the volumes and reports intersections or self-intersections. During the leadfield computation, OpenMEEG writes some files to the hard disk for later use. If the meshes are incorrect, then the leadfield fails and no file can be written to the disk. So the error warning on the file identifiers is presumably secondary to the mesh issue. Kind regards, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> Roey Schurr 19.01.2014 12:21 >>> Dear fieldtrippers, I am writing you after encountering an error using the OPENMEEG method for creating a head model, which I need for source reconstruction of EEG data (using 19 electrodes), e.g.: ... triangles 5018 and 5129 are intersecting triangles 5305 and 5781 are intersecting triangles 5879 and 5907 are intersecting !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!! WARNING !!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Mesh is self intersecting ! ... 2 meshes are intersecting ! It seems to be the same problem reported by Olivia about two years ago: http://mailman.science.ru.nl/pipermail/fieldtrip/2012-March/004881.html In what follows I will describe the main steps in my script: 1) I create a segmented 'brain','skull','scalp' mri structure of the subject: cfg.output = {'brain','skull','scalp'}; [bss_segmentedmri] = ft_volumesegment(cfg, mri); 2) I try using ft_sourceanalysis 3) which in turn tries to compute the leadfield using ft_compute_leadfield through ft_leadfield_openmeeg. yes this doesn't work, and I get the following error: Error using fprintf Invalid file identifier. Use fopen to generate a valid file identifier. Error in ft_leadfield_openmeeg (line 112) fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, sens.chanpos(ii,:)); Since it is crucial that I use a realistic head model, do you have any suggestions? Any advice would be greatly appreciated! Thank you, and have a nice week, roey -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Mon Jan 20 12:27:00 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Mon, 20 Jan 2014 12:27:00 +0100 Subject: [FieldTrip] Antw: Creating a head model using OPENMEEG - Intersecting mesh er Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Mon Jan 20 12:32:45 2014 From: roeysc at gmail.com (Roey Schurr) Date: Mon, 20 Jan 2014 13:32:45 +0200 Subject: [FieldTrip] Antw: Creating a head model using OPENMEEG - Intersecting mesh error In-Reply-To: <52DD14C60200005700015398@gwsmtp1.uni-regensburg.de> References: <52DD14C60200005700015398@gwsmtp1.uni-regensburg.de> Message-ID: Dear Gregor, Thank you so much for your helpful advice! I will try this soon and report back to you all. Best regards, roey On Mon, Jan 20, 2014 at 1:21 PM, Gregor Volberg < Gregor.Volberg at psychologie.uni-regensburg.de> wrote: > Dear Roey, > > just two or three hints that might be helpful: > > I assume that the segmentation itself was successful; you can check this > with ft_plot_vol for each of your tissues. Given that the segmentation is > correct and the tissue borders are not intersecting, the error occurred > during the mesh construction. I experienced that the number of triangles > used for the mesh is often critical, with large numbers producing > self-intersections. You could play around a bit with the number of > triangles used for each compartement as specified in cfg.numvertices. Then, > check the effect on the resulting volume. You do not need to call the > ft_sourceanalysis for that; there is the funktion om_check_vol in the > external/openmeeg folder that checks the integrity of the volumes and > reports intersections or self-intersections. > During the leadfield computation, OpenMEEG writes some files to the hard > disk for later use. If the meshes are incorrect, then the leadfield fails > and no file can be written to the disk. So the error warning on the file > identifiers is presumably secondary to the mesh issue. > > Kind regards, > Gregor > > > > > -- > Dr. rer. nat. Gregor Volberg > ( mailto:gregor.volberg at psychologie.uni-regensburg.de) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > >>> Roey Schurr 19.01.2014 12:21 >>> > Dear fieldtrippers, > > I am writing you after encountering an error using the OPENMEEG method for > creating a head model, which I need for source reconstruction of EEG data > (using 19 electrodes), e.g.: > ... > triangles 5018 and 5129 are intersecting > triangles 5305 and 5781 are intersecting > triangles 5879 and 5907 are intersecting > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > !!!!!!!!!!! WARNING !!!!!!!!!!! > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > Mesh is self intersecting ! > ... > 2 meshes are intersecting ! > > It seems to be the same problem reported by Olivia about two years ago: > http://mailman.science.ru.nl/pipermail/fieldtrip/2012-March/004881.html > > In what follows I will describe the main steps in my script: > > 1) I create a segmented 'brain','skull','scalp' mri structure of the > subject: > cfg.output = {'brain','skull','scalp'}; > [bss_segmentedmri] = ft_volumesegment(cfg, mri); > > 2) I try using ft_sourceanalysis > > 3) which in turn tries to compute the leadfield using ft_compute_leadfield > through ft_leadfield_openmeeg. > > yes this doesn't work, and I get the following error: > Error using fprintf > Invalid file identifier. Use fopen to generate a valid file identifier. > > Error in ft_leadfield_openmeeg (line 112) > fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, > sens.chanpos(ii,:)); > > > Since it is crucial that I use a realistic head model, do you have any > suggestions? > > Any advice would be greatly appreciated! > Thank you, and have a nice week, > > roey > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berryv.dberg at gmail.com Mon Jan 20 17:45:30 2014 From: berryv.dberg at gmail.com (berry van den berg) Date: Mon, 20 Jan 2014 11:45:30 -0500 Subject: [FieldTrip] ft_statistics_montecarlo runs slow under ubuntu 13.10 In-Reply-To: References: Message-ID: Ok, I dove a bit deeper into the problem, using the matlab profiler I was able to pinpoint the problem to ft_hastoolbox.m called by findcluster.m, and specifically the functions fileparts and exist.... Copy pasting those two functions to ft_statistics_montecarlo solves the issue for me for now. The problem seems to be that matlab accessing my filesystem runs slow under linux compared to windows.. I have no idea why and how to solve it but it is not related to fieldtrip. If anyone has suggestions what this might be I would be glad to hear them! Cheers, On 16 January 2014 17:11, berry van den berg wrote: > Dear Fieldtrip experts, > > This might be an odd question, but maybe someone has an idea where to > start. > > I just got a fancy new laptop (gigabyte p34g) and dual boot with ubuntu > and windows. I usually work in Ubuntu for analysis, so I ran a time freq > statistics analysis and noticed that ft_statistics_montecarlo runs > extremely slow under Ubuntu.... In windows it runs at normal speed. The > difference is huge, 97 seconds vs, 2 seconds for 100 iterations, 24 > subjects. > > Speed also doesnt seem influenced by averaging over freq or/and time, it > is just slow. > > It is not the cpu clock speed (ubuntu nicely utilizes turbo mode, running > max 3ghz), the cpu is not fully utilized though (only 30 percent or so)... > > I run matlab 2013b, fieldtrip 20140115 > > Specs are > 8gb ram; only 4gb utilized. > 4700HQ cpu > > Any ideas, because I am clueless > > Cheers, > > -- > Berry van den Berg > berryv.dberg at gmail.com > -- Berry van den Berg berryv.dberg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.wong.c at utoronto.ca Mon Jan 20 19:10:51 2014 From: dan.wong.c at utoronto.ca (Daniel Wong) Date: Mon, 20 Jan 2014 13:10:51 -0500 Subject: [FieldTrip] Antw: Creating a head model using OPENMEEG - Intersecting mesh error Message-ID: <20140120131051.9fkbl6n8ysg0og4s@webmail.utoronto.ca> You can try using the new iso2mesh meshing option that was recently added by myself, Sarang Dalal, and Robert Oostenveld: cfg.method = 'iso2mesh'; cfg.numvertices = 10000; % We'll decimate later - this gives nicer results bnd = ft_prepare_mesh(cfg,seg); % Decimate to a 1000, 2000, 3000 node mesh (scalp, skull, brain) [bnd(1).pnt, bnd(1).tri] = meshresample(bnd(1).pnt, bnd(1).tri, 1000/size(bnd(1).pnt,1)); [bnd(2).pnt, bnd(2).tri] = meshresample(bnd(2).pnt, bnd(2).tri, 2000/size(bnd(2).pnt,1)); [bnd(3).pnt, bnd(3).tri] = meshresample(bnd(3).pnt, bnd(3).tri, 3000/size(bnd(3).pnt,1)); The latest version of OpenMEEG automatically fixes mesh orientations, but if you have an older version of OpenMEEG, you'll need to set bnd(ii).tri = bnd(ii).tri(:,[3 2 1]) to fix the orientation error that you'll get - at least until we hard code that fix into FieldTrip. Also, assuming your meshes look like they should (use ft_plot_mesh to check), if you still have a problem with meshes intersecting each other, you will find a subfunction called decouplesurf that is temporarily stashed at the end of prepare_mesh_segmentation.m. Copy this function into a new m-file (decouplesurf.m) and use it to fix those intersections as follows: bnd = decouplesurf(bnd); Note, this will not fix self-intersections. If you're really having a bad day, try using the iso2mesh toolbox meshcheckrepair function: % Check and repair mesh [bnd(ii).pnt, bnd(ii).tri] = meshcheckrepair(bnd(ii).pnt, bnd(ii).tri, 'dup'); [bnd(ii).pnt, bnd(ii).tri] = meshcheckrepair(bnd(ii).pnt, bnd(ii).tri, 'isolated'); [bnd(ii).pnt, bnd(ii).tri] = meshcheckrepair(bnd(ii).pnt, bnd(ii).tri, 'deep'); [bnd(ii).pnt, bnd(ii).tri] = meshcheckrepair(bnd(ii).pnt, bnd(ii).tri, 'meshfix'); This info should eventually find its way onto the FieldTrip tutorial pages... Best Regards, Daniel Wong Daniel Wong, PhD (IBBME, University of Toronto) Postdoctoral Researcher Department of Psychology University of Konstanz From raminazodiaval at gmail.com Mon Jan 20 19:58:53 2014 From: raminazodiaval at gmail.com (Ramin Azodi) Date: Mon, 20 Jan 2014 19:58:53 +0100 Subject: [FieldTrip] Negative values of debiased wPLI Message-ID: Hello, I a bit confused about result which I got from debiased wPLI, because it has the negative value inside the 'wpli_debiasedspctrm'. As I searched for that I found this strange explanation, "...We therefore estimated the squared wPLI by using the debiased wPLI estimator (Vinck et al., 2011), ranging from zero *(negative values can incidentally occur because of limited sampling)* to one (maximum coherence)......." Beta coherence within human ventromedial prefrontal cortex precedes affective value choices, N. Lipsman et al, NeuroImage 85 (2014) 769–778. Could someone explain me, what it means and what should I do with these negative values? Best, Ramin -------------- next part -------------- An HTML attachment was scrubbed... URL: From gopalar.ccf at gmail.com Mon Jan 20 23:07:36 2014 From: gopalar.ccf at gmail.com (Raghavan Gopalakrishnan) Date: Mon, 20 Jan 2014 17:07:36 -0500 Subject: [FieldTrip] ft_timelockstatistics Message-ID: I have a grand averaged data structure that has two conditions. For example, two evoked responses 1 sec apart. I have not saved them as separate data structures. Is there a way to run statistics to compare one evoked response over another within the same data structure with different latencies? or is it necessary to create two grand averaged data structures one for each evoked response. Thanks, Raghavan -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhegde at gru.edu Tue Jan 21 02:30:40 2014 From: jhegde at gru.edu (=?ISO-8859-1?Q?Jay_Hegd=E9?=) Date: Mon, 20 Jan 2014 20:30:40 -0500 Subject: [FieldTrip] Sample script for spike+LFP analysis? Message-ID: <52DDCDC0.3010505@gru.edu> Hi Everyone, I'd like to use FieldTrip for the joint analysis of spike and local field potential (LFP) data. I'm proficient in Matlab, but very new to FieldTrip. I'm trying to write a script by precisely following the relevant tutorial (http://fieldtrip.fcdonders.nl/tutorial/spikefield). Everything goes OK for the first couple of steps, but I'm getting stuck when it comes to constructing "a cfg.trl matrix to preprocess the LFP data" described in the tutorial. So can anyone share an example script that actually runs and does this analysis, so I can see what the tutorial is talking about? Thank you very much in advance, Jay Hegdé Medical College of Georgia Georgia Regents University Augusta, GA, USA From aestnth at hum.au.dk Tue Jan 21 02:43:03 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Tue, 21 Jan 2014 02:43:03 +0100 Subject: [FieldTrip] Sample script for spike+LFP analysis? Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Jan 21 09:30:14 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 21 Jan 2014 09:30:14 +0100 Subject: [FieldTrip] Sample script for spike+LFP analysis? In-Reply-To: <52DDCDC0.3010505@gru.edu> References: <52DDCDC0.3010505@gru.edu> Message-ID: Hi Jay, A "trl" matrix is an Nx3 matrix that gives, for each of N trials, the begin and end sample, and the 'offset' (shift in time axis to determine t=0; offset=0 means begin sample will be t=0). In typical cognitive experiments, such a matrix is generated by a call to ft_definetrial, which in turn calls either a user-specified "trialfun" to find events of interest in the data (recorded in a trigger channel), or ft_trialfun_general. ft_trialfun_general is a simple trialfun that looks for specified event values in a specified trigger channel, and creates trials spanning from X seconds before the event to Y seconds after the event. For using ft_definetrial, see this tutorial: http://fieldtrip.fcdonders.nl/tutorial/preprocessing If for any reason (e.g. you don't have triggers) you don't want to use ft_definetrial, you can simply create a trl matrix yourself by specifying the sample indices and offset. Best, Eelke On 21 January 2014 02:30, Jay Hegdé wrote: > Hi Everyone, > > I'd like to use FieldTrip for the joint analysis of spike and local field > potential (LFP) data. I'm proficient in Matlab, but very new to FieldTrip. > > I'm trying to write a script by precisely following the relevant tutorial > (http://fieldtrip.fcdonders.nl/tutorial/spikefield). Everything goes OK for > the first couple of steps, but I'm getting stuck when it comes to > constructing "a cfg.trl matrix to preprocess the LFP data" described in the > tutorial. > > So can anyone share an example script that actually runs and does this > analysis, so I can see what the tutorial is talking about? > > Thank you very much in advance, > Jay Hegdé > Medical College of Georgia > Georgia Regents University > Augusta, GA, USA > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Tue Jan 21 09:36:04 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 21 Jan 2014 09:36:04 +0100 Subject: [FieldTrip] ft_timelockstatistics In-Reply-To: References: Message-ID: Dear Raghavan, The statistics routines (specifically, the cluster statistics) need each individual observation, and not just the grand average. If your grand average data structure was generated with cfg.keepindividual = 'yes', then this should be fine. If you did not specify this, then it will only contain the average (and possibly the variance), and you would need to either rerun ft_timelockgrandaverage, or input the individual data structures into ft_timelockstatistics directly. The latter is nowadays the recommended approach; you use it e.g. like so: ft_timelockstatistics(cfg, condA{:}, condB{:}); where condA and condB are cell arrays with the timelocked structures for each subject. Even if you do have a grandaverage with cfg.keepindividual = 'yes', the statistics routine still needs one input argument per condition. So if you want to compare two time intervals in the same structure, you need to separate them first e.g. like so: cfg = []; cfg.latency = [0 1]; condA = ft_selectdata(cfg, bigstructure); cfg = []; cfg.latency = [1 2]; condB = ft_selectdata(cfg, bigstructure); Best, Eelke On 20 January 2014 23:07, Raghavan Gopalakrishnan wrote: > I have a grand averaged data structure that has two conditions. For example, > two evoked responses 1 sec apart. I have not saved them as separate data > structures. Is there a way to run statistics to compare one evoked response > over another within the same data structure with different latencies? or is > it necessary to create two grand averaged data structures one for each > evoked response. > > Thanks, > Raghavan > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jhegde at gru.edu Tue Jan 21 10:20:18 2014 From: jhegde at gru.edu (=?ISO-8859-1?Q?Jay_Hegd=E9?=) Date: Tue, 21 Jan 2014 04:20:18 -0500 Subject: [FieldTrip] Sample script for spike+LFP analysis? In-Reply-To: References: <52DDCDC0.3010505@gru.edu> Message-ID: <52DE3BD2.1050706@gru.edu> Hi Eelke, Thank you very much. But I'm afraid this doesn't solve my problem. My problem is not that I don't understand the nature of the trl matrix (which is easy enough to surmise by looking at ft_definetrial.m). Rather, it is understanding how the whole script is supposed to work -- which is why I was looking for a working script. (I haven't been able to find one in http://fieldtrip.fcdonders.nl/example.) So in this case, one script would be worth a thousand words for me. Which is why I'd like to respectfully ask again: does anyone have a working script (plus a datafile, if the script does something other than spike-LFP analysis) that they can share? Best, Jay On 1/21/2014 3:30 AM, Eelke Spaak wrote: > Hi Jay, > > A "trl" matrix is an Nx3 matrix that gives, for each of N trials, the > begin and end sample, and the 'offset' (shift in time axis to > determine t=0; offset=0 means begin sample will be t=0). > > In typical cognitive experiments, such a matrix is generated by a call > to ft_definetrial, which in turn calls either a user-specified > "trialfun" to find events of interest in the data (recorded in a > trigger channel), or ft_trialfun_general. ft_trialfun_general is a > simple trialfun that looks for specified event values in a specified > trigger channel, and creates trials spanning from X seconds before the > event to Y seconds after the event. For using ft_definetrial, see this > tutorial: http://fieldtrip.fcdonders.nl/tutorial/preprocessing > > If for any reason (e.g. you don't have triggers) you don't want to use > ft_definetrial, you can simply create a trl matrix yourself by > specifying the sample indices and offset. > > Best, > Eelke > > On 21 January 2014 02:30, Jay Hegdé wrote: >> Hi Everyone, >> >> I'd like to use FieldTrip for the joint analysis of spike and local field >> potential (LFP) data. I'm proficient in Matlab, but very new to FieldTrip. >> >> I'm trying to write a script by precisely following the relevant tutorial >> (http://fieldtrip.fcdonders.nl/tutorial/spikefield). Everything goes OK for >> the first couple of steps, but I'm getting stuck when it comes to >> constructing "a cfg.trl matrix to preprocess the LFP data" described in the >> tutorial. >> >> So can anyone share an example script that actually runs and does this >> analysis, so I can see what the tutorial is talking about? >> >> Thank you very much in advance, >> Jay Hegdé >> Medical College of Georgia >> Georgia Regents University >> Augusta, GA, USA >> >> _______________________________________________ >> 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 stan.vanpelt at fcdonders.ru.nl Tue Jan 21 10:23:00 2014 From: stan.vanpelt at fcdonders.ru.nl (Stan van Pelt) Date: Tue, 21 Jan 2014 10:23:00 +0100 (CET) Subject: [FieldTrip] Sample script for spike+LFP analysis? In-Reply-To: References: <52DDCDC0.3010505@gru.edu> Message-ID: <041701cf168a$60ee94a0$22cbbde0$@vanpelt@fcdonders.ru.nl> Hi Jay, In addition to Eelke's reply, you may also find the examples in these pages useful in creating your trial definition (cfg.trl): http://fieldtrip.fcdonders.nl/walkthrough http://fieldtrip.fcdonders.nl/example/detect_the_muscle_activity_in_an_emg _channel_and_use_that_as_trial_definition Best, Stan Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Centre for Cognition Montessorilaan 3, B.01.34 6525 HR Nijmegen, the Netherlands tel: +31 24 3616288 -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak Sent: dinsdag 21 januari 2014 9:30 To: FieldTrip discussion list Subject: Re: [FieldTrip] Sample script for spike+LFP analysis? Hi Jay, A "trl" matrix is an Nx3 matrix that gives, for each of N trials, the begin and end sample, and the 'offset' (shift in time axis to determine t=0; offset=0 means begin sample will be t=0). In typical cognitive experiments, such a matrix is generated by a call to ft_definetrial, which in turn calls either a user-specified "trialfun" to find events of interest in the data (recorded in a trigger channel), or ft_trialfun_general. ft_trialfun_general is a simple trialfun that looks for specified event values in a specified trigger channel, and creates trials spanning from X seconds before the event to Y seconds after the event. For using ft_definetrial, see this tutorial: http://fieldtrip.fcdonders.nl/tutorial/preprocessing If for any reason (e.g. you don't have triggers) you don't want to use ft_definetrial, you can simply create a trl matrix yourself by specifying the sample indices and offset. Best, Eelke On 21 January 2014 02:30, Jay Hegdé wrote: > Hi Everyone, > > I'd like to use FieldTrip for the joint analysis of spike and local > field potential (LFP) data. I'm proficient in Matlab, but very new to FieldTrip. > > I'm trying to write a script by precisely following the relevant > tutorial (http://fieldtrip.fcdonders.nl/tutorial/spikefield). > Everything goes OK for the first couple of steps, but I'm getting > stuck when it comes to constructing "a cfg.trl matrix to preprocess > the LFP data" described in the tutorial. > > So can anyone share an example script that actually runs and does this > analysis, so I can see what the tutorial is talking about? > > Thank you very much in advance, > Jay Hegdé > Medical College of Georgia > Georgia Regents University > Augusta, GA, USA > > _______________________________________________ > 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 Tue Jan 21 10:27:43 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 21 Jan 2014 10:27:43 +0100 Subject: [FieldTrip] Sample script for spike+LFP analysis? In-Reply-To: <52DE3BD2.1050706@gru.edu> References: <52DDCDC0.3010505@gru.edu> <52DE3BD2.1050706@gru.edu> Message-ID: <490AEEC5-90E6-4568-98AE-7AB40064B592@donders.ru.nl> Hi Jay, I think the best you could get in terms of script would be the one from the tutorial. If it does not work for you, could you specify what causes you to get stuck exactly? Best, Jan-Mathijs On Jan 21, 2014, at 10:20 AM, Jay Hegdé wrote: > Hi Eelke, > > Thank you very much. But I'm afraid this doesn't solve my problem. My problem is not that I don't understand the nature of the trl matrix (which is easy enough to surmise by looking at ft_definetrial.m). Rather, it is understanding how the whole script is supposed to work -- which is why I was looking for a working script. (I haven't been able to find one in http://fieldtrip.fcdonders.nl/example.) So in this case, one script would be worth a thousand words for me. > > Which is why I'd like to respectfully ask again: does anyone have a working script (plus a datafile, if the script does something other than spike-LFP analysis) that they can share? > > Best, > Jay > > On 1/21/2014 3:30 AM, Eelke Spaak wrote: >> Hi Jay, >> >> A "trl" matrix is an Nx3 matrix that gives, for each of N trials, the >> begin and end sample, and the 'offset' (shift in time axis to >> determine t=0; offset=0 means begin sample will be t=0). >> >> In typical cognitive experiments, such a matrix is generated by a call >> to ft_definetrial, which in turn calls either a user-specified >> "trialfun" to find events of interest in the data (recorded in a >> trigger channel), or ft_trialfun_general. ft_trialfun_general is a >> simple trialfun that looks for specified event values in a specified >> trigger channel, and creates trials spanning from X seconds before the >> event to Y seconds after the event. For using ft_definetrial, see this >> tutorial: http://fieldtrip.fcdonders.nl/tutorial/preprocessing >> >> If for any reason (e.g. you don't have triggers) you don't want to use >> ft_definetrial, you can simply create a trl matrix yourself by >> specifying the sample indices and offset. >> >> Best, >> Eelke >> >> On 21 January 2014 02:30, Jay Hegdé wrote: >>> Hi Everyone, >>> >>> I'd like to use FieldTrip for the joint analysis of spike and local field >>> potential (LFP) data. I'm proficient in Matlab, but very new to FieldTrip. >>> >>> I'm trying to write a script by precisely following the relevant tutorial >>> (http://fieldtrip.fcdonders.nl/tutorial/spikefield). Everything goes OK for >>> the first couple of steps, but I'm getting stuck when it comes to >>> constructing "a cfg.trl matrix to preprocess the LFP data" described in the >>> tutorial. >>> >>> So can anyone share an example script that actually runs and does this >>> analysis, so I can see what the tutorial is talking about? >>> >>> Thank you very much in advance, >>> Jay Hegdé >>> Medical College of Georgia >>> Georgia Regents University >>> Augusta, GA, USA >>> >>> _______________________________________________ >>> 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From berryv.dberg at gmail.com Tue Jan 21 15:51:51 2014 From: berryv.dberg at gmail.com (berry van den berg) Date: Tue, 21 Jan 2014 09:51:51 -0500 Subject: [FieldTrip] ft_statistics_montecarlo runs slow under ubuntu 13.10 In-Reply-To: References: Message-ID: I pinpointed the problem to being the access time of the second HDD mounted as a ntfs filesystem. Not having this HDD in my searchpath solves my problem. Berry ---------- Forwarded message ---------- From: Gio Piantoni Date: 20 January 2014 14:01 Subject: Re: [FieldTrip] ft_statistics_montecarlo runs slow under ubuntu 13.10 To: berry van den berg sorry, I don't know much more than this, but it makes sense that Linux needs some extra time to access a non-native filesystem. If I were you, I'd just comment out the part in ft_statistics_montecarlo that checks for the toolbox, once you know that the toolbox is installed, you don't need to check it every time. Good luck! On Mon, Jan 20, 2014 at 12:56 PM, berry van den berg wrote: > Yeah, you are right, having a folder on that harddisk added to the search > path slowed those functions (which, exist) by A LOT! I copied fieldtrip to > the main SSD and removed everything from the path in matlab on the ntfs > drive, which is mounted through ntfs-3g. Even though I dont actually use > those functions, it slows up the process by a lot: 1 second versus 6 seconds > when fieldtrip is on the ssd with ext4.... > > I wonder if it is due to the drive being ntfs, or something else... Any > ideas? > > > On 20 January 2014 12:00, Gio Piantoni wrote: >> >> Hi Berry, >> >> interesting debugging. Not sure exactly what's going on, but I noticed >> that Linux might become slower if you have samba/cifs disks mounted. >> Is that the case for you maybe? >> >> HTH, >> -g >> >> On Mon, Jan 20, 2014 at 11:45 AM, berry van den berg >> wrote: >> > Ok, I dove a bit deeper into the problem, using the matlab profiler I >> > was >> > able to pinpoint the problem to ft_hastoolbox.m called by findcluster.m, >> > and >> > specifically the functions fileparts and exist.... Copy pasting those >> > two >> > functions to ft_statistics_montecarlo solves the issue for me for now. >> > >> > The problem seems to be that matlab accessing my filesystem runs slow >> > under >> > linux compared to windows.. I have no idea why and how to solve it but >> > it is >> > not related to fieldtrip. If anyone has suggestions what this might be I >> > would be glad to hear them! >> > >> > Cheers, >> > >> > >> > >> > >> > On 16 January 2014 17:11, berry van den berg >> > wrote: >> >> >> >> Dear Fieldtrip experts, >> >> >> >> This might be an odd question, but maybe someone has an idea where to >> >> start. >> >> >> >> I just got a fancy new laptop (gigabyte p34g) and dual boot with ubuntu >> >> and windows. I usually work in Ubuntu for analysis, so I ran a time >> >> freq >> >> statistics analysis and noticed that ft_statistics_montecarlo runs >> >> extremely >> >> slow under Ubuntu.... In windows it runs at normal speed. The >> >> difference is >> >> huge, 97 seconds vs, 2 seconds for 100 iterations, 24 subjects. >> >> >> >> Speed also doesnt seem influenced by averaging over freq or/and time, >> >> it >> >> is just slow. >> >> >> >> It is not the cpu clock speed (ubuntu nicely utilizes turbo mode, >> >> running >> >> max 3ghz), the cpu is not fully utilized though (only 30 percent or >> >> so)... >> >> >> >> I run matlab 2013b, fieldtrip 20140115 >> >> >> >> Specs are >> >> 8gb ram; only 4gb utilized. >> >> 4700HQ cpu >> >> >> >> Any ideas, because I am clueless >> >> >> >> Cheers, >> >> >> >> -- >> >> Berry van den Berg >> >> berryv.dberg at gmail.com >> > >> > >> > >> > >> > -- >> > Berry van den Berg >> > berryv.dberg at gmail.com >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Berry van den Berg > berryv.dberg at gmail.com -- Berry van den Berg berryv.dberg at gmail.com On 20 January 2014 11:45, berry van den berg wrote: > Ok, I dove a bit deeper into the problem, using the matlab profiler I was > able to pinpoint the problem to ft_hastoolbox.m called by findcluster.m, > and specifically the functions fileparts and exist.... Copy pasting those > two functions to ft_statistics_montecarlo solves the issue for me for now. > > The problem seems to be that matlab accessing my filesystem runs slow > under linux compared to windows.. I have no idea why and how to solve it > but it is not related to fieldtrip. If anyone has suggestions what this > might be I would be glad to hear them! > > Cheers, > > > > > On 16 January 2014 17:11, berry van den berg wrote: > >> Dear Fieldtrip experts, >> >> This might be an odd question, but maybe someone has an idea where to >> start. >> >> I just got a fancy new laptop (gigabyte p34g) and dual boot with ubuntu >> and windows. I usually work in Ubuntu for analysis, so I ran a time freq >> statistics analysis and noticed that ft_statistics_montecarlo runs >> extremely slow under Ubuntu.... In windows it runs at normal speed. The >> difference is huge, 97 seconds vs, 2 seconds for 100 iterations, 24 >> subjects. >> >> Speed also doesnt seem influenced by averaging over freq or/and time, it >> is just slow. >> >> It is not the cpu clock speed (ubuntu nicely utilizes turbo mode, running >> max 3ghz), the cpu is not fully utilized though (only 30 percent or so)... >> >> I run matlab 2013b, fieldtrip 20140115 >> >> Specs are >> 8gb ram; only 4gb utilized. >> 4700HQ cpu >> >> Any ideas, because I am clueless >> >> Cheers, >> >> -- >> Berry van den Berg >> berryv.dberg at gmail.com >> > > > > -- > Berry van den Berg > berryv.dberg at gmail.com > -- Berry van den Berg berryv.dberg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.rombetto at cib.na.cnr.it Tue Jan 21 18:15:22 2014 From: s.rombetto at cib.na.cnr.it (s.rombetto at cib.na.cnr.it) Date: Tue, 21 Jan 2014 18:15:22 +0100 Subject: [FieldTrip] fit volume segment and sensors Message-ID: <20140121181522.e24pixvc8okg0o8c@arco.cib.na.cnr.it> Dear Jörn, dear Fieldtrippers, I have downloaded the 20140114 version of Fieldtrip and tried again to use the command ft_volumerealign in the following way (as suggested in the tutorials) mri = ft_read_mri('*....\Subject01.mri'); cfg=[]; cfg.method = 'interactive'; mri_realigned = ft_volumerealign(cfg, mri); Then I identify it by pressing either n/l/r for fiducials and finally I press q in order to quit. But no results appear on my screen. I have tried to use also the following command [mri] = ft_convert_coordsys(mri, 'itab'); but I get the error message [mri] = ft_convert_coordsys(mri, 'itab'); ??? Error using ==> ft_convert_coordsys at 102 conversion from ctf to itab is not yet supported There is also a command ft_transform_geometry. But this asks for a transformation matrix that is created by using ft_volumerealign. So I cannot use it at the moment. Any idea or suggestion to solve this problem? Maybe there is something I am missing? > Dear Sara, > > the procedure described on the FT-page is tailored towards data > gathered from CTF data just because we happen to have a CTF-system > here. Since you have itab-data, the coordinate system of your sensors > (gradiometers) is not in ctf-space. Some more information on the > different coordinate systems can be found here: > http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined?s[]=coordinate&s[]=system#details_of_the_chieti_itab_coordinate_system > > Your first step needs to be to coregister the gradiometer information > with the MRI. Afaik, ft_volumerealign will then also take care of the > coordinate system then (or, more precisely, return the appropriate > transformation). See also here > http://fieldtrip.fcdonders.nl/faq/how_to_coregister_an_anatomical_mri_with_the_gradiometer_or_electrode_positions?s[]=coordinate&s[]=system > > If I remember correctly, this will not change the coordinate system of > the gradiometers, but adjust the transformation matrix of the MRI > instead. You do not need to be in CTF-space, you just need to make sure > that all your data are in the same coordinate-system. Once you got > that, it should work. For example, for EEG source reconstruction you > can stay in MNI-space all the time. Dealing with these transformation > between coordinate systems is some nasty job, so take care you do it > correctly and e.g. not get confused by neurological and radiological > convention > And note that there is also ft_convert_coordsys for transformation, but > I am not sure whether that works for gradiometers, yet. I think this > all just works for volumes. I hope this works for you. > > Best, > Jörn > > s.rombetto at cib.na.cnr.it wrote: >> Dear Fieldtrippers >> >> I 'm trying to perform source analysis on MEG data. >> I use an AtB system (usually it is described as 'itab' in fieldtrip) >> >> First I have preprocessed my data and I have calculated the cross >> spectral density matrix >> >> Then I have constructed the forward model >> >> mri = ft_read_mri('Subject01.mri'); >> cfg = []; >> cfg.write = 'no'; >> cfg.coordsys = 'ctf'; >> [segmentedmri] = ft_volumesegment(cfg, mri); >> >> and segmented the brain surface: >> >> cfg = []; >> cfg.method = 'singleshell'; >> vol = ft_prepare_headmodel(cfg, segmentedmri); >> >> With the command ft_read_sens I have also read the sensors positions. >> >> Before going on I have checked the results plotting the volume and >> the sensors using the commands >> vol = ft_convert_units(vol,'cm'); >> sens = ft_read_sens(rawdataname); >> figure >> ft_plot_sens(sens, 'style', '*b'); >> hold on >> ft_plot_vol(vol); >> >> and I have noticed that the result is wrong because the volume >> soesn't fit the sensors as shown in the attachment >> Moreover, following some topics in the mailing list I have used >> >> ft_determine_coordsys(mri) >> ft_determine_coordsys(vol) >> ft_determine_coordsys(sens) >> >> and I have found that the coordinate systems are diffeerent. >> >> As far as I understand I should use the ctf coordinate system to >> perform the source analysis. But even if I try to specify this >> coordinate system it did not work. >> Any suggestion to solve this problem? >> >> Kind regards >> ------------------------- >> Dott.ssa Sara Rombetto >> Istituto di Cibernetica >> "E. Caianiello" >> Via Campi Flegrei, 34 >> 80078 Pozzuoli (NA) >> Italy >> mob +39 3401689815 >> tel +39 0818675361 >> fax +39 0818675128 >> -------------------------- >> "I disapprove of what you say, but I will defend to the death your >> right to say >> it." [Evelyn Beatrice Hall, The Friends Of Voltaire] >> >> ---------------------------------------------------------------- >> This message was sent using IMP, the Internet Messaging Program. >> >> >> >> _______________________________________________ >> 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 ------------------------- Dott.ssa Sara Rombetto Istituto di Cibernetica "E. Caianiello" Via Campi Flegrei, 34 80078 Pozzuoli (NA) Italy mob +39 3401689815 tel +39 0818675361 fax +39 0818675128 -------------------------- "I disapprove of what you say, but I will defend to the death your right to say it." [Evelyn Beatrice Hall, The Friends Of Voltaire] ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From ozancag at gmail.com Wed Jan 22 14:07:02 2014 From: ozancag at gmail.com (=?UTF-8?B?T3phbiDDh2HEn2xheWFu?=) Date: Wed, 22 Jan 2014 15:07:02 +0200 Subject: [FieldTrip] ft_rejectvisual problem Message-ID: Hi, When I call ft_rejectvisual, I receive the following matlab error: >> [data] = ft_rejectvisual(cfg, data) the input is raw data with 14 channels and 1 trials showing a summary of the data for all channels and trials computing metric [--------------------------------------------------------|] Error using set Bad property value found. Object Name: axes Property Name: 'XLim' Values must be increasing and non-NaN. Error in axis>LocSetLimits (line 201) set(ax,... Error in axis (line 93) LocSetLimits(ax(j),cur_arg); Error in rejectvisual_summary>redraw (line 252) abc = axis; axis([1 info.ntrl abc(3:4)]); Error in rejectvisual_summary (line 126) redraw(h); Error in ft_rejectvisual (line 274) [chansel, trlsel, cfg] = rejectvisual_summary(cfg, tmpdata); -------- my cfg is empty. Data is a one trial x 14 channel EEG data. The visual rejection GUI appears but when I change the metric the figures in the GUI are not redrawn. Is this expected? Is the above error important? This is Matlab 2013a on Linux with the latest FieldTrip from GIT. Thanks. -- Ozan Çağlayan Research Assistant Galatasaray University - Computer Engineering Dept. http://www.ozancaglayan.com From aestnth at hum.au.dk Wed Jan 22 14:12:45 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Wed, 22 Jan 2014 14:12:45 +0100 Subject: [FieldTrip] ft_rejectvisual problem Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.brovelli at univ-amu.fr Wed Jan 22 14:39:08 2014 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Wed, 22 Jan 2014 14:39:08 +0100 (CET) Subject: [FieldTrip] Spherical coordinates of Brodmann areas (latitude, longitude) Message-ID: <954828467.14846.1390397948383.JavaMail.root@bureau-frontal2.univ-amu.fr> Dear all, does anyone have the listing of the spherical coordinates of Brodmann areas in latitude and longitude ? A single coordinate for Brodmann area would be enough (e.g., the centre of mass), given I need it for visualisation. The coordinate space would be similar to the one developed in this paper: http://www.ncbi.nlm.nih.gov/pubmed/9931269 Thanks a lot bye Andrea From hweeling.lee at gmail.com Wed Jan 22 15:41:45 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 22 Jan 2014 15:41:45 +0100 Subject: [FieldTrip] BrainProducts Easycap layout Message-ID: Dear all, I would like to know if anyone has the layout for 128 EEG channels for BrainProduct easycap. I have the information of the theta/phi coordinates for each of the channels, but I'm not sure how to use these values to create the layout in fieldtrip. It'll be great if someone can help me on this! Thanks. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jan 22 15:55:21 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 22 Jan 2014 15:55:21 +0100 Subject: [FieldTrip] BrainProducts Easycap layout In-Reply-To: References: Message-ID: <52DFDBD9.9000803@donders.ru.nl> Hi Hweeling, have you checked FieldTrip/template/layout? There are a bunch of easycap layout already available. Otherwise, you can easily transform your coordinates to the x/y/z plane, you just need to estimate the size of the head. This is what is happening inside ft_read_sens: % it contains theta and phi sens.label = cellfun(@str2double, tmp{1}(2:end)); theta = cellfun(@str2double, tmp{2}(2:end)); phi = cellfun(@str2double, tmp{3}(2:end)); radians = @(x) pi*x/180; warning('assuming a head radius of 85 mm'); x = 85*cos(radians(phi)).*sin(radians(theta)); y = 85*sin(radians(theta)).*sin(radians(phi)); z = 85*cos(radians(theta)); sens.unit = 'cm'; sens.elecpos = [x y z]; sens.chanpos = [x y z]; Then you can project to a 2D plane, there are a number of methods available in Matlab for that. Best, Jörn On 1/22/2014 3:41 PM, Hwee Ling Lee wrote: > Dear all, > > I would like to know if anyone has the layout for 128 EEG channels for > BrainProduct easycap. > > I have the information of the theta/phi coordinates for each of the > channels, but I'm not sure how to use these values to create the > layout in fieldtrip. > > It'll be great if someone can help me on this! > > Thanks. > > Best regards, > Hweeling > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From julian.keil at gmail.com Wed Jan 22 15:56:35 2014 From: julian.keil at gmail.com (Julian Keil) Date: Wed, 22 Jan 2014 15:56:35 +0100 Subject: [FieldTrip] BrainProducts Easycap layout In-Reply-To: References: Message-ID: Dear Hweeling, you can transform the polar coordinates to carthesian coordinates using the elp2coor.m function I attached. The way it works for me is like this: %% Import ELP cap=importdata('128_channel_easycap.elp'); % Import the Vendor-Provided 3d Positions %%Make an electrode file elec.pnt=elp2coor(cap.data',100)'; % Transform elec.label=cap.textdata; % Make Labels cfg=[]; cfg.elec=elec; lay= ft_prepare_layout(cfg); % Make Layout Good luck! Julian On Wed, Jan 22, 2014 at 3:41 PM, Hwee Ling Lee wrote: > Dear all, > > I would like to know if anyone has the layout for 128 EEG channels for > BrainProduct easycap. > > I have the information of the theta/phi coordinates for each of the > channels, but I'm not sure how to use these values to create the layout in > fieldtrip. > > It'll be great if someone can help me on this! > > Thanks. > > Best regards, > Hweeling > > > _______________________________________________ > 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: elp2coor.m Type: text/x-objcsrc Size: 651 bytes Desc: not available URL: From j.herring at fcdonders.ru.nl Wed Jan 22 16:00:43 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 22 Jan 2014 16:00:43 +0100 (CET) Subject: [FieldTrip] BrainProducts Easycap layout In-Reply-To: References: Message-ID: <011a01cf1782$b92794c0$2b76be40$@herring@fcdonders.ru.nl> Hi Hweeling, If you create a text-file that has three columns: Label, Theta, and Phi coordinate, you can use elec = ft_read_sens(filename) to read the layout into a fieldtrip useable elec structure. The first line of the text file has to be: Site Theta Phi You can also have a look at easycap-M1.txt and easycap-M10.txt in the fieldtrip/template/electrode folder for an example of how the text-file should look like. The theta and phi coordinates will be converted to 3d coordinates assuming a head-radius of 85mm (by default, you can specify this) Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Hwee Ling Lee Sent: woensdag 22 januari 2014 15:42 To: FieldTrip discussion list Subject: [FieldTrip] BrainProducts Easycap layout Dear all, I would like to know if anyone has the layout for 128 EEG channels for BrainProduct easycap. I have the information of the theta/phi coordinates for each of the channels, but I'm not sure how to use these values to create the layout in fieldtrip. It'll be great if someone can help me on this! Thanks. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Wed Jan 22 16:18:08 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 22 Jan 2014 16:18:08 +0100 Subject: [FieldTrip] BrainProducts Easycap layout In-Reply-To: <52dfdd1c.c8380f0a.13a9.30a9SMTPIN_ADDED_BROKEN@mx.google.com> References: <52dfdd1c.c8380f0a.13a9.30a9SMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: Dear all, Thanks for the suggestions. For Jörn, I checked the Fieldtrip/template/layout, but none of them fits my data. I tried the suggestion from Herring, however, I keep getting an error message: Error using ft_convert_units (line 121) cannot determine geometrical units Error in ft_datatype_sens (line 189) sens = ft_convert_units(sens); Error in ft_read_sens (line 331) sens = ft_datatype_sens(sens); I had my data in a text format previously, and it didn't work either. So I'm not sure what to do! I've attached my file in this email, the values are gotten from the pdf info from Easycap regarding the theta/phi coordinates for each site. Thanks! Cheers, Hweeling On 22 January 2014 16:00, Herring, J.D. (Jim) wrote: > Hi Hweeling, > > > > If you create a text-file that has three columns: Label, Theta, and Phi > coordinate, you can use elec = ft_read_sens(filename) to read the layout > into a fieldtrip useable elec structure. > > > The first line of the text file has to be: > > > > Site Theta Phi > > > > You can also have a look at easycap-M1.txt and easycap-M10.txt in the > fieldtrip/template/electrode folder for an example of how the text-file > should look like. > > > > The theta and phi coordinates will be converted to 3d coordinates assuming > a head-radius of 85mm (by default, you can specify this) > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Hwee Ling Lee > *Sent:* woensdag 22 januari 2014 15:42 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] BrainProducts Easycap layout > > > > Dear all, > > > > I would like to know if anyone has the layout for 128 EEG channels for > BrainProduct easycap. > > > > I have the information of the theta/phi coordinates for each of the > channels, but I'm not sure how to use these values to create the layout in > fieldtrip. > > > > It'll be great if someone can help me on this! > > > > Thanks. > > > > Best regards, > > Hweeling > > > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 128Channel.sfp Type: application/octet-stream Size: 1642 bytes Desc: not available URL: From s.rombetto at cib.na.cnr.it Wed Jan 22 16:18:46 2014 From: s.rombetto at cib.na.cnr.it (s.rombetto at cib.na.cnr.it) Date: Wed, 22 Jan 2014 16:18:46 +0100 Subject: [FieldTrip] problem with ft_volumerealign and ft_convert_coordsys Message-ID: <20140122161846.id5xoorlkw444ssc@arco.cib.na.cnr.it> Dear Fieldtrippers, I have downloaded the 20140114 version of Fieldtrip and tried again to use the command ft_volumerealign in the following way (as suggested in the tutorials) mri = ft_read_mri('*....\Subject01.mri'); cfg=[]; cfg.method = 'interactive'; mri_realigned = ft_volumerealign(cfg, mri); Then I identify it by pressing either n/l/r for fiducials and finally I press q in order to quit. But no results appear on my screen. Any suggestion to solve this? I have tried to use also the following command [mri] = ft_convert_coordsys(mri, 'itab'); but I get the error message [mri] = ft_convert_coordsys(mri, 'itab'); ??? Error using ==> ft_convert_coordsys at 102 conversion from ctf to itab is not yet supported In order to better understand the problem, I have tried to perform a different transformation with the code [mri] = ft_convert_coordsys(mri, 'spm', 2) and I get the following message Converting the coordinate system from ctf to spm ??? Undefined function or method 'spm' for input arguments of type 'char'. Error in ==> align_ctf2spm at 121 switch spm('ver') Error in ==> ft_convert_coordsys at 90 obj = align_ctf2spm(obj, opt); Finally I tried to use the function align_itab2spm in the following way mri = align_itab2spm(mri, 2) but I get the error message ??? Undefined function or method 'spm' for input arguments of type 'char'. Error in ==> align_itab2spm at 108 switch spm('ver') Do you have any idea or suggestion to solve this problem? Thanks in advance for any advice, Sara ------------------------- Dott.ssa Sara Rombetto Istituto di Cibernetica "E. Caianiello" Via Campi Flegrei, 34 80078 Pozzuoli (NA) Italy mob +39 3401689815 tel +39 0818675361 fax +39 0818675128 -------------------------- "I disapprove of what you say, but I will defend to the death your right to say it." [Evelyn Beatrice Hall, The Friends Of Voltaire] ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From jan.schoffelen at donders.ru.nl Wed Jan 22 16:30:12 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 22 Jan 2014 16:30:12 +0100 Subject: [FieldTrip] problem with ft_volumerealign and ft_convert_coordsys In-Reply-To: <20140122161846.id5xoorlkw444ssc@arco.cib.na.cnr.it> References: <20140122161846.id5xoorlkw444ssc@arco.cib.na.cnr.it> Message-ID: <9250261B-57E7-457E-BD21-539221F13E6D@donders.ru.nl> Hi Sara, > I have downloaded the 20140114 version of Fieldtrip and tried again to > use the command ft_volumerealign in the following way (as suggested in > the tutorials) > > mri = ft_read_mri('*....\Subject01.mri'); > cfg=[]; > cfg.method = 'interactive'; > mri_realigned = ft_volumerealign(cfg, mri); > > Then I identify it by pressing either n/l/r for fiducials and finally > I press q in order to quit. But no results appear on my screen. > Any suggestion to solve this? I don't understand what you mean by 'no results appear on my screen'. Does this mean that mri_realigned is not created? > I have tried to use also the following command > [mri] = ft_convert_coordsys(mri, 'itab'); > > but I get the error message > [mri] = ft_convert_coordsys(mri, 'itab'); > ??? Error using ==> ft_convert_coordsys at 102 > conversion from ctf to itab is not yet supported > > In order to better understand the problem, I have tried to perform a different transformation with the code > > [mri] = ft_convert_coordsys(mri, 'spm', 2) > and I get the following message > > Converting the coordinate system from ctf to spm > ??? Undefined function or method 'spm' for input arguments of type 'char'. You have to have spm on your path in order to get this. try ft_hastoolbox('spm',1) and try again. > > Error in ==> align_ctf2spm at 121 > switch spm('ver') > > Error in ==> ft_convert_coordsys at 90 > obj = align_ctf2spm(obj, opt); > > Finally I tried to use the function align_itab2spm in the following way > mri = align_itab2spm(mri, 2) > but I get the error message > > ??? Undefined function or method 'spm' for input arguments of type 'char'. > > Error in ==> align_itab2spm at 108 > switch spm('ver') > See above. Best, Jan-Mathijs > Do you have any idea or suggestion to solve this problem? > > Thanks in advance for any advice, > Sara > > ------------------------- > Dott.ssa Sara Rombetto > Istituto di Cibernetica > "E. Caianiello" > Via Campi Flegrei, 34 > 80078 Pozzuoli (NA) > Italy > mob +39 3401689815 > tel +39 0818675361 > fax +39 0818675128 > -------------------------- > "I disapprove of what you say, but I will defend to the death your right to say > it." [Evelyn Beatrice Hall, The Friends Of Voltaire] > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Wed Jan 22 16:43:19 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 22 Jan 2014 16:43:19 +0100 (CET) Subject: [FieldTrip] BrainProducts Easycap layout In-Reply-To: References: <52dfdd1c.c8380f0a.13a9.30a9SMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: <013301cf1788$ac70f9f0$0552edd0$@herring@fcdonders.ru.nl> Dear Hweeling, First of all you should rename the file to 128Channel.txt, if you use the .sfp extension Fieldtrip will recognize it as a different filetype. Furthermore, I just noticed that there is a bug in ft_read_sens. It tries to convert the channel label to a double, which is of course not possible and not wanted in case of channel labels. The bug will be fixed a.s.a.p. so you should be able to download the updated version by tomorrow, if I am not mistaken. Best, Jim From: Hwee Ling Lee [mailto:hweeling.lee at gmail.com] Sent: woensdag 22 januari 2014 16:18 To: Herring, J.D. (Jim) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] BrainProducts Easycap layout Dear all, Thanks for the suggestions. For Jörn, I checked the Fieldtrip/template/layout, but none of them fits my data. I tried the suggestion from Herring, however, I keep getting an error message: Error using ft_convert_units (line 121) cannot determine geometrical units Error in ft_datatype_sens (line 189) sens = ft_convert_units(sens); Error in ft_read_sens (line 331) sens = ft_datatype_sens(sens); I had my data in a text format previously, and it didn't work either. So I'm not sure what to do! I've attached my file in this email, the values are gotten from the pdf info from Easycap regarding the theta/phi coordinates for each site. Thanks! Cheers, Hweeling On 22 January 2014 16:00, Herring, J.D. (Jim) wrote: Hi Hweeling, If you create a text-file that has three columns: Label, Theta, and Phi coordinate, you can use elec = ft_read_sens(filename) to read the layout into a fieldtrip useable elec structure. The first line of the text file has to be: Site Theta Phi You can also have a look at easycap-M1.txt and easycap-M10.txt in the fieldtrip/template/electrode folder for an example of how the text-file should look like. The theta and phi coordinates will be converted to 3d coordinates assuming a head-radius of 85mm (by default, you can specify this) Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Hwee Ling Lee Sent: woensdag 22 januari 2014 15:42 To: FieldTrip discussion list Subject: [FieldTrip] BrainProducts Easycap layout Dear all, I would like to know if anyone has the layout for 128 EEG channels for BrainProduct easycap. I have the information of the theta/phi coordinates for each of the channels, but I'm not sure how to use these values to create the layout in fieldtrip. It'll be great if someone can help me on this! Thanks. Best regards, Hweeling -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Wed Jan 22 16:51:59 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 22 Jan 2014 16:51:59 +0100 Subject: [FieldTrip] BrainProducts Easycap layout In-Reply-To: <52dfe764.09240f0a.0ed0.ffff8384SMTPIN_ADDED_BROKEN@mx.google.com> References: <52dfdd1c.c8380f0a.13a9.30a9SMTPIN_ADDED_BROKEN@mx.google.com> <52dfe764.09240f0a.0ed0.ffff8384SMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: Dear Jim, Thanks. I did try the file as a text file, but it didn't work previously. I'll download the latest version of Fieldtrip tomorrow, and try again. Thanks again! Cheers, Hweeling On 22 January 2014 16:43, Herring, J.D. (Jim) wrote: > Dear Hweeling, > > > > First of all you should rename the file to 128Channel.txt, if you use the > .sfp extension Fieldtrip will recognize it as a different filetype. > > > > Furthermore, I just noticed that there is a bug in ft_read_sens. It tries > to convert the channel label to a double, which is of course not possible > and not wanted in case of channel labels. > > > > The bug will be fixed a.s.a.p. so you should be able to download the > updated version by tomorrow, if I am not mistaken. > > > > Best, > > > > Jim > > *From:* Hwee Ling Lee [mailto:hweeling.lee at gmail.com] > *Sent:* woensdag 22 januari 2014 16:18 > *To:* Herring, J.D. (Jim) > *Cc:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] BrainProducts Easycap layout > > > > Dear all, > > > > Thanks for the suggestions. For Jörn, I checked the > Fieldtrip/template/layout, but none of them fits my data. I tried the > suggestion from Herring, however, I keep getting an error message: > > Error using ft_convert_units (line 121) > > cannot determine geometrical units > > > > Error in ft_datatype_sens (line 189) > > sens = ft_convert_units(sens); > > > > Error in ft_read_sens (line 331) > > sens = ft_datatype_sens(sens); > > > > I had my data in a text format previously, and it didn't work either. So > I'm not sure what to do! > > > > I've attached my file in this email, the values are gotten from the pdf > info from Easycap regarding the theta/phi coordinates for each site. > > > > Thanks! > > > > Cheers, > > Hweeling > > > > > > On 22 January 2014 16:00, Herring, J.D. (Jim) > wrote: > > Hi Hweeling, > > > > If you create a text-file that has three columns: Label, Theta, and Phi > coordinate, you can use elec = ft_read_sens(filename) to read the layout > into a fieldtrip useable elec structure. > > > The first line of the text file has to be: > > > > Site Theta Phi > > > > You can also have a look at easycap-M1.txt and easycap-M10.txt in the > fieldtrip/template/electrode folder for an example of how the text-file > should look like. > > > > The theta and phi coordinates will be converted to 3d coordinates assuming > a head-radius of 85mm (by default, you can specify this) > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Hwee Ling Lee > *Sent:* woensdag 22 januari 2014 15:42 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] BrainProducts Easycap layout > > > > Dear all, > > > > I would like to know if anyone has the layout for 128 EEG channels for > BrainProduct easycap. > > > > I have the information of the theta/phi coordinates for each of the > channels, but I'm not sure how to use these values to create the layout in > fieldtrip. > > > > It'll be great if someone can help me on this! > > > > Thanks. > > > > Best regards, > > Hweeling > > > > > > > > -- > > ================================================= > Dr. rer. nat. Lee, Hwee Ling > Postdoc > German Center for Neurodegenerative Diseases (DZNE) Bonn > > Email 1: hwee-ling.leedzne.de > Email 2: hweeling.leegmail.com > > > > https://sites.google.com/site/hweelinglee/home > > Correspondence Address: > Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany > ================================================= > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.rombetto at cib.na.cnr.it Wed Jan 22 16:53:55 2014 From: s.rombetto at cib.na.cnr.it (s.rombetto at cib.na.cnr.it) Date: Wed, 22 Jan 2014 16:53:55 +0100 Subject: [FieldTrip] problem with ft_volumerealign and ft_convert_coordsys In-Reply-To: <9250261B-57E7-457E-BD21-539221F13E6D@donders.ru.nl> References: <20140122161846.id5xoorlkw444ssc@arco.cib.na.cnr.it> <9250261B-57E7-457E-BD21-539221F13E6D@donders.ru.nl> Message-ID: <20140122165355.pkocefgu684gcg40@arco.cib.na.cnr.it> Hi Jan-Mathijs thanks for the fast answer > I don't understand what you mean by 'no results appear on my > screen'. Does this mean that mri_realigned is not created? yes, I mean that I have no output at all. > You have to have spm on your path in order to get this. try > ft_hastoolbox('spm',1) and try again. you were right, this was a stupid mistake. I didn't install the spm toolbox. Now I have installed it and tried again. So I get a different erro message: ??? Error using ==> spm_platform>init_platform at 173 PCWIN64 not supported architecture for SPM Error in ==> spm_platform at 65 if isempty(PLATFORM), PLATFORM = init_platform; end Error in ==> spm_vol_minc at 80 if ~spm_platform('bigend') & datatype~=2 & datatype~=2+128, datatype = datatype*256; end; Error in ==> ft_read_mri at 132 hdr = spm_vol_minc(filename); Error in ==> align_ctf2spm at 137 mri2 = ft_read_mri(template); Error in ==> ft_convert_coordsys at 90 obj = align_ctf2spm(obj, opt); as far as I understand one of the problem is that I use a 64 bit pc. Do you know any solution for this? Moreover why the conversion from ctf to itab is not yet supported? Best regards Sara >> >> Error in ==> align_ctf2spm at 121 >> switch spm('ver') >> >> Error in ==> ft_convert_coordsys at 90 >> obj = align_ctf2spm(obj, opt); >> >> Finally I tried to use the function align_itab2spm in the following way >> mri = align_itab2spm(mri, 2) >> but I get the error message >> >> ??? Undefined function or method 'spm' for input arguments of type 'char'. >> >> Error in ==> align_itab2spm at 108 >> switch spm('ver') >> > > > See above. > > Best, > Jan-Mathijs > > >> Do you have any idea or suggestion to solve this problem? >> >> Thanks in advance for any advice, >> Sara >> >> ------------------------- >> Dott.ssa Sara Rombetto >> Istituto di Cibernetica >> "E. Caianiello" >> Via Campi Flegrei, 34 >> 80078 Pozzuoli (NA) >> Italy >> mob +39 3401689815 >> tel +39 0818675361 >> fax +39 0818675128 >> -------------------------- >> "I disapprove of what you say, but I will defend to the death your >> right to say >> it." [Evelyn Beatrice Hall, The Friends Of Voltaire] >> >> ---------------------------------------------------------------- >> This message was sent using IMP, the Internet Messaging Program. >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > ------------------------- Dott.ssa Sara Rombetto Istituto di Cibernetica "E. Caianiello" Via Campi Flegrei, 34 80078 Pozzuoli (NA) Italy mob +39 3401689815 tel +39 0818675361 fax +39 0818675128 -------------------------- "I disapprove of what you say, but I will defend to the death your right to say it." [Evelyn Beatrice Hall, The Friends Of Voltaire] ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From r.oostenveld at donders.ru.nl Wed Jan 22 17:02:21 2014 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 22 Jan 2014 17:02:21 +0100 Subject: [FieldTrip] ft_rejectvisual problem In-Reply-To: References: Message-ID: Hi Ozan The error suggests that the variance that is computed is either 0, or is nan. A zero variance could be the cause of a channel that is clipping. The consequence of that is that the scaling of the vertical axis cannot be determined correctly. Using the following code data = [] data.label = {'a'} data.time = {1:1000}; data.trial = {zeros(1,1000)}; cfg = []; ft_rejectvisual(cfg, data) I was able to reproduce your error. I only have a single all-zero channel (and one trial), but it suggests that your data is all zero. I suggest you check your data with ft_databrowser or standard MATLAB plotting functions. The error of ft_rejectvisual however should not occur, so I have filed it on our bug tracking system as http://bugzilla.fcdonders.nl/show_bug.cgi?id=2450 If you want to keep track of the bug and be notified when we fix it, please register at bugzilla.fcdonders.nl and add yourself as CC to the bug. best regards and thanks for reporting the issue, Robert On 22 Jan 2014, at 14:07, Ozan Çağlayan wrote: > Hi, > > When I call ft_rejectvisual, I receive the following matlab error: > >>> [data] = ft_rejectvisual(cfg, data) > the input is raw data with 14 channels and 1 trials > showing a summary of the data for all channels and trials > computing metric [--------------------------------------------------------|] > Error using set > Bad property value found. > Object Name: axes > Property Name: 'XLim' > Values must be increasing and non-NaN. > > Error in axis>LocSetLimits (line 201) > set(ax,... > > Error in axis (line 93) > LocSetLimits(ax(j),cur_arg); > > Error in rejectvisual_summary>redraw (line 252) > abc = axis; axis([1 info.ntrl abc(3:4)]); > > Error in rejectvisual_summary (line 126) > redraw(h); > > Error in ft_rejectvisual (line 274) > [chansel, trlsel, cfg] = rejectvisual_summary(cfg, tmpdata); > > -------- > > my cfg is empty. Data is a one trial x 14 channel EEG data. The visual > rejection GUI appears but when I change the metric the figures in the > GUI are not redrawn. Is this expected? Is the above error important? > This is Matlab 2013a on Linux with the latest FieldTrip from GIT. > > Thanks. > > -- > Ozan Çağlayan > Research Assistant > Galatasaray University - Computer Engineering Dept. > http://www.ozancaglayan.com > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From catanese.julien at gmail.com Wed Jan 22 19:22:43 2014 From: catanese.julien at gmail.com (Julien Catanese) Date: Wed, 22 Jan 2014 13:22:43 -0500 Subject: [FieldTrip] ft_connectivityanalysis for one long trial Message-ID: Hi dear FieldTrip community, I'm trying to get the coherence spectrum between 2 LFP signals (based on the tutorial: "Analysis of sensor- and source-level connectivity"). This is sleep data, so I have only one long "trial" generated with ft_redefinetrial(). I can run ft_freqanalysis() without problems, but both for 'mtmconvol' and 'mtmfft' the next step, ft_connectivityanalysis(), fails: 1/ using 'mtmconvol': the cohspctrum consists of all '1' (the same happens when using 'fourier' instead of 'powandcsd') 2/ using 'mtmfft': "Error using ft_connectivityplot (line 99) the data should have a dimord of chan_chan_freq or chancmb_freq" How can I get a coherence spectrum for this data? Do I have to artificially chop it up into say, 2-second "fake trials"? notice that MATLAB's mscohere() works fine on the same data (so data are ok). More details below: 1/ using mtmconvol : %% starting point: loaded data data = hdr: [1x1 struct] label: {'LFP1' 'LFP2'} time: {[1x200000 double]} trial: {[2x200000 double]} fsample: 2000 cfg: [1x1 struct] sampleinfo: [1 200000] %% make one long trial cfg = []; cfg.trl = [1 200000 0]; data_faketrl = ft_redefinetrial(cfg,data); %% do frequqency anlaysis cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:1:150; cfg.t_ftimwin = ones(size(cfg.foi)).*2; % 2-second window cfg.toi = 0:1:10; cfg.keeptrials = 'yes'; cfg.channel = {'LFP1', 'LFP2'}; cfg.channelcmb = {'LFP1', 'LFP2'}; >> freq = ft_freqanalysis(cfg, data_faketrl) freq = label: {'LFP1' 'LFP2'} dimord: 'rpt_chan_freq_time' freq: [1x150 double] time: [0 1 2 3 4 5 6 7 8 9 10] powspctrm: [4-D double] labelcmb: {'LFP1' 'LFP2'} crsspctrm: [4-D double] cumtapcnt: [1x150 double] cfg: [1x1 struct] %% coherence spectrum has all ones cfg = []; cfg.method = 'coh'; coh = ft_connectivityanalysis(cfg, freq); coh = labelcmb: {'LFP1' 'LFP2'} dimord: 'chan_freq_time' cohspctrm: [1x150x11 double] freq: [1x150 double] time: [0 1 2 3 4 5 6 7 8 9 10] dof: 150 cfg: [1x1 struct] % coh.cohspctrm(:,:,2:end) is all ones --> fail 2/ using mtmfft: %% cfg = []; cfg.output = 'powandcsd' cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.foi = 1:1:150; cfg.channel = {'LFP1', 'LFP2'}; cfg.channelcmb = {'LFP1', 'LFP2'}; >> freq = ft_freqanalysis(cfg, data_faketrl) freq = label: {'LFP1' 'LFP2'} dimord: 'rpt_chan_freq' freq: [1x150 double] powspctrm: [1x2x150 double] labelcmb: {'LFP1' 'LFP2'} crsspctrm: [1x1x150 double] cumsumcnt: 200000 cumtapcnt: 1 cfg: [1x1 struct] %% coherence spectrum fails: cfg = []; cfg.parameter = 'cohspctrm'; cfg.channelcmb = {'LFP1', 'LFP2'}; >> ft_connectivityplot(cfg, coh); Error using ft_connectivityplot (line 99) the data should have a dimord of chan_chan_freq or chancmb_freq coh = labelcmb: {'LFP1' 'LFP2'} dimord: 'chan_freq' cohspctrm: [1x150 double] freq: [1x150 double] dof: 1 cfg: [1x1 struct] >> unique([coh.cohspctrm(:)]) ans = 1.000000000000000 1.000000000000000 1.000000000000000 1.000000000000000 1.000000000000000 Thanks for your help, Julien C -- *Dr. Julien Catanese* *VanderMeerLab post-doc. University of Waterloo, Ontario, Canada. * *cell : +1 (519) 781 7575* *tel lab : +1 (519) 888 4567 ext 31354* -------------- next part -------------- An HTML attachment was scrubbed... URL: From instanton at gmail.com Wed Jan 22 22:27:21 2014 From: instanton at gmail.com (woun zoo) Date: Wed, 22 Jan 2014 13:27:21 -0800 Subject: [FieldTrip] Questions about transfer entropy Message-ID: Hi all I'd like to get some insight from you for transfer entropy analysis of my ECoG data before I run all possible parameters. I'd like to establish some connectivity between frontal and visual channels in ECoG recording. However, in our data, there is a very strong driven component, namely, steady state visually evoked potentials. SSVEPs in our data appear at several frequencies that are harmonics of the input frequencies and their sum and difference frequencies. So our data has a completely deterministic (SSVEPs) dynamics and the rest of stochastic (non-stimulus locked) activities. Data has 20 trials in total. Each trial lasts 2.4sec. Sampling rate is 1200hz. Raw data were bandpass filtered from 0.1Hz to 500hz. In order to find an effective connectivity, I chose to use TRENTOOL box for transfer entropy. I used Ragwitz method from TRENTOOL (nonlinear locally constant prediction method). This is where I'd like to get some good insight for choosing parameters. Just below, I wrote my questions in blue text. I'm sorry to bother you with all these. But I really want to get some good insight from you because I am not exactly sure if I'm putting garbage inputs or not. At the end of this email, I put my code. OR do you think granger causality is better? But granger causality wants your data to satisfy several requirements. So I went for Transfer Entropy... cfgTEP.toi = [min(data.time{1,1}) max(data.time{1,1})] --> Basically from trial start to trial end. cfgTEP.predicttimemin_u= 10; cfgTEP.predicttimemax_u= 240; --> I am not sure where and how these min and max were used in TEragwitz calculation in TEprepare.m. VW_ds fixed 1 as a prediction horizon. I'm not sure if it's good to predict just next time sample point for SSVEP + noisy data? cfgTEP.actthrvalue = 100; --> I don't know the reason why this autocorrelation time value needs to be set by hand cause I thought embedding delay time gets automatically decided by autocorrelation. Is there a special logic behind setting this by hand? For particular two channels, their ACT values were 54 sample points, etc. Max ACT was 134 or something. Is this due to noise? If I have strong oscillatory activities, am I not supposed to see ACT values close to oscillatory period? cfgTEP.maxlag = 1000; --> 1000 is default. What will be a good lag number to see autocorrelation? Should I use a half of total sample points of data (2880/2 = 1440)? cfgTEP.minnrtrials = 7; --> Does this mean if trial selection rule by ACT value rejects more than 13 trials out of total 20 trials, program won't run? What is a good number for this when I have 20 trials? For main parameters for TEragwitz, cfgTEP.optimizemethod ='ragwitz'; cfgTEP.ragdim = 1:10; --> I just chose all possible embedding dimension from 1 to 10. Should I try to put more than 10? But TE analysis always says, embedding dimension maybe 2, which sounds about right for pure sine waves like SSVEPs. But with 0.1Hz~500hz bandpass, I have tons of non-stimulus locked low and high noisy activities. But when I chose Cao's method, it says, 5 or 6. cfgTEP.ragtaurange = [0.1 2]; --> For delay time, I chose this range. But Ragwitz always chose the smallest value. If I put this range from [1 2], then it chooses 1. If it was [0.5 3], it chose 0.5. So I'd really like to know what kind of values I should put here. cfgTEP.ragtausteps = 15; % steps for ragwitz tau steps 15 cfgTEP.repPred = 600; --> I just chose this. I could vary this. Depending on what I put here, final significance of TE changes too. cfgTEP.flagNei = 'Mass' ; %neigbour analyse type cfgTEP.sizeNei = 4; --> Ideally I guess I might have to vary size of neighborhood in phase space For Surrogate analysis, cfgTESS.optdimusage = 'indivdim'; cfgTGAA.select_opt_u = 'product_evidence'; % 'max_TEdiff'; --> I just chose 'product_evidence' because help file of InteractionDelayReconstruction_analyze.m says 'max_TEdiff' could be problematic in certain case. Which one is normal to use? cfgTGAA.select_opt_u_pos = 'shortest'; --> Also for this, I don't know which one is normal to use. I'm sorry if this questions are too hectic. I really appreciate if you could give me some good insight about parameters for ECoG steady-state visual evoked potential data. Thank you very much. Have a nice day. ======================== ======================== code here load data %% define cfg for TEprepare.m cfgTEP = []; % path to OpenTSTOOL cfgTEP.Path2TSTOOL = '../OpenTSTOOL'; %strcat(work_dir,'toolboxes/','OpenTSTOOL'); % data cfgTEP.toi = [min(data.time{1,1}) max(data.time{1,1})]; % time of interest % cfgTEP.sgncmb = {'2' '43'}; % channels to be analyzed % or: datalabels = data.label; %select channels for TE compute cfgTEP.channel = datalabels; % scanning of interaction delays u cfgTEP.predicttimemin_u= 41; % minimum u to be scanned cfgTEP.predicttimemax_u= 240; % maximum u to be scanned cfgTEP.predicttimestepsize = 1; % time steps between u's to be scanned % estimator cfgTEP.TEcalctype='VW_ds'; % use the new TE estimator (Wibral, 2013) % ACT estimation and constraints on allowed ACT(autocorelation time) cfgTEP.actthrvalue = 100; % threshold for ACT cfgTEP.maxlag = 1000; cfgTEP.minnrtrials = 7; % minimum acceptable number of trials % optimizing embedding cfgTEP.optimizemethod ='ragwitz'; % criterion used cfgTEP.ragdim = 1:10; % criterion dimension cfgTEP.ragtaurange = [0.1 2]; % range for tau cfgTEP.ragtausteps = 15; % steps for ragwitz tau steps 15 cfgTEP.repPred = 600; % size(data.trial{1,1},2)*(3/4); % kernel-based TE estimation cfgTEP.flagNei = 'Mass' ; %neigbour analyse type cfgTEP.sizeNei = 4; %neigbours to analyse % optimizing embedding % cfgTEP.optimizemethod = 'cao'; % cfgTEP.caodim = 1:10; % cfgTEP.caokth_neighbors = 4; %% define cfg for TEsurrogatestats_ensemble.m cfgTESS= []; % use individual dimensions for embedding cfgTESS.optdimusage = 'indivdim'; % statistical and shift testing cfgTESS.tail = 1; cfgTESS.numpermutation = 5e4; cfgTESS.shifttesttype ='TEshift>TE'; cfgTESS.surrogatetype = 'blockreverse1'; %'trialshuffling'; % results file name data_save_path = strcat(data_dir,'TE'); if ~isdir(data_save_path); mkdir(data_save_path); end partial_save_dir = strcat(data_save_path,'/','dataset'); if ~isdir(partial_save_dir); mkdir(partial_save_dir); end cfgTESS.fileidout = strcat(partial_save_dir,'/','dataset'); %% calculation - scan over specified values for u f_time=tic; TGA_results=InteractionDelayReconstruction_calculate(cfgTEP,cfgTESS,data); toc(f_time); savename=strcat(data_save_path,'/','dataset_results'); save(savename,'TGA_results'); %% analysis - find maximum TE value to reconstruct the interaction delay u cfgTGAA = []; cfgTGAA.select_opt_u = 'product_evidence'; % 'max_TEdiff'; cfgTGAA.select_opt_u_pos = 'shortest'; TGA_analyzed=InteractionDelayReconstruction_analyze(cfgTGAA,TGA_results); savename2=strcat(data_save_path,'/','dataset_complete_analyzed.mat'); save(savename2,'TGA_analyzed'); -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jan 23 08:41:39 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 23 Jan 2014 08:41:39 +0100 Subject: [FieldTrip] ft_rejectvisual problem In-Reply-To: References: Message-ID: <901C3C2D-197C-4B75-8FF9-3DF33BDD1C98@donders.ru.nl> Hi Robert and Ozan, I think that the problem reported is due to the fact that there was just one single trial in the input. In the drawing of the figure, the axis limits are set as [1 numtrl yax1 yax2] (or something), where in Ozan's case numtrl is 1. Matlab does not like the axis limits to be non increasing On Jan 22, 2014, at 5:02 PM, Robert Oostenveld wrote: > Hi Ozan > > The error suggests that the variance that is computed is either 0, or is nan. A zero variance could be the cause of a channel that is clipping. The consequence of that is that the scaling of the vertical axis cannot be determined correctly. > > Using the following code > > data = [] > data.label = {'a'} > data.time = {1:1000}; > data.trial = {zeros(1,1000)}; > > cfg = []; > ft_rejectvisual(cfg, data) > > I was able to reproduce your error. I only have a single all-zero channel (and one trial), but it suggests that your data is all zero. I suggest you check your data with ft_databrowser or standard MATLAB plotting functions. > > The error of ft_rejectvisual however should not occur, so I have filed it on our bug tracking system as http://bugzilla.fcdonders.nl/show_bug.cgi?id=2450 > > If you want to keep track of the bug and be notified when we fix it, please register at bugzilla.fcdonders.nl and add yourself as CC to the bug. > > best regards and thanks for reporting the issue, > Robert > > > > On 22 Jan 2014, at 14:07, Ozan Çağlayan wrote: > >> Hi, >> >> When I call ft_rejectvisual, I receive the following matlab error: >> >>>> [data] = ft_rejectvisual(cfg, data) >> the input is raw data with 14 channels and 1 trials >> showing a summary of the data for all channels and trials >> computing metric [--------------------------------------------------------|] >> Error using set >> Bad property value found. >> Object Name: axes >> Property Name: 'XLim' >> Values must be increasing and non-NaN. >> >> Error in axis>LocSetLimits (line 201) >> set(ax,... >> >> Error in axis (line 93) >> LocSetLimits(ax(j),cur_arg); >> >> Error in rejectvisual_summary>redraw (line 252) >> abc = axis; axis([1 info.ntrl abc(3:4)]); >> >> Error in rejectvisual_summary (line 126) >> redraw(h); >> >> Error in ft_rejectvisual (line 274) >> [chansel, trlsel, cfg] = rejectvisual_summary(cfg, tmpdata); >> >> -------- >> >> my cfg is empty. Data is a one trial x 14 channel EEG data. The visual >> rejection GUI appears but when I change the metric the figures in the >> GUI are not redrawn. Is this expected? Is the above error important? >> This is Matlab 2013a on Linux with the latest FieldTrip from GIT. >> >> Thanks. >> >> -- >> Ozan Çağlayan >> Research Assistant >> Galatasaray University - Computer Engineering Dept. >> http://www.ozancaglayan.com >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Thu Jan 23 08:45:24 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Thu, 23 Jan 2014 08:45:24 +0100 Subject: [FieldTrip] ft_rejectvisual problem Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ayobimpe2004 at hotmail.com Thu Jan 23 14:43:45 2014 From: ayobimpe2004 at hotmail.com (Azeez Adebimpe) Date: Thu, 23 Jan 2014 14:43:45 +0100 Subject: [FieldTrip] connectivity from source analysis Message-ID: Dear all, I am trying to calculate connectivity from source data using powcorr method but I am getting below error. Please your assistance will be highly appreciated. /Warning: conversion from mom to pow is not possible, either because there is nomom in the data, or because the dimension of mom>1. in that case callft_sourcedescriptives first with cfg.projectmom > In ft_checkdata>fixsource at 1488 In ft_checkdata at 708 In ft_connectivityanalysis at 407??? Out of memory. Type HELP MEMORY for your options. Error in ==> ft_connectivity_corr at 176 p1 = p1(:,ones(1,siz(3)),:,:,:,:); Error in ==> ft_connectivityanalysis at 554 [datout, varout, nrpt] = ft_connectivity_corr(data.(inparam), optarg{:});/ Azeez Adebimpe -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.cox at uva.nl Thu Jan 23 16:19:58 2014 From: r.cox at uva.nl (Roy Cox) Date: Thu, 23 Jan 2014 16:19:58 +0100 Subject: [FieldTrip] degrees of freedom Message-ID: Hi all, I'm using ft_timelockstatistics with indepsamplesT to compare spatial topographies between two groups (n=15 and n=13). The measure I'm interested in has no time dimension, so I basically have one sample per electrode for each subject. This works fine (I get the effects I hoped for). In order to make the statistics 'slightly more valid', however, I need to adjust the degrees of freedom. That is, the data I'm comparing between groups has already had a covariate taken out. So df has to be df-1. Doesn't look like Fieldtrip allows you to set this in the cfg struct somewhere, so any suggestions where I need to hack? Thanks, Roy -- Roy Cox, M.Sc. | Brain & Cognition Group | Department of Psychology | University of Amsterdam | Weesperplein 4 | 1018 XA Amsterdam | the Netherlands | room 3.21 | phone: +31 20 525 6847 | email: r.cox at uva.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Fri Jan 24 08:54:24 2014 From: joramvandriel at gmail.com (Joram van Driel) Date: Fri, 24 Jan 2014 08:54:24 +0100 Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' Message-ID: Hi all, I'm getting stuck with ft_sourcestatistics. I want to do a simple two-condition contrast on neuromag MEG data, where I did frequency beamforming on a pre vs. post tf-window. I followed the instructions of the tutorial, so for each subject and condition: 1) ft_sourceanalysis with subject-specific vol and grid structures, where I did the pre vs post contrast as follows: sourceAll = ft_sourceanalysis(cfg, freqAll(condi)); cfg.grid.filter = sourceAll.avg.filter; sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) ); sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi)); sourceDiff(condi) = sourcePost_con; sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow - sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; 2) ft_sourceinterpolate with the subject-specific mri 3) ft_volumenormalize to MNI with coordsys 'neuromag'. 4) The output is stored in a subject-by-condition cell array, which I put into ft_sourcestatistics with the following cfg: cfg = []; cfg.parameter = 'avg.pow'; cfg.method = 'analytic'; cfg.statistic = 'depsamplesT'; cfg.correctm = 'no'; cfg.alpha = 0.05; Nsub = 10; cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.tail = 0; % number, -1, 1 or 0 (default = 0) cfg.ivar = 1; % number or list with indices, independent variable(s) cfg.uvar = 2; % number or list with indices, unit variable(s) stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, sourceDiffNorm{:,2}); This results in the error that it cannot find the field 'pos'; however this field is only present in the result from ft_sourceanalysis (and differs for each subject), but disappears as soon as ft_sourceinterpolate is applied. I tried to put the result from ft_sourceanalysis straight into ft_sourcestatistics (which according to the help should be possible), but this doesn't recognize the input as volume data (and apart from that, the subjects aren't spatially aligned this way). I hope someone can help me with this; any help is much appreciated! Thanks, Joram -- Joram van Driel, MSc. PhD student @ University of Amsterdam Brain & Cognition @ Department of Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Fri Jan 24 09:00:18 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Fri, 24 Jan 2014 09:00:18 +0100 Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Fri Jan 24 09:14:13 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Fri, 24 Jan 2014 09:14:13 +0100 (CET) Subject: [FieldTrip] degrees of freedom In-Reply-To: References: Message-ID: <000c01cf18dc$448b10f0$cda132d0$@herring@fcdonders.ru.nl> Hi Roy, Fieldtrip allows you to create and use your own functions to calculate statistics. What you could also do is adjust the indepsamplesT statistic function (fieldtrip/statfun/ft_statfun_indepsamplesT.m) to suite your needs (E.g. change the Df in line 89). Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Roy Cox Sent: donderdag 23 januari 2014 16:20 To: fieldtrip at science.ru.nl Subject: [FieldTrip] degrees of freedom Hi all, I'm using ft_timelockstatistics with indepsamplesT to compare spatial topographies between two groups (n=15 and n=13). The measure I'm interested in has no time dimension, so I basically have one sample per electrode for each subject. This works fine (I get the effects I hoped for). In order to make the statistics 'slightly more valid', however, I need to adjust the degrees of freedom. That is, the data I'm comparing between groups has already had a covariate taken out. So df has to be df-1. Doesn't look like Fieldtrip allows you to set this in the cfg struct somewhere, so any suggestions where I need to hack? Thanks, Roy -- Roy Cox, M.Sc. | Brain & Cognition Group | Department of Psychology | University of Amsterdam | Weesperplein 4 | 1018 XA Amsterdam | the Netherlands | room 3.21 | phone: +31 20 525 6847 | email: r.cox at uva.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.lam at fcdonders.ru.nl Fri Jan 24 09:55:39 2014 From: n.lam at fcdonders.ru.nl (Lam, Nietzsche) Date: Fri, 24 Jan 2014 09:55:39 +0100 (CET) Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' In-Reply-To: Message-ID: <711157447.420800.1390553739013.JavaMail.root@indus.zimbra.ru.nl> Hi Joram, I'm not entirely sure if this is the solution, but when you call ft_sourcestatistics, you can try this: FieldTrip statistics functions understands that you want to use the data from all subjects when you use {:}, so there's no need to call individual columns with {:,X}. Best, Nietzsche ----- Original Message ----- > From: "Joram van Driel" > To: "FieldTrip discussion list" > Sent: Friday, 24 January, 2014 8:54:24 AM > Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' > Hi all, > > > I'm getting stuck with ft_sourcestatistics. > I want to do a simple two-condition contrast on neuromag MEG data, > where I did frequency beamforming on a pre vs. post tf-window. > > > I followed the instructions of the tutorial, so for each subject and > condition: > > > 1) ft_sourceanalysis with subject-specific vol and grid structures, > where I did the pre vs post contrast as follows: > > > > sourceAll = ft_sourceanalysis(cfg, freqAll(condi)); > > cfg.grid.filter = sourceAll.avg.filter; > sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) ); > sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi)); > > > > sourceDiff(condi) = sourcePost_con; > sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow - > sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; > > > 2) ft_sourceinterpolate with the subject-specific mri > 3) ft_volumenormalize to MNI with coordsys 'neuromag'. > 4) The output is stored in a subject-by-condition cell array, which I > put into ft_sourcestatistics with the following cfg: > > > > cfg = []; > cfg.parameter = 'avg.pow'; > cfg.method = 'analytic'; > cfg.statistic = 'depsamplesT'; > cfg.correctm = 'no'; > cfg.alpha = 0.05; > > > Nsub = 10; > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; > cfg.tail = 0; % number, -1, 1 or 0 (default = 0) > cfg.ivar = 1; % number or list with indices, independent variable(s) > cfg.uvar = 2; % number or list with indices, unit variable(s) > > > stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, > sourceDiffNorm{:,2}); > > > > > This results in the error that it cannot find the field 'pos'; however > this field is only present in the result from ft_sourceanalysis (and > differs for each subject), but disappears as soon as > ft_sourceinterpolate is applied. I tried to put the result from > ft_sourceanalysis straight into ft_sourcestatistics (which according > to the help should be possible), but this doesn't recognize the input > as volume data (and apart from that, the subjects aren't spatially > aligned this way). > > > I hope someone can help me with this; any help is much appreciated! > > > Thanks, > Joram > > > -- > > Joram van Driel, MSc. > PhD student @ University of Amsterdam > Brain & Cognition @ Department of Psychology > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Nietzsche H.L. Lam, MSc PhD Candidate Max Planck Institute for Psycholinguistics Wundtlaan 1, 6525 XD Nijmegen, The Netherlands Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Kapittelweg 29, 6525EN Nijmegen, The Netherlands n.lam at fcdonders.ru.nl +31-24-3668219 neurobiologyoflanguage.com From hweeling.lee at gmail.com Fri Jan 24 10:14:11 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Fri, 24 Jan 2014 10:14:11 +0100 Subject: [FieldTrip] Fieldtrip on Mac Message-ID: Dear all, I downloaded the latest version of fieldtrip, and tried to use fieldtrip toolbox on Matlab R2012b, but I keep experiencing problems with reading the files. Here's the command I use: cfg.trialfun = 'trial_def_AV'; % self-made function located in D:\New_Scripts_2013\my_trialfun_name.m cfg.trialdef.eventtype = 'Stimulus'; cfg.trialdef.eventvalue = 3; % 1 for AV; 2 for AN; 3 for both AV and AN cfg.trialdef.pre = 0.5; cfg.trialdef.post = 4.0; cfg = ft_definetrial(cfg); [data] = ft_preprocessing(cfg); % loading eeg data into memory evaluating trialfunction 'trial_def_AV' Error using ft_read_event (line 383) cannot open BrainVision marker file Error in trial_def_AV (line 4) event = ft_read_event(cfg.event); Error in ft_definetrial (line 169) [trl, event] = feval(cfg.trialfun, cfg); I'm lost, and do not know what to do. Could someone please help? Thanks. Cheers, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Fri Jan 24 10:56:50 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Fri, 24 Jan 2014 10:56:50 +0100 (CET) Subject: [FieldTrip] ft_combineplanar on Neuromagdata Message-ID: <935899657.429750.1390557410212.JavaMail.root@bcbl.eu> Dear fieldtrip users, sorry to bother you with this really trivial question. I am running into an issue using ft_combineplanar on Neuromag data. The code I am using is as follows: cfg = []; cfg.channel = {'MEGGRAD'}; grad_data = ft_selectdata(meg_data); %after this step there are only planar-gradients left cfg = []; cfg.method = 'mtmfft'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.foi = 0:100; cfg.keeptrials = 'no'; spectrum1 = ft_freqanalysis(cfg,grad_data); % returns the FFT power spectrum cfg = []; spectrum2 = ft_combineplanar(cfg,spectrum); % this step should combine horizontal and vertical gradients into % one single gradient aka reduce the number of channels However, spectrum does not change. This can be seen by isequal(spectrum1.powspctrm,spectrum2.powspctrm) == 1 Also the number of channels (n = 204) is not reduced after ft_combineplanar when in fact there should only be n = 102 channels left. Is this related to the fact that ft_combineplanar is designed to take only time-frequency maps as input or am I doing something wrong here? Any advice would be highly appreciated. Fred From alik.widge at gmail.com Fri Jan 24 11:57:42 2014 From: alik.widge at gmail.com (Alik Widge) Date: Fri, 24 Jan 2014 05:57:42 -0500 Subject: [FieldTrip] Choice of repairchannel algorithm Message-ID: Hello all, I notice that I have a choice of calculation options for ft_repairchannel, including simple interpolation and what appear to be CSD-like calculations. However, I've been unable to find any advice on which method to use. Is anyone aware of a discussion or head-to-head evaluation of the various available methods? I could not find one in the literature or past archives of this list, and right now am working on the assumption that it's basically whatever smoothness/computation tradeoff I care to choose. Thanks, Alik Widge, MD, PhD Massachusetts General Hospital alik.widge at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Fri Jan 24 12:09:25 2014 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 24 Jan 2014 15:09:25 +0400 Subject: [FieldTrip] Fieldtrip on Mac Message-ID: Hello Hwee Ling, Without knowing the code that's in your trial function, it's hard to tell what the problem might be. Based on the error message, it looks like it's not finding the .vmrk file where it's supposed to be. Do you need to specify your own trial function? In my experience, Brain Vision data can be imported into Fieldtrip very easily just using the general trial function; specify cfg.filename to be the .vhdr file, then run ft_definetrial and ft_preprocessing. Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ > Message: 2 > Date: Fri, 24 Jan 2014 10:14:11 +0100 > From: Hwee Ling Lee > To: FieldTrip discussion list > Subject: [FieldTrip] Fieldtrip on Mac > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Dear all, > > I downloaded the latest version of fieldtrip, and tried to use fieldtrip > toolbox on Matlab R2012b, but I keep experiencing problems with reading the > files. > > Here's the command I use: > > cfg.trialfun = 'trial_def_AV'; % self-made function located in > D:\New_Scripts_2013\my_trialfun_name.m > cfg.trialdef.eventtype = 'Stimulus'; > cfg.trialdef.eventvalue = 3; % 1 for AV; 2 for AN; 3 for both AV and AN > cfg.trialdef.pre = 0.5; > cfg.trialdef.post = 4.0; > cfg = ft_definetrial(cfg); > > [data] = ft_preprocessing(cfg); % loading eeg data into memory > > evaluating trialfunction 'trial_def_AV' > Error using ft_read_event (line 383) > cannot open BrainVision marker file > > Error in trial_def_AV (line 4) > event = ft_read_event(cfg.event); > > Error in ft_definetrial (line 169) > [trl, event] = feval(cfg.trialfun, cfg); > > I'm lost, and do not know what to do. Could someone please help? > Thanks. > > Cheers, > Hweeling From joramvandriel at gmail.com Fri Jan 24 12:16:26 2014 From: joramvandriel at gmail.com (Joram van Driel) Date: Fri, 24 Jan 2014 12:16:26 +0100 Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' In-Reply-To: <711157447.420800.1390553739013.JavaMail.root@indus.zimbra.ru.nl> References: <711157447.420800.1390553739013.JavaMail.root@indus.zimbra.ru.nl> Message-ID: Hi Nietzsche, Thanks for the suggestion, but unfortunately that's not what's going wrong. My input data is a subject-by-condition array, so if I fill in sourcedat{:,1} and sourcedat{:,2}, that would be equivalent to having two separate variables and do source_condition1{:},source_condition2{:}. I tried that but I get the same error "??? Reference to non-existent field 'pos'." In fact, the error is I think a bug of the newest fieldtrip version, because when I tried an older version (fieldtrip-20131031), it works (although it later crashes on a design array issue, but that's something I have to figure out myself ;)). The 'pos' field is a field that is present in the output of ft_sourceanalysis; according to the help it's a N-by-3 matrix of the x-y-z position of all the sources, where N is the sum of the length of the 'inside' and 'outside' fields. This 'pos' field is removed in further steps (ft_sourceinterpolate). When calling ft_sourceanalysis in version fieldtrip-20140109, the function statistics_wrapper searches for this field (line 228) and can't find it. Chrs, - Joram On Fri, Jan 24, 2014 at 9:55 AM, Lam, Nietzsche wrote: > Hi Joram, > > I'm not entirely sure if this is the solution, but when you call > ft_sourcestatistics, you can try this: > > > > FieldTrip statistics functions understands that you want to use the data > from all subjects when you use {:}, so there's no need to call individual > columns with {:,X}. > > Best, > Nietzsche > > > > ----- Original Message ----- > > From: "Joram van Driel" > > To: "FieldTrip discussion list" > > Sent: Friday, 24 January, 2014 8:54:24 AM > > Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' > > Hi all, > > > > > > I'm getting stuck with ft_sourcestatistics. > > I want to do a simple two-condition contrast on neuromag MEG data, > > where I did frequency beamforming on a pre vs. post tf-window. > > > > > > I followed the instructions of the tutorial, so for each subject and > > condition: > > > > > > 1) ft_sourceanalysis with subject-specific vol and grid structures, > > where I did the pre vs post contrast as follows: > > > > > > > > sourceAll = ft_sourceanalysis(cfg, freqAll(condi)); > > > > cfg.grid.filter = sourceAll.avg.filter; > > sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) ); > > sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi)); > > > > > > > > sourceDiff(condi) = sourcePost_con; > > sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow - > > sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; > > > > > > 2) ft_sourceinterpolate with the subject-specific mri > > 3) ft_volumenormalize to MNI with coordsys 'neuromag'. > > 4) The output is stored in a subject-by-condition cell array, which I > > put into ft_sourcestatistics with the following cfg: > > > > > > > > cfg = []; > > cfg.parameter = 'avg.pow'; > > cfg.method = 'analytic'; > > cfg.statistic = 'depsamplesT'; > > cfg.correctm = 'no'; > > cfg.alpha = 0.05; > > > > > > Nsub = 10; > > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; > > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; > > cfg.tail = 0; % number, -1, 1 or 0 (default = 0) > > cfg.ivar = 1; % number or list with indices, independent variable(s) > > cfg.uvar = 2; % number or list with indices, unit variable(s) > > > > > > stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, > > sourceDiffNorm{:,2}); > > > > > > > > > > This results in the error that it cannot find the field 'pos'; however > > this field is only present in the result from ft_sourceanalysis (and > > differs for each subject), but disappears as soon as > > ft_sourceinterpolate is applied. I tried to put the result from > > ft_sourceanalysis straight into ft_sourcestatistics (which according > > to the help should be possible), but this doesn't recognize the input > > as volume data (and apart from that, the subjects aren't spatially > > aligned this way). > > > > > > I hope someone can help me with this; any help is much appreciated! > > > > > > Thanks, > > Joram > > > > > > -- > > > > Joram van Driel, MSc. > > PhD student @ University of Amsterdam > > Brain & Cognition @ Department of Psychology > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Nietzsche H.L. Lam, MSc > PhD Candidate > > Max Planck Institute for Psycholinguistics > Wundtlaan 1, 6525 XD Nijmegen, The Netherlands > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Kapittelweg 29, 6525EN Nijmegen, The Netherlands > > n.lam at fcdonders.ru.nl > +31-24-3668219 > > > neurobiologyoflanguage.com > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Joram van Driel, MSc. PhD student @ University of Amsterdam Brain & Cognition @ Department of Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Fri Jan 24 12:21:52 2014 From: joramvandriel at gmail.com (Joram van Driel) Date: Fri, 24 Jan 2014 12:21:52 +0100 Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' In-Reply-To: References: <711157447.420800.1390553739013.JavaMail.root@indus.zimbra.ru.nl> Message-ID: Sorry, this should have been: This 'pos' field is removed in further steps (ft_sourceinterpolate). When calling *ft_sourcestatistics* in version fieldtrip-20140109, the function statistics_wrapper searches for this field (line 228) and can't find it. On Fri, Jan 24, 2014 at 12:16 PM, Joram van Driel wrote: > Hi Nietzsche, > > Thanks for the suggestion, but unfortunately that's not what's going > wrong. My input data is a subject-by-condition array, so if I fill in > sourcedat{:,1} and sourcedat{:,2}, that would be equivalent to having two > separate variables and do source_condition1{:},source_condition2{:}. I > tried that but I get the same error "??? Reference to non-existent field > 'pos'." > > In fact, the error is I think a bug of the newest fieldtrip version, > because when I tried an older version (fieldtrip-20131031), it works > (although it later crashes on a design array issue, but that's something I > have to figure out myself ;)). > > The 'pos' field is a field that is present in the output of > ft_sourceanalysis; according to the help it's a N-by-3 matrix of the x-y-z > position of all the sources, where N is the sum of the length of the > 'inside' and 'outside' fields. > This 'pos' field is removed in further steps (ft_sourceinterpolate). When > calling ft_sourceanalysis in version fieldtrip-20140109, the function > statistics_wrapper searches for this field (line 228) and can't find it. > > Chrs, > > - Joram > > > > On Fri, Jan 24, 2014 at 9:55 AM, Lam, Nietzsche wrote: > >> Hi Joram, >> >> I'm not entirely sure if this is the solution, but when you call >> ft_sourcestatistics, you can try this: >> >> >> >> FieldTrip statistics functions understands that you want to use the data >> from all subjects when you use {:}, so there's no need to call individual >> columns with {:,X}. >> >> Best, >> Nietzsche >> >> >> >> ----- Original Message ----- >> > From: "Joram van Driel" >> > To: "FieldTrip discussion list" >> > Sent: Friday, 24 January, 2014 8:54:24 AM >> > Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' >> > Hi all, >> > >> > >> > I'm getting stuck with ft_sourcestatistics. >> > I want to do a simple two-condition contrast on neuromag MEG data, >> > where I did frequency beamforming on a pre vs. post tf-window. >> > >> > >> > I followed the instructions of the tutorial, so for each subject and >> > condition: >> > >> > >> > 1) ft_sourceanalysis with subject-specific vol and grid structures, >> > where I did the pre vs post contrast as follows: >> > >> > >> > >> > sourceAll = ft_sourceanalysis(cfg, freqAll(condi)); >> > >> > cfg.grid.filter = sourceAll.avg.filter; >> > sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) ); >> > sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi)); >> > >> > >> > >> > sourceDiff(condi) = sourcePost_con; >> > sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow - >> > sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; >> > >> > >> > 2) ft_sourceinterpolate with the subject-specific mri >> > 3) ft_volumenormalize to MNI with coordsys 'neuromag'. >> > 4) The output is stored in a subject-by-condition cell array, which I >> > put into ft_sourcestatistics with the following cfg: >> > >> > >> > >> > cfg = []; >> > cfg.parameter = 'avg.pow'; >> > cfg.method = 'analytic'; >> > cfg.statistic = 'depsamplesT'; >> > cfg.correctm = 'no'; >> > cfg.alpha = 0.05; >> > >> > >> > Nsub = 10; >> > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; >> > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; >> > cfg.tail = 0; % number, -1, 1 or 0 (default = 0) >> > cfg.ivar = 1; % number or list with indices, independent variable(s) >> > cfg.uvar = 2; % number or list with indices, unit variable(s) >> > >> > >> > stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, >> > sourceDiffNorm{:,2}); >> > >> > >> > >> > >> > This results in the error that it cannot find the field 'pos'; however >> > this field is only present in the result from ft_sourceanalysis (and >> > differs for each subject), but disappears as soon as >> > ft_sourceinterpolate is applied. I tried to put the result from >> > ft_sourceanalysis straight into ft_sourcestatistics (which according >> > to the help should be possible), but this doesn't recognize the input >> > as volume data (and apart from that, the subjects aren't spatially >> > aligned this way). >> > >> > >> > I hope someone can help me with this; any help is much appreciated! >> > >> > >> > Thanks, >> > Joram >> > >> > >> > -- >> > >> > Joram van Driel, MSc. >> > PhD student @ University of Amsterdam >> > Brain & Cognition @ Department of Psychology >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -- >> Nietzsche H.L. Lam, MSc >> PhD Candidate >> >> Max Planck Institute for Psycholinguistics >> Wundtlaan 1, 6525 XD Nijmegen, The Netherlands >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Kapittelweg 29, 6525EN Nijmegen, The Netherlands >> >> n.lam at fcdonders.ru.nl >> +31-24-3668219 >> >> >> neurobiologyoflanguage.com >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Joram van Driel, MSc. > PhD student @ University of Amsterdam > Brain & Cognition @ Department of Psychology > -- Joram van Driel, MSc. PhD student @ University of Amsterdam Brain & Cognition @ Department of Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jan 24 12:40:21 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 24 Jan 2014 12:40:21 +0100 Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' In-Reply-To: References: <711157447.420800.1390553739013.JavaMail.root@indus.zimbra.ru.nl> Message-ID: Hi Joram, Probably this is my bad. ft_sourceinterpolate intentionally removes the pos field, which has to do with the representation of the data. FieldTrip either represents source reconstructed data that can be defined on a regular 3D grid as a so-called 'source-structure' (with a pos field), or as a so-called volume-structure (without a pos field). After the sourceinterpolate step your data is represented as the latter, lacking a pos field (intentionally), but unintentionally causing a crash in ft_sourcestatistics. A workaround for now would be for you to change line 228 in statistics_wrapper into if isfield(varargin{1}, 'transform') || (isfield(varargin{1}, 'dim') && prod(varargin{1}.dim)==size(varargin{1}.pos,1)). Could you try this out and let me know if that works? Then I can incorporate it in FT. Best and sorry for the inconvenience, JM On Jan 24, 2014, at 12:21 PM, Joram van Driel wrote: > Sorry, this should have been: > This 'pos' field is removed in further steps (ft_sourceinterpolate). When calling ft_sourcestatistics in version fieldtrip-20140109, the function statistics_wrapper searches for this field (line 228) and can't find it. > > > On Fri, Jan 24, 2014 at 12:16 PM, Joram van Driel wrote: > Hi Nietzsche, > > Thanks for the suggestion, but unfortunately that's not what's going wrong. My input data is a subject-by-condition array, so if I fill in sourcedat{:,1} and sourcedat{:,2}, that would be equivalent to having two separate variables and do source_condition1{:},source_condition2{:}. I tried that but I get the same error "??? Reference to non-existent field 'pos'." > > In fact, the error is I think a bug of the newest fieldtrip version, because when I tried an older version (fieldtrip-20131031), it works (although it later crashes on a design array issue, but that's something I have to figure out myself ;)). > > The 'pos' field is a field that is present in the output of ft_sourceanalysis; according to the help it's a N-by-3 matrix of the x-y-z position of all the sources, where N is the sum of the length of the 'inside' and 'outside' fields. > This 'pos' field is removed in further steps (ft_sourceinterpolate). When calling ft_sourceanalysis in version fieldtrip-20140109, the function statistics_wrapper searches for this field (line 228) and can't find it. > > Chrs, > > - Joram > > > > On Fri, Jan 24, 2014 at 9:55 AM, Lam, Nietzsche wrote: > Hi Joram, > > I'm not entirely sure if this is the solution, but when you call ft_sourcestatistics, you can try this: > > > > FieldTrip statistics functions understands that you want to use the data from all subjects when you use {:}, so there's no need to call individual columns with {:,X}. > > Best, > Nietzsche > > > > ----- Original Message ----- > > From: "Joram van Driel" > > To: "FieldTrip discussion list" > > Sent: Friday, 24 January, 2014 8:54:24 AM > > Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' > > Hi all, > > > > > > I'm getting stuck with ft_sourcestatistics. > > I want to do a simple two-condition contrast on neuromag MEG data, > > where I did frequency beamforming on a pre vs. post tf-window. > > > > > > I followed the instructions of the tutorial, so for each subject and > > condition: > > > > > > 1) ft_sourceanalysis with subject-specific vol and grid structures, > > where I did the pre vs post contrast as follows: > > > > > > > > sourceAll = ft_sourceanalysis(cfg, freqAll(condi)); > > > > cfg.grid.filter = sourceAll.avg.filter; > > sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) ); > > sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi)); > > > > > > > > sourceDiff(condi) = sourcePost_con; > > sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow - > > sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; > > > > > > 2) ft_sourceinterpolate with the subject-specific mri > > 3) ft_volumenormalize to MNI with coordsys 'neuromag'. > > 4) The output is stored in a subject-by-condition cell array, which I > > put into ft_sourcestatistics with the following cfg: > > > > > > > > cfg = []; > > cfg.parameter = 'avg.pow'; > > cfg.method = 'analytic'; > > cfg.statistic = 'depsamplesT'; > > cfg.correctm = 'no'; > > cfg.alpha = 0.05; > > > > > > Nsub = 10; > > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; > > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; > > cfg.tail = 0; % number, -1, 1 or 0 (default = 0) > > cfg.ivar = 1; % number or list with indices, independent variable(s) > > cfg.uvar = 2; % number or list with indices, unit variable(s) > > > > > > stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, > > sourceDiffNorm{:,2}); > > > > > > > > > > This results in the error that it cannot find the field 'pos'; however > > this field is only present in the result from ft_sourceanalysis (and > > differs for each subject), but disappears as soon as > > ft_sourceinterpolate is applied. I tried to put the result from > > ft_sourceanalysis straight into ft_sourcestatistics (which according > > to the help should be possible), but this doesn't recognize the input > > as volume data (and apart from that, the subjects aren't spatially > > aligned this way). > > > > > > I hope someone can help me with this; any help is much appreciated! > > > > > > Thanks, > > Joram > > > > > > -- > > > > Joram van Driel, MSc. > > PhD student @ University of Amsterdam > > Brain & Cognition @ Department of Psychology > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Nietzsche H.L. Lam, MSc > PhD Candidate > > Max Planck Institute for Psycholinguistics > Wundtlaan 1, 6525 XD Nijmegen, The Netherlands > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Kapittelweg 29, 6525EN Nijmegen, The Netherlands > > n.lam at fcdonders.ru.nl > +31-24-3668219 > > > neurobiologyoflanguage.com > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Joram van Driel, MSc. > PhD student @ University of Amsterdam > Brain & Cognition @ Department of Psychology > > > > -- > Joram van Driel, MSc. > PhD student @ University of Amsterdam > Brain & Cognition @ Department of Psychology > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Fri Jan 24 13:11:05 2014 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke.vanDijk at med.uni-duesseldorf.de) Date: Fri, 24 Jan 2014 12:11:05 +0000 Subject: [FieldTrip] ft_combineplanar on Neuromagdata In-Reply-To: <935899657.429750.1390557410212.JavaMail.root@bcbl.eu> References: <935899657.429750.1390557410212.JavaMail.root@bcbl.eu> Message-ID: <495873C58A622E45A3ABF4813B9451EC6E41986C@MAIL1-UKD.VMED.UKD> Dear Fred, First of all I think there is a typo, you refer to spectrum1 (in the isequal line), and but you use 'spectrum' as input in ft_combineplanar. My workflow is slightly different, but maybe that makes the difference...., in preprocessing I use (but I suppose you could also try that in freqanalysis) > cfg.channel = {'all', '-MEG***1'}; %with the goal to also only use the planar gradiometer data for further analysis (magnetometers end with a 1). p = label: {204x1 cell} Then after freqanalysis (which I also first do with the 204 channels), I use ft_combineplanar and I get the right result. I hope this somehow helps.. Best, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -----Ursprüngliche Nachricht----- Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Frédéric Roux Gesendet: Freitag, 24. Januar 2014 10:57 An: FieldTrip discussion list Betreff: [FieldTrip] ft_combineplanar on Neuromagdata Dear fieldtrip users, sorry to bother you with this really trivial question. I am running into an issue using ft_combineplanar on Neuromag data. The code I am using is as follows: cfg = []; cfg.channel = {'MEGGRAD'}; grad_data = ft_selectdata(meg_data); %after this step there are only planar-gradients left cfg = []; cfg.method = 'mtmfft'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.foi = 0:100; cfg.keeptrials = 'no'; spectrum1 = ft_freqanalysis(cfg,grad_data); % returns the FFT power spectrum cfg = []; spectrum2 = ft_combineplanar(cfg,spectrum); % this step should combine horizontal and vertical gradients into % one single gradient aka reduce the number of channels However, spectrum does not change. This can be seen by isequal(spectrum1.powspctrm,spectrum2.powspctrm) == 1 Also the number of channels (n = 204) is not reduced after ft_combineplanar when in fact there should only be n = 102 channels left. Is this related to the fact that ft_combineplanar is designed to take only time-frequency maps as input or am I doing something wrong here? Any advice would be highly appreciated. Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.cox at uva.nl Fri Jan 24 13:53:45 2014 From: r.cox at uva.nl (Roy Cox) Date: Fri, 24 Jan 2014 13:53:45 +0100 Subject: [FieldTrip] degrees of freedom In-Reply-To: <52e2233b.c5cc0e0a.2f09.665cSMTPIN_ADDED_BROKEN@mx.google.com> References: <52e2233b.c5cc0e0a.2f09.665cSMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: thanks Jim, looks like that should do the trick. Roy On Fri, Jan 24, 2014 at 9:14 AM, Herring, J.D. (Jim) < j.herring at fcdonders.ru.nl> wrote: > Hi Roy, > > > > Fieldtrip allows you to create and use your own functions to calculate > statistics. What you could also do is adjust the indepsamplesT statistic > function (fieldtrip/statfun/ft_statfun_indepsamplesT.m) to suite your needs > (E.g. change the Df in line 89). > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Roy Cox > *Sent:* donderdag 23 januari 2014 16:20 > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] degrees of freedom > > > > Hi all, > > I'm using ft_timelockstatistics with indepsamplesT to compare spatial > topographies between two groups (n=15 and n=13). The measure I'm interested > in has no time dimension, so I basically have one sample per electrode for > each subject. > > > > This works fine (I get the effects I hoped for). In order to make the > statistics 'slightly more valid', however, I need to adjust the degrees of > freedom. That is, the data I'm comparing between groups has already had a > covariate taken out. So df has to be df-1. > > Doesn't look like Fieldtrip allows you to set this in the cfg struct > somewhere, so any suggestions where I need to hack? > > Thanks, > > Roy > > > -- > > Roy Cox, M.Sc. | Brain & Cognition Group | Department of Psychology | > University of Amsterdam | Weesperplein 4 | 1018 XA Amsterdam | the > Netherlands | room 3.21 | phone: +31 20 525 6847 | email: r.cox at uva.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Roy Cox, M.Sc. | Brain & Cognition Group | Department of Psychology | University of Amsterdam | Weesperplein 4 | 1018 XA Amsterdam | the Netherlands | room 3.21 | phone: +31 20 525 6847 | email: r.cox at uva.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Fri Jan 24 14:09:35 2014 From: joramvandriel at gmail.com (Joram van Driel) Date: Fri, 24 Jan 2014 14:09:35 +0100 Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' In-Reply-To: References: <711157447.420800.1390553739013.JavaMail.root@indus.zimbra.ru.nl> Message-ID: Hi Jan-Mathijs, Thanks, that works. I also had to change line 643 into (copied from statistics_wrapper in FT version 20131031): fprintf('only selecting voxels inside the brain for statistics (%.1f%%)\n', 100*length(varargin{1}.inside)/prod(varargin{1}.dim)); This line also used the non-existing .pos field. Thanks again, Joram On Fri, Jan 24, 2014 at 12:40 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Joram, > > Probably this is my bad. > ft_sourceinterpolate intentionally removes the pos field, which has to do > with the representation of the data. FieldTrip either represents source > reconstructed data that can be defined on a regular 3D grid as a so-called > 'source-structure' (with a pos field), or as a so-called volume-structure > (without a pos field). After the sourceinterpolate step your data is > represented as the latter, lacking a pos field (intentionally), but > unintentionally causing a crash in ft_sourcestatistics. > A workaround for now would be for you to change line 228 in > statistics_wrapper into if isfield(varargin{1}, 'transform') || > (isfield(varargin{1}, 'dim') && > prod(varargin{1}.dim)==size(varargin{1}.pos,1)). > Could you try this out and let me know if that works? Then I can > incorporate it in FT. > > Best and sorry for the inconvenience, > JM > > > > On Jan 24, 2014, at 12:21 PM, Joram van Driel wrote: > > Sorry, this should have been: > This 'pos' field is removed in further steps (ft_sourceinterpolate). When > calling *ft_sourcestatistics* in version fieldtrip-20140109, the function > statistics_wrapper searches for this field (line 228) and can't find it. > > > On Fri, Jan 24, 2014 at 12:16 PM, Joram van Driel > wrote: > >> Hi Nietzsche, >> >> Thanks for the suggestion, but unfortunately that's not what's going >> wrong. My input data is a subject-by-condition array, so if I fill in >> sourcedat{:,1} and sourcedat{:,2}, that would be equivalent to having two >> separate variables and do source_condition1{:},source_condition2{:}. I >> tried that but I get the same error "??? Reference to non-existent field >> 'pos'." >> >> In fact, the error is I think a bug of the newest fieldtrip version, >> because when I tried an older version (fieldtrip-20131031), it works >> (although it later crashes on a design array issue, but that's something I >> have to figure out myself ;)). >> >> The 'pos' field is a field that is present in the output of >> ft_sourceanalysis; according to the help it's a N-by-3 matrix of the x-y-z >> position of all the sources, where N is the sum of the length of the >> 'inside' and 'outside' fields. >> This 'pos' field is removed in further steps (ft_sourceinterpolate). When >> calling ft_sourceanalysis in version fieldtrip-20140109, the function >> statistics_wrapper searches for this field (line 228) and can't find it. >> >> Chrs, >> >> - Joram >> >> >> >> On Fri, Jan 24, 2014 at 9:55 AM, Lam, Nietzsche wrote: >> >>> Hi Joram, >>> >>> I'm not entirely sure if this is the solution, but when you call >>> ft_sourcestatistics, you can try this: >>> >>> >>> >>> FieldTrip statistics functions understands that you want to use the data >>> from all subjects when you use {:}, so there's no need to call individual >>> columns with {:,X}. >>> >>> Best, >>> Nietzsche >>> >>> >>> >>> ----- Original Message ----- >>> > From: "Joram van Driel" >>> > To: "FieldTrip discussion list" >>> > Sent: Friday, 24 January, 2014 8:54:24 AM >>> > Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' >>> > Hi all, >>> > >>> > >>> > I'm getting stuck with ft_sourcestatistics. >>> > I want to do a simple two-condition contrast on neuromag MEG data, >>> > where I did frequency beamforming on a pre vs. post tf-window. >>> > >>> > >>> > I followed the instructions of the tutorial, so for each subject and >>> > condition: >>> > >>> > >>> > 1) ft_sourceanalysis with subject-specific vol and grid structures, >>> > where I did the pre vs post contrast as follows: >>> > >>> > >>> > >>> > sourceAll = ft_sourceanalysis(cfg, freqAll(condi)); >>> > >>> > cfg.grid.filter = sourceAll.avg.filter; >>> > sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) ); >>> > sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi)); >>> > >>> > >>> > >>> > sourceDiff(condi) = sourcePost_con; >>> > sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow - >>> > sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; >>> > >>> > >>> > 2) ft_sourceinterpolate with the subject-specific mri >>> > 3) ft_volumenormalize to MNI with coordsys 'neuromag'. >>> > 4) The output is stored in a subject-by-condition cell array, which I >>> > put into ft_sourcestatistics with the following cfg: >>> > >>> > >>> > >>> > cfg = []; >>> > cfg.parameter = 'avg.pow'; >>> > cfg.method = 'analytic'; >>> > cfg.statistic = 'depsamplesT'; >>> > cfg.correctm = 'no'; >>> > cfg.alpha = 0.05; >>> > >>> > >>> > Nsub = 10; >>> > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; >>> > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; >>> > cfg.tail = 0; % number, -1, 1 or 0 (default = 0) >>> > cfg.ivar = 1; % number or list with indices, independent variable(s) >>> > cfg.uvar = 2; % number or list with indices, unit variable(s) >>> > >>> > >>> > stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, >>> > sourceDiffNorm{:,2}); >>> > >>> > >>> > >>> > >>> > This results in the error that it cannot find the field 'pos'; however >>> > this field is only present in the result from ft_sourceanalysis (and >>> > differs for each subject), but disappears as soon as >>> > ft_sourceinterpolate is applied. I tried to put the result from >>> > ft_sourceanalysis straight into ft_sourcestatistics (which according >>> > to the help should be possible), but this doesn't recognize the input >>> > as volume data (and apart from that, the subjects aren't spatially >>> > aligned this way). >>> > >>> > >>> > I hope someone can help me with this; any help is much appreciated! >>> > >>> > >>> > Thanks, >>> > Joram >>> > >>> > >>> > -- >>> > >>> > Joram van Driel, MSc. >>> > PhD student @ University of Amsterdam >>> > Brain & Cognition @ Department of Psychology >>> > _______________________________________________ >>> > fieldtrip mailing list >>> > fieldtrip at donders.ru.nl >>> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> -- >>> Nietzsche H.L. Lam, MSc >>> PhD Candidate >>> >>> Max Planck Institute for Psycholinguistics >>> Wundtlaan 1, 6525 XD Nijmegen, The Netherlands >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Kapittelweg 29, 6525EN Nijmegen, The Netherlands >>> >>> n.lam at fcdonders.ru.nl >>> +31-24-3668219 >>> >>> >>> neurobiologyoflanguage.com >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Joram van Driel, MSc. >> PhD student @ University of Amsterdam >> Brain & Cognition @ Department of Psychology >> > > > > -- > Joram van Driel, MSc. > PhD student @ University of Amsterdam > Brain & Cognition @ Department of Psychology > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Joram van Driel, MSc. PhD student @ University of Amsterdam Brain & Cognition @ Department of Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.rombetto at cib.na.cnr.it Fri Jan 24 16:05:52 2014 From: s.rombetto at cib.na.cnr.it (s.rombetto at cib.na.cnr.it) Date: Fri, 24 Jan 2014 16:05:52 +0100 Subject: [FieldTrip] problem with ft_volumerealign and ft_convert_coordsys Message-ID: <20140124160552.wy6hoz6lcg888oo4@arco.cib.na.cnr.it> Dear Jan-Mathijs > I don't understand what you mean by 'no results appear on my > screen'. Does this mean that mri_realigned is not created? yes, I mean that I have no output at all. > You have to have spm on your path in order to get this. try > ft_hastoolbox('spm',1) and try again. you were right, this was a stupid mistake. I didn't install the spm toolbox. Now I have installed it and tried again. So I get a different erro message: ??? Error using ==> spm_platform>init_platform at 173 PCWIN64 not supported architecture for SPM Error in ==> spm_platform at 65 if isempty(PLATFORM), PLATFORM = init_platform; end Error in ==> spm_vol_minc at 80 if ~spm_platform('bigend') & datatype~=2 & datatype~=2+128, datatype = datatype*256; end; Error in ==> ft_read_mri at 132 hdr = spm_vol_minc(filename); Error in ==> align_ctf2spm at 137 mri2 = ft_read_mri(template); Error in ==> ft_convert_coordsys at 90 obj = align_ctf2spm(obj, opt); Do you know any solution for this problem? Moreover why the conversion from ctf to itab is not yet supported? May I perform this conversion by using 2 different conversion (like ctf to spm and from spm to itab?) Best regards Sara >> >> Error in ==> align_ctf2spm at 121 >> switch spm('ver') >> >> Error in ==> ft_convert_coordsys at 90 >> obj = align_ctf2spm(obj, opt); >> >> Finally I tried to use the function align_itab2spm in the following way >> mri = align_itab2spm(mri, 2) >> but I get the error message >> >> ??? Undefined function or method 'spm' for input arguments of type 'char'. >> >> Error in ==> align_itab2spm at 108 >> switch spm('ver') >> > > > See above. > > Best, > Jan-Mathijs > > >> Do you have any idea or suggestion to solve this problem? >> >> Thanks in advance for any advice, >> Sara >> >> ------------------------- >> Dott.ssa Sara Rombetto >> Istituto di Cibernetica >> "E. Caianiello" >> Via Campi Flegrei, 34 >> 80078 Pozzuoli (NA) >> Italy >> mob +39 3401689815 >> tel +39 0818675361 >> fax +39 0818675128 >> -------------------------- >> "I disapprove of what you say, but I will defend to the death your >> right to say >> it." [Evelyn Beatrice Hall, The Friends Of Voltaire] >> >> ---------------------------------------------------------------- >> This message was sent using IMP, the Internet Messaging Program. >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > ------------------------- Dott.ssa Sara Rombetto Istituto di Cibernetica "E. Caianiello" Via Campi Flegrei, 34 80078 Pozzuoli (NA) Italy mob +39 3401689815 tel +39 0818675361 fax +39 0818675128 -------------------------- "I disapprove of what you say, but I will defend to the death your right to say it." [Evelyn Beatrice Hall, The Friends Of Voltaire] ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From jkhartshorne at gmail.com Fri Jan 24 16:54:10 2014 From: jkhartshorne at gmail.com (Joshua Hartshorne) Date: Fri, 24 Jan 2014 10:54:10 -0500 Subject: [FieldTrip] interactions Message-ID: Hi List! I have seen around a dozen comments in the archives that interactions can't be tested by permutation for within-subject designs. I haven't been able to find a thread that explains why not. It seems like in a 2x2 design, you could still pick one of the conditions and permute the labels. I'm sure there's a proof somewhere for why this doesn't work, and it would be great to see it. Similarly, for the mixed design, why permute the between-subject labels? Why not permute the within-subject labels instead? Actually, why not do both? I follow the reasoning why permuting both is overkill, but not why it's wrong. If someone could explain, it would be much appreciated. Knowing what to do is good, but it would be even better to understand why. Thanks, Josh -------------- next part -------------- An HTML attachment was scrubbed... URL: From haristz at umn.edu Sat Jan 25 02:08:41 2014 From: haristz at umn.edu (Haris Tzagarakis) Date: Fri, 24 Jan 2014 19:08:41 -0600 Subject: [FieldTrip] 2-dipole beamformer Message-ID: <52E30E99.5070507@umn.edu> Hi There, I have been trying to implement a '2-dipole' DICS beamformer as in for example Schoffelen et al 2008 based on the literature and some postings on this list. This is not to use for coherence work but simply to take into account a strong source. In essence, I have been augmenting every element of my precomputed leadfield grid with the leadfield of a selected reference location that represents the strong source. Then, at the beamformer level I get a 6x6 csd matrix for every location in the grid and from that, I use the 3x3 diagonal martix that corresponds to the 'moving/non-reference' dipole for power estimation. This all seems to work except that the brain power maps I get show a preferential attenuation of the signal in the area of the strong source (now other sources are stronger) - and in fact the location selected for reference seems to be completely silent. I may be misinterpreting the technique here but I wasn't expecting that outcome - I thought that what would happen would be that my output map would be similar to the original although with lower power levels and that the 'extra' contribution of the strong source for every leadfield location would find itself in the second 3x3 diagonal (when I plot the power of that this seems to indeed be the case *but* the area of reference is again attenuated). I think I may have failed to interpret or implement something correctly here (most likely both!). Am I doing something wrong at the leadfield grid level (does the leadfield matrix of the location of reference require special treatment for example?) or should I be using the 6x6 csd matrix differently? - or maybe it could be something else? I would be grateful for comments from anyone who has tried this before. Best, Haris -- Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych Senior Research Associate University of Minnesota Dept of Neuroscience office: Brain Sciences Center Minneapolis VA Medical Center Tel:612-467-1363 From aestnth at hum.au.dk Sat Jan 25 02:14:46 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Sat, 25 Jan 2014 02:14:46 +0100 Subject: [FieldTrip] 2-dipole beamformer Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sun Jan 26 08:24:36 2014 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sun, 26 Jan 2014 11:24:36 +0400 Subject: [FieldTrip] interactions Message-ID: Hi Josh, Have you seen this [admittedly pretty old now] message from the archives: http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html ? My understanding was that it is ok to test interactions in within-subjects designs, and that you could do it by faking a dataset that represents the interaction (step 3 in that message) and then doing a dependent samples t-test. I had never heard before that interactions can't be tested in a within-subjects design, but also it's been a long time since I've looked at this issue--I'd definitely be interested to hear if this is no longer the recommended way to test interactions. I have seen messages saying that it doesn't work for between-subjects designs (e.g. http://mailman.science.ru.nl/pipermail/fieldtrip/2011-September/004244.html), but I'm not sure if that's still current. Hopefully someone on the list can offer more insight about the second question. Best, Steve > > Message: 2 > Date: Fri, 24 Jan 2014 10:54:10 -0500 > From: Joshua Hartshorne > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] interactions > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hi List! > > I have seen around a dozen comments in the archives that interactions can't > be tested by permutation for within-subject designs. I haven't been able to > find a thread that explains why not. It seems like in a 2x2 design, you > could still pick one of the conditions and permute the labels. I'm sure > there's a proof somewhere for why this doesn't work, and it would be great > to see it. > > Similarly, for the mixed design, why permute the between-subject labels? > Why not permute the within-subject labels instead? Actually, why not do > both? I follow the reasoning why permuting both is overkill, but not why > it's wrong. > > If someone could explain, it would be much appreciated. Knowing what to do > is good, but it would be even better to understand why. > > Thanks, > Josh > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > From aestnth at hum.au.dk Sun Jan 26 08:30:51 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Sun, 26 Jan 2014 08:30:51 +0100 Subject: [FieldTrip] interactions Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chaitanya.pro at gmail.com Sun Jan 26 08:46:24 2014 From: chaitanya.pro at gmail.com (Chaitanya Srinivas) Date: Sun, 26 Jan 2014 08:46:24 +0100 Subject: [FieldTrip] Urgent: Error in Source Statistics, Group level Message-ID: Dear fieldtrip users, I would like to do sourcestatistics on a group level with eeg data. I have a pre and post intervention measurement for each of my 10 subjects . After source reconstruction using an DICS beamformer and volume normalization, I calculated the sourcegrandaverage for the pre and post condition and i have avg.pow for each subject. However, when I use the grandaverage results in ft_sourcestatistics in the configuration shown below and plot the result I just get a blank anatomical mri. It only runs with cfg.parameter="pow" .I tried with cfg.parameter = 'avg.pow' it doesnt run. Do I have to set any additional parameters or am I making some mistake? cfg=[]; cfg.dim = grandAVGsourcePre.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; cfg.alpha = 0.05; cfg.tail = 0; nsubj=length(sourcePre.trial); cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg, grandAVGsourcePre, grandAVGsourcePost); *and next interpolation* cfg = []; cfg.voxelcoord = 'no'; cfg.parameter = 'mask'; cfg.interpmethod = 'nearest'; cfg.coordsys = 'mni'; mask = ft_sourceinterpolate(cfg,stat,mri); statplot.mask = mask.mask; *and then for plotting* cfg = []; cfg.method = 'slice'; cfg.funparameter = 'stat'; cfg.maskparameter = 'mask'; cfg.funcolorlim = [-0.1 0.1]; cfg.opacitylim = [-0.1 0.1]; figure ft_sourceplot(cfg, statplot); *===============================================* *[image: Inline image 1]* *Best Regards* *Chaitanya Srinivas Lanka Wiss. Mitarbeiter * *PhD StudentFunctional and Restorative Neurosurgery Neural Information ProcessingNeurosurgical University Hospital* * Graduate Training Center for Neuroscience Eberhard Karls University Eberhard Karls University **Otfried-Mueller-Str.45 Österbergstr. 3* * D-72076 Tuebingen **D-72074 Tuebingen* *Mobile Phone Number : +49-176-79035731* *===============================================* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 23195 bytes Desc: not available URL: From eelke.spaak at donders.ru.nl Sun Jan 26 08:53:50 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Sun, 26 Jan 2014 08:53:50 +0100 Subject: [FieldTrip] Urgent: Error in Source Statistics, Group level In-Reply-To: References: Message-ID: Dear Chaitanya, Perhaps an obvious question: do you find any significant differences in the statistics step (inspect the stat structure)? If not, the mask will consist of all zeroes, hence giving you a 'blank' plot. Best, Eelke On 26 January 2014 08:46, Chaitanya Srinivas wrote: > Dear fieldtrip users, > I would like to do sourcestatistics on a group level with eeg data. I have a > pre and post intervention measurement for each of my 10 subjects > . After source reconstruction using an DICS beamformer > and volume normalization, I calculated the sourcegrandaverage for the pre and > post condition and i have avg.pow for each subject. > > However, when I use the grandaverage results in ft_sourcestatistics in the > configuration shown below and plot the result I just get a blank anatomical > mri. It only runs with cfg.parameter="pow" .I tried with cfg.parameter = 'avg.pow' it doesnt run. > Do I have to set any additional parameters or am I making some mistake? > > > cfg=[]; > cfg.dim = grandAVGsourcePre.dim; > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.parameter = 'pow'; > cfg.correctm = 'cluster'; > cfg.numrandomization = 1000; > cfg.alpha = 0.05; > cfg.tail = 0; > > nsubj=length(sourcePre.trial); > cfg.design(1,:) = [1:nsubj 1:nsubj]; > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > cfg.uvar = 1; > cfg.ivar = 2; > stat = ft_sourcestatistics(cfg, grandAVGsourcePre, grandAVGsourcePost); > > > *and next interpolation* > cfg = []; > > cfg.voxelcoord = 'no'; > cfg.parameter = 'mask'; > cfg.interpmethod = 'nearest'; > cfg.coordsys = 'mni'; > > mask = ft_sourceinterpolate(cfg,stat,mri); > statplot.mask = mask.mask; > > > *and then for plotting* > > cfg = []; > cfg.method = 'slice'; > cfg.funparameter = 'stat'; > cfg.maskparameter = 'mask'; > cfg.funcolorlim = [-0.1 0.1]; > cfg.opacitylim = [-0.1 0.1]; > figure > ft_sourceplot(cfg, statplot); > > > > > > > > > > * ===============================================* > > > *[image: Inline image 1]* > *Best Regards* > > > *Chaitanya Srinivas Lanka Wiss. Mitarbeiter > * > > *PhD Student Functional and Restorative Neurosurgery Neural Information > ProcessingNeurosurgical University Hospital* > > * Graduate Training Center for Neuroscience Eberhard Karls > University Eberhard Karls University **Otfried-Mueller-Str.45 > Österbergstr. 3* > * D-72076 Tuebingen **D-72074 > Tuebingen* > > *Mobile Phone Number : +49-176-79035731* > *===============================================* > > _______________________________________________ > 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: image.png Type: image/png Size: 23195 bytes Desc: not available URL: From chaitanya.pro at gmail.com Sun Jan 26 09:06:28 2014 From: chaitanya.pro at gmail.com (Chaitanya Srinivas) Date: Sun, 26 Jan 2014 09:06:28 +0100 Subject: [FieldTrip] Urgent: Error in Source Statistics, Group level In-Reply-To: References: Message-ID: Hi Eelke, I looked at the stat.stat values if that is what you mean. There are some NaNs , but also some values. Similarly in stat.prob, there are some 1's. The stat.mask is all zeros as you say. Any further suggestions from you? Thank you *===============================================* *[image: Inline image 1]* *Best Regards* *Chaitanya Srinivas Lanka Wiss. Mitarbeiter * *PhD StudentFunctional and Restorative Neurosurgery Neural Information ProcessingNeurosurgical University Hospital* * Graduate Training Center for Neuroscience Eberhard Karls University Eberhard Karls University **Otfried-Mueller-Str.45 Österbergstr. 3* * D-72076 Tuebingen **D-72074 Tuebingen* *Mobile Phone Number : +49-176-79035731* *===============================================* On Sun, Jan 26, 2014 at 8:53 AM, Eelke Spaak wrote: > Dear Chaitanya, > > Perhaps an obvious question: do you find any significant differences in > the statistics step (inspect the stat structure)? If not, the mask will > consist of all zeroes, hence giving you a 'blank' plot. > > Best, > Eelke > > > On 26 January 2014 08:46, Chaitanya Srinivas wrote: > >> Dear fieldtrip users, >> I would like to do sourcestatistics on a group level with eeg data. I have a >> pre and post intervention measurement for each of my 10 subjects >> . After source reconstruction using an DICS beamformer >> and volume normalization, I calculated the sourcegrandaverage for the pre and >> post condition and i have avg.pow for each subject. >> >> However, when I use the grandaverage results in ft_sourcestatistics in the >> configuration shown below and plot the result I just get a blank anatomical >> mri. It only runs with cfg.parameter="pow" .I tried with cfg.parameter = 'avg.pow' it doesnt run. >> Do I have to set any additional parameters or am I making some mistake? >> >> >> cfg=[]; >> cfg.dim = grandAVGsourcePre.dim; >> cfg.method = 'montecarlo'; >> cfg.statistic = 'depsamplesT'; >> cfg.parameter = 'pow'; >> cfg.correctm = 'cluster'; >> cfg.numrandomization = 1000; >> cfg.alpha = 0.05; >> cfg.tail = 0; >> >> nsubj=length(sourcePre.trial); >> cfg.design(1,:) = [1:nsubj 1:nsubj]; >> cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >> cfg.uvar = 1; >> cfg.ivar = 2; >> stat = ft_sourcestatistics(cfg, grandAVGsourcePre, grandAVGsourcePost); >> >> >> *and next interpolation* >> cfg = []; >> >> >> cfg.voxelcoord = 'no'; >> cfg.parameter = 'mask'; >> cfg.interpmethod = 'nearest'; >> cfg.coordsys = 'mni'; >> >> >> mask = ft_sourceinterpolate(cfg,stat,mri); >> statplot.mask = mask.mask; >> >> >> *and then for plotting* >> >> >> cfg = []; >> cfg.method = 'slice'; >> cfg.funparameter = 'stat'; >> cfg.maskparameter = 'mask'; >> cfg.funcolorlim = [-0.1 0.1]; >> cfg.opacitylim = [-0.1 0.1]; >> figure >> ft_sourceplot(cfg, statplot); >> >> >> >> >> >> >> >> >> >> >> * ===============================================* >> >> >> *[image: Inline image 1]* >> *Best Regards* >> >> >> *Chaitanya Srinivas Lanka Wiss. Mitarbeiter >> * >> >> *PhD Student Functional and Restorative Neurosurgery Neural Information >> ProcessingNeurosurgical University Hospital* >> >> * Graduate Training Center for Neuroscience Eberhard Karls >> University Eberhard Karls University **Otfried-Mueller-Str.45 >> Österbergstr. 3* >> * D-72076 Tuebingen **D-72074 >> Tuebingen* >> >> *Mobile Phone Number : +49-176-79035731* >> *===============================================* >> >> _______________________________________________ >> 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: image.png Type: image/png Size: 23195 bytes Desc: not available URL: From eelke.spaak at donders.ru.nl Sun Jan 26 09:40:47 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Sun, 26 Jan 2014 09:40:47 +0100 Subject: [FieldTrip] Urgent: Error in Source Statistics, Group level In-Reply-To: References: Message-ID: Hi Chaitanya, stat.prob reflects the 'p-values' resulting from your statistical test. So voxels expressing e.g. stat.prob < 0.05 should be considered reflecting a significant difference between conditions. The NaNs correspond to voxels outside the brain. Since stat.mask is all zeros (which by default is just stat.prob < 0.05), this indicates there are no significant differences between your conditions. There is nothing we can help you with in this respect :) Best, Eelke On 26 January 2014 09:06, Chaitanya Srinivas wrote: > Hi Eelke, > > I looked at the stat.stat values if that is what you mean. There > are some NaNs , but also some values. Similarly in stat.prob, there are > some 1's. The stat.mask is all zeros as you say. > > Any further suggestions from you? > Thank you > > *=============================================== * > > > *[image: Inline image 1]* > *Best Regards* > > > *Chaitanya Srinivas Lanka Wiss. Mitarbeiter > * > > *PhD Student Functional and Restorative Neurosurgery Neural Information > ProcessingNeurosurgical University Hospital* > > * Graduate Training Center for Neuroscience Eberhard Karls > University Eberhard Karls University **Otfried-Mueller-Str.45 > Österbergstr. 3* > * D-72076 Tuebingen **D-72074 > Tuebingen* > > *Mobile Phone Number : +49-176-79035731* > *===============================================* > > > On Sun, Jan 26, 2014 at 8:53 AM, Eelke Spaak wrote: > >> Dear Chaitanya, >> >> Perhaps an obvious question: do you find any significant differences in >> the statistics step (inspect the stat structure)? If not, the mask will >> consist of all zeroes, hence giving you a 'blank' plot. >> >> Best, >> Eelke >> >> >> On 26 January 2014 08:46, Chaitanya Srinivas wrote: >> >>> Dear fieldtrip users, >>> I would like to do sourcestatistics on a group level with eeg data. I have a >>> pre and post intervention measurement for each of my 10 subjects >>> . After source reconstruction using an DICS beamformer >>> and volume normalization, I calculated the sourcegrandaverage for the pre and >>> post condition and i have avg.pow for each subject. >>> >>> However, when I use the grandaverage results in ft_sourcestatistics in the >>> configuration shown below and plot the result I just get a blank anatomical >>> mri. It only runs with cfg.parameter="pow" .I tried with cfg.parameter = 'avg.pow' it doesnt run. >>> Do I have to set any additional parameters or am I making some mistake? >>> >>> >>> cfg=[]; >>> cfg.dim = grandAVGsourcePre.dim; >>> cfg.method = 'montecarlo'; >>> cfg.statistic = 'depsamplesT'; >>> cfg.parameter = 'pow'; >>> cfg.correctm = 'cluster'; >>> cfg.numrandomization = 1000; >>> cfg.alpha = 0.05; >>> cfg.tail = 0; >>> >>> nsubj=length(sourcePre.trial); >>> cfg.design(1,:) = [1:nsubj 1:nsubj]; >>> cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >>> cfg.uvar = 1; >>> cfg.ivar = 2; >>> stat = ft_sourcestatistics(cfg, grandAVGsourcePre, grandAVGsourcePost); >>> >>> >>> *and next interpolation* >>> cfg = []; >>> >>> >>> >>> cfg.voxelcoord = 'no'; >>> cfg.parameter = 'mask'; >>> cfg.interpmethod = 'nearest'; >>> cfg.coordsys = 'mni'; >>> >>> >>> >>> mask = ft_sourceinterpolate(cfg,stat,mri); >>> statplot.mask = mask.mask; >>> >>> >>> *and then for plotting* >>> >>> >>> >>> cfg = []; >>> cfg.method = 'slice'; >>> cfg.funparameter = 'stat'; >>> cfg.maskparameter = 'mask'; >>> cfg.funcolorlim = [-0.1 0.1]; >>> cfg.opacitylim = [-0.1 0.1]; >>> figure >>> ft_sourceplot(cfg, statplot); >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> * ===============================================* >>> >>> >>> *[image: Inline image 1]* >>> *Best Regards* >>> >>> >>> *Chaitanya Srinivas Lanka Wiss. Mitarbeiter >>> * >>> >>> *PhD Student Functional and Restorative Neurosurgery Neural Information >>> ProcessingNeurosurgical University Hospital* >>> >>> * Graduate Training Center for Neuroscience Eberhard Karls >>> University Eberhard Karls University **Otfried-Mueller-Str.45 >>> Österbergstr. 3* >>> * D-72076 Tuebingen **D-72074 >>> Tuebingen* >>> >>> *Mobile Phone Number : +49-176-79035731* >>> *===============================================* >>> >>> _______________________________________________ >>> 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 23195 bytes Desc: not available URL: From chaitanya.pro at gmail.com Sun Jan 26 09:46:03 2014 From: chaitanya.pro at gmail.com (Chaitanya Srinivas) Date: Sun, 26 Jan 2014 09:46:03 +0100 Subject: [FieldTrip] Urgent: Error in Source Statistics, Group level In-Reply-To: References: Message-ID: Hi Eelke, No significant results then in my data. I wonder how my boss takes it :P. Anyway, thanks for your help on a Sunday that too. >From your reply I also understand that the code doesn't have any mistakes :) *===============================================* *[image: Inline image 1]* *Best Regards* *Chaitanya Srinivas Lanka Wiss. Mitarbeiter * *PhD StudentFunctional and Restorative Neurosurgery Neural Information ProcessingNeurosurgical University Hospital* * Graduate Training Center for Neuroscience Eberhard Karls University Eberhard Karls University **Otfried-Mueller-Str.45 Österbergstr. 3* * D-72076 Tuebingen **D-72074 Tuebingen* *Mobile Phone Number : +49-176-79035731* *===============================================* On Sun, Jan 26, 2014 at 9:40 AM, Eelke Spaak wrote: > Hi Chaitanya, > > stat.prob reflects the 'p-values' resulting from your statistical test. So > voxels expressing e.g. stat.prob < 0.05 should be considered reflecting a > significant difference between conditions. The NaNs correspond to voxels > outside the brain. > > Since stat.mask is all zeros (which by default is just stat.prob < 0.05), > this indicates there are no significant differences between your > conditions. There is nothing we can help you with in this respect :) > > Best, > Eelke > > > On 26 January 2014 09:06, Chaitanya Srinivas wrote: > >> Hi Eelke, >> >> I looked at the stat.stat values if that is what you mean. There >> are some NaNs , but also some values. Similarly in stat.prob, there are >> some 1's. The stat.mask is all zeros as you say. >> >> Any further suggestions from you? >> Thank you >> >> * =============================================== * >> >> >> *[image: Inline image 1]* >> *Best Regards* >> >> >> *Chaitanya Srinivas Lanka Wiss. Mitarbeiter >> * >> >> *PhD Student Functional and Restorative Neurosurgery Neural Information >> ProcessingNeurosurgical University Hospital* >> >> * Graduate Training Center for Neuroscience Eberhard Karls >> University Eberhard Karls University **Otfried-Mueller-Str.45 >> Österbergstr. 3* >> * D-72076 Tuebingen **D-72074 >> Tuebingen* >> >> *Mobile Phone Number : +49-176-79035731* >> *===============================================* >> >> >> On Sun, Jan 26, 2014 at 8:53 AM, Eelke Spaak wrote: >> >>> Dear Chaitanya, >>> >>> Perhaps an obvious question: do you find any significant differences in >>> the statistics step (inspect the stat structure)? If not, the mask will >>> consist of all zeroes, hence giving you a 'blank' plot. >>> >>> Best, >>> Eelke >>> >>> >>> On 26 January 2014 08:46, Chaitanya Srinivas wrote: >>> >>>> Dear fieldtrip users, >>>> I would like to do sourcestatistics on a group level with eeg data. I have a >>>> pre and post intervention measurement for each of my 10 subjects >>>> . After source reconstruction using an DICS beamformer >>>> and volume normalization, I calculated the sourcegrandaverage for the pre and >>>> post condition and i have avg.pow for each subject. >>>> >>>> However, when I use the grandaverage results in ft_sourcestatistics in the >>>> configuration shown below and plot the result I just get a blank anatomical >>>> mri. It only runs with cfg.parameter="pow" .I tried with cfg.parameter = 'avg.pow' it doesnt run. >>>> Do I have to set any additional parameters or am I making some mistake? >>>> >>>> >>>> cfg=[]; >>>> cfg.dim = grandAVGsourcePre.dim; >>>> cfg.method = 'montecarlo'; >>>> cfg.statistic = 'depsamplesT'; >>>> cfg.parameter = 'pow'; >>>> cfg.correctm = 'cluster'; >>>> cfg.numrandomization = 1000; >>>> cfg.alpha = 0.05; >>>> cfg.tail = 0; >>>> >>>> nsubj=length(sourcePre.trial); >>>> cfg.design(1,:) = [1:nsubj 1:nsubj]; >>>> cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >>>> cfg.uvar = 1; >>>> cfg.ivar = 2; >>>> stat = ft_sourcestatistics(cfg, grandAVGsourcePre, grandAVGsourcePost); >>>> >>>> >>>> *and next interpolation* >>>> cfg = []; >>>> >>>> >>>> >>>> >>>> cfg.voxelcoord = 'no'; >>>> cfg.parameter = 'mask'; >>>> cfg.interpmethod = 'nearest'; >>>> cfg.coordsys = 'mni'; >>>> >>>> >>>> >>>> >>>> mask = ft_sourceinterpolate(cfg,stat,mri); >>>> statplot.mask = mask.mask; >>>> >>>> >>>> *and then for plotting* >>>> >>>> >>>> >>>> >>>> cfg = []; >>>> cfg.method = 'slice'; >>>> cfg.funparameter = 'stat'; >>>> cfg.maskparameter = 'mask'; >>>> cfg.funcolorlim = [-0.1 0.1]; >>>> cfg.opacitylim = [-0.1 0.1]; >>>> figure >>>> ft_sourceplot(cfg, statplot); >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> * ===============================================* >>>> >>>> >>>> *[image: Inline image 1]* >>>> *Best Regards* >>>> >>>> >>>> *Chaitanya Srinivas Lanka Wiss. Mitarbeiter >>>> * >>>> >>>> *PhD Student Functional and Restorative Neurosurgery Neural Information >>>> ProcessingNeurosurgical University Hospital* >>>> >>>> * Graduate Training Center for Neuroscience Eberhard Karls >>>> University Eberhard Karls University **Otfried-Mueller-Str.45 >>>> Österbergstr. 3* >>>> * D-72076 Tuebingen **D-72074 >>>> Tuebingen* >>>> >>>> *Mobile Phone Number : +49-176-79035731* >>>> *===============================================* >>>> >>>> _______________________________________________ >>>> 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 23195 bytes Desc: not available URL: From e.maris at psych.ru.nl Sun Jan 26 10:08:35 2014 From: e.maris at psych.ru.nl (Eric Maris) Date: Sun, 26 Jan 2014 10:08:35 +0100 (CET) Subject: [FieldTrip] interactions In-Reply-To: References: Message-ID: <040701cf1a76$2fd5fd50$8f81f7f0$@maris@psych.ru.nl> Hi Steve and Josh, Josh writes > > labels. I'm sure there's a proof somewhere for why this doesn't work, > > and it would be great to see it. In general, questions like these are very hard to answer satisfactorily on a discussion list. It is dealt with much more easily in person, say at one of the Fieldtrip courses. However, let me give it a try. To prove that something does not work it suffices to produces a single example that shows the contrary. Try the following: Generate random data in a 2-by-2 between-subjects design (say, normally distributed within every cell). Add large main effects (relative to the within-cell variance; say, MS_beween 50 times larger than MS_within) and no interaction effect. Take a small number of subjects (say, 5 per cell). Now, calculate a permutation p-value for the interaction-effect F-statistic by permuting across all 4 cells. Do this for a large number of simulated data set. My prediction is that, on average, the F-statistic p-value is less than 0.05, which it should be (because there is no interaction effect). I have not run this simulation study myself. Let me know if it does not produce the predicted result. (I cannot guarantee that I'm not missing something when producing this recipe.) Best, Eric > -----Original Message----- > From: Stephen Politzer-Ahles [mailto:politzerahless at gmail.com] > Sent: zondag 26 januari 2014 8:25 > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] interactions > > Hi Josh, > > Have you seen this [admittedly pretty old now] message from the > archives: http://mailman.science.ru.nl/pipermail/fieldtrip/2011- > January/003447.html > ? My understanding was that it is ok to test interactions in within- > subjects designs, and that you could do it by faking a dataset that > represents the interaction (step 3 in that message) and then doing a > dependent samples t-test. I had never heard before that interactions > can't be tested in a within-subjects design, but also it's been a long > time since I've looked at this issue--I'd definitely be interested to > hear if this is no longer the recommended way to test interactions. I > have seen messages saying that it doesn't work for between-subjects > designs (e.g. > http://mailman.science.ru.nl/pipermail/fieldtrip/2011- > September/004244.html), > but I'm not sure if that's still current. Hopefully someone on the list > can offer more insight about the second question. > > Best, > Steve > > > > > Message: 2 > > Date: Fri, 24 Jan 2014 10:54:10 -0500 > > From: Joshua Hartshorne > > To: fieldtrip at science.ru.nl > > Subject: [FieldTrip] interactions > > Message-ID: > > > > > > Content-Type: text/plain; charset="iso-8859-1" > > > > Hi List! > > > > I have seen around a dozen comments in the archives that interactions > > can't be tested by permutation for within-subject designs. I haven't > > been able to find a thread that explains why not. It seems like in a > > 2x2 design, you could still pick one of the conditions and permute > the > > labels. I'm sure there's a proof somewhere for why this doesn't work, > > and it would be great to see it. > > > > Similarly, for the mixed design, why permute the between-subject > labels? > > Why not permute the within-subject labels instead? Actually, why not > > do both? I follow the reasoning why permuting both is overkill, but > > not why it's wrong. > > > > If someone could explain, it would be much appreciated. Knowing what > > to do is good, but it would be even better to understand why. > > > > Thanks, > > Josh > > -------------- next part -------------- An HTML attachment was > > scrubbed... > > URL: > > > b885cb4a/attachment-0001.html> > > From ayobimpe2004 at hotmail.com Sun Jan 26 10:43:58 2014 From: ayobimpe2004 at hotmail.com (Azeez Adebimpe) Date: Sun, 26 Jan 2014 10:43:58 +0100 Subject: [FieldTrip] Urgent: Error in Source Statistics, Group level In-Reply-To: References: , , , , Message-ID: Hi Chaitanya , I would suggest you try analyitcs instead of montecarlo and use stat= ft_sourcestatitics(cfg, source1a, source2a .................., source1b,source2b.............);a and b are for the conditions. Azeez Adebimpe Date: Sun, 26 Jan 2014 09:46:03 +0100 From: chaitanya.pro at gmail.com To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Urgent: Error in Source Statistics, Group level Hi Eelke, No significant results then in my data. I wonder how my boss takes it :P. Anyway, thanks for your help on a Sunday that too. >From your reply I also understand that the code doesn't have any mistakes :) =============================================== Best RegardsChaitanya Srinivas Lanka Wiss. Mitarbeiter PhD Student Functional and Restorative Neurosurgery Neural Information Processing Neurosurgical University Hospital Graduate Training Center for Neuroscience Eberhard Karls University Eberhard Karls University Otfried-Mueller-Str.45 Österbergstr. 3 D-72076 Tuebingen D-72074 Tuebingen Mobile Phone Number : +49-176-79035731 =============================================== On Sun, Jan 26, 2014 at 9:40 AM, Eelke Spaak wrote: Hi Chaitanya, stat.prob reflects the 'p-values' resulting from your statistical test. So voxels expressing e.g. stat.prob < 0.05 should be considered reflecting a significant difference between conditions. The NaNs correspond to voxels outside the brain. Since stat.mask is all zeros (which by default is just stat.prob < 0.05), this indicates there are no significant differences between your conditions. There is nothing we can help you with in this respect :) Best,Eelke On 26 January 2014 09:06, Chaitanya Srinivas wrote: Hi Eelke, I looked at the stat.stat values if that is what you mean. There are some NaNs , but also some values. Similarly in stat.prob, there are some 1's. The stat.mask is all zeros as you say. Any further suggestions from you? Thank you =============================================== Best RegardsChaitanya Srinivas Lanka Wiss. Mitarbeiter PhD Student Functional and Restorative Neurosurgery Neural Information Processing Neurosurgical University Hospital Graduate Training Center for Neuroscience Eberhard Karls University Eberhard Karls University Otfried-Mueller-Str.45 Österbergstr. 3 D-72076 Tuebingen D-72074 Tuebingen Mobile Phone Number : +49-176-79035731 =============================================== On Sun, Jan 26, 2014 at 8:53 AM, Eelke Spaak wrote: Dear Chaitanya, Perhaps an obvious question: do you find any significant differences in the statistics step (inspect the stat structure)? If not, the mask will consist of all zeroes, hence giving you a 'blank' plot. Best,Eelke On 26 January 2014 08:46, Chaitanya Srinivas wrote: Dear fieldtrip users, I would like to do sourcestatistics on a group level with eeg data. I have a pre and post intervention measurement for each of my 10 subjects . After source reconstruction using an DICS beamformer and volume normalization, I calculated the sourcegrandaverage for the pre and post condition and i have avg.pow for each subject. However, when I use the grandaverage results in ft_sourcestatistics in the configuration shown below and plot the result I just get a blank anatomical mri. It only runs with cfg.parameter="pow" .I tried with cfg.parameter = 'avg.pow' it doesnt run. Do I have to set any additional parameters or am I making some mistake? cfg=[]; cfg.dim = grandAVGsourcePre.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; cfg.alpha = 0.05; cfg.tail = 0; nsubj=length(sourcePre.trial); cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg, grandAVGsourcePre, grandAVGsourcePost); and next interpolation cfg = []; cfg.voxelcoord = 'no'; cfg.parameter = 'mask'; cfg.interpmethod = 'nearest'; cfg.coordsys = 'mni'; mask = ft_sourceinterpolate(cfg,stat,mri); statplot.mask = mask.mask; and then for plotting cfg = []; cfg.method = 'slice'; cfg.funparameter = 'stat'; cfg.maskparameter = 'mask'; cfg.funcolorlim = [-0.1 0.1]; cfg.opacitylim = [-0.1 0.1]; figure ft_sourceplot(cfg, statplot); =============================================== Best RegardsChaitanya Srinivas Lanka Wiss. Mitarbeiter PhD Student Functional and Restorative Neurosurgery Neural Information Processing Neurosurgical University Hospital Graduate Training Center for Neuroscience Eberhard Karls University Eberhard Karls University Otfried-Mueller-Str.45 Österbergstr. 3 D-72076 Tuebingen D-72074 Tuebingen Mobile Phone Number : +49-176-79035731 =============================================== _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 23195 bytes Desc: not available URL: From tessa.van-leeuwen at brain.mpg.de Mon Jan 27 16:31:23 2014 From: tessa.van-leeuwen at brain.mpg.de (van Leeuwen, Tessa) Date: Mon, 27 Jan 2014 15:31:23 +0000 Subject: [FieldTrip] 'Synaesthesia in Perspective' symposium programme update: registration still open Message-ID: <87CB345598E7E64D82323FFCA3C8126330439AFA@UM-EXCDAG-A01.um.gwdg.de> Dear all, The programme of our symposium ' Synaesthesia in Perspective' has been finalized and the on line version now lists presentation titles: http://www.multisense.org/index.php/symposium-2014. Registration is still possible via the website. Taking place in Hamburg, Germany on February 28th and March 1st, 2014, the 2-day symposium includes presentations from highly renowned speakers on the topics of synaesthesia and multisensory processing. Besides contributions from invited speakers, the symposium includes posters sessions during which participants are invited to present their studies. Registration through the website is free but mandatory. Registration is still open for those who have not yet registered. Please register as soon as possible! Topic outline: Synaesthesia is a fascinating phenomenon in which different senses are mixed. For synaesthetes, specific sensory stimuli automatically trigger additional perceptual experiences. Studying synaesthesia is interesting by itself; the aim of the symposium, however, is to put synaesthesia in perspective by also emphasizing the relationships of synaesthesia with other fields of study, such as multisensory processing, sensory substitution, development of sensory processing, and connectivity in sensory systems. Confirmed speakers: Peter König, Andreas Engel, Brigitte Röder, Christopher Sinke, Jianwei Zhang, Amir Amedi, Anil Seth, Charles Spence, Christoph Kayser, Danko Nikolic, Devin Blair Terhune, Jamie Ward, Julia Simner, Fiona Newell, Micah Murray, Nicolas Rothen, Olympia Colizoli, Petra Stoerig, David Brang, Romke Rouw, Mark Wallace, Tessa M. van Leeuwen, Virginie van Wassenhove, Toemme Noesselt, Uta Noppeney, and Alexandra Kirschner For more information, please visit our website (http://www.multisense.org/index.php/symposium-2014) or send an email to the organizers at symposium2014 at multisense.org. We would be very happy to welcome you in Hamburg! Best regards, The Organizing Committee (Tessa M. van Leeuwen, Sina A. Trautmann-Lengsfeld, Peter König, Jianwei Zhang, Andreas K. Engel) -- Tessa van Leeuwen, PhD postdoctoral researcher Department of Neurophysiology Max Planck Institute for Brain Research Deutschordenstr. 46 60528 Frankfurt am Main Germany tessa.van-leeuwen at brain.mpg.de T: +49 (0)69 96769 240 www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Mon Jan 27 16:36:59 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Mon, 27 Jan 2014 16:36:59 +0100 Subject: [FieldTrip] 'Synaesthesia in Perspective' symposium programme update: registr Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gopalar.ccf at gmail.com Mon Jan 27 18:45:48 2014 From: gopalar.ccf at gmail.com (Raghavan Gopalakrishnan) Date: Mon, 27 Jan 2014 12:45:48 -0500 Subject: [FieldTrip] bootstrap Message-ID: Dear all, I have a statistical question. In an experiment, I have 2 conditions. We deliberately collected lesser trials in one condition than another. Cond1 has 96 trials and Cond2 has 144 trials, basically in 40:60 ratio rather than 50:50. In order to avoid any sample bias, do I need to bootstrap the Cond1 so it equals Cond2? If so, Is there a way to do it in FT? Any suggestion would be of great help. Thanks, Raghavan -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Tue Jan 28 10:19:52 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Tue, 28 Jan 2014 10:19:52 +0100 (CET) Subject: [FieldTrip] ft_combineplanar on Neuromagdata In-Reply-To: <495873C58A622E45A3ABF4813B9451EC6E41986C@MAIL1-UKD.VMED.UKD> Message-ID: <1917402501.460159.1390900792946.JavaMail.root@bcbl.eu> Dear Hanneke, the reason why ft_combineplanar didn't return 102 channels in my case was that I had excluded faulty channels during ft_preprocessing. After repairing these channels, ft_combineplanar returned 102 instead of 204 channels. Thanks for your help. Fred ----- Original Message ----- From: "Hanneke vanDijk" To: fieldtrip at science.ru.nl Sent: Friday, January 24, 2014 1:11:05 PM Subject: Re: [FieldTrip] ft_combineplanar on Neuromagdata Dear Fred, First of all I think there is a typo, you refer to spectrum1 (in the isequal line), and but you use 'spectrum' as input in ft_combineplanar. My workflow is slightly different, but maybe that makes the difference...., in preprocessing I use (but I suppose you could also try that in freqanalysis) > cfg.channel = {'all', '-MEG***1'}; %with the goal to also only use the planar gradiometer data for further analysis (magnetometers end with a 1). p = label: {204x1 cell} Then after freqanalysis (which I also first do with the 204 channels), I use ft_combineplanar and I get the right result. I hope this somehow helps.. Best, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -----Ursprüngliche Nachricht----- Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Frédéric Roux Gesendet: Freitag, 24. Januar 2014 10:57 An: FieldTrip discussion list Betreff: [FieldTrip] ft_combineplanar on Neuromagdata Dear fieldtrip users, sorry to bother you with this really trivial question. I am running into an issue using ft_combineplanar on Neuromag data. The code I am using is as follows: cfg = []; cfg.channel = {'MEGGRAD'}; grad_data = ft_selectdata(meg_data); %after this step there are only planar-gradients left cfg = []; cfg.method = 'mtmfft'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.foi = 0:100; cfg.keeptrials = 'no'; spectrum1 = ft_freqanalysis(cfg,grad_data); % returns the FFT power spectrum cfg = []; spectrum2 = ft_combineplanar(cfg,spectrum); % this step should combine horizontal and vertical gradients into % one single gradient aka reduce the number of channels However, spectrum does not change. This can be seen by isequal(spectrum1.powspctrm,spectrum2.powspctrm) == 1 Also the number of channels (n = 204) is not reduced after ft_combineplanar when in fact there should only be n = 102 channels left. Is this related to the fact that ft_combineplanar is designed to take only time-frequency maps as input or am I doing something wrong here? Any advice would be highly appreciated. Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From f.roux at bcbl.eu Tue Jan 28 15:42:57 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Tue, 28 Jan 2014 15:42:57 +0100 (CET) Subject: [FieldTrip] Post-Doctoral Position available in Glasgow Message-ID: <394484066.466637.1390920177229.JavaMail.root@bcbl.eu> On behalf of Peter Uhlhaas: Dear colleagues, I would like to alert you to a post-doctoral position for MEG-research at the Centre for Cognitive Neuroimaging (CCNi) at the University of Glasgow (Grade 6/7: £26,527 - £29,837 / £32,590 - £36,661 per annum). The post-doctoral fellow will contribute to a project, funded by the Medical Research Council (MRC), entitled “Using Magnetoencephalography to Investigate Aberrant Neural Synchrony in Prodromal Schizophrenia”. Specifically, the job requires the analysis and acquisition of MEG-data sets and implementation of novel analytic tools, contributing to the design and programming of MEG experiments, assisting in analysing the results, and participating in the writing up of the results. This post is initially funded for 2 years with a possible extension of 1 year. Approximate starting data: 1st of July 2014 For further information please contact Dr Peter Uhlhaas (peter.uhlhaas at glasgow.ac.uk) Please submit your applications online at: www.gla.ac.uk/jobs Closing date: 23 February 2014 Dr. Peter J. Uhlhaas Reader Institute for Neuroscience and Psychology University of Glasgow 58 Hillhead Street Glasgow G12 8QB Telephone +44 (0)141 330 8730 From hweeling.lee at gmail.com Wed Jan 29 14:57:58 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 29 Jan 2014 14:57:58 +0100 Subject: [FieldTrip] Problem with ICA using data exported via Brainvision analyser Message-ID: Dear all, Whenever I export my EEG data using Brainvision analyser, I get problems with running ICA on Fieldtrip. The data has a different rank, although I specify to compute ICA using all channels. However, when I use the raw EEG data collected from Brainvision recorder, I do not get this problem. Does anyone know why and how to resolve this issue? My purpose of using Brainvision analyser is to downsample the EEG raw data before further analyses. Thanks. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Wed Jan 29 15:31:55 2014 From: mcantor at umich.edu (Max Cantor) Date: Wed, 29 Jan 2014 09:31:55 -0500 Subject: [FieldTrip] Problem with ICA using data exported via Brainvision analyser In-Reply-To: References: Message-ID: Hi Hwee, It may be your reference channel. Try removing your reference channel from ICA and it should resolve the rank issue. Max Cantor Research Assistant Computational Neurolinguistics Lab University of Michigan On Wed, Jan 29, 2014 at 8:57 AM, Hwee Ling Lee wrote: > Dear all, > > Whenever I export my EEG data using Brainvision analyser, I get problems > with running ICA on Fieldtrip. The data has a different rank, although I > specify to compute ICA using all channels. > > However, when I use the raw EEG data collected from Brainvision recorder, > I do not get this problem. > > Does anyone know why and how to resolve this issue? > > My purpose of using Brainvision analyser is to downsample the EEG raw data > before further analyses. > > Thanks. > > Best regards, > Hweeling > > > _______________________________________________ > 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 normanbenbrahim at gmail.com Wed Jan 29 16:21:52 2014 From: normanbenbrahim at gmail.com (Norman Benbrahim) Date: Wed, 29 Jan 2014 10:21:52 -0500 Subject: [FieldTrip] Problems loading in m BrainVision files Message-ID: Hi guys, I'm having trouble loading my files in via ft_preprocessing. I've ensured that the function actually works on my matlab by running it on sample data found here: http://fieldtrip.fcdonders.nl/tutorial/continuous and everything works just fine. I do always get the warning that FT misbehaves with matlab version >= 2013a though, so I'm not sure if that might have an impact on my trial. I'm running 2013b on a Red Hat Linux Server. I've attached the data to this email. -Norman scan1.zip -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Thu Jan 30 10:35:04 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 30 Jan 2014 10:35:04 +0100 (CET) Subject: [FieldTrip] Problems loading in m BrainVision files In-Reply-To: References: Message-ID: <002f01cf1d9e$8e293fe0$aa7bbfa0$@herring@fcdonders.ru.nl> Dear Norman, I've reproduced the problem and have posted it as a bug on bugzilla (http://bugzilla.fcdonders.nl/show_bug.cgi?id=2462). You can follow progress on solving the issue on this website. There seems to be a problem with estimating the number of samples in the dataset. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Norman Benbrahim Sent: woensdag 29 januari 2014 16:22 To: FieldTrip discussion list Subject: [FieldTrip] Problems loading in m BrainVision files Hi guys, I'm having trouble loading my files in via ft_preprocessing. I've ensured that the function actually works on my matlab by running it on sample data found here: http://fieldtrip.fcdonders.nl/tutorial/continuous and everything works just fine. I do always get the warning that FT misbehaves with matlab version >= 2013a though, so I'm not sure if that might have an impact on my trial. I'm running 2013b on a Red Hat Linux Server. I've attached the data to this email. -Norman Image removed by sender. scan1.zip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ~WRD000.jpg Type: image/jpeg Size: 823 bytes Desc: not available URL: From victorias at dsv.su.se Thu Jan 30 11:33:08 2014 From: victorias at dsv.su.se (=?UTF-8?Q?Victoria_Schr=C3=B6der?=) Date: Thu, 30 Jan 2014 11:33:08 +0100 Subject: [FieldTrip] freqanalysis Message-ID: <4cf9dcb0c4ce6d9726b56a7ee78e1653@dsv.su.se> Hello I am currently working on a freqanalysis as a first step to do a connectivityanalysis. I am a bit unsure about the method to use for the freqanalysis. My stimuli are very long: between 29 and 30 sec. In total i have 4 stimuli per condition and 2 seperate conditions. I am looking at the beta range so fairly low frequencies. this is my code: Am i using the right taper and method. Should i smooth the data? and if so, what should such a smoothing parameter depend on? %fourier analysis cfg=[]; cfg.output='fourier'; cfg.method='mtmfft'; cfg.foi=[12:30]; cfg.taper='hanning'; cfg.keeptrials='yes'; cfg.channel={'C15' 'C10' 'B23' 'B3'}; frefourier=ft_freqanalysis(cfg,data_clean); %coherence analysis cfg=[]; cfg.method='coh'; cfg.channelcmb={'B3' 'C15' 'B3' 'C10' 'B23' 'C15' 'B23' 'C10'} coherence=ft_connectivityanalysis(cfg, frefourier); Thank you very much for the suggestions! Best Victoria From hweeling.lee at gmail.com Thu Jan 30 11:58:08 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 30 Jan 2014 11:58:08 +0100 Subject: [FieldTrip] Problem with ICA using data exported via Brainvision analyser In-Reply-To: References: Message-ID: Hi Max, Thanks for your suggestion. However, I checked the data, there was no data from the reference channel, so I doubt this is the problem for the rank issue. Cheers, Hweeling On 29 January 2014 15:31, Max Cantor wrote: > Hi Hwee, > > It may be your reference channel. Try removing your reference channel from > ICA and it should resolve the rank issue. > > Max Cantor > Research Assistant > Computational Neurolinguistics Lab > University of Michigan > > > On Wed, Jan 29, 2014 at 8:57 AM, Hwee Ling Lee wrote: > >> Dear all, >> >> Whenever I export my EEG data using Brainvision analyser, I get problems >> with running ICA on Fieldtrip. The data has a different rank, although I >> specify to compute ICA using all channels. >> >> However, when I use the raw EEG data collected from Brainvision recorder, >> I do not get this problem. >> >> Does anyone know why and how to resolve this issue? >> >> My purpose of using Brainvision analyser is to downsample the EEG raw >> data before further analyses. >> >> Thanks. >> >> Best regards, >> Hweeling >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Thu Jan 30 16:22:47 2014 From: mcantor at umich.edu (Max Cantor) Date: Thu, 30 Jan 2014 10:22:47 -0500 Subject: [FieldTrip] Fwd: Problem with ICA using data exported via Brainvision analyser In-Reply-To: References: Message-ID: I just realized I accidentally forgot to do reply all and the subsequent responses weren't posted on the mailing list, so I'm forwarding it back on for anyone else who was following. Sorry! ---------- Forwarded message ---------- From: Max Cantor Date: Thu, Jan 30, 2014 at 9:24 AM Subject: Re: [FieldTrip] Problem with ICA using data exported via Brainvision analyser To: Hwee Ling Lee I'm not sure I understand what you mean by not being able to find the data that corresponds to the reference channel. For your call to ft_componentanalysis, for cfg.channel, if you set it to {'all', '-refchan'}, where refchan stands for whatever your reference channel is called, that should remove the reference channel from ICA. If you're issue is what I think it is, this tutorial should reiterate what I'm talking about: http://fieldtrip.fcdonders.nl/faq/why_does_my_ica_output_contain_complex_numbers Sorry if I'm misunderstanding the problem you're having, but hopefully this clarifies things. On Thu, Jan 30, 2014 at 8:35 AM, Hwee Ling Lee wrote: > Dear Max, > Thanks for taking your time to explain this. I would like to try your > suggestion, but the problem is that i don't know which channel i should > remove from my data since i can't find the data that corresponds to the > reference channel. > The funny thing for me at least is that this problem does not occur when i > use the raw data that has not been exported by brainvision analyser. I'll > try to look at the archives regarding this. > Thanks again. > Cheers, > Hweeling > On 30 Jan 2014 13:54, "Max Cantor" wrote: > >> Hm, did you try it? I had a similar issue awhile back and that solved it >> for me. Let me see if I can explain this correctly: I think the fact that >> there is no data from the reference channel is exactly the problem. ICA is >> performing a transform on the data, 'rotating' the data from channel space >> to component space, based on rank. If there is no data in any of the >> channels, you're asking ICA to transform the data into more components than >> effectively there are channels; in other words the dimensions in the >> 'rotation' of the data (if you think of the transform like a geometric >> rotation) are off. Hopefully that explanation makes sense, or somebody else >> can explain it more adequately. I think somewhere in the archives there was >> a long thread about ICA where I and a few other people ask about this >> issue, so that may help as well. >> >> >> On Thu, Jan 30, 2014 at 5:58 AM, Hwee Ling Lee wrote: >> >>> Hi Max, >>> >>> Thanks for your suggestion. However, I checked the data, there was no >>> data from the reference channel, so I doubt this is the problem for the >>> rank issue. >>> >>> Cheers, >>> Hweeling >>> >>> >>> >>> On 29 January 2014 15:31, Max Cantor wrote: >>> >>>> Hi Hwee, >>>> >>>> It may be your reference channel. Try removing your reference channel >>>> from ICA and it should resolve the rank issue. >>>> >>>> Max Cantor >>>> Research Assistant >>>> Computational Neurolinguistics Lab >>>> University of Michigan >>>> >>>> >>>> On Wed, Jan 29, 2014 at 8:57 AM, Hwee Ling Lee wrote: >>>> >>>>> Dear all, >>>>> >>>>> Whenever I export my EEG data using Brainvision analyser, I get >>>>> problems with running ICA on Fieldtrip. The data has a different rank, >>>>> although I specify to compute ICA using all channels. >>>>> >>>>> However, when I use the raw EEG data collected from Brainvision >>>>> recorder, I do not get this problem. >>>>> >>>>> Does anyone know why and how to resolve this issue? >>>>> >>>>> My purpose of using Brainvision analyser is to downsample the EEG raw >>>>> data before further analyses. >>>>> >>>>> Thanks. >>>>> >>>>> Best regards, >>>>> Hweeling >>>>> >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>> >>>> >>> >>> >>> -- >>> ================================================= >>> Dr. rer. nat. Lee, Hwee Ling >>> Postdoc >>> German Center for Neurodegenerative Diseases (DZNE) Bonn >>> >>> Email 1: hwee-ling.leedzne.de >>> Email 2: hweeling.leegmail.com >>> >>> https://sites.google.com/site/hweelinglee/home >>> >>> Correspondence Address: >>> Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany >>> ================================================= >>> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From normanbenbrahim at gmail.com Thu Jan 30 16:33:42 2014 From: normanbenbrahim at gmail.com (Norman Benbrahim) Date: Thu, 30 Jan 2014 10:33:42 -0500 Subject: [FieldTrip] Problems loading in m BrainVision files In-Reply-To: <52ea1cee.85570e0a.4256.ffffaaa0SMTPIN_ADDED_BROKEN@mx.google.com> References: <52ea1cee.85570e0a.4256.ffffaaa0SMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: Thanks Jim I really appreciate you taking the time to look at my data, I will follow the bugzilla page On Thursday, January 30, 2014, Herring, J.D. (Jim) < j.herring at fcdonders.ru.nl> wrote: > Dear Norman, > > > > I've reproduced the problem and have posted it as a bug on bugzilla ( > http://bugzilla.fcdonders.nl/show_bug.cgi?id=2462). You can follow > progress on solving the issue on this website. > > > > There seems to be a problem with estimating the number of samples in the > dataset. > > > > Best, > > > > Jim > > > > > > > > *From:* fieldtrip-bounces at science.ru.nl[mailto: > fieldtrip-bounces at science.ru.nl] > *On Behalf Of *Norman Benbrahim > *Sent:* woensdag 29 januari 2014 16:22 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] Problems loading in m BrainVision files > > > > Hi guys, > > I'm having trouble loading my files in via ft_preprocessing. I've ensured > that the function actually works on my matlab by running it on sample data > found here: http://fieldtrip.fcdonders.nl/tutorial/continuous > > and everything works just fine. I do always get the warning that FT > misbehaves with matlab version >= 2013a though, so I'm not sure if that > might have an impact on my trial. I'm running 2013b on a Red Hat Linux > Server. I've attached the data to this email. > > > > -Norman > > > > > > *[image: Image removed by sender.] scan1.zip > * > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ~WRD000.jpg Type: image/jpeg Size: 823 bytes Desc: not available URL: From instanton at gmail.com Thu Jan 30 19:38:20 2014 From: instanton at gmail.com (woun zoo) Date: Thu, 30 Jan 2014 10:38:20 -0800 Subject: [FieldTrip] Any insight about Transfer Entropy? Message-ID: How are you? I'd like to get some insight from you for transfer entropy analysis of my ECoG data before I run all possible parameters. I know this message doesn't exactly fit in fieldtrip email list cause question is not exactly about fieldtrip. But there are a few connectivity methods in fieldtrip. So I'd like to get my questions to reach some of experts in this causality analysis field. Besides, I don't know if there is nonlinear time series analysis discussion list out there or not. I'd like to establish some connectivity (functional or effective) between frontal and visual channels in ECoG recording. However, in our data, there is a very strong driven component, namely, steady state visually evoked potentials. SSVEPs in our data appear at several frequencies that are harmonics of the input frequencies and their sum and difference frequencies So our data has a completely deterministic (SSVEPs) dynamics and the rest of background activities. Data has 20 trials in total. Each trial lasts 2.4sec. Sampling rate is 1200hz. Raw data were bandpass filtered from 0.1Hz to 500hz. In order to find an effective connectivity, I chose to use TRENTOOL box that can be incorporated with fieldtrip. I chose Ragwitz method to determine delay time and embedding dimension. This is where I'd like to get some good insight for choosing parameters. I attached a script that I'm using now. I wrote my questions in blue text down below. I really wish to get some good insight from you because I don't know if my input parameters are garbage or not. cfgTEP.toi = [min(data.time{1,1}) max(data.time{1,1})] --> Basically from trial start to trial end. cfgTEP.predicttimemin_u= 10; cfgTEP.predicttimemax_u= 240; --> For these prediction horizon values, I don't know where and how these min and max were used in TEragwitz.m calculation in TEprepare.m. Transfer Entropy calculation method (VW_ds) fixed 1 as a prediction horizon. I can't find where this min or max of predicttime goes inside TEragwitz calculation. VW_ds seems to try to predict one time sample point ahead from the current time sample point. Is this proper to determine embedding dimension and delay time for SSVEP + background activities? cfgTEP.actthrvalue = 100; --> I don't know the reason why this autocorrelation time value needs to be set by hand. I know with this threshold value, you can selectively choose trials. In my data, particular channels' autocorrelation values were 54 (sample points), etc. Max autocorrelation was 134 or something. Is this due to noise? If I have strong oscillatory activities at the driving frequencies, am I not supposed to see autocorrelation values close to oscillatory period? cfgTEP.maxlag = 1000; --> What will be a good lag number? Isn't it better to use whole trial length? cfgTEP.minnrtrials = 7; --> What is a good number for this when there are 20 trials? For main parameters for TEragwitz, cfgTEP.optimizemethod ='ragwitz'; cfgTEP.ragdim = 1:10; --> I just chose all possible embedding dimension from 1 to 10. Should I try go more than 10? But TE analysis always says, embedding dimension maybe 2, which sounds about right for pure sine waves like my SSVEP. But with 0.1Hz~500hz bandpass, I have tons of non-stimulus locked high background activities. I'd like to know if 2 is really good estimation or not for my data. Also when I chose Cao's method, it says, 5 or 6. cfgTEP.ragtaurange = [0.1 2]; --> For delay time as an initial guess, I chose this range. But Ragwitz always chose the smallest value. If I put this range from [1 2], then it chooses 1. If it was [0.5 3], it chose 0.5. Whatever minimum value I put will be chosen as its delay time, which makes me wonder about what kind of values I should put here. cfgTEP.ragtausteps = 15; % steps for ragwitz tau steps 15 cfgTEP.repPred = 600; --> I just chose this. Depending on what I put here, final significance of TE changes too. cfgTEP.flagNei = 'Mass' ; %neigbour analyse type cfgTEP.sizeNei = 4; --> It follows the results of Kraskov (2004) paper. I think this range is between [embedding dimension 2*embedding dimension]. But should I vary this too? For example, should I try 15, 30, 50 etc? For Surrogate analysis in the below, I don't know which options are common to use for non-parametric statistical analysis. cfgTESS.optdimusage = 'indivdim'; cfgTGAA.select_opt_u = 'product_evidence'; % 'max_TEdiff'; cfgTGAA.select_opt_u_pos = 'shortest'; I'm sorry if these questions are not exactly relevant to fieldtrip community. If there is nonlinear time series analysis community, I'd like to post this message over there. But I really appreciate if you could give me some good insight about playing with parameters for ECoG steady-state visual evoked potential data. Thank you very much. Have a nice day. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tomh at kurage.nimh.nih.gov Thu Jan 30 20:09:09 2014 From: tomh at kurage.nimh.nih.gov (Tom Holroyd (NIH/NIMH) [E]) Date: Thu, 30 Jan 2014 14:09:09 -0500 Subject: [FieldTrip] Any insight about Transfer Entropy? In-Reply-To: References: Message-ID: <52EAA355.8040405@kurage.nimh.nih.gov> I saw your earlier message. I think I would be worried that 48 seconds total is not very much data, and only 20 trials is also a small number. I'm not familiar enough with the Ragwitz method so I don't know if it can accurately estimate the embedding dimension from so little data. But it might be a problem. woun zoo wrote: > How are you? > > I'd like to get some insight from you for transfer entropy analysis of my > ECoG data before I run all possible parameters. I know this message doesn't > exactly fit in fieldtrip email list cause question is not exactly about > fieldtrip. But there are a few connectivity methods in fieldtrip. So I'd > like to get my questions to reach some of experts in this causality > analysis field. Besides, I don't know if there is nonlinear time series > analysis discussion list out there or not. > > I'd like to establish some connectivity (functional or effective) between > frontal and visual channels in ECoG recording. However, in our data, there > is a very strong driven component, namely, steady state visually evoked > potentials. SSVEPs in our data appear at several frequencies that are > harmonics of the input frequencies and their sum and difference frequencies > So our data has a completely deterministic (SSVEPs) dynamics and the rest > of background activities. > > Data has 20 trials in total. Each trial lasts 2.4sec. Sampling rate is > 1200hz. Raw data were bandpass filtered from 0.1Hz to 500hz. > > In order to find an effective connectivity, I chose to use TRENTOOL box > that can be incorporated with fieldtrip. I chose Ragwitz method to > determine delay time and embedding dimension. This is where I'd like to get > some good insight for choosing parameters. I attached a script that I'm > using now. I wrote my questions in blue text down below. I really wish to > get some good insight from you because I don't know if my input parameters > are garbage or not. > > cfgTEP.toi = [min(data.time{1,1}) max(data.time{1,1})] --> Basically from > trial start to trial end. > > cfgTEP.predicttimemin_u= 10; > cfgTEP.predicttimemax_u= 240; --> For these prediction horizon values, I > don't know where and how these min and max were used in TEragwitz.m > calculation in TEprepare.m. Transfer Entropy calculation method (VW_ds) > fixed 1 as a prediction horizon. I can't find where this min or max of > predicttime goes inside TEragwitz calculation. VW_ds seems to try to > predict one time sample point ahead from the current time sample point. Is > this proper to determine embedding dimension and delay time for SSVEP + > background activities? > > cfgTEP.actthrvalue = 100; --> I don't know the reason why this > autocorrelation time value needs to be set by hand. I know with this > threshold value, you can selectively choose trials. In my data, particular > channels' autocorrelation values were 54 (sample points), etc. Max > autocorrelation was 134 or something. Is this due to noise? If I have > strong oscillatory activities at the driving frequencies, am I not supposed > to see autocorrelation values close to oscillatory period? > > cfgTEP.maxlag = 1000; --> What will be a good lag number? Isn't it > better to use whole trial length? > > cfgTEP.minnrtrials = 7; --> What is a good number for this when there are > 20 trials? > > For main parameters for TEragwitz, > > cfgTEP.optimizemethod ='ragwitz'; > cfgTEP.ragdim = 1:10; --> I just chose all possible embedding > dimension from 1 to 10. Should I try go more than 10? But TE analysis > always says, embedding dimension maybe 2, which sounds about right for pure > sine waves like my SSVEP. But with 0.1Hz~500hz bandpass, I have tons of > non-stimulus locked high background activities. I'd like to know if 2 is > really good estimation or not for my data. Also when I chose Cao's method, > it says, 5 or 6. > > cfgTEP.ragtaurange = [0.1 2]; --> For delay time as an initial guess, I > chose this range. But Ragwitz always chose the smallest value. If I put > this range from [1 2], then it chooses 1. If it was [0.5 3], it chose 0.5. > Whatever minimum value I put will be chosen as its delay time, which makes > me wonder about what kind of values I should put here. > > cfgTEP.ragtausteps = 15; % steps for ragwitz tau steps 15 > > cfgTEP.repPred = 600; --> I just chose this. Depending on what I > put here, final significance of TE changes too. > > cfgTEP.flagNei = 'Mass' ; %neigbour analyse type > > cfgTEP.sizeNei = 4; --> It follows the results of Kraskov (2004) paper. I > think this range is between [embedding dimension 2*embedding dimension]. > But should I vary this too? For example, should I try 15, 30, 50 etc? > > > For Surrogate analysis in the below, I don't know which options are common > to use for non-parametric statistical analysis. > > cfgTESS.optdimusage = 'indivdim'; > cfgTGAA.select_opt_u = 'product_evidence'; % 'max_TEdiff'; > cfgTGAA.select_opt_u_pos = 'shortest'; > > I'm sorry if these questions are not exactly relevant to fieldtrip > community. If there is nonlinear time series analysis community, I'd like > to post this message over there. But I really appreciate if you could give > me some good insight about playing with parameters for ECoG steady-state > visual evoked potential data. > > Thank you very much. > Have a nice day. > > > > ------------------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- "There are not more than five musical notes, yet the combinations of these five give rise to more melodies than can ever be heard." -- Sun Tzu From joramvandriel at gmail.com Fri Jan 31 12:44:25 2014 From: joramvandriel at gmail.com (Joram van Driel) Date: Fri, 31 Jan 2014 12:44:25 +0100 Subject: [FieldTrip] missing anatomy in source plot of ft_sourcegrandaverage Message-ID: Hi all, I'm trying to plot the grand average of a source analysis. However no matter what I try, the result of ft_sourcegrandaverage keeps giving me only the functional data, no anatomy. My cfg for ft_sourceplot is: cfg = []; cfg.method = 'ortho'; cfg.interactive = 'no'; cfg.funparameter = 'avg.pow'; cfg.maskparameter = cfg.funparameter; cfg.funcolorlim = [0 0.2]; cfg.opacitylim = [0 0.2]; cfg.opacitymap = 'rampup'; ft_sourceplot(cfg,grandavg{1}) I thus created my own grandaverage, like this (where sourceDiffAll{:,:} is a subject-by-condition cell structure): temp = zeros([length(nsubjects) size(sourceDiffAll{1,1}.avg.pow)]); for s=1:length(nsubjects) temp(s,:,:,:) = sourceDiffAll{s,2}.avg.pow - sourceDiffAll{s,1}.avg.pow; % create condition contrast end customavg = sourceDiffAll{1,1}; % just copy one subject one condition customavg.avg.pow = squeeze(mean(temp,1)); % and replace power with the grand average power condition-contrast Now using ft_sourceplot on customavg works just fine. Any idea of what's going wrong with ft_sourceplot on ft_sourcegrandaverage? Thanks! - Joram -- Joram van Driel, MSc. PhD student @ University of Amsterdam Brain & Cognition @ Department of Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From Patricia.Wollstadt at gmx.de Fri Jan 31 20:05:09 2014 From: Patricia.Wollstadt at gmx.de (Patricia Wollstadt) Date: Fri, 31 Jan 2014 20:05:09 +0100 Subject: [FieldTrip] Any insight about Transfer Entropy? In-Reply-To: References: Message-ID: <52EBF3E5.8080804@gmx.de> Hello, I tried to answer your questions regarding the TRENTOOL parameters below. We will soon provide a user manual for the current TRENTOOL version on the website (www.trentool.de), which should also help with some of the questions raised in your email. cfgTEP.toi = [min(data.time{1,1}) max(data.time{1,1})] --> Basically from trial start to trial end. PW: This is correct, you should use as much data as possible. cfgTEP.predicttimemin_u= 10; cfgTEP.predicttimemax_u= 240; --> I am not sure where and how these min and max were used in TEragwitz calculation in TEprepare.m. VW_ds fixed 1 as a prediction horizon. I'm not sure if it's good to predict just next time sample point for SSVEP + noisy data? PW: TRENTOOL allows you to reconstruct the delays of an interaction (see Wibral, 2013, /Measuring Information Transfer Delays/). Interaction delays are reconstructed by scanning over a range of assumed interaction delays u, specified by the parameters 'predicttimemin_u', 'predicttimemax_u', and 'predicttimestepsize'. TRENTOOL will actually run the TE estimation for each assumed u, i.e. TE will be estimated between all pairs of channels for each prediction time u. The Ragwitz criterion will be used for each estimation to determine the respective embedding parameters. In a second step, TRENTOOL will reconstruct the interaction delay by finding the value for u for which TE becomes maximal. Note, that you also have to provide the step size in 'cfgTEP.predicttimestepsize'. TRENTOOL will build a vector [cfgTEP.predicttimemin_u:cfgTEP.predicttimestepsize:cfgTEP.predicttimemax_u] to estimate TE for each u. You have specified a rather broad range of interaction delays to be scanned here. This will result in a very long running time. Maybe you could reconsider the values for u that you want to scan (i.e. use assumed interaction delays that are biologically plausible)? cfgTEP.actthrvalue = 100; --> I don't know the reason why this autocorrelation time value needs to be set by hand cause I thought embedding delay time gets automatically decided by autocorrelation. Is there a special logic behind setting this by hand? For particular two channels, their ACT values were 54 sample points, etc. Max ACT was 134 or something. Is this due to noise? If I have strong oscillatory activities, am I not supposed to see ACT values close to oscillatory period? PW: This is only a threshold value. If the actual ACT is higher for individual trials, these trials will be excluded from the analysis. The value you put here should be based on the filtering of the data prior to TE analysis. E.g. if you highpass filter your data at 10 Hz and have a sampling rate of 1200Hz, you shouldn't find any autocorrelation above 120 samples. Thus, you may use 120 as a threshold here. cfgTEP.maxlag = 1000; --> 1000 is default. What will be a good lag number to see autocorrelation? Should I use a half of total sample points of data (2880/2 = 1440)? PW: Half the number of sample points is fine. cfgTEP.minnrtrials = 7; --> Does this mean if trial selection rule by ACT value rejects more than 13 trials out of total 20 trials, program won't run? What is a good number for this when I have 20 trials? PW: This is correct, if you end up with less than the number of trials specified here, the analysis will not run. Because of the permutation statistics used later, this value should be set to at least 12. For main parameters for TEragwitz, cfgTEP.optimizemethod ='ragwitz'; cfgTEP.ragdim = 1:10; --> I just chose all possible embedding dimension from 1 to 10. Should I try to put more than 10? But TE analysis always says, embedding dimension maybe 2, which sounds about right for pure sine waves like SSVEPs. But with 0.1Hz~500hz bandpass, I have tons of non-stimulus locked low and high noisy activities. But when I chose Cao's method, it says, 5 or 6. PW: 1:10 is alright here. Ragwitz is the recommended method for parameter estimation. cfgTEP.ragtaurange = [0.1 2]; --> For delay time, I chose this range. But Ragwitz always chose the smallest value. If I put this range from [1 2], then it chooses 1. If it was [0.5 3], it chose 0.5. So I'd really like to know what kind of values I should put here. PW: The values you provided here are ok ('ragtaurange' determines the embedding delay). The values, that are returned by Ragwitz' optimization (tau = 0.1, dim = 2), indicate that there are a lot of fast dynamics in your data. This may indicate a lot of high frequency noise. Consider filtering (forward only!) in the range were you expect neural activity (e.g. 0.5 to 300 Hz or similar). cfgTEP.ragtausteps = 15; % steps for ragwitz tau steps 15 cfgTEP.repPred = 600; --> I just chose this. I could vary this. Depending on what I put here, final significance of TE changes too. PW: This parameter determines how many data points are used for optimization of the embedding parameters by the Ragwitz criterion. Here, TRENTOOL will use the first 600 points in each trial to optimize embedding parameters. This number should be as high as possible (depending on the values you chose for cfgTEP.actthrvalue, fgTEP.ragdim, cfgTEP.ragtaurange). cfgTEP.flagNei = 'Mass' ; %neigbour analyse type cfgTEP.sizeNei = 4; --> Ideally I guess I might have to vary size of neighborhood in phase space PW: 4 is fine here (default). For Surrogate analysis, cfgTESS.optdimusage = 'indivdim'; cfgTGAA.select_opt_u = 'product_evidence'; % 'max_TEdiff'; --> I just chose 'product_evidence' because help file of InteractionDelayReconstruction_analyze.m says 'max_TEdiff' could be problematic in certain case. Which one is normal to use? PW: We recommend the use of 'max_TEdiff' . We will change the help text in a future release. cfgTGAA.select_opt_u_pos = 'shortest'; --> Also for this, I don't know which one is normal to use. PW: 'shortest' is fine here. I hope this helps, best regards Patricia Am 30/01/2014 19:38, schrieb woun zoo: > How are you? > > I'd like to get some insight from you for transfer entropy analysis of > my ECoG data before I run all possible parameters. I know this message > doesn't exactly fit in fieldtrip email list cause question is not > exactly about fieldtrip. But there are a few connectivity methods in > fieldtrip. So I'd like to get my questions to reach some of experts in > this causality analysis field. Besides, I don't know if there is > nonlinear time series analysis discussion list out there or not. > > I'd like to establish some connectivity (functional or effective) > between frontal and visual channels in ECoG recording. However, in > our data, there is a very strong driven component, namely, steady > state visually evoked potentials. SSVEPs in our data appear at > several frequencies that are harmonics of the input frequencies and > their sum and difference frequencies So our data has a completely > deterministic (SSVEPs) dynamics and the rest of background activities. > > Data has 20 trials in total. Each trial lasts 2.4sec. Sampling rate is > 1200hz. Raw data were bandpass filtered from 0.1Hz to 500hz. > > In order to find an effective connectivity, I chose to use TRENTOOL > box that can be incorporated with fieldtrip. I chose Ragwitz method to > determine delay time and embedding dimension. This is where I'd like > to get some good insight for choosing parameters. I attached a script > that I'm using now. I wrote my questions in blue text down below. I > really wish to get some good insight from you because I don't know if > my input parameters are garbage or not. > > cfgTEP.toi = [min(data.time{1,1}) max(data.time{1,1})] --> Basically > from trial start to trial end. > > cfgTEP.predicttimemin_u= 10; > cfgTEP.predicttimemax_u= 240; --> For these prediction horizon values, > I don't know where and how these min and max were used in TEragwitz.m > calculation in TEprepare.m. Transfer Entropy calculation method > (VW_ds) fixed 1 as a prediction horizon. I can't find where this min > or max of predicttime goes inside TEragwitz calculation. VW_ds seems > to try to predict one time sample point ahead from the current time > sample point. Is this proper to determine embedding dimension and > delay time for SSVEP + background activities? > > cfgTEP.actthrvalue = 100; --> I don't know the reason why this > autocorrelation time value needs to be set by hand. I know with this > threshold value, you can selectively choose trials. In my data, > particular channels' autocorrelation values were 54 (sample points), > etc. Max autocorrelation was 134 or something. Is this due to noise? > If I have strong oscillatory activities at the driving frequencies, am > I not supposed to see autocorrelation values close to oscillatory period? > > cfgTEP.maxlag = 1000; --> What will be a good lag number? Isn't > it better to use whole trial length? > > cfgTEP.minnrtrials = 7; --> What is a good number for this when there > are 20 trials? > > For main parameters for TEragwitz, > > cfgTEP.optimizemethod ='ragwitz'; > cfgTEP.ragdim = 1:10; --> I just chose all possible embedding > dimension from 1 to 10. Should I try go more than 10? But TE analysis > always says, embedding dimension maybe 2, which sounds about right for > pure sine waves like my SSVEP. But with 0.1Hz~500hz bandpass, I have > tons of non-stimulus locked high background activities. I'd like to > know if 2 is really good estimation or not for my data. Also when I > chose Cao's method, it says, 5 or 6. > > cfgTEP.ragtaurange = [0.1 2]; --> For delay time as an initial > guess, I chose this range. But Ragwitz always chose the smallest > value. If I put this range from [1 2], then it chooses 1. If it was > [0.5 3], it chose 0.5. Whatever minimum value I put will be chosen as > its delay time, which makes me wonder about what kind of values I > should put here. > > cfgTEP.ragtausteps = 15; % steps for ragwitz tau steps 15 > > cfgTEP.repPred = 600; --> I just chose this. Depending on what > I put here, final significance of TE changes too. > > cfgTEP.flagNei = 'Mass' ; %neigbour analyse type > > cfgTEP.sizeNei = 4; --> It follows the results of Kraskov (2004) > paper. I think this range is between [embedding dimension 2*embedding > dimension]. But should I vary this too? For example, should I try 15, > 30, 50 etc? > > > For Surrogate analysisin the below, I don't know which options are > common to use for non-parametric statistical analysis. > > cfgTESS.optdimusage = 'indivdim'; > cfgTGAA.select_opt_u = 'product_evidence'; % 'max_TEdiff'; > cfgTGAA.select_opt_u_pos = 'shortest'; > > I'm sorry if these questions are not exactly relevant to fieldtrip > community. If there is nonlinear time series analysis community, I'd > like to post this message over there. But I really appreciate if you > could give me some good insight about playing with parameters for ECoG > steady-state visual evoked potential data. > > Thank you very much. > Have a nice day. > > > _______________________________________________ > 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 v.piai.research at gmail.com Wed Jan 1 18:32:41 2014 From: v.piai.research at gmail.com (Vitoria Piai) Date: Wed, 01 Jan 2014 18:32:41 +0100 Subject: [FieldTrip] source-level phase coherence (following beamforming extended tutorial) Message-ID: <52C45139.7040806@gmail.com> Dear FT-ers, Sticking to the Dutch tradition, my best wishes for 2014, first of all! I'm trying to compute phase coherence between two sources of activity that I previously localised with DICS (one anterior and one posterior source, see figure if needed). It was suggested to me I'd use the approach explained in the beamforming extended tutorial, in particular "Localization of cortical sources that are coherent with the EMG". If I follow that approach (copied here below) cfg = []; cfg.method = 'dics'; cfg.refchan = 'EMGlft'; cfg.frequency = 20; cfg.vol = hdm; cfg.grid = sourcemodel; source_coh_lft = ft_sourceanalysis(cfg, freq_csd); I get stuck at the definition of cfg.refchan because I already know my sources of interest, so there's no "sensor" I can use for this. So I'm wondering whether there is another way to define the refchan or whether this specific approach is not the most appropriate. Intuitively, I myself had first chosen the approach discussed in the tutorial connectivity extended, in particular "Source-level cortico-cortical connectivity in MEG data". When then computing the LCMV, I had the positions in grid.pos for the maximum activity both for the anterior and the posterior activity taken from the data shown in the figure. Would this be the most appropriate/best way of getting the phase coherence between these two sources? Or is there another method I should use? Any thoughts or suggestions are most welcome! Thanks a lot, Vitória -------------- next part -------------- A non-text attachment was scrubbed... Name: example.png Type: image/png Size: 139285 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Wed Jan 1 21:19:52 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 1 Jan 2014 21:19:52 +0100 Subject: [FieldTrip] source-level phase coherence (following beamforming extended tutorial) In-Reply-To: <52C45139.7040806@gmail.com> References: <52C45139.7040806@gmail.com> Message-ID: <72A80E1C-8D85-41B3-B5A1-D9EC0B73DEDD@donders.ru.nl> Hi Vitoria, > Intuitively, I myself had first chosen the approach discussed in the tutorial connectivity extended, in particular "Source-level cortico-cortical connectivity in MEG data". When then computing the LCMV, I had the positions in grid.pos for the maximum activity both for the anterior and the posterior activity taken from the data shown in the figure. Would this be the most appropriate/best way of getting the phase coherence between these two sources? Yes, this would be one way of doing it. Note that by just focussing on two dipolar sources, and not accounting for the spatial structure in the coherence, you may run the risk in over-interpreting any difference across conditions (in particular in the presence of differences in source power). More about this can be found in the paper Joachim and I published in HBM, in 2009. Best wishes, Jan-Mathijs > > Any thoughts or suggestions are most welcome! > Thanks a lot, Vitória > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From i.e.j.de.vries at student.vu.nl Thu Jan 2 02:23:04 2014 From: i.e.j.de.vries at student.vu.nl (Vries, I.E.J. de) Date: Thu, 2 Jan 2014 01:23:04 +0000 Subject: [FieldTrip] Units in 'vertical' multiplot Message-ID: <19DD7427D34B7E47B33093FB4C3CFDD201094E8CEF@PEXMB001B.vu.local> Hi all, I'm using multiplot with the 'vertical' layout, i.e. channels are plotted as singleplot subplots. I'm doing this for the raw time series and for the power spectra. But I cannot find how to put units in the subplot, so I can actually see what the power is at which frequency. Also in the normal time series the units are not visible. Even if I use multiplot with a layout of the EEG cap the units on the graphs are not visible. Anyone an idea how to make the units visible? thanks and a happy new year! Ingmar -------------- next part -------------- An HTML attachment was scrubbed... URL: From mje.mads at gmail.com Fri Jan 3 11:44:58 2014 From: mje.mads at gmail.com (Mads Jensen) Date: Fri, 03 Jan 2014 11:44:58 +0100 Subject: [FieldTrip] cannot combine planar grads with ft_combineplaner Message-ID: <52C694AA.3000903@gmail.com> Hi all, I have a problem with ft_combineplanar. It does not seem to combine the planar gradiometors when called. I have tried with timelocked data and epoched data, both are the same. However, grandaveraged data (ft_timelockgrandaverage) create a structure with combined data. Does anybody have an idea what the problem might be or how I can find the problem? I have Neuromag Triux data and is using the most recent Fieldtrip from the git-repo. best wish, mads From gianpaolo.demarchi at unitn.it Fri Jan 3 15:09:00 2014 From: gianpaolo.demarchi at unitn.it (Demarchi, Gianpaolo) Date: Fri, 3 Jan 2014 15:09:00 +0100 Subject: [FieldTrip] cannot combine planar grads with ft_combineplaner In-Reply-To: <52C694AA.3000903@gmail.com> References: <52C694AA.3000903@gmail.com> Message-ID: Hi Mads, you’re not alone! In fact I was going to open a bug on that these days, since I’m getting similar (non) results. With a previous ft version (6499, so more than one year old), everything seems to work fine, i.e. I get (for a Vectorview 306 channel input) as a ft_combineplanar output: avgdatacmbOLD = time: [1x1537 double] label: {204x1 cell} grad: [1x1 struct] cfg: [1x1 struct] fsample: 256 sampleinfo: [1 1537] avg: [204x1537 double] dimord: 'chan_time' so, correctly combined, whereas if I do the same with a recent (svn-ed) version, with the same input, I get: avgdatacmb = time: [1x1537 double] label: {306x1 cell} grad: [1x1 struct] cfg: [1x1 struct] fsample: 256 sampleinfo: [1 1537] avg: [306x1537 double] dimord: ‘chan_time' so I get back my original, non combined, 306 channels … I tried to track the problem before opening a bug, and it seems that the problem lays in my input data label, which is: >> avgdata.label ans = 'MEG0113' 'MEG0112' 'MEG0111' etc … The problem seems to be around lines 102-ff of ft_combineplanar, since ft_senstype(data) on my data wrongly returns ‘neuromag306’ ( that are in principle ‘MEG 0113’ etc ...) instead of ‘neuromag306alt’ ( ‘MEG0113’ without spaces), and then in the following two lines sel_dH/sel_dV are empty, since there’s never a match between my data label (‘MEG0113’ …) and the output of ft_senstype/ft_senslabel (‘MEG 0113’ … with spaces). So, there’s something wrong in the ft_senstype step, but I didn’t have time to fully track it … @roboos: am I missing something obvious, or should I file a bug!? My two €-cents, Gianpaolo Il giorno 03/gen/2014, alle ore 11:44, Mads Jensen > ha scritto: Hi all, I have a problem with ft_combineplanar. It does not seem to combine the planar gradiometors when called. I have tried with timelocked data and epoched data, both are the same. However, grandaveraged data (ft_timelockgrandaverage) create a structure with combined data. Does anybody have an idea what the problem might be or how I can find the problem? I have Neuromag Triux data and is using the most recent Fieldtrip from the git-repo. best wish, mads _______________________________________________ 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 victorias at dsv.su.se Fri Jan 3 16:38:32 2014 From: victorias at dsv.su.se (=?UTF-8?Q?Victoria_Schr=C3=B6der?=) Date: Fri, 03 Jan 2014 16:38:32 +0100 Subject: [FieldTrip] connectivity analysis with rereferenced EEG data Message-ID: <79fcd6c08e426c01441ce7c5453efc6a@dsv.su.se> Hello I am trying to do a connectivity analysis with Fieldtrip. I recorded the EEG data with a BioSemi system without choosing a reference channel. Thus i need to select a reference in Fieldtrip. I did that during ft_preprocessing(cfg) by using the following code: cfg.reref='yes'; cfg.refchannel='all'; Data=ft_preprocessing(cfg); however when i later want to do the ft_mvaranalysis(cfg, Data) i get the following error: Matrix must be positive definite I read that this error probably occurs because the cfg.reref procedure changes the ranks of the data matrix.However, i need to rereference my data. Do somebody know a solution? All the best and thank you in advance Victoria From ingenieureniso at gmail.com Fri Jan 3 20:45:35 2014 From: ingenieureniso at gmail.com (ingenieur eniso) Date: Fri, 3 Jan 2014 20:45:35 +0100 Subject: [FieldTrip] Empirical Bayesian for the EEG Inverse Problem Message-ID: Dear all, I am using the interpolation methods to 3D EEG mapping, and now I want to apply the bayesian approach for the EEG Inverse Problem but I am blocked to calculate the posterior probability. Please can anyone help me ? I hope you will send me positive and helpful response. Thanks a lot in advance! Best, ahmed -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jan 6 09:21:12 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 06 Jan 2014 09:21:12 +0100 Subject: [FieldTrip] connectivity analysis with rereferenced EEG data In-Reply-To: <79fcd6c08e426c01441ce7c5453efc6a@dsv.su.se> References: <79fcd6c08e426c01441ce7c5453efc6a@dsv.su.se> Message-ID: <52CA6778.1040902@donders.ru.nl> Hi Victoria, exactly, since the rank of your matrix is reduced, you need to remove one channel from your data before computing the connectivity. I am not sure whether it is best to compute EEG-connectivity with average-referenced data or with a single channel reference. In case of a single-channel reference, you can of course remove the reference channel, so that'd be the easiest in that sense. Maybe check http://www.ncbi.nlm.nih.gov/pubmed/10619414 and related papers and decide for yourself how to reference ;) Best, Jörn On 1/3/2014 4:38 PM, Victoria Schröder wrote: > Hello > > I am trying to do a connectivity analysis with Fieldtrip. I recorded > the EEG data with a BioSemi system without choosing a reference channel. > Thus i need to select a reference in Fieldtrip. I did that during > ft_preprocessing(cfg) by using the following code: > cfg.reref='yes'; > cfg.refchannel='all'; > Data=ft_preprocessing(cfg); > > however when i later want to do the ft_mvaranalysis(cfg, Data) i get > the following error: > Matrix must be positive definite > > I read that this error probably occurs because the cfg.reref procedure > changes the ranks of the data matrix.However, i need to rereference my > data. > > Do somebody know a solution? > > All the best and thank you in advance > Victoria > _______________________________________________ > 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 victorias at dsv.su.se Mon Jan 6 14:18:19 2014 From: victorias at dsv.su.se (=?UTF-8?Q?Victoria_Schr=C3=B6der?=) Date: Mon, 06 Jan 2014 14:18:19 +0100 Subject: [FieldTrip] connectivity analysis with rereferenced EEG data In-Reply-To: <52CA6778.1040902@donders.ru.nl> References: <79fcd6c08e426c01441ce7c5453efc6a@dsv.su.se> <52CA6778.1040902@donders.ru.nl> Message-ID: <2d24d3dbe9d30f92b991b39ba51b4a1f@dsv.su.se> Thank you very much Jörn! Have a nice day Best Victoria 2014-01-06 09:21 skrev Jörn M. Horschig: > Hi Victoria, > > exactly, since the rank of your matrix is reduced, you need to remove > one channel from your data before computing the connectivity. I am > not > sure whether it is best to compute EEG-connectivity with > average-referenced data or with a single channel reference. In case > of > a single-channel reference, you can of course remove the reference > channel, so that'd be the easiest in that sense. Maybe check > http://www.ncbi.nlm.nih.gov/pubmed/10619414 and related papers and > decide for yourself how to reference ;) > > Best, > Jörn > > > On 1/3/2014 4:38 PM, Victoria Schröder wrote: >> Hello >> >> I am trying to do a connectivity analysis with Fieldtrip. I recorded >> the EEG data with a BioSemi system without choosing a reference >> channel. >> Thus i need to select a reference in Fieldtrip. I did that during >> ft_preprocessing(cfg) by using the following code: >> cfg.reref='yes'; >> cfg.refchannel='all'; >> Data=ft_preprocessing(cfg); >> >> however when i later want to do the ft_mvaranalysis(cfg, Data) i get >> the following error: >> Matrix must be positive definite >> >> I read that this error probably occurs because the cfg.reref >> procedure changes the ranks of the data matrix.However, i need to >> rereference my data. >> >> Do somebody know a solution? >> >> All the best and thank you in advance >> Victoria >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Mon Jan 6 15:22:54 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 06 Jan 2014 15:22:54 +0100 Subject: [FieldTrip] Job vacancy in Kleve, Germany Message-ID: <52CABC3E.2020101@donders.ru.nl> Forwarded message: Please find enclosed a job vacancy at the Rhine-Waal University of Applied Sciences in Germany for a Research Assistant (Wissenschaftliche/r Mitarbeiter/in für digitale Signaverarbeitung und Datenfusion mit Schwerpunkt in dem Bereich BCI) in German Language. -- 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 -------------- A non-text attachment was scrubbed... Name: Ausschreibung_13_F1_13.pdf Type: application/pdf Size: 47747 bytes Desc: not available URL: From mje.mads at gmail.com Mon Jan 6 21:26:56 2014 From: mje.mads at gmail.com (Mads Jensen) Date: Mon, 06 Jan 2014 21:26:56 +0100 Subject: [FieldTrip] cannot combine planar grads with ft_combineplaner In-Reply-To: References: <52C694AA.3000903@gmail.com> Message-ID: <52CB1190.4030002@gmail.com> Hi Gianpaolo, Thanks, that is good to know and much appreciated your two €-cents. best, mads On 01/03/2014 03:09 PM, Demarchi, Gianpaolo wrote: > Hi Mads, > you’re not alone! > In fact I was going to open a bug on that these days, since I’m getting > similar (non) results. > > With a previous ft version (6499, so more than one year old), everything > seems to work fine, i.e. I get (for a Vectorview 306 channel input) > as a ft_combineplanar output: > > avgdatacmbOLD = > > time: [1x1537 double] > label: {204x1 cell} > grad: [1x1 struct] > cfg: [1x1 struct] > fsample: 256 > sampleinfo: [1 1537] > avg: [204x1537 double] > dimord: 'chan_time' > > so, correctly combined, whereas if I do the same with a recent (svn-ed) > version, with the same input, I get: > > avgdatacmb = > > time: [1x1537 double] > label: {306x1 cell} > grad: [1x1 struct] > cfg: [1x1 struct] > fsample: 256 > sampleinfo: [1 1537] > avg: [306x1537 double] > dimord: ‘chan_time' > > so I get back my original, non combined, 306 channels … > > I tried to track the problem before opening a bug, and it seems that the > problem lays in my input data label, which is: > > >> avgdata.label > > ans = > > 'MEG0113' > 'MEG0112' > 'MEG0111' > > etc … > > The problem seems to be around lines 102-ff of ft_combineplanar, > since ft_senstype(data) on my data wrongly returns ‘neuromag306’ ( that > are in principle ‘MEG 0113’ etc ...) instead of ‘neuromag306alt’ ( > ‘MEG0113’ without spaces), and then in the following two lines > sel_dH/sel_dV are empty, since there’s never a match between my data > label (‘MEG0113’ …) and the output of ft_senstype/ft_senslabel (‘MEG > 0113’ … with spaces). > So, there’s something wrong in the ft_senstype step, but I didn’t have > time to fully track it … > @roboos: am I missing something obvious, or should I file a bug!? > > My two €-cents, > Gianpaolo > > > Il giorno 03/gen/2014, alle ore 11:44, Mads Jensen > ha scritto: > >> Hi all, >> >> I have a problem with ft_combineplanar. It does not seem to combine the >> planar gradiometors when called. >> >> I have tried with timelocked data and epoched data, both are the same. >> However, grandaveraged data (ft_timelockgrandaverage) create a structure >> with combined data. Does anybody have an idea what the problem might be >> or how I can find the problem? >> >> I have Neuromag Triux data and is using the most recent Fieldtrip from >> the git-repo. >> >> best wish, >> mads >> _______________________________________________ >> 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 bertram0611 at pku.edu.cn Tue Jan 7 09:42:02 2014 From: bertram0611 at pku.edu.cn (=?utf-8?B?6JSh5p6X?=) Date: Tue, 7 Jan 2014 16:42:02 +0800 (CST) Subject: [FieldTrip] =?gbk?q?How_to_plot_ERP_waveforms?= Message-ID: <836381241.21725.1389084122918.JavaMail.root@bj-mail07.pku.edu.cn> Dear fieldtripers, I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: %%preprocessing 40 subjects nsubjects = [1:40]; for i=1:length (nsubjects) j = nsubjects(i); cfg = []; cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); cfg.trialdef.eventtype = 'trial'; cfg.trialdef.eventvalue = [14]; %markers cfg = ft_definetrial(cfg); cfg.channel = {'all'}; data_14 = ft_preprocessing(cfg); cfg.trialdef.eventvalue = [24]; %markers cfg = ft_definetrial(cfg); cfg.channel = {'all'}; data_24 = ft_preprocessing(cfg); cfg.trialdef.eventvalue = [34]; %markers cfg = ft_definetrial(cfg); cfg.channel = {'all'}; data_34 = ft_preprocessing(cfg); cfg.trialdef.eventvalue = [44]; %markers cfg = ft_definetrial(cfg); cfg.channel = {'all'}; data_44 = ft_preprocessing(cfg); outfil = strcat('/EEG/data_s', sprintf('%02d', j)); save(outfil, 'data_14','data_24','data_34','data_44'); clear data_14* data_24* data_34* data_44*; end %% calculate the ERP of each subject nsubject = [1:40]; for i=1:length (nsubject) j=nsubject(1,i); load (sprintf('/EEG/data_s%02d',j)); cfg = []; cfg.latency = [-0.2 1.0]; cfg.covariance = 'no'; cfg.blcovariance = 'no'; avg_14=ft_timelockanalysis(cfg,data_14); avg_24=ft_timelockanalysis(cfg,data_24); avg_34=ft_timelockanalysis(cfg,data_34); avg_44=ft_timelockanalysis(cfg,data_44); cfg = []; cfg.baseline = [-0.2 0]; cfg.baselinetype = 'absolute'; base_14= ft_timelockbaseline(cfg, avg_14); base_24= ft_timelockbaseline(cfg, avg_24); base_34= ft_timelockbaseline(cfg, avg_34); base_44= ft_timelockbaseline(cfg, avg_44); outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); clear avg* data*; end %% calculate the grand average of the 40 subjects %%grand average cfg = []; nsubject = [1:40]; for i=1:length (nsubject) j=nsubject(1,i); load(sprintf('/EEG/baseERP_resp_s%02d',j)); sub_14(i).ERP= avg_14; sub_24(i).ERP= avg_24; sub_34(i).ERP= avg_34; sub_44(i).ERP= avg_44; clear avg* end grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double outfil = strcat('/EEG/n40_grandavgERP_resp'); save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); %%plotting load /EEG/n40_grandavgERP_resp; cfg = []; cfg.layout = 'EEG1010.lay'; cfg.xlim = [-0.2 1.0]; cfg.baseline = 'no'; cfg.interactive = 'no'; cfg.showlabels = 'yes'; cfg.colorbar = 'yes'; figure; ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); -- Lin Cai Department of Psychology, Peking University, Beijing 100871, P.R.China -------------- next part -------------- A non-text attachment was scrubbed... Name: 搜狗截图14年01月07日1641_1.png Type: image/png Size: 25160 bytes Desc: not available URL: From eelke.spaak at donders.ru.nl Tue Jan 7 09:47:42 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 7 Jan 2014 09:47:42 +0100 Subject: [FieldTrip] How to plot ERP waveforms In-Reply-To: <836381241.21725.1389084122918.JavaMail.root@bj-mail07.pku.edu.cn> References: <836381241.21725.1389084122918.JavaMail.root@bj-mail07.pku.edu.cn> Message-ID: Dear Lin Cai, Could it be that the range of values is very different across the four input arguments? You could check the max(tl.avg(:)) and min(tl.avg(:)) of each of the four structures to verify this. While you're at it, I would also check for NaNs. Best, Eelke On 7 January 2014 09:42, 蔡林 wrote: > Dear fieldtripers, > > I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: > > > %%preprocessing 40 subjects > nsubjects = [1:40]; > for i=1:length (nsubjects) > j = nsubjects(i); > cfg = []; > cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); > cfg.trialdef.eventtype = 'trial'; > cfg.trialdef.eventvalue = [14]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_14 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [24]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_24 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [34]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_34 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [44]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_44 = ft_preprocessing(cfg); > > outfil = strcat('/EEG/data_s', sprintf('%02d', j)); > save(outfil, 'data_14','data_24','data_34','data_44'); > clear data_14* data_24* data_34* data_44*; > end > %% calculate the ERP of each subject > nsubject = [1:40]; > > for i=1:length (nsubject) > j=nsubject(1,i); > load (sprintf('/EEG/data_s%02d',j)); > > cfg = []; > cfg.latency = [-0.2 1.0]; > cfg.covariance = 'no'; > cfg.blcovariance = 'no'; > > avg_14=ft_timelockanalysis(cfg,data_14); > avg_24=ft_timelockanalysis(cfg,data_24); > avg_34=ft_timelockanalysis(cfg,data_34); > avg_44=ft_timelockanalysis(cfg,data_44); > > cfg = []; > cfg.baseline = [-0.2 0]; > cfg.baselinetype = 'absolute'; > base_14= ft_timelockbaseline(cfg, avg_14); > base_24= ft_timelockbaseline(cfg, avg_24); > base_34= ft_timelockbaseline(cfg, avg_34); > base_44= ft_timelockbaseline(cfg, avg_44); > > outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); > save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); > clear avg* data*; > end > %% calculate the grand average of the 40 subjects > %%grand average > cfg = []; > nsubject = [1:40]; > > for i=1:length (nsubject) > j=nsubject(1,i); > load(sprintf('/EEG/baseERP_resp_s%02d',j)); > > sub_14(i).ERP= avg_14; > sub_24(i).ERP= avg_24; > sub_34(i).ERP= avg_34; > sub_44(i).ERP= avg_44; > clear avg* > end > > grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C > grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer > grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic > grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double > > outfil = strcat('/EEG/n40_grandavgERP_resp'); > save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); > %%plotting > load /EEG/n40_grandavgERP_resp; > > cfg = []; > cfg.layout = 'EEG1010.lay'; > cfg.xlim = [-0.2 1.0]; > > cfg.baseline = 'no'; > cfg.interactive = 'no'; > cfg.showlabels = 'yes'; > cfg.colorbar = 'yes'; > > figure; > ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); > > > -- > Lin Cai > Department of Psychology, Peking University, Beijing 100871, P.R.China > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Tue Jan 7 10:02:46 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Tue, 07 Jan 2014 10:02:46 +0100 Subject: [FieldTrip] How to plot ERP waveforms In-Reply-To: <836381241.21725.1389084122918.JavaMail.root@bj-mail07.pku.edu.cn> References: <836381241.21725.1389084122918.JavaMail.root@bj-mail07.pku.edu.cn> Message-ID: <52CBC2B6.30300@donders.ru.nl> Hi, tricky problem, and a very nasty one, but it's a simple one in the end ;) Once you call ft_definetrial you get back a cfg with a .trl matrix. Upon the next call to ft_definetrial, FieldTrip checks for the presence of cfg.trl, and if so returns immediately (because ft_definetrial has been called before). Thus, in the beginning when you compute data_14, data_24, etc, they will all be based on the same trl. Therefore, the same data will be computed and all four plots will overlap. You need to change the name of the output argument for each ft_definetrial call to be unique to resolve this, something like: cfg_14 = ft_definetrial(cfg); cfg_14.channel = {'all'}; data_14 = ft_preprocessing(cfg_14); cfg.trialdef.eventvalue = [24]; %markers cfg_24 = ft_definetrial(cfg); cfg_24.channel = {'all'}; data_24 = ft_preprocessing(cfg_24); Best, Jörn On 1/7/2014 9:42 AM, 蔡林 wrote: > Dear fieldtripers, > > I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: > > > %%preprocessing 40 subjects > nsubjects = [1:40]; > for i=1:length (nsubjects) > j = nsubjects(i); > cfg = []; > cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); > cfg.trialdef.eventtype = 'trial'; > cfg.trialdef.eventvalue = [14]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_14 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [24]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_24 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [34]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_34 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [44]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_44 = ft_preprocessing(cfg); > > outfil = strcat('/EEG/data_s', sprintf('%02d', j)); > save(outfil, 'data_14','data_24','data_34','data_44'); > clear data_14* data_24* data_34* data_44*; > end > %% calculate the ERP of each subject > nsubject = [1:40]; > > for i=1:length (nsubject) > j=nsubject(1,i); > load (sprintf('/EEG/data_s%02d',j)); > > cfg = []; > cfg.latency = [-0.2 1.0]; > cfg.covariance = 'no'; > cfg.blcovariance = 'no'; > > avg_14=ft_timelockanalysis(cfg,data_14); > avg_24=ft_timelockanalysis(cfg,data_24); > avg_34=ft_timelockanalysis(cfg,data_34); > avg_44=ft_timelockanalysis(cfg,data_44); > > cfg = []; > cfg.baseline = [-0.2 0]; > cfg.baselinetype = 'absolute'; > base_14= ft_timelockbaseline(cfg, avg_14); > base_24= ft_timelockbaseline(cfg, avg_24); > base_34= ft_timelockbaseline(cfg, avg_34); > base_44= ft_timelockbaseline(cfg, avg_44); > > outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); > save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); > clear avg* data*; > end > %% calculate the grand average of the 40 subjects > %%grand average > cfg = []; > nsubject = [1:40]; > > for i=1:length (nsubject) > j=nsubject(1,i); > load(sprintf('/EEG/baseERP_resp_s%02d',j)); > > sub_14(i).ERP= avg_14; > sub_24(i).ERP= avg_24; > sub_34(i).ERP= avg_34; > sub_44(i).ERP= avg_44; > clear avg* > end > > grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C > grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer > grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic > grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double > > outfil = strcat('/EEG/n40_grandavgERP_resp'); > save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); > %%plotting > load /EEG/n40_grandavgERP_resp; > > cfg = []; > cfg.layout = 'EEG1010.lay'; > cfg.xlim = [-0.2 1.0]; > > cfg.baseline = 'no'; > cfg.interactive = 'no'; > cfg.showlabels = 'yes'; > cfg.colorbar = 'yes'; > > figure; > ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); > > > > > _______________________________________________ > 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 bertram0611 at pku.edu.cn Tue Jan 7 11:50:44 2014 From: bertram0611 at pku.edu.cn (=?utf-8?B?6JSh5p6X?=) Date: Tue, 7 Jan 2014 18:50:44 +0800 (CST) Subject: [FieldTrip] =?utf-8?b?5Zue5aSN77yaIFJlOiAgSG93IHRvIHBsb3QgRVJQ?= =?utf-8?q?_waveforms?= In-Reply-To: <52CBC2B6.30300@donders.ru.nl> Message-ID: <290894445.22433.1389091844555.JavaMail.root@bj-mail07.pku.edu.cn> Hi, I can run my codes according to what you told me. And I saw four conditions in a figure. Thanks for your help. But there are still something wrong with my codes. Because I saw warnings in the Command Window in Matlab. As follows: Warning: the trial definition in the configuration is inconsistent with the actual data > In utilities\private\warning_once at 158 In utilities\private\fixsampleinfo at 68 In ft_datatype_raw at 154 In ft_checkdata at 298 In ft_preprocessing at 240 In outputplot at 5 Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording > In utilities\private\warning_once at 158 In utilities\private\fixsampleinfo at 79 In ft_datatype_raw at 154 In ft_checkdata at 298 In ft_preprocessing at 240 In outputplot at 5 preprocessing preprocessing trial 1 from 1 the call to "ft_preprocessing" took 0 seconds ******** Why the data were preprocessed from trial 1 to 1???? Am I right in the whole codes? Thank you in advance. Lin Cai ----- 原始邮件 ----- 发件人: Jörn M. Horschig 收件人: FieldTrip discussion list 已发送邮件: Tue, 07 Jan 2014 17:02:46 +0800 (CST) 主题: Re: [FieldTrip] How to plot ERP waveforms Hi, tricky problem, and a very nasty one, but it's a simple one in the end ;) Once you call ft_definetrial you get back a cfg with a .trl matrix. Upon the next call to ft_definetrial, FieldTrip checks for the presence of cfg.trl, and if so returns immediately (because ft_definetrial has been called before). Thus, in the beginning when you compute data_14, data_24, etc, they will all be based on the same trl. Therefore, the same data will be computed and all four plots will overlap. You need to change the name of the output argument for each ft_definetrial call to be unique to resolve this, something like: cfg_14 = ft_definetrial(cfg); cfg_14.channel = {'all'}; data_14 = ft_preprocessing(cfg_14); cfg.trialdef.eventvalue = [24]; %markers cfg_24 = ft_definetrial(cfg); cfg_24.channel = {'all'}; data_24 = ft_preprocessing(cfg_24); Best, Jörn On 1/7/2014 9:42 AM, 蔡林 wrote: > Dear fieldtripers, > > I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: > > > %%preprocessing 40 subjects > nsubjects = [1:40]; > for i=1:length (nsubjects) > j = nsubjects(i); > cfg = []; > cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); > cfg.trialdef.eventtype = 'trial'; > cfg.trialdef.eventvalue = [14]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_14 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [24]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_24 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [34]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_34 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [44]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_44 = ft_preprocessing(cfg); > > outfil = strcat('/EEG/data_s', sprintf('%02d', j)); > save(outfil, 'data_14','data_24','data_34','data_44'); > clear data_14* data_24* data_34* data_44*; > end > %% calculate the ERP of each subject > nsubject = [1:40]; > > for i=1:length (nsubject) > j=nsubject(1,i); > load (sprintf('/EEG/data_s%02d',j)); > > cfg = []; > cfg.latency = [-0.2 1.0]; > cfg.covariance = 'no'; > cfg.blcovariance = 'no'; > > avg_14=ft_timelockanalysis(cfg,data_14); > avg_24=ft_timelockanalysis(cfg,data_24); > avg_34=ft_timelockanalysis(cfg,data_34); > avg_44=ft_timelockanalysis(cfg,data_44); > > cfg = []; > cfg.baseline = [-0.2 0]; > cfg.baselinetype = 'absolute'; > base_14= ft_timelockbaseline(cfg, avg_14); > base_24= ft_timelockbaseline(cfg, avg_24); > base_34= ft_timelockbaseline(cfg, avg_34); > base_44= ft_timelockbaseline(cfg, avg_44); > > outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); > save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); > clear avg* data*; > end > %% calculate the grand average of the 40 subjects > %%grand average > cfg = []; > nsubject = [1:40]; > > for i=1:length (nsubject) > j=nsubject(1,i); > load(sprintf('/EEG/baseERP_resp_s%02d',j)); > > sub_14(i).ERP= avg_14; > sub_24(i).ERP= avg_24; > sub_34(i).ERP= avg_34; > sub_44(i).ERP= avg_44; > clear avg* > end > > grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C > grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer > grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic > grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double > > outfil = strcat('/EEG/n40_grandavgERP_resp'); > save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); > %%plotting > load /EEG/n40_grandavgERP_resp; > > cfg = []; > cfg.layout = 'EEG1010.lay'; > cfg.xlim = [-0.2 1.0]; > > cfg.baseline = 'no'; > cfg.interactive = 'no'; > cfg.showlabels = 'yes'; > cfg.colorbar = 'yes'; > > figure; > ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); > > > > > _______________________________________________ > 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 -- Lin Cai Department of Psychology, Peking University, Beijing 100871, P.R.China From jm.horschig at donders.ru.nl Tue Jan 7 12:12:31 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Tue, 07 Jan 2014 12:12:31 +0100 Subject: [FieldTrip] =?utf-8?b?5Zue5aSN77yaIFJlOiAgSG93IHRvIHBsb3QgRVJQ?= =?utf-8?q?_waveforms?= In-Reply-To: <290894445.22433.1389091844555.JavaMail.root@bj-mail07.pku.edu.cn> References: <290894445.22433.1389091844555.JavaMail.root@bj-mail07.pku.edu.cn> Message-ID: <52CBE11F.3030005@donders.ru.nl> Hi Lin Cai, check whether your trl-matrix (matrices) makes sense. The error means that e.g. according to the sampleinfo there should be a different number of trials than your data contains or stuff the like. So, just at it says, some inconsistency between the sampleinfo field (which is part of the trl-matrix) and your data. Best, Jörn On 1/7/2014 11:50 AM, 蔡林 wrote: > Hi, > > I can run my codes according to what you told me. And I saw four conditions in a figure. Thanks for your help. > > But there are still something wrong with my codes. Because I saw warnings in the Command Window in Matlab. > > As follows: > > Warning: the trial definition in the configuration is inconsistent with the actual data >> In utilities\private\warning_once at 158 > In utilities\private\fixsampleinfo at 68 > In ft_datatype_raw at 154 > In ft_checkdata at 298 > In ft_preprocessing at 240 > In outputplot at 5 > Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a > continuous recording >> In utilities\private\warning_once at 158 > In utilities\private\fixsampleinfo at 79 > In ft_datatype_raw at 154 > In ft_checkdata at 298 > In ft_preprocessing at 240 > In outputplot at 5 > preprocessing > preprocessing trial 1 from 1 > > the call to "ft_preprocessing" took 0 seconds > > ******** > Why the data were preprocessed from trial 1 to 1???? > Am I right in the whole codes? > > Thank you in advance. > > Lin Cai > > ----- 原始邮件 ----- > 发件人: Jörn M. Horschig > 收件人: FieldTrip discussion list > 已发送邮件: Tue, 07 Jan 2014 17:02:46 +0800 (CST) > 主题: Re: [FieldTrip] How to plot ERP waveforms > > Hi, > > tricky problem, and a very nasty one, but it's a simple one in the end ;) > > Once you call ft_definetrial you get back a cfg with a .trl matrix. Upon > the next call to ft_definetrial, FieldTrip checks for the presence of > cfg.trl, and if so returns immediately (because ft_definetrial has been > called before). Thus, in the beginning when you compute data_14, > data_24, etc, they will all be based on the same trl. Therefore, the > same data will be computed and all four plots will overlap. > You need to change the name of the output argument for each > ft_definetrial call to be unique to resolve this, something like: > > > cfg_14 = ft_definetrial(cfg); > cfg_14.channel = {'all'}; > data_14 = ft_preprocessing(cfg_14); > > cfg.trialdef.eventvalue = [24]; %markers > cfg_24 = ft_definetrial(cfg); > cfg_24.channel = {'all'}; > data_24 = ft_preprocessing(cfg_24); > > > > Best, > Jörn > > On 1/7/2014 9:42 AM, 蔡林 wrote: >> Dear fieldtripers, >> >> I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: >> >> >> %%preprocessing 40 subjects >> nsubjects = [1:40]; >> for i=1:length (nsubjects) >> j = nsubjects(i); >> cfg = []; >> cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); >> cfg.trialdef.eventtype = 'trial'; >> cfg.trialdef.eventvalue = [14]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_14 = ft_preprocessing(cfg); >> >> cfg.trialdef.eventvalue = [24]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_24 = ft_preprocessing(cfg); >> >> cfg.trialdef.eventvalue = [34]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_34 = ft_preprocessing(cfg); >> >> cfg.trialdef.eventvalue = [44]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_44 = ft_preprocessing(cfg); >> >> outfil = strcat('/EEG/data_s', sprintf('%02d', j)); >> save(outfil, 'data_14','data_24','data_34','data_44'); >> clear data_14* data_24* data_34* data_44*; >> end >> %% calculate the ERP of each subject >> nsubject = [1:40]; >> >> for i=1:length (nsubject) >> j=nsubject(1,i); >> load (sprintf('/EEG/data_s%02d',j)); >> >> cfg = []; >> cfg.latency = [-0.2 1.0]; >> cfg.covariance = 'no'; >> cfg.blcovariance = 'no'; >> >> avg_14=ft_timelockanalysis(cfg,data_14); >> avg_24=ft_timelockanalysis(cfg,data_24); >> avg_34=ft_timelockanalysis(cfg,data_34); >> avg_44=ft_timelockanalysis(cfg,data_44); >> >> cfg = []; >> cfg.baseline = [-0.2 0]; >> cfg.baselinetype = 'absolute'; >> base_14= ft_timelockbaseline(cfg, avg_14); >> base_24= ft_timelockbaseline(cfg, avg_24); >> base_34= ft_timelockbaseline(cfg, avg_34); >> base_44= ft_timelockbaseline(cfg, avg_44); >> >> outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); >> save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); >> clear avg* data*; >> end >> %% calculate the grand average of the 40 subjects >> %%grand average >> cfg = []; >> nsubject = [1:40]; >> >> for i=1:length (nsubject) >> j=nsubject(1,i); >> load(sprintf('/EEG/baseERP_resp_s%02d',j)); >> >> sub_14(i).ERP= avg_14; >> sub_24(i).ERP= avg_24; >> sub_34(i).ERP= avg_34; >> sub_44(i).ERP= avg_44; >> clear avg* >> end >> >> grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C >> grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer >> grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic >> grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double >> >> outfil = strcat('/EEG/n40_grandavgERP_resp'); >> save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); >> %%plotting >> load /EEG/n40_grandavgERP_resp; >> >> cfg = []; >> cfg.layout = 'EEG1010.lay'; >> cfg.xlim = [-0.2 1.0]; >> >> cfg.baseline = 'no'; >> cfg.interactive = 'no'; >> cfg.showlabels = 'yes'; >> cfg.colorbar = 'yes'; >> >> figure; >> ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); >> >> >> >> >> _______________________________________________ >> 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 nheugel89 at gmail.com Tue Jan 7 19:12:50 2014 From: nheugel89 at gmail.com (Nicholas Heugel) Date: Tue, 7 Jan 2014 12:12:50 -0600 Subject: [FieldTrip] Error after MNE In-Reply-To: References: <17F395A3-5627-4410-9030-97FF73B52C9B@donders.ru.nl> Message-ID: Do you know if there is any update on the bug I encountered? Does it look like an issue with setting up the analysis or is it an actual bug in the code? Thanks for your assistance. Nicholas On Wed, Dec 11, 2013 at 7:42 PM, Nicholas Heugel wrote: > I did as you asked. I put it in the core category with the error as the > title > > > On Wed, Dec 11, 2013 at 2:04 AM, jan-mathijs schoffelen < > jan.schoffelen at donders.ru.nl> wrote: > >> Hi Nicholas, >> >> It seems that the fif files lacks some information that FieldTrip assumes >> to be present. I would say that this can only be caused by the fact that >> the version of mne_make_source_space you used does not write the triangle >> area information into the fif file. Could you go to bugzilla.fcdonders.nl, >> create yourself an account, and file the issue as a bug? Please then also >> upload the fif-file you mentioned. I'll have a look at it and make the >> ft_read_headshape function more robust. In the mean time you could comment >> out line 421. >> >> Best, >> Jan-Mathijs >> >> >> >> On Dec 10, 2013, at 6:23 PM, Nicholas Heugel wrote: >> >> I a trying to go through the tutorial for the >> >> - Source reconstruction of event-related fields using minimum-norm >> estimate >> >> I am able to run everything up to the MNE with no problem, and it >> seems like the MNE portion works. But when I run the command bnd = >> ft_read_headshape('Subject01-oct-6-src.fif', 'format', 'mne_source'); >> and then plot it to visualize the source space. I get the error Reference >> to non-existent field 'use_tri_area'. Error in ft_read_headshape (line 421) >> shape.area = [src(1).use_tri_area(:); src(2).use_tri_area(:)]; >> I have looked on this site and online and can't find an explanation >> of what is wrong or how to fix the problem. Any help would be appreciated. >> I am using an Anatomical MRI scan for the head model analysis, the skull >> is present and I manually am Identifying the fiducials. Also, a few >> steps earlier it had me check the white matter segmentation done by >> Freesurfer and that worked fine and what I get closely resembles the >> tutorial. So I think the problem is somewhere in the MNE I am just not >> sure where. Any help would be appreciated. Thank you for your time. >> >> Nicholas >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 7 19:28:40 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 7 Jan 2014 19:28:40 +0100 Subject: [FieldTrip] Error after MNE In-Reply-To: References: <17F395A3-5627-4410-9030-97FF73B52C9B@donders.ru.nl> Message-ID: <0E646317-B08F-4C53-8D47-9D06A08BD5F0@donders.ru.nl> I don't know: did you follow up on bugzilla bug 2419? As mentioned in my earlier mail, for the time being you can work around it by commenting out line 421 in your local version of ft_read_headshape. Jan-Mathijs On Jan 7, 2014, at 7:12 PM, Nicholas Heugel wrote: > Do you know if there is any update on the bug I encountered? Does it look like an issue with setting up the analysis or is it an actual bug in the code? Thanks for your assistance. > > Nicholas > > > On Wed, Dec 11, 2013 at 7:42 PM, Nicholas Heugel wrote: > I did as you asked. I put it in the core category with the error as the title > > > On Wed, Dec 11, 2013 at 2:04 AM, jan-mathijs schoffelen wrote: > Hi Nicholas, > > It seems that the fif files lacks some information that FieldTrip assumes to be present. I would say that this can only be caused by the fact that the version of mne_make_source_space you used does not write the triangle area information into the fif file. Could you go to bugzilla.fcdonders.nl, create yourself an account, and file the issue as a bug? Please then also upload the fif-file you mentioned. I'll have a look at it and make the ft_read_headshape function more robust. In the mean time you could comment out line 421. > > Best, > Jan-Mathijs > > > > On Dec 10, 2013, at 6:23 PM, Nicholas Heugel wrote: > >> I a trying to go through the tutorial for the >> Source reconstruction of event-related fields using minimum-norm estimate >> >> I am able to run everything up to the MNE with no problem, and it seems like the MNE portion works. But when I run the command bnd = ft_read_headshape('Subject01-oct-6-src.fif', 'format', 'mne_source'); >> and then plot it to visualize the source space. I get the error Reference to non-existent field 'use_tri_area'. Error in ft_read_headshape (line 421) shape.area = [src(1).use_tri_area(:); src(2).use_tri_area(:)]; >> I have looked on this site and online and can't find an explanation of what is wrong or how to fix the problem. Any help would be appreciated. I am using an Anatomical MRI scan for the head model analysis, the skull is present and I manually am Identifying the fiducials. Also, a few steps earlier it had me check the white matter segmentation done by Freesurfer and that worked fine and what I get closely resembles the tutorial. So I think the problem is somewhere in the MNE I am just not sure where. Any help would be appreciated. Thank you for your time. >> Nicholas >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From nheugel89 at gmail.com Tue Jan 7 19:31:50 2014 From: nheugel89 at gmail.com (Nicholas Heugel) Date: Tue, 7 Jan 2014 12:31:50 -0600 Subject: [FieldTrip] Error after MNE In-Reply-To: <0E646317-B08F-4C53-8D47-9D06A08BD5F0@donders.ru.nl> References: <17F395A3-5627-4410-9030-97FF73B52C9B@donders.ru.nl> <0E646317-B08F-4C53-8D47-9D06A08BD5F0@donders.ru.nl> Message-ID: Ya I had posted it on bugzilla and I think you had accepted the bug, I was just wondering if you had made any progress on it or determined a cause. Nicholas On Tue, Jan 7, 2014 at 12:28 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > I don't know: did you follow up on bugzilla bug 2419? As mentioned in my > earlier mail, for the time being you can work around it by commenting out > line 421 in your local version of ft_read_headshape. > > Jan-Mathijs > > > > > On Jan 7, 2014, at 7:12 PM, Nicholas Heugel wrote: > > Do you know if there is any update on the bug I encountered? Does it look > like an issue with setting up the analysis or is it an actual bug in the > code? Thanks for your assistance. > > Nicholas > > > On Wed, Dec 11, 2013 at 7:42 PM, Nicholas Heugel wrote: > >> I did as you asked. I put it in the core category with the error as the >> title >> >> >> On Wed, Dec 11, 2013 at 2:04 AM, jan-mathijs schoffelen < >> jan.schoffelen at donders.ru.nl> wrote: >> >>> Hi Nicholas, >>> >>> It seems that the fif files lacks some information that FieldTrip >>> assumes to be present. I would say that this can only be caused by the fact >>> that the version of mne_make_source_space you used does not write the >>> triangle area information into the fif file. Could you go to >>> bugzilla.fcdonders.nl, create yourself an account, and file the issue >>> as a bug? Please then also upload the fif-file you mentioned. I'll have a >>> look at it and make the ft_read_headshape function more robust. In the mean >>> time you could comment out line 421. >>> >>> Best, >>> Jan-Mathijs >>> >>> >>> >>> On Dec 10, 2013, at 6:23 PM, Nicholas Heugel wrote: >>> >>> I a trying to go through the tutorial for the >>> >>> - Source reconstruction of event-related fields using minimum-norm >>> estimate >>> >>> I am able to run everything up to the MNE with no problem, and it >>> seems like the MNE portion works. But when I run the command bnd = >>> ft_read_headshape('Subject01-oct-6-src.fif', 'format', 'mne_source'); >>> and then plot it to visualize the source space. I get the error Reference >>> to non-existent field 'use_tri_area'. Error in ft_read_headshape (line 421) >>> shape.area = [src(1).use_tri_area(:); src(2).use_tri_area(:)]; >>> I have looked on this site and online and can't find an explanation >>> of what is wrong or how to fix the problem. Any help would be appreciated. >>> I am using an Anatomical MRI scan for the head model analysis, the skull >>> is present and I manually am Identifying the fiducials. Also, a few >>> steps earlier it had me check the white matter segmentation done by >>> Freesurfer and that worked fine and what I get closely resembles the >>> tutorial. So I think the problem is somewhere in the MNE I am just not >>> sure where. Any help would be appreciated. Thank you for your time. >>> >>> Nicholas >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bertram0611 at pku.edu.cn Wed Jan 8 12:46:22 2014 From: bertram0611 at pku.edu.cn (=?utf-8?B?6JSh5p6X?=) Date: Wed, 8 Jan 2014 19:46:22 +0800 (CST) Subject: [FieldTrip] =?utf-8?b?5Zue5aSN77yaIFJlOiAg5Zue5aSN77yaIFJlOiAg?= =?utf-8?q?How_to_plot_ERP_waveforms?= In-Reply-To: <52CBE11F.3030005@donders.ru.nl> Message-ID: <956707425.31180.1389181582986.JavaMail.root@bj-mail07.pku.edu.cn> I can not understand what you mean. Please give me some detail infomation about how to solve this problem. ----- 原始邮件 ----- 发件人: Jörn M. Horschig 收件人: FieldTrip discussion list 已发送邮件: Tue, 07 Jan 2014 19:12:31 +0800 (CST) 主题: Re: [FieldTrip] 回复: Re: How to plot ERP waveforms Hi Lin Cai, check whether your trl-matrix (matrices) makes sense. The error means that e.g. according to the sampleinfo there should be a different number of trials than your data contains or stuff the like. So, just at it says, some inconsistency between the sampleinfo field (which is part of the trl-matrix) and your data. Best, Jörn On 1/7/2014 11:50 AM, 蔡林 wrote: > Hi, > > I can run my codes according to what you told me. And I saw four conditions in a figure. Thanks for your help. > > But there are still something wrong with my codes. Because I saw warnings in the Command Window in Matlab. > > As follows: > > Warning: the trial definition in the configuration is inconsistent with the actual data >> In utilities\private\warning_once at 158 > In utilities\private\fixsampleinfo at 68 > In ft_datatype_raw at 154 > In ft_checkdata at 298 > In ft_preprocessing at 240 > In outputplot at 5 > Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a > continuous recording >> In utilities\private\warning_once at 158 > In utilities\private\fixsampleinfo at 79 > In ft_datatype_raw at 154 > In ft_checkdata at 298 > In ft_preprocessing at 240 > In outputplot at 5 > preprocessing > preprocessing trial 1 from 1 > > the call to "ft_preprocessing" took 0 seconds > > ******** > Why the data were preprocessed from trial 1 to 1???? > Am I right in the whole codes? > > Thank you in advance. > > Lin Cai > > ----- 原始邮件 ----- > 发件人: Jörn M. Horschig > 收件人: FieldTrip discussion list > 已发送邮件: Tue, 07 Jan 2014 17:02:46 +0800 (CST) > 主题: Re: [FieldTrip] How to plot ERP waveforms > > Hi, > > tricky problem, and a very nasty one, but it's a simple one in the end ;) > > Once you call ft_definetrial you get back a cfg with a .trl matrix. Upon > the next call to ft_definetrial, FieldTrip checks for the presence of > cfg.trl, and if so returns immediately (because ft_definetrial has been > called before). Thus, in the beginning when you compute data_14, > data_24, etc, they will all be based on the same trl. Therefore, the > same data will be computed and all four plots will overlap. > You need to change the name of the output argument for each > ft_definetrial call to be unique to resolve this, something like: > > > cfg_14 = ft_definetrial(cfg); > cfg_14.channel = {'all'}; > data_14 = ft_preprocessing(cfg_14); > > cfg.trialdef.eventvalue = [24]; %markers > cfg_24 = ft_definetrial(cfg); > cfg_24.channel = {'all'}; > data_24 = ft_preprocessing(cfg_24); > > > > Best, > Jörn > > On 1/7/2014 9:42 AM, 蔡林 wrote: >> Dear fieldtripers, >> >> I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: >> >> >> %%preprocessing 40 subjects >> nsubjects = [1:40]; >> for i=1:length (nsubjects) >> j = nsubjects(i); >> cfg = []; >> cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); >> cfg.trialdef.eventtype = 'trial'; >> cfg.trialdef.eventvalue = [14]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_14 = ft_preprocessing(cfg); >> >> cfg.trialdef.eventvalue = [24]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_24 = ft_preprocessing(cfg); >> >> cfg.trialdef.eventvalue = [34]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_34 = ft_preprocessing(cfg); >> >> cfg.trialdef.eventvalue = [44]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_44 = ft_preprocessing(cfg); >> >> outfil = strcat('/EEG/data_s', sprintf('%02d', j)); >> save(outfil, 'data_14','data_24','data_34','data_44'); >> clear data_14* data_24* data_34* data_44*; >> end >> %% calculate the ERP of each subject >> nsubject = [1:40]; >> >> for i=1:length (nsubject) >> j=nsubject(1,i); >> load (sprintf('/EEG/data_s%02d',j)); >> >> cfg = []; >> cfg.latency = [-0.2 1.0]; >> cfg.covariance = 'no'; >> cfg.blcovariance = 'no'; >> >> avg_14=ft_timelockanalysis(cfg,data_14); >> avg_24=ft_timelockanalysis(cfg,data_24); >> avg_34=ft_timelockanalysis(cfg,data_34); >> avg_44=ft_timelockanalysis(cfg,data_44); >> >> cfg = []; >> cfg.baseline = [-0.2 0]; >> cfg.baselinetype = 'absolute'; >> base_14= ft_timelockbaseline(cfg, avg_14); >> base_24= ft_timelockbaseline(cfg, avg_24); >> base_34= ft_timelockbaseline(cfg, avg_34); >> base_44= ft_timelockbaseline(cfg, avg_44); >> >> outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); >> save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); >> clear avg* data*; >> end >> %% calculate the grand average of the 40 subjects >> %%grand average >> cfg = []; >> nsubject = [1:40]; >> >> for i=1:length (nsubject) >> j=nsubject(1,i); >> load(sprintf('/EEG/baseERP_resp_s%02d',j)); >> >> sub_14(i).ERP= avg_14; >> sub_24(i).ERP= avg_24; >> sub_34(i).ERP= avg_34; >> sub_44(i).ERP= avg_44; >> clear avg* >> end >> >> grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C >> grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer >> grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic >> grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double >> >> outfil = strcat('/EEG/n40_grandavgERP_resp'); >> save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); >> %%plotting >> load /EEG/n40_grandavgERP_resp; >> >> cfg = []; >> cfg.layout = 'EEG1010.lay'; >> cfg.xlim = [-0.2 1.0]; >> >> cfg.baseline = 'no'; >> cfg.interactive = 'no'; >> cfg.showlabels = 'yes'; >> cfg.colorbar = 'yes'; >> >> figure; >> ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); >> >> >> >> >> _______________________________________________ >> 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 -- Lin Cai Department of Psychology, Peking University, Beijing 100871, P.R.China From jm.horschig at donders.ru.nl Wed Jan 8 12:52:38 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Wed, 08 Jan 2014 12:52:38 +0100 Subject: [FieldTrip] =?utf-8?b?5Zue5aSN77yaIFJlOiAg5Zue5aSN77yaIFJlOiAg?= =?utf-8?q?How_to_plot_ERP_waveforms?= In-Reply-To: <956707425.31180.1389181582986.JavaMail.root@bj-mail07.pku.edu.cn> References: <956707425.31180.1389181582986.JavaMail.root@bj-mail07.pku.edu.cn> Message-ID: <52CD3C06.5080002@donders.ru.nl> Hi Lin Cai, you have to solve it yourself by checking your data and cfg. I cannot help with that. Best, Jörn On 1/8/2014 12:46 PM, 蔡林 wrote: > I can not understand what you mean. Please give me some detail infomation about how to solve this problem. > ----- 原始邮件 ----- > 发件人: Jörn M. Horschig > 收件人: FieldTrip discussion list > 已发送邮件: Tue, 07 Jan 2014 19:12:31 +0800 (CST) > 主题: Re: [FieldTrip] 回复: Re: How to plot ERP waveforms > > Hi Lin Cai, > > check whether your trl-matrix (matrices) makes sense. The error means > that e.g. according to the sampleinfo there should be a different number > of trials than your data contains or stuff the like. So, just at it > says, some inconsistency between the sampleinfo field (which is part of > the trl-matrix) and your data. > > Best, > Jörn > > On 1/7/2014 11:50 AM, 蔡林 wrote: >> Hi, >> >> I can run my codes according to what you told me. And I saw four conditions in a figure. Thanks for your help. >> >> But there are still something wrong with my codes. Because I saw warnings in the Command Window in Matlab. >> >> As follows: >> >> Warning: the trial definition in the configuration is inconsistent with the actual data >>> In utilities\private\warning_once at 158 >> In utilities\private\fixsampleinfo at 68 >> In ft_datatype_raw at 154 >> In ft_checkdata at 298 >> In ft_preprocessing at 240 >> In outputplot at 5 >> Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a >> continuous recording >>> In utilities\private\warning_once at 158 >> In utilities\private\fixsampleinfo at 79 >> In ft_datatype_raw at 154 >> In ft_checkdata at 298 >> In ft_preprocessing at 240 >> In outputplot at 5 >> preprocessing >> preprocessing trial 1 from 1 >> >> the call to "ft_preprocessing" took 0 seconds >> >> ******** >> Why the data were preprocessed from trial 1 to 1???? >> Am I right in the whole codes? >> >> Thank you in advance. >> >> Lin Cai >> >> ----- 原始邮件 ----- >> 发件人: Jörn M. Horschig >> 收件人: FieldTrip discussion list >> 已发送邮件: Tue, 07 Jan 2014 17:02:46 +0800 (CST) >> 主题: Re: [FieldTrip] How to plot ERP waveforms >> >> Hi, >> >> tricky problem, and a very nasty one, but it's a simple one in the end ;) >> >> Once you call ft_definetrial you get back a cfg with a .trl matrix. Upon >> the next call to ft_definetrial, FieldTrip checks for the presence of >> cfg.trl, and if so returns immediately (because ft_definetrial has been >> called before). Thus, in the beginning when you compute data_14, >> data_24, etc, they will all be based on the same trl. Therefore, the >> same data will be computed and all four plots will overlap. >> You need to change the name of the output argument for each >> ft_definetrial call to be unique to resolve this, something like: >> >> >> cfg_14 = ft_definetrial(cfg); >> cfg_14.channel = {'all'}; >> data_14 = ft_preprocessing(cfg_14); >> >> cfg.trialdef.eventvalue = [24]; %markers >> cfg_24 = ft_definetrial(cfg); >> cfg_24.channel = {'all'}; >> data_24 = ft_preprocessing(cfg_24); >> >> >> >> Best, >> Jörn >> >> On 1/7/2014 9:42 AM, 蔡林 wrote: >>> Dear fieldtripers, >>> >>> I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: >>> >>> >>> %%preprocessing 40 subjects >>> nsubjects = [1:40]; >>> for i=1:length (nsubjects) >>> j = nsubjects(i); >>> cfg = []; >>> cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); >>> cfg.trialdef.eventtype = 'trial'; >>> cfg.trialdef.eventvalue = [14]; %markers >>> cfg = ft_definetrial(cfg); >>> cfg.channel = {'all'}; >>> data_14 = ft_preprocessing(cfg); >>> >>> cfg.trialdef.eventvalue = [24]; %markers >>> cfg = ft_definetrial(cfg); >>> cfg.channel = {'all'}; >>> data_24 = ft_preprocessing(cfg); >>> >>> cfg.trialdef.eventvalue = [34]; %markers >>> cfg = ft_definetrial(cfg); >>> cfg.channel = {'all'}; >>> data_34 = ft_preprocessing(cfg); >>> >>> cfg.trialdef.eventvalue = [44]; %markers >>> cfg = ft_definetrial(cfg); >>> cfg.channel = {'all'}; >>> data_44 = ft_preprocessing(cfg); >>> >>> outfil = strcat('/EEG/data_s', sprintf('%02d', j)); >>> save(outfil, 'data_14','data_24','data_34','data_44'); >>> clear data_14* data_24* data_34* data_44*; >>> end >>> %% calculate the ERP of each subject >>> nsubject = [1:40]; >>> >>> for i=1:length (nsubject) >>> j=nsubject(1,i); >>> load (sprintf('/EEG/data_s%02d',j)); >>> >>> cfg = []; >>> cfg.latency = [-0.2 1.0]; >>> cfg.covariance = 'no'; >>> cfg.blcovariance = 'no'; >>> >>> avg_14=ft_timelockanalysis(cfg,data_14); >>> avg_24=ft_timelockanalysis(cfg,data_24); >>> avg_34=ft_timelockanalysis(cfg,data_34); >>> avg_44=ft_timelockanalysis(cfg,data_44); >>> >>> cfg = []; >>> cfg.baseline = [-0.2 0]; >>> cfg.baselinetype = 'absolute'; >>> base_14= ft_timelockbaseline(cfg, avg_14); >>> base_24= ft_timelockbaseline(cfg, avg_24); >>> base_34= ft_timelockbaseline(cfg, avg_34); >>> base_44= ft_timelockbaseline(cfg, avg_44); >>> >>> outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); >>> save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); >>> clear avg* data*; >>> end >>> %% calculate the grand average of the 40 subjects >>> %%grand average >>> cfg = []; >>> nsubject = [1:40]; >>> >>> for i=1:length (nsubject) >>> j=nsubject(1,i); >>> load(sprintf('/EEG/baseERP_resp_s%02d',j)); >>> >>> sub_14(i).ERP= avg_14; >>> sub_24(i).ERP= avg_24; >>> sub_34(i).ERP= avg_34; >>> sub_44(i).ERP= avg_44; >>> clear avg* >>> end >>> >>> grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C >>> grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer >>> grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic >>> grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double >>> >>> outfil = strcat('/EEG/n40_grandavgERP_resp'); >>> save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); >>> %%plotting >>> load /EEG/n40_grandavgERP_resp; >>> >>> cfg = []; >>> cfg.layout = 'EEG1010.lay'; >>> cfg.xlim = [-0.2 1.0]; >>> >>> cfg.baseline = 'no'; >>> cfg.interactive = 'no'; >>> cfg.showlabels = 'yes'; >>> cfg.colorbar = 'yes'; >>> >>> figure; >>> ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); >>> >>> >>> >>> >>> _______________________________________________ >>> 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 j.herring at fcdonders.ru.nl Wed Jan 8 15:20:57 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 8 Jan 2014 15:20:57 +0100 (CET) Subject: [FieldTrip] PhD position Ghent University, Belgium Message-ID: <00aa01cf0c7c$d9c35950$8d4a0bf0$@herring@fcdonders.ru.nl> PhD position at the Dept of Experimental Psychology, Ghent University, Belgium We are seeking a highly motivated PhD student for a 4-year position at the Dept. of Experimental Psychology under the supervision of Ruth Krebs and Nico Boehler. One central focus of our labs is the investigation of the interaction between reward processing and cognitive control (see http://users.ugent.be/~rkrebs/index_files/publications.html for related publications). Our department hosts several research groups in the realm of cognitive psychology and cognitive neuroscience, creating a dynamic research environment including regular internal talk series as well as presentations by invited speakers. We have access to state-of-the-art equipment including a research-dedicated 3-tesla MR scanner (Siemens), a 64/128-channel EEG system (Biosemi), as well as an MR-compatible EEG system and TMS. Candidates are expected to have a Master's degree in psychology, (cognitive) neuroscience, or a closely related discipline on the starting date. He or she will mostly carry out behavioral and fMRI experiments, but extensions to EEG (including MR-compatible EEG) are possible. Experience with neuroimaging methods as well as programming skills would be highly appreciated. The starting date is flexible, but preferably in spring 2014. 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 contact information (email) of potential referees to ruth.krebs at ugent.be before February 1st 2014. Ruth Krebs Dept. of Experimental Psychology, Ghent University Henri Dunantlaan 2 9000 Ghent Belgium -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Thu Jan 9 18:56:40 2014 From: luke.bloy at gmail.com (Luke Bloy) Date: Thu, 9 Jan 2014 12:56:40 -0500 Subject: [FieldTrip] Units of ft_dipolefitting Message-ID: Hi, I'd like to check the units returned for the moment returned by the ft_dipolefitting routine. There doesn't seem to be any unit fields in the returned structure. Additionally, ft_compute_leadfield.m doesn't say much about the units. From looking at it I assume the length unit (m/cm/mm) is inherited from the vol and sens objects but I'm not sure about the other units. Thanks. Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jan 10 07:56:52 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 10 Jan 2014 07:56:52 +0100 Subject: [FieldTrip] PhD positions in Freiburg, Germany Message-ID: <52CF99B4.4080102@donders.ru.nl> Forwarded message: University of Freiburg, Germany, has acquired a large research cluster "BrainLinks-BrainTools" within the German Excellence Initiative. Aiming to develop medical technology which directly interacts with the nervous system, it unites the life sciences, engineering, and clinical applications. Within the cluster, PhD positions (100% TV-L E13) are open at the novel lab of Michael Tangermann, addressing research topics in the context of Brain-Computer Interfaces (BCI) and stroke rehabilitation: 1. Development of theories (statistics, mathematics) and algorithms in the field of machine learning for BCI applications, with special emphasis on adaptive and invariant methods for the decoding of mental states and brain networks in real-time. 2. Paradigm development, software implementation, execution and analysis of EEG experiments with (German speaking) patients and healthy users. Requirements: * excellent MSc / Diploma degree * a major in e.g. machine learning / artificial intelligence, cognitive science, neuroscience, mathematics, computer science / informatics, physics * a strong interest in the combination of theoretical and experimental research in a highly interdisciplinary field. Starting date: asap. For further information please read the full PhD call available at: > Contact: Dr. Michael Tangermann, michael.tangermann at blbt.uni-freiburg.de > -- 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 fgrande at cbs.mpg.de Fri Jan 10 15:54:56 2014 From: fgrande at cbs.mpg.de (Federico Grande) Date: Fri, 10 Jan 2014 15:54:56 +0100 (CET) Subject: [FieldTrip] SVD and ICA Message-ID: <50243943.4859.1389365696412.JavaMail.root@zimbra> Hello everyone, In order to remove the artefacts like blink eyes or hearbeat, I wanted to apply ICA to my data. I've been told that is better to apply first SVD and then ICA, but I don't really know how to apply it. What do you recommend me in order to do it? I've not found any tutorial for doing it. All help and information ins greatly welcomed. Thank you very much, King Regards, Federico Grande From d.lozanosoldevilla at fcdonders.ru.nl Fri Jan 10 16:13:13 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Fri, 10 Jan 2014 16:13:13 +0100 (CET) Subject: [FieldTrip] SVD and ICA In-Reply-To: <50243943.4859.1389365696412.JavaMail.root@zimbra> Message-ID: <1280547173.4657638.1389366793780.JavaMail.root@sculptor.zimbra.ru.nl> Hi Federico, You might want to have a look to the different ICA algorithms ft_componentanalysis has and see how to choose the proper option. For example, if you select cfg.method='runica' then cfg.runica.pca = number of components you want to reduce your data. Check help ft_componentanalysis for details best, Diego ----- Original Message ----- > From: "Federico Grande" > To: fieldtrip at science.ru.nl > Sent: Friday, 10 January, 2014 3:54:56 PM > Subject: [FieldTrip] SVD and ICA > Hello everyone, > > In order to remove the artefacts like blink eyes or hearbeat, I wanted > to apply ICA to my data. I've been told that is better to apply first > SVD and then ICA, but I don't really know how to apply it. What do you > recommend me in order to do it? I've not found any tutorial for doing > it. All help and information ins greatly welcomed. > > Thank you very much, > > King Regards, > > Federico Grande > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ From fgrande at cbs.mpg.de Fri Jan 10 18:14:28 2014 From: fgrande at cbs.mpg.de (Federico Grande) Date: Fri, 10 Jan 2014 18:14:28 +0100 (CET) Subject: [FieldTrip] SVD and ICA In-Reply-To: <1280547173.4657638.1389366793780.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1427843396.5968.1389374068812.JavaMail.root@zimbra> Aham, that is what I've done, do the runica method, but I didn´t use the parameter pca: pca are not principal component analysis associated to SSP? I have used SSS (signal space separation) instead of SSP. It would work also? And also I don´t know what number of components do I want to reduce my data. How can I know which is the optimal number? Thank you Diego, Federico ----- Original Message ----- From: "Lozano Soldevilla, D. (Diego)" To: "FieldTrip discussion list" Sent: Friday, January 10, 2014 4:13:13 PM Subject: Re: [FieldTrip] SVD and ICA Hi Federico, You might want to have a look to the different ICA algorithms ft_componentanalysis has and see how to choose the proper option. For example, if you select cfg.method='runica' then cfg.runica.pca = number of components you want to reduce your data. Check help ft_componentanalysis for details best, Diego ----- Original Message ----- > From: "Federico Grande" > To: fieldtrip at science.ru.nl > Sent: Friday, 10 January, 2014 3:54:56 PM > Subject: [FieldTrip] SVD and ICA > Hello everyone, > > In order to remove the artefacts like blink eyes or hearbeat, I wanted > to apply ICA to my data. I've been told that is better to apply first > SVD and then ICA, but I don't really know how to apply it. What do you > recommend me in order to do it? I've not found any tutorial for doing > it. All help and information ins greatly welcomed. > > Thank you very much, > > King Regards, > > Federico Grande > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From aestnth at hum.au.dk Fri Jan 10 18:18:03 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Fri, 10 Jan 2014 18:18:03 +0100 Subject: [FieldTrip] SVD and ICA Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Fri Jan 10 18:27:17 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Fri, 10 Jan 2014 18:27:17 +0100 (CET) Subject: [FieldTrip] SVD and ICA In-Reply-To: <1427843396.5968.1389374068812.JavaMail.root@zimbra> Message-ID: <1593461380.4660324.1389374837434.JavaMail.root@sculptor.zimbra.ru.nl> Hi Federico, I don't follow you. What's SSP? In any case, what I explained it's the way that I know to reduce data dimensionality prior ICA computation. I don't know a procedure to know optimal number of PCA component but here 25 were used: http://www.ncbi.nlm.nih.gov/pubmed/19699307 best, Diego ----- Original Message ----- > From: "Federico Grande" > To: "Diego Lozano" , "FieldTrip discussion list" > Sent: Friday, 10 January, 2014 6:14:28 PM > Subject: Re: [FieldTrip] SVD and ICA > Aham, that is what I've done, do the runica method, but I didn´t use > the parameter pca: pca are not principal component analysis associated > to SSP? I have used SSS (signal space separation) instead of SSP. It > would work also? And also I don´t know what number of components do I > want to reduce my data. How can I know which is the optimal number? > > Thank you Diego, > > Federico > > ----- Original Message ----- > From: "Lozano Soldevilla, D. (Diego)" > > To: "FieldTrip discussion list" > Sent: Friday, January 10, 2014 4:13:13 PM > Subject: Re: [FieldTrip] SVD and ICA > > Hi Federico, > > You might want to have a look to the different ICA algorithms > ft_componentanalysis has and see how to choose the proper option. For > example, if you select cfg.method='runica' then cfg.runica.pca = > number of components you want to reduce your data. > > Check help ft_componentanalysis for details > > best, > Diego > > > ----- Original Message ----- > > From: "Federico Grande" > > To: fieldtrip at science.ru.nl > > Sent: Friday, 10 January, 2014 3:54:56 PM > > Subject: [FieldTrip] SVD and ICA > > Hello everyone, > > > > In order to remove the artefacts like blink eyes or hearbeat, I > > wanted > > to apply ICA to my data. I've been told that is better to apply > > first > > SVD and then ICA, but I don't really know how to apply it. What do > > you > > recommend me in order to do it? I've not found any tutorial for > > doing > > it. All help and information ins greatly welcomed. > > > > Thank you very much, > > > > King Regards, > > > > Federico Grande > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ From fgrande at cbs.mpg.de Sat Jan 11 12:37:38 2014 From: fgrande at cbs.mpg.de (Federico Grande) Date: Sat, 11 Jan 2014 12:37:38 +0100 (CET) Subject: [FieldTrip] SVD and ICA In-Reply-To: <1593461380.4660324.1389374837434.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <403977934.633.1389440258730.JavaMail.root@zimbra> Hi Diego, I'm sorry, I was probably not clear enough. When you uses SSP (Signal Space Projection), to process the rawdata, it projects the data in 8 or 10 PCA, but when you uses SSS in the rawdata, it has a much higher amount of components , around 150 or almost 200. That is the reason that makes me having no idea about how should I reduce it. Cheers, Federico ----- Mensaje original ----- De: "Lozano Soldevilla, D. (Diego)" Para: "FieldTrip discussion list" Enviados: Viernes, 10 de Enero 2014 18:27:17 Asunto: Re: [FieldTrip] SVD and ICA Hi Federico, I don't follow you. What's SSP? In any case, what I explained it's the way that I know to reduce data dimensionality prior ICA computation. I don't know a procedure to know optimal number of PCA component but here 25 were used: http://www.ncbi.nlm.nih.gov/pubmed/19699307 best, Diego ----- Original Message ----- > From: "Federico Grande" > To: "Diego Lozano" , "FieldTrip discussion list" > Sent: Friday, 10 January, 2014 6:14:28 PM > Subject: Re: [FieldTrip] SVD and ICA > Aham, that is what I've done, do the runica method, but I didn´t use > the parameter pca: pca are not principal component analysis associated > to SSP? I have used SSS (signal space separation) instead of SSP. It > would work also? And also I don´t know what number of components do I > want to reduce my data. How can I know which is the optimal number? > > Thank you Diego, > > Federico > > ----- Original Message ----- > From: "Lozano Soldevilla, D. (Diego)" > > To: "FieldTrip discussion list" > Sent: Friday, January 10, 2014 4:13:13 PM > Subject: Re: [FieldTrip] SVD and ICA > > Hi Federico, > > You might want to have a look to the different ICA algorithms > ft_componentanalysis has and see how to choose the proper option. For > example, if you select cfg.method='runica' then cfg.runica.pca = > number of components you want to reduce your data. > > Check help ft_componentanalysis for details > > best, > Diego > > > ----- Original Message ----- > > From: "Federico Grande" > > To: fieldtrip at science.ru.nl > > Sent: Friday, 10 January, 2014 3:54:56 PM > > Subject: [FieldTrip] SVD and ICA > > Hello everyone, > > > > In order to remove the artefacts like blink eyes or hearbeat, I > > wanted > > to apply ICA to my data. I've been told that is better to apply > > first > > SVD and then ICA, but I don't really know how to apply it. What do > > you > > recommend me in order to do it? I've not found any tutorial for > > doing > > it. All help and information ins greatly welcomed. > > > > Thank you very much, > > > > King Regards, > > > > Federico Grande > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From aestnth at hum.au.dk Sat Jan 11 12:41:12 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Sat, 11 Jan 2014 12:41:12 +0100 Subject: [FieldTrip] SVD and ICA Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Sat Jan 11 13:47:56 2014 From: pgoodin at swin.edu.au (Peter Goodin) Date: Sat, 11 Jan 2014 12:47:56 +0000 Subject: [FieldTrip] SVD and ICA In-Reply-To: <403977934.633.1389440258730.JavaMail.root@zimbra> References: <1593461380.4660324.1389374837434.JavaMail.root@sculptor.zimbra.ru.nl>, <403977934.633.1389440258730.JavaMail.root@zimbra> Message-ID: Hi Federico, Seeing as how you've stated using SSS, I'm going to assume you're using a neuromag system which has decreased the dimensionality of your data already through the extraction of "B-out" components. There are two options - the first is to use runica and and reduce the number of components to ~70 through PCA (covered in a couple of posts on this list). The second is to use the fastica algorithm which will automagically calculate the optimal amount of components to be extracted from the data. ICA will typically give far more components than SSP will projectors as ICA a model free method (so includes things such as EOG + ECG + EMG + external arefact + brain components). SSP however is model based and will only return projectors based on input (such as examples of eye blinks / ECG). Hope this helps, Peter __________________________ Peter Goodin, BSc (Hons), Ph.D Candidate. Brain and Psychological Sciences Research Centre (BPsych) Swinburne University, Hawthorn, Vic, 3122 Monash Alfred Psychiatry Research Centre (MAPrc) Level 4, 607 St Kilda Road, Melbourne 3004 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Federico Grande [fgrande at cbs.mpg.de] Sent: Saturday, 11 January 2014 10:37 PM To: Diego Lozano; FieldTrip discussion list Subject: Re: [FieldTrip] SVD and ICA Hi Diego, I'm sorry, I was probably not clear enough. When you uses SSP (Signal Space Projection), to process the rawdata, it projects the data in 8 or 10 PCA, but when you uses SSS in the rawdata, it has a much higher amount of components , around 150 or almost 200. That is the reason that makes me having no idea about how should I reduce it. Cheers, Federico ----- Mensaje original ----- De: "Lozano Soldevilla, D. (Diego)" Para: "FieldTrip discussion list" Enviados: Viernes, 10 de Enero 2014 18:27:17 Asunto: Re: [FieldTrip] SVD and ICA Hi Federico, I don't follow you. What's SSP? In any case, what I explained it's the way that I know to reduce data dimensionality prior ICA computation. I don't know a procedure to know optimal number of PCA component but here 25 were used: http://www.ncbi.nlm.nih.gov/pubmed/19699307 best, Diego ----- Original Message ----- > From: "Federico Grande" > To: "Diego Lozano" , "FieldTrip discussion list" > Sent: Friday, 10 January, 2014 6:14:28 PM > Subject: Re: [FieldTrip] SVD and ICA > Aham, that is what I've done, do the runica method, but I didn´t use > the parameter pca: pca are not principal component analysis associated > to SSP? I have used SSS (signal space separation) instead of SSP. It > would work also? And also I don´t know what number of components do I > want to reduce my data. How can I know which is the optimal number? > > Thank you Diego, > > Federico > > ----- Original Message ----- > From: "Lozano Soldevilla, D. (Diego)" > > To: "FieldTrip discussion list" > Sent: Friday, January 10, 2014 4:13:13 PM > Subject: Re: [FieldTrip] SVD and ICA > > Hi Federico, > > You might want to have a look to the different ICA algorithms > ft_componentanalysis has and see how to choose the proper option. For > example, if you select cfg.method='runica' then cfg.runica.pca = > number of components you want to reduce your data. > > Check help ft_componentanalysis for details > > best, > Diego > > > ----- Original Message ----- > > From: "Federico Grande" > > To: fieldtrip at science.ru.nl > > Sent: Friday, 10 January, 2014 3:54:56 PM > > Subject: [FieldTrip] SVD and ICA > > Hello everyone, > > > > In order to remove the artefacts like blink eyes or hearbeat, I > > wanted > > to apply ICA to my data. I've been told that is better to apply > > first > > SVD and then ICA, but I don't really know how to apply it. What do > > you > > recommend me in order to do it? I've not found any tutorial for > > doing > > it. All help and information ins greatly welcomed. > > > > Thank you very much, > > > > King Regards, > > > > Federico Grande > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ _______________________________________________ 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 ayobimpe2004 at hotmail.com Mon Jan 13 10:24:09 2014 From: ayobimpe2004 at hotmail.com (Azeez Adebimpe) Date: Mon, 13 Jan 2014 10:24:09 +0100 Subject: [FieldTrip] Source level statistics Message-ID: Dear all, I have sources for the same condition and I am not sure of if my design matrix is ok. I want to test to be sure that there is no significant difference between the group. Please can somebody help me with the design matrix? Azeez Adebimpe -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Mon Jan 13 10:27:28 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Mon, 13 Jan 2014 10:27:28 +0100 Subject: [FieldTrip] Source level statistics Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Tue Jan 14 07:19:37 2014 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Tue, 14 Jan 2014 06:19:37 +0000 Subject: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series Message-ID: Hi all, Reading through the discussion list, I see others have also had some issues with creating grand averaged source space time series (ERFs) and subsequent statistical analysis, but I can't see any solutions.... Questions: How can I create time series (ERFs) for grand averaged source space data? And, how can I do cluster analysis on these (yet to be created) grand averaged source space ERFs? I have used ft_SOURCEANALYSIS with method 'lcmv' for individual participants to generate source space time series, in data.avg.mom. Subsequently I used ft_sourcegrandaverage to combine source space data across subjects. However my grand averaged source data.avg only contains 'pow' and no 'mom'. Eg, no time series for the grand averaged source space data. As such, I can not do cluster analysis on grand averaged ERFs in source space. It appears that ft_sourcestatistics only works with parameters that have not more than one value per grid point (e.g. pow, nai etc) and is unable to work with ERF time series? Is this true? Can any one help with this? Much obliged. Kaelasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Tue Jan 14 07:23:04 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Tue, 14 Jan 2014 07:23:04 +0100 Subject: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 14 07:52:09 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 14 Jan 2014 07:52:09 +0100 Subject: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series In-Reply-To: References: Message-ID: Hi Kaelasha, You actually don't need to use ft_sourcegrandaverage if your goal is to do statistics. Ft_sourcestatistics in principle knows how to deal with multiple inputs. Thus, rather than doing cfg = []; cfg.keepindividual = 'yes'; grandavg = ft_sourcegrandaverage(cfg, subjectdata{:}); you can do something like this cfg = your cfg to ft_sourcestatistics stat = ft_sourcestatistics(cfg, grandavg{:}); Now, the question boils down to 'how to fool ft_sourcestatistics to swallow my data?'. The following should more or less work (but requires some manual labour): The time courses at the voxel level are present in source.avg.mom. These are most likely 3xN, 3 dipole orientations times N time points. In order to reduce this, one can project the orientation along the first pca-axis. This can be achieved by a call to ft_sourcedescriptives with cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place with cfg.fixedori = 'yes'. Then, you could do something like: pow = zeros(size(source.pos,1),length(source.time); pow(source.inside,:) = cat(1,source.avg.mom{source.inside}); source.avg.pow = pow; Just to be sure, add a time-axis to the source structure, i.e. source.time = tlck.time (tlck being the data structure used to create the lcmv-output). I think this should bring you close to doing statistics. Best, Jan-Mathijs On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote: > Hi all, > > Reading through the discussion list, I see others have also had some issues with creating grand averaged source space time series (ERFs) and subsequent statistical analysis, but I can't see any solutions.... > > Questions: > How can I create time series (ERFs) for grand averaged source space data? > And, how can I do cluster analysis on these (yet to be created) grand averaged source space ERFs? > > > I have used ft_SOURCEANALYSIS with method 'lcmv' for individual participants to generate source space time series, in data.avg.mom. > > Subsequently I used ft_sourcegrandaverage to combine source space data across subjects. > > However my grand averaged source data.avg only contains 'pow' and no 'mom'. Eg, no time series for the grand averaged source space data. > > As such, I can not do cluster analysis on grand averaged ERFs in source space. > > It appears that ft_sourcestatistics only works with parameters that have not more than one value per grid point (e.g. pow, nai etc) and is unable to work with ERF time series? Is this true? > > Can any one help with this? > > Much obliged. > Kaelasha > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 14 09:24:55 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 14 Jan 2014 09:24:55 +0100 Subject: [FieldTrip] ft_volumerealign: issue when coregistering to headshape Message-ID: <74251E8E-6F80-463B-8073-7D81FC311B00@donders.ru.nl> Dear all, I have fixed a somewhat critical issue in ft_volumerealign. Please disregard this e-mail (i.e. don't worry about it) if you have never used this function to coregister your anatomical MRI to a headshape (with cfg.headshape = something) in the past couple of months (starting from October 2013). The long story short: when supplying ft_volumerealign with a headshape in the configuration, the function tries to register the anatomical MRI to this headshape, by creating a 3D model of the scalp surface (based on the MRI) and using an iterative closest point algorithm for registration. So far so good. Yet, as of revision 8576 (committed to svn on Sept 30 2013) I added an interactive alignment step to this procedure, because the icp-algorithm is known to behave well only if the point clouds are already approximately registered. That is, in my experience an approximate registration based on the fiducials only was not always sufficient to achieve a nice coregistration. This being said, the introduction of this additional interactive step also introduced a bug, in that the transformation matrix that was estimated with the icp-algorithm was not properly dealt with. Actually, this information was never used for the registration and as a result the coregistration matrix outputted in ft_volumerealign was the one that resulted from the interactive realignment only. Not a total disaster, because I expect the user to get an as good as possible coregistration by hand to begin with, but also not how it should be. My apologies for any inconvenience caused. The issue has been fixed as of svn revision 9096. Happy computing, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Wed Jan 15 09:14:16 2014 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Wed, 15 Jan 2014 08:14:16 +0000 Subject: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series In-Reply-To: References: , Message-ID: Hi Jan-Mathijs, Thanks for this response. I still have a question though. You mentioned that it is not necessary to use ft_sourcegrandaverage to perform statistical analysis with source space ERFs across multiple participants. However, what you appeared to suggest in your email, does appear to still use a grand average, e.g. you wrote: >you can do something like this >cfg = your cfg to ft_sourcestatistics >stat = ft_sourcestatistics(cfg, grandavg{:}); Having played around with it a bit more, I am still unclear how to use multiple inputs (e.g., multiple subjects source data) when using ft_sourcestatistics. I had thought that ft_sourcegrandavarge was a necessity. Can you make this a bit clearer? Also, I did go back and use cfg.fixedori='yes' when calling my first ft_srouceanalysis and moved also my source.avg.mom data into source.avg.pow as you suggested, but this still leaves me with the question above- how to use multiple subjects source data in ft_sourcestatistics? Once again, any help from anyone would be much appreciated! Kaelasha ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] Sent: Tuesday, 14 January 2014 5:52 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series Hi Kaelasha, You actually don't need to use ft_sourcegrandaverage if your goal is to do statistics. Ft_sourcestatistics in principle knows how to deal with multiple inputs. Thus, rather than doing cfg = []; cfg.keepindividual = 'yes'; grandavg = ft_sourcegrandaverage(cfg, subjectdata{:}); you can do something like this cfg = your cfg to ft_sourcestatistics stat = ft_sourcestatistics(cfg, grandavg{:}); Now, the question boils down to 'how to fool ft_sourcestatistics to swallow my data?'. The following should more or less work (but requires some manual labour): The time courses at the voxel level are present in source.avg.mom. These are most likely 3xN, 3 dipole orientations times N time points. In order to reduce this, one can project the orientation along the first pca-axis. This can be achieved by a call to ft_sourcedescriptives with cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place with cfg.fixedori = 'yes'. Then, you could do something like: pow = zeros(size(source.pos,1),length(source.time); pow(source.inside,:) = cat(1,source.avg.mom{source.inside}); source.avg.pow = pow; Just to be sure, add a time-axis to the source structure, i.e. source.time = tlck.time (tlck being the data structure used to create the lcmv-output). I think this should bring you close to doing statistics. Best, Jan-Mathijs On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote: Hi all, Reading through the discussion list, I see others have also had some issues with creating grand averaged source space time series (ERFs) and subsequent statistical analysis, but I can't see any solutions.... Questions: How can I create time series (ERFs) for grand averaged source space data? And, how can I do cluster analysis on these (yet to be created) grand averaged source space ERFs? I have used ft_SOURCEANALYSIS with method 'lcmv' for individual participants to generate source space time series, in data.avg.mom. Subsequently I used ft_sourcegrandaverage to combine source space data across subjects. However my grand averaged source data.avg only contains 'pow' and no 'mom'. Eg, no time series for the grand averaged source space data. As such, I can not do cluster analysis on grand averaged ERFs in source space. It appears that ft_sourcestatistics only works with parameters that have not more than one value per grid point (e.g. pow, nai etc) and is unable to work with ERF time series? Is this true? Can any one help with this? Much obliged. Kaelasha _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Wed Jan 15 09:20:24 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Wed, 15 Jan 2014 09:20:24 +0100 Subject: [FieldTrip] =?utf-8?q?ft=5Fsourcestatistics_and_sourcegrandaverag?= =?utf-8?q?e_=09time=09series?= Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thomas.Baumgarten at med.uni-duesseldorf.de Wed Jan 15 09:35:07 2014 From: Thomas.Baumgarten at med.uni-duesseldorf.de (Thomas.Baumgarten at med.uni-duesseldorf.de) Date: Wed, 15 Jan 2014 08:35:07 +0000 Subject: [FieldTrip] Problems with statistics for circular data Message-ID: <6C58B92C2519E64688A9E25C7A0D07236E38677D@MAIL1-UKD.VMED.UKD> Dear FieldTrip users, I am working on a set of circular data (phase angles of ongoing oscillations computed via Hilbert transform) and would like to statistically compare two conditions (A,B). For this, I use the circular statistics toolbox for matlab by P. Berens. I worked on this problem from two different angles: 1. First, I tried to directly compare the two conditions via the Watson-Williams two-sample test (function: circ_wwtest). Unfortunately, this didn't work out, since the test requires an average resultant vector length of > 0.45 for n >= 11 entries/ subjects, an assumption which is not met by my data. 2. Second, I tried to calculate the angle of difference between the two conditions (angle(A) - angle(B)) and then used the one-sample mean angle test (function: circ_mtest) to test if the resulting angle of difference is significantly different from zero. Here, the following problems arise: Since the resulting angles for A and B range from -pi to +pi, there are cases when the subtraction of the two angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) - (B = -pi) = 2pi), resulting in an error from the circ_mtest function. I tried to solve this problem by using a modulus (2pi) operation (i.e. by 'cleaning out' the redundant circumventions while at the same time preserving the angle information), but unfortunately this didn't work out either. The only other option I can think of would be to generate surrogate data (i.e. a matrix with the same dimensions as the matrix with the angles of difference , only filled with zeros) and to apply a cluster-based permutation test (similar to ft_freqstatitics). Although this would take care of my multiple-comparison problem, I am not quite sure if the cluster correction is still valid in this case and if this test would work for circular data. I would greatly appreciate any comments and advice on this matter. Thanks for your help, Thomas Thomas Baumgarten, PhD Student Institute of Clinical Neuroscience and Medical Psychology, Medical Faculty, Heinrich-Heine-University Düsseldorf, Universitätsstraße 1, 40225 Düsseldorf, Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias.staudigl at uni-konstanz.de Wed Jan 15 10:19:04 2014 From: tobias.staudigl at uni-konstanz.de (Tobias Staudigl) Date: Wed, 15 Jan 2014 10:19:04 +0100 Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: <6C58B92C2519E64688A9E25C7A0D07236E38677D@MAIL1-UKD.VMED.UKD> References: <6C58B92C2519E64688A9E25C7A0D07236E38677D@MAIL1-UKD.VMED.UKD> Message-ID: <52D65288.3070207@uni-konstanz.de> Dear Thomas, try using circ_dist.m (in the circ_stats toolbox by Berens). This should solve the circular difference issue. all the best, Tobias Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: > > Dear FieldTrip users, > > I am working on a set of circular data (phase angles of ongoing > oscillations computed via Hilbert transform) and would like to > statistically compare two conditions (A,B). For this, I use the > circular statistics toolbox for matlab by P. Berens. I worked on this > problem from two different angles: > > 1. First, I tried to directly compare the two conditions via the > Watson-Williams two-sample test (function: circ_wwtest). > Unfortunately, this didn't work out, since the test requires an > average resultant vector length of > 0.45 for n >= 11 entries/ > subjects, an assumption which is not met by my data. > > 2. Second, I tried to calculate the angle of difference between the > two conditions (angle(A) -- angle(B)) and then used the one-sample > mean angle test (function: circ_mtest) to test if the resulting angle > of difference is significantly different from zero. Here, the > following problems arise: Since the resulting angles for A and B range > from --pi to +pi, there are cases when the subtraction of the two > angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) -- > (B = -pi) = 2pi), resulting in an error from the circ_mtest function. > I tried to solve this problem by using a modulus (2pi) operation (i.e. > by 'cleaning out' the redundant circumventions while at the same time > preserving the angle information), but unfortunately this didn't work > out either. > > The only other option I can think of would be to generate surrogate > data (i.e. a matrix with the same dimensions as the matrix with the > angles of difference , only filled with zeros) and to apply a > cluster-based permutation test (similar to ft_freqstatitics). Although > this would take care of my multiple-comparison problem, I am not quite > sure if the cluster correction is still valid in this case and if this > test would work for circular data. > > I would greatly appreciate any comments and advice on this matter. > > Thanks for your help, > > Thomas > > Thomas Baumgarten, PhD Student > > Institute of Clinical Neuroscience and Medical Psychology, Medical > Faculty, Heinrich-Heine-University Düsseldorf, Universitätsstraße 1, > 40225 Düsseldorf, Germany > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Tobias Staudigl Fachbereich Psychologie - ZPR Postfach ZPR 78457 Konstanz ZPR, Haus 12 Tel.: +49 (0)7531 / 88 - 5703 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jan 15 11:18:53 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 15 Jan 2014 11:18:53 +0100 Subject: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series In-Reply-To: References: , Message-ID: <14425A96-E395-4757-904B-5AFB8FEED3EB@donders.ru.nl> Hi Kaelasha, Sorry for being unclear. You can do something like: stat = ft_sourcestatistics(cfg, data1, data2, data3, data4, ....), or stat = ft_sourcestatistics(cfg, data{:}); where data is a cell-array of structures (1 cell for each participant/condition). Best, Jan-Mathijs On Jan 15, 2014, at 9:14 AM, Kaelasha Tyler wrote: > Hi Jan-Mathijs, > > Thanks for this response. > I still have a question though. > You mentioned that it is not necessary to use ft_sourcegrandaverage to perform statistical analysis with source space ERFs across multiple participants. However, what you appeared to suggest in your email, does appear to still use a grand average, e.g. you wrote: > > >you can do something like this > > >cfg = your cfg to ft_sourcestatistics > >stat = ft_sourcestatistics(cfg, grandavg{:}); > > Having played around with it a bit more, I am still unclear how to use multiple inputs (e.g., multiple subjects source data) when using ft_sourcestatistics. I had thought that ft_sourcegrandavarge was a necessity. > Can you make this a bit clearer? > > Also, I did go back and use cfg.fixedori='yes' when calling my first ft_srouceanalysis and moved also my source.avg.mom data into source.avg.pow as you suggested, but this still leaves me with the question above- how to use multiple subjects source data in ft_sourcestatistics? > > Once again, any help from anyone would be much appreciated! > > Kaelasha > > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] > Sent: Tuesday, 14 January 2014 5:52 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series > > Hi Kaelasha, > > You actually don't need to use ft_sourcegrandaverage if your goal is to do statistics. Ft_sourcestatistics in principle knows how to deal with multiple inputs. > Thus, > rather than doing > > cfg = []; > cfg.keepindividual = 'yes'; > grandavg = ft_sourcegrandaverage(cfg, subjectdata{:}); > > you can do something like this > > cfg = your cfg to ft_sourcestatistics > stat = ft_sourcestatistics(cfg, grandavg{:}); > > Now, the question boils down to 'how to fool ft_sourcestatistics to swallow my data?'. > > The following should more or less work (but requires some manual labour): > > The time courses at the voxel level are present in source.avg.mom. These are most likely 3xN, 3 dipole orientations times N time points. In order to reduce this, one can project the orientation along the first pca-axis. This can be achieved by a call to ft_sourcedescriptives with cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place with cfg.fixedori = 'yes'. > Then, you could do something like: > > pow = zeros(size(source.pos,1),length(source.time); > pow(source.inside,:) = cat(1,source.avg.mom{source.inside}); > source.avg.pow = pow; > > Just to be sure, add a time-axis to the source structure, i.e. source.time = tlck.time (tlck being the data structure used to create the lcmv-output). > > I think this should bring you close to doing statistics. > > Best, > Jan-Mathijs > > > > On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote: > >> Hi all, >> >> Reading through the discussion list, I see others have also had some issues with creating grand averaged source space time series (ERFs) and subsequent statistical analysis, but I can't see any solutions.... >> >> Questions: >> How can I create time series (ERFs) for grand averaged source space data? >> And, how can I do cluster analysis on these (yet to be created) grand averaged source space ERFs? >> >> >> I have used ft_SOURCEANALYSIS with method 'lcmv' for individual participants to generate source space time series, in data.avg.mom. >> >> Subsequently I used ft_sourcegrandaverage to combine source space data across subjects. >> >> However my grand averaged source data.avg only contains 'pow' and no 'mom'. Eg, no time series for the grand averaged source space data. >> >> As such, I can not do cluster analysis on grand averaged ERFs in source space. >> >> It appears that ft_sourcestatistics only works with parameters that have not more than one value per grid point (e.g. pow, nai etc) and is unable to work with ERF time series? Is this true? >> >> Can any one help with this? >> >> Much obliged. >> Kaelasha >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrecravo at gmail.com Wed Jan 15 13:04:53 2014 From: andrecravo at gmail.com (Andre Cravo) Date: Wed, 15 Jan 2014 10:04:53 -0200 Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: <52D65288.3070207@uni-konstanz.de> References: <6C58B92C2519E64688A9E25C7A0D07236E38677D@MAIL1-UKD.VMED.UKD> <52D65288.3070207@uni-konstanz.de> Message-ID: Dear Thomas, Is it a paired test? If you are interested, I have implemented some paired t-tests for circular data based on Zar's book. Best -- Andre M. Cravo Center for Mathematics, Computation and Cognition Federal University of ABC., Brazil http://neuro.ufabc.edu.br/timing On 15 January 2014 07:19, Tobias Staudigl wrote: > Dear Thomas, > > try using circ_dist.m (in the circ_stats toolbox by Berens). > This should solve the circular difference issue. > > all the best, > Tobias > > Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: > > Dear FieldTrip users, > > I am working on a set of circular data (phase angles of ongoing oscillations > computed via Hilbert transform) and would like to statistically compare two > conditions (A,B). For this, I use the circular statistics toolbox for matlab > by P. Berens. I worked on this problem from two different angles: > > 1. First, I tried to directly compare the two conditions via the > Watson-Williams two-sample test (function: circ_wwtest). Unfortunately, this > didn’t work out, since the test requires an average resultant vector length > of > 0.45 for n >= 11 entries/ subjects, an assumption which is not met by > my data. > > 2. Second, I tried to calculate the angle of difference between the two > conditions (angle(A) – angle(B)) and then used the one-sample mean angle > test (function: circ_mtest) to test if the resulting angle of difference is > significantly different from zero. Here, the following problems arise: Since > the resulting angles for A and B range from –pi to +pi, there are cases when > the subtraction of the two angles results in roughly +2pi or -2pi (e.g. > cases where (A = pi) – (B = -pi) = 2pi), resulting in an error from the > circ_mtest function. I tried to solve this problem by using a modulus (2pi) > operation (i.e. by ‘cleaning out’ the redundant circumventions while at the > same time preserving the angle information), but unfortunately this didn’t > work out either. > > The only other option I can think of would be to generate surrogate data > (i.e. a matrix with the same dimensions as the matrix with the angles of > difference , only filled with zeros) and to apply a cluster-based > permutation test (similar to ft_freqstatitics). Although this would take > care of my multiple-comparison problem, I am not quite sure if the cluster > correction is still valid in this case and if this test would work for > circular data. > > I would greatly appreciate any comments and advice on this matter. > > Thanks for your help, > > Thomas > > > > > > Thomas Baumgarten, PhD Student > > Institute of Clinical Neuroscience and Medical Psychology, Medical Faculty, > Heinrich-Heine-University Düsseldorf, Universitätsstraße 1, 40225 > Düsseldorf, Germany > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Dr. Tobias Staudigl > Fachbereich Psychologie - ZPR > Postfach ZPR > 78457 Konstanz > ZPR, Haus 12 > Tel.: +49 (0)7531 / 88 - 5703 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From pierre.megevand at gmail.com Wed Jan 15 15:47:30 2014 From: pierre.megevand at gmail.com (=?ISO-8859-1?Q?Pierre_M=E9gevand?=) Date: Wed, 15 Jan 2014 09:47:30 -0500 Subject: [FieldTrip] Problems with statistics for circular data Message-ID: Dear Thomas, When the assumptions of the parametric Watson-Williams test aren't met, you can use non-parametric statistical tests for circular data, such as Watson's Yr or U2 tests. The Yr test is implemented in the MATLAB toolbox PhasePACK by Daniel Rizzuto: cmean_test.m function, https://github.com/iandol/spikes/tree/master/Various/PhasePACK). You can find matlab code for the U2 test here: http://www.mathworks.com/matlabcentral/fileexchange/43543-watsons-u2-statistic-based-permutation-test-for-circular-data. I programmed this; it runs very slowly, so if anyone is interested in looking into it I'm sure we could make it much better. Pierre -- Pierre Mégevand, MD, PhD Post-doctoral research fellow Laboratory for Multimodal Human Brain Mapping Feinstein Institute for Medical Research Manhasset, NY, USA On Wed, Jan 15, 2014 at 5:20 AM, wrote: > 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. Re: Problems with statistics for circular data (Tobias Staudigl) > 2. Re: ft_sourcestatistics and sourcegrandaverage time series > (jan-mathijs schoffelen) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 15 Jan 2014 10:19:04 +0100 > From: Tobias Staudigl > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Problems with statistics for circular data > Message-ID: <52D65288.3070207 at uni-konstanz.de> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Dear Thomas, > > try using circ_dist.m (in the circ_stats toolbox by Berens). > This should solve the circular difference issue. > > all the best, > Tobias > > Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: > > > > Dear FieldTrip users, > > > > I am working on a set of circular data (phase angles of ongoing > > oscillations computed via Hilbert transform) and would like to > > statistically compare two conditions (A,B). For this, I use the > > circular statistics toolbox for matlab by P. Berens. I worked on this > > problem from two different angles: > > > > 1. First, I tried to directly compare the two conditions via the > > Watson-Williams two-sample test (function: circ_wwtest). > > Unfortunately, this didn't work out, since the test requires an > > average resultant vector length of > 0.45 for n >= 11 entries/ > > subjects, an assumption which is not met by my data. > > > > 2. Second, I tried to calculate the angle of difference between the > > two conditions (angle(A) -- angle(B)) and then used the one-sample > > mean angle test (function: circ_mtest) to test if the resulting angle > > of difference is significantly different from zero. Here, the > > following problems arise: Since the resulting angles for A and B range > > from --pi to +pi, there are cases when the subtraction of the two > > angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) -- > > (B = -pi) = 2pi), resulting in an error from the circ_mtest function. > > I tried to solve this problem by using a modulus (2pi) operation (i.e. > > by 'cleaning out' the redundant circumventions while at the same time > > preserving the angle information), but unfortunately this didn't work > > out either. > > > > The only other option I can think of would be to generate surrogate > > data (i.e. a matrix with the same dimensions as the matrix with the > > angles of difference , only filled with zeros) and to apply a > > cluster-based permutation test (similar to ft_freqstatitics). Although > > this would take care of my multiple-comparison problem, I am not quite > > sure if the cluster correction is still valid in this case and if this > > test would work for circular data. > > > > I would greatly appreciate any comments and advice on this matter. > > > > Thanks for your help, > > > > Thomas > > > > Thomas Baumgarten, PhD Student > > > > Institute of Clinical Neuroscience and Medical Psychology, Medical > > Faculty, Heinrich-Heine-University D?sseldorf, Universit?tsstra?e 1, > > 40225 D?sseldorf, Germany > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Dr. Tobias Staudigl > Fachbereich Psychologie - ZPR > Postfach ZPR > 78457 Konstanz > ZPR, Haus 12 > Tel.: +49 (0)7531 / 88 - 5703 > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140115/c71480a1/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Wed, 15 Jan 2014 11:18:53 +0100 > From: jan-mathijs schoffelen > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage > time series > Message-ID: <14425A96-E395-4757-904B-5AFB8FEED3EB at donders.ru.nl> > Content-Type: text/plain; charset="us-ascii" > > Hi Kaelasha, > > Sorry for being unclear. You can do something like: > > stat = ft_sourcestatistics(cfg, data1, data2, data3, data4, ....), or stat > = ft_sourcestatistics(cfg, data{:}); where data is a cell-array of > structures (1 cell for each participant/condition). > > Best, > Jan-Mathijs > > > > > On Jan 15, 2014, at 9:14 AM, Kaelasha Tyler wrote: > > > Hi Jan-Mathijs, > > > > Thanks for this response. > > I still have a question though. > > You mentioned that it is not necessary to use ft_sourcegrandaverage to > perform statistical analysis with source space ERFs across multiple > participants. However, what you appeared to suggest in your email, does > appear to still use a grand average, e.g. you wrote: > > > > >you can do something like this > > > > >cfg = your cfg to ft_sourcestatistics > > >stat = ft_sourcestatistics(cfg, grandavg{:}); > > > > Having played around with it a bit more, I am still unclear how to use > multiple inputs (e.g., multiple subjects source data) when using > ft_sourcestatistics. I had thought that ft_sourcegrandavarge was a > necessity. > > Can you make this a bit clearer? > > > > Also, I did go back and use cfg.fixedori='yes' when calling my first > ft_srouceanalysis and moved also my source.avg.mom data into source.avg.pow > as you suggested, but this still leaves me with the question above- how to > use multiple subjects source data in ft_sourcestatistics? > > > > Once again, any help from anyone would be much appreciated! > > > > Kaelasha > > > > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] > on behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] > > Sent: Tuesday, 14 January 2014 5:52 PM > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time > series > > > > Hi Kaelasha, > > > > You actually don't need to use ft_sourcegrandaverage if your goal is to > do statistics. Ft_sourcestatistics in principle knows how to deal with > multiple inputs. > > Thus, > > rather than doing > > > > cfg = []; > > cfg.keepindividual = 'yes'; > > grandavg = ft_sourcegrandaverage(cfg, subjectdata{:}); > > > > you can do something like this > > > > cfg = your cfg to ft_sourcestatistics > > stat = ft_sourcestatistics(cfg, grandavg{:}); > > > > Now, the question boils down to 'how to fool ft_sourcestatistics to > swallow my data?'. > > > > The following should more or less work (but requires some manual labour): > > > > The time courses at the voxel level are present in source.avg.mom. These > are most likely 3xN, 3 dipole orientations times N time points. In order to > reduce this, one can project the orientation along the first pca-axis. This > can be achieved by a call to ft_sourcedescriptives with > cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place > with cfg.fixedori = 'yes'. > > Then, you could do something like: > > > > pow = zeros(size(source.pos,1),length(source.time); > > pow(source.inside,:) = cat(1,source.avg.mom{source.inside}); > > source.avg.pow = pow; > > > > Just to be sure, add a time-axis to the source structure, i.e. > source.time = tlck.time (tlck being the data structure used to create the > lcmv-output). > > > > I think this should bring you close to doing statistics. > > > > Best, > > Jan-Mathijs > > > > > > > > On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote: > > > >> Hi all, > >> > >> Reading through the discussion list, I see others have also had some > issues with creating grand averaged source space time series (ERFs) and > subsequent statistical analysis, but I can't see any solutions.... > >> > >> Questions: > >> How can I create time series (ERFs) for grand averaged source space > data? > >> And, how can I do cluster analysis on these (yet to be created) grand > averaged source space ERFs? > >> > >> > >> I have used ft_SOURCEANALYSIS with method 'lcmv' for individual > participants to generate source space time series, in data.avg.mom. > >> > >> Subsequently I used ft_sourcegrandaverage to combine source space data > across subjects. > >> > >> However my grand averaged source data.avg only contains 'pow' and no > 'mom'. Eg, no time series for the grand averaged source space data. > >> > >> As such, I can not do cluster analysis on grand averaged ERFs in source > space. > >> > >> It appears that ft_sourcestatistics only works with parameters that > have not more than one value per grid point (e.g. pow, nai etc) and is > unable to work with ERF time series? Is this true? > >> > >> Can any one help with this? > >> > >> Much obliged. > >> Kaelasha > >> > >> > >> > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > Jan-Mathijs Schoffelen, MD PhD > > > > Donders Institute for Brain, Cognition and Behaviour, > > Centre for Cognitive Neuroimaging, > > Radboud University Nijmegen, The Netherlands > > > > Max Planck Institute for Psycholinguistics, > > Nijmegen, The Netherlands > > > > J.Schoffelen at donders.ru.nl > > Telephone: +31-24-3614793 > > > > http://www.hettaligebrein.nl > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140115/a1878500/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 38, Issue 18 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thomas.Baumgarten at med.uni-duesseldorf.de Wed Jan 15 16:07:37 2014 From: Thomas.Baumgarten at med.uni-duesseldorf.de (Thomas.Baumgarten at med.uni-duesseldorf.de) Date: Wed, 15 Jan 2014 15:07:37 +0000 Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: <52D65288.3070207@uni-konstanz.de> References: <6C58B92C2519E64688A9E25C7A0D07236E38677D@MAIL1-UKD.VMED.UKD> <52D65288.3070207@uni-konstanz.de> Message-ID: <6C58B92C2519E64688A9E25C7A0D07236E387058@MAIL1-UKD.VMED.UKD> Dear Tobias, Thank you for the hint! Indeed, this makes the calculation of the circular difference much easier and the resulting values stay between -pi and pi. Sorry that I didn't think of this, since the purpose of the function is rather obvious. Best regards, Thomas Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Tobias Staudigl Gesendet: Mittwoch, 15. Januar 2014 10:19 An: FieldTrip discussion list Betreff: Re: [FieldTrip] Problems with statistics for circular data Dear Thomas, try using circ_dist.m (in the circ_stats toolbox by Berens). This should solve the circular difference issue. all the best, Tobias Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: Dear FieldTrip users, I am working on a set of circular data (phase angles of ongoing oscillations computed via Hilbert transform) and would like to statistically compare two conditions (A,B). For this, I use the circular statistics toolbox for matlab by P. Berens. I worked on this problem from two different angles: 1. First, I tried to directly compare the two conditions via the Watson-Williams two-sample test (function: circ_wwtest). Unfortunately, this didn't work out, since the test requires an average resultant vector length of > 0.45 for n >= 11 entries/ subjects, an assumption which is not met by my data. 2. Second, I tried to calculate the angle of difference between the two conditions (angle(A) - angle(B)) and then used the one-sample mean angle test (function: circ_mtest) to test if the resulting angle of difference is significantly different from zero. Here, the following problems arise: Since the resulting angles for A and B range from -pi to +pi, there are cases when the subtraction of the two angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) - (B = -pi) = 2pi), resulting in an error from the circ_mtest function. I tried to solve this problem by using a modulus (2pi) operation (i.e. by 'cleaning out' the redundant circumventions while at the same time preserving the angle information), but unfortunately this didn't work out either. The only other option I can think of would be to generate surrogate data (i.e. a matrix with the same dimensions as the matrix with the angles of difference , only filled with zeros) and to apply a cluster-based permutation test (similar to ft_freqstatitics). Although this would take care of my multiple-comparison problem, I am not quite sure if the cluster correction is still valid in this case and if this test would work for circular data. I would greatly appreciate any comments and advice on this matter. Thanks for your help, Thomas Thomas Baumgarten, PhD Student Institute of Clinical Neuroscience and Medical Psychology, Medical Faculty, Heinrich-Heine-University Düsseldorf, Universitätsstraße 1, 40225 Düsseldorf, Germany _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Tobias Staudigl Fachbereich Psychologie - ZPR Postfach ZPR 78457 Konstanz ZPR, Haus 12 Tel.: +49 (0)7531 / 88 - 5703 -------------- next part -------------- An HTML attachment was scrubbed... URL: From strauss at cbs.mpg.de Wed Jan 15 16:42:23 2014 From: strauss at cbs.mpg.de (Antje Strauss) Date: Wed, 15 Jan 2014 16:42:23 +0100 (CET) Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: Message-ID: <1136676999.7333.1389800543739.JavaMail.root@zimbra> Dear Thomas, my experience with EEG data is that your resultant vector length will hardly ever exceed 0.45 making the Watson-Williams test unapplicable. But I used a solution suggested by Niko Busch and colleagues in 2009 (J Neuroscience). There, they introduce a measure called "bifurcation index" which you could calculate for each time-frequency bin and then run a fieldtrip style cluster permutation statistic against zero. Best, Antje > Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: > > Dear FieldTrip users, > > I am working on a set of circular data (phase angles of ongoing oscillations > computed via Hilbert transform) and would like to statistically compare two > conditions (A,B). For this, I use the circular statistics toolbox for matlab > by P. Berens. I worked on this problem from two different angles: > > 1. First, I tried to directly compare the two conditions via the > Watson-Williams two-sample test (function: circ_wwtest). Unfortunately, this > didn?t work out, since the test requires an average resultant vector length > of > 0.45 for n >= 11 entries/ subjects, an assumption which is not met by > my data. > > 2. Second, I tried to calculate the angle of difference between the two > conditions (angle(A) ? angle(B)) and then used the one-sample mean angle > test (function: circ_mtest) to test if the resulting angle of difference is > significantly different from zero. Here, the following problems arise: Since > the resulting angles for A and B range from ?pi to +pi, there are cases when > the subtraction of the two angles results in roughly +2pi or -2pi (e.g. > cases where (A = pi) ? (B = -pi) = 2pi), resulting in an error from the > circ_mtest function. I tried to solve this problem by using a modulus (2pi) > operation (i.e. by ?cleaning out? the redundant circumventions while at the > same time preserving the angle information), but unfortunately this didn?t > work out either. > > The only other option I can think of would be to generate surrogate data > (i.e. a matrix with the same dimensions as the matrix with the angles of > difference , only filled with zeros) and to apply a cluster-based > permutation test (similar to ft_freqstatitics). Although this would take > care of my multiple-comparison problem, I am not quite sure if the cluster > correction is still valid in this case and if this test would work for > circular data. > > I would greatly appreciate any comments and advice on this matter. > > Thanks for your help, > > Thomas > > > > > > Thomas Baumgarten, PhD Student > > Institute of Clinical Neuroscience and Medical Psychology, Medical Faculty, > Heinrich-Heine-University D?sseldorf, Universit?tsstra?e 1, 40225 > D?sseldorf, Germany > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Dr. Tobias Staudigl > Fachbereich Psychologie - ZPR > Postfach ZPR > 78457 Konstanz > ZPR, Haus 12 > Tel.: +49 (0)7531 / 88 - 5703 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Antje Strauß, M.A. Auditory Cognition Research Group Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a - Leipzig, Germany (p) +49 (0)341 9940 2482 (e) strauss at cbs.mpg.de From sklein at berkeley.edu Wed Jan 15 16:50:07 2014 From: sklein at berkeley.edu (Stanley A. KLEIN) Date: Wed, 15 Jan 2014 10:50:07 -0500 Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: <6C58B92C2519E64688A9E25C7A0D07236E387058@MAIL1-UKD.VMED.UKD> References: <6C58B92C2519E64688A9E25C7A0D07236E38677D@MAIL1-UKD.VMED.UKD> <52D65288.3070207@uni-konstanz.de> <6C58B92C2519E64688A9E25C7A0D07236E387058@MAIL1-UKD.VMED.UKD> Message-ID: Could someone clarify for me the solution for dealing with circular data. Suppose I simple want to calculate the standard deviation of measuring the phase of something. Since the distribution isn't Gaussian, what does one do other than permutation cluster analysis sort of stuff (but not for calculating standard deviation). Stan On Wed, Jan 15, 2014 at 10:07 AM, wrote: > Dear Tobias, > > Thank you for the hint! Indeed, this makes the calculation of the circular > difference much easier and the resulting values stay between -pi and pi. > Sorry that I didn’t think of this, since the purpose of the function is > rather obvious. > > > > Best regards, > > Thomas > > > > *Von:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *Im Auftrag von *Tobias Staudigl > *Gesendet:* Mittwoch, 15. Januar 2014 10:19 > *An:* FieldTrip discussion list > *Betreff:* Re: [FieldTrip] Problems with statistics for circular data > > > > Dear Thomas, > > try using circ_dist.m (in the circ_stats toolbox by Berens). > This should solve the circular difference issue. > > all the best, > Tobias > > Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: > > Dear FieldTrip users, > > I am working on a set of circular data (phase angles of ongoing > oscillations computed via Hilbert transform) and would like to > statistically compare two conditions (A,B). For this, I use the circular > statistics toolbox for matlab by P. Berens. I worked on this problem from > two different angles: > > 1. First, I tried to directly compare the two conditions via the > Watson-Williams two-sample test (function: circ_wwtest). Unfortunately, > this didn’t work out, since the test requires an average resultant vector > length of > 0.45 for n >= 11 entries/ subjects, an assumption which is not > met by my data. > > 2. Second, I tried to calculate the angle of difference between the two > conditions (angle(A) – angle(B)) and then used the one-sample mean angle > test (function: circ_mtest) to test if the resulting angle of difference is > significantly different from zero. Here, the following problems arise: > Since the resulting angles for A and B range from –pi to +pi, there are > cases when the subtraction of the two angles results in roughly +2pi or > -2pi (e.g. cases where (A = pi) – (B = -pi) = 2pi), resulting in an error > from the circ_mtest function. I tried to solve this problem by using a > modulus (2pi) operation (i.e. by ‘cleaning out’ the redundant > circumventions while at the same time preserving the angle information), > but unfortunately this didn’t work out either. > > The only other option I can think of would be to generate surrogate data > (i.e. a matrix with the same dimensions as the matrix with the angles of > difference , only filled with zeros) and to apply a cluster-based > permutation test (similar to ft_freqstatitics). Although this would take > care of my multiple-comparison problem, I am not quite sure if the cluster > correction is still valid in this case and if this test would work for > circular data. > > I would greatly appreciate any comments and advice on this matter. > > Thanks for your help, > > Thomas > > > > > > Thomas Baumgarten, PhD Student > > Institute of Clinical Neuroscience and Medical Psychology, Medical > Faculty, Heinrich-Heine-University Düsseldorf, Universitätsstraße 1, 40225 > Düsseldorf, Germany > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > > Dr. Tobias Staudigl > > Fachbereich Psychologie - ZPR > > Postfach ZPR > > 78457 Konstanz > > ZPR, Haus 12 > > Tel.: +49 (0)7531 / 88 - 5703 > > > _______________________________________________ > 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 Thomas.Baumgarten at med.uni-duesseldorf.de Thu Jan 16 07:52:58 2014 From: Thomas.Baumgarten at med.uni-duesseldorf.de (Thomas.Baumgarten at med.uni-duesseldorf.de) Date: Thu, 16 Jan 2014 06:52:58 +0000 Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: References: Message-ID: <6C58B92C2519E64688A9E25C7A0D07236E387103@MAIL1-UKD.VMED.UKD> Dear Pierre, Thank you very much for your quick reply. I downloaded the scripts for the two non-parametrical tests and will give it a try. Again, thanks for the help! Best regards, Thomas Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Pierre Mégevand Gesendet: Mittwoch, 15. Januar 2014 15:48 An: fieldtrip at science.ru.nl Betreff: Re: [FieldTrip] Problems with statistics for circular data Dear Thomas, When the assumptions of the parametric Watson-Williams test aren't met, you can use non-parametric statistical tests for circular data, such as Watson's Yr or U2 tests. The Yr test is implemented in the MATLAB toolbox PhasePACK by Daniel Rizzuto: cmean_test.m function, https://github.com/iandol/spikes/tree/master/Various/PhasePACK). You can find matlab code for the U2 test here: http://www.mathworks.com/matlabcentral/fileexchange/43543-watsons-u2-statistic-based-permutation-test-for-circular-data. I programmed this; it runs very slowly, so if anyone is interested in looking into it I'm sure we could make it much better. Pierre -- Pierre Mégevand, MD, PhD Post-doctoral research fellow Laboratory for Multimodal Human Brain Mapping Feinstein Institute for Medical Research Manhasset, NY, USA On Wed, Jan 15, 2014 at 5:20 AM, > wrote: 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. Re: Problems with statistics for circular data (Tobias Staudigl) 2. Re: ft_sourcestatistics and sourcegrandaverage time series (jan-mathijs schoffelen) ---------------------------------------------------------------------- Message: 1 Date: Wed, 15 Jan 2014 10:19:04 +0100 From: Tobias Staudigl > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Problems with statistics for circular data Message-ID: <52D65288.3070207 at uni-konstanz.de> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Dear Thomas, try using circ_dist.m (in the circ_stats toolbox by Berens). This should solve the circular difference issue. all the best, Tobias Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: > > Dear FieldTrip users, > > I am working on a set of circular data (phase angles of ongoing > oscillations computed via Hilbert transform) and would like to > statistically compare two conditions (A,B). For this, I use the > circular statistics toolbox for matlab by P. Berens. I worked on this > problem from two different angles: > > 1. First, I tried to directly compare the two conditions via the > Watson-Williams two-sample test (function: circ_wwtest). > Unfortunately, this didn't work out, since the test requires an > average resultant vector length of > 0.45 for n >= 11 entries/ > subjects, an assumption which is not met by my data. > > 2. Second, I tried to calculate the angle of difference between the > two conditions (angle(A) -- angle(B)) and then used the one-sample > mean angle test (function: circ_mtest) to test if the resulting angle > of difference is significantly different from zero. Here, the > following problems arise: Since the resulting angles for A and B range > from --pi to +pi, there are cases when the subtraction of the two > angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) -- > (B = -pi) = 2pi), resulting in an error from the circ_mtest function. > I tried to solve this problem by using a modulus (2pi) operation (i.e. > by 'cleaning out' the redundant circumventions while at the same time > preserving the angle information), but unfortunately this didn't work > out either. > > The only other option I can think of would be to generate surrogate > data (i.e. a matrix with the same dimensions as the matrix with the > angles of difference , only filled with zeros) and to apply a > cluster-based permutation test (similar to ft_freqstatitics). Although > this would take care of my multiple-comparison problem, I am not quite > sure if the cluster correction is still valid in this case and if this > test would work for circular data. > > I would greatly appreciate any comments and advice on this matter. > > Thanks for your help, > > Thomas > > Thomas Baumgarten, PhD Student > > Institute of Clinical Neuroscience and Medical Psychology, Medical > Faculty, Heinrich-Heine-University D?sseldorf, Universit?tsstra?e 1, > 40225 D?sseldorf, Germany > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Tobias Staudigl Fachbereich Psychologie - ZPR Postfach ZPR 78457 Konstanz ZPR, Haus 12 Tel.: +49 (0)7531 / 88 - 5703 -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Wed, 15 Jan 2014 11:18:53 +0100 From: jan-mathijs schoffelen > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series Message-ID: <14425A96-E395-4757-904B-5AFB8FEED3EB at donders.ru.nl> Content-Type: text/plain; charset="us-ascii" Hi Kaelasha, Sorry for being unclear. You can do something like: stat = ft_sourcestatistics(cfg, data1, data2, data3, data4, ....), or stat = ft_sourcestatistics(cfg, data{:}); where data is a cell-array of structures (1 cell for each participant/condition). Best, Jan-Mathijs On Jan 15, 2014, at 9:14 AM, Kaelasha Tyler wrote: > Hi Jan-Mathijs, > > Thanks for this response. > I still have a question though. > You mentioned that it is not necessary to use ft_sourcegrandaverage to perform statistical analysis with source space ERFs across multiple participants. However, what you appeared to suggest in your email, does appear to still use a grand average, e.g. you wrote: > > >you can do something like this > > >cfg = your cfg to ft_sourcestatistics > >stat = ft_sourcestatistics(cfg, grandavg{:}); > > Having played around with it a bit more, I am still unclear how to use multiple inputs (e.g., multiple subjects source data) when using ft_sourcestatistics. I had thought that ft_sourcegrandavarge was a necessity. > Can you make this a bit clearer? > > Also, I did go back and use cfg.fixedori='yes' when calling my first ft_srouceanalysis and moved also my source.avg.mom data into source.avg.pow as you suggested, but this still leaves me with the question above- how to use multiple subjects source data in ft_sourcestatistics? > > Once again, any help from anyone would be much appreciated! > > Kaelasha > > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] > Sent: Tuesday, 14 January 2014 5:52 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series > > Hi Kaelasha, > > You actually don't need to use ft_sourcegrandaverage if your goal is to do statistics. Ft_sourcestatistics in principle knows how to deal with multiple inputs. > Thus, > rather than doing > > cfg = []; > cfg.keepindividual = 'yes'; > grandavg = ft_sourcegrandaverage(cfg, subjectdata{:}); > > you can do something like this > > cfg = your cfg to ft_sourcestatistics > stat = ft_sourcestatistics(cfg, grandavg{:}); > > Now, the question boils down to 'how to fool ft_sourcestatistics to swallow my data?'. > > The following should more or less work (but requires some manual labour): > > The time courses at the voxel level are present in source.avg.mom. These are most likely 3xN, 3 dipole orientations times N time points. In order to reduce this, one can project the orientation along the first pca-axis. This can be achieved by a call to ft_sourcedescriptives with cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place with cfg.fixedori = 'yes'. > Then, you could do something like: > > pow = zeros(size(source.pos,1),length(source.time); > pow(source.inside,:) = cat(1,source.avg.mom{source.inside}); > source.avg.pow = pow; > > Just to be sure, add a time-axis to the source structure, i.e. source.time = tlck.time (tlck being the data structure used to create the lcmv-output). > > I think this should bring you close to doing statistics. > > Best, > Jan-Mathijs > > > > On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote: > >> Hi all, >> >> Reading through the discussion list, I see others have also had some issues with creating grand averaged source space time series (ERFs) and subsequent statistical analysis, but I can't see any solutions.... >> >> Questions: >> How can I create time series (ERFs) for grand averaged source space data? >> And, how can I do cluster analysis on these (yet to be created) grand averaged source space ERFs? >> >> >> I have used ft_SOURCEANALYSIS with method 'lcmv' for individual participants to generate source space time series, in data.avg.mom. >> >> Subsequently I used ft_sourcegrandaverage to combine source space data across subjects. >> >> However my grand averaged source data.avg only contains 'pow' and no 'mom'. Eg, no time series for the grand averaged source space data. >> >> As such, I can not do cluster analysis on grand averaged ERFs in source space. >> >> It appears that ft_sourcestatistics only works with parameters that have not more than one value per grid point (e.g. pow, nai etc) and is unable to work with ERF time series? Is this true? >> >> Can any one help with this? >> >> Much obliged. >> Kaelasha >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 38, Issue 18 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Thu Jan 16 07:58:52 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Thu, 16 Jan 2014 07:58:52 +0100 Subject: [FieldTrip] Problems with statistics for circular data Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bertram0611 at pku.edu.cn Thu Jan 16 10:27:40 2014 From: bertram0611 at pku.edu.cn (=?utf-8?B?6JSh5p6X?=) Date: Thu, 16 Jan 2014 17:27:40 +0800 (CST) Subject: [FieldTrip] =?gbk?q?something_wrong_with_my_permutation_test_for_?= =?gbk?q?ERP?= Message-ID: <1496187365.22750.1389864460364.JavaMail.root@bj-mail07.pku.edu.cn> Dear fieldtripers, I have already understood the tuitorials about how to do a permutation test for ERP analysis. I made some codes to do that. But I got some strange results and plots. And I couldnot find problems about my codes. %%%%%%%%%%%Codes: cfg = []; cfg.keepindividual = 'yes'; cfg.channel = 'all'; avg_12 = ft_timelockgrandaverage (cfg, data_12(:).ERP); avg_22 = ft_timelockgrandaverage (cfg, data_22(:).ERP); clear data*; outfil = strcat('/EEG/Discourse_Exp2/n16_grandavg_keeptrial_all_12vs22'); save(outfil, 'avg_12', 'avg_22'); load /EEG/Discourse_Exp2/n16_grandavg_keeptrial_all_12vs22; load (sprintf('E:/EEG/Discourse_Exp2/neighbours_Lin.mat')); % cfgneigh.neighbourdist = 42; %or 45, define the cluster neighbours % select all channels within 40 mm distance of the current channel as neighbours % cfgneigh.elec = elec; % read channel locations and labels from this file cfg.neighbours = neighbours_build; % load J:/new_4_names/data_valence/fieldtrip/elec_60; % cfgneigh.neighbourdist = 42; % select all channels within 36 mm distance of the current channel as neighbours % cfgneigh.elec = elec; % read channel locations and labels from this file % cfg.neighbours = ft_prepare_neighbours(cfgneigh); cfg.channel = {'all'}; cfg.method = 'montecarlo'; % cfg.design = [1:24 1:24; ones(1,24), ones(1,24) * 2]; cfg.design = [1:16 1:16; ones(1,16), ones(1,16) * 2]; cfg.uvar = 1; % subject number (unit variable) on line 1 of the design matrix cfg.ivar = 2; % condition number (independent variable) on line 2 of the design matrix cfg.latency = [0.2 1]; cfg.avgovertime = 'no';%(default = 'no') cfg.numrandomization = 1000; cfg.correctm = 'cluster'; cfg.alpha = 0.05; cfg.tail = 0; % one-or two-sided testing cfg.clusterstatistic = 'maxsum'; % maximum sum of t-values within one cluster is the test statistic cfg.clusterthreshold = 'parametric'; % paired-sample t-test for the uncorrected t-values cfg.clusteralpha = 0.05; cfg.clustertail = 0; % two-sided testing; cfg.statistic = 'depsamplesT'; statis_all_12vs22 = ft_timelockstatistics(cfg, avg_12, avg_22); outfil = strcat('/EEG/Discourse_Exp2/n16_statis_all_12vs22'); save(outfil, 'statis_all_12vs22') %%%%%clustor plot load /EEG/Discourse_Exp2/n16_grandavgERP_resp; load /EEG/Discourse_Exp2/n16_statis_all_12vs22; GA_RvsC = grandavg_12; GA_RvsC.avg = grandavg_22.avg - grandavg_12.avg; figure; timestep = 0.05; %(in seconds) sampling_rate = 500; sample_count = length(statis_all_12vs22.time); j = [0:timestep:1]; % Temporal endpoints (in seconds) of the ERP average computed in each subplot m = [1:timestep*500:sample_count]; % temporal endpoints in MEEG samples pos_cluster_pvals = [statis_all_12vs22.posclusters(:).prob]; pos_signif_clust = find(pos_cluster_pvals < statis_all_12vs22.cfg.alpha); pos = ismember(statis_all_12vs22.posclusterslabelmat, pos_signif_clust); neg_cluster_pvals = [statis_all_12vs22.negclusters(:).prob]; neg_signif_clust = find(neg_cluster_pvals < statis_all_12vs22.cfg.alpha); neg = ismember(statis_all_12vs22.negclusterslabelmat, neg_signif_clust); pos = statis_all_12vs22.posclusterslabelmat == 1; % or == 2, or 3, etc. neg = statis_all_12vs22.negclusterslabelmat == 1; for k = 1:16; subplot(4,4,k); cfg = []; cfg.layout = 'Lin_use.lay'; cfg.xlim=[j(k) j(k+1)]; %cfg.zlim = [-1.0e-13 1.0e-13]; pos_int = all(pos(:, m(k):m(k+1)), 2); neg_int = all(neg(:, m(k):m(k+1)), 2); cfg.highlight = 'on'; cfg.highlightchannel = find(pos_int | neg_int); cfg.comment = 'xlim'; cfg.commentpos = 'title'; ft_topoplotER(cfg, GA_RvsC); end Please help me. Thanks a lot! -- Lin Cai Department of Psychology, Peking University, Beijing 100871, P.R.China -------------- next part -------------- A non-text attachment was scrubbed... Name: strange2.jpg Type: image/jpeg Size: 150724 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: strange.jpg Type: image/jpeg Size: 49512 bytes Desc: not available URL: From f.roux at bcbl.eu Thu Jan 16 13:00:24 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 16 Jan 2014 13:00:24 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing Message-ID: <897231397.337853.1389873624028.JavaMail.root@bcbl.eu> Dear all, does anyone know of a good method to downsample MEG-data acquired with a CTF system before reading it into Matlab/fieldtrip. I remember that there is a command-line tool provided by CTF which can do preprocessing, but I don't remember exactly if it does the job. Or does anyone know of a good alternative solution? Best, Fred From andrecravo at gmail.com Thu Jan 16 13:04:30 2014 From: andrecravo at gmail.com (Andre Cravo) Date: Thu, 16 Jan 2014 10:04:30 -0200 Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: <6C58B92C2519E64688A9E25C7A0D07236E387103@MAIL1-UKD.VMED.UKD> References: <6C58B92C2519E64688A9E25C7A0D07236E387103@MAIL1-UKD.VMED.UKD> Message-ID: Dear Thomas, Please find attached two scripts with parametric paired t-tests for circular data. The first is for first order data, so the input are two vectors with the data. The second one is for second order data, so you need four vectors as inputs: two with the phase values and two with the respective mean resultant length for each phase value. This is important since in second order data(as when you are comparing data from different participants) you should give higher weights to values that are more concentrated around their mean phase. I wrote the scripts to myself, so they are not as commented as they should be, but I hope they are straight forward enough. Please write me if you have any doubts or find any mistakes. Best -- Andre M. Cravo Center for Mathematics, Computation and Cognition Federal University of ABC., Brazil http://neuro.ufabc.edu.br/timing On 16 January 2014 04:52, wrote: > Dear Pierre, > > > > Thank you very much for your quick reply. I downloaded the scripts for the > two non-parametrical tests and will give it a try. Again, thanks for the > help! > > > > Best regards, > > Thomas > > > > Von: fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Pierre Mégevand > Gesendet: Mittwoch, 15. Januar 2014 15:48 > An: fieldtrip at science.ru.nl > > > Betreff: Re: [FieldTrip] Problems with statistics for circular data > > > > Dear Thomas, > > > > When the assumptions of the parametric Watson-Williams test aren't met, you > can use non-parametric statistical tests for circular data, such as Watson's > Yr or U2 tests. > > > > The Yr test is implemented in the MATLAB toolbox PhasePACK by Daniel > Rizzuto: cmean_test.m function, > https://github.com/iandol/spikes/tree/master/Various/PhasePACK). > > > > You can find matlab code for the U2 test here: > http://www.mathworks.com/matlabcentral/fileexchange/43543-watsons-u2-statistic-based-permutation-test-for-circular-data. > I programmed this; it runs very slowly, so if anyone is interested in > looking into it I'm sure we could make it much better. > > > > Pierre > > -- > > Pierre Mégevand, MD, PhD > > Post-doctoral research fellow > > Laboratory for Multimodal Human Brain Mapping > > Feinstein Institute for Medical Research > > Manhasset, NY, USA > > > > On Wed, Jan 15, 2014 at 5:20 AM, wrote: > > 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. Re: Problems with statistics for circular data (Tobias Staudigl) > 2. Re: ft_sourcestatistics and sourcegrandaverage time series > (jan-mathijs schoffelen) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 15 Jan 2014 10:19:04 +0100 > From: Tobias Staudigl > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Problems with statistics for circular data > Message-ID: <52D65288.3070207 at uni-konstanz.de> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > > > Dear Thomas, > > try using circ_dist.m (in the circ_stats toolbox by Berens). > This should solve the circular difference issue. > > all the best, > Tobias > > Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: >> >> Dear FieldTrip users, >> >> I am working on a set of circular data (phase angles of ongoing >> oscillations computed via Hilbert transform) and would like to >> statistically compare two conditions (A,B). For this, I use the >> circular statistics toolbox for matlab by P. Berens. I worked on this >> problem from two different angles: >> >> 1. First, I tried to directly compare the two conditions via the >> Watson-Williams two-sample test (function: circ_wwtest). >> Unfortunately, this didn't work out, since the test requires an >> average resultant vector length of > 0.45 for n >= 11 entries/ >> subjects, an assumption which is not met by my data. >> >> 2. Second, I tried to calculate the angle of difference between the >> two conditions (angle(A) -- angle(B)) and then used the one-sample > >> mean angle test (function: circ_mtest) to test if the resulting angle >> of difference is significantly different from zero. Here, the >> following problems arise: Since the resulting angles for A and B range >> from --pi to +pi, there are cases when the subtraction of the two >> angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) -- > >> (B = -pi) = 2pi), resulting in an error from the circ_mtest function. >> I tried to solve this problem by using a modulus (2pi) operation (i.e. >> by 'cleaning out' the redundant circumventions while at the same time >> preserving the angle information), but unfortunately this didn't work >> out either. >> >> The only other option I can think of would be to generate surrogate >> data (i.e. a matrix with the same dimensions as the matrix with the >> angles of difference , only filled with zeros) and to apply a >> cluster-based permutation test (similar to ft_freqstatitics). Although >> this would take care of my multiple-comparison problem, I am not quite >> sure if the cluster correction is still valid in this case and if this >> test would work for circular data. >> >> I would greatly appreciate any comments and advice on this matter. >> >> Thanks for your help, >> >> Thomas >> >> Thomas Baumgarten, PhD Student >> >> Institute of Clinical Neuroscience and Medical Psychology, Medical >> Faculty, Heinrich-Heine-University D?sseldorf, Universit?tsstra?e 1, >> 40225 D?sseldorf, Germany > >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Dr. Tobias Staudigl > Fachbereich Psychologie - ZPR > Postfach ZPR > 78457 Konstanz > ZPR, Haus 12 > Tel.: +49 (0)7531 / 88 - 5703 > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > > ------------------------------ > > Message: 2 > Date: Wed, 15 Jan 2014 11:18:53 +0100 > From: jan-mathijs schoffelen > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage > time series > Message-ID: <14425A96-E395-4757-904B-5AFB8FEED3EB at donders.ru.nl> > Content-Type: text/plain; charset="us-ascii" > > Hi Kaelasha, > > Sorry for being unclear. You can do something like: > > stat = ft_sourcestatistics(cfg, data1, data2, data3, data4, ....), or stat = > ft_sourcestatistics(cfg, data{:}); where data is a cell-array of structures > (1 cell for each participant/condition). > > Best, > Jan-Mathijs > > > > > On Jan 15, 2014, at 9:14 AM, Kaelasha Tyler wrote: > >> Hi Jan-Mathijs, >> >> Thanks for this response. >> I still have a question though. >> You mentioned that it is not necessary to use ft_sourcegrandaverage to >> perform statistical analysis with source space ERFs across multiple >> participants. However, what you appeared to suggest in your email, does >> appear to still use a grand average, e.g. you wrote: >> >> >you can do something like this >> >> >cfg = your cfg to ft_sourcestatistics >> >stat = ft_sourcestatistics(cfg, grandavg{:}); >> >> Having played around with it a bit more, I am still unclear how to use >> multiple inputs (e.g., multiple subjects source data) when using >> ft_sourcestatistics. I had thought that ft_sourcegrandavarge was a >> necessity. >> Can you make this a bit clearer? >> >> Also, I did go back and use cfg.fixedori='yes' when calling my first >> ft_srouceanalysis and moved also my source.avg.mom data into source.avg.pow >> as you suggested, but this still leaves me with the question above- how to >> use multiple subjects source data in ft_sourcestatistics? >> >> Once again, any help from anyone would be much appreciated! >> >> Kaelasha >> >> From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on >> behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] >> Sent: Tuesday, 14 January 2014 5:52 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time >> series >> >> Hi Kaelasha, >> >> You actually don't need to use ft_sourcegrandaverage if your goal is to do >> statistics. Ft_sourcestatistics in principle knows how to deal with multiple >> inputs. >> Thus, >> rather than doing >> >> cfg = []; >> cfg.keepindividual = 'yes'; >> grandavg = ft_sourcegrandaverage(cfg, subjectdata{:}); >> >> you can do something like this >> >> cfg = your cfg to ft_sourcestatistics >> stat = ft_sourcestatistics(cfg, grandavg{:}); >> >> Now, the question boils down to 'how to fool ft_sourcestatistics to >> swallow my data?'. >> >> The following should more or less work (but requires some manual labour): >> >> The time courses at the voxel level are present in source.avg.mom. These >> are most likely 3xN, 3 dipole orientations times N time points. In order to >> reduce this, one can project the orientation along the first pca-axis. This >> can be achieved by a call to ft_sourcedescriptives with >> cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place >> with cfg.fixedori = 'yes'. >> Then, you could do something like: >> >> pow = zeros(size(source.pos,1),length(source.time); >> pow(source.inside,:) = cat(1,source.avg.mom{source.inside}); >> source.avg.pow = pow; >> >> Just to be sure, add a time-axis to the source structure, i.e. source.time >> = tlck.time (tlck being the data structure used to create the lcmv-output). >> >> I think this should bring you close to doing statistics. >> >> Best, >> Jan-Mathijs >> >> >> >> On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote: >> >>> Hi all, >>> >>> Reading through the discussion list, I see others have also had some >>> issues with creating grand averaged source space time series (ERFs) and >>> subsequent statistical analysis, but I can't see any solutions.... >>> >>> Questions: >>> How can I create time series (ERFs) for grand averaged source space data? >>> And, how can I do cluster analysis on these (yet to be created) grand >>> averaged source space ERFs? >>> >>> >>> I have used ft_SOURCEANALYSIS with method 'lcmv' for individual >>> participants to generate source space time series, in data.avg.mom. >>> >>> Subsequently I used ft_sourcegrandaverage to combine source space data >>> across subjects. >>> >>> However my grand averaged source data.avg only contains 'pow' and no >>> 'mom'. Eg, no time series for the grand averaged source space data. >>> >>> As such, I can not do cluster analysis on grand averaged ERFs in source >>> space. >>> >>> It appears that ft_sourcestatistics only works with parameters that have >>> not more than one value per grid point (e.g. pow, nai etc) and is unable to >>> work with ERF time series? Is this true? >>> >>> Can any one help with this? >>> >>> Much obliged. >>> Kaelasha > >>> >>> >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl > >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > > ------------------------------ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 38, Issue 18 > ***************************************** > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: circ_ttest_p_first.m Type: text/x-objcsrc Size: 1167 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: circ_ttest_p_second.m Type: text/x-objcsrc Size: 1188 bytes Desc: not available URL: From eelke.spaak at donders.ru.nl Thu Jan 16 13:16:06 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 16 Jan 2014 13:16:06 +0100 Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: <897231397.337853.1389873624028.JavaMail.root@bcbl.eu> References: <897231397.337853.1389873624028.JavaMail.root@bcbl.eu> Message-ID: Hi Fred, What about ft_resampledata? This is of course applied only after reading it in, but I'm not sure if it matters. Best, Eelke On 16 January 2014 13:00, Frédéric Roux wrote: > Dear all, > > does anyone know of a good method to downsample MEG-data > acquired with a CTF system before reading it into Matlab/fieldtrip. > > I remember that there is a command-line tool provided by CTF which can do > preprocessing, but I don't remember exactly if it does the job. > > Or does anyone know of a good alternative solution? > > Best, > Fred > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From j.herring at fcdonders.ru.nl Thu Jan 16 13:22:07 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 16 Jan 2014 13:22:07 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: <897231397.337853.1389873624028.JavaMail.root@bcbl.eu> References: <897231397.337853.1389873624028.JavaMail.root@bcbl.eu> Message-ID: <008801cf12b5$929f55d0$b7de0170$@herring@fcdonders.ru.nl> Hi Fred, If memory is an issue you could try reading-in the data per channel, resample, and appending afterwards. Best, Jim -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Frédéric Roux Sent: donderdag 16 januari 2014 13:00 To: FieldTrip discussion list Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear all, does anyone know of a good method to downsample MEG-data acquired with a CTF system before reading it into Matlab/fieldtrip. I remember that there is a command-line tool provided by CTF which can do preprocessing, but I don't remember exactly if it does the job. Or does anyone know of a good alternative solution? Best, Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hweeling.lee at gmail.com Thu Jan 16 13:22:14 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 16 Jan 2014 13:22:14 +0100 Subject: [FieldTrip] problem with ICA Message-ID: Dear all, I've collected data using a 128 channel EEG cap, and I tried to perform ICA on the data. However, I got an error message with fieldtrip on Matlab. Here's the error message: the input is raw data with 127 channels and 1 trials selecting 123 channels baseline correcting data scaling data with 1 over 148.247820 concatenating data. concatenated data matrix size 123x2789000 starting decomposition using runica Input data size [123,2789000] = 123 channels, 2789000 frames/nFinding 123 ICA components using logistic ICA. Decomposing 184 frames per ICA weight ((15129)^2 = 2789000 weights, Initial learning rate will be 0.001, block size 75. Learning rate will be multiplied by 0.9 whenever angledelta >= 60 deg. More than 32 channels: default stopping weight change 1E-7 Training will end when wchange < 1e-07 or after 512 steps. Online bias adjustment will be used. Removing mean of each channel ... Final training data range: -3.46556 to 6.39436 Computing the sphering matrix... Starting weights are the identity matrix ... Sphering the data ... Beginning ICA training ... Data has rank 119. Cannot compute 123 components. the call to "ft_componentanalysis" took 148 seconds Could someone please let me know what went wrong? Thanks! Cheers, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at fcdonders.ru.nl Thu Jan 16 13:30:30 2014 From: stan.vanpelt at fcdonders.ru.nl (Stan van Pelt) Date: Thu, 16 Jan 2014 13:30:30 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: References: <897231397.337853.1389873624028.JavaMail.root@bcbl.eu> Message-ID: <00a201cf12b6$be30c9d0$3a925d70$@vanpelt@fcdonders.ru.nl> Hi Frederic, You might be able to do that with CTF software, most likely DataEditor. Best, Stan -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak Sent: donderdag 16 januari 2014 13:16 To: FieldTrip discussion list Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Hi Fred, What about ft_resampledata? This is of course applied only after reading it in, but I'm not sure if it matters. Best, Eelke On 16 January 2014 13:00, Frédéric Roux wrote: > Dear all, > > does anyone know of a good method to downsample MEG-data acquired with > a CTF system before reading it into Matlab/fieldtrip. > > I remember that there is a command-line tool provided by CTF which can > do preprocessing, but I don't remember exactly if it does the job. > > Or does anyone know of a good alternative solution? > > Best, > Fred > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From f.roux at bcbl.eu Thu Jan 16 13:30:28 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 16 Jan 2014 13:30:28 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: <008801cf12b5$929f55d0$b7de0170$@herring@fcdonders.ru.nl> Message-ID: <145116688.338728.1389875428825.JavaMail.root@bcbl.eu> Hi Jim, Hi Eelke, thanks for the fast response. My issue is that I would like to use ft_definetrial to get to my trigger events, hence the reason why I want to downsample the raw-data before accessing it with ft. But technically, I guess I should be able to write up my own trigger detection code. It's just more convenient without having to do that extra step. I thought I'd ask before doing that. In any case if anyone comes up with an idea how to do the downsampling on the raw-data, please let me know. Best, Fred Frédéric Roux ----- Original Message ----- From: "J.D. Herring (Jim)" To: "FieldTrip discussion list" Sent: Thursday, January 16, 2014 1:22:07 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Hi Fred, If memory is an issue you could try reading-in the data per channel, resample, and appending afterwards. Best, Jim -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Frédéric Roux Sent: donderdag 16 januari 2014 13:00 To: FieldTrip discussion list Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear all, does anyone know of a good method to downsample MEG-data acquired with a CTF system before reading it into Matlab/fieldtrip. I remember that there is a command-line tool provided by CTF which can do preprocessing, but I don't remember exactly if it does the job. Or does anyone know of a good alternative solution? Best, Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From aaron.schurger at gmail.com Thu Jan 16 13:42:53 2014 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Thu, 16 Jan 2014 13:42:53 +0100 Subject: [FieldTrip] problem with ICA In-Reply-To: References: Message-ID: Sounds like you may have done something to your data, like interpolating channels, before you ran ICA. It is OK to filter your data before running ICA, and some other operations are OK too, but if you do anything that mixes activity from different channels in any way, then you can run into problems with ICA (and results from ICA can be invalid). Aaron On Thu, Jan 16, 2014 at 1:22 PM, Hwee Ling Lee wrote: > Dear all, > > I've collected data using a 128 channel EEG cap, and I tried to perform ICA > on the data. However, I got an error message with fieldtrip on Matlab. > Here's the error message: > > the input is raw data with 127 channels and 1 trials > selecting 123 channels > baseline correcting data > scaling data with 1 over 148.247820 > concatenating data. > concatenated data matrix size 123x2789000 > starting decomposition using runica > > Input data size [123,2789000] = 123 channels, 2789000 frames/nFinding 123 > ICA components using logistic ICA. > Decomposing 184 frames per ICA weight ((15129)^2 = 2789000 weights, Initial > learning rate will be 0.001, block size 75. > Learning rate will be multiplied by 0.9 whenever angledelta >= 60 deg. > More than 32 channels: default stopping weight change 1E-7 > Training will end when wchange < 1e-07 or after 512 steps. > Online bias adjustment will be used. > Removing mean of each channel ... > Final training data range: -3.46556 to 6.39436 > Computing the sphering matrix... > Starting weights are the identity matrix ... > Sphering the data ... > Beginning ICA training ... > Data has rank 119. Cannot compute 123 components. > the call to "ft_componentanalysis" took 148 seconds > > Could someone please let me know what went wrong? > > Thanks! > > Cheers, > Hweeling > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Senior researcher Laboratory of Cognitive Neuroscience Brain-Mind Institute, Department of Life Sciences École Polytechnique Fédérale de Lausanne Station 19, AI 2101 1015 Lausanne, Switzerland +41 21 693 1771 aaron.schurger at epfl.ch http://lnco.epfl.ch/ From eelke.spaak at donders.ru.nl Thu Jan 16 13:54:29 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 16 Jan 2014 13:54:29 +0100 Subject: [FieldTrip] problem with ICA In-Reply-To: References: Message-ID: Hi Hweeling, To add to Aaron's explanation, you can instruct the algorithm to use a subspace projection of your data by specifying cfg.runica.pca = N, where N is the rank of your data (in your case 119, it seems). Best, Eelke On 16 January 2014 13:42, Aaron Schurger wrote: > Sounds like you may have done something to your data, like > interpolating channels, before you ran ICA. It is OK to filter your > data before running ICA, and some other operations are OK too, but if > you do anything that mixes activity from different channels in any > way, then you can run into problems with ICA (and results from ICA can > be invalid). > Aaron > > On Thu, Jan 16, 2014 at 1:22 PM, Hwee Ling Lee wrote: >> Dear all, >> >> I've collected data using a 128 channel EEG cap, and I tried to perform ICA >> on the data. However, I got an error message with fieldtrip on Matlab. >> Here's the error message: >> >> the input is raw data with 127 channels and 1 trials >> selecting 123 channels >> baseline correcting data >> scaling data with 1 over 148.247820 >> concatenating data. >> concatenated data matrix size 123x2789000 >> starting decomposition using runica >> >> Input data size [123,2789000] = 123 channels, 2789000 frames/nFinding 123 >> ICA components using logistic ICA. >> Decomposing 184 frames per ICA weight ((15129)^2 = 2789000 weights, Initial >> learning rate will be 0.001, block size 75. >> Learning rate will be multiplied by 0.9 whenever angledelta >= 60 deg. >> More than 32 channels: default stopping weight change 1E-7 >> Training will end when wchange < 1e-07 or after 512 steps. >> Online bias adjustment will be used. >> Removing mean of each channel ... >> Final training data range: -3.46556 to 6.39436 >> Computing the sphering matrix... >> Starting weights are the identity matrix ... >> Sphering the data ... >> Beginning ICA training ... >> Data has rank 119. Cannot compute 123 components. >> the call to "ft_componentanalysis" took 148 seconds >> >> Could someone please let me know what went wrong? >> >> Thanks! >> >> Cheers, >> Hweeling >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Aaron Schurger, PhD > Senior researcher > Laboratory of Cognitive Neuroscience > Brain-Mind Institute, Department of Life Sciences > École Polytechnique Fédérale de Lausanne > Station 19, AI 2101 > 1015 Lausanne, Switzerland > +41 21 693 1771 > aaron.schurger at epfl.ch > http://lnco.epfl.ch/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From litvak.vladimir at gmail.com Thu Jan 16 13:57:25 2014 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 16 Jan 2014 12:57:25 +0000 Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: <145116688.338728.1389875428825.JavaMail.root@bcbl.eu> References: <145116688.338728.1389875428825.JavaMail.root@bcbl.eu> Message-ID: Dear Fred, The CTF command line tool is called newDs . There is a configuration file that you should set-up to specify that you want it to downsample. I used it a long time ago but I can try to find out more details if you can't figure it out yourself. The documentation for the function should be in CTF PDF files. Best, Vladimir On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux wrote: > Hi Jim, Hi Eelke, > > thanks for the fast response. > > My issue is that I would like to use ft_definetrial > to get to my trigger events, hence the reason why > I want to downsample the raw-data before accessing it > with ft. > > But technically, I guess I should be able to write up > my own trigger detection code. It's just more convenient > without having to do that extra step. > > I thought I'd ask before doing that. > > In any case if anyone comes up with an idea how to do the > downsampling on the raw-data, please let me know. > > Best, > Fred > > > > Frédéric Roux > > ----- Original Message ----- > From: "J.D. Herring (Jim)" > To: "FieldTrip discussion list" > Sent: Thursday, January 16, 2014 1:22:07 PM > Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > Hi Fred, > > If memory is an issue you could try reading-in the data per channel, > resample, and appending afterwards. > > Best, > > Jim > > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Frédéric Roux > Sent: donderdag 16 januari 2014 13:00 > To: FieldTrip discussion list > Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > Dear all, > > does anyone know of a good method to downsample MEG-data acquired with a > CTF system before reading it into Matlab/fieldtrip. > > I remember that there is a command-line tool provided by CTF which can do > preprocessing, but I don't remember exactly if it does the job. > > Or does anyone know of a good alternative solution? > > Best, > Fred > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Thu Jan 16 14:10:58 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 16 Jan 2014 14:10:58 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: Message-ID: <2116649278.339295.1389877858745.JavaMail.root@bcbl.eu> Hi Vladimir, yes now I remember - newDs - will give it a try. Thanks a lot everyone for the fast and helpful comments! Fred ----- Original Message ----- From: "Vladimir Litvak" To: "FieldTrip discussion list" Sent: Thursday, January 16, 2014 1:57:25 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear Fred, The CTF command line tool is called newDs . There is a configuration file that you should set-up to specify that you want it to downsample. I used it a long time ago but I can try to find out more details if you can't figure it out yourself. The documentation for the function should be in CTF PDF files. Best, Vladimir On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: Hi Jim, Hi Eelke, thanks for the fast response. My issue is that I would like to use ft_definetrial to get to my trigger events, hence the reason why I want to downsample the raw-data before accessing it with ft. But technically, I guess I should be able to write up my own trigger detection code. It's just more convenient without having to do that extra step. I thought I'd ask before doing that. In any case if anyone comes up with an idea how to do the downsampling on the raw-data, please let me know. Best, Fred Frédéric Roux ----- Original Message ----- From: "J.D. Herring (Jim)" < j.herring at fcdonders.ru.nl > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Thursday, January 16, 2014 1:22:07 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Hi Fred, If memory is an issue you could try reading-in the data per channel, resample, and appending afterwards. Best, Jim -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto: fieldtrip-bounces at science.ru.nl ] On Behalf Of Frédéric Roux Sent: donderdag 16 januari 2014 13:00 To: FieldTrip discussion list Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear all, does anyone know of a good method to downsample MEG-data acquired with a CTF system before reading it into Matlab/fieldtrip. I remember that there is a command-line tool provided by CTF which can do preprocessing, but I don't remember exactly if it does the job. Or does anyone know of a good alternative solution? Best, Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From litvak.vladimir at gmail.com Thu Jan 16 14:28:03 2014 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 16 Jan 2014 13:28:03 +0000 Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: <2116649278.339295.1389877858745.JavaMail.root@bcbl.eu> References: <2116649278.339295.1389877858745.JavaMail.root@bcbl.eu> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: warning1.txt URL: -------------- next part -------------- Here is my old code. Actually the config file is just for filtering but I think you must low-pass before downsampling as it won't do it automatically. It might do more than you need as I also had to convert pseudo-epoched to continuous data. Vladimir On Thu, Jan 16, 2014 at 1:10 PM, Frédéric Roux wrote: > Hi Vladimir, > > yes now I remember - newDs - will give it a try. > > Thanks a lot everyone for the fast and helpful comments! > > Fred > > ----- Original Message ----- > From: "Vladimir Litvak" > To: "FieldTrip discussion list" > Sent: Thursday, January 16, 2014 1:57:25 PM > Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > > > Dear Fred, > > > The CTF command line tool is called newDs . There is a configuration file > that you should set-up to specify that you want it to downsample. I used it > a long time ago but I can try to find out more details if you can't figure > it out yourself. The documentation for the function should be in CTF PDF > files. > > > Best, > > > Vladimir > > > > On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: > > > Hi Jim, Hi Eelke, > > thanks for the fast response. > > My issue is that I would like to use ft_definetrial > to get to my trigger events, hence the reason why > I want to downsample the raw-data before accessing it > with ft. > > But technically, I guess I should be able to write up > my own trigger detection code. It's just more convenient > without having to do that extra step. > > I thought I'd ask before doing that. > > In any case if anyone comes up with an idea how to do the > downsampling on the raw-data, please let me know. > > Best, > Fred > > > > Frédéric Roux > > > ----- Original Message ----- > From: "J.D. Herring (Jim)" < j.herring at fcdonders.ru.nl > > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > > Sent: Thursday, January 16, 2014 1:22:07 PM > Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > Hi Fred, > > > If memory is an issue you could try reading-in the data per channel, > resample, and appending afterwards. > > Best, > > Jim > > > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl > [mailto: fieldtrip-bounces at science.ru.nl ] On Behalf Of Frédéric Roux > Sent: donderdag 16 januari 2014 13:00 > To: FieldTrip discussion list > > > Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > Dear all, > > does anyone know of a good method to downsample MEG-data acquired with a > CTF system before reading it into Matlab/fieldtrip. > > I remember that there is a command-line tool provided by CTF which can do > preprocessing, but I don't remember exactly if it does the job. > > Or does anyone know of a good alternative solution? > > Best, > Fred > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > 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: processing.cfg Type: application/octet-stream Size: 1237 bytes Desc: not available URL: From f.roux at bcbl.eu Thu Jan 16 15:51:06 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 16 Jan 2014 15:51:06 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: Message-ID: <1097371150.341210.1389883866905.JavaMail.root@bcbl.eu> Hi Vladimir, looks like the shell-script got blocked my the mail-server. would you mind sending it to froux at bcbl.eu ? Thanks, Fred Frédéric Roux ----- Original Message ----- From: "Vladimir Litvak" To: "FieldTrip discussion list" Sent: Thursday, January 16, 2014 2:28:03 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing [Text File:warning1.txt] Here is my old code. Actually the config file is just for filtering but I think you must low-pass before downsampling as it won't do it automatically. It might do more than you need as I also had to convert pseudo-epoched to continuous data. Vladimir On Thu, Jan 16, 2014 at 1:10 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: Hi Vladimir, yes now I remember - newDs - will give it a try. Thanks a lot everyone for the fast and helpful comments! Fred ----- Original Message ----- From: "Vladimir Litvak" < litvak.vladimir at gmail.com > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Thursday, January 16, 2014 1:57:25 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear Fred, The CTF command line tool is called newDs . There is a configuration file that you should set-up to specify that you want it to downsample. I used it a long time ago but I can try to find out more details if you can't figure it out yourself. The documentation for the function should be in CTF PDF files. Best, Vladimir On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: Hi Jim, Hi Eelke, thanks for the fast response. My issue is that I would like to use ft_definetrial to get to my trigger events, hence the reason why I want to downsample the raw-data before accessing it with ft. But technically, I guess I should be able to write up my own trigger detection code. It's just more convenient without having to do that extra step. I thought I'd ask before doing that. In any case if anyone comes up with an idea how to do the downsampling on the raw-data, please let me know. Best, Fred Frédéric Roux ----- Original Message ----- From: "J.D. Herring (Jim)" < j.herring at fcdonders.ru.nl > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Thursday, January 16, 2014 1:22:07 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Hi Fred, If memory is an issue you could try reading-in the data per channel, resample, and appending afterwards. Best, Jim -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto: fieldtrip-bounces at science.ru.nl ] On Behalf Of Frédéric Roux Sent: donderdag 16 januari 2014 13:00 To: FieldTrip discussion list Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear all, does anyone know of a good method to downsample MEG-data acquired with a CTF system before reading it into Matlab/fieldtrip. I remember that there is a command-line tool provided by CTF which can do preprocessing, but I don't remember exactly if it does the job. Or does anyone know of a good alternative solution? Best, Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ 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 litvak.vladimir at gmail.com Thu Jan 16 15:58:31 2014 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 16 Jan 2014 14:58:31 +0000 Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: <1097371150.341210.1389883866905.JavaMail.root@bcbl.eu> References: <1097371150.341210.1389883866905.JavaMail.root@bcbl.eu> Message-ID: Here it is, just in case some else will need it in the future. #!/bin/sh files=`ls -1Ad ${1}` for f in $files do newSingleTrialDs $f ./s_`basename $f` newDs -f -filter processing.cfg -resample 8 ./s_`basename $f` ./r_`basename $f` rm -rf ./s_`basename $f` done On Thu, Jan 16, 2014 at 2:51 PM, Frédéric Roux wrote: > Hi Vladimir, > > looks like the shell-script got blocked my the mail-server. > would you mind sending it to froux at bcbl.eu ? > > Thanks, > > Fred > > Frédéric Roux > > ----- Original Message ----- > From: "Vladimir Litvak" > To: "FieldTrip discussion list" > Sent: Thursday, January 16, 2014 2:28:03 PM > Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > > [Text File:warning1.txt] > > > > Here is my old code. Actually the config file is just for filtering but I > think you must low-pass before downsampling as it won't do it > automatically. It might do more than you need as I also had to convert > pseudo-epoched to continuous data. > > > Vladimir > > > > On Thu, Jan 16, 2014 at 1:10 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: > > > Hi Vladimir, > > yes now I remember - newDs - will give it a try. > > Thanks a lot everyone for the fast and helpful comments! > > Fred > > > ----- Original Message ----- > From: "Vladimir Litvak" < litvak.vladimir at gmail.com > > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > > > > Sent: Thursday, January 16, 2014 1:57:25 PM > Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > > > Dear Fred, > > > The CTF command line tool is called newDs . There is a configuration file > that you should set-up to specify that you want it to downsample. I used it > a long time ago but I can try to find out more details if you can't figure > it out yourself. The documentation for the function should be in CTF PDF > files. > > > Best, > > > Vladimir > > > > On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: > > > Hi Jim, Hi Eelke, > > thanks for the fast response. > > My issue is that I would like to use ft_definetrial > to get to my trigger events, hence the reason why > I want to downsample the raw-data before accessing it > with ft. > > But technically, I guess I should be able to write up > my own trigger detection code. It's just more convenient > without having to do that extra step. > > I thought I'd ask before doing that. > > In any case if anyone comes up with an idea how to do the > downsampling on the raw-data, please let me know. > > Best, > Fred > > > > Frédéric Roux > > > ----- Original Message ----- > From: "J.D. Herring (Jim)" < j.herring at fcdonders.ru.nl > > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > > Sent: Thursday, January 16, 2014 1:22:07 PM > Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > Hi Fred, > > > If memory is an issue you could try reading-in the data per channel, > resample, and appending afterwards. > > Best, > > Jim > > > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl > [mailto: fieldtrip-bounces at science.ru.nl ] On Behalf Of Frédéric Roux > Sent: donderdag 16 januari 2014 13:00 > To: FieldTrip discussion list > > > Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > Dear all, > > does anyone know of a good method to downsample MEG-data acquired with a > CTF system before reading it into Matlab/fieldtrip. > > I remember that there is a command-line tool provided by CTF which can do > preprocessing, but I don't remember exactly if it does the job. > > Or does anyone know of a good alternative solution? > > Best, > Fred > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > 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 hweeling.lee at gmail.com Thu Jan 16 16:09:13 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 16 Jan 2014 16:09:13 +0100 Subject: [FieldTrip] problem with ICA In-Reply-To: References: Message-ID: Hi, Thanks for suggestion. Actually, prior to running ICA, I did a notch filter of 50 Hz and also to remove cardioballistic effects based on the ECG channel. Does it consider to be mixing the channels? Cheers, Hweeling On 16 January 2014 13:54, Eelke Spaak wrote: > Hi Hweeling, > > To add to Aaron's explanation, you can instruct the algorithm to use a > subspace projection of your data by specifying cfg.runica.pca = N, > where N is the rank of your data (in your case 119, it seems). > > Best, > Eelke > > On 16 January 2014 13:42, Aaron Schurger wrote: > > Sounds like you may have done something to your data, like > > interpolating channels, before you ran ICA. It is OK to filter your > > data before running ICA, and some other operations are OK too, but if > > you do anything that mixes activity from different channels in any > > way, then you can run into problems with ICA (and results from ICA can > > be invalid). > > Aaron > > > > On Thu, Jan 16, 2014 at 1:22 PM, Hwee Ling Lee > wrote: > >> Dear all, > >> > >> I've collected data using a 128 channel EEG cap, and I tried to perform > ICA > >> on the data. However, I got an error message with fieldtrip on Matlab. > >> Here's the error message: > >> > >> the input is raw data with 127 channels and 1 trials > >> selecting 123 channels > >> baseline correcting data > >> scaling data with 1 over 148.247820 > >> concatenating data. > >> concatenated data matrix size 123x2789000 > >> starting decomposition using runica > >> > >> Input data size [123,2789000] = 123 channels, 2789000 frames/nFinding > 123 > >> ICA components using logistic ICA. > >> Decomposing 184 frames per ICA weight ((15129)^2 = 2789000 weights, > Initial > >> learning rate will be 0.001, block size 75. > >> Learning rate will be multiplied by 0.9 whenever angledelta >= 60 deg. > >> More than 32 channels: default stopping weight change 1E-7 > >> Training will end when wchange < 1e-07 or after 512 steps. > >> Online bias adjustment will be used. > >> Removing mean of each channel ... > >> Final training data range: -3.46556 to 6.39436 > >> Computing the sphering matrix... > >> Starting weights are the identity matrix ... > >> Sphering the data ... > >> Beginning ICA training ... > >> Data has rank 119. Cannot compute 123 components. > >> the call to "ft_componentanalysis" took 148 seconds > >> > >> Could someone please let me know what went wrong? > >> > >> Thanks! > >> > >> Cheers, > >> Hweeling > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > -- > > Aaron Schurger, PhD > > Senior researcher > > Laboratory of Cognitive Neuroscience > > Brain-Mind Institute, Department of Life Sciences > > École Polytechnique Fédérale de Lausanne > > Station 19, AI 2101 > > 1015 Lausanne, Switzerland > > +41 21 693 1771 > > aaron.schurger at epfl.ch > > http://lnco.epfl.ch/ > > > > _______________________________________________ > > 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 > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Thu Jan 16 17:17:01 2014 From: mcantor at umich.edu (Max Cantor) Date: Thu, 16 Jan 2014 11:17:01 -0500 Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: References: <1097371150.341210.1389883866905.JavaMail.root@bcbl.eu> Message-ID: Hi, So I'm having an issue involving, well I think the issue may not be the downsampling per se, but it does involve attempting to recreate a code similar to the above but in fieldtrip. I'm currently attempting two different methods: 1. Method One: Define trials as a cfg_(condition), with the preprocessing parameters contained within the cfg. Then preprocess the cfg_condition. Finally, downsample using ft_resampledata 2. Method Two: Preprocess the data by channel in a for loop, then concatenate using ft_appenddata, followed by epoching, and finally downsampling. In the original version of this method I downsampled in the for loop, as doing it without downsampling in the loop still strains my computers memory, but when I do that the epoching doesn't seem to work for reasons I partially understand, but in any case can't figure out a workaround for that would be reasonably straightforward. In any case, when I do either of these methods, I run into an error: 1. For the first method reading and preprocessing trial 1 from 100 getCTFdata: dataList error: points=21086:21085 trial=1 points/trial=1584000 No. of trials=1 2. The Second method Attempted to access data.time.%cell(1); index out of bounds because numel(data.time.%cell)=0. Error in ft_resampledata (line 149) firstsmp(itr) = data.time{itr}(1); Again, I'm not entirely convinced the issue is with downsampling per se, but that is my best guess at the moment. Any help would be greatly appreciated. Max Cantor Research Assistant Computational Neurolinguistics Lab University of Michigan On Thu, Jan 16, 2014 at 9:58 AM, Vladimir Litvak wrote: > Here it is, just in case some else will need it in the future. > > #!/bin/sh > files=`ls -1Ad ${1}` > > for f in $files > do > newSingleTrialDs $f ./s_`basename $f` > newDs -f -filter processing.cfg -resample 8 ./s_`basename $f` > ./r_`basename $f` > rm -rf ./s_`basename $f` > done > > > > > On Thu, Jan 16, 2014 at 2:51 PM, Frédéric Roux wrote: > >> Hi Vladimir, >> >> looks like the shell-script got blocked my the mail-server. >> would you mind sending it to froux at bcbl.eu ? >> >> Thanks, >> >> Fred >> >> Frédéric Roux >> >> ----- Original Message ----- >> From: "Vladimir Litvak" >> To: "FieldTrip discussion list" >> Sent: Thursday, January 16, 2014 2:28:03 PM >> Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing >> >> >> [Text File:warning1.txt] >> >> >> >> Here is my old code. Actually the config file is just for filtering but I >> think you must low-pass before downsampling as it won't do it >> automatically. It might do more than you need as I also had to convert >> pseudo-epoched to continuous data. >> >> >> Vladimir >> >> >> >> On Thu, Jan 16, 2014 at 1:10 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: >> >> >> Hi Vladimir, >> >> yes now I remember - newDs - will give it a try. >> >> Thanks a lot everyone for the fast and helpful comments! >> >> Fred >> >> >> ----- Original Message ----- >> From: "Vladimir Litvak" < litvak.vladimir at gmail.com > >> To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > >> >> >> Sent: Thursday, January 16, 2014 1:57:25 PM >> Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing >> >> >> >> Dear Fred, >> >> >> The CTF command line tool is called newDs . There is a configuration file >> that you should set-up to specify that you want it to downsample. I used it >> a long time ago but I can try to find out more details if you can't figure >> it out yourself. The documentation for the function should be in CTF PDF >> files. >> >> >> Best, >> >> >> Vladimir >> >> >> >> On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: >> >> >> Hi Jim, Hi Eelke, >> >> thanks for the fast response. >> >> My issue is that I would like to use ft_definetrial >> to get to my trigger events, hence the reason why >> I want to downsample the raw-data before accessing it >> with ft. >> >> But technically, I guess I should be able to write up >> my own trigger detection code. It's just more convenient >> without having to do that extra step. >> >> I thought I'd ask before doing that. >> >> In any case if anyone comes up with an idea how to do the >> downsampling on the raw-data, please let me know. >> >> Best, >> Fred >> >> >> >> Frédéric Roux >> >> >> ----- Original Message ----- >> From: "J.D. Herring (Jim)" < j.herring at fcdonders.ru.nl > >> To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > >> Sent: Thursday, January 16, 2014 1:22:07 PM >> Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing >> >> Hi Fred, >> >> >> If memory is an issue you could try reading-in the data per channel, >> resample, and appending afterwards. >> >> Best, >> >> Jim >> >> >> -----Original Message----- >> From: fieldtrip-bounces at science.ru.nl >> [mailto: fieldtrip-bounces at science.ru.nl ] On Behalf Of Frédéric Roux >> Sent: donderdag 16 januari 2014 13:00 >> To: FieldTrip discussion list >> >> >> Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing >> >> Dear all, >> >> does anyone know of a good method to downsample MEG-data acquired with a >> CTF system before reading it into Matlab/fieldtrip. >> >> I remember that there is a command-line tool provided by CTF which can do >> preprocessing, but I don't remember exactly if it does the job. >> >> Or does anyone know of a good alternative solution? >> >> Best, >> Fred >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Thu Jan 16 20:32:53 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 16 Jan 2014 20:32:53 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: Message-ID: <1884515464.344585.1389900773892.JavaMail.root@bcbl.eu> Thanks Vladimir, this is very helpful. Best, Fred ----- Original Message ----- From: "Vladimir Litvak" To: "FieldTrip discussion list" Sent: Thursday, January 16, 2014 3:58:31 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Here it is, just in case some else will need it in the future. #!/bin/sh files=`ls -1Ad ${1}` for f in $files do newSingleTrialDs $f ./s_`basename $f` newDs -f -filter processing.cfg -resample 8 ./s_`basename $f` ./r_`basename $f` rm -rf ./s_`basename $f` done On Thu, Jan 16, 2014 at 2:51 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: Hi Vladimir, looks like the shell-script got blocked my the mail-server. would you mind sending it to froux at bcbl.eu ? Thanks, Fred Frédéric Roux ----- Original Message ----- From: "Vladimir Litvak" < litvak.vladimir at gmail.com > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Thursday, January 16, 2014 2:28:03 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing [Text File:warning1.txt] Here is my old code. Actually the config file is just for filtering but I think you must low-pass before downsampling as it won't do it automatically. It might do more than you need as I also had to convert pseudo-epoched to continuous data. Vladimir On Thu, Jan 16, 2014 at 1:10 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: Hi Vladimir, yes now I remember - newDs - will give it a try. Thanks a lot everyone for the fast and helpful comments! Fred ----- Original Message ----- From: "Vladimir Litvak" < litvak.vladimir at gmail.com > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Thursday, January 16, 2014 1:57:25 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear Fred, The CTF command line tool is called newDs . There is a configuration file that you should set-up to specify that you want it to downsample. I used it a long time ago but I can try to find out more details if you can't figure it out yourself. The documentation for the function should be in CTF PDF files. Best, Vladimir On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: Hi Jim, Hi Eelke, thanks for the fast response. My issue is that I would like to use ft_definetrial to get to my trigger events, hence the reason why I want to downsample the raw-data before accessing it with ft. But technically, I guess I should be able to write up my own trigger detection code. It's just more convenient without having to do that extra step. I thought I'd ask before doing that. In any case if anyone comes up with an idea how to do the downsampling on the raw-data, please let me know. Best, Fred Frédéric Roux ----- Original Message ----- From: "J.D. Herring (Jim)" < j.herring at fcdonders.ru.nl > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Thursday, January 16, 2014 1:22:07 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Hi Fred, If memory is an issue you could try reading-in the data per channel, resample, and appending afterwards. Best, Jim -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto: fieldtrip-bounces at science.ru.nl ] On Behalf Of Frédéric Roux Sent: donderdag 16 januari 2014 13:00 To: FieldTrip discussion list Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear all, does anyone know of a good method to downsample MEG-data acquired with a CTF system before reading it into Matlab/fieldtrip. I remember that there is a command-line tool provided by CTF which can do preprocessing, but I don't remember exactly if it does the job. Or does anyone know of a good alternative solution? Best, Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From berryv.dberg at gmail.com Thu Jan 16 23:11:50 2014 From: berryv.dberg at gmail.com (berry van den berg) Date: Thu, 16 Jan 2014 14:11:50 -0800 Subject: [FieldTrip] ft_statistics_montecarlo runs slow under ubuntu 13.10 Message-ID: Dear Fieldtrip experts, This might be an odd question, but maybe someone has an idea where to start. I just got a fancy new laptop (gigabyte p34g) and dual boot with ubuntu and windows. I usually work in Ubuntu for analysis, so I ran a time freq statistics analysis and noticed that ft_statistics_montecarlo runs extremely slow under Ubuntu.... In windows it runs at normal speed. The difference is huge, 97 seconds vs, 2 seconds for 100 iterations, 24 subjects. Speed also doesnt seem influenced by averaging over freq or/and time, it is just slow. It is not the cpu clock speed (ubuntu nicely utilizes turbo mode, running max 3ghz), the cpu is not fully utilized though (only 30 percent or so)... I run matlab 2013b, fieldtrip 20140115 Specs are 8gb ram; only 4gb utilized. 4700HQ cpu Any ideas, because I am clueless Cheers, -- Berry van den Berg berryv.dberg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Sun Jan 19 12:21:36 2014 From: roeysc at gmail.com (Roey Schurr) Date: Sun, 19 Jan 2014 13:21:36 +0200 Subject: [FieldTrip] Creating a head model using OPENMEEG - Intersecting mesh error Message-ID: Dear fieldtrippers, I am writing you after encountering an error using the OPENMEEG method for creating a head model, which I need for source reconstruction of EEG data (using 19 electrodes), e.g.: ... triangles 5018 and 5129 are intersecting triangles 5305 and 5781 are intersecting triangles 5879 and 5907 are intersecting !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!! WARNING !!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Mesh is self intersecting ! ... 2 meshes are intersecting ! It seems to be the same problem reported by Olivia about two years ago: http://mailman.science.ru.nl/pipermail/fieldtrip/2012-March/004881.html In what follows I will describe the main steps in my script: 1) I create a segmented 'brain','skull','scalp' mri structure of the subject: cfg.output = {'brain','skull','scalp'}; [bss_segmentedmri] = ft_volumesegment(cfg, mri); 2) I try using ft_sourceanalysis 3) which in turn tries to compute the leadfield using ft_compute_leadfield through ft_leadfield_openmeeg. yes this doesn't work, and I get the following error: Error using fprintf Invalid file identifier. Use fopen to generate a valid file identifier. Error in ft_leadfield_openmeeg (line 112) fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, sens.chanpos(ii,:)); Since it is crucial that I use a realistic head model, do you have any suggestions? Any advice would be greatly appreciated! Thank you, and have a nice week, roey -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Sun Jan 19 12:35:47 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Sun, 19 Jan 2014 12:35:47 +0100 Subject: [FieldTrip] =?utf-8?q?Creating_a_head_model_using_OPENMEEG_-_Inte?= =?utf-8?q?rsecting_=09mesh__error?= Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dominik.bach at uzh.ch Sun Jan 19 14:07:30 2014 From: dominik.bach at uzh.ch (Dominik R Bach) Date: Sun, 19 Jan 2014 14:07:30 +0100 Subject: [FieldTrip] Postdoc position in comparative/computational emotion neuroscience at University of Zurich, starting 2014 Message-ID: <52DBCE12.7040905@uzh.ch> Applications are invited for a post-doctoral position to work on the neurobiology of anxiety and fear, with a methodical focus on either MEG, high-field MRI, or computational modelling. The Comparative Emotion Neuroscience Group (www.bachlab.org) currently hosts 1 PostDoc, 3 PhD students, and several support staff, and is looking for a second post-doctoral fellow. The group's aim is to develop formal models of animal and human defensive emotions (panic, fear, anxiety), characterise their neuroanatomy and the underlying neural computations using neuroimaging techniques (fMRI, M/EEG) in humans, andapply this knowledge to psychiatric syndromes involving pathological emotions. The laboratory offers a friendly and collaborative research environment, a research-dedicated 3T MRI scanner, a fully equipped psychological/psychophysiological testing facility, access to EEG, and collaboration with MEG and 7T MRI facilities. The position is funded by the Swiss National Science Foundation for 3 years and paid according to work experience, usually in grade 18. The lab, behavioural testing facilities, EEG, and 3T scanner are located in the Department of Psychiatry, University of Zurich, Switzerland.** The successfull applicant will have either (a) an undergraduate degree in physics/engineering/mathematics/computer science, and a PhD in cognitive neuroscience, or (b) an undergraduate degree in biology/psychology/neuroscience, and a PhD in neuroscience with a computational or technological focus. The candidate will be experienced in human experimentation, in particular fMRI or M/EEG. Fluent English is mandatory, German is not. We are looking for a highly motivated individal with interest in neurobiology who develops independent research ideas within the group's framework. Starting date is 2014. Applications are accepted until the position is filled. Applicants should send, in one merged PDF, a CV, publication list, letter of intent with a statement of research interest, and the name and contact of two references to: jobs at bachlab.org -- Dominik R Bach University of Zurich www.bachlab.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gregor.Volberg at psychologie.uni-regensburg.de Mon Jan 20 12:21:26 2014 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Mon, 20 Jan 2014 12:21:26 +0100 Subject: [FieldTrip] Antw: Creating a head model using OPENMEEG - Intersecting mesh error In-Reply-To: References: Message-ID: <52DD14C60200005700015398@gwsmtp1.uni-regensburg.de> Dear Roey, just two or three hints that might be helpful: I assume that the segmentation itself was successful; you can check this with ft_plot_vol for each of your tissues. Given that the segmentation is correct and the tissue borders are not intersecting, the error occurred during the mesh construction. I experienced that the number of triangles used for the mesh is often critical, with large numbers producing self-intersections. You could play around a bit with the number of triangles used for each compartement as specified in cfg.numvertices. Then, check the effect on the resulting volume. You do not need to call the ft_sourceanalysis for that; there is the funktion om_check_vol in the external/openmeeg folder that checks the integrity of the volumes and reports intersections or self-intersections. During the leadfield computation, OpenMEEG writes some files to the hard disk for later use. If the meshes are incorrect, then the leadfield fails and no file can be written to the disk. So the error warning on the file identifiers is presumably secondary to the mesh issue. Kind regards, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> Roey Schurr 19.01.2014 12:21 >>> Dear fieldtrippers, I am writing you after encountering an error using the OPENMEEG method for creating a head model, which I need for source reconstruction of EEG data (using 19 electrodes), e.g.: ... triangles 5018 and 5129 are intersecting triangles 5305 and 5781 are intersecting triangles 5879 and 5907 are intersecting !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!! WARNING !!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Mesh is self intersecting ! ... 2 meshes are intersecting ! It seems to be the same problem reported by Olivia about two years ago: http://mailman.science.ru.nl/pipermail/fieldtrip/2012-March/004881.html In what follows I will describe the main steps in my script: 1) I create a segmented 'brain','skull','scalp' mri structure of the subject: cfg.output = {'brain','skull','scalp'}; [bss_segmentedmri] = ft_volumesegment(cfg, mri); 2) I try using ft_sourceanalysis 3) which in turn tries to compute the leadfield using ft_compute_leadfield through ft_leadfield_openmeeg. yes this doesn't work, and I get the following error: Error using fprintf Invalid file identifier. Use fopen to generate a valid file identifier. Error in ft_leadfield_openmeeg (line 112) fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, sens.chanpos(ii,:)); Since it is crucial that I use a realistic head model, do you have any suggestions? Any advice would be greatly appreciated! Thank you, and have a nice week, roey -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Mon Jan 20 12:27:00 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Mon, 20 Jan 2014 12:27:00 +0100 Subject: [FieldTrip] Antw: Creating a head model using OPENMEEG - Intersecting mesh er Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Mon Jan 20 12:32:45 2014 From: roeysc at gmail.com (Roey Schurr) Date: Mon, 20 Jan 2014 13:32:45 +0200 Subject: [FieldTrip] Antw: Creating a head model using OPENMEEG - Intersecting mesh error In-Reply-To: <52DD14C60200005700015398@gwsmtp1.uni-regensburg.de> References: <52DD14C60200005700015398@gwsmtp1.uni-regensburg.de> Message-ID: Dear Gregor, Thank you so much for your helpful advice! I will try this soon and report back to you all. Best regards, roey On Mon, Jan 20, 2014 at 1:21 PM, Gregor Volberg < Gregor.Volberg at psychologie.uni-regensburg.de> wrote: > Dear Roey, > > just two or three hints that might be helpful: > > I assume that the segmentation itself was successful; you can check this > with ft_plot_vol for each of your tissues. Given that the segmentation is > correct and the tissue borders are not intersecting, the error occurred > during the mesh construction. I experienced that the number of triangles > used for the mesh is often critical, with large numbers producing > self-intersections. You could play around a bit with the number of > triangles used for each compartement as specified in cfg.numvertices. Then, > check the effect on the resulting volume. You do not need to call the > ft_sourceanalysis for that; there is the funktion om_check_vol in the > external/openmeeg folder that checks the integrity of the volumes and > reports intersections or self-intersections. > During the leadfield computation, OpenMEEG writes some files to the hard > disk for later use. If the meshes are incorrect, then the leadfield fails > and no file can be written to the disk. So the error warning on the file > identifiers is presumably secondary to the mesh issue. > > Kind regards, > Gregor > > > > > -- > Dr. rer. nat. Gregor Volberg > ( mailto:gregor.volberg at psychologie.uni-regensburg.de) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > >>> Roey Schurr 19.01.2014 12:21 >>> > Dear fieldtrippers, > > I am writing you after encountering an error using the OPENMEEG method for > creating a head model, which I need for source reconstruction of EEG data > (using 19 electrodes), e.g.: > ... > triangles 5018 and 5129 are intersecting > triangles 5305 and 5781 are intersecting > triangles 5879 and 5907 are intersecting > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > !!!!!!!!!!! WARNING !!!!!!!!!!! > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > Mesh is self intersecting ! > ... > 2 meshes are intersecting ! > > It seems to be the same problem reported by Olivia about two years ago: > http://mailman.science.ru.nl/pipermail/fieldtrip/2012-March/004881.html > > In what follows I will describe the main steps in my script: > > 1) I create a segmented 'brain','skull','scalp' mri structure of the > subject: > cfg.output = {'brain','skull','scalp'}; > [bss_segmentedmri] = ft_volumesegment(cfg, mri); > > 2) I try using ft_sourceanalysis > > 3) which in turn tries to compute the leadfield using ft_compute_leadfield > through ft_leadfield_openmeeg. > > yes this doesn't work, and I get the following error: > Error using fprintf > Invalid file identifier. Use fopen to generate a valid file identifier. > > Error in ft_leadfield_openmeeg (line 112) > fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, > sens.chanpos(ii,:)); > > > Since it is crucial that I use a realistic head model, do you have any > suggestions? > > Any advice would be greatly appreciated! > Thank you, and have a nice week, > > roey > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berryv.dberg at gmail.com Mon Jan 20 17:45:30 2014 From: berryv.dberg at gmail.com (berry van den berg) Date: Mon, 20 Jan 2014 11:45:30 -0500 Subject: [FieldTrip] ft_statistics_montecarlo runs slow under ubuntu 13.10 In-Reply-To: References: Message-ID: Ok, I dove a bit deeper into the problem, using the matlab profiler I was able to pinpoint the problem to ft_hastoolbox.m called by findcluster.m, and specifically the functions fileparts and exist.... Copy pasting those two functions to ft_statistics_montecarlo solves the issue for me for now. The problem seems to be that matlab accessing my filesystem runs slow under linux compared to windows.. I have no idea why and how to solve it but it is not related to fieldtrip. If anyone has suggestions what this might be I would be glad to hear them! Cheers, On 16 January 2014 17:11, berry van den berg wrote: > Dear Fieldtrip experts, > > This might be an odd question, but maybe someone has an idea where to > start. > > I just got a fancy new laptop (gigabyte p34g) and dual boot with ubuntu > and windows. I usually work in Ubuntu for analysis, so I ran a time freq > statistics analysis and noticed that ft_statistics_montecarlo runs > extremely slow under Ubuntu.... In windows it runs at normal speed. The > difference is huge, 97 seconds vs, 2 seconds for 100 iterations, 24 > subjects. > > Speed also doesnt seem influenced by averaging over freq or/and time, it > is just slow. > > It is not the cpu clock speed (ubuntu nicely utilizes turbo mode, running > max 3ghz), the cpu is not fully utilized though (only 30 percent or so)... > > I run matlab 2013b, fieldtrip 20140115 > > Specs are > 8gb ram; only 4gb utilized. > 4700HQ cpu > > Any ideas, because I am clueless > > Cheers, > > -- > Berry van den Berg > berryv.dberg at gmail.com > -- Berry van den Berg berryv.dberg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.wong.c at utoronto.ca Mon Jan 20 19:10:51 2014 From: dan.wong.c at utoronto.ca (Daniel Wong) Date: Mon, 20 Jan 2014 13:10:51 -0500 Subject: [FieldTrip] Antw: Creating a head model using OPENMEEG - Intersecting mesh error Message-ID: <20140120131051.9fkbl6n8ysg0og4s@webmail.utoronto.ca> You can try using the new iso2mesh meshing option that was recently added by myself, Sarang Dalal, and Robert Oostenveld: cfg.method = 'iso2mesh'; cfg.numvertices = 10000; % We'll decimate later - this gives nicer results bnd = ft_prepare_mesh(cfg,seg); % Decimate to a 1000, 2000, 3000 node mesh (scalp, skull, brain) [bnd(1).pnt, bnd(1).tri] = meshresample(bnd(1).pnt, bnd(1).tri, 1000/size(bnd(1).pnt,1)); [bnd(2).pnt, bnd(2).tri] = meshresample(bnd(2).pnt, bnd(2).tri, 2000/size(bnd(2).pnt,1)); [bnd(3).pnt, bnd(3).tri] = meshresample(bnd(3).pnt, bnd(3).tri, 3000/size(bnd(3).pnt,1)); The latest version of OpenMEEG automatically fixes mesh orientations, but if you have an older version of OpenMEEG, you'll need to set bnd(ii).tri = bnd(ii).tri(:,[3 2 1]) to fix the orientation error that you'll get - at least until we hard code that fix into FieldTrip. Also, assuming your meshes look like they should (use ft_plot_mesh to check), if you still have a problem with meshes intersecting each other, you will find a subfunction called decouplesurf that is temporarily stashed at the end of prepare_mesh_segmentation.m. Copy this function into a new m-file (decouplesurf.m) and use it to fix those intersections as follows: bnd = decouplesurf(bnd); Note, this will not fix self-intersections. If you're really having a bad day, try using the iso2mesh toolbox meshcheckrepair function: % Check and repair mesh [bnd(ii).pnt, bnd(ii).tri] = meshcheckrepair(bnd(ii).pnt, bnd(ii).tri, 'dup'); [bnd(ii).pnt, bnd(ii).tri] = meshcheckrepair(bnd(ii).pnt, bnd(ii).tri, 'isolated'); [bnd(ii).pnt, bnd(ii).tri] = meshcheckrepair(bnd(ii).pnt, bnd(ii).tri, 'deep'); [bnd(ii).pnt, bnd(ii).tri] = meshcheckrepair(bnd(ii).pnt, bnd(ii).tri, 'meshfix'); This info should eventually find its way onto the FieldTrip tutorial pages... Best Regards, Daniel Wong Daniel Wong, PhD (IBBME, University of Toronto) Postdoctoral Researcher Department of Psychology University of Konstanz From raminazodiaval at gmail.com Mon Jan 20 19:58:53 2014 From: raminazodiaval at gmail.com (Ramin Azodi) Date: Mon, 20 Jan 2014 19:58:53 +0100 Subject: [FieldTrip] Negative values of debiased wPLI Message-ID: Hello, I a bit confused about result which I got from debiased wPLI, because it has the negative value inside the 'wpli_debiasedspctrm'. As I searched for that I found this strange explanation, "...We therefore estimated the squared wPLI by using the debiased wPLI estimator (Vinck et al., 2011), ranging from zero *(negative values can incidentally occur because of limited sampling)* to one (maximum coherence)......." Beta coherence within human ventromedial prefrontal cortex precedes affective value choices, N. Lipsman et al, NeuroImage 85 (2014) 769–778. Could someone explain me, what it means and what should I do with these negative values? Best, Ramin -------------- next part -------------- An HTML attachment was scrubbed... URL: From gopalar.ccf at gmail.com Mon Jan 20 23:07:36 2014 From: gopalar.ccf at gmail.com (Raghavan Gopalakrishnan) Date: Mon, 20 Jan 2014 17:07:36 -0500 Subject: [FieldTrip] ft_timelockstatistics Message-ID: I have a grand averaged data structure that has two conditions. For example, two evoked responses 1 sec apart. I have not saved them as separate data structures. Is there a way to run statistics to compare one evoked response over another within the same data structure with different latencies? or is it necessary to create two grand averaged data structures one for each evoked response. Thanks, Raghavan -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhegde at gru.edu Tue Jan 21 02:30:40 2014 From: jhegde at gru.edu (=?ISO-8859-1?Q?Jay_Hegd=E9?=) Date: Mon, 20 Jan 2014 20:30:40 -0500 Subject: [FieldTrip] Sample script for spike+LFP analysis? Message-ID: <52DDCDC0.3010505@gru.edu> Hi Everyone, I'd like to use FieldTrip for the joint analysis of spike and local field potential (LFP) data. I'm proficient in Matlab, but very new to FieldTrip. I'm trying to write a script by precisely following the relevant tutorial (http://fieldtrip.fcdonders.nl/tutorial/spikefield). Everything goes OK for the first couple of steps, but I'm getting stuck when it comes to constructing "a cfg.trl matrix to preprocess the LFP data" described in the tutorial. So can anyone share an example script that actually runs and does this analysis, so I can see what the tutorial is talking about? Thank you very much in advance, Jay Hegdé Medical College of Georgia Georgia Regents University Augusta, GA, USA From aestnth at hum.au.dk Tue Jan 21 02:43:03 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Tue, 21 Jan 2014 02:43:03 +0100 Subject: [FieldTrip] Sample script for spike+LFP analysis? Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Jan 21 09:30:14 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 21 Jan 2014 09:30:14 +0100 Subject: [FieldTrip] Sample script for spike+LFP analysis? In-Reply-To: <52DDCDC0.3010505@gru.edu> References: <52DDCDC0.3010505@gru.edu> Message-ID: Hi Jay, A "trl" matrix is an Nx3 matrix that gives, for each of N trials, the begin and end sample, and the 'offset' (shift in time axis to determine t=0; offset=0 means begin sample will be t=0). In typical cognitive experiments, such a matrix is generated by a call to ft_definetrial, which in turn calls either a user-specified "trialfun" to find events of interest in the data (recorded in a trigger channel), or ft_trialfun_general. ft_trialfun_general is a simple trialfun that looks for specified event values in a specified trigger channel, and creates trials spanning from X seconds before the event to Y seconds after the event. For using ft_definetrial, see this tutorial: http://fieldtrip.fcdonders.nl/tutorial/preprocessing If for any reason (e.g. you don't have triggers) you don't want to use ft_definetrial, you can simply create a trl matrix yourself by specifying the sample indices and offset. Best, Eelke On 21 January 2014 02:30, Jay Hegdé wrote: > Hi Everyone, > > I'd like to use FieldTrip for the joint analysis of spike and local field > potential (LFP) data. I'm proficient in Matlab, but very new to FieldTrip. > > I'm trying to write a script by precisely following the relevant tutorial > (http://fieldtrip.fcdonders.nl/tutorial/spikefield). Everything goes OK for > the first couple of steps, but I'm getting stuck when it comes to > constructing "a cfg.trl matrix to preprocess the LFP data" described in the > tutorial. > > So can anyone share an example script that actually runs and does this > analysis, so I can see what the tutorial is talking about? > > Thank you very much in advance, > Jay Hegdé > Medical College of Georgia > Georgia Regents University > Augusta, GA, USA > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Tue Jan 21 09:36:04 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 21 Jan 2014 09:36:04 +0100 Subject: [FieldTrip] ft_timelockstatistics In-Reply-To: References: Message-ID: Dear Raghavan, The statistics routines (specifically, the cluster statistics) need each individual observation, and not just the grand average. If your grand average data structure was generated with cfg.keepindividual = 'yes', then this should be fine. If you did not specify this, then it will only contain the average (and possibly the variance), and you would need to either rerun ft_timelockgrandaverage, or input the individual data structures into ft_timelockstatistics directly. The latter is nowadays the recommended approach; you use it e.g. like so: ft_timelockstatistics(cfg, condA{:}, condB{:}); where condA and condB are cell arrays with the timelocked structures for each subject. Even if you do have a grandaverage with cfg.keepindividual = 'yes', the statistics routine still needs one input argument per condition. So if you want to compare two time intervals in the same structure, you need to separate them first e.g. like so: cfg = []; cfg.latency = [0 1]; condA = ft_selectdata(cfg, bigstructure); cfg = []; cfg.latency = [1 2]; condB = ft_selectdata(cfg, bigstructure); Best, Eelke On 20 January 2014 23:07, Raghavan Gopalakrishnan wrote: > I have a grand averaged data structure that has two conditions. For example, > two evoked responses 1 sec apart. I have not saved them as separate data > structures. Is there a way to run statistics to compare one evoked response > over another within the same data structure with different latencies? or is > it necessary to create two grand averaged data structures one for each > evoked response. > > Thanks, > Raghavan > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jhegde at gru.edu Tue Jan 21 10:20:18 2014 From: jhegde at gru.edu (=?ISO-8859-1?Q?Jay_Hegd=E9?=) Date: Tue, 21 Jan 2014 04:20:18 -0500 Subject: [FieldTrip] Sample script for spike+LFP analysis? In-Reply-To: References: <52DDCDC0.3010505@gru.edu> Message-ID: <52DE3BD2.1050706@gru.edu> Hi Eelke, Thank you very much. But I'm afraid this doesn't solve my problem. My problem is not that I don't understand the nature of the trl matrix (which is easy enough to surmise by looking at ft_definetrial.m). Rather, it is understanding how the whole script is supposed to work -- which is why I was looking for a working script. (I haven't been able to find one in http://fieldtrip.fcdonders.nl/example.) So in this case, one script would be worth a thousand words for me. Which is why I'd like to respectfully ask again: does anyone have a working script (plus a datafile, if the script does something other than spike-LFP analysis) that they can share? Best, Jay On 1/21/2014 3:30 AM, Eelke Spaak wrote: > Hi Jay, > > A "trl" matrix is an Nx3 matrix that gives, for each of N trials, the > begin and end sample, and the 'offset' (shift in time axis to > determine t=0; offset=0 means begin sample will be t=0). > > In typical cognitive experiments, such a matrix is generated by a call > to ft_definetrial, which in turn calls either a user-specified > "trialfun" to find events of interest in the data (recorded in a > trigger channel), or ft_trialfun_general. ft_trialfun_general is a > simple trialfun that looks for specified event values in a specified > trigger channel, and creates trials spanning from X seconds before the > event to Y seconds after the event. For using ft_definetrial, see this > tutorial: http://fieldtrip.fcdonders.nl/tutorial/preprocessing > > If for any reason (e.g. you don't have triggers) you don't want to use > ft_definetrial, you can simply create a trl matrix yourself by > specifying the sample indices and offset. > > Best, > Eelke > > On 21 January 2014 02:30, Jay Hegdé wrote: >> Hi Everyone, >> >> I'd like to use FieldTrip for the joint analysis of spike and local field >> potential (LFP) data. I'm proficient in Matlab, but very new to FieldTrip. >> >> I'm trying to write a script by precisely following the relevant tutorial >> (http://fieldtrip.fcdonders.nl/tutorial/spikefield). Everything goes OK for >> the first couple of steps, but I'm getting stuck when it comes to >> constructing "a cfg.trl matrix to preprocess the LFP data" described in the >> tutorial. >> >> So can anyone share an example script that actually runs and does this >> analysis, so I can see what the tutorial is talking about? >> >> Thank you very much in advance, >> Jay Hegdé >> Medical College of Georgia >> Georgia Regents University >> Augusta, GA, USA >> >> _______________________________________________ >> 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 stan.vanpelt at fcdonders.ru.nl Tue Jan 21 10:23:00 2014 From: stan.vanpelt at fcdonders.ru.nl (Stan van Pelt) Date: Tue, 21 Jan 2014 10:23:00 +0100 (CET) Subject: [FieldTrip] Sample script for spike+LFP analysis? In-Reply-To: References: <52DDCDC0.3010505@gru.edu> Message-ID: <041701cf168a$60ee94a0$22cbbde0$@vanpelt@fcdonders.ru.nl> Hi Jay, In addition to Eelke's reply, you may also find the examples in these pages useful in creating your trial definition (cfg.trl): http://fieldtrip.fcdonders.nl/walkthrough http://fieldtrip.fcdonders.nl/example/detect_the_muscle_activity_in_an_emg _channel_and_use_that_as_trial_definition Best, Stan Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Centre for Cognition Montessorilaan 3, B.01.34 6525 HR Nijmegen, the Netherlands tel: +31 24 3616288 -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak Sent: dinsdag 21 januari 2014 9:30 To: FieldTrip discussion list Subject: Re: [FieldTrip] Sample script for spike+LFP analysis? Hi Jay, A "trl" matrix is an Nx3 matrix that gives, for each of N trials, the begin and end sample, and the 'offset' (shift in time axis to determine t=0; offset=0 means begin sample will be t=0). In typical cognitive experiments, such a matrix is generated by a call to ft_definetrial, which in turn calls either a user-specified "trialfun" to find events of interest in the data (recorded in a trigger channel), or ft_trialfun_general. ft_trialfun_general is a simple trialfun that looks for specified event values in a specified trigger channel, and creates trials spanning from X seconds before the event to Y seconds after the event. For using ft_definetrial, see this tutorial: http://fieldtrip.fcdonders.nl/tutorial/preprocessing If for any reason (e.g. you don't have triggers) you don't want to use ft_definetrial, you can simply create a trl matrix yourself by specifying the sample indices and offset. Best, Eelke On 21 January 2014 02:30, Jay Hegdé wrote: > Hi Everyone, > > I'd like to use FieldTrip for the joint analysis of spike and local > field potential (LFP) data. I'm proficient in Matlab, but very new to FieldTrip. > > I'm trying to write a script by precisely following the relevant > tutorial (http://fieldtrip.fcdonders.nl/tutorial/spikefield). > Everything goes OK for the first couple of steps, but I'm getting > stuck when it comes to constructing "a cfg.trl matrix to preprocess > the LFP data" described in the tutorial. > > So can anyone share an example script that actually runs and does this > analysis, so I can see what the tutorial is talking about? > > Thank you very much in advance, > Jay Hegdé > Medical College of Georgia > Georgia Regents University > Augusta, GA, USA > > _______________________________________________ > 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 Tue Jan 21 10:27:43 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 21 Jan 2014 10:27:43 +0100 Subject: [FieldTrip] Sample script for spike+LFP analysis? In-Reply-To: <52DE3BD2.1050706@gru.edu> References: <52DDCDC0.3010505@gru.edu> <52DE3BD2.1050706@gru.edu> Message-ID: <490AEEC5-90E6-4568-98AE-7AB40064B592@donders.ru.nl> Hi Jay, I think the best you could get in terms of script would be the one from the tutorial. If it does not work for you, could you specify what causes you to get stuck exactly? Best, Jan-Mathijs On Jan 21, 2014, at 10:20 AM, Jay Hegdé wrote: > Hi Eelke, > > Thank you very much. But I'm afraid this doesn't solve my problem. My problem is not that I don't understand the nature of the trl matrix (which is easy enough to surmise by looking at ft_definetrial.m). Rather, it is understanding how the whole script is supposed to work -- which is why I was looking for a working script. (I haven't been able to find one in http://fieldtrip.fcdonders.nl/example.) So in this case, one script would be worth a thousand words for me. > > Which is why I'd like to respectfully ask again: does anyone have a working script (plus a datafile, if the script does something other than spike-LFP analysis) that they can share? > > Best, > Jay > > On 1/21/2014 3:30 AM, Eelke Spaak wrote: >> Hi Jay, >> >> A "trl" matrix is an Nx3 matrix that gives, for each of N trials, the >> begin and end sample, and the 'offset' (shift in time axis to >> determine t=0; offset=0 means begin sample will be t=0). >> >> In typical cognitive experiments, such a matrix is generated by a call >> to ft_definetrial, which in turn calls either a user-specified >> "trialfun" to find events of interest in the data (recorded in a >> trigger channel), or ft_trialfun_general. ft_trialfun_general is a >> simple trialfun that looks for specified event values in a specified >> trigger channel, and creates trials spanning from X seconds before the >> event to Y seconds after the event. For using ft_definetrial, see this >> tutorial: http://fieldtrip.fcdonders.nl/tutorial/preprocessing >> >> If for any reason (e.g. you don't have triggers) you don't want to use >> ft_definetrial, you can simply create a trl matrix yourself by >> specifying the sample indices and offset. >> >> Best, >> Eelke >> >> On 21 January 2014 02:30, Jay Hegdé wrote: >>> Hi Everyone, >>> >>> I'd like to use FieldTrip for the joint analysis of spike and local field >>> potential (LFP) data. I'm proficient in Matlab, but very new to FieldTrip. >>> >>> I'm trying to write a script by precisely following the relevant tutorial >>> (http://fieldtrip.fcdonders.nl/tutorial/spikefield). Everything goes OK for >>> the first couple of steps, but I'm getting stuck when it comes to >>> constructing "a cfg.trl matrix to preprocess the LFP data" described in the >>> tutorial. >>> >>> So can anyone share an example script that actually runs and does this >>> analysis, so I can see what the tutorial is talking about? >>> >>> Thank you very much in advance, >>> Jay Hegdé >>> Medical College of Georgia >>> Georgia Regents University >>> Augusta, GA, USA >>> >>> _______________________________________________ >>> 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From berryv.dberg at gmail.com Tue Jan 21 15:51:51 2014 From: berryv.dberg at gmail.com (berry van den berg) Date: Tue, 21 Jan 2014 09:51:51 -0500 Subject: [FieldTrip] ft_statistics_montecarlo runs slow under ubuntu 13.10 In-Reply-To: References: Message-ID: I pinpointed the problem to being the access time of the second HDD mounted as a ntfs filesystem. Not having this HDD in my searchpath solves my problem. Berry ---------- Forwarded message ---------- From: Gio Piantoni Date: 20 January 2014 14:01 Subject: Re: [FieldTrip] ft_statistics_montecarlo runs slow under ubuntu 13.10 To: berry van den berg sorry, I don't know much more than this, but it makes sense that Linux needs some extra time to access a non-native filesystem. If I were you, I'd just comment out the part in ft_statistics_montecarlo that checks for the toolbox, once you know that the toolbox is installed, you don't need to check it every time. Good luck! On Mon, Jan 20, 2014 at 12:56 PM, berry van den berg wrote: > Yeah, you are right, having a folder on that harddisk added to the search > path slowed those functions (which, exist) by A LOT! I copied fieldtrip to > the main SSD and removed everything from the path in matlab on the ntfs > drive, which is mounted through ntfs-3g. Even though I dont actually use > those functions, it slows up the process by a lot: 1 second versus 6 seconds > when fieldtrip is on the ssd with ext4.... > > I wonder if it is due to the drive being ntfs, or something else... Any > ideas? > > > On 20 January 2014 12:00, Gio Piantoni wrote: >> >> Hi Berry, >> >> interesting debugging. Not sure exactly what's going on, but I noticed >> that Linux might become slower if you have samba/cifs disks mounted. >> Is that the case for you maybe? >> >> HTH, >> -g >> >> On Mon, Jan 20, 2014 at 11:45 AM, berry van den berg >> wrote: >> > Ok, I dove a bit deeper into the problem, using the matlab profiler I >> > was >> > able to pinpoint the problem to ft_hastoolbox.m called by findcluster.m, >> > and >> > specifically the functions fileparts and exist.... Copy pasting those >> > two >> > functions to ft_statistics_montecarlo solves the issue for me for now. >> > >> > The problem seems to be that matlab accessing my filesystem runs slow >> > under >> > linux compared to windows.. I have no idea why and how to solve it but >> > it is >> > not related to fieldtrip. If anyone has suggestions what this might be I >> > would be glad to hear them! >> > >> > Cheers, >> > >> > >> > >> > >> > On 16 January 2014 17:11, berry van den berg >> > wrote: >> >> >> >> Dear Fieldtrip experts, >> >> >> >> This might be an odd question, but maybe someone has an idea where to >> >> start. >> >> >> >> I just got a fancy new laptop (gigabyte p34g) and dual boot with ubuntu >> >> and windows. I usually work in Ubuntu for analysis, so I ran a time >> >> freq >> >> statistics analysis and noticed that ft_statistics_montecarlo runs >> >> extremely >> >> slow under Ubuntu.... In windows it runs at normal speed. The >> >> difference is >> >> huge, 97 seconds vs, 2 seconds for 100 iterations, 24 subjects. >> >> >> >> Speed also doesnt seem influenced by averaging over freq or/and time, >> >> it >> >> is just slow. >> >> >> >> It is not the cpu clock speed (ubuntu nicely utilizes turbo mode, >> >> running >> >> max 3ghz), the cpu is not fully utilized though (only 30 percent or >> >> so)... >> >> >> >> I run matlab 2013b, fieldtrip 20140115 >> >> >> >> Specs are >> >> 8gb ram; only 4gb utilized. >> >> 4700HQ cpu >> >> >> >> Any ideas, because I am clueless >> >> >> >> Cheers, >> >> >> >> -- >> >> Berry van den Berg >> >> berryv.dberg at gmail.com >> > >> > >> > >> > >> > -- >> > Berry van den Berg >> > berryv.dberg at gmail.com >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Berry van den Berg > berryv.dberg at gmail.com -- Berry van den Berg berryv.dberg at gmail.com On 20 January 2014 11:45, berry van den berg wrote: > Ok, I dove a bit deeper into the problem, using the matlab profiler I was > able to pinpoint the problem to ft_hastoolbox.m called by findcluster.m, > and specifically the functions fileparts and exist.... Copy pasting those > two functions to ft_statistics_montecarlo solves the issue for me for now. > > The problem seems to be that matlab accessing my filesystem runs slow > under linux compared to windows.. I have no idea why and how to solve it > but it is not related to fieldtrip. If anyone has suggestions what this > might be I would be glad to hear them! > > Cheers, > > > > > On 16 January 2014 17:11, berry van den berg wrote: > >> Dear Fieldtrip experts, >> >> This might be an odd question, but maybe someone has an idea where to >> start. >> >> I just got a fancy new laptop (gigabyte p34g) and dual boot with ubuntu >> and windows. I usually work in Ubuntu for analysis, so I ran a time freq >> statistics analysis and noticed that ft_statistics_montecarlo runs >> extremely slow under Ubuntu.... In windows it runs at normal speed. The >> difference is huge, 97 seconds vs, 2 seconds for 100 iterations, 24 >> subjects. >> >> Speed also doesnt seem influenced by averaging over freq or/and time, it >> is just slow. >> >> It is not the cpu clock speed (ubuntu nicely utilizes turbo mode, running >> max 3ghz), the cpu is not fully utilized though (only 30 percent or so)... >> >> I run matlab 2013b, fieldtrip 20140115 >> >> Specs are >> 8gb ram; only 4gb utilized. >> 4700HQ cpu >> >> Any ideas, because I am clueless >> >> Cheers, >> >> -- >> Berry van den Berg >> berryv.dberg at gmail.com >> > > > > -- > Berry van den Berg > berryv.dberg at gmail.com > -- Berry van den Berg berryv.dberg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.rombetto at cib.na.cnr.it Tue Jan 21 18:15:22 2014 From: s.rombetto at cib.na.cnr.it (s.rombetto at cib.na.cnr.it) Date: Tue, 21 Jan 2014 18:15:22 +0100 Subject: [FieldTrip] fit volume segment and sensors Message-ID: <20140121181522.e24pixvc8okg0o8c@arco.cib.na.cnr.it> Dear Jörn, dear Fieldtrippers, I have downloaded the 20140114 version of Fieldtrip and tried again to use the command ft_volumerealign in the following way (as suggested in the tutorials) mri = ft_read_mri('*....\Subject01.mri'); cfg=[]; cfg.method = 'interactive'; mri_realigned = ft_volumerealign(cfg, mri); Then I identify it by pressing either n/l/r for fiducials and finally I press q in order to quit. But no results appear on my screen. I have tried to use also the following command [mri] = ft_convert_coordsys(mri, 'itab'); but I get the error message [mri] = ft_convert_coordsys(mri, 'itab'); ??? Error using ==> ft_convert_coordsys at 102 conversion from ctf to itab is not yet supported There is also a command ft_transform_geometry. But this asks for a transformation matrix that is created by using ft_volumerealign. So I cannot use it at the moment. Any idea or suggestion to solve this problem? Maybe there is something I am missing? > Dear Sara, > > the procedure described on the FT-page is tailored towards data > gathered from CTF data just because we happen to have a CTF-system > here. Since you have itab-data, the coordinate system of your sensors > (gradiometers) is not in ctf-space. Some more information on the > different coordinate systems can be found here: > http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined?s[]=coordinate&s[]=system#details_of_the_chieti_itab_coordinate_system > > Your first step needs to be to coregister the gradiometer information > with the MRI. Afaik, ft_volumerealign will then also take care of the > coordinate system then (or, more precisely, return the appropriate > transformation). See also here > http://fieldtrip.fcdonders.nl/faq/how_to_coregister_an_anatomical_mri_with_the_gradiometer_or_electrode_positions?s[]=coordinate&s[]=system > > If I remember correctly, this will not change the coordinate system of > the gradiometers, but adjust the transformation matrix of the MRI > instead. You do not need to be in CTF-space, you just need to make sure > that all your data are in the same coordinate-system. Once you got > that, it should work. For example, for EEG source reconstruction you > can stay in MNI-space all the time. Dealing with these transformation > between coordinate systems is some nasty job, so take care you do it > correctly and e.g. not get confused by neurological and radiological > convention > And note that there is also ft_convert_coordsys for transformation, but > I am not sure whether that works for gradiometers, yet. I think this > all just works for volumes. I hope this works for you. > > Best, > Jörn > > s.rombetto at cib.na.cnr.it wrote: >> Dear Fieldtrippers >> >> I 'm trying to perform source analysis on MEG data. >> I use an AtB system (usually it is described as 'itab' in fieldtrip) >> >> First I have preprocessed my data and I have calculated the cross >> spectral density matrix >> >> Then I have constructed the forward model >> >> mri = ft_read_mri('Subject01.mri'); >> cfg = []; >> cfg.write = 'no'; >> cfg.coordsys = 'ctf'; >> [segmentedmri] = ft_volumesegment(cfg, mri); >> >> and segmented the brain surface: >> >> cfg = []; >> cfg.method = 'singleshell'; >> vol = ft_prepare_headmodel(cfg, segmentedmri); >> >> With the command ft_read_sens I have also read the sensors positions. >> >> Before going on I have checked the results plotting the volume and >> the sensors using the commands >> vol = ft_convert_units(vol,'cm'); >> sens = ft_read_sens(rawdataname); >> figure >> ft_plot_sens(sens, 'style', '*b'); >> hold on >> ft_plot_vol(vol); >> >> and I have noticed that the result is wrong because the volume >> soesn't fit the sensors as shown in the attachment >> Moreover, following some topics in the mailing list I have used >> >> ft_determine_coordsys(mri) >> ft_determine_coordsys(vol) >> ft_determine_coordsys(sens) >> >> and I have found that the coordinate systems are diffeerent. >> >> As far as I understand I should use the ctf coordinate system to >> perform the source analysis. But even if I try to specify this >> coordinate system it did not work. >> Any suggestion to solve this problem? >> >> Kind regards >> ------------------------- >> Dott.ssa Sara Rombetto >> Istituto di Cibernetica >> "E. Caianiello" >> Via Campi Flegrei, 34 >> 80078 Pozzuoli (NA) >> Italy >> mob +39 3401689815 >> tel +39 0818675361 >> fax +39 0818675128 >> -------------------------- >> "I disapprove of what you say, but I will defend to the death your >> right to say >> it." [Evelyn Beatrice Hall, The Friends Of Voltaire] >> >> ---------------------------------------------------------------- >> This message was sent using IMP, the Internet Messaging Program. >> >> >> >> _______________________________________________ >> 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 ------------------------- Dott.ssa Sara Rombetto Istituto di Cibernetica "E. Caianiello" Via Campi Flegrei, 34 80078 Pozzuoli (NA) Italy mob +39 3401689815 tel +39 0818675361 fax +39 0818675128 -------------------------- "I disapprove of what you say, but I will defend to the death your right to say it." [Evelyn Beatrice Hall, The Friends Of Voltaire] ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From ozancag at gmail.com Wed Jan 22 14:07:02 2014 From: ozancag at gmail.com (=?UTF-8?B?T3phbiDDh2HEn2xheWFu?=) Date: Wed, 22 Jan 2014 15:07:02 +0200 Subject: [FieldTrip] ft_rejectvisual problem Message-ID: Hi, When I call ft_rejectvisual, I receive the following matlab error: >> [data] = ft_rejectvisual(cfg, data) the input is raw data with 14 channels and 1 trials showing a summary of the data for all channels and trials computing metric [--------------------------------------------------------|] Error using set Bad property value found. Object Name: axes Property Name: 'XLim' Values must be increasing and non-NaN. Error in axis>LocSetLimits (line 201) set(ax,... Error in axis (line 93) LocSetLimits(ax(j),cur_arg); Error in rejectvisual_summary>redraw (line 252) abc = axis; axis([1 info.ntrl abc(3:4)]); Error in rejectvisual_summary (line 126) redraw(h); Error in ft_rejectvisual (line 274) [chansel, trlsel, cfg] = rejectvisual_summary(cfg, tmpdata); -------- my cfg is empty. Data is a one trial x 14 channel EEG data. The visual rejection GUI appears but when I change the metric the figures in the GUI are not redrawn. Is this expected? Is the above error important? This is Matlab 2013a on Linux with the latest FieldTrip from GIT. Thanks. -- Ozan Çağlayan Research Assistant Galatasaray University - Computer Engineering Dept. http://www.ozancaglayan.com From aestnth at hum.au.dk Wed Jan 22 14:12:45 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Wed, 22 Jan 2014 14:12:45 +0100 Subject: [FieldTrip] ft_rejectvisual problem Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.brovelli at univ-amu.fr Wed Jan 22 14:39:08 2014 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Wed, 22 Jan 2014 14:39:08 +0100 (CET) Subject: [FieldTrip] Spherical coordinates of Brodmann areas (latitude, longitude) Message-ID: <954828467.14846.1390397948383.JavaMail.root@bureau-frontal2.univ-amu.fr> Dear all, does anyone have the listing of the spherical coordinates of Brodmann areas in latitude and longitude ? A single coordinate for Brodmann area would be enough (e.g., the centre of mass), given I need it for visualisation. The coordinate space would be similar to the one developed in this paper: http://www.ncbi.nlm.nih.gov/pubmed/9931269 Thanks a lot bye Andrea From hweeling.lee at gmail.com Wed Jan 22 15:41:45 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 22 Jan 2014 15:41:45 +0100 Subject: [FieldTrip] BrainProducts Easycap layout Message-ID: Dear all, I would like to know if anyone has the layout for 128 EEG channels for BrainProduct easycap. I have the information of the theta/phi coordinates for each of the channels, but I'm not sure how to use these values to create the layout in fieldtrip. It'll be great if someone can help me on this! Thanks. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jan 22 15:55:21 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 22 Jan 2014 15:55:21 +0100 Subject: [FieldTrip] BrainProducts Easycap layout In-Reply-To: References: Message-ID: <52DFDBD9.9000803@donders.ru.nl> Hi Hweeling, have you checked FieldTrip/template/layout? There are a bunch of easycap layout already available. Otherwise, you can easily transform your coordinates to the x/y/z plane, you just need to estimate the size of the head. This is what is happening inside ft_read_sens: % it contains theta and phi sens.label = cellfun(@str2double, tmp{1}(2:end)); theta = cellfun(@str2double, tmp{2}(2:end)); phi = cellfun(@str2double, tmp{3}(2:end)); radians = @(x) pi*x/180; warning('assuming a head radius of 85 mm'); x = 85*cos(radians(phi)).*sin(radians(theta)); y = 85*sin(radians(theta)).*sin(radians(phi)); z = 85*cos(radians(theta)); sens.unit = 'cm'; sens.elecpos = [x y z]; sens.chanpos = [x y z]; Then you can project to a 2D plane, there are a number of methods available in Matlab for that. Best, Jörn On 1/22/2014 3:41 PM, Hwee Ling Lee wrote: > Dear all, > > I would like to know if anyone has the layout for 128 EEG channels for > BrainProduct easycap. > > I have the information of the theta/phi coordinates for each of the > channels, but I'm not sure how to use these values to create the > layout in fieldtrip. > > It'll be great if someone can help me on this! > > Thanks. > > Best regards, > Hweeling > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From julian.keil at gmail.com Wed Jan 22 15:56:35 2014 From: julian.keil at gmail.com (Julian Keil) Date: Wed, 22 Jan 2014 15:56:35 +0100 Subject: [FieldTrip] BrainProducts Easycap layout In-Reply-To: References: Message-ID: Dear Hweeling, you can transform the polar coordinates to carthesian coordinates using the elp2coor.m function I attached. The way it works for me is like this: %% Import ELP cap=importdata('128_channel_easycap.elp'); % Import the Vendor-Provided 3d Positions %%Make an electrode file elec.pnt=elp2coor(cap.data',100)'; % Transform elec.label=cap.textdata; % Make Labels cfg=[]; cfg.elec=elec; lay= ft_prepare_layout(cfg); % Make Layout Good luck! Julian On Wed, Jan 22, 2014 at 3:41 PM, Hwee Ling Lee wrote: > Dear all, > > I would like to know if anyone has the layout for 128 EEG channels for > BrainProduct easycap. > > I have the information of the theta/phi coordinates for each of the > channels, but I'm not sure how to use these values to create the layout in > fieldtrip. > > It'll be great if someone can help me on this! > > Thanks. > > Best regards, > Hweeling > > > _______________________________________________ > 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: elp2coor.m Type: text/x-objcsrc Size: 651 bytes Desc: not available URL: From j.herring at fcdonders.ru.nl Wed Jan 22 16:00:43 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 22 Jan 2014 16:00:43 +0100 (CET) Subject: [FieldTrip] BrainProducts Easycap layout In-Reply-To: References: Message-ID: <011a01cf1782$b92794c0$2b76be40$@herring@fcdonders.ru.nl> Hi Hweeling, If you create a text-file that has three columns: Label, Theta, and Phi coordinate, you can use elec = ft_read_sens(filename) to read the layout into a fieldtrip useable elec structure. The first line of the text file has to be: Site Theta Phi You can also have a look at easycap-M1.txt and easycap-M10.txt in the fieldtrip/template/electrode folder for an example of how the text-file should look like. The theta and phi coordinates will be converted to 3d coordinates assuming a head-radius of 85mm (by default, you can specify this) Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Hwee Ling Lee Sent: woensdag 22 januari 2014 15:42 To: FieldTrip discussion list Subject: [FieldTrip] BrainProducts Easycap layout Dear all, I would like to know if anyone has the layout for 128 EEG channels for BrainProduct easycap. I have the information of the theta/phi coordinates for each of the channels, but I'm not sure how to use these values to create the layout in fieldtrip. It'll be great if someone can help me on this! Thanks. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Wed Jan 22 16:18:08 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 22 Jan 2014 16:18:08 +0100 Subject: [FieldTrip] BrainProducts Easycap layout In-Reply-To: <52dfdd1c.c8380f0a.13a9.30a9SMTPIN_ADDED_BROKEN@mx.google.com> References: <52dfdd1c.c8380f0a.13a9.30a9SMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: Dear all, Thanks for the suggestions. For Jörn, I checked the Fieldtrip/template/layout, but none of them fits my data. I tried the suggestion from Herring, however, I keep getting an error message: Error using ft_convert_units (line 121) cannot determine geometrical units Error in ft_datatype_sens (line 189) sens = ft_convert_units(sens); Error in ft_read_sens (line 331) sens = ft_datatype_sens(sens); I had my data in a text format previously, and it didn't work either. So I'm not sure what to do! I've attached my file in this email, the values are gotten from the pdf info from Easycap regarding the theta/phi coordinates for each site. Thanks! Cheers, Hweeling On 22 January 2014 16:00, Herring, J.D. (Jim) wrote: > Hi Hweeling, > > > > If you create a text-file that has three columns: Label, Theta, and Phi > coordinate, you can use elec = ft_read_sens(filename) to read the layout > into a fieldtrip useable elec structure. > > > The first line of the text file has to be: > > > > Site Theta Phi > > > > You can also have a look at easycap-M1.txt and easycap-M10.txt in the > fieldtrip/template/electrode folder for an example of how the text-file > should look like. > > > > The theta and phi coordinates will be converted to 3d coordinates assuming > a head-radius of 85mm (by default, you can specify this) > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Hwee Ling Lee > *Sent:* woensdag 22 januari 2014 15:42 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] BrainProducts Easycap layout > > > > Dear all, > > > > I would like to know if anyone has the layout for 128 EEG channels for > BrainProduct easycap. > > > > I have the information of the theta/phi coordinates for each of the > channels, but I'm not sure how to use these values to create the layout in > fieldtrip. > > > > It'll be great if someone can help me on this! > > > > Thanks. > > > > Best regards, > > Hweeling > > > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 128Channel.sfp Type: application/octet-stream Size: 1642 bytes Desc: not available URL: From s.rombetto at cib.na.cnr.it Wed Jan 22 16:18:46 2014 From: s.rombetto at cib.na.cnr.it (s.rombetto at cib.na.cnr.it) Date: Wed, 22 Jan 2014 16:18:46 +0100 Subject: [FieldTrip] problem with ft_volumerealign and ft_convert_coordsys Message-ID: <20140122161846.id5xoorlkw444ssc@arco.cib.na.cnr.it> Dear Fieldtrippers, I have downloaded the 20140114 version of Fieldtrip and tried again to use the command ft_volumerealign in the following way (as suggested in the tutorials) mri = ft_read_mri('*....\Subject01.mri'); cfg=[]; cfg.method = 'interactive'; mri_realigned = ft_volumerealign(cfg, mri); Then I identify it by pressing either n/l/r for fiducials and finally I press q in order to quit. But no results appear on my screen. Any suggestion to solve this? I have tried to use also the following command [mri] = ft_convert_coordsys(mri, 'itab'); but I get the error message [mri] = ft_convert_coordsys(mri, 'itab'); ??? Error using ==> ft_convert_coordsys at 102 conversion from ctf to itab is not yet supported In order to better understand the problem, I have tried to perform a different transformation with the code [mri] = ft_convert_coordsys(mri, 'spm', 2) and I get the following message Converting the coordinate system from ctf to spm ??? Undefined function or method 'spm' for input arguments of type 'char'. Error in ==> align_ctf2spm at 121 switch spm('ver') Error in ==> ft_convert_coordsys at 90 obj = align_ctf2spm(obj, opt); Finally I tried to use the function align_itab2spm in the following way mri = align_itab2spm(mri, 2) but I get the error message ??? Undefined function or method 'spm' for input arguments of type 'char'. Error in ==> align_itab2spm at 108 switch spm('ver') Do you have any idea or suggestion to solve this problem? Thanks in advance for any advice, Sara ------------------------- Dott.ssa Sara Rombetto Istituto di Cibernetica "E. Caianiello" Via Campi Flegrei, 34 80078 Pozzuoli (NA) Italy mob +39 3401689815 tel +39 0818675361 fax +39 0818675128 -------------------------- "I disapprove of what you say, but I will defend to the death your right to say it." [Evelyn Beatrice Hall, The Friends Of Voltaire] ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From jan.schoffelen at donders.ru.nl Wed Jan 22 16:30:12 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 22 Jan 2014 16:30:12 +0100 Subject: [FieldTrip] problem with ft_volumerealign and ft_convert_coordsys In-Reply-To: <20140122161846.id5xoorlkw444ssc@arco.cib.na.cnr.it> References: <20140122161846.id5xoorlkw444ssc@arco.cib.na.cnr.it> Message-ID: <9250261B-57E7-457E-BD21-539221F13E6D@donders.ru.nl> Hi Sara, > I have downloaded the 20140114 version of Fieldtrip and tried again to > use the command ft_volumerealign in the following way (as suggested in > the tutorials) > > mri = ft_read_mri('*....\Subject01.mri'); > cfg=[]; > cfg.method = 'interactive'; > mri_realigned = ft_volumerealign(cfg, mri); > > Then I identify it by pressing either n/l/r for fiducials and finally > I press q in order to quit. But no results appear on my screen. > Any suggestion to solve this? I don't understand what you mean by 'no results appear on my screen'. Does this mean that mri_realigned is not created? > I have tried to use also the following command > [mri] = ft_convert_coordsys(mri, 'itab'); > > but I get the error message > [mri] = ft_convert_coordsys(mri, 'itab'); > ??? Error using ==> ft_convert_coordsys at 102 > conversion from ctf to itab is not yet supported > > In order to better understand the problem, I have tried to perform a different transformation with the code > > [mri] = ft_convert_coordsys(mri, 'spm', 2) > and I get the following message > > Converting the coordinate system from ctf to spm > ??? Undefined function or method 'spm' for input arguments of type 'char'. You have to have spm on your path in order to get this. try ft_hastoolbox('spm',1) and try again. > > Error in ==> align_ctf2spm at 121 > switch spm('ver') > > Error in ==> ft_convert_coordsys at 90 > obj = align_ctf2spm(obj, opt); > > Finally I tried to use the function align_itab2spm in the following way > mri = align_itab2spm(mri, 2) > but I get the error message > > ??? Undefined function or method 'spm' for input arguments of type 'char'. > > Error in ==> align_itab2spm at 108 > switch spm('ver') > See above. Best, Jan-Mathijs > Do you have any idea or suggestion to solve this problem? > > Thanks in advance for any advice, > Sara > > ------------------------- > Dott.ssa Sara Rombetto > Istituto di Cibernetica > "E. Caianiello" > Via Campi Flegrei, 34 > 80078 Pozzuoli (NA) > Italy > mob +39 3401689815 > tel +39 0818675361 > fax +39 0818675128 > -------------------------- > "I disapprove of what you say, but I will defend to the death your right to say > it." [Evelyn Beatrice Hall, The Friends Of Voltaire] > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Wed Jan 22 16:43:19 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 22 Jan 2014 16:43:19 +0100 (CET) Subject: [FieldTrip] BrainProducts Easycap layout In-Reply-To: References: <52dfdd1c.c8380f0a.13a9.30a9SMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: <013301cf1788$ac70f9f0$0552edd0$@herring@fcdonders.ru.nl> Dear Hweeling, First of all you should rename the file to 128Channel.txt, if you use the .sfp extension Fieldtrip will recognize it as a different filetype. Furthermore, I just noticed that there is a bug in ft_read_sens. It tries to convert the channel label to a double, which is of course not possible and not wanted in case of channel labels. The bug will be fixed a.s.a.p. so you should be able to download the updated version by tomorrow, if I am not mistaken. Best, Jim From: Hwee Ling Lee [mailto:hweeling.lee at gmail.com] Sent: woensdag 22 januari 2014 16:18 To: Herring, J.D. (Jim) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] BrainProducts Easycap layout Dear all, Thanks for the suggestions. For Jörn, I checked the Fieldtrip/template/layout, but none of them fits my data. I tried the suggestion from Herring, however, I keep getting an error message: Error using ft_convert_units (line 121) cannot determine geometrical units Error in ft_datatype_sens (line 189) sens = ft_convert_units(sens); Error in ft_read_sens (line 331) sens = ft_datatype_sens(sens); I had my data in a text format previously, and it didn't work either. So I'm not sure what to do! I've attached my file in this email, the values are gotten from the pdf info from Easycap regarding the theta/phi coordinates for each site. Thanks! Cheers, Hweeling On 22 January 2014 16:00, Herring, J.D. (Jim) wrote: Hi Hweeling, If you create a text-file that has three columns: Label, Theta, and Phi coordinate, you can use elec = ft_read_sens(filename) to read the layout into a fieldtrip useable elec structure. The first line of the text file has to be: Site Theta Phi You can also have a look at easycap-M1.txt and easycap-M10.txt in the fieldtrip/template/electrode folder for an example of how the text-file should look like. The theta and phi coordinates will be converted to 3d coordinates assuming a head-radius of 85mm (by default, you can specify this) Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Hwee Ling Lee Sent: woensdag 22 januari 2014 15:42 To: FieldTrip discussion list Subject: [FieldTrip] BrainProducts Easycap layout Dear all, I would like to know if anyone has the layout for 128 EEG channels for BrainProduct easycap. I have the information of the theta/phi coordinates for each of the channels, but I'm not sure how to use these values to create the layout in fieldtrip. It'll be great if someone can help me on this! Thanks. Best regards, Hweeling -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Wed Jan 22 16:51:59 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 22 Jan 2014 16:51:59 +0100 Subject: [FieldTrip] BrainProducts Easycap layout In-Reply-To: <52dfe764.09240f0a.0ed0.ffff8384SMTPIN_ADDED_BROKEN@mx.google.com> References: <52dfdd1c.c8380f0a.13a9.30a9SMTPIN_ADDED_BROKEN@mx.google.com> <52dfe764.09240f0a.0ed0.ffff8384SMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: Dear Jim, Thanks. I did try the file as a text file, but it didn't work previously. I'll download the latest version of Fieldtrip tomorrow, and try again. Thanks again! Cheers, Hweeling On 22 January 2014 16:43, Herring, J.D. (Jim) wrote: > Dear Hweeling, > > > > First of all you should rename the file to 128Channel.txt, if you use the > .sfp extension Fieldtrip will recognize it as a different filetype. > > > > Furthermore, I just noticed that there is a bug in ft_read_sens. It tries > to convert the channel label to a double, which is of course not possible > and not wanted in case of channel labels. > > > > The bug will be fixed a.s.a.p. so you should be able to download the > updated version by tomorrow, if I am not mistaken. > > > > Best, > > > > Jim > > *From:* Hwee Ling Lee [mailto:hweeling.lee at gmail.com] > *Sent:* woensdag 22 januari 2014 16:18 > *To:* Herring, J.D. (Jim) > *Cc:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] BrainProducts Easycap layout > > > > Dear all, > > > > Thanks for the suggestions. For Jörn, I checked the > Fieldtrip/template/layout, but none of them fits my data. I tried the > suggestion from Herring, however, I keep getting an error message: > > Error using ft_convert_units (line 121) > > cannot determine geometrical units > > > > Error in ft_datatype_sens (line 189) > > sens = ft_convert_units(sens); > > > > Error in ft_read_sens (line 331) > > sens = ft_datatype_sens(sens); > > > > I had my data in a text format previously, and it didn't work either. So > I'm not sure what to do! > > > > I've attached my file in this email, the values are gotten from the pdf > info from Easycap regarding the theta/phi coordinates for each site. > > > > Thanks! > > > > Cheers, > > Hweeling > > > > > > On 22 January 2014 16:00, Herring, J.D. (Jim) > wrote: > > Hi Hweeling, > > > > If you create a text-file that has three columns: Label, Theta, and Phi > coordinate, you can use elec = ft_read_sens(filename) to read the layout > into a fieldtrip useable elec structure. > > > The first line of the text file has to be: > > > > Site Theta Phi > > > > You can also have a look at easycap-M1.txt and easycap-M10.txt in the > fieldtrip/template/electrode folder for an example of how the text-file > should look like. > > > > The theta and phi coordinates will be converted to 3d coordinates assuming > a head-radius of 85mm (by default, you can specify this) > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Hwee Ling Lee > *Sent:* woensdag 22 januari 2014 15:42 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] BrainProducts Easycap layout > > > > Dear all, > > > > I would like to know if anyone has the layout for 128 EEG channels for > BrainProduct easycap. > > > > I have the information of the theta/phi coordinates for each of the > channels, but I'm not sure how to use these values to create the layout in > fieldtrip. > > > > It'll be great if someone can help me on this! > > > > Thanks. > > > > Best regards, > > Hweeling > > > > > > > > -- > > ================================================= > Dr. rer. nat. Lee, Hwee Ling > Postdoc > German Center for Neurodegenerative Diseases (DZNE) Bonn > > Email 1: hwee-ling.leedzne.de > Email 2: hweeling.leegmail.com > > > > https://sites.google.com/site/hweelinglee/home > > Correspondence Address: > Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany > ================================================= > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.rombetto at cib.na.cnr.it Wed Jan 22 16:53:55 2014 From: s.rombetto at cib.na.cnr.it (s.rombetto at cib.na.cnr.it) Date: Wed, 22 Jan 2014 16:53:55 +0100 Subject: [FieldTrip] problem with ft_volumerealign and ft_convert_coordsys In-Reply-To: <9250261B-57E7-457E-BD21-539221F13E6D@donders.ru.nl> References: <20140122161846.id5xoorlkw444ssc@arco.cib.na.cnr.it> <9250261B-57E7-457E-BD21-539221F13E6D@donders.ru.nl> Message-ID: <20140122165355.pkocefgu684gcg40@arco.cib.na.cnr.it> Hi Jan-Mathijs thanks for the fast answer > I don't understand what you mean by 'no results appear on my > screen'. Does this mean that mri_realigned is not created? yes, I mean that I have no output at all. > You have to have spm on your path in order to get this. try > ft_hastoolbox('spm',1) and try again. you were right, this was a stupid mistake. I didn't install the spm toolbox. Now I have installed it and tried again. So I get a different erro message: ??? Error using ==> spm_platform>init_platform at 173 PCWIN64 not supported architecture for SPM Error in ==> spm_platform at 65 if isempty(PLATFORM), PLATFORM = init_platform; end Error in ==> spm_vol_minc at 80 if ~spm_platform('bigend') & datatype~=2 & datatype~=2+128, datatype = datatype*256; end; Error in ==> ft_read_mri at 132 hdr = spm_vol_minc(filename); Error in ==> align_ctf2spm at 137 mri2 = ft_read_mri(template); Error in ==> ft_convert_coordsys at 90 obj = align_ctf2spm(obj, opt); as far as I understand one of the problem is that I use a 64 bit pc. Do you know any solution for this? Moreover why the conversion from ctf to itab is not yet supported? Best regards Sara >> >> Error in ==> align_ctf2spm at 121 >> switch spm('ver') >> >> Error in ==> ft_convert_coordsys at 90 >> obj = align_ctf2spm(obj, opt); >> >> Finally I tried to use the function align_itab2spm in the following way >> mri = align_itab2spm(mri, 2) >> but I get the error message >> >> ??? Undefined function or method 'spm' for input arguments of type 'char'. >> >> Error in ==> align_itab2spm at 108 >> switch spm('ver') >> > > > See above. > > Best, > Jan-Mathijs > > >> Do you have any idea or suggestion to solve this problem? >> >> Thanks in advance for any advice, >> Sara >> >> ------------------------- >> Dott.ssa Sara Rombetto >> Istituto di Cibernetica >> "E. Caianiello" >> Via Campi Flegrei, 34 >> 80078 Pozzuoli (NA) >> Italy >> mob +39 3401689815 >> tel +39 0818675361 >> fax +39 0818675128 >> -------------------------- >> "I disapprove of what you say, but I will defend to the death your >> right to say >> it." [Evelyn Beatrice Hall, The Friends Of Voltaire] >> >> ---------------------------------------------------------------- >> This message was sent using IMP, the Internet Messaging Program. >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > ------------------------- Dott.ssa Sara Rombetto Istituto di Cibernetica "E. Caianiello" Via Campi Flegrei, 34 80078 Pozzuoli (NA) Italy mob +39 3401689815 tel +39 0818675361 fax +39 0818675128 -------------------------- "I disapprove of what you say, but I will defend to the death your right to say it." [Evelyn Beatrice Hall, The Friends Of Voltaire] ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From r.oostenveld at donders.ru.nl Wed Jan 22 17:02:21 2014 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 22 Jan 2014 17:02:21 +0100 Subject: [FieldTrip] ft_rejectvisual problem In-Reply-To: References: Message-ID: Hi Ozan The error suggests that the variance that is computed is either 0, or is nan. A zero variance could be the cause of a channel that is clipping. The consequence of that is that the scaling of the vertical axis cannot be determined correctly. Using the following code data = [] data.label = {'a'} data.time = {1:1000}; data.trial = {zeros(1,1000)}; cfg = []; ft_rejectvisual(cfg, data) I was able to reproduce your error. I only have a single all-zero channel (and one trial), but it suggests that your data is all zero. I suggest you check your data with ft_databrowser or standard MATLAB plotting functions. The error of ft_rejectvisual however should not occur, so I have filed it on our bug tracking system as http://bugzilla.fcdonders.nl/show_bug.cgi?id=2450 If you want to keep track of the bug and be notified when we fix it, please register at bugzilla.fcdonders.nl and add yourself as CC to the bug. best regards and thanks for reporting the issue, Robert On 22 Jan 2014, at 14:07, Ozan Çağlayan wrote: > Hi, > > When I call ft_rejectvisual, I receive the following matlab error: > >>> [data] = ft_rejectvisual(cfg, data) > the input is raw data with 14 channels and 1 trials > showing a summary of the data for all channels and trials > computing metric [--------------------------------------------------------|] > Error using set > Bad property value found. > Object Name: axes > Property Name: 'XLim' > Values must be increasing and non-NaN. > > Error in axis>LocSetLimits (line 201) > set(ax,... > > Error in axis (line 93) > LocSetLimits(ax(j),cur_arg); > > Error in rejectvisual_summary>redraw (line 252) > abc = axis; axis([1 info.ntrl abc(3:4)]); > > Error in rejectvisual_summary (line 126) > redraw(h); > > Error in ft_rejectvisual (line 274) > [chansel, trlsel, cfg] = rejectvisual_summary(cfg, tmpdata); > > -------- > > my cfg is empty. Data is a one trial x 14 channel EEG data. The visual > rejection GUI appears but when I change the metric the figures in the > GUI are not redrawn. Is this expected? Is the above error important? > This is Matlab 2013a on Linux with the latest FieldTrip from GIT. > > Thanks. > > -- > Ozan Çağlayan > Research Assistant > Galatasaray University - Computer Engineering Dept. > http://www.ozancaglayan.com > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From catanese.julien at gmail.com Wed Jan 22 19:22:43 2014 From: catanese.julien at gmail.com (Julien Catanese) Date: Wed, 22 Jan 2014 13:22:43 -0500 Subject: [FieldTrip] ft_connectivityanalysis for one long trial Message-ID: Hi dear FieldTrip community, I'm trying to get the coherence spectrum between 2 LFP signals (based on the tutorial: "Analysis of sensor- and source-level connectivity"). This is sleep data, so I have only one long "trial" generated with ft_redefinetrial(). I can run ft_freqanalysis() without problems, but both for 'mtmconvol' and 'mtmfft' the next step, ft_connectivityanalysis(), fails: 1/ using 'mtmconvol': the cohspctrum consists of all '1' (the same happens when using 'fourier' instead of 'powandcsd') 2/ using 'mtmfft': "Error using ft_connectivityplot (line 99) the data should have a dimord of chan_chan_freq or chancmb_freq" How can I get a coherence spectrum for this data? Do I have to artificially chop it up into say, 2-second "fake trials"? notice that MATLAB's mscohere() works fine on the same data (so data are ok). More details below: 1/ using mtmconvol : %% starting point: loaded data data = hdr: [1x1 struct] label: {'LFP1' 'LFP2'} time: {[1x200000 double]} trial: {[2x200000 double]} fsample: 2000 cfg: [1x1 struct] sampleinfo: [1 200000] %% make one long trial cfg = []; cfg.trl = [1 200000 0]; data_faketrl = ft_redefinetrial(cfg,data); %% do frequqency anlaysis cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:1:150; cfg.t_ftimwin = ones(size(cfg.foi)).*2; % 2-second window cfg.toi = 0:1:10; cfg.keeptrials = 'yes'; cfg.channel = {'LFP1', 'LFP2'}; cfg.channelcmb = {'LFP1', 'LFP2'}; >> freq = ft_freqanalysis(cfg, data_faketrl) freq = label: {'LFP1' 'LFP2'} dimord: 'rpt_chan_freq_time' freq: [1x150 double] time: [0 1 2 3 4 5 6 7 8 9 10] powspctrm: [4-D double] labelcmb: {'LFP1' 'LFP2'} crsspctrm: [4-D double] cumtapcnt: [1x150 double] cfg: [1x1 struct] %% coherence spectrum has all ones cfg = []; cfg.method = 'coh'; coh = ft_connectivityanalysis(cfg, freq); coh = labelcmb: {'LFP1' 'LFP2'} dimord: 'chan_freq_time' cohspctrm: [1x150x11 double] freq: [1x150 double] time: [0 1 2 3 4 5 6 7 8 9 10] dof: 150 cfg: [1x1 struct] % coh.cohspctrm(:,:,2:end) is all ones --> fail 2/ using mtmfft: %% cfg = []; cfg.output = 'powandcsd' cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.foi = 1:1:150; cfg.channel = {'LFP1', 'LFP2'}; cfg.channelcmb = {'LFP1', 'LFP2'}; >> freq = ft_freqanalysis(cfg, data_faketrl) freq = label: {'LFP1' 'LFP2'} dimord: 'rpt_chan_freq' freq: [1x150 double] powspctrm: [1x2x150 double] labelcmb: {'LFP1' 'LFP2'} crsspctrm: [1x1x150 double] cumsumcnt: 200000 cumtapcnt: 1 cfg: [1x1 struct] %% coherence spectrum fails: cfg = []; cfg.parameter = 'cohspctrm'; cfg.channelcmb = {'LFP1', 'LFP2'}; >> ft_connectivityplot(cfg, coh); Error using ft_connectivityplot (line 99) the data should have a dimord of chan_chan_freq or chancmb_freq coh = labelcmb: {'LFP1' 'LFP2'} dimord: 'chan_freq' cohspctrm: [1x150 double] freq: [1x150 double] dof: 1 cfg: [1x1 struct] >> unique([coh.cohspctrm(:)]) ans = 1.000000000000000 1.000000000000000 1.000000000000000 1.000000000000000 1.000000000000000 Thanks for your help, Julien C -- *Dr. Julien Catanese* *VanderMeerLab post-doc. University of Waterloo, Ontario, Canada. * *cell : +1 (519) 781 7575* *tel lab : +1 (519) 888 4567 ext 31354* -------------- next part -------------- An HTML attachment was scrubbed... URL: From instanton at gmail.com Wed Jan 22 22:27:21 2014 From: instanton at gmail.com (woun zoo) Date: Wed, 22 Jan 2014 13:27:21 -0800 Subject: [FieldTrip] Questions about transfer entropy Message-ID: Hi all I'd like to get some insight from you for transfer entropy analysis of my ECoG data before I run all possible parameters. I'd like to establish some connectivity between frontal and visual channels in ECoG recording. However, in our data, there is a very strong driven component, namely, steady state visually evoked potentials. SSVEPs in our data appear at several frequencies that are harmonics of the input frequencies and their sum and difference frequencies. So our data has a completely deterministic (SSVEPs) dynamics and the rest of stochastic (non-stimulus locked) activities. Data has 20 trials in total. Each trial lasts 2.4sec. Sampling rate is 1200hz. Raw data were bandpass filtered from 0.1Hz to 500hz. In order to find an effective connectivity, I chose to use TRENTOOL box for transfer entropy. I used Ragwitz method from TRENTOOL (nonlinear locally constant prediction method). This is where I'd like to get some good insight for choosing parameters. Just below, I wrote my questions in blue text. I'm sorry to bother you with all these. But I really want to get some good insight from you because I am not exactly sure if I'm putting garbage inputs or not. At the end of this email, I put my code. OR do you think granger causality is better? But granger causality wants your data to satisfy several requirements. So I went for Transfer Entropy... cfgTEP.toi = [min(data.time{1,1}) max(data.time{1,1})] --> Basically from trial start to trial end. cfgTEP.predicttimemin_u= 10; cfgTEP.predicttimemax_u= 240; --> I am not sure where and how these min and max were used in TEragwitz calculation in TEprepare.m. VW_ds fixed 1 as a prediction horizon. I'm not sure if it's good to predict just next time sample point for SSVEP + noisy data? cfgTEP.actthrvalue = 100; --> I don't know the reason why this autocorrelation time value needs to be set by hand cause I thought embedding delay time gets automatically decided by autocorrelation. Is there a special logic behind setting this by hand? For particular two channels, their ACT values were 54 sample points, etc. Max ACT was 134 or something. Is this due to noise? If I have strong oscillatory activities, am I not supposed to see ACT values close to oscillatory period? cfgTEP.maxlag = 1000; --> 1000 is default. What will be a good lag number to see autocorrelation? Should I use a half of total sample points of data (2880/2 = 1440)? cfgTEP.minnrtrials = 7; --> Does this mean if trial selection rule by ACT value rejects more than 13 trials out of total 20 trials, program won't run? What is a good number for this when I have 20 trials? For main parameters for TEragwitz, cfgTEP.optimizemethod ='ragwitz'; cfgTEP.ragdim = 1:10; --> I just chose all possible embedding dimension from 1 to 10. Should I try to put more than 10? But TE analysis always says, embedding dimension maybe 2, which sounds about right for pure sine waves like SSVEPs. But with 0.1Hz~500hz bandpass, I have tons of non-stimulus locked low and high noisy activities. But when I chose Cao's method, it says, 5 or 6. cfgTEP.ragtaurange = [0.1 2]; --> For delay time, I chose this range. But Ragwitz always chose the smallest value. If I put this range from [1 2], then it chooses 1. If it was [0.5 3], it chose 0.5. So I'd really like to know what kind of values I should put here. cfgTEP.ragtausteps = 15; % steps for ragwitz tau steps 15 cfgTEP.repPred = 600; --> I just chose this. I could vary this. Depending on what I put here, final significance of TE changes too. cfgTEP.flagNei = 'Mass' ; %neigbour analyse type cfgTEP.sizeNei = 4; --> Ideally I guess I might have to vary size of neighborhood in phase space For Surrogate analysis, cfgTESS.optdimusage = 'indivdim'; cfgTGAA.select_opt_u = 'product_evidence'; % 'max_TEdiff'; --> I just chose 'product_evidence' because help file of InteractionDelayReconstruction_analyze.m says 'max_TEdiff' could be problematic in certain case. Which one is normal to use? cfgTGAA.select_opt_u_pos = 'shortest'; --> Also for this, I don't know which one is normal to use. I'm sorry if this questions are too hectic. I really appreciate if you could give me some good insight about parameters for ECoG steady-state visual evoked potential data. Thank you very much. Have a nice day. ======================== ======================== code here load data %% define cfg for TEprepare.m cfgTEP = []; % path to OpenTSTOOL cfgTEP.Path2TSTOOL = '../OpenTSTOOL'; %strcat(work_dir,'toolboxes/','OpenTSTOOL'); % data cfgTEP.toi = [min(data.time{1,1}) max(data.time{1,1})]; % time of interest % cfgTEP.sgncmb = {'2' '43'}; % channels to be analyzed % or: datalabels = data.label; %select channels for TE compute cfgTEP.channel = datalabels; % scanning of interaction delays u cfgTEP.predicttimemin_u= 41; % minimum u to be scanned cfgTEP.predicttimemax_u= 240; % maximum u to be scanned cfgTEP.predicttimestepsize = 1; % time steps between u's to be scanned % estimator cfgTEP.TEcalctype='VW_ds'; % use the new TE estimator (Wibral, 2013) % ACT estimation and constraints on allowed ACT(autocorelation time) cfgTEP.actthrvalue = 100; % threshold for ACT cfgTEP.maxlag = 1000; cfgTEP.minnrtrials = 7; % minimum acceptable number of trials % optimizing embedding cfgTEP.optimizemethod ='ragwitz'; % criterion used cfgTEP.ragdim = 1:10; % criterion dimension cfgTEP.ragtaurange = [0.1 2]; % range for tau cfgTEP.ragtausteps = 15; % steps for ragwitz tau steps 15 cfgTEP.repPred = 600; % size(data.trial{1,1},2)*(3/4); % kernel-based TE estimation cfgTEP.flagNei = 'Mass' ; %neigbour analyse type cfgTEP.sizeNei = 4; %neigbours to analyse % optimizing embedding % cfgTEP.optimizemethod = 'cao'; % cfgTEP.caodim = 1:10; % cfgTEP.caokth_neighbors = 4; %% define cfg for TEsurrogatestats_ensemble.m cfgTESS= []; % use individual dimensions for embedding cfgTESS.optdimusage = 'indivdim'; % statistical and shift testing cfgTESS.tail = 1; cfgTESS.numpermutation = 5e4; cfgTESS.shifttesttype ='TEshift>TE'; cfgTESS.surrogatetype = 'blockreverse1'; %'trialshuffling'; % results file name data_save_path = strcat(data_dir,'TE'); if ~isdir(data_save_path); mkdir(data_save_path); end partial_save_dir = strcat(data_save_path,'/','dataset'); if ~isdir(partial_save_dir); mkdir(partial_save_dir); end cfgTESS.fileidout = strcat(partial_save_dir,'/','dataset'); %% calculation - scan over specified values for u f_time=tic; TGA_results=InteractionDelayReconstruction_calculate(cfgTEP,cfgTESS,data); toc(f_time); savename=strcat(data_save_path,'/','dataset_results'); save(savename,'TGA_results'); %% analysis - find maximum TE value to reconstruct the interaction delay u cfgTGAA = []; cfgTGAA.select_opt_u = 'product_evidence'; % 'max_TEdiff'; cfgTGAA.select_opt_u_pos = 'shortest'; TGA_analyzed=InteractionDelayReconstruction_analyze(cfgTGAA,TGA_results); savename2=strcat(data_save_path,'/','dataset_complete_analyzed.mat'); save(savename2,'TGA_analyzed'); -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jan 23 08:41:39 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 23 Jan 2014 08:41:39 +0100 Subject: [FieldTrip] ft_rejectvisual problem In-Reply-To: References: Message-ID: <901C3C2D-197C-4B75-8FF9-3DF33BDD1C98@donders.ru.nl> Hi Robert and Ozan, I think that the problem reported is due to the fact that there was just one single trial in the input. In the drawing of the figure, the axis limits are set as [1 numtrl yax1 yax2] (or something), where in Ozan's case numtrl is 1. Matlab does not like the axis limits to be non increasing On Jan 22, 2014, at 5:02 PM, Robert Oostenveld wrote: > Hi Ozan > > The error suggests that the variance that is computed is either 0, or is nan. A zero variance could be the cause of a channel that is clipping. The consequence of that is that the scaling of the vertical axis cannot be determined correctly. > > Using the following code > > data = [] > data.label = {'a'} > data.time = {1:1000}; > data.trial = {zeros(1,1000)}; > > cfg = []; > ft_rejectvisual(cfg, data) > > I was able to reproduce your error. I only have a single all-zero channel (and one trial), but it suggests that your data is all zero. I suggest you check your data with ft_databrowser or standard MATLAB plotting functions. > > The error of ft_rejectvisual however should not occur, so I have filed it on our bug tracking system as http://bugzilla.fcdonders.nl/show_bug.cgi?id=2450 > > If you want to keep track of the bug and be notified when we fix it, please register at bugzilla.fcdonders.nl and add yourself as CC to the bug. > > best regards and thanks for reporting the issue, > Robert > > > > On 22 Jan 2014, at 14:07, Ozan Çağlayan wrote: > >> Hi, >> >> When I call ft_rejectvisual, I receive the following matlab error: >> >>>> [data] = ft_rejectvisual(cfg, data) >> the input is raw data with 14 channels and 1 trials >> showing a summary of the data for all channels and trials >> computing metric [--------------------------------------------------------|] >> Error using set >> Bad property value found. >> Object Name: axes >> Property Name: 'XLim' >> Values must be increasing and non-NaN. >> >> Error in axis>LocSetLimits (line 201) >> set(ax,... >> >> Error in axis (line 93) >> LocSetLimits(ax(j),cur_arg); >> >> Error in rejectvisual_summary>redraw (line 252) >> abc = axis; axis([1 info.ntrl abc(3:4)]); >> >> Error in rejectvisual_summary (line 126) >> redraw(h); >> >> Error in ft_rejectvisual (line 274) >> [chansel, trlsel, cfg] = rejectvisual_summary(cfg, tmpdata); >> >> -------- >> >> my cfg is empty. Data is a one trial x 14 channel EEG data. The visual >> rejection GUI appears but when I change the metric the figures in the >> GUI are not redrawn. Is this expected? Is the above error important? >> This is Matlab 2013a on Linux with the latest FieldTrip from GIT. >> >> Thanks. >> >> -- >> Ozan Çağlayan >> Research Assistant >> Galatasaray University - Computer Engineering Dept. >> http://www.ozancaglayan.com >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Thu Jan 23 08:45:24 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Thu, 23 Jan 2014 08:45:24 +0100 Subject: [FieldTrip] ft_rejectvisual problem Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ayobimpe2004 at hotmail.com Thu Jan 23 14:43:45 2014 From: ayobimpe2004 at hotmail.com (Azeez Adebimpe) Date: Thu, 23 Jan 2014 14:43:45 +0100 Subject: [FieldTrip] connectivity from source analysis Message-ID: Dear all, I am trying to calculate connectivity from source data using powcorr method but I am getting below error. Please your assistance will be highly appreciated. /Warning: conversion from mom to pow is not possible, either because there is nomom in the data, or because the dimension of mom>1. in that case callft_sourcedescriptives first with cfg.projectmom > In ft_checkdata>fixsource at 1488 In ft_checkdata at 708 In ft_connectivityanalysis at 407??? Out of memory. Type HELP MEMORY for your options. Error in ==> ft_connectivity_corr at 176 p1 = p1(:,ones(1,siz(3)),:,:,:,:); Error in ==> ft_connectivityanalysis at 554 [datout, varout, nrpt] = ft_connectivity_corr(data.(inparam), optarg{:});/ Azeez Adebimpe -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.cox at uva.nl Thu Jan 23 16:19:58 2014 From: r.cox at uva.nl (Roy Cox) Date: Thu, 23 Jan 2014 16:19:58 +0100 Subject: [FieldTrip] degrees of freedom Message-ID: Hi all, I'm using ft_timelockstatistics with indepsamplesT to compare spatial topographies between two groups (n=15 and n=13). The measure I'm interested in has no time dimension, so I basically have one sample per electrode for each subject. This works fine (I get the effects I hoped for). In order to make the statistics 'slightly more valid', however, I need to adjust the degrees of freedom. That is, the data I'm comparing between groups has already had a covariate taken out. So df has to be df-1. Doesn't look like Fieldtrip allows you to set this in the cfg struct somewhere, so any suggestions where I need to hack? Thanks, Roy -- Roy Cox, M.Sc. | Brain & Cognition Group | Department of Psychology | University of Amsterdam | Weesperplein 4 | 1018 XA Amsterdam | the Netherlands | room 3.21 | phone: +31 20 525 6847 | email: r.cox at uva.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Fri Jan 24 08:54:24 2014 From: joramvandriel at gmail.com (Joram van Driel) Date: Fri, 24 Jan 2014 08:54:24 +0100 Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' Message-ID: Hi all, I'm getting stuck with ft_sourcestatistics. I want to do a simple two-condition contrast on neuromag MEG data, where I did frequency beamforming on a pre vs. post tf-window. I followed the instructions of the tutorial, so for each subject and condition: 1) ft_sourceanalysis with subject-specific vol and grid structures, where I did the pre vs post contrast as follows: sourceAll = ft_sourceanalysis(cfg, freqAll(condi)); cfg.grid.filter = sourceAll.avg.filter; sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) ); sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi)); sourceDiff(condi) = sourcePost_con; sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow - sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; 2) ft_sourceinterpolate with the subject-specific mri 3) ft_volumenormalize to MNI with coordsys 'neuromag'. 4) The output is stored in a subject-by-condition cell array, which I put into ft_sourcestatistics with the following cfg: cfg = []; cfg.parameter = 'avg.pow'; cfg.method = 'analytic'; cfg.statistic = 'depsamplesT'; cfg.correctm = 'no'; cfg.alpha = 0.05; Nsub = 10; cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.tail = 0; % number, -1, 1 or 0 (default = 0) cfg.ivar = 1; % number or list with indices, independent variable(s) cfg.uvar = 2; % number or list with indices, unit variable(s) stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, sourceDiffNorm{:,2}); This results in the error that it cannot find the field 'pos'; however this field is only present in the result from ft_sourceanalysis (and differs for each subject), but disappears as soon as ft_sourceinterpolate is applied. I tried to put the result from ft_sourceanalysis straight into ft_sourcestatistics (which according to the help should be possible), but this doesn't recognize the input as volume data (and apart from that, the subjects aren't spatially aligned this way). I hope someone can help me with this; any help is much appreciated! Thanks, Joram -- Joram van Driel, MSc. PhD student @ University of Amsterdam Brain & Cognition @ Department of Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Fri Jan 24 09:00:18 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Fri, 24 Jan 2014 09:00:18 +0100 Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Fri Jan 24 09:14:13 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Fri, 24 Jan 2014 09:14:13 +0100 (CET) Subject: [FieldTrip] degrees of freedom In-Reply-To: References: Message-ID: <000c01cf18dc$448b10f0$cda132d0$@herring@fcdonders.ru.nl> Hi Roy, Fieldtrip allows you to create and use your own functions to calculate statistics. What you could also do is adjust the indepsamplesT statistic function (fieldtrip/statfun/ft_statfun_indepsamplesT.m) to suite your needs (E.g. change the Df in line 89). Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Roy Cox Sent: donderdag 23 januari 2014 16:20 To: fieldtrip at science.ru.nl Subject: [FieldTrip] degrees of freedom Hi all, I'm using ft_timelockstatistics with indepsamplesT to compare spatial topographies between two groups (n=15 and n=13). The measure I'm interested in has no time dimension, so I basically have one sample per electrode for each subject. This works fine (I get the effects I hoped for). In order to make the statistics 'slightly more valid', however, I need to adjust the degrees of freedom. That is, the data I'm comparing between groups has already had a covariate taken out. So df has to be df-1. Doesn't look like Fieldtrip allows you to set this in the cfg struct somewhere, so any suggestions where I need to hack? Thanks, Roy -- Roy Cox, M.Sc. | Brain & Cognition Group | Department of Psychology | University of Amsterdam | Weesperplein 4 | 1018 XA Amsterdam | the Netherlands | room 3.21 | phone: +31 20 525 6847 | email: r.cox at uva.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.lam at fcdonders.ru.nl Fri Jan 24 09:55:39 2014 From: n.lam at fcdonders.ru.nl (Lam, Nietzsche) Date: Fri, 24 Jan 2014 09:55:39 +0100 (CET) Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' In-Reply-To: Message-ID: <711157447.420800.1390553739013.JavaMail.root@indus.zimbra.ru.nl> Hi Joram, I'm not entirely sure if this is the solution, but when you call ft_sourcestatistics, you can try this: FieldTrip statistics functions understands that you want to use the data from all subjects when you use {:}, so there's no need to call individual columns with {:,X}. Best, Nietzsche ----- Original Message ----- > From: "Joram van Driel" > To: "FieldTrip discussion list" > Sent: Friday, 24 January, 2014 8:54:24 AM > Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' > Hi all, > > > I'm getting stuck with ft_sourcestatistics. > I want to do a simple two-condition contrast on neuromag MEG data, > where I did frequency beamforming on a pre vs. post tf-window. > > > I followed the instructions of the tutorial, so for each subject and > condition: > > > 1) ft_sourceanalysis with subject-specific vol and grid structures, > where I did the pre vs post contrast as follows: > > > > sourceAll = ft_sourceanalysis(cfg, freqAll(condi)); > > cfg.grid.filter = sourceAll.avg.filter; > sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) ); > sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi)); > > > > sourceDiff(condi) = sourcePost_con; > sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow - > sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; > > > 2) ft_sourceinterpolate with the subject-specific mri > 3) ft_volumenormalize to MNI with coordsys 'neuromag'. > 4) The output is stored in a subject-by-condition cell array, which I > put into ft_sourcestatistics with the following cfg: > > > > cfg = []; > cfg.parameter = 'avg.pow'; > cfg.method = 'analytic'; > cfg.statistic = 'depsamplesT'; > cfg.correctm = 'no'; > cfg.alpha = 0.05; > > > Nsub = 10; > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; > cfg.tail = 0; % number, -1, 1 or 0 (default = 0) > cfg.ivar = 1; % number or list with indices, independent variable(s) > cfg.uvar = 2; % number or list with indices, unit variable(s) > > > stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, > sourceDiffNorm{:,2}); > > > > > This results in the error that it cannot find the field 'pos'; however > this field is only present in the result from ft_sourceanalysis (and > differs for each subject), but disappears as soon as > ft_sourceinterpolate is applied. I tried to put the result from > ft_sourceanalysis straight into ft_sourcestatistics (which according > to the help should be possible), but this doesn't recognize the input > as volume data (and apart from that, the subjects aren't spatially > aligned this way). > > > I hope someone can help me with this; any help is much appreciated! > > > Thanks, > Joram > > > -- > > Joram van Driel, MSc. > PhD student @ University of Amsterdam > Brain & Cognition @ Department of Psychology > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Nietzsche H.L. Lam, MSc PhD Candidate Max Planck Institute for Psycholinguistics Wundtlaan 1, 6525 XD Nijmegen, The Netherlands Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Kapittelweg 29, 6525EN Nijmegen, The Netherlands n.lam at fcdonders.ru.nl +31-24-3668219 neurobiologyoflanguage.com From hweeling.lee at gmail.com Fri Jan 24 10:14:11 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Fri, 24 Jan 2014 10:14:11 +0100 Subject: [FieldTrip] Fieldtrip on Mac Message-ID: Dear all, I downloaded the latest version of fieldtrip, and tried to use fieldtrip toolbox on Matlab R2012b, but I keep experiencing problems with reading the files. Here's the command I use: cfg.trialfun = 'trial_def_AV'; % self-made function located in D:\New_Scripts_2013\my_trialfun_name.m cfg.trialdef.eventtype = 'Stimulus'; cfg.trialdef.eventvalue = 3; % 1 for AV; 2 for AN; 3 for both AV and AN cfg.trialdef.pre = 0.5; cfg.trialdef.post = 4.0; cfg = ft_definetrial(cfg); [data] = ft_preprocessing(cfg); % loading eeg data into memory evaluating trialfunction 'trial_def_AV' Error using ft_read_event (line 383) cannot open BrainVision marker file Error in trial_def_AV (line 4) event = ft_read_event(cfg.event); Error in ft_definetrial (line 169) [trl, event] = feval(cfg.trialfun, cfg); I'm lost, and do not know what to do. Could someone please help? Thanks. Cheers, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Fri Jan 24 10:56:50 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Fri, 24 Jan 2014 10:56:50 +0100 (CET) Subject: [FieldTrip] ft_combineplanar on Neuromagdata Message-ID: <935899657.429750.1390557410212.JavaMail.root@bcbl.eu> Dear fieldtrip users, sorry to bother you with this really trivial question. I am running into an issue using ft_combineplanar on Neuromag data. The code I am using is as follows: cfg = []; cfg.channel = {'MEGGRAD'}; grad_data = ft_selectdata(meg_data); %after this step there are only planar-gradients left cfg = []; cfg.method = 'mtmfft'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.foi = 0:100; cfg.keeptrials = 'no'; spectrum1 = ft_freqanalysis(cfg,grad_data); % returns the FFT power spectrum cfg = []; spectrum2 = ft_combineplanar(cfg,spectrum); % this step should combine horizontal and vertical gradients into % one single gradient aka reduce the number of channels However, spectrum does not change. This can be seen by isequal(spectrum1.powspctrm,spectrum2.powspctrm) == 1 Also the number of channels (n = 204) is not reduced after ft_combineplanar when in fact there should only be n = 102 channels left. Is this related to the fact that ft_combineplanar is designed to take only time-frequency maps as input or am I doing something wrong here? Any advice would be highly appreciated. Fred From alik.widge at gmail.com Fri Jan 24 11:57:42 2014 From: alik.widge at gmail.com (Alik Widge) Date: Fri, 24 Jan 2014 05:57:42 -0500 Subject: [FieldTrip] Choice of repairchannel algorithm Message-ID: Hello all, I notice that I have a choice of calculation options for ft_repairchannel, including simple interpolation and what appear to be CSD-like calculations. However, I've been unable to find any advice on which method to use. Is anyone aware of a discussion or head-to-head evaluation of the various available methods? I could not find one in the literature or past archives of this list, and right now am working on the assumption that it's basically whatever smoothness/computation tradeoff I care to choose. Thanks, Alik Widge, MD, PhD Massachusetts General Hospital alik.widge at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Fri Jan 24 12:09:25 2014 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 24 Jan 2014 15:09:25 +0400 Subject: [FieldTrip] Fieldtrip on Mac Message-ID: Hello Hwee Ling, Without knowing the code that's in your trial function, it's hard to tell what the problem might be. Based on the error message, it looks like it's not finding the .vmrk file where it's supposed to be. Do you need to specify your own trial function? In my experience, Brain Vision data can be imported into Fieldtrip very easily just using the general trial function; specify cfg.filename to be the .vhdr file, then run ft_definetrial and ft_preprocessing. Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ > Message: 2 > Date: Fri, 24 Jan 2014 10:14:11 +0100 > From: Hwee Ling Lee > To: FieldTrip discussion list > Subject: [FieldTrip] Fieldtrip on Mac > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Dear all, > > I downloaded the latest version of fieldtrip, and tried to use fieldtrip > toolbox on Matlab R2012b, but I keep experiencing problems with reading the > files. > > Here's the command I use: > > cfg.trialfun = 'trial_def_AV'; % self-made function located in > D:\New_Scripts_2013\my_trialfun_name.m > cfg.trialdef.eventtype = 'Stimulus'; > cfg.trialdef.eventvalue = 3; % 1 for AV; 2 for AN; 3 for both AV and AN > cfg.trialdef.pre = 0.5; > cfg.trialdef.post = 4.0; > cfg = ft_definetrial(cfg); > > [data] = ft_preprocessing(cfg); % loading eeg data into memory > > evaluating trialfunction 'trial_def_AV' > Error using ft_read_event (line 383) > cannot open BrainVision marker file > > Error in trial_def_AV (line 4) > event = ft_read_event(cfg.event); > > Error in ft_definetrial (line 169) > [trl, event] = feval(cfg.trialfun, cfg); > > I'm lost, and do not know what to do. Could someone please help? > Thanks. > > Cheers, > Hweeling From joramvandriel at gmail.com Fri Jan 24 12:16:26 2014 From: joramvandriel at gmail.com (Joram van Driel) Date: Fri, 24 Jan 2014 12:16:26 +0100 Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' In-Reply-To: <711157447.420800.1390553739013.JavaMail.root@indus.zimbra.ru.nl> References: <711157447.420800.1390553739013.JavaMail.root@indus.zimbra.ru.nl> Message-ID: Hi Nietzsche, Thanks for the suggestion, but unfortunately that's not what's going wrong. My input data is a subject-by-condition array, so if I fill in sourcedat{:,1} and sourcedat{:,2}, that would be equivalent to having two separate variables and do source_condition1{:},source_condition2{:}. I tried that but I get the same error "??? Reference to non-existent field 'pos'." In fact, the error is I think a bug of the newest fieldtrip version, because when I tried an older version (fieldtrip-20131031), it works (although it later crashes on a design array issue, but that's something I have to figure out myself ;)). The 'pos' field is a field that is present in the output of ft_sourceanalysis; according to the help it's a N-by-3 matrix of the x-y-z position of all the sources, where N is the sum of the length of the 'inside' and 'outside' fields. This 'pos' field is removed in further steps (ft_sourceinterpolate). When calling ft_sourceanalysis in version fieldtrip-20140109, the function statistics_wrapper searches for this field (line 228) and can't find it. Chrs, - Joram On Fri, Jan 24, 2014 at 9:55 AM, Lam, Nietzsche wrote: > Hi Joram, > > I'm not entirely sure if this is the solution, but when you call > ft_sourcestatistics, you can try this: > > > > FieldTrip statistics functions understands that you want to use the data > from all subjects when you use {:}, so there's no need to call individual > columns with {:,X}. > > Best, > Nietzsche > > > > ----- Original Message ----- > > From: "Joram van Driel" > > To: "FieldTrip discussion list" > > Sent: Friday, 24 January, 2014 8:54:24 AM > > Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' > > Hi all, > > > > > > I'm getting stuck with ft_sourcestatistics. > > I want to do a simple two-condition contrast on neuromag MEG data, > > where I did frequency beamforming on a pre vs. post tf-window. > > > > > > I followed the instructions of the tutorial, so for each subject and > > condition: > > > > > > 1) ft_sourceanalysis with subject-specific vol and grid structures, > > where I did the pre vs post contrast as follows: > > > > > > > > sourceAll = ft_sourceanalysis(cfg, freqAll(condi)); > > > > cfg.grid.filter = sourceAll.avg.filter; > > sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) ); > > sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi)); > > > > > > > > sourceDiff(condi) = sourcePost_con; > > sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow - > > sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; > > > > > > 2) ft_sourceinterpolate with the subject-specific mri > > 3) ft_volumenormalize to MNI with coordsys 'neuromag'. > > 4) The output is stored in a subject-by-condition cell array, which I > > put into ft_sourcestatistics with the following cfg: > > > > > > > > cfg = []; > > cfg.parameter = 'avg.pow'; > > cfg.method = 'analytic'; > > cfg.statistic = 'depsamplesT'; > > cfg.correctm = 'no'; > > cfg.alpha = 0.05; > > > > > > Nsub = 10; > > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; > > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; > > cfg.tail = 0; % number, -1, 1 or 0 (default = 0) > > cfg.ivar = 1; % number or list with indices, independent variable(s) > > cfg.uvar = 2; % number or list with indices, unit variable(s) > > > > > > stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, > > sourceDiffNorm{:,2}); > > > > > > > > > > This results in the error that it cannot find the field 'pos'; however > > this field is only present in the result from ft_sourceanalysis (and > > differs for each subject), but disappears as soon as > > ft_sourceinterpolate is applied. I tried to put the result from > > ft_sourceanalysis straight into ft_sourcestatistics (which according > > to the help should be possible), but this doesn't recognize the input > > as volume data (and apart from that, the subjects aren't spatially > > aligned this way). > > > > > > I hope someone can help me with this; any help is much appreciated! > > > > > > Thanks, > > Joram > > > > > > -- > > > > Joram van Driel, MSc. > > PhD student @ University of Amsterdam > > Brain & Cognition @ Department of Psychology > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Nietzsche H.L. Lam, MSc > PhD Candidate > > Max Planck Institute for Psycholinguistics > Wundtlaan 1, 6525 XD Nijmegen, The Netherlands > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Kapittelweg 29, 6525EN Nijmegen, The Netherlands > > n.lam at fcdonders.ru.nl > +31-24-3668219 > > > neurobiologyoflanguage.com > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Joram van Driel, MSc. PhD student @ University of Amsterdam Brain & Cognition @ Department of Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Fri Jan 24 12:21:52 2014 From: joramvandriel at gmail.com (Joram van Driel) Date: Fri, 24 Jan 2014 12:21:52 +0100 Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' In-Reply-To: References: <711157447.420800.1390553739013.JavaMail.root@indus.zimbra.ru.nl> Message-ID: Sorry, this should have been: This 'pos' field is removed in further steps (ft_sourceinterpolate). When calling *ft_sourcestatistics* in version fieldtrip-20140109, the function statistics_wrapper searches for this field (line 228) and can't find it. On Fri, Jan 24, 2014 at 12:16 PM, Joram van Driel wrote: > Hi Nietzsche, > > Thanks for the suggestion, but unfortunately that's not what's going > wrong. My input data is a subject-by-condition array, so if I fill in > sourcedat{:,1} and sourcedat{:,2}, that would be equivalent to having two > separate variables and do source_condition1{:},source_condition2{:}. I > tried that but I get the same error "??? Reference to non-existent field > 'pos'." > > In fact, the error is I think a bug of the newest fieldtrip version, > because when I tried an older version (fieldtrip-20131031), it works > (although it later crashes on a design array issue, but that's something I > have to figure out myself ;)). > > The 'pos' field is a field that is present in the output of > ft_sourceanalysis; according to the help it's a N-by-3 matrix of the x-y-z > position of all the sources, where N is the sum of the length of the > 'inside' and 'outside' fields. > This 'pos' field is removed in further steps (ft_sourceinterpolate). When > calling ft_sourceanalysis in version fieldtrip-20140109, the function > statistics_wrapper searches for this field (line 228) and can't find it. > > Chrs, > > - Joram > > > > On Fri, Jan 24, 2014 at 9:55 AM, Lam, Nietzsche wrote: > >> Hi Joram, >> >> I'm not entirely sure if this is the solution, but when you call >> ft_sourcestatistics, you can try this: >> >> >> >> FieldTrip statistics functions understands that you want to use the data >> from all subjects when you use {:}, so there's no need to call individual >> columns with {:,X}. >> >> Best, >> Nietzsche >> >> >> >> ----- Original Message ----- >> > From: "Joram van Driel" >> > To: "FieldTrip discussion list" >> > Sent: Friday, 24 January, 2014 8:54:24 AM >> > Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' >> > Hi all, >> > >> > >> > I'm getting stuck with ft_sourcestatistics. >> > I want to do a simple two-condition contrast on neuromag MEG data, >> > where I did frequency beamforming on a pre vs. post tf-window. >> > >> > >> > I followed the instructions of the tutorial, so for each subject and >> > condition: >> > >> > >> > 1) ft_sourceanalysis with subject-specific vol and grid structures, >> > where I did the pre vs post contrast as follows: >> > >> > >> > >> > sourceAll = ft_sourceanalysis(cfg, freqAll(condi)); >> > >> > cfg.grid.filter = sourceAll.avg.filter; >> > sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) ); >> > sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi)); >> > >> > >> > >> > sourceDiff(condi) = sourcePost_con; >> > sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow - >> > sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; >> > >> > >> > 2) ft_sourceinterpolate with the subject-specific mri >> > 3) ft_volumenormalize to MNI with coordsys 'neuromag'. >> > 4) The output is stored in a subject-by-condition cell array, which I >> > put into ft_sourcestatistics with the following cfg: >> > >> > >> > >> > cfg = []; >> > cfg.parameter = 'avg.pow'; >> > cfg.method = 'analytic'; >> > cfg.statistic = 'depsamplesT'; >> > cfg.correctm = 'no'; >> > cfg.alpha = 0.05; >> > >> > >> > Nsub = 10; >> > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; >> > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; >> > cfg.tail = 0; % number, -1, 1 or 0 (default = 0) >> > cfg.ivar = 1; % number or list with indices, independent variable(s) >> > cfg.uvar = 2; % number or list with indices, unit variable(s) >> > >> > >> > stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, >> > sourceDiffNorm{:,2}); >> > >> > >> > >> > >> > This results in the error that it cannot find the field 'pos'; however >> > this field is only present in the result from ft_sourceanalysis (and >> > differs for each subject), but disappears as soon as >> > ft_sourceinterpolate is applied. I tried to put the result from >> > ft_sourceanalysis straight into ft_sourcestatistics (which according >> > to the help should be possible), but this doesn't recognize the input >> > as volume data (and apart from that, the subjects aren't spatially >> > aligned this way). >> > >> > >> > I hope someone can help me with this; any help is much appreciated! >> > >> > >> > Thanks, >> > Joram >> > >> > >> > -- >> > >> > Joram van Driel, MSc. >> > PhD student @ University of Amsterdam >> > Brain & Cognition @ Department of Psychology >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -- >> Nietzsche H.L. Lam, MSc >> PhD Candidate >> >> Max Planck Institute for Psycholinguistics >> Wundtlaan 1, 6525 XD Nijmegen, The Netherlands >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Kapittelweg 29, 6525EN Nijmegen, The Netherlands >> >> n.lam at fcdonders.ru.nl >> +31-24-3668219 >> >> >> neurobiologyoflanguage.com >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Joram van Driel, MSc. > PhD student @ University of Amsterdam > Brain & Cognition @ Department of Psychology > -- Joram van Driel, MSc. PhD student @ University of Amsterdam Brain & Cognition @ Department of Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jan 24 12:40:21 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 24 Jan 2014 12:40:21 +0100 Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' In-Reply-To: References: <711157447.420800.1390553739013.JavaMail.root@indus.zimbra.ru.nl> Message-ID: Hi Joram, Probably this is my bad. ft_sourceinterpolate intentionally removes the pos field, which has to do with the representation of the data. FieldTrip either represents source reconstructed data that can be defined on a regular 3D grid as a so-called 'source-structure' (with a pos field), or as a so-called volume-structure (without a pos field). After the sourceinterpolate step your data is represented as the latter, lacking a pos field (intentionally), but unintentionally causing a crash in ft_sourcestatistics. A workaround for now would be for you to change line 228 in statistics_wrapper into if isfield(varargin{1}, 'transform') || (isfield(varargin{1}, 'dim') && prod(varargin{1}.dim)==size(varargin{1}.pos,1)). Could you try this out and let me know if that works? Then I can incorporate it in FT. Best and sorry for the inconvenience, JM On Jan 24, 2014, at 12:21 PM, Joram van Driel wrote: > Sorry, this should have been: > This 'pos' field is removed in further steps (ft_sourceinterpolate). When calling ft_sourcestatistics in version fieldtrip-20140109, the function statistics_wrapper searches for this field (line 228) and can't find it. > > > On Fri, Jan 24, 2014 at 12:16 PM, Joram van Driel wrote: > Hi Nietzsche, > > Thanks for the suggestion, but unfortunately that's not what's going wrong. My input data is a subject-by-condition array, so if I fill in sourcedat{:,1} and sourcedat{:,2}, that would be equivalent to having two separate variables and do source_condition1{:},source_condition2{:}. I tried that but I get the same error "??? Reference to non-existent field 'pos'." > > In fact, the error is I think a bug of the newest fieldtrip version, because when I tried an older version (fieldtrip-20131031), it works (although it later crashes on a design array issue, but that's something I have to figure out myself ;)). > > The 'pos' field is a field that is present in the output of ft_sourceanalysis; according to the help it's a N-by-3 matrix of the x-y-z position of all the sources, where N is the sum of the length of the 'inside' and 'outside' fields. > This 'pos' field is removed in further steps (ft_sourceinterpolate). When calling ft_sourceanalysis in version fieldtrip-20140109, the function statistics_wrapper searches for this field (line 228) and can't find it. > > Chrs, > > - Joram > > > > On Fri, Jan 24, 2014 at 9:55 AM, Lam, Nietzsche wrote: > Hi Joram, > > I'm not entirely sure if this is the solution, but when you call ft_sourcestatistics, you can try this: > > > > FieldTrip statistics functions understands that you want to use the data from all subjects when you use {:}, so there's no need to call individual columns with {:,X}. > > Best, > Nietzsche > > > > ----- Original Message ----- > > From: "Joram van Driel" > > To: "FieldTrip discussion list" > > Sent: Friday, 24 January, 2014 8:54:24 AM > > Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' > > Hi all, > > > > > > I'm getting stuck with ft_sourcestatistics. > > I want to do a simple two-condition contrast on neuromag MEG data, > > where I did frequency beamforming on a pre vs. post tf-window. > > > > > > I followed the instructions of the tutorial, so for each subject and > > condition: > > > > > > 1) ft_sourceanalysis with subject-specific vol and grid structures, > > where I did the pre vs post contrast as follows: > > > > > > > > sourceAll = ft_sourceanalysis(cfg, freqAll(condi)); > > > > cfg.grid.filter = sourceAll.avg.filter; > > sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) ); > > sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi)); > > > > > > > > sourceDiff(condi) = sourcePost_con; > > sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow - > > sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; > > > > > > 2) ft_sourceinterpolate with the subject-specific mri > > 3) ft_volumenormalize to MNI with coordsys 'neuromag'. > > 4) The output is stored in a subject-by-condition cell array, which I > > put into ft_sourcestatistics with the following cfg: > > > > > > > > cfg = []; > > cfg.parameter = 'avg.pow'; > > cfg.method = 'analytic'; > > cfg.statistic = 'depsamplesT'; > > cfg.correctm = 'no'; > > cfg.alpha = 0.05; > > > > > > Nsub = 10; > > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; > > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; > > cfg.tail = 0; % number, -1, 1 or 0 (default = 0) > > cfg.ivar = 1; % number or list with indices, independent variable(s) > > cfg.uvar = 2; % number or list with indices, unit variable(s) > > > > > > stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, > > sourceDiffNorm{:,2}); > > > > > > > > > > This results in the error that it cannot find the field 'pos'; however > > this field is only present in the result from ft_sourceanalysis (and > > differs for each subject), but disappears as soon as > > ft_sourceinterpolate is applied. I tried to put the result from > > ft_sourceanalysis straight into ft_sourcestatistics (which according > > to the help should be possible), but this doesn't recognize the input > > as volume data (and apart from that, the subjects aren't spatially > > aligned this way). > > > > > > I hope someone can help me with this; any help is much appreciated! > > > > > > Thanks, > > Joram > > > > > > -- > > > > Joram van Driel, MSc. > > PhD student @ University of Amsterdam > > Brain & Cognition @ Department of Psychology > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Nietzsche H.L. Lam, MSc > PhD Candidate > > Max Planck Institute for Psycholinguistics > Wundtlaan 1, 6525 XD Nijmegen, The Netherlands > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Kapittelweg 29, 6525EN Nijmegen, The Netherlands > > n.lam at fcdonders.ru.nl > +31-24-3668219 > > > neurobiologyoflanguage.com > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Joram van Driel, MSc. > PhD student @ University of Amsterdam > Brain & Cognition @ Department of Psychology > > > > -- > Joram van Driel, MSc. > PhD student @ University of Amsterdam > Brain & Cognition @ Department of Psychology > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Fri Jan 24 13:11:05 2014 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke.vanDijk at med.uni-duesseldorf.de) Date: Fri, 24 Jan 2014 12:11:05 +0000 Subject: [FieldTrip] ft_combineplanar on Neuromagdata In-Reply-To: <935899657.429750.1390557410212.JavaMail.root@bcbl.eu> References: <935899657.429750.1390557410212.JavaMail.root@bcbl.eu> Message-ID: <495873C58A622E45A3ABF4813B9451EC6E41986C@MAIL1-UKD.VMED.UKD> Dear Fred, First of all I think there is a typo, you refer to spectrum1 (in the isequal line), and but you use 'spectrum' as input in ft_combineplanar. My workflow is slightly different, but maybe that makes the difference...., in preprocessing I use (but I suppose you could also try that in freqanalysis) > cfg.channel = {'all', '-MEG***1'}; %with the goal to also only use the planar gradiometer data for further analysis (magnetometers end with a 1). p = label: {204x1 cell} Then after freqanalysis (which I also first do with the 204 channels), I use ft_combineplanar and I get the right result. I hope this somehow helps.. Best, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -----Ursprüngliche Nachricht----- Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Frédéric Roux Gesendet: Freitag, 24. Januar 2014 10:57 An: FieldTrip discussion list Betreff: [FieldTrip] ft_combineplanar on Neuromagdata Dear fieldtrip users, sorry to bother you with this really trivial question. I am running into an issue using ft_combineplanar on Neuromag data. The code I am using is as follows: cfg = []; cfg.channel = {'MEGGRAD'}; grad_data = ft_selectdata(meg_data); %after this step there are only planar-gradients left cfg = []; cfg.method = 'mtmfft'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.foi = 0:100; cfg.keeptrials = 'no'; spectrum1 = ft_freqanalysis(cfg,grad_data); % returns the FFT power spectrum cfg = []; spectrum2 = ft_combineplanar(cfg,spectrum); % this step should combine horizontal and vertical gradients into % one single gradient aka reduce the number of channels However, spectrum does not change. This can be seen by isequal(spectrum1.powspctrm,spectrum2.powspctrm) == 1 Also the number of channels (n = 204) is not reduced after ft_combineplanar when in fact there should only be n = 102 channels left. Is this related to the fact that ft_combineplanar is designed to take only time-frequency maps as input or am I doing something wrong here? Any advice would be highly appreciated. Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.cox at uva.nl Fri Jan 24 13:53:45 2014 From: r.cox at uva.nl (Roy Cox) Date: Fri, 24 Jan 2014 13:53:45 +0100 Subject: [FieldTrip] degrees of freedom In-Reply-To: <52e2233b.c5cc0e0a.2f09.665cSMTPIN_ADDED_BROKEN@mx.google.com> References: <52e2233b.c5cc0e0a.2f09.665cSMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: thanks Jim, looks like that should do the trick. Roy On Fri, Jan 24, 2014 at 9:14 AM, Herring, J.D. (Jim) < j.herring at fcdonders.ru.nl> wrote: > Hi Roy, > > > > Fieldtrip allows you to create and use your own functions to calculate > statistics. What you could also do is adjust the indepsamplesT statistic > function (fieldtrip/statfun/ft_statfun_indepsamplesT.m) to suite your needs > (E.g. change the Df in line 89). > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Roy Cox > *Sent:* donderdag 23 januari 2014 16:20 > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] degrees of freedom > > > > Hi all, > > I'm using ft_timelockstatistics with indepsamplesT to compare spatial > topographies between two groups (n=15 and n=13). The measure I'm interested > in has no time dimension, so I basically have one sample per electrode for > each subject. > > > > This works fine (I get the effects I hoped for). In order to make the > statistics 'slightly more valid', however, I need to adjust the degrees of > freedom. That is, the data I'm comparing between groups has already had a > covariate taken out. So df has to be df-1. > > Doesn't look like Fieldtrip allows you to set this in the cfg struct > somewhere, so any suggestions where I need to hack? > > Thanks, > > Roy > > > -- > > Roy Cox, M.Sc. | Brain & Cognition Group | Department of Psychology | > University of Amsterdam | Weesperplein 4 | 1018 XA Amsterdam | the > Netherlands | room 3.21 | phone: +31 20 525 6847 | email: r.cox at uva.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Roy Cox, M.Sc. | Brain & Cognition Group | Department of Psychology | University of Amsterdam | Weesperplein 4 | 1018 XA Amsterdam | the Netherlands | room 3.21 | phone: +31 20 525 6847 | email: r.cox at uva.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Fri Jan 24 14:09:35 2014 From: joramvandriel at gmail.com (Joram van Driel) Date: Fri, 24 Jan 2014 14:09:35 +0100 Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' In-Reply-To: References: <711157447.420800.1390553739013.JavaMail.root@indus.zimbra.ru.nl> Message-ID: Hi Jan-Mathijs, Thanks, that works. I also had to change line 643 into (copied from statistics_wrapper in FT version 20131031): fprintf('only selecting voxels inside the brain for statistics (%.1f%%)\n', 100*length(varargin{1}.inside)/prod(varargin{1}.dim)); This line also used the non-existing .pos field. Thanks again, Joram On Fri, Jan 24, 2014 at 12:40 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Joram, > > Probably this is my bad. > ft_sourceinterpolate intentionally removes the pos field, which has to do > with the representation of the data. FieldTrip either represents source > reconstructed data that can be defined on a regular 3D grid as a so-called > 'source-structure' (with a pos field), or as a so-called volume-structure > (without a pos field). After the sourceinterpolate step your data is > represented as the latter, lacking a pos field (intentionally), but > unintentionally causing a crash in ft_sourcestatistics. > A workaround for now would be for you to change line 228 in > statistics_wrapper into if isfield(varargin{1}, 'transform') || > (isfield(varargin{1}, 'dim') && > prod(varargin{1}.dim)==size(varargin{1}.pos,1)). > Could you try this out and let me know if that works? Then I can > incorporate it in FT. > > Best and sorry for the inconvenience, > JM > > > > On Jan 24, 2014, at 12:21 PM, Joram van Driel wrote: > > Sorry, this should have been: > This 'pos' field is removed in further steps (ft_sourceinterpolate). When > calling *ft_sourcestatistics* in version fieldtrip-20140109, the function > statistics_wrapper searches for this field (line 228) and can't find it. > > > On Fri, Jan 24, 2014 at 12:16 PM, Joram van Driel > wrote: > >> Hi Nietzsche, >> >> Thanks for the suggestion, but unfortunately that's not what's going >> wrong. My input data is a subject-by-condition array, so if I fill in >> sourcedat{:,1} and sourcedat{:,2}, that would be equivalent to having two >> separate variables and do source_condition1{:},source_condition2{:}. I >> tried that but I get the same error "??? Reference to non-existent field >> 'pos'." >> >> In fact, the error is I think a bug of the newest fieldtrip version, >> because when I tried an older version (fieldtrip-20131031), it works >> (although it later crashes on a design array issue, but that's something I >> have to figure out myself ;)). >> >> The 'pos' field is a field that is present in the output of >> ft_sourceanalysis; according to the help it's a N-by-3 matrix of the x-y-z >> position of all the sources, where N is the sum of the length of the >> 'inside' and 'outside' fields. >> This 'pos' field is removed in further steps (ft_sourceinterpolate). When >> calling ft_sourceanalysis in version fieldtrip-20140109, the function >> statistics_wrapper searches for this field (line 228) and can't find it. >> >> Chrs, >> >> - Joram >> >> >> >> On Fri, Jan 24, 2014 at 9:55 AM, Lam, Nietzsche wrote: >> >>> Hi Joram, >>> >>> I'm not entirely sure if this is the solution, but when you call >>> ft_sourcestatistics, you can try this: >>> >>> >>> >>> FieldTrip statistics functions understands that you want to use the data >>> from all subjects when you use {:}, so there's no need to call individual >>> columns with {:,X}. >>> >>> Best, >>> Nietzsche >>> >>> >>> >>> ----- Original Message ----- >>> > From: "Joram van Driel" >>> > To: "FieldTrip discussion list" >>> > Sent: Friday, 24 January, 2014 8:54:24 AM >>> > Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' >>> > Hi all, >>> > >>> > >>> > I'm getting stuck with ft_sourcestatistics. >>> > I want to do a simple two-condition contrast on neuromag MEG data, >>> > where I did frequency beamforming on a pre vs. post tf-window. >>> > >>> > >>> > I followed the instructions of the tutorial, so for each subject and >>> > condition: >>> > >>> > >>> > 1) ft_sourceanalysis with subject-specific vol and grid structures, >>> > where I did the pre vs post contrast as follows: >>> > >>> > >>> > >>> > sourceAll = ft_sourceanalysis(cfg, freqAll(condi)); >>> > >>> > cfg.grid.filter = sourceAll.avg.filter; >>> > sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) ); >>> > sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi)); >>> > >>> > >>> > >>> > sourceDiff(condi) = sourcePost_con; >>> > sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow - >>> > sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; >>> > >>> > >>> > 2) ft_sourceinterpolate with the subject-specific mri >>> > 3) ft_volumenormalize to MNI with coordsys 'neuromag'. >>> > 4) The output is stored in a subject-by-condition cell array, which I >>> > put into ft_sourcestatistics with the following cfg: >>> > >>> > >>> > >>> > cfg = []; >>> > cfg.parameter = 'avg.pow'; >>> > cfg.method = 'analytic'; >>> > cfg.statistic = 'depsamplesT'; >>> > cfg.correctm = 'no'; >>> > cfg.alpha = 0.05; >>> > >>> > >>> > Nsub = 10; >>> > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; >>> > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; >>> > cfg.tail = 0; % number, -1, 1 or 0 (default = 0) >>> > cfg.ivar = 1; % number or list with indices, independent variable(s) >>> > cfg.uvar = 2; % number or list with indices, unit variable(s) >>> > >>> > >>> > stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, >>> > sourceDiffNorm{:,2}); >>> > >>> > >>> > >>> > >>> > This results in the error that it cannot find the field 'pos'; however >>> > this field is only present in the result from ft_sourceanalysis (and >>> > differs for each subject), but disappears as soon as >>> > ft_sourceinterpolate is applied. I tried to put the result from >>> > ft_sourceanalysis straight into ft_sourcestatistics (which according >>> > to the help should be possible), but this doesn't recognize the input >>> > as volume data (and apart from that, the subjects aren't spatially >>> > aligned this way). >>> > >>> > >>> > I hope someone can help me with this; any help is much appreciated! >>> > >>> > >>> > Thanks, >>> > Joram >>> > >>> > >>> > -- >>> > >>> > Joram van Driel, MSc. >>> > PhD student @ University of Amsterdam >>> > Brain & Cognition @ Department of Psychology >>> > _______________________________________________ >>> > fieldtrip mailing list >>> > fieldtrip at donders.ru.nl >>> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> -- >>> Nietzsche H.L. Lam, MSc >>> PhD Candidate >>> >>> Max Planck Institute for Psycholinguistics >>> Wundtlaan 1, 6525 XD Nijmegen, The Netherlands >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Kapittelweg 29, 6525EN Nijmegen, The Netherlands >>> >>> n.lam at fcdonders.ru.nl >>> +31-24-3668219 >>> >>> >>> neurobiologyoflanguage.com >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Joram van Driel, MSc. >> PhD student @ University of Amsterdam >> Brain & Cognition @ Department of Psychology >> > > > > -- > Joram van Driel, MSc. > PhD student @ University of Amsterdam > Brain & Cognition @ Department of Psychology > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Joram van Driel, MSc. PhD student @ University of Amsterdam Brain & Cognition @ Department of Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.rombetto at cib.na.cnr.it Fri Jan 24 16:05:52 2014 From: s.rombetto at cib.na.cnr.it (s.rombetto at cib.na.cnr.it) Date: Fri, 24 Jan 2014 16:05:52 +0100 Subject: [FieldTrip] problem with ft_volumerealign and ft_convert_coordsys Message-ID: <20140124160552.wy6hoz6lcg888oo4@arco.cib.na.cnr.it> Dear Jan-Mathijs > I don't understand what you mean by 'no results appear on my > screen'. Does this mean that mri_realigned is not created? yes, I mean that I have no output at all. > You have to have spm on your path in order to get this. try > ft_hastoolbox('spm',1) and try again. you were right, this was a stupid mistake. I didn't install the spm toolbox. Now I have installed it and tried again. So I get a different erro message: ??? Error using ==> spm_platform>init_platform at 173 PCWIN64 not supported architecture for SPM Error in ==> spm_platform at 65 if isempty(PLATFORM), PLATFORM = init_platform; end Error in ==> spm_vol_minc at 80 if ~spm_platform('bigend') & datatype~=2 & datatype~=2+128, datatype = datatype*256; end; Error in ==> ft_read_mri at 132 hdr = spm_vol_minc(filename); Error in ==> align_ctf2spm at 137 mri2 = ft_read_mri(template); Error in ==> ft_convert_coordsys at 90 obj = align_ctf2spm(obj, opt); Do you know any solution for this problem? Moreover why the conversion from ctf to itab is not yet supported? May I perform this conversion by using 2 different conversion (like ctf to spm and from spm to itab?) Best regards Sara >> >> Error in ==> align_ctf2spm at 121 >> switch spm('ver') >> >> Error in ==> ft_convert_coordsys at 90 >> obj = align_ctf2spm(obj, opt); >> >> Finally I tried to use the function align_itab2spm in the following way >> mri = align_itab2spm(mri, 2) >> but I get the error message >> >> ??? Undefined function or method 'spm' for input arguments of type 'char'. >> >> Error in ==> align_itab2spm at 108 >> switch spm('ver') >> > > > See above. > > Best, > Jan-Mathijs > > >> Do you have any idea or suggestion to solve this problem? >> >> Thanks in advance for any advice, >> Sara >> >> ------------------------- >> Dott.ssa Sara Rombetto >> Istituto di Cibernetica >> "E. Caianiello" >> Via Campi Flegrei, 34 >> 80078 Pozzuoli (NA) >> Italy >> mob +39 3401689815 >> tel +39 0818675361 >> fax +39 0818675128 >> -------------------------- >> "I disapprove of what you say, but I will defend to the death your >> right to say >> it." [Evelyn Beatrice Hall, The Friends Of Voltaire] >> >> ---------------------------------------------------------------- >> This message was sent using IMP, the Internet Messaging Program. >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > ------------------------- Dott.ssa Sara Rombetto Istituto di Cibernetica "E. Caianiello" Via Campi Flegrei, 34 80078 Pozzuoli (NA) Italy mob +39 3401689815 tel +39 0818675361 fax +39 0818675128 -------------------------- "I disapprove of what you say, but I will defend to the death your right to say it." [Evelyn Beatrice Hall, The Friends Of Voltaire] ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From jkhartshorne at gmail.com Fri Jan 24 16:54:10 2014 From: jkhartshorne at gmail.com (Joshua Hartshorne) Date: Fri, 24 Jan 2014 10:54:10 -0500 Subject: [FieldTrip] interactions Message-ID: Hi List! I have seen around a dozen comments in the archives that interactions can't be tested by permutation for within-subject designs. I haven't been able to find a thread that explains why not. It seems like in a 2x2 design, you could still pick one of the conditions and permute the labels. I'm sure there's a proof somewhere for why this doesn't work, and it would be great to see it. Similarly, for the mixed design, why permute the between-subject labels? Why not permute the within-subject labels instead? Actually, why not do both? I follow the reasoning why permuting both is overkill, but not why it's wrong. If someone could explain, it would be much appreciated. Knowing what to do is good, but it would be even better to understand why. Thanks, Josh -------------- next part -------------- An HTML attachment was scrubbed... URL: From haristz at umn.edu Sat Jan 25 02:08:41 2014 From: haristz at umn.edu (Haris Tzagarakis) Date: Fri, 24 Jan 2014 19:08:41 -0600 Subject: [FieldTrip] 2-dipole beamformer Message-ID: <52E30E99.5070507@umn.edu> Hi There, I have been trying to implement a '2-dipole' DICS beamformer as in for example Schoffelen et al 2008 based on the literature and some postings on this list. This is not to use for coherence work but simply to take into account a strong source. In essence, I have been augmenting every element of my precomputed leadfield grid with the leadfield of a selected reference location that represents the strong source. Then, at the beamformer level I get a 6x6 csd matrix for every location in the grid and from that, I use the 3x3 diagonal martix that corresponds to the 'moving/non-reference' dipole for power estimation. This all seems to work except that the brain power maps I get show a preferential attenuation of the signal in the area of the strong source (now other sources are stronger) - and in fact the location selected for reference seems to be completely silent. I may be misinterpreting the technique here but I wasn't expecting that outcome - I thought that what would happen would be that my output map would be similar to the original although with lower power levels and that the 'extra' contribution of the strong source for every leadfield location would find itself in the second 3x3 diagonal (when I plot the power of that this seems to indeed be the case *but* the area of reference is again attenuated). I think I may have failed to interpret or implement something correctly here (most likely both!). Am I doing something wrong at the leadfield grid level (does the leadfield matrix of the location of reference require special treatment for example?) or should I be using the 6x6 csd matrix differently? - or maybe it could be something else? I would be grateful for comments from anyone who has tried this before. Best, Haris -- Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych Senior Research Associate University of Minnesota Dept of Neuroscience office: Brain Sciences Center Minneapolis VA Medical Center Tel:612-467-1363 From aestnth at hum.au.dk Sat Jan 25 02:14:46 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Sat, 25 Jan 2014 02:14:46 +0100 Subject: [FieldTrip] 2-dipole beamformer Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sun Jan 26 08:24:36 2014 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sun, 26 Jan 2014 11:24:36 +0400 Subject: [FieldTrip] interactions Message-ID: Hi Josh, Have you seen this [admittedly pretty old now] message from the archives: http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html ? My understanding was that it is ok to test interactions in within-subjects designs, and that you could do it by faking a dataset that represents the interaction (step 3 in that message) and then doing a dependent samples t-test. I had never heard before that interactions can't be tested in a within-subjects design, but also it's been a long time since I've looked at this issue--I'd definitely be interested to hear if this is no longer the recommended way to test interactions. I have seen messages saying that it doesn't work for between-subjects designs (e.g. http://mailman.science.ru.nl/pipermail/fieldtrip/2011-September/004244.html), but I'm not sure if that's still current. Hopefully someone on the list can offer more insight about the second question. Best, Steve > > Message: 2 > Date: Fri, 24 Jan 2014 10:54:10 -0500 > From: Joshua Hartshorne > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] interactions > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hi List! > > I have seen around a dozen comments in the archives that interactions can't > be tested by permutation for within-subject designs. I haven't been able to > find a thread that explains why not. It seems like in a 2x2 design, you > could still pick one of the conditions and permute the labels. I'm sure > there's a proof somewhere for why this doesn't work, and it would be great > to see it. > > Similarly, for the mixed design, why permute the between-subject labels? > Why not permute the within-subject labels instead? Actually, why not do > both? I follow the reasoning why permuting both is overkill, but not why > it's wrong. > > If someone could explain, it would be much appreciated. Knowing what to do > is good, but it would be even better to understand why. > > Thanks, > Josh > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > From aestnth at hum.au.dk Sun Jan 26 08:30:51 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Sun, 26 Jan 2014 08:30:51 +0100 Subject: [FieldTrip] interactions Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chaitanya.pro at gmail.com Sun Jan 26 08:46:24 2014 From: chaitanya.pro at gmail.com (Chaitanya Srinivas) Date: Sun, 26 Jan 2014 08:46:24 +0100 Subject: [FieldTrip] Urgent: Error in Source Statistics, Group level Message-ID: Dear fieldtrip users, I would like to do sourcestatistics on a group level with eeg data. I have a pre and post intervention measurement for each of my 10 subjects . After source reconstruction using an DICS beamformer and volume normalization, I calculated the sourcegrandaverage for the pre and post condition and i have avg.pow for each subject. However, when I use the grandaverage results in ft_sourcestatistics in the configuration shown below and plot the result I just get a blank anatomical mri. It only runs with cfg.parameter="pow" .I tried with cfg.parameter = 'avg.pow' it doesnt run. Do I have to set any additional parameters or am I making some mistake? cfg=[]; cfg.dim = grandAVGsourcePre.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; cfg.alpha = 0.05; cfg.tail = 0; nsubj=length(sourcePre.trial); cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg, grandAVGsourcePre, grandAVGsourcePost); *and next interpolation* cfg = []; cfg.voxelcoord = 'no'; cfg.parameter = 'mask'; cfg.interpmethod = 'nearest'; cfg.coordsys = 'mni'; mask = ft_sourceinterpolate(cfg,stat,mri); statplot.mask = mask.mask; *and then for plotting* cfg = []; cfg.method = 'slice'; cfg.funparameter = 'stat'; cfg.maskparameter = 'mask'; cfg.funcolorlim = [-0.1 0.1]; cfg.opacitylim = [-0.1 0.1]; figure ft_sourceplot(cfg, statplot); *===============================================* *[image: Inline image 1]* *Best Regards* *Chaitanya Srinivas Lanka Wiss. Mitarbeiter * *PhD StudentFunctional and Restorative Neurosurgery Neural Information ProcessingNeurosurgical University Hospital* * Graduate Training Center for Neuroscience Eberhard Karls University Eberhard Karls University **Otfried-Mueller-Str.45 Österbergstr. 3* * D-72076 Tuebingen **D-72074 Tuebingen* *Mobile Phone Number : +49-176-79035731* *===============================================* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 23195 bytes Desc: not available URL: From eelke.spaak at donders.ru.nl Sun Jan 26 08:53:50 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Sun, 26 Jan 2014 08:53:50 +0100 Subject: [FieldTrip] Urgent: Error in Source Statistics, Group level In-Reply-To: References: Message-ID: Dear Chaitanya, Perhaps an obvious question: do you find any significant differences in the statistics step (inspect the stat structure)? If not, the mask will consist of all zeroes, hence giving you a 'blank' plot. Best, Eelke On 26 January 2014 08:46, Chaitanya Srinivas wrote: > Dear fieldtrip users, > I would like to do sourcestatistics on a group level with eeg data. I have a > pre and post intervention measurement for each of my 10 subjects > . After source reconstruction using an DICS beamformer > and volume normalization, I calculated the sourcegrandaverage for the pre and > post condition and i have avg.pow for each subject. > > However, when I use the grandaverage results in ft_sourcestatistics in the > configuration shown below and plot the result I just get a blank anatomical > mri. It only runs with cfg.parameter="pow" .I tried with cfg.parameter = 'avg.pow' it doesnt run. > Do I have to set any additional parameters or am I making some mistake? > > > cfg=[]; > cfg.dim = grandAVGsourcePre.dim; > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.parameter = 'pow'; > cfg.correctm = 'cluster'; > cfg.numrandomization = 1000; > cfg.alpha = 0.05; > cfg.tail = 0; > > nsubj=length(sourcePre.trial); > cfg.design(1,:) = [1:nsubj 1:nsubj]; > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > cfg.uvar = 1; > cfg.ivar = 2; > stat = ft_sourcestatistics(cfg, grandAVGsourcePre, grandAVGsourcePost); > > > *and next interpolation* > cfg = []; > > cfg.voxelcoord = 'no'; > cfg.parameter = 'mask'; > cfg.interpmethod = 'nearest'; > cfg.coordsys = 'mni'; > > mask = ft_sourceinterpolate(cfg,stat,mri); > statplot.mask = mask.mask; > > > *and then for plotting* > > cfg = []; > cfg.method = 'slice'; > cfg.funparameter = 'stat'; > cfg.maskparameter = 'mask'; > cfg.funcolorlim = [-0.1 0.1]; > cfg.opacitylim = [-0.1 0.1]; > figure > ft_sourceplot(cfg, statplot); > > > > > > > > > > * ===============================================* > > > *[image: Inline image 1]* > *Best Regards* > > > *Chaitanya Srinivas Lanka Wiss. Mitarbeiter > * > > *PhD Student Functional and Restorative Neurosurgery Neural Information > ProcessingNeurosurgical University Hospital* > > * Graduate Training Center for Neuroscience Eberhard Karls > University Eberhard Karls University **Otfried-Mueller-Str.45 > Österbergstr. 3* > * D-72076 Tuebingen **D-72074 > Tuebingen* > > *Mobile Phone Number : +49-176-79035731* > *===============================================* > > _______________________________________________ > 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: image.png Type: image/png Size: 23195 bytes Desc: not available URL: From chaitanya.pro at gmail.com Sun Jan 26 09:06:28 2014 From: chaitanya.pro at gmail.com (Chaitanya Srinivas) Date: Sun, 26 Jan 2014 09:06:28 +0100 Subject: [FieldTrip] Urgent: Error in Source Statistics, Group level In-Reply-To: References: Message-ID: Hi Eelke, I looked at the stat.stat values if that is what you mean. There are some NaNs , but also some values. Similarly in stat.prob, there are some 1's. The stat.mask is all zeros as you say. Any further suggestions from you? Thank you *===============================================* *[image: Inline image 1]* *Best Regards* *Chaitanya Srinivas Lanka Wiss. Mitarbeiter * *PhD StudentFunctional and Restorative Neurosurgery Neural Information ProcessingNeurosurgical University Hospital* * Graduate Training Center for Neuroscience Eberhard Karls University Eberhard Karls University **Otfried-Mueller-Str.45 Österbergstr. 3* * D-72076 Tuebingen **D-72074 Tuebingen* *Mobile Phone Number : +49-176-79035731* *===============================================* On Sun, Jan 26, 2014 at 8:53 AM, Eelke Spaak wrote: > Dear Chaitanya, > > Perhaps an obvious question: do you find any significant differences in > the statistics step (inspect the stat structure)? If not, the mask will > consist of all zeroes, hence giving you a 'blank' plot. > > Best, > Eelke > > > On 26 January 2014 08:46, Chaitanya Srinivas wrote: > >> Dear fieldtrip users, >> I would like to do sourcestatistics on a group level with eeg data. I have a >> pre and post intervention measurement for each of my 10 subjects >> . After source reconstruction using an DICS beamformer >> and volume normalization, I calculated the sourcegrandaverage for the pre and >> post condition and i have avg.pow for each subject. >> >> However, when I use the grandaverage results in ft_sourcestatistics in the >> configuration shown below and plot the result I just get a blank anatomical >> mri. It only runs with cfg.parameter="pow" .I tried with cfg.parameter = 'avg.pow' it doesnt run. >> Do I have to set any additional parameters or am I making some mistake? >> >> >> cfg=[]; >> cfg.dim = grandAVGsourcePre.dim; >> cfg.method = 'montecarlo'; >> cfg.statistic = 'depsamplesT'; >> cfg.parameter = 'pow'; >> cfg.correctm = 'cluster'; >> cfg.numrandomization = 1000; >> cfg.alpha = 0.05; >> cfg.tail = 0; >> >> nsubj=length(sourcePre.trial); >> cfg.design(1,:) = [1:nsubj 1:nsubj]; >> cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >> cfg.uvar = 1; >> cfg.ivar = 2; >> stat = ft_sourcestatistics(cfg, grandAVGsourcePre, grandAVGsourcePost); >> >> >> *and next interpolation* >> cfg = []; >> >> >> cfg.voxelcoord = 'no'; >> cfg.parameter = 'mask'; >> cfg.interpmethod = 'nearest'; >> cfg.coordsys = 'mni'; >> >> >> mask = ft_sourceinterpolate(cfg,stat,mri); >> statplot.mask = mask.mask; >> >> >> *and then for plotting* >> >> >> cfg = []; >> cfg.method = 'slice'; >> cfg.funparameter = 'stat'; >> cfg.maskparameter = 'mask'; >> cfg.funcolorlim = [-0.1 0.1]; >> cfg.opacitylim = [-0.1 0.1]; >> figure >> ft_sourceplot(cfg, statplot); >> >> >> >> >> >> >> >> >> >> >> * ===============================================* >> >> >> *[image: Inline image 1]* >> *Best Regards* >> >> >> *Chaitanya Srinivas Lanka Wiss. Mitarbeiter >> * >> >> *PhD Student Functional and Restorative Neurosurgery Neural Information >> ProcessingNeurosurgical University Hospital* >> >> * Graduate Training Center for Neuroscience Eberhard Karls >> University Eberhard Karls University **Otfried-Mueller-Str.45 >> Österbergstr. 3* >> * D-72076 Tuebingen **D-72074 >> Tuebingen* >> >> *Mobile Phone Number : +49-176-79035731* >> *===============================================* >> >> _______________________________________________ >> 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: image.png Type: image/png Size: 23195 bytes Desc: not available URL: From eelke.spaak at donders.ru.nl Sun Jan 26 09:40:47 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Sun, 26 Jan 2014 09:40:47 +0100 Subject: [FieldTrip] Urgent: Error in Source Statistics, Group level In-Reply-To: References: Message-ID: Hi Chaitanya, stat.prob reflects the 'p-values' resulting from your statistical test. So voxels expressing e.g. stat.prob < 0.05 should be considered reflecting a significant difference between conditions. The NaNs correspond to voxels outside the brain. Since stat.mask is all zeros (which by default is just stat.prob < 0.05), this indicates there are no significant differences between your conditions. There is nothing we can help you with in this respect :) Best, Eelke On 26 January 2014 09:06, Chaitanya Srinivas wrote: > Hi Eelke, > > I looked at the stat.stat values if that is what you mean. There > are some NaNs , but also some values. Similarly in stat.prob, there are > some 1's. The stat.mask is all zeros as you say. > > Any further suggestions from you? > Thank you > > *=============================================== * > > > *[image: Inline image 1]* > *Best Regards* > > > *Chaitanya Srinivas Lanka Wiss. Mitarbeiter > * > > *PhD Student Functional and Restorative Neurosurgery Neural Information > ProcessingNeurosurgical University Hospital* > > * Graduate Training Center for Neuroscience Eberhard Karls > University Eberhard Karls University **Otfried-Mueller-Str.45 > Österbergstr. 3* > * D-72076 Tuebingen **D-72074 > Tuebingen* > > *Mobile Phone Number : +49-176-79035731* > *===============================================* > > > On Sun, Jan 26, 2014 at 8:53 AM, Eelke Spaak wrote: > >> Dear Chaitanya, >> >> Perhaps an obvious question: do you find any significant differences in >> the statistics step (inspect the stat structure)? If not, the mask will >> consist of all zeroes, hence giving you a 'blank' plot. >> >> Best, >> Eelke >> >> >> On 26 January 2014 08:46, Chaitanya Srinivas wrote: >> >>> Dear fieldtrip users, >>> I would like to do sourcestatistics on a group level with eeg data. I have a >>> pre and post intervention measurement for each of my 10 subjects >>> . After source reconstruction using an DICS beamformer >>> and volume normalization, I calculated the sourcegrandaverage for the pre and >>> post condition and i have avg.pow for each subject. >>> >>> However, when I use the grandaverage results in ft_sourcestatistics in the >>> configuration shown below and plot the result I just get a blank anatomical >>> mri. It only runs with cfg.parameter="pow" .I tried with cfg.parameter = 'avg.pow' it doesnt run. >>> Do I have to set any additional parameters or am I making some mistake? >>> >>> >>> cfg=[]; >>> cfg.dim = grandAVGsourcePre.dim; >>> cfg.method = 'montecarlo'; >>> cfg.statistic = 'depsamplesT'; >>> cfg.parameter = 'pow'; >>> cfg.correctm = 'cluster'; >>> cfg.numrandomization = 1000; >>> cfg.alpha = 0.05; >>> cfg.tail = 0; >>> >>> nsubj=length(sourcePre.trial); >>> cfg.design(1,:) = [1:nsubj 1:nsubj]; >>> cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >>> cfg.uvar = 1; >>> cfg.ivar = 2; >>> stat = ft_sourcestatistics(cfg, grandAVGsourcePre, grandAVGsourcePost); >>> >>> >>> *and next interpolation* >>> cfg = []; >>> >>> >>> >>> cfg.voxelcoord = 'no'; >>> cfg.parameter = 'mask'; >>> cfg.interpmethod = 'nearest'; >>> cfg.coordsys = 'mni'; >>> >>> >>> >>> mask = ft_sourceinterpolate(cfg,stat,mri); >>> statplot.mask = mask.mask; >>> >>> >>> *and then for plotting* >>> >>> >>> >>> cfg = []; >>> cfg.method = 'slice'; >>> cfg.funparameter = 'stat'; >>> cfg.maskparameter = 'mask'; >>> cfg.funcolorlim = [-0.1 0.1]; >>> cfg.opacitylim = [-0.1 0.1]; >>> figure >>> ft_sourceplot(cfg, statplot); >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> * ===============================================* >>> >>> >>> *[image: Inline image 1]* >>> *Best Regards* >>> >>> >>> *Chaitanya Srinivas Lanka Wiss. Mitarbeiter >>> * >>> >>> *PhD Student Functional and Restorative Neurosurgery Neural Information >>> ProcessingNeurosurgical University Hospital* >>> >>> * Graduate Training Center for Neuroscience Eberhard Karls >>> University Eberhard Karls University **Otfried-Mueller-Str.45 >>> Österbergstr. 3* >>> * D-72076 Tuebingen **D-72074 >>> Tuebingen* >>> >>> *Mobile Phone Number : +49-176-79035731* >>> *===============================================* >>> >>> _______________________________________________ >>> 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 23195 bytes Desc: not available URL: From chaitanya.pro at gmail.com Sun Jan 26 09:46:03 2014 From: chaitanya.pro at gmail.com (Chaitanya Srinivas) Date: Sun, 26 Jan 2014 09:46:03 +0100 Subject: [FieldTrip] Urgent: Error in Source Statistics, Group level In-Reply-To: References: Message-ID: Hi Eelke, No significant results then in my data. I wonder how my boss takes it :P. Anyway, thanks for your help on a Sunday that too. >From your reply I also understand that the code doesn't have any mistakes :) *===============================================* *[image: Inline image 1]* *Best Regards* *Chaitanya Srinivas Lanka Wiss. Mitarbeiter * *PhD StudentFunctional and Restorative Neurosurgery Neural Information ProcessingNeurosurgical University Hospital* * Graduate Training Center for Neuroscience Eberhard Karls University Eberhard Karls University **Otfried-Mueller-Str.45 Österbergstr. 3* * D-72076 Tuebingen **D-72074 Tuebingen* *Mobile Phone Number : +49-176-79035731* *===============================================* On Sun, Jan 26, 2014 at 9:40 AM, Eelke Spaak wrote: > Hi Chaitanya, > > stat.prob reflects the 'p-values' resulting from your statistical test. So > voxels expressing e.g. stat.prob < 0.05 should be considered reflecting a > significant difference between conditions. The NaNs correspond to voxels > outside the brain. > > Since stat.mask is all zeros (which by default is just stat.prob < 0.05), > this indicates there are no significant differences between your > conditions. There is nothing we can help you with in this respect :) > > Best, > Eelke > > > On 26 January 2014 09:06, Chaitanya Srinivas wrote: > >> Hi Eelke, >> >> I looked at the stat.stat values if that is what you mean. There >> are some NaNs , but also some values. Similarly in stat.prob, there are >> some 1's. The stat.mask is all zeros as you say. >> >> Any further suggestions from you? >> Thank you >> >> * =============================================== * >> >> >> *[image: Inline image 1]* >> *Best Regards* >> >> >> *Chaitanya Srinivas Lanka Wiss. Mitarbeiter >> * >> >> *PhD Student Functional and Restorative Neurosurgery Neural Information >> ProcessingNeurosurgical University Hospital* >> >> * Graduate Training Center for Neuroscience Eberhard Karls >> University Eberhard Karls University **Otfried-Mueller-Str.45 >> Österbergstr. 3* >> * D-72076 Tuebingen **D-72074 >> Tuebingen* >> >> *Mobile Phone Number : +49-176-79035731* >> *===============================================* >> >> >> On Sun, Jan 26, 2014 at 8:53 AM, Eelke Spaak wrote: >> >>> Dear Chaitanya, >>> >>> Perhaps an obvious question: do you find any significant differences in >>> the statistics step (inspect the stat structure)? If not, the mask will >>> consist of all zeroes, hence giving you a 'blank' plot. >>> >>> Best, >>> Eelke >>> >>> >>> On 26 January 2014 08:46, Chaitanya Srinivas wrote: >>> >>>> Dear fieldtrip users, >>>> I would like to do sourcestatistics on a group level with eeg data. I have a >>>> pre and post intervention measurement for each of my 10 subjects >>>> . After source reconstruction using an DICS beamformer >>>> and volume normalization, I calculated the sourcegrandaverage for the pre and >>>> post condition and i have avg.pow for each subject. >>>> >>>> However, when I use the grandaverage results in ft_sourcestatistics in the >>>> configuration shown below and plot the result I just get a blank anatomical >>>> mri. It only runs with cfg.parameter="pow" .I tried with cfg.parameter = 'avg.pow' it doesnt run. >>>> Do I have to set any additional parameters or am I making some mistake? >>>> >>>> >>>> cfg=[]; >>>> cfg.dim = grandAVGsourcePre.dim; >>>> cfg.method = 'montecarlo'; >>>> cfg.statistic = 'depsamplesT'; >>>> cfg.parameter = 'pow'; >>>> cfg.correctm = 'cluster'; >>>> cfg.numrandomization = 1000; >>>> cfg.alpha = 0.05; >>>> cfg.tail = 0; >>>> >>>> nsubj=length(sourcePre.trial); >>>> cfg.design(1,:) = [1:nsubj 1:nsubj]; >>>> cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >>>> cfg.uvar = 1; >>>> cfg.ivar = 2; >>>> stat = ft_sourcestatistics(cfg, grandAVGsourcePre, grandAVGsourcePost); >>>> >>>> >>>> *and next interpolation* >>>> cfg = []; >>>> >>>> >>>> >>>> >>>> cfg.voxelcoord = 'no'; >>>> cfg.parameter = 'mask'; >>>> cfg.interpmethod = 'nearest'; >>>> cfg.coordsys = 'mni'; >>>> >>>> >>>> >>>> >>>> mask = ft_sourceinterpolate(cfg,stat,mri); >>>> statplot.mask = mask.mask; >>>> >>>> >>>> *and then for plotting* >>>> >>>> >>>> >>>> >>>> cfg = []; >>>> cfg.method = 'slice'; >>>> cfg.funparameter = 'stat'; >>>> cfg.maskparameter = 'mask'; >>>> cfg.funcolorlim = [-0.1 0.1]; >>>> cfg.opacitylim = [-0.1 0.1]; >>>> figure >>>> ft_sourceplot(cfg, statplot); >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> * ===============================================* >>>> >>>> >>>> *[image: Inline image 1]* >>>> *Best Regards* >>>> >>>> >>>> *Chaitanya Srinivas Lanka Wiss. Mitarbeiter >>>> * >>>> >>>> *PhD Student Functional and Restorative Neurosurgery Neural Information >>>> ProcessingNeurosurgical University Hospital* >>>> >>>> * Graduate Training Center for Neuroscience Eberhard Karls >>>> University Eberhard Karls University **Otfried-Mueller-Str.45 >>>> Österbergstr. 3* >>>> * D-72076 Tuebingen **D-72074 >>>> Tuebingen* >>>> >>>> *Mobile Phone Number : +49-176-79035731* >>>> *===============================================* >>>> >>>> _______________________________________________ >>>> 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 23195 bytes Desc: not available URL: From e.maris at psych.ru.nl Sun Jan 26 10:08:35 2014 From: e.maris at psych.ru.nl (Eric Maris) Date: Sun, 26 Jan 2014 10:08:35 +0100 (CET) Subject: [FieldTrip] interactions In-Reply-To: References: Message-ID: <040701cf1a76$2fd5fd50$8f81f7f0$@maris@psych.ru.nl> Hi Steve and Josh, Josh writes > > labels. I'm sure there's a proof somewhere for why this doesn't work, > > and it would be great to see it. In general, questions like these are very hard to answer satisfactorily on a discussion list. It is dealt with much more easily in person, say at one of the Fieldtrip courses. However, let me give it a try. To prove that something does not work it suffices to produces a single example that shows the contrary. Try the following: Generate random data in a 2-by-2 between-subjects design (say, normally distributed within every cell). Add large main effects (relative to the within-cell variance; say, MS_beween 50 times larger than MS_within) and no interaction effect. Take a small number of subjects (say, 5 per cell). Now, calculate a permutation p-value for the interaction-effect F-statistic by permuting across all 4 cells. Do this for a large number of simulated data set. My prediction is that, on average, the F-statistic p-value is less than 0.05, which it should be (because there is no interaction effect). I have not run this simulation study myself. Let me know if it does not produce the predicted result. (I cannot guarantee that I'm not missing something when producing this recipe.) Best, Eric > -----Original Message----- > From: Stephen Politzer-Ahles [mailto:politzerahless at gmail.com] > Sent: zondag 26 januari 2014 8:25 > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] interactions > > Hi Josh, > > Have you seen this [admittedly pretty old now] message from the > archives: http://mailman.science.ru.nl/pipermail/fieldtrip/2011- > January/003447.html > ? My understanding was that it is ok to test interactions in within- > subjects designs, and that you could do it by faking a dataset that > represents the interaction (step 3 in that message) and then doing a > dependent samples t-test. I had never heard before that interactions > can't be tested in a within-subjects design, but also it's been a long > time since I've looked at this issue--I'd definitely be interested to > hear if this is no longer the recommended way to test interactions. I > have seen messages saying that it doesn't work for between-subjects > designs (e.g. > http://mailman.science.ru.nl/pipermail/fieldtrip/2011- > September/004244.html), > but I'm not sure if that's still current. Hopefully someone on the list > can offer more insight about the second question. > > Best, > Steve > > > > > Message: 2 > > Date: Fri, 24 Jan 2014 10:54:10 -0500 > > From: Joshua Hartshorne > > To: fieldtrip at science.ru.nl > > Subject: [FieldTrip] interactions > > Message-ID: > > > > > > Content-Type: text/plain; charset="iso-8859-1" > > > > Hi List! > > > > I have seen around a dozen comments in the archives that interactions > > can't be tested by permutation for within-subject designs. I haven't > > been able to find a thread that explains why not. It seems like in a > > 2x2 design, you could still pick one of the conditions and permute > the > > labels. I'm sure there's a proof somewhere for why this doesn't work, > > and it would be great to see it. > > > > Similarly, for the mixed design, why permute the between-subject > labels? > > Why not permute the within-subject labels instead? Actually, why not > > do both? I follow the reasoning why permuting both is overkill, but > > not why it's wrong. > > > > If someone could explain, it would be much appreciated. Knowing what > > to do is good, but it would be even better to understand why. > > > > Thanks, > > Josh > > -------------- next part -------------- An HTML attachment was > > scrubbed... > > URL: > > > b885cb4a/attachment-0001.html> > > From ayobimpe2004 at hotmail.com Sun Jan 26 10:43:58 2014 From: ayobimpe2004 at hotmail.com (Azeez Adebimpe) Date: Sun, 26 Jan 2014 10:43:58 +0100 Subject: [FieldTrip] Urgent: Error in Source Statistics, Group level In-Reply-To: References: , , , , Message-ID: Hi Chaitanya , I would suggest you try analyitcs instead of montecarlo and use stat= ft_sourcestatitics(cfg, source1a, source2a .................., source1b,source2b.............);a and b are for the conditions. Azeez Adebimpe Date: Sun, 26 Jan 2014 09:46:03 +0100 From: chaitanya.pro at gmail.com To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Urgent: Error in Source Statistics, Group level Hi Eelke, No significant results then in my data. I wonder how my boss takes it :P. Anyway, thanks for your help on a Sunday that too. >From your reply I also understand that the code doesn't have any mistakes :) =============================================== Best RegardsChaitanya Srinivas Lanka Wiss. Mitarbeiter PhD Student Functional and Restorative Neurosurgery Neural Information Processing Neurosurgical University Hospital Graduate Training Center for Neuroscience Eberhard Karls University Eberhard Karls University Otfried-Mueller-Str.45 Österbergstr. 3 D-72076 Tuebingen D-72074 Tuebingen Mobile Phone Number : +49-176-79035731 =============================================== On Sun, Jan 26, 2014 at 9:40 AM, Eelke Spaak wrote: Hi Chaitanya, stat.prob reflects the 'p-values' resulting from your statistical test. So voxels expressing e.g. stat.prob < 0.05 should be considered reflecting a significant difference between conditions. The NaNs correspond to voxels outside the brain. Since stat.mask is all zeros (which by default is just stat.prob < 0.05), this indicates there are no significant differences between your conditions. There is nothing we can help you with in this respect :) Best,Eelke On 26 January 2014 09:06, Chaitanya Srinivas wrote: Hi Eelke, I looked at the stat.stat values if that is what you mean. There are some NaNs , but also some values. Similarly in stat.prob, there are some 1's. The stat.mask is all zeros as you say. Any further suggestions from you? Thank you =============================================== Best RegardsChaitanya Srinivas Lanka Wiss. Mitarbeiter PhD Student Functional and Restorative Neurosurgery Neural Information Processing Neurosurgical University Hospital Graduate Training Center for Neuroscience Eberhard Karls University Eberhard Karls University Otfried-Mueller-Str.45 Österbergstr. 3 D-72076 Tuebingen D-72074 Tuebingen Mobile Phone Number : +49-176-79035731 =============================================== On Sun, Jan 26, 2014 at 8:53 AM, Eelke Spaak wrote: Dear Chaitanya, Perhaps an obvious question: do you find any significant differences in the statistics step (inspect the stat structure)? If not, the mask will consist of all zeroes, hence giving you a 'blank' plot. Best,Eelke On 26 January 2014 08:46, Chaitanya Srinivas wrote: Dear fieldtrip users, I would like to do sourcestatistics on a group level with eeg data. I have a pre and post intervention measurement for each of my 10 subjects . After source reconstruction using an DICS beamformer and volume normalization, I calculated the sourcegrandaverage for the pre and post condition and i have avg.pow for each subject. However, when I use the grandaverage results in ft_sourcestatistics in the configuration shown below and plot the result I just get a blank anatomical mri. It only runs with cfg.parameter="pow" .I tried with cfg.parameter = 'avg.pow' it doesnt run. Do I have to set any additional parameters or am I making some mistake? cfg=[]; cfg.dim = grandAVGsourcePre.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; cfg.alpha = 0.05; cfg.tail = 0; nsubj=length(sourcePre.trial); cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg, grandAVGsourcePre, grandAVGsourcePost); and next interpolation cfg = []; cfg.voxelcoord = 'no'; cfg.parameter = 'mask'; cfg.interpmethod = 'nearest'; cfg.coordsys = 'mni'; mask = ft_sourceinterpolate(cfg,stat,mri); statplot.mask = mask.mask; and then for plotting cfg = []; cfg.method = 'slice'; cfg.funparameter = 'stat'; cfg.maskparameter = 'mask'; cfg.funcolorlim = [-0.1 0.1]; cfg.opacitylim = [-0.1 0.1]; figure ft_sourceplot(cfg, statplot); =============================================== Best RegardsChaitanya Srinivas Lanka Wiss. Mitarbeiter PhD Student Functional and Restorative Neurosurgery Neural Information Processing Neurosurgical University Hospital Graduate Training Center for Neuroscience Eberhard Karls University Eberhard Karls University Otfried-Mueller-Str.45 Österbergstr. 3 D-72076 Tuebingen D-72074 Tuebingen Mobile Phone Number : +49-176-79035731 =============================================== _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 23195 bytes Desc: not available URL: From tessa.van-leeuwen at brain.mpg.de Mon Jan 27 16:31:23 2014 From: tessa.van-leeuwen at brain.mpg.de (van Leeuwen, Tessa) Date: Mon, 27 Jan 2014 15:31:23 +0000 Subject: [FieldTrip] 'Synaesthesia in Perspective' symposium programme update: registration still open Message-ID: <87CB345598E7E64D82323FFCA3C8126330439AFA@UM-EXCDAG-A01.um.gwdg.de> Dear all, The programme of our symposium ' Synaesthesia in Perspective' has been finalized and the on line version now lists presentation titles: http://www.multisense.org/index.php/symposium-2014. Registration is still possible via the website. Taking place in Hamburg, Germany on February 28th and March 1st, 2014, the 2-day symposium includes presentations from highly renowned speakers on the topics of synaesthesia and multisensory processing. Besides contributions from invited speakers, the symposium includes posters sessions during which participants are invited to present their studies. Registration through the website is free but mandatory. Registration is still open for those who have not yet registered. Please register as soon as possible! Topic outline: Synaesthesia is a fascinating phenomenon in which different senses are mixed. For synaesthetes, specific sensory stimuli automatically trigger additional perceptual experiences. Studying synaesthesia is interesting by itself; the aim of the symposium, however, is to put synaesthesia in perspective by also emphasizing the relationships of synaesthesia with other fields of study, such as multisensory processing, sensory substitution, development of sensory processing, and connectivity in sensory systems. Confirmed speakers: Peter König, Andreas Engel, Brigitte Röder, Christopher Sinke, Jianwei Zhang, Amir Amedi, Anil Seth, Charles Spence, Christoph Kayser, Danko Nikolic, Devin Blair Terhune, Jamie Ward, Julia Simner, Fiona Newell, Micah Murray, Nicolas Rothen, Olympia Colizoli, Petra Stoerig, David Brang, Romke Rouw, Mark Wallace, Tessa M. van Leeuwen, Virginie van Wassenhove, Toemme Noesselt, Uta Noppeney, and Alexandra Kirschner For more information, please visit our website (http://www.multisense.org/index.php/symposium-2014) or send an email to the organizers at symposium2014 at multisense.org. We would be very happy to welcome you in Hamburg! Best regards, The Organizing Committee (Tessa M. van Leeuwen, Sina A. Trautmann-Lengsfeld, Peter König, Jianwei Zhang, Andreas K. Engel) -- Tessa van Leeuwen, PhD postdoctoral researcher Department of Neurophysiology Max Planck Institute for Brain Research Deutschordenstr. 46 60528 Frankfurt am Main Germany tessa.van-leeuwen at brain.mpg.de T: +49 (0)69 96769 240 www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Mon Jan 27 16:36:59 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Mon, 27 Jan 2014 16:36:59 +0100 Subject: [FieldTrip] 'Synaesthesia in Perspective' symposium programme update: registr Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gopalar.ccf at gmail.com Mon Jan 27 18:45:48 2014 From: gopalar.ccf at gmail.com (Raghavan Gopalakrishnan) Date: Mon, 27 Jan 2014 12:45:48 -0500 Subject: [FieldTrip] bootstrap Message-ID: Dear all, I have a statistical question. In an experiment, I have 2 conditions. We deliberately collected lesser trials in one condition than another. Cond1 has 96 trials and Cond2 has 144 trials, basically in 40:60 ratio rather than 50:50. In order to avoid any sample bias, do I need to bootstrap the Cond1 so it equals Cond2? If so, Is there a way to do it in FT? Any suggestion would be of great help. Thanks, Raghavan -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Tue Jan 28 10:19:52 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Tue, 28 Jan 2014 10:19:52 +0100 (CET) Subject: [FieldTrip] ft_combineplanar on Neuromagdata In-Reply-To: <495873C58A622E45A3ABF4813B9451EC6E41986C@MAIL1-UKD.VMED.UKD> Message-ID: <1917402501.460159.1390900792946.JavaMail.root@bcbl.eu> Dear Hanneke, the reason why ft_combineplanar didn't return 102 channels in my case was that I had excluded faulty channels during ft_preprocessing. After repairing these channels, ft_combineplanar returned 102 instead of 204 channels. Thanks for your help. Fred ----- Original Message ----- From: "Hanneke vanDijk" To: fieldtrip at science.ru.nl Sent: Friday, January 24, 2014 1:11:05 PM Subject: Re: [FieldTrip] ft_combineplanar on Neuromagdata Dear Fred, First of all I think there is a typo, you refer to spectrum1 (in the isequal line), and but you use 'spectrum' as input in ft_combineplanar. My workflow is slightly different, but maybe that makes the difference...., in preprocessing I use (but I suppose you could also try that in freqanalysis) > cfg.channel = {'all', '-MEG***1'}; %with the goal to also only use the planar gradiometer data for further analysis (magnetometers end with a 1). p = label: {204x1 cell} Then after freqanalysis (which I also first do with the 204 channels), I use ft_combineplanar and I get the right result. I hope this somehow helps.. Best, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -----Ursprüngliche Nachricht----- Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Frédéric Roux Gesendet: Freitag, 24. Januar 2014 10:57 An: FieldTrip discussion list Betreff: [FieldTrip] ft_combineplanar on Neuromagdata Dear fieldtrip users, sorry to bother you with this really trivial question. I am running into an issue using ft_combineplanar on Neuromag data. The code I am using is as follows: cfg = []; cfg.channel = {'MEGGRAD'}; grad_data = ft_selectdata(meg_data); %after this step there are only planar-gradients left cfg = []; cfg.method = 'mtmfft'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.foi = 0:100; cfg.keeptrials = 'no'; spectrum1 = ft_freqanalysis(cfg,grad_data); % returns the FFT power spectrum cfg = []; spectrum2 = ft_combineplanar(cfg,spectrum); % this step should combine horizontal and vertical gradients into % one single gradient aka reduce the number of channels However, spectrum does not change. This can be seen by isequal(spectrum1.powspctrm,spectrum2.powspctrm) == 1 Also the number of channels (n = 204) is not reduced after ft_combineplanar when in fact there should only be n = 102 channels left. Is this related to the fact that ft_combineplanar is designed to take only time-frequency maps as input or am I doing something wrong here? Any advice would be highly appreciated. Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From f.roux at bcbl.eu Tue Jan 28 15:42:57 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Tue, 28 Jan 2014 15:42:57 +0100 (CET) Subject: [FieldTrip] Post-Doctoral Position available in Glasgow Message-ID: <394484066.466637.1390920177229.JavaMail.root@bcbl.eu> On behalf of Peter Uhlhaas: Dear colleagues, I would like to alert you to a post-doctoral position for MEG-research at the Centre for Cognitive Neuroimaging (CCNi) at the University of Glasgow (Grade 6/7: £26,527 - £29,837 / £32,590 - £36,661 per annum). The post-doctoral fellow will contribute to a project, funded by the Medical Research Council (MRC), entitled “Using Magnetoencephalography to Investigate Aberrant Neural Synchrony in Prodromal Schizophrenia”. Specifically, the job requires the analysis and acquisition of MEG-data sets and implementation of novel analytic tools, contributing to the design and programming of MEG experiments, assisting in analysing the results, and participating in the writing up of the results. This post is initially funded for 2 years with a possible extension of 1 year. Approximate starting data: 1st of July 2014 For further information please contact Dr Peter Uhlhaas (peter.uhlhaas at glasgow.ac.uk) Please submit your applications online at: www.gla.ac.uk/jobs Closing date: 23 February 2014 Dr. Peter J. Uhlhaas Reader Institute for Neuroscience and Psychology University of Glasgow 58 Hillhead Street Glasgow G12 8QB Telephone +44 (0)141 330 8730 From hweeling.lee at gmail.com Wed Jan 29 14:57:58 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 29 Jan 2014 14:57:58 +0100 Subject: [FieldTrip] Problem with ICA using data exported via Brainvision analyser Message-ID: Dear all, Whenever I export my EEG data using Brainvision analyser, I get problems with running ICA on Fieldtrip. The data has a different rank, although I specify to compute ICA using all channels. However, when I use the raw EEG data collected from Brainvision recorder, I do not get this problem. Does anyone know why and how to resolve this issue? My purpose of using Brainvision analyser is to downsample the EEG raw data before further analyses. Thanks. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Wed Jan 29 15:31:55 2014 From: mcantor at umich.edu (Max Cantor) Date: Wed, 29 Jan 2014 09:31:55 -0500 Subject: [FieldTrip] Problem with ICA using data exported via Brainvision analyser In-Reply-To: References: Message-ID: Hi Hwee, It may be your reference channel. Try removing your reference channel from ICA and it should resolve the rank issue. Max Cantor Research Assistant Computational Neurolinguistics Lab University of Michigan On Wed, Jan 29, 2014 at 8:57 AM, Hwee Ling Lee wrote: > Dear all, > > Whenever I export my EEG data using Brainvision analyser, I get problems > with running ICA on Fieldtrip. The data has a different rank, although I > specify to compute ICA using all channels. > > However, when I use the raw EEG data collected from Brainvision recorder, > I do not get this problem. > > Does anyone know why and how to resolve this issue? > > My purpose of using Brainvision analyser is to downsample the EEG raw data > before further analyses. > > Thanks. > > Best regards, > Hweeling > > > _______________________________________________ > 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 normanbenbrahim at gmail.com Wed Jan 29 16:21:52 2014 From: normanbenbrahim at gmail.com (Norman Benbrahim) Date: Wed, 29 Jan 2014 10:21:52 -0500 Subject: [FieldTrip] Problems loading in m BrainVision files Message-ID: Hi guys, I'm having trouble loading my files in via ft_preprocessing. I've ensured that the function actually works on my matlab by running it on sample data found here: http://fieldtrip.fcdonders.nl/tutorial/continuous and everything works just fine. I do always get the warning that FT misbehaves with matlab version >= 2013a though, so I'm not sure if that might have an impact on my trial. I'm running 2013b on a Red Hat Linux Server. I've attached the data to this email. -Norman scan1.zip -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Thu Jan 30 10:35:04 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 30 Jan 2014 10:35:04 +0100 (CET) Subject: [FieldTrip] Problems loading in m BrainVision files In-Reply-To: References: Message-ID: <002f01cf1d9e$8e293fe0$aa7bbfa0$@herring@fcdonders.ru.nl> Dear Norman, I've reproduced the problem and have posted it as a bug on bugzilla (http://bugzilla.fcdonders.nl/show_bug.cgi?id=2462). You can follow progress on solving the issue on this website. There seems to be a problem with estimating the number of samples in the dataset. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Norman Benbrahim Sent: woensdag 29 januari 2014 16:22 To: FieldTrip discussion list Subject: [FieldTrip] Problems loading in m BrainVision files Hi guys, I'm having trouble loading my files in via ft_preprocessing. I've ensured that the function actually works on my matlab by running it on sample data found here: http://fieldtrip.fcdonders.nl/tutorial/continuous and everything works just fine. I do always get the warning that FT misbehaves with matlab version >= 2013a though, so I'm not sure if that might have an impact on my trial. I'm running 2013b on a Red Hat Linux Server. I've attached the data to this email. -Norman Image removed by sender. scan1.zip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ~WRD000.jpg Type: image/jpeg Size: 823 bytes Desc: not available URL: From victorias at dsv.su.se Thu Jan 30 11:33:08 2014 From: victorias at dsv.su.se (=?UTF-8?Q?Victoria_Schr=C3=B6der?=) Date: Thu, 30 Jan 2014 11:33:08 +0100 Subject: [FieldTrip] freqanalysis Message-ID: <4cf9dcb0c4ce6d9726b56a7ee78e1653@dsv.su.se> Hello I am currently working on a freqanalysis as a first step to do a connectivityanalysis. I am a bit unsure about the method to use for the freqanalysis. My stimuli are very long: between 29 and 30 sec. In total i have 4 stimuli per condition and 2 seperate conditions. I am looking at the beta range so fairly low frequencies. this is my code: Am i using the right taper and method. Should i smooth the data? and if so, what should such a smoothing parameter depend on? %fourier analysis cfg=[]; cfg.output='fourier'; cfg.method='mtmfft'; cfg.foi=[12:30]; cfg.taper='hanning'; cfg.keeptrials='yes'; cfg.channel={'C15' 'C10' 'B23' 'B3'}; frefourier=ft_freqanalysis(cfg,data_clean); %coherence analysis cfg=[]; cfg.method='coh'; cfg.channelcmb={'B3' 'C15' 'B3' 'C10' 'B23' 'C15' 'B23' 'C10'} coherence=ft_connectivityanalysis(cfg, frefourier); Thank you very much for the suggestions! Best Victoria From hweeling.lee at gmail.com Thu Jan 30 11:58:08 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 30 Jan 2014 11:58:08 +0100 Subject: [FieldTrip] Problem with ICA using data exported via Brainvision analyser In-Reply-To: References: Message-ID: Hi Max, Thanks for your suggestion. However, I checked the data, there was no data from the reference channel, so I doubt this is the problem for the rank issue. Cheers, Hweeling On 29 January 2014 15:31, Max Cantor wrote: > Hi Hwee, > > It may be your reference channel. Try removing your reference channel from > ICA and it should resolve the rank issue. > > Max Cantor > Research Assistant > Computational Neurolinguistics Lab > University of Michigan > > > On Wed, Jan 29, 2014 at 8:57 AM, Hwee Ling Lee wrote: > >> Dear all, >> >> Whenever I export my EEG data using Brainvision analyser, I get problems >> with running ICA on Fieldtrip. The data has a different rank, although I >> specify to compute ICA using all channels. >> >> However, when I use the raw EEG data collected from Brainvision recorder, >> I do not get this problem. >> >> Does anyone know why and how to resolve this issue? >> >> My purpose of using Brainvision analyser is to downsample the EEG raw >> data before further analyses. >> >> Thanks. >> >> Best regards, >> Hweeling >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Thu Jan 30 16:22:47 2014 From: mcantor at umich.edu (Max Cantor) Date: Thu, 30 Jan 2014 10:22:47 -0500 Subject: [FieldTrip] Fwd: Problem with ICA using data exported via Brainvision analyser In-Reply-To: References: Message-ID: I just realized I accidentally forgot to do reply all and the subsequent responses weren't posted on the mailing list, so I'm forwarding it back on for anyone else who was following. Sorry! ---------- Forwarded message ---------- From: Max Cantor Date: Thu, Jan 30, 2014 at 9:24 AM Subject: Re: [FieldTrip] Problem with ICA using data exported via Brainvision analyser To: Hwee Ling Lee I'm not sure I understand what you mean by not being able to find the data that corresponds to the reference channel. For your call to ft_componentanalysis, for cfg.channel, if you set it to {'all', '-refchan'}, where refchan stands for whatever your reference channel is called, that should remove the reference channel from ICA. If you're issue is what I think it is, this tutorial should reiterate what I'm talking about: http://fieldtrip.fcdonders.nl/faq/why_does_my_ica_output_contain_complex_numbers Sorry if I'm misunderstanding the problem you're having, but hopefully this clarifies things. On Thu, Jan 30, 2014 at 8:35 AM, Hwee Ling Lee wrote: > Dear Max, > Thanks for taking your time to explain this. I would like to try your > suggestion, but the problem is that i don't know which channel i should > remove from my data since i can't find the data that corresponds to the > reference channel. > The funny thing for me at least is that this problem does not occur when i > use the raw data that has not been exported by brainvision analyser. I'll > try to look at the archives regarding this. > Thanks again. > Cheers, > Hweeling > On 30 Jan 2014 13:54, "Max Cantor" wrote: > >> Hm, did you try it? I had a similar issue awhile back and that solved it >> for me. Let me see if I can explain this correctly: I think the fact that >> there is no data from the reference channel is exactly the problem. ICA is >> performing a transform on the data, 'rotating' the data from channel space >> to component space, based on rank. If there is no data in any of the >> channels, you're asking ICA to transform the data into more components than >> effectively there are channels; in other words the dimensions in the >> 'rotation' of the data (if you think of the transform like a geometric >> rotation) are off. Hopefully that explanation makes sense, or somebody else >> can explain it more adequately. I think somewhere in the archives there was >> a long thread about ICA where I and a few other people ask about this >> issue, so that may help as well. >> >> >> On Thu, Jan 30, 2014 at 5:58 AM, Hwee Ling Lee wrote: >> >>> Hi Max, >>> >>> Thanks for your suggestion. However, I checked the data, there was no >>> data from the reference channel, so I doubt this is the problem for the >>> rank issue. >>> >>> Cheers, >>> Hweeling >>> >>> >>> >>> On 29 January 2014 15:31, Max Cantor wrote: >>> >>>> Hi Hwee, >>>> >>>> It may be your reference channel. Try removing your reference channel >>>> from ICA and it should resolve the rank issue. >>>> >>>> Max Cantor >>>> Research Assistant >>>> Computational Neurolinguistics Lab >>>> University of Michigan >>>> >>>> >>>> On Wed, Jan 29, 2014 at 8:57 AM, Hwee Ling Lee wrote: >>>> >>>>> Dear all, >>>>> >>>>> Whenever I export my EEG data using Brainvision analyser, I get >>>>> problems with running ICA on Fieldtrip. The data has a different rank, >>>>> although I specify to compute ICA using all channels. >>>>> >>>>> However, when I use the raw EEG data collected from Brainvision >>>>> recorder, I do not get this problem. >>>>> >>>>> Does anyone know why and how to resolve this issue? >>>>> >>>>> My purpose of using Brainvision analyser is to downsample the EEG raw >>>>> data before further analyses. >>>>> >>>>> Thanks. >>>>> >>>>> Best regards, >>>>> Hweeling >>>>> >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>> >>>> >>> >>> >>> -- >>> ================================================= >>> Dr. rer. nat. Lee, Hwee Ling >>> Postdoc >>> German Center for Neurodegenerative Diseases (DZNE) Bonn >>> >>> Email 1: hwee-ling.leedzne.de >>> Email 2: hweeling.leegmail.com >>> >>> https://sites.google.com/site/hweelinglee/home >>> >>> Correspondence Address: >>> Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany >>> ================================================= >>> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From normanbenbrahim at gmail.com Thu Jan 30 16:33:42 2014 From: normanbenbrahim at gmail.com (Norman Benbrahim) Date: Thu, 30 Jan 2014 10:33:42 -0500 Subject: [FieldTrip] Problems loading in m BrainVision files In-Reply-To: <52ea1cee.85570e0a.4256.ffffaaa0SMTPIN_ADDED_BROKEN@mx.google.com> References: <52ea1cee.85570e0a.4256.ffffaaa0SMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: Thanks Jim I really appreciate you taking the time to look at my data, I will follow the bugzilla page On Thursday, January 30, 2014, Herring, J.D. (Jim) < j.herring at fcdonders.ru.nl> wrote: > Dear Norman, > > > > I've reproduced the problem and have posted it as a bug on bugzilla ( > http://bugzilla.fcdonders.nl/show_bug.cgi?id=2462). You can follow > progress on solving the issue on this website. > > > > There seems to be a problem with estimating the number of samples in the > dataset. > > > > Best, > > > > Jim > > > > > > > > *From:* fieldtrip-bounces at science.ru.nl[mailto: > fieldtrip-bounces at science.ru.nl] > *On Behalf Of *Norman Benbrahim > *Sent:* woensdag 29 januari 2014 16:22 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] Problems loading in m BrainVision files > > > > Hi guys, > > I'm having trouble loading my files in via ft_preprocessing. I've ensured > that the function actually works on my matlab by running it on sample data > found here: http://fieldtrip.fcdonders.nl/tutorial/continuous > > and everything works just fine. I do always get the warning that FT > misbehaves with matlab version >= 2013a though, so I'm not sure if that > might have an impact on my trial. I'm running 2013b on a Red Hat Linux > Server. I've attached the data to this email. > > > > -Norman > > > > > > *[image: Image removed by sender.] scan1.zip > * > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ~WRD000.jpg Type: image/jpeg Size: 823 bytes Desc: not available URL: From instanton at gmail.com Thu Jan 30 19:38:20 2014 From: instanton at gmail.com (woun zoo) Date: Thu, 30 Jan 2014 10:38:20 -0800 Subject: [FieldTrip] Any insight about Transfer Entropy? Message-ID: How are you? I'd like to get some insight from you for transfer entropy analysis of my ECoG data before I run all possible parameters. I know this message doesn't exactly fit in fieldtrip email list cause question is not exactly about fieldtrip. But there are a few connectivity methods in fieldtrip. So I'd like to get my questions to reach some of experts in this causality analysis field. Besides, I don't know if there is nonlinear time series analysis discussion list out there or not. I'd like to establish some connectivity (functional or effective) between frontal and visual channels in ECoG recording. However, in our data, there is a very strong driven component, namely, steady state visually evoked potentials. SSVEPs in our data appear at several frequencies that are harmonics of the input frequencies and their sum and difference frequencies So our data has a completely deterministic (SSVEPs) dynamics and the rest of background activities. Data has 20 trials in total. Each trial lasts 2.4sec. Sampling rate is 1200hz. Raw data were bandpass filtered from 0.1Hz to 500hz. In order to find an effective connectivity, I chose to use TRENTOOL box that can be incorporated with fieldtrip. I chose Ragwitz method to determine delay time and embedding dimension. This is where I'd like to get some good insight for choosing parameters. I attached a script that I'm using now. I wrote my questions in blue text down below. I really wish to get some good insight from you because I don't know if my input parameters are garbage or not. cfgTEP.toi = [min(data.time{1,1}) max(data.time{1,1})] --> Basically from trial start to trial end. cfgTEP.predicttimemin_u= 10; cfgTEP.predicttimemax_u= 240; --> For these prediction horizon values, I don't know where and how these min and max were used in TEragwitz.m calculation in TEprepare.m. Transfer Entropy calculation method (VW_ds) fixed 1 as a prediction horizon. I can't find where this min or max of predicttime goes inside TEragwitz calculation. VW_ds seems to try to predict one time sample point ahead from the current time sample point. Is this proper to determine embedding dimension and delay time for SSVEP + background activities? cfgTEP.actthrvalue = 100; --> I don't know the reason why this autocorrelation time value needs to be set by hand. I know with this threshold value, you can selectively choose trials. In my data, particular channels' autocorrelation values were 54 (sample points), etc. Max autocorrelation was 134 or something. Is this due to noise? If I have strong oscillatory activities at the driving frequencies, am I not supposed to see autocorrelation values close to oscillatory period? cfgTEP.maxlag = 1000; --> What will be a good lag number? Isn't it better to use whole trial length? cfgTEP.minnrtrials = 7; --> What is a good number for this when there are 20 trials? For main parameters for TEragwitz, cfgTEP.optimizemethod ='ragwitz'; cfgTEP.ragdim = 1:10; --> I just chose all possible embedding dimension from 1 to 10. Should I try go more than 10? But TE analysis always says, embedding dimension maybe 2, which sounds about right for pure sine waves like my SSVEP. But with 0.1Hz~500hz bandpass, I have tons of non-stimulus locked high background activities. I'd like to know if 2 is really good estimation or not for my data. Also when I chose Cao's method, it says, 5 or 6. cfgTEP.ragtaurange = [0.1 2]; --> For delay time as an initial guess, I chose this range. But Ragwitz always chose the smallest value. If I put this range from [1 2], then it chooses 1. If it was [0.5 3], it chose 0.5. Whatever minimum value I put will be chosen as its delay time, which makes me wonder about what kind of values I should put here. cfgTEP.ragtausteps = 15; % steps for ragwitz tau steps 15 cfgTEP.repPred = 600; --> I just chose this. Depending on what I put here, final significance of TE changes too. cfgTEP.flagNei = 'Mass' ; %neigbour analyse type cfgTEP.sizeNei = 4; --> It follows the results of Kraskov (2004) paper. I think this range is between [embedding dimension 2*embedding dimension]. But should I vary this too? For example, should I try 15, 30, 50 etc? For Surrogate analysis in the below, I don't know which options are common to use for non-parametric statistical analysis. cfgTESS.optdimusage = 'indivdim'; cfgTGAA.select_opt_u = 'product_evidence'; % 'max_TEdiff'; cfgTGAA.select_opt_u_pos = 'shortest'; I'm sorry if these questions are not exactly relevant to fieldtrip community. If there is nonlinear time series analysis community, I'd like to post this message over there. But I really appreciate if you could give me some good insight about playing with parameters for ECoG steady-state visual evoked potential data. Thank you very much. Have a nice day. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tomh at kurage.nimh.nih.gov Thu Jan 30 20:09:09 2014 From: tomh at kurage.nimh.nih.gov (Tom Holroyd (NIH/NIMH) [E]) Date: Thu, 30 Jan 2014 14:09:09 -0500 Subject: [FieldTrip] Any insight about Transfer Entropy? In-Reply-To: References: Message-ID: <52EAA355.8040405@kurage.nimh.nih.gov> I saw your earlier message. I think I would be worried that 48 seconds total is not very much data, and only 20 trials is also a small number. I'm not familiar enough with the Ragwitz method so I don't know if it can accurately estimate the embedding dimension from so little data. But it might be a problem. woun zoo wrote: > How are you? > > I'd like to get some insight from you for transfer entropy analysis of my > ECoG data before I run all possible parameters. I know this message doesn't > exactly fit in fieldtrip email list cause question is not exactly about > fieldtrip. But there are a few connectivity methods in fieldtrip. So I'd > like to get my questions to reach some of experts in this causality > analysis field. Besides, I don't know if there is nonlinear time series > analysis discussion list out there or not. > > I'd like to establish some connectivity (functional or effective) between > frontal and visual channels in ECoG recording. However, in our data, there > is a very strong driven component, namely, steady state visually evoked > potentials. SSVEPs in our data appear at several frequencies that are > harmonics of the input frequencies and their sum and difference frequencies > So our data has a completely deterministic (SSVEPs) dynamics and the rest > of background activities. > > Data has 20 trials in total. Each trial lasts 2.4sec. Sampling rate is > 1200hz. Raw data were bandpass filtered from 0.1Hz to 500hz. > > In order to find an effective connectivity, I chose to use TRENTOOL box > that can be incorporated with fieldtrip. I chose Ragwitz method to > determine delay time and embedding dimension. This is where I'd like to get > some good insight for choosing parameters. I attached a script that I'm > using now. I wrote my questions in blue text down below. I really wish to > get some good insight from you because I don't know if my input parameters > are garbage or not. > > cfgTEP.toi = [min(data.time{1,1}) max(data.time{1,1})] --> Basically from > trial start to trial end. > > cfgTEP.predicttimemin_u= 10; > cfgTEP.predicttimemax_u= 240; --> For these prediction horizon values, I > don't know where and how these min and max were used in TEragwitz.m > calculation in TEprepare.m. Transfer Entropy calculation method (VW_ds) > fixed 1 as a prediction horizon. I can't find where this min or max of > predicttime goes inside TEragwitz calculation. VW_ds seems to try to > predict one time sample point ahead from the current time sample point. Is > this proper to determine embedding dimension and delay time for SSVEP + > background activities? > > cfgTEP.actthrvalue = 100; --> I don't know the reason why this > autocorrelation time value needs to be set by hand. I know with this > threshold value, you can selectively choose trials. In my data, particular > channels' autocorrelation values were 54 (sample points), etc. Max > autocorrelation was 134 or something. Is this due to noise? If I have > strong oscillatory activities at the driving frequencies, am I not supposed > to see autocorrelation values close to oscillatory period? > > cfgTEP.maxlag = 1000; --> What will be a good lag number? Isn't it > better to use whole trial length? > > cfgTEP.minnrtrials = 7; --> What is a good number for this when there are > 20 trials? > > For main parameters for TEragwitz, > > cfgTEP.optimizemethod ='ragwitz'; > cfgTEP.ragdim = 1:10; --> I just chose all possible embedding > dimension from 1 to 10. Should I try go more than 10? But TE analysis > always says, embedding dimension maybe 2, which sounds about right for pure > sine waves like my SSVEP. But with 0.1Hz~500hz bandpass, I have tons of > non-stimulus locked high background activities. I'd like to know if 2 is > really good estimation or not for my data. Also when I chose Cao's method, > it says, 5 or 6. > > cfgTEP.ragtaurange = [0.1 2]; --> For delay time as an initial guess, I > chose this range. But Ragwitz always chose the smallest value. If I put > this range from [1 2], then it chooses 1. If it was [0.5 3], it chose 0.5. > Whatever minimum value I put will be chosen as its delay time, which makes > me wonder about what kind of values I should put here. > > cfgTEP.ragtausteps = 15; % steps for ragwitz tau steps 15 > > cfgTEP.repPred = 600; --> I just chose this. Depending on what I > put here, final significance of TE changes too. > > cfgTEP.flagNei = 'Mass' ; %neigbour analyse type > > cfgTEP.sizeNei = 4; --> It follows the results of Kraskov (2004) paper. I > think this range is between [embedding dimension 2*embedding dimension]. > But should I vary this too? For example, should I try 15, 30, 50 etc? > > > For Surrogate analysis in the below, I don't know which options are common > to use for non-parametric statistical analysis. > > cfgTESS.optdimusage = 'indivdim'; > cfgTGAA.select_opt_u = 'product_evidence'; % 'max_TEdiff'; > cfgTGAA.select_opt_u_pos = 'shortest'; > > I'm sorry if these questions are not exactly relevant to fieldtrip > community. If there is nonlinear time series analysis community, I'd like > to post this message over there. But I really appreciate if you could give > me some good insight about playing with parameters for ECoG steady-state > visual evoked potential data. > > Thank you very much. > Have a nice day. > > > > ------------------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- "There are not more than five musical notes, yet the combinations of these five give rise to more melodies than can ever be heard." -- Sun Tzu From joramvandriel at gmail.com Fri Jan 31 12:44:25 2014 From: joramvandriel at gmail.com (Joram van Driel) Date: Fri, 31 Jan 2014 12:44:25 +0100 Subject: [FieldTrip] missing anatomy in source plot of ft_sourcegrandaverage Message-ID: Hi all, I'm trying to plot the grand average of a source analysis. However no matter what I try, the result of ft_sourcegrandaverage keeps giving me only the functional data, no anatomy. My cfg for ft_sourceplot is: cfg = []; cfg.method = 'ortho'; cfg.interactive = 'no'; cfg.funparameter = 'avg.pow'; cfg.maskparameter = cfg.funparameter; cfg.funcolorlim = [0 0.2]; cfg.opacitylim = [0 0.2]; cfg.opacitymap = 'rampup'; ft_sourceplot(cfg,grandavg{1}) I thus created my own grandaverage, like this (where sourceDiffAll{:,:} is a subject-by-condition cell structure): temp = zeros([length(nsubjects) size(sourceDiffAll{1,1}.avg.pow)]); for s=1:length(nsubjects) temp(s,:,:,:) = sourceDiffAll{s,2}.avg.pow - sourceDiffAll{s,1}.avg.pow; % create condition contrast end customavg = sourceDiffAll{1,1}; % just copy one subject one condition customavg.avg.pow = squeeze(mean(temp,1)); % and replace power with the grand average power condition-contrast Now using ft_sourceplot on customavg works just fine. Any idea of what's going wrong with ft_sourceplot on ft_sourcegrandaverage? Thanks! - Joram -- Joram van Driel, MSc. PhD student @ University of Amsterdam Brain & Cognition @ Department of Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From Patricia.Wollstadt at gmx.de Fri Jan 31 20:05:09 2014 From: Patricia.Wollstadt at gmx.de (Patricia Wollstadt) Date: Fri, 31 Jan 2014 20:05:09 +0100 Subject: [FieldTrip] Any insight about Transfer Entropy? In-Reply-To: References: Message-ID: <52EBF3E5.8080804@gmx.de> Hello, I tried to answer your questions regarding the TRENTOOL parameters below. We will soon provide a user manual for the current TRENTOOL version on the website (www.trentool.de), which should also help with some of the questions raised in your email. cfgTEP.toi = [min(data.time{1,1}) max(data.time{1,1})] --> Basically from trial start to trial end. PW: This is correct, you should use as much data as possible. cfgTEP.predicttimemin_u= 10; cfgTEP.predicttimemax_u= 240; --> I am not sure where and how these min and max were used in TEragwitz calculation in TEprepare.m. VW_ds fixed 1 as a prediction horizon. I'm not sure if it's good to predict just next time sample point for SSVEP + noisy data? PW: TRENTOOL allows you to reconstruct the delays of an interaction (see Wibral, 2013, /Measuring Information Transfer Delays/). Interaction delays are reconstructed by scanning over a range of assumed interaction delays u, specified by the parameters 'predicttimemin_u', 'predicttimemax_u', and 'predicttimestepsize'. TRENTOOL will actually run the TE estimation for each assumed u, i.e. TE will be estimated between all pairs of channels for each prediction time u. The Ragwitz criterion will be used for each estimation to determine the respective embedding parameters. In a second step, TRENTOOL will reconstruct the interaction delay by finding the value for u for which TE becomes maximal. Note, that you also have to provide the step size in 'cfgTEP.predicttimestepsize'. TRENTOOL will build a vector [cfgTEP.predicttimemin_u:cfgTEP.predicttimestepsize:cfgTEP.predicttimemax_u] to estimate TE for each u. You have specified a rather broad range of interaction delays to be scanned here. This will result in a very long running time. Maybe you could reconsider the values for u that you want to scan (i.e. use assumed interaction delays that are biologically plausible)? cfgTEP.actthrvalue = 100; --> I don't know the reason why this autocorrelation time value needs to be set by hand cause I thought embedding delay time gets automatically decided by autocorrelation. Is there a special logic behind setting this by hand? For particular two channels, their ACT values were 54 sample points, etc. Max ACT was 134 or something. Is this due to noise? If I have strong oscillatory activities, am I not supposed to see ACT values close to oscillatory period? PW: This is only a threshold value. If the actual ACT is higher for individual trials, these trials will be excluded from the analysis. The value you put here should be based on the filtering of the data prior to TE analysis. E.g. if you highpass filter your data at 10 Hz and have a sampling rate of 1200Hz, you shouldn't find any autocorrelation above 120 samples. Thus, you may use 120 as a threshold here. cfgTEP.maxlag = 1000; --> 1000 is default. What will be a good lag number to see autocorrelation? Should I use a half of total sample points of data (2880/2 = 1440)? PW: Half the number of sample points is fine. cfgTEP.minnrtrials = 7; --> Does this mean if trial selection rule by ACT value rejects more than 13 trials out of total 20 trials, program won't run? What is a good number for this when I have 20 trials? PW: This is correct, if you end up with less than the number of trials specified here, the analysis will not run. Because of the permutation statistics used later, this value should be set to at least 12. For main parameters for TEragwitz, cfgTEP.optimizemethod ='ragwitz'; cfgTEP.ragdim = 1:10; --> I just chose all possible embedding dimension from 1 to 10. Should I try to put more than 10? But TE analysis always says, embedding dimension maybe 2, which sounds about right for pure sine waves like SSVEPs. But with 0.1Hz~500hz bandpass, I have tons of non-stimulus locked low and high noisy activities. But when I chose Cao's method, it says, 5 or 6. PW: 1:10 is alright here. Ragwitz is the recommended method for parameter estimation. cfgTEP.ragtaurange = [0.1 2]; --> For delay time, I chose this range. But Ragwitz always chose the smallest value. If I put this range from [1 2], then it chooses 1. If it was [0.5 3], it chose 0.5. So I'd really like to know what kind of values I should put here. PW: The values you provided here are ok ('ragtaurange' determines the embedding delay). The values, that are returned by Ragwitz' optimization (tau = 0.1, dim = 2), indicate that there are a lot of fast dynamics in your data. This may indicate a lot of high frequency noise. Consider filtering (forward only!) in the range were you expect neural activity (e.g. 0.5 to 300 Hz or similar). cfgTEP.ragtausteps = 15; % steps for ragwitz tau steps 15 cfgTEP.repPred = 600; --> I just chose this. I could vary this. Depending on what I put here, final significance of TE changes too. PW: This parameter determines how many data points are used for optimization of the embedding parameters by the Ragwitz criterion. Here, TRENTOOL will use the first 600 points in each trial to optimize embedding parameters. This number should be as high as possible (depending on the values you chose for cfgTEP.actthrvalue, fgTEP.ragdim, cfgTEP.ragtaurange). cfgTEP.flagNei = 'Mass' ; %neigbour analyse type cfgTEP.sizeNei = 4; --> Ideally I guess I might have to vary size of neighborhood in phase space PW: 4 is fine here (default). For Surrogate analysis, cfgTESS.optdimusage = 'indivdim'; cfgTGAA.select_opt_u = 'product_evidence'; % 'max_TEdiff'; --> I just chose 'product_evidence' because help file of InteractionDelayReconstruction_analyze.m says 'max_TEdiff' could be problematic in certain case. Which one is normal to use? PW: We recommend the use of 'max_TEdiff' . We will change the help text in a future release. cfgTGAA.select_opt_u_pos = 'shortest'; --> Also for this, I don't know which one is normal to use. PW: 'shortest' is fine here. I hope this helps, best regards Patricia Am 30/01/2014 19:38, schrieb woun zoo: > How are you? > > I'd like to get some insight from you for transfer entropy analysis of > my ECoG data before I run all possible parameters. I know this message > doesn't exactly fit in fieldtrip email list cause question is not > exactly about fieldtrip. But there are a few connectivity methods in > fieldtrip. So I'd like to get my questions to reach some of experts in > this causality analysis field. Besides, I don't know if there is > nonlinear time series analysis discussion list out there or not. > > I'd like to establish some connectivity (functional or effective) > between frontal and visual channels in ECoG recording. However, in > our data, there is a very strong driven component, namely, steady > state visually evoked potentials. SSVEPs in our data appear at > several frequencies that are harmonics of the input frequencies and > their sum and difference frequencies So our data has a completely > deterministic (SSVEPs) dynamics and the rest of background activities. > > Data has 20 trials in total. Each trial lasts 2.4sec. Sampling rate is > 1200hz. Raw data were bandpass filtered from 0.1Hz to 500hz. > > In order to find an effective connectivity, I chose to use TRENTOOL > box that can be incorporated with fieldtrip. I chose Ragwitz method to > determine delay time and embedding dimension. This is where I'd like > to get some good insight for choosing parameters. I attached a script > that I'm using now. I wrote my questions in blue text down below. I > really wish to get some good insight from you because I don't know if > my input parameters are garbage or not. > > cfgTEP.toi = [min(data.time{1,1}) max(data.time{1,1})] --> Basically > from trial start to trial end. > > cfgTEP.predicttimemin_u= 10; > cfgTEP.predicttimemax_u= 240; --> For these prediction horizon values, > I don't know where and how these min and max were used in TEragwitz.m > calculation in TEprepare.m. Transfer Entropy calculation method > (VW_ds) fixed 1 as a prediction horizon. I can't find where this min > or max of predicttime goes inside TEragwitz calculation. VW_ds seems > to try to predict one time sample point ahead from the current time > sample point. Is this proper to determine embedding dimension and > delay time for SSVEP + background activities? > > cfgTEP.actthrvalue = 100; --> I don't know the reason why this > autocorrelation time value needs to be set by hand. I know with this > threshold value, you can selectively choose trials. In my data, > particular channels' autocorrelation values were 54 (sample points), > etc. Max autocorrelation was 134 or something. Is this due to noise? > If I have strong oscillatory activities at the driving frequencies, am > I not supposed to see autocorrelation values close to oscillatory period? > > cfgTEP.maxlag = 1000; --> What will be a good lag number? Isn't > it better to use whole trial length? > > cfgTEP.minnrtrials = 7; --> What is a good number for this when there > are 20 trials? > > For main parameters for TEragwitz, > > cfgTEP.optimizemethod ='ragwitz'; > cfgTEP.ragdim = 1:10; --> I just chose all possible embedding > dimension from 1 to 10. Should I try go more than 10? But TE analysis > always says, embedding dimension maybe 2, which sounds about right for > pure sine waves like my SSVEP. But with 0.1Hz~500hz bandpass, I have > tons of non-stimulus locked high background activities. I'd like to > know if 2 is really good estimation or not for my data. Also when I > chose Cao's method, it says, 5 or 6. > > cfgTEP.ragtaurange = [0.1 2]; --> For delay time as an initial > guess, I chose this range. But Ragwitz always chose the smallest > value. If I put this range from [1 2], then it chooses 1. If it was > [0.5 3], it chose 0.5. Whatever minimum value I put will be chosen as > its delay time, which makes me wonder about what kind of values I > should put here. > > cfgTEP.ragtausteps = 15; % steps for ragwitz tau steps 15 > > cfgTEP.repPred = 600; --> I just chose this. Depending on what > I put here, final significance of TE changes too. > > cfgTEP.flagNei = 'Mass' ; %neigbour analyse type > > cfgTEP.sizeNei = 4; --> It follows the results of Kraskov (2004) > paper. I think this range is between [embedding dimension 2*embedding > dimension]. But should I vary this too? For example, should I try 15, > 30, 50 etc? > > > For Surrogate analysisin the below, I don't know which options are > common to use for non-parametric statistical analysis. > > cfgTESS.optdimusage = 'indivdim'; > cfgTGAA.select_opt_u = 'product_evidence'; % 'max_TEdiff'; > cfgTGAA.select_opt_u_pos = 'shortest'; > > I'm sorry if these questions are not exactly relevant to fieldtrip > community. If there is nonlinear time series analysis community, I'd > like to post this message over there. But I really appreciate if you > could give me some good insight about playing with parameters for ECoG > steady-state visual evoked potential data. > > Thank you very much. > Have a nice day. > > > _______________________________________________ > 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 v.piai.research at gmail.com Wed Jan 1 18:32:41 2014 From: v.piai.research at gmail.com (Vitoria Piai) Date: Wed, 01 Jan 2014 18:32:41 +0100 Subject: [FieldTrip] source-level phase coherence (following beamforming extended tutorial) Message-ID: <52C45139.7040806@gmail.com> Dear FT-ers, Sticking to the Dutch tradition, my best wishes for 2014, first of all! I'm trying to compute phase coherence between two sources of activity that I previously localised with DICS (one anterior and one posterior source, see figure if needed). It was suggested to me I'd use the approach explained in the beamforming extended tutorial, in particular "Localization of cortical sources that are coherent with the EMG". If I follow that approach (copied here below) cfg = []; cfg.method = 'dics'; cfg.refchan = 'EMGlft'; cfg.frequency = 20; cfg.vol = hdm; cfg.grid = sourcemodel; source_coh_lft = ft_sourceanalysis(cfg, freq_csd); I get stuck at the definition of cfg.refchan because I already know my sources of interest, so there's no "sensor" I can use for this. So I'm wondering whether there is another way to define the refchan or whether this specific approach is not the most appropriate. Intuitively, I myself had first chosen the approach discussed in the tutorial connectivity extended, in particular "Source-level cortico-cortical connectivity in MEG data". When then computing the LCMV, I had the positions in grid.pos for the maximum activity both for the anterior and the posterior activity taken from the data shown in the figure. Would this be the most appropriate/best way of getting the phase coherence between these two sources? Or is there another method I should use? Any thoughts or suggestions are most welcome! Thanks a lot, Vitória -------------- next part -------------- A non-text attachment was scrubbed... Name: example.png Type: image/png Size: 139285 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Wed Jan 1 21:19:52 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 1 Jan 2014 21:19:52 +0100 Subject: [FieldTrip] source-level phase coherence (following beamforming extended tutorial) In-Reply-To: <52C45139.7040806@gmail.com> References: <52C45139.7040806@gmail.com> Message-ID: <72A80E1C-8D85-41B3-B5A1-D9EC0B73DEDD@donders.ru.nl> Hi Vitoria, > Intuitively, I myself had first chosen the approach discussed in the tutorial connectivity extended, in particular "Source-level cortico-cortical connectivity in MEG data". When then computing the LCMV, I had the positions in grid.pos for the maximum activity both for the anterior and the posterior activity taken from the data shown in the figure. Would this be the most appropriate/best way of getting the phase coherence between these two sources? Yes, this would be one way of doing it. Note that by just focussing on two dipolar sources, and not accounting for the spatial structure in the coherence, you may run the risk in over-interpreting any difference across conditions (in particular in the presence of differences in source power). More about this can be found in the paper Joachim and I published in HBM, in 2009. Best wishes, Jan-Mathijs > > Any thoughts or suggestions are most welcome! > Thanks a lot, Vitória > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From i.e.j.de.vries at student.vu.nl Thu Jan 2 02:23:04 2014 From: i.e.j.de.vries at student.vu.nl (Vries, I.E.J. de) Date: Thu, 2 Jan 2014 01:23:04 +0000 Subject: [FieldTrip] Units in 'vertical' multiplot Message-ID: <19DD7427D34B7E47B33093FB4C3CFDD201094E8CEF@PEXMB001B.vu.local> Hi all, I'm using multiplot with the 'vertical' layout, i.e. channels are plotted as singleplot subplots. I'm doing this for the raw time series and for the power spectra. But I cannot find how to put units in the subplot, so I can actually see what the power is at which frequency. Also in the normal time series the units are not visible. Even if I use multiplot with a layout of the EEG cap the units on the graphs are not visible. Anyone an idea how to make the units visible? thanks and a happy new year! Ingmar -------------- next part -------------- An HTML attachment was scrubbed... URL: From mje.mads at gmail.com Fri Jan 3 11:44:58 2014 From: mje.mads at gmail.com (Mads Jensen) Date: Fri, 03 Jan 2014 11:44:58 +0100 Subject: [FieldTrip] cannot combine planar grads with ft_combineplaner Message-ID: <52C694AA.3000903@gmail.com> Hi all, I have a problem with ft_combineplanar. It does not seem to combine the planar gradiometors when called. I have tried with timelocked data and epoched data, both are the same. However, grandaveraged data (ft_timelockgrandaverage) create a structure with combined data. Does anybody have an idea what the problem might be or how I can find the problem? I have Neuromag Triux data and is using the most recent Fieldtrip from the git-repo. best wish, mads From gianpaolo.demarchi at unitn.it Fri Jan 3 15:09:00 2014 From: gianpaolo.demarchi at unitn.it (Demarchi, Gianpaolo) Date: Fri, 3 Jan 2014 15:09:00 +0100 Subject: [FieldTrip] cannot combine planar grads with ft_combineplaner In-Reply-To: <52C694AA.3000903@gmail.com> References: <52C694AA.3000903@gmail.com> Message-ID: Hi Mads, you’re not alone! In fact I was going to open a bug on that these days, since I’m getting similar (non) results. With a previous ft version (6499, so more than one year old), everything seems to work fine, i.e. I get (for a Vectorview 306 channel input) as a ft_combineplanar output: avgdatacmbOLD = time: [1x1537 double] label: {204x1 cell} grad: [1x1 struct] cfg: [1x1 struct] fsample: 256 sampleinfo: [1 1537] avg: [204x1537 double] dimord: 'chan_time' so, correctly combined, whereas if I do the same with a recent (svn-ed) version, with the same input, I get: avgdatacmb = time: [1x1537 double] label: {306x1 cell} grad: [1x1 struct] cfg: [1x1 struct] fsample: 256 sampleinfo: [1 1537] avg: [306x1537 double] dimord: ‘chan_time' so I get back my original, non combined, 306 channels … I tried to track the problem before opening a bug, and it seems that the problem lays in my input data label, which is: >> avgdata.label ans = 'MEG0113' 'MEG0112' 'MEG0111' etc … The problem seems to be around lines 102-ff of ft_combineplanar, since ft_senstype(data) on my data wrongly returns ‘neuromag306’ ( that are in principle ‘MEG 0113’ etc ...) instead of ‘neuromag306alt’ ( ‘MEG0113’ without spaces), and then in the following two lines sel_dH/sel_dV are empty, since there’s never a match between my data label (‘MEG0113’ …) and the output of ft_senstype/ft_senslabel (‘MEG 0113’ … with spaces). So, there’s something wrong in the ft_senstype step, but I didn’t have time to fully track it … @roboos: am I missing something obvious, or should I file a bug!? My two €-cents, Gianpaolo Il giorno 03/gen/2014, alle ore 11:44, Mads Jensen > ha scritto: Hi all, I have a problem with ft_combineplanar. It does not seem to combine the planar gradiometors when called. I have tried with timelocked data and epoched data, both are the same. However, grandaveraged data (ft_timelockgrandaverage) create a structure with combined data. Does anybody have an idea what the problem might be or how I can find the problem? I have Neuromag Triux data and is using the most recent Fieldtrip from the git-repo. best wish, mads _______________________________________________ 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 victorias at dsv.su.se Fri Jan 3 16:38:32 2014 From: victorias at dsv.su.se (=?UTF-8?Q?Victoria_Schr=C3=B6der?=) Date: Fri, 03 Jan 2014 16:38:32 +0100 Subject: [FieldTrip] connectivity analysis with rereferenced EEG data Message-ID: <79fcd6c08e426c01441ce7c5453efc6a@dsv.su.se> Hello I am trying to do a connectivity analysis with Fieldtrip. I recorded the EEG data with a BioSemi system without choosing a reference channel. Thus i need to select a reference in Fieldtrip. I did that during ft_preprocessing(cfg) by using the following code: cfg.reref='yes'; cfg.refchannel='all'; Data=ft_preprocessing(cfg); however when i later want to do the ft_mvaranalysis(cfg, Data) i get the following error: Matrix must be positive definite I read that this error probably occurs because the cfg.reref procedure changes the ranks of the data matrix.However, i need to rereference my data. Do somebody know a solution? All the best and thank you in advance Victoria From ingenieureniso at gmail.com Fri Jan 3 20:45:35 2014 From: ingenieureniso at gmail.com (ingenieur eniso) Date: Fri, 3 Jan 2014 20:45:35 +0100 Subject: [FieldTrip] Empirical Bayesian for the EEG Inverse Problem Message-ID: Dear all, I am using the interpolation methods to 3D EEG mapping, and now I want to apply the bayesian approach for the EEG Inverse Problem but I am blocked to calculate the posterior probability. Please can anyone help me ? I hope you will send me positive and helpful response. Thanks a lot in advance! Best, ahmed -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Jan 6 09:21:12 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 06 Jan 2014 09:21:12 +0100 Subject: [FieldTrip] connectivity analysis with rereferenced EEG data In-Reply-To: <79fcd6c08e426c01441ce7c5453efc6a@dsv.su.se> References: <79fcd6c08e426c01441ce7c5453efc6a@dsv.su.se> Message-ID: <52CA6778.1040902@donders.ru.nl> Hi Victoria, exactly, since the rank of your matrix is reduced, you need to remove one channel from your data before computing the connectivity. I am not sure whether it is best to compute EEG-connectivity with average-referenced data or with a single channel reference. In case of a single-channel reference, you can of course remove the reference channel, so that'd be the easiest in that sense. Maybe check http://www.ncbi.nlm.nih.gov/pubmed/10619414 and related papers and decide for yourself how to reference ;) Best, Jörn On 1/3/2014 4:38 PM, Victoria Schröder wrote: > Hello > > I am trying to do a connectivity analysis with Fieldtrip. I recorded > the EEG data with a BioSemi system without choosing a reference channel. > Thus i need to select a reference in Fieldtrip. I did that during > ft_preprocessing(cfg) by using the following code: > cfg.reref='yes'; > cfg.refchannel='all'; > Data=ft_preprocessing(cfg); > > however when i later want to do the ft_mvaranalysis(cfg, Data) i get > the following error: > Matrix must be positive definite > > I read that this error probably occurs because the cfg.reref procedure > changes the ranks of the data matrix.However, i need to rereference my > data. > > Do somebody know a solution? > > All the best and thank you in advance > Victoria > _______________________________________________ > 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 victorias at dsv.su.se Mon Jan 6 14:18:19 2014 From: victorias at dsv.su.se (=?UTF-8?Q?Victoria_Schr=C3=B6der?=) Date: Mon, 06 Jan 2014 14:18:19 +0100 Subject: [FieldTrip] connectivity analysis with rereferenced EEG data In-Reply-To: <52CA6778.1040902@donders.ru.nl> References: <79fcd6c08e426c01441ce7c5453efc6a@dsv.su.se> <52CA6778.1040902@donders.ru.nl> Message-ID: <2d24d3dbe9d30f92b991b39ba51b4a1f@dsv.su.se> Thank you very much Jörn! Have a nice day Best Victoria 2014-01-06 09:21 skrev Jörn M. Horschig: > Hi Victoria, > > exactly, since the rank of your matrix is reduced, you need to remove > one channel from your data before computing the connectivity. I am > not > sure whether it is best to compute EEG-connectivity with > average-referenced data or with a single channel reference. In case > of > a single-channel reference, you can of course remove the reference > channel, so that'd be the easiest in that sense. Maybe check > http://www.ncbi.nlm.nih.gov/pubmed/10619414 and related papers and > decide for yourself how to reference ;) > > Best, > Jörn > > > On 1/3/2014 4:38 PM, Victoria Schröder wrote: >> Hello >> >> I am trying to do a connectivity analysis with Fieldtrip. I recorded >> the EEG data with a BioSemi system without choosing a reference >> channel. >> Thus i need to select a reference in Fieldtrip. I did that during >> ft_preprocessing(cfg) by using the following code: >> cfg.reref='yes'; >> cfg.refchannel='all'; >> Data=ft_preprocessing(cfg); >> >> however when i later want to do the ft_mvaranalysis(cfg, Data) i get >> the following error: >> Matrix must be positive definite >> >> I read that this error probably occurs because the cfg.reref >> procedure changes the ranks of the data matrix.However, i need to >> rereference my data. >> >> Do somebody know a solution? >> >> All the best and thank you in advance >> Victoria >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Mon Jan 6 15:22:54 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 06 Jan 2014 15:22:54 +0100 Subject: [FieldTrip] Job vacancy in Kleve, Germany Message-ID: <52CABC3E.2020101@donders.ru.nl> Forwarded message: Please find enclosed a job vacancy at the Rhine-Waal University of Applied Sciences in Germany for a Research Assistant (Wissenschaftliche/r Mitarbeiter/in für digitale Signaverarbeitung und Datenfusion mit Schwerpunkt in dem Bereich BCI) in German Language. -- 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 -------------- A non-text attachment was scrubbed... Name: Ausschreibung_13_F1_13.pdf Type: application/pdf Size: 47747 bytes Desc: not available URL: From mje.mads at gmail.com Mon Jan 6 21:26:56 2014 From: mje.mads at gmail.com (Mads Jensen) Date: Mon, 06 Jan 2014 21:26:56 +0100 Subject: [FieldTrip] cannot combine planar grads with ft_combineplaner In-Reply-To: References: <52C694AA.3000903@gmail.com> Message-ID: <52CB1190.4030002@gmail.com> Hi Gianpaolo, Thanks, that is good to know and much appreciated your two €-cents. best, mads On 01/03/2014 03:09 PM, Demarchi, Gianpaolo wrote: > Hi Mads, > you’re not alone! > In fact I was going to open a bug on that these days, since I’m getting > similar (non) results. > > With a previous ft version (6499, so more than one year old), everything > seems to work fine, i.e. I get (for a Vectorview 306 channel input) > as a ft_combineplanar output: > > avgdatacmbOLD = > > time: [1x1537 double] > label: {204x1 cell} > grad: [1x1 struct] > cfg: [1x1 struct] > fsample: 256 > sampleinfo: [1 1537] > avg: [204x1537 double] > dimord: 'chan_time' > > so, correctly combined, whereas if I do the same with a recent (svn-ed) > version, with the same input, I get: > > avgdatacmb = > > time: [1x1537 double] > label: {306x1 cell} > grad: [1x1 struct] > cfg: [1x1 struct] > fsample: 256 > sampleinfo: [1 1537] > avg: [306x1537 double] > dimord: ‘chan_time' > > so I get back my original, non combined, 306 channels … > > I tried to track the problem before opening a bug, and it seems that the > problem lays in my input data label, which is: > > >> avgdata.label > > ans = > > 'MEG0113' > 'MEG0112' > 'MEG0111' > > etc … > > The problem seems to be around lines 102-ff of ft_combineplanar, > since ft_senstype(data) on my data wrongly returns ‘neuromag306’ ( that > are in principle ‘MEG 0113’ etc ...) instead of ‘neuromag306alt’ ( > ‘MEG0113’ without spaces), and then in the following two lines > sel_dH/sel_dV are empty, since there’s never a match between my data > label (‘MEG0113’ …) and the output of ft_senstype/ft_senslabel (‘MEG > 0113’ … with spaces). > So, there’s something wrong in the ft_senstype step, but I didn’t have > time to fully track it … > @roboos: am I missing something obvious, or should I file a bug!? > > My two €-cents, > Gianpaolo > > > Il giorno 03/gen/2014, alle ore 11:44, Mads Jensen > ha scritto: > >> Hi all, >> >> I have a problem with ft_combineplanar. It does not seem to combine the >> planar gradiometors when called. >> >> I have tried with timelocked data and epoched data, both are the same. >> However, grandaveraged data (ft_timelockgrandaverage) create a structure >> with combined data. Does anybody have an idea what the problem might be >> or how I can find the problem? >> >> I have Neuromag Triux data and is using the most recent Fieldtrip from >> the git-repo. >> >> best wish, >> mads >> _______________________________________________ >> 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 bertram0611 at pku.edu.cn Tue Jan 7 09:42:02 2014 From: bertram0611 at pku.edu.cn (=?utf-8?B?6JSh5p6X?=) Date: Tue, 7 Jan 2014 16:42:02 +0800 (CST) Subject: [FieldTrip] =?gbk?q?How_to_plot_ERP_waveforms?= Message-ID: <836381241.21725.1389084122918.JavaMail.root@bj-mail07.pku.edu.cn> Dear fieldtripers, I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: %%preprocessing 40 subjects nsubjects = [1:40]; for i=1:length (nsubjects) j = nsubjects(i); cfg = []; cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); cfg.trialdef.eventtype = 'trial'; cfg.trialdef.eventvalue = [14]; %markers cfg = ft_definetrial(cfg); cfg.channel = {'all'}; data_14 = ft_preprocessing(cfg); cfg.trialdef.eventvalue = [24]; %markers cfg = ft_definetrial(cfg); cfg.channel = {'all'}; data_24 = ft_preprocessing(cfg); cfg.trialdef.eventvalue = [34]; %markers cfg = ft_definetrial(cfg); cfg.channel = {'all'}; data_34 = ft_preprocessing(cfg); cfg.trialdef.eventvalue = [44]; %markers cfg = ft_definetrial(cfg); cfg.channel = {'all'}; data_44 = ft_preprocessing(cfg); outfil = strcat('/EEG/data_s', sprintf('%02d', j)); save(outfil, 'data_14','data_24','data_34','data_44'); clear data_14* data_24* data_34* data_44*; end %% calculate the ERP of each subject nsubject = [1:40]; for i=1:length (nsubject) j=nsubject(1,i); load (sprintf('/EEG/data_s%02d',j)); cfg = []; cfg.latency = [-0.2 1.0]; cfg.covariance = 'no'; cfg.blcovariance = 'no'; avg_14=ft_timelockanalysis(cfg,data_14); avg_24=ft_timelockanalysis(cfg,data_24); avg_34=ft_timelockanalysis(cfg,data_34); avg_44=ft_timelockanalysis(cfg,data_44); cfg = []; cfg.baseline = [-0.2 0]; cfg.baselinetype = 'absolute'; base_14= ft_timelockbaseline(cfg, avg_14); base_24= ft_timelockbaseline(cfg, avg_24); base_34= ft_timelockbaseline(cfg, avg_34); base_44= ft_timelockbaseline(cfg, avg_44); outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); clear avg* data*; end %% calculate the grand average of the 40 subjects %%grand average cfg = []; nsubject = [1:40]; for i=1:length (nsubject) j=nsubject(1,i); load(sprintf('/EEG/baseERP_resp_s%02d',j)); sub_14(i).ERP= avg_14; sub_24(i).ERP= avg_24; sub_34(i).ERP= avg_34; sub_44(i).ERP= avg_44; clear avg* end grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double outfil = strcat('/EEG/n40_grandavgERP_resp'); save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); %%plotting load /EEG/n40_grandavgERP_resp; cfg = []; cfg.layout = 'EEG1010.lay'; cfg.xlim = [-0.2 1.0]; cfg.baseline = 'no'; cfg.interactive = 'no'; cfg.showlabels = 'yes'; cfg.colorbar = 'yes'; figure; ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); -- Lin Cai Department of Psychology, Peking University, Beijing 100871, P.R.China -------------- next part -------------- A non-text attachment was scrubbed... Name: 搜狗截图14年01月07日1641_1.png Type: image/png Size: 25160 bytes Desc: not available URL: From eelke.spaak at donders.ru.nl Tue Jan 7 09:47:42 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 7 Jan 2014 09:47:42 +0100 Subject: [FieldTrip] How to plot ERP waveforms In-Reply-To: <836381241.21725.1389084122918.JavaMail.root@bj-mail07.pku.edu.cn> References: <836381241.21725.1389084122918.JavaMail.root@bj-mail07.pku.edu.cn> Message-ID: Dear Lin Cai, Could it be that the range of values is very different across the four input arguments? You could check the max(tl.avg(:)) and min(tl.avg(:)) of each of the four structures to verify this. While you're at it, I would also check for NaNs. Best, Eelke On 7 January 2014 09:42, 蔡林 wrote: > Dear fieldtripers, > > I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: > > > %%preprocessing 40 subjects > nsubjects = [1:40]; > for i=1:length (nsubjects) > j = nsubjects(i); > cfg = []; > cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); > cfg.trialdef.eventtype = 'trial'; > cfg.trialdef.eventvalue = [14]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_14 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [24]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_24 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [34]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_34 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [44]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_44 = ft_preprocessing(cfg); > > outfil = strcat('/EEG/data_s', sprintf('%02d', j)); > save(outfil, 'data_14','data_24','data_34','data_44'); > clear data_14* data_24* data_34* data_44*; > end > %% calculate the ERP of each subject > nsubject = [1:40]; > > for i=1:length (nsubject) > j=nsubject(1,i); > load (sprintf('/EEG/data_s%02d',j)); > > cfg = []; > cfg.latency = [-0.2 1.0]; > cfg.covariance = 'no'; > cfg.blcovariance = 'no'; > > avg_14=ft_timelockanalysis(cfg,data_14); > avg_24=ft_timelockanalysis(cfg,data_24); > avg_34=ft_timelockanalysis(cfg,data_34); > avg_44=ft_timelockanalysis(cfg,data_44); > > cfg = []; > cfg.baseline = [-0.2 0]; > cfg.baselinetype = 'absolute'; > base_14= ft_timelockbaseline(cfg, avg_14); > base_24= ft_timelockbaseline(cfg, avg_24); > base_34= ft_timelockbaseline(cfg, avg_34); > base_44= ft_timelockbaseline(cfg, avg_44); > > outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); > save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); > clear avg* data*; > end > %% calculate the grand average of the 40 subjects > %%grand average > cfg = []; > nsubject = [1:40]; > > for i=1:length (nsubject) > j=nsubject(1,i); > load(sprintf('/EEG/baseERP_resp_s%02d',j)); > > sub_14(i).ERP= avg_14; > sub_24(i).ERP= avg_24; > sub_34(i).ERP= avg_34; > sub_44(i).ERP= avg_44; > clear avg* > end > > grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C > grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer > grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic > grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double > > outfil = strcat('/EEG/n40_grandavgERP_resp'); > save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); > %%plotting > load /EEG/n40_grandavgERP_resp; > > cfg = []; > cfg.layout = 'EEG1010.lay'; > cfg.xlim = [-0.2 1.0]; > > cfg.baseline = 'no'; > cfg.interactive = 'no'; > cfg.showlabels = 'yes'; > cfg.colorbar = 'yes'; > > figure; > ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); > > > -- > Lin Cai > Department of Psychology, Peking University, Beijing 100871, P.R.China > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Tue Jan 7 10:02:46 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Tue, 07 Jan 2014 10:02:46 +0100 Subject: [FieldTrip] How to plot ERP waveforms In-Reply-To: <836381241.21725.1389084122918.JavaMail.root@bj-mail07.pku.edu.cn> References: <836381241.21725.1389084122918.JavaMail.root@bj-mail07.pku.edu.cn> Message-ID: <52CBC2B6.30300@donders.ru.nl> Hi, tricky problem, and a very nasty one, but it's a simple one in the end ;) Once you call ft_definetrial you get back a cfg with a .trl matrix. Upon the next call to ft_definetrial, FieldTrip checks for the presence of cfg.trl, and if so returns immediately (because ft_definetrial has been called before). Thus, in the beginning when you compute data_14, data_24, etc, they will all be based on the same trl. Therefore, the same data will be computed and all four plots will overlap. You need to change the name of the output argument for each ft_definetrial call to be unique to resolve this, something like: cfg_14 = ft_definetrial(cfg); cfg_14.channel = {'all'}; data_14 = ft_preprocessing(cfg_14); cfg.trialdef.eventvalue = [24]; %markers cfg_24 = ft_definetrial(cfg); cfg_24.channel = {'all'}; data_24 = ft_preprocessing(cfg_24); Best, Jörn On 1/7/2014 9:42 AM, 蔡林 wrote: > Dear fieldtripers, > > I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: > > > %%preprocessing 40 subjects > nsubjects = [1:40]; > for i=1:length (nsubjects) > j = nsubjects(i); > cfg = []; > cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); > cfg.trialdef.eventtype = 'trial'; > cfg.trialdef.eventvalue = [14]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_14 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [24]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_24 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [34]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_34 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [44]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_44 = ft_preprocessing(cfg); > > outfil = strcat('/EEG/data_s', sprintf('%02d', j)); > save(outfil, 'data_14','data_24','data_34','data_44'); > clear data_14* data_24* data_34* data_44*; > end > %% calculate the ERP of each subject > nsubject = [1:40]; > > for i=1:length (nsubject) > j=nsubject(1,i); > load (sprintf('/EEG/data_s%02d',j)); > > cfg = []; > cfg.latency = [-0.2 1.0]; > cfg.covariance = 'no'; > cfg.blcovariance = 'no'; > > avg_14=ft_timelockanalysis(cfg,data_14); > avg_24=ft_timelockanalysis(cfg,data_24); > avg_34=ft_timelockanalysis(cfg,data_34); > avg_44=ft_timelockanalysis(cfg,data_44); > > cfg = []; > cfg.baseline = [-0.2 0]; > cfg.baselinetype = 'absolute'; > base_14= ft_timelockbaseline(cfg, avg_14); > base_24= ft_timelockbaseline(cfg, avg_24); > base_34= ft_timelockbaseline(cfg, avg_34); > base_44= ft_timelockbaseline(cfg, avg_44); > > outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); > save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); > clear avg* data*; > end > %% calculate the grand average of the 40 subjects > %%grand average > cfg = []; > nsubject = [1:40]; > > for i=1:length (nsubject) > j=nsubject(1,i); > load(sprintf('/EEG/baseERP_resp_s%02d',j)); > > sub_14(i).ERP= avg_14; > sub_24(i).ERP= avg_24; > sub_34(i).ERP= avg_34; > sub_44(i).ERP= avg_44; > clear avg* > end > > grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C > grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer > grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic > grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double > > outfil = strcat('/EEG/n40_grandavgERP_resp'); > save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); > %%plotting > load /EEG/n40_grandavgERP_resp; > > cfg = []; > cfg.layout = 'EEG1010.lay'; > cfg.xlim = [-0.2 1.0]; > > cfg.baseline = 'no'; > cfg.interactive = 'no'; > cfg.showlabels = 'yes'; > cfg.colorbar = 'yes'; > > figure; > ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); > > > > > _______________________________________________ > 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 bertram0611 at pku.edu.cn Tue Jan 7 11:50:44 2014 From: bertram0611 at pku.edu.cn (=?utf-8?B?6JSh5p6X?=) Date: Tue, 7 Jan 2014 18:50:44 +0800 (CST) Subject: [FieldTrip] =?utf-8?b?5Zue5aSN77yaIFJlOiAgSG93IHRvIHBsb3QgRVJQ?= =?utf-8?q?_waveforms?= In-Reply-To: <52CBC2B6.30300@donders.ru.nl> Message-ID: <290894445.22433.1389091844555.JavaMail.root@bj-mail07.pku.edu.cn> Hi, I can run my codes according to what you told me. And I saw four conditions in a figure. Thanks for your help. But there are still something wrong with my codes. Because I saw warnings in the Command Window in Matlab. As follows: Warning: the trial definition in the configuration is inconsistent with the actual data > In utilities\private\warning_once at 158 In utilities\private\fixsampleinfo at 68 In ft_datatype_raw at 154 In ft_checkdata at 298 In ft_preprocessing at 240 In outputplot at 5 Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording > In utilities\private\warning_once at 158 In utilities\private\fixsampleinfo at 79 In ft_datatype_raw at 154 In ft_checkdata at 298 In ft_preprocessing at 240 In outputplot at 5 preprocessing preprocessing trial 1 from 1 the call to "ft_preprocessing" took 0 seconds ******** Why the data were preprocessed from trial 1 to 1???? Am I right in the whole codes? Thank you in advance. Lin Cai ----- 原始邮件 ----- 发件人: Jörn M. Horschig 收件人: FieldTrip discussion list 已发送邮件: Tue, 07 Jan 2014 17:02:46 +0800 (CST) 主题: Re: [FieldTrip] How to plot ERP waveforms Hi, tricky problem, and a very nasty one, but it's a simple one in the end ;) Once you call ft_definetrial you get back a cfg with a .trl matrix. Upon the next call to ft_definetrial, FieldTrip checks for the presence of cfg.trl, and if so returns immediately (because ft_definetrial has been called before). Thus, in the beginning when you compute data_14, data_24, etc, they will all be based on the same trl. Therefore, the same data will be computed and all four plots will overlap. You need to change the name of the output argument for each ft_definetrial call to be unique to resolve this, something like: cfg_14 = ft_definetrial(cfg); cfg_14.channel = {'all'}; data_14 = ft_preprocessing(cfg_14); cfg.trialdef.eventvalue = [24]; %markers cfg_24 = ft_definetrial(cfg); cfg_24.channel = {'all'}; data_24 = ft_preprocessing(cfg_24); Best, Jörn On 1/7/2014 9:42 AM, 蔡林 wrote: > Dear fieldtripers, > > I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: > > > %%preprocessing 40 subjects > nsubjects = [1:40]; > for i=1:length (nsubjects) > j = nsubjects(i); > cfg = []; > cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); > cfg.trialdef.eventtype = 'trial'; > cfg.trialdef.eventvalue = [14]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_14 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [24]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_24 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [34]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_34 = ft_preprocessing(cfg); > > cfg.trialdef.eventvalue = [44]; %markers > cfg = ft_definetrial(cfg); > cfg.channel = {'all'}; > data_44 = ft_preprocessing(cfg); > > outfil = strcat('/EEG/data_s', sprintf('%02d', j)); > save(outfil, 'data_14','data_24','data_34','data_44'); > clear data_14* data_24* data_34* data_44*; > end > %% calculate the ERP of each subject > nsubject = [1:40]; > > for i=1:length (nsubject) > j=nsubject(1,i); > load (sprintf('/EEG/data_s%02d',j)); > > cfg = []; > cfg.latency = [-0.2 1.0]; > cfg.covariance = 'no'; > cfg.blcovariance = 'no'; > > avg_14=ft_timelockanalysis(cfg,data_14); > avg_24=ft_timelockanalysis(cfg,data_24); > avg_34=ft_timelockanalysis(cfg,data_34); > avg_44=ft_timelockanalysis(cfg,data_44); > > cfg = []; > cfg.baseline = [-0.2 0]; > cfg.baselinetype = 'absolute'; > base_14= ft_timelockbaseline(cfg, avg_14); > base_24= ft_timelockbaseline(cfg, avg_24); > base_34= ft_timelockbaseline(cfg, avg_34); > base_44= ft_timelockbaseline(cfg, avg_44); > > outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); > save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); > clear avg* data*; > end > %% calculate the grand average of the 40 subjects > %%grand average > cfg = []; > nsubject = [1:40]; > > for i=1:length (nsubject) > j=nsubject(1,i); > load(sprintf('/EEG/baseERP_resp_s%02d',j)); > > sub_14(i).ERP= avg_14; > sub_24(i).ERP= avg_24; > sub_34(i).ERP= avg_34; > sub_44(i).ERP= avg_44; > clear avg* > end > > grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C > grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer > grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic > grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double > > outfil = strcat('/EEG/n40_grandavgERP_resp'); > save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); > %%plotting > load /EEG/n40_grandavgERP_resp; > > cfg = []; > cfg.layout = 'EEG1010.lay'; > cfg.xlim = [-0.2 1.0]; > > cfg.baseline = 'no'; > cfg.interactive = 'no'; > cfg.showlabels = 'yes'; > cfg.colorbar = 'yes'; > > figure; > ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); > > > > > _______________________________________________ > 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 -- Lin Cai Department of Psychology, Peking University, Beijing 100871, P.R.China From jm.horschig at donders.ru.nl Tue Jan 7 12:12:31 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Tue, 07 Jan 2014 12:12:31 +0100 Subject: [FieldTrip] =?utf-8?b?5Zue5aSN77yaIFJlOiAgSG93IHRvIHBsb3QgRVJQ?= =?utf-8?q?_waveforms?= In-Reply-To: <290894445.22433.1389091844555.JavaMail.root@bj-mail07.pku.edu.cn> References: <290894445.22433.1389091844555.JavaMail.root@bj-mail07.pku.edu.cn> Message-ID: <52CBE11F.3030005@donders.ru.nl> Hi Lin Cai, check whether your trl-matrix (matrices) makes sense. The error means that e.g. according to the sampleinfo there should be a different number of trials than your data contains or stuff the like. So, just at it says, some inconsistency between the sampleinfo field (which is part of the trl-matrix) and your data. Best, Jörn On 1/7/2014 11:50 AM, 蔡林 wrote: > Hi, > > I can run my codes according to what you told me. And I saw four conditions in a figure. Thanks for your help. > > But there are still something wrong with my codes. Because I saw warnings in the Command Window in Matlab. > > As follows: > > Warning: the trial definition in the configuration is inconsistent with the actual data >> In utilities\private\warning_once at 158 > In utilities\private\fixsampleinfo at 68 > In ft_datatype_raw at 154 > In ft_checkdata at 298 > In ft_preprocessing at 240 > In outputplot at 5 > Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a > continuous recording >> In utilities\private\warning_once at 158 > In utilities\private\fixsampleinfo at 79 > In ft_datatype_raw at 154 > In ft_checkdata at 298 > In ft_preprocessing at 240 > In outputplot at 5 > preprocessing > preprocessing trial 1 from 1 > > the call to "ft_preprocessing" took 0 seconds > > ******** > Why the data were preprocessed from trial 1 to 1???? > Am I right in the whole codes? > > Thank you in advance. > > Lin Cai > > ----- 原始邮件 ----- > 发件人: Jörn M. Horschig > 收件人: FieldTrip discussion list > 已发送邮件: Tue, 07 Jan 2014 17:02:46 +0800 (CST) > 主题: Re: [FieldTrip] How to plot ERP waveforms > > Hi, > > tricky problem, and a very nasty one, but it's a simple one in the end ;) > > Once you call ft_definetrial you get back a cfg with a .trl matrix. Upon > the next call to ft_definetrial, FieldTrip checks for the presence of > cfg.trl, and if so returns immediately (because ft_definetrial has been > called before). Thus, in the beginning when you compute data_14, > data_24, etc, they will all be based on the same trl. Therefore, the > same data will be computed and all four plots will overlap. > You need to change the name of the output argument for each > ft_definetrial call to be unique to resolve this, something like: > > > cfg_14 = ft_definetrial(cfg); > cfg_14.channel = {'all'}; > data_14 = ft_preprocessing(cfg_14); > > cfg.trialdef.eventvalue = [24]; %markers > cfg_24 = ft_definetrial(cfg); > cfg_24.channel = {'all'}; > data_24 = ft_preprocessing(cfg_24); > > > > Best, > Jörn > > On 1/7/2014 9:42 AM, 蔡林 wrote: >> Dear fieldtripers, >> >> I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: >> >> >> %%preprocessing 40 subjects >> nsubjects = [1:40]; >> for i=1:length (nsubjects) >> j = nsubjects(i); >> cfg = []; >> cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); >> cfg.trialdef.eventtype = 'trial'; >> cfg.trialdef.eventvalue = [14]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_14 = ft_preprocessing(cfg); >> >> cfg.trialdef.eventvalue = [24]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_24 = ft_preprocessing(cfg); >> >> cfg.trialdef.eventvalue = [34]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_34 = ft_preprocessing(cfg); >> >> cfg.trialdef.eventvalue = [44]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_44 = ft_preprocessing(cfg); >> >> outfil = strcat('/EEG/data_s', sprintf('%02d', j)); >> save(outfil, 'data_14','data_24','data_34','data_44'); >> clear data_14* data_24* data_34* data_44*; >> end >> %% calculate the ERP of each subject >> nsubject = [1:40]; >> >> for i=1:length (nsubject) >> j=nsubject(1,i); >> load (sprintf('/EEG/data_s%02d',j)); >> >> cfg = []; >> cfg.latency = [-0.2 1.0]; >> cfg.covariance = 'no'; >> cfg.blcovariance = 'no'; >> >> avg_14=ft_timelockanalysis(cfg,data_14); >> avg_24=ft_timelockanalysis(cfg,data_24); >> avg_34=ft_timelockanalysis(cfg,data_34); >> avg_44=ft_timelockanalysis(cfg,data_44); >> >> cfg = []; >> cfg.baseline = [-0.2 0]; >> cfg.baselinetype = 'absolute'; >> base_14= ft_timelockbaseline(cfg, avg_14); >> base_24= ft_timelockbaseline(cfg, avg_24); >> base_34= ft_timelockbaseline(cfg, avg_34); >> base_44= ft_timelockbaseline(cfg, avg_44); >> >> outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); >> save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); >> clear avg* data*; >> end >> %% calculate the grand average of the 40 subjects >> %%grand average >> cfg = []; >> nsubject = [1:40]; >> >> for i=1:length (nsubject) >> j=nsubject(1,i); >> load(sprintf('/EEG/baseERP_resp_s%02d',j)); >> >> sub_14(i).ERP= avg_14; >> sub_24(i).ERP= avg_24; >> sub_34(i).ERP= avg_34; >> sub_44(i).ERP= avg_44; >> clear avg* >> end >> >> grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C >> grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer >> grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic >> grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double >> >> outfil = strcat('/EEG/n40_grandavgERP_resp'); >> save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); >> %%plotting >> load /EEG/n40_grandavgERP_resp; >> >> cfg = []; >> cfg.layout = 'EEG1010.lay'; >> cfg.xlim = [-0.2 1.0]; >> >> cfg.baseline = 'no'; >> cfg.interactive = 'no'; >> cfg.showlabels = 'yes'; >> cfg.colorbar = 'yes'; >> >> figure; >> ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); >> >> >> >> >> _______________________________________________ >> 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 nheugel89 at gmail.com Tue Jan 7 19:12:50 2014 From: nheugel89 at gmail.com (Nicholas Heugel) Date: Tue, 7 Jan 2014 12:12:50 -0600 Subject: [FieldTrip] Error after MNE In-Reply-To: References: <17F395A3-5627-4410-9030-97FF73B52C9B@donders.ru.nl> Message-ID: Do you know if there is any update on the bug I encountered? Does it look like an issue with setting up the analysis or is it an actual bug in the code? Thanks for your assistance. Nicholas On Wed, Dec 11, 2013 at 7:42 PM, Nicholas Heugel wrote: > I did as you asked. I put it in the core category with the error as the > title > > > On Wed, Dec 11, 2013 at 2:04 AM, jan-mathijs schoffelen < > jan.schoffelen at donders.ru.nl> wrote: > >> Hi Nicholas, >> >> It seems that the fif files lacks some information that FieldTrip assumes >> to be present. I would say that this can only be caused by the fact that >> the version of mne_make_source_space you used does not write the triangle >> area information into the fif file. Could you go to bugzilla.fcdonders.nl, >> create yourself an account, and file the issue as a bug? Please then also >> upload the fif-file you mentioned. I'll have a look at it and make the >> ft_read_headshape function more robust. In the mean time you could comment >> out line 421. >> >> Best, >> Jan-Mathijs >> >> >> >> On Dec 10, 2013, at 6:23 PM, Nicholas Heugel wrote: >> >> I a trying to go through the tutorial for the >> >> - Source reconstruction of event-related fields using minimum-norm >> estimate >> >> I am able to run everything up to the MNE with no problem, and it >> seems like the MNE portion works. But when I run the command bnd = >> ft_read_headshape('Subject01-oct-6-src.fif', 'format', 'mne_source'); >> and then plot it to visualize the source space. I get the error Reference >> to non-existent field 'use_tri_area'. Error in ft_read_headshape (line 421) >> shape.area = [src(1).use_tri_area(:); src(2).use_tri_area(:)]; >> I have looked on this site and online and can't find an explanation >> of what is wrong or how to fix the problem. Any help would be appreciated. >> I am using an Anatomical MRI scan for the head model analysis, the skull >> is present and I manually am Identifying the fiducials. Also, a few >> steps earlier it had me check the white matter segmentation done by >> Freesurfer and that worked fine and what I get closely resembles the >> tutorial. So I think the problem is somewhere in the MNE I am just not >> sure where. Any help would be appreciated. Thank you for your time. >> >> Nicholas >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 7 19:28:40 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 7 Jan 2014 19:28:40 +0100 Subject: [FieldTrip] Error after MNE In-Reply-To: References: <17F395A3-5627-4410-9030-97FF73B52C9B@donders.ru.nl> Message-ID: <0E646317-B08F-4C53-8D47-9D06A08BD5F0@donders.ru.nl> I don't know: did you follow up on bugzilla bug 2419? As mentioned in my earlier mail, for the time being you can work around it by commenting out line 421 in your local version of ft_read_headshape. Jan-Mathijs On Jan 7, 2014, at 7:12 PM, Nicholas Heugel wrote: > Do you know if there is any update on the bug I encountered? Does it look like an issue with setting up the analysis or is it an actual bug in the code? Thanks for your assistance. > > Nicholas > > > On Wed, Dec 11, 2013 at 7:42 PM, Nicholas Heugel wrote: > I did as you asked. I put it in the core category with the error as the title > > > On Wed, Dec 11, 2013 at 2:04 AM, jan-mathijs schoffelen wrote: > Hi Nicholas, > > It seems that the fif files lacks some information that FieldTrip assumes to be present. I would say that this can only be caused by the fact that the version of mne_make_source_space you used does not write the triangle area information into the fif file. Could you go to bugzilla.fcdonders.nl, create yourself an account, and file the issue as a bug? Please then also upload the fif-file you mentioned. I'll have a look at it and make the ft_read_headshape function more robust. In the mean time you could comment out line 421. > > Best, > Jan-Mathijs > > > > On Dec 10, 2013, at 6:23 PM, Nicholas Heugel wrote: > >> I a trying to go through the tutorial for the >> Source reconstruction of event-related fields using minimum-norm estimate >> >> I am able to run everything up to the MNE with no problem, and it seems like the MNE portion works. But when I run the command bnd = ft_read_headshape('Subject01-oct-6-src.fif', 'format', 'mne_source'); >> and then plot it to visualize the source space. I get the error Reference to non-existent field 'use_tri_area'. Error in ft_read_headshape (line 421) shape.area = [src(1).use_tri_area(:); src(2).use_tri_area(:)]; >> I have looked on this site and online and can't find an explanation of what is wrong or how to fix the problem. Any help would be appreciated. I am using an Anatomical MRI scan for the head model analysis, the skull is present and I manually am Identifying the fiducials. Also, a few steps earlier it had me check the white matter segmentation done by Freesurfer and that worked fine and what I get closely resembles the tutorial. So I think the problem is somewhere in the MNE I am just not sure where. Any help would be appreciated. Thank you for your time. >> Nicholas >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From nheugel89 at gmail.com Tue Jan 7 19:31:50 2014 From: nheugel89 at gmail.com (Nicholas Heugel) Date: Tue, 7 Jan 2014 12:31:50 -0600 Subject: [FieldTrip] Error after MNE In-Reply-To: <0E646317-B08F-4C53-8D47-9D06A08BD5F0@donders.ru.nl> References: <17F395A3-5627-4410-9030-97FF73B52C9B@donders.ru.nl> <0E646317-B08F-4C53-8D47-9D06A08BD5F0@donders.ru.nl> Message-ID: Ya I had posted it on bugzilla and I think you had accepted the bug, I was just wondering if you had made any progress on it or determined a cause. Nicholas On Tue, Jan 7, 2014 at 12:28 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > I don't know: did you follow up on bugzilla bug 2419? As mentioned in my > earlier mail, for the time being you can work around it by commenting out > line 421 in your local version of ft_read_headshape. > > Jan-Mathijs > > > > > On Jan 7, 2014, at 7:12 PM, Nicholas Heugel wrote: > > Do you know if there is any update on the bug I encountered? Does it look > like an issue with setting up the analysis or is it an actual bug in the > code? Thanks for your assistance. > > Nicholas > > > On Wed, Dec 11, 2013 at 7:42 PM, Nicholas Heugel wrote: > >> I did as you asked. I put it in the core category with the error as the >> title >> >> >> On Wed, Dec 11, 2013 at 2:04 AM, jan-mathijs schoffelen < >> jan.schoffelen at donders.ru.nl> wrote: >> >>> Hi Nicholas, >>> >>> It seems that the fif files lacks some information that FieldTrip >>> assumes to be present. I would say that this can only be caused by the fact >>> that the version of mne_make_source_space you used does not write the >>> triangle area information into the fif file. Could you go to >>> bugzilla.fcdonders.nl, create yourself an account, and file the issue >>> as a bug? Please then also upload the fif-file you mentioned. I'll have a >>> look at it and make the ft_read_headshape function more robust. In the mean >>> time you could comment out line 421. >>> >>> Best, >>> Jan-Mathijs >>> >>> >>> >>> On Dec 10, 2013, at 6:23 PM, Nicholas Heugel wrote: >>> >>> I a trying to go through the tutorial for the >>> >>> - Source reconstruction of event-related fields using minimum-norm >>> estimate >>> >>> I am able to run everything up to the MNE with no problem, and it >>> seems like the MNE portion works. But when I run the command bnd = >>> ft_read_headshape('Subject01-oct-6-src.fif', 'format', 'mne_source'); >>> and then plot it to visualize the source space. I get the error Reference >>> to non-existent field 'use_tri_area'. Error in ft_read_headshape (line 421) >>> shape.area = [src(1).use_tri_area(:); src(2).use_tri_area(:)]; >>> I have looked on this site and online and can't find an explanation >>> of what is wrong or how to fix the problem. Any help would be appreciated. >>> I am using an Anatomical MRI scan for the head model analysis, the skull >>> is present and I manually am Identifying the fiducials. Also, a few >>> steps earlier it had me check the white matter segmentation done by >>> Freesurfer and that worked fine and what I get closely resembles the >>> tutorial. So I think the problem is somewhere in the MNE I am just not >>> sure where. Any help would be appreciated. Thank you for your time. >>> >>> Nicholas >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> Jan-Mathijs Schoffelen, MD PhD >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University Nijmegen, The Netherlands >>> >>> Max Planck Institute for Psycholinguistics, >>> Nijmegen, The Netherlands >>> >>> J.Schoffelen at donders.ru.nl >>> Telephone: +31-24-3614793 >>> >>> http://www.hettaligebrein.nl >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bertram0611 at pku.edu.cn Wed Jan 8 12:46:22 2014 From: bertram0611 at pku.edu.cn (=?utf-8?B?6JSh5p6X?=) Date: Wed, 8 Jan 2014 19:46:22 +0800 (CST) Subject: [FieldTrip] =?utf-8?b?5Zue5aSN77yaIFJlOiAg5Zue5aSN77yaIFJlOiAg?= =?utf-8?q?How_to_plot_ERP_waveforms?= In-Reply-To: <52CBE11F.3030005@donders.ru.nl> Message-ID: <956707425.31180.1389181582986.JavaMail.root@bj-mail07.pku.edu.cn> I can not understand what you mean. Please give me some detail infomation about how to solve this problem. ----- 原始邮件 ----- 发件人: Jörn M. Horschig 收件人: FieldTrip discussion list 已发送邮件: Tue, 07 Jan 2014 19:12:31 +0800 (CST) 主题: Re: [FieldTrip] 回复: Re: How to plot ERP waveforms Hi Lin Cai, check whether your trl-matrix (matrices) makes sense. The error means that e.g. according to the sampleinfo there should be a different number of trials than your data contains or stuff the like. So, just at it says, some inconsistency between the sampleinfo field (which is part of the trl-matrix) and your data. Best, Jörn On 1/7/2014 11:50 AM, 蔡林 wrote: > Hi, > > I can run my codes according to what you told me. And I saw four conditions in a figure. Thanks for your help. > > But there are still something wrong with my codes. Because I saw warnings in the Command Window in Matlab. > > As follows: > > Warning: the trial definition in the configuration is inconsistent with the actual data >> In utilities\private\warning_once at 158 > In utilities\private\fixsampleinfo at 68 > In ft_datatype_raw at 154 > In ft_checkdata at 298 > In ft_preprocessing at 240 > In outputplot at 5 > Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a > continuous recording >> In utilities\private\warning_once at 158 > In utilities\private\fixsampleinfo at 79 > In ft_datatype_raw at 154 > In ft_checkdata at 298 > In ft_preprocessing at 240 > In outputplot at 5 > preprocessing > preprocessing trial 1 from 1 > > the call to "ft_preprocessing" took 0 seconds > > ******** > Why the data were preprocessed from trial 1 to 1???? > Am I right in the whole codes? > > Thank you in advance. > > Lin Cai > > ----- 原始邮件 ----- > 发件人: Jörn M. Horschig > 收件人: FieldTrip discussion list > 已发送邮件: Tue, 07 Jan 2014 17:02:46 +0800 (CST) > 主题: Re: [FieldTrip] How to plot ERP waveforms > > Hi, > > tricky problem, and a very nasty one, but it's a simple one in the end ;) > > Once you call ft_definetrial you get back a cfg with a .trl matrix. Upon > the next call to ft_definetrial, FieldTrip checks for the presence of > cfg.trl, and if so returns immediately (because ft_definetrial has been > called before). Thus, in the beginning when you compute data_14, > data_24, etc, they will all be based on the same trl. Therefore, the > same data will be computed and all four plots will overlap. > You need to change the name of the output argument for each > ft_definetrial call to be unique to resolve this, something like: > > > cfg_14 = ft_definetrial(cfg); > cfg_14.channel = {'all'}; > data_14 = ft_preprocessing(cfg_14); > > cfg.trialdef.eventvalue = [24]; %markers > cfg_24 = ft_definetrial(cfg); > cfg_24.channel = {'all'}; > data_24 = ft_preprocessing(cfg_24); > > > > Best, > Jörn > > On 1/7/2014 9:42 AM, 蔡林 wrote: >> Dear fieldtripers, >> >> I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: >> >> >> %%preprocessing 40 subjects >> nsubjects = [1:40]; >> for i=1:length (nsubjects) >> j = nsubjects(i); >> cfg = []; >> cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); >> cfg.trialdef.eventtype = 'trial'; >> cfg.trialdef.eventvalue = [14]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_14 = ft_preprocessing(cfg); >> >> cfg.trialdef.eventvalue = [24]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_24 = ft_preprocessing(cfg); >> >> cfg.trialdef.eventvalue = [34]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_34 = ft_preprocessing(cfg); >> >> cfg.trialdef.eventvalue = [44]; %markers >> cfg = ft_definetrial(cfg); >> cfg.channel = {'all'}; >> data_44 = ft_preprocessing(cfg); >> >> outfil = strcat('/EEG/data_s', sprintf('%02d', j)); >> save(outfil, 'data_14','data_24','data_34','data_44'); >> clear data_14* data_24* data_34* data_44*; >> end >> %% calculate the ERP of each subject >> nsubject = [1:40]; >> >> for i=1:length (nsubject) >> j=nsubject(1,i); >> load (sprintf('/EEG/data_s%02d',j)); >> >> cfg = []; >> cfg.latency = [-0.2 1.0]; >> cfg.covariance = 'no'; >> cfg.blcovariance = 'no'; >> >> avg_14=ft_timelockanalysis(cfg,data_14); >> avg_24=ft_timelockanalysis(cfg,data_24); >> avg_34=ft_timelockanalysis(cfg,data_34); >> avg_44=ft_timelockanalysis(cfg,data_44); >> >> cfg = []; >> cfg.baseline = [-0.2 0]; >> cfg.baselinetype = 'absolute'; >> base_14= ft_timelockbaseline(cfg, avg_14); >> base_24= ft_timelockbaseline(cfg, avg_24); >> base_34= ft_timelockbaseline(cfg, avg_34); >> base_44= ft_timelockbaseline(cfg, avg_44); >> >> outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); >> save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); >> clear avg* data*; >> end >> %% calculate the grand average of the 40 subjects >> %%grand average >> cfg = []; >> nsubject = [1:40]; >> >> for i=1:length (nsubject) >> j=nsubject(1,i); >> load(sprintf('/EEG/baseERP_resp_s%02d',j)); >> >> sub_14(i).ERP= avg_14; >> sub_24(i).ERP= avg_24; >> sub_34(i).ERP= avg_34; >> sub_44(i).ERP= avg_44; >> clear avg* >> end >> >> grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C >> grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer >> grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic >> grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double >> >> outfil = strcat('/EEG/n40_grandavgERP_resp'); >> save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); >> %%plotting >> load /EEG/n40_grandavgERP_resp; >> >> cfg = []; >> cfg.layout = 'EEG1010.lay'; >> cfg.xlim = [-0.2 1.0]; >> >> cfg.baseline = 'no'; >> cfg.interactive = 'no'; >> cfg.showlabels = 'yes'; >> cfg.colorbar = 'yes'; >> >> figure; >> ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); >> >> >> >> >> _______________________________________________ >> 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 -- Lin Cai Department of Psychology, Peking University, Beijing 100871, P.R.China From jm.horschig at donders.ru.nl Wed Jan 8 12:52:38 2014 From: jm.horschig at donders.ru.nl (=?UTF-8?B?IkrDtnJuIE0uIEhvcnNjaGlnIg==?=) Date: Wed, 08 Jan 2014 12:52:38 +0100 Subject: [FieldTrip] =?utf-8?b?5Zue5aSN77yaIFJlOiAg5Zue5aSN77yaIFJlOiAg?= =?utf-8?q?How_to_plot_ERP_waveforms?= In-Reply-To: <956707425.31180.1389181582986.JavaMail.root@bj-mail07.pku.edu.cn> References: <956707425.31180.1389181582986.JavaMail.root@bj-mail07.pku.edu.cn> Message-ID: <52CD3C06.5080002@donders.ru.nl> Hi Lin Cai, you have to solve it yourself by checking your data and cfg. I cannot help with that. Best, Jörn On 1/8/2014 12:46 PM, 蔡林 wrote: > I can not understand what you mean. Please give me some detail infomation about how to solve this problem. > ----- 原始邮件 ----- > 发件人: Jörn M. Horschig > 收件人: FieldTrip discussion list > 已发送邮件: Tue, 07 Jan 2014 19:12:31 +0800 (CST) > 主题: Re: [FieldTrip] 回复: Re: How to plot ERP waveforms > > Hi Lin Cai, > > check whether your trl-matrix (matrices) makes sense. The error means > that e.g. according to the sampleinfo there should be a different number > of trials than your data contains or stuff the like. So, just at it > says, some inconsistency between the sampleinfo field (which is part of > the trl-matrix) and your data. > > Best, > Jörn > > On 1/7/2014 11:50 AM, 蔡林 wrote: >> Hi, >> >> I can run my codes according to what you told me. And I saw four conditions in a figure. Thanks for your help. >> >> But there are still something wrong with my codes. Because I saw warnings in the Command Window in Matlab. >> >> As follows: >> >> Warning: the trial definition in the configuration is inconsistent with the actual data >>> In utilities\private\warning_once at 158 >> In utilities\private\fixsampleinfo at 68 >> In ft_datatype_raw at 154 >> In ft_checkdata at 298 >> In ft_preprocessing at 240 >> In outputplot at 5 >> Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a >> continuous recording >>> In utilities\private\warning_once at 158 >> In utilities\private\fixsampleinfo at 79 >> In ft_datatype_raw at 154 >> In ft_checkdata at 298 >> In ft_preprocessing at 240 >> In outputplot at 5 >> preprocessing >> preprocessing trial 1 from 1 >> >> the call to "ft_preprocessing" took 0 seconds >> >> ******** >> Why the data were preprocessed from trial 1 to 1???? >> Am I right in the whole codes? >> >> Thank you in advance. >> >> Lin Cai >> >> ----- 原始邮件 ----- >> 发件人: Jörn M. Horschig >> 收件人: FieldTrip discussion list >> 已发送邮件: Tue, 07 Jan 2014 17:02:46 +0800 (CST) >> 主题: Re: [FieldTrip] How to plot ERP waveforms >> >> Hi, >> >> tricky problem, and a very nasty one, but it's a simple one in the end ;) >> >> Once you call ft_definetrial you get back a cfg with a .trl matrix. Upon >> the next call to ft_definetrial, FieldTrip checks for the presence of >> cfg.trl, and if so returns immediately (because ft_definetrial has been >> called before). Thus, in the beginning when you compute data_14, >> data_24, etc, they will all be based on the same trl. Therefore, the >> same data will be computed and all four plots will overlap. >> You need to change the name of the output argument for each >> ft_definetrial call to be unique to resolve this, something like: >> >> >> cfg_14 = ft_definetrial(cfg); >> cfg_14.channel = {'all'}; >> data_14 = ft_preprocessing(cfg_14); >> >> cfg.trialdef.eventvalue = [24]; %markers >> cfg_24 = ft_definetrial(cfg); >> cfg_24.channel = {'all'}; >> data_24 = ft_preprocessing(cfg_24); >> >> >> >> Best, >> Jörn >> >> On 1/7/2014 9:42 AM, 蔡林 wrote: >>> Dear fieldtripers, >>> >>> I am coming across a problem about plotting.I have four conditions in my experiment, but why did the figure have only one conditon? Please help me if you find something wrong with my codes. My codes are as follows: >>> >>> >>> %%preprocessing 40 subjects >>> nsubjects = [1:40]; >>> for i=1:length (nsubjects) >>> j = nsubjects(i); >>> cfg = []; >>> cfg.dataset = sprintf('s%d-epoch-bsline.eeg', j); >>> cfg.trialdef.eventtype = 'trial'; >>> cfg.trialdef.eventvalue = [14]; %markers >>> cfg = ft_definetrial(cfg); >>> cfg.channel = {'all'}; >>> data_14 = ft_preprocessing(cfg); >>> >>> cfg.trialdef.eventvalue = [24]; %markers >>> cfg = ft_definetrial(cfg); >>> cfg.channel = {'all'}; >>> data_24 = ft_preprocessing(cfg); >>> >>> cfg.trialdef.eventvalue = [34]; %markers >>> cfg = ft_definetrial(cfg); >>> cfg.channel = {'all'}; >>> data_34 = ft_preprocessing(cfg); >>> >>> cfg.trialdef.eventvalue = [44]; %markers >>> cfg = ft_definetrial(cfg); >>> cfg.channel = {'all'}; >>> data_44 = ft_preprocessing(cfg); >>> >>> outfil = strcat('/EEG/data_s', sprintf('%02d', j)); >>> save(outfil, 'data_14','data_24','data_34','data_44'); >>> clear data_14* data_24* data_34* data_44*; >>> end >>> %% calculate the ERP of each subject >>> nsubject = [1:40]; >>> >>> for i=1:length (nsubject) >>> j=nsubject(1,i); >>> load (sprintf('/EEG/data_s%02d',j)); >>> >>> cfg = []; >>> cfg.latency = [-0.2 1.0]; >>> cfg.covariance = 'no'; >>> cfg.blcovariance = 'no'; >>> >>> avg_14=ft_timelockanalysis(cfg,data_14); >>> avg_24=ft_timelockanalysis(cfg,data_24); >>> avg_34=ft_timelockanalysis(cfg,data_34); >>> avg_44=ft_timelockanalysis(cfg,data_44); >>> >>> cfg = []; >>> cfg.baseline = [-0.2 0]; >>> cfg.baselinetype = 'absolute'; >>> base_14= ft_timelockbaseline(cfg, avg_14); >>> base_24= ft_timelockbaseline(cfg, avg_24); >>> base_34= ft_timelockbaseline(cfg, avg_34); >>> base_44= ft_timelockbaseline(cfg, avg_44); >>> >>> outfil = strcat('/EEG/baseERP_resp_s', sprintf('%02d', j)); >>> save(outfil, 'base_14', 'base_24', 'base_34', 'base_44','avg_14', 'avg_24', 'avg_34','avg_44'); >>> clear avg* data*; >>> end >>> %% calculate the grand average of the 40 subjects >>> %%grand average >>> cfg = []; >>> nsubject = [1:40]; >>> >>> for i=1:length (nsubject) >>> j=nsubject(1,i); >>> load(sprintf('/EEG/baseERP_resp_s%02d',j)); >>> >>> sub_14(i).ERP= avg_14; >>> sub_24(i).ERP= avg_24; >>> sub_34(i).ERP= avg_34; >>> sub_44(i).ERP= avg_44; >>> clear avg* >>> end >>> >>> grandavg_14 = ft_timelockgrandaverage(cfg, sub_14(:).ERP); %C >>> grandavg_24 = ft_timelockgrandaverage(cfg, sub_24(:).ERP); %Refer >>> grandavg_34 = ft_timelockgrandaverage(cfg, sub_34(:).ERP); %Semantic >>> grandavg_44 = ft_timelockgrandaverage(cfg, sub_44(:).ERP); %Double >>> >>> outfil = strcat('/EEG/n40_grandavgERP_resp'); >>> save(outfil, 'grandavg_14', 'grandavg_24', 'grandavg_34', 'grandavg_44'); >>> %%plotting >>> load /EEG/n40_grandavgERP_resp; >>> >>> cfg = []; >>> cfg.layout = 'EEG1010.lay'; >>> cfg.xlim = [-0.2 1.0]; >>> >>> cfg.baseline = 'no'; >>> cfg.interactive = 'no'; >>> cfg.showlabels = 'yes'; >>> cfg.colorbar = 'yes'; >>> >>> figure; >>> ft_multiplotER(cfg,grandavg_14, grandavg_24, grandavg_34, grandavg_44); >>> >>> >>> >>> >>> _______________________________________________ >>> 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 j.herring at fcdonders.ru.nl Wed Jan 8 15:20:57 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 8 Jan 2014 15:20:57 +0100 (CET) Subject: [FieldTrip] PhD position Ghent University, Belgium Message-ID: <00aa01cf0c7c$d9c35950$8d4a0bf0$@herring@fcdonders.ru.nl> PhD position at the Dept of Experimental Psychology, Ghent University, Belgium We are seeking a highly motivated PhD student for a 4-year position at the Dept. of Experimental Psychology under the supervision of Ruth Krebs and Nico Boehler. One central focus of our labs is the investigation of the interaction between reward processing and cognitive control (see http://users.ugent.be/~rkrebs/index_files/publications.html for related publications). Our department hosts several research groups in the realm of cognitive psychology and cognitive neuroscience, creating a dynamic research environment including regular internal talk series as well as presentations by invited speakers. We have access to state-of-the-art equipment including a research-dedicated 3-tesla MR scanner (Siemens), a 64/128-channel EEG system (Biosemi), as well as an MR-compatible EEG system and TMS. Candidates are expected to have a Master's degree in psychology, (cognitive) neuroscience, or a closely related discipline on the starting date. He or she will mostly carry out behavioral and fMRI experiments, but extensions to EEG (including MR-compatible EEG) are possible. Experience with neuroimaging methods as well as programming skills would be highly appreciated. The starting date is flexible, but preferably in spring 2014. 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 contact information (email) of potential referees to ruth.krebs at ugent.be before February 1st 2014. Ruth Krebs Dept. of Experimental Psychology, Ghent University Henri Dunantlaan 2 9000 Ghent Belgium -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Thu Jan 9 18:56:40 2014 From: luke.bloy at gmail.com (Luke Bloy) Date: Thu, 9 Jan 2014 12:56:40 -0500 Subject: [FieldTrip] Units of ft_dipolefitting Message-ID: Hi, I'd like to check the units returned for the moment returned by the ft_dipolefitting routine. There doesn't seem to be any unit fields in the returned structure. Additionally, ft_compute_leadfield.m doesn't say much about the units. From looking at it I assume the length unit (m/cm/mm) is inherited from the vol and sens objects but I'm not sure about the other units. Thanks. Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Jan 10 07:56:52 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 10 Jan 2014 07:56:52 +0100 Subject: [FieldTrip] PhD positions in Freiburg, Germany Message-ID: <52CF99B4.4080102@donders.ru.nl> Forwarded message: University of Freiburg, Germany, has acquired a large research cluster "BrainLinks-BrainTools" within the German Excellence Initiative. Aiming to develop medical technology which directly interacts with the nervous system, it unites the life sciences, engineering, and clinical applications. Within the cluster, PhD positions (100% TV-L E13) are open at the novel lab of Michael Tangermann, addressing research topics in the context of Brain-Computer Interfaces (BCI) and stroke rehabilitation: 1. Development of theories (statistics, mathematics) and algorithms in the field of machine learning for BCI applications, with special emphasis on adaptive and invariant methods for the decoding of mental states and brain networks in real-time. 2. Paradigm development, software implementation, execution and analysis of EEG experiments with (German speaking) patients and healthy users. Requirements: * excellent MSc / Diploma degree * a major in e.g. machine learning / artificial intelligence, cognitive science, neuroscience, mathematics, computer science / informatics, physics * a strong interest in the combination of theoretical and experimental research in a highly interdisciplinary field. Starting date: asap. For further information please read the full PhD call available at: > Contact: Dr. Michael Tangermann, michael.tangermann at blbt.uni-freiburg.de > -- 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 fgrande at cbs.mpg.de Fri Jan 10 15:54:56 2014 From: fgrande at cbs.mpg.de (Federico Grande) Date: Fri, 10 Jan 2014 15:54:56 +0100 (CET) Subject: [FieldTrip] SVD and ICA Message-ID: <50243943.4859.1389365696412.JavaMail.root@zimbra> Hello everyone, In order to remove the artefacts like blink eyes or hearbeat, I wanted to apply ICA to my data. I've been told that is better to apply first SVD and then ICA, but I don't really know how to apply it. What do you recommend me in order to do it? I've not found any tutorial for doing it. All help and information ins greatly welcomed. Thank you very much, King Regards, Federico Grande From d.lozanosoldevilla at fcdonders.ru.nl Fri Jan 10 16:13:13 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Fri, 10 Jan 2014 16:13:13 +0100 (CET) Subject: [FieldTrip] SVD and ICA In-Reply-To: <50243943.4859.1389365696412.JavaMail.root@zimbra> Message-ID: <1280547173.4657638.1389366793780.JavaMail.root@sculptor.zimbra.ru.nl> Hi Federico, You might want to have a look to the different ICA algorithms ft_componentanalysis has and see how to choose the proper option. For example, if you select cfg.method='runica' then cfg.runica.pca = number of components you want to reduce your data. Check help ft_componentanalysis for details best, Diego ----- Original Message ----- > From: "Federico Grande" > To: fieldtrip at science.ru.nl > Sent: Friday, 10 January, 2014 3:54:56 PM > Subject: [FieldTrip] SVD and ICA > Hello everyone, > > In order to remove the artefacts like blink eyes or hearbeat, I wanted > to apply ICA to my data. I've been told that is better to apply first > SVD and then ICA, but I don't really know how to apply it. What do you > recommend me in order to do it? I've not found any tutorial for doing > it. All help and information ins greatly welcomed. > > Thank you very much, > > King Regards, > > Federico Grande > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ From fgrande at cbs.mpg.de Fri Jan 10 18:14:28 2014 From: fgrande at cbs.mpg.de (Federico Grande) Date: Fri, 10 Jan 2014 18:14:28 +0100 (CET) Subject: [FieldTrip] SVD and ICA In-Reply-To: <1280547173.4657638.1389366793780.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <1427843396.5968.1389374068812.JavaMail.root@zimbra> Aham, that is what I've done, do the runica method, but I didn´t use the parameter pca: pca are not principal component analysis associated to SSP? I have used SSS (signal space separation) instead of SSP. It would work also? And also I don´t know what number of components do I want to reduce my data. How can I know which is the optimal number? Thank you Diego, Federico ----- Original Message ----- From: "Lozano Soldevilla, D. (Diego)" To: "FieldTrip discussion list" Sent: Friday, January 10, 2014 4:13:13 PM Subject: Re: [FieldTrip] SVD and ICA Hi Federico, You might want to have a look to the different ICA algorithms ft_componentanalysis has and see how to choose the proper option. For example, if you select cfg.method='runica' then cfg.runica.pca = number of components you want to reduce your data. Check help ft_componentanalysis for details best, Diego ----- Original Message ----- > From: "Federico Grande" > To: fieldtrip at science.ru.nl > Sent: Friday, 10 January, 2014 3:54:56 PM > Subject: [FieldTrip] SVD and ICA > Hello everyone, > > In order to remove the artefacts like blink eyes or hearbeat, I wanted > to apply ICA to my data. I've been told that is better to apply first > SVD and then ICA, but I don't really know how to apply it. What do you > recommend me in order to do it? I've not found any tutorial for doing > it. All help and information ins greatly welcomed. > > Thank you very much, > > King Regards, > > Federico Grande > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From aestnth at hum.au.dk Fri Jan 10 18:18:03 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Fri, 10 Jan 2014 18:18:03 +0100 Subject: [FieldTrip] SVD and ICA Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Fri Jan 10 18:27:17 2014 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Fri, 10 Jan 2014 18:27:17 +0100 (CET) Subject: [FieldTrip] SVD and ICA In-Reply-To: <1427843396.5968.1389374068812.JavaMail.root@zimbra> Message-ID: <1593461380.4660324.1389374837434.JavaMail.root@sculptor.zimbra.ru.nl> Hi Federico, I don't follow you. What's SSP? In any case, what I explained it's the way that I know to reduce data dimensionality prior ICA computation. I don't know a procedure to know optimal number of PCA component but here 25 were used: http://www.ncbi.nlm.nih.gov/pubmed/19699307 best, Diego ----- Original Message ----- > From: "Federico Grande" > To: "Diego Lozano" , "FieldTrip discussion list" > Sent: Friday, 10 January, 2014 6:14:28 PM > Subject: Re: [FieldTrip] SVD and ICA > Aham, that is what I've done, do the runica method, but I didn´t use > the parameter pca: pca are not principal component analysis associated > to SSP? I have used SSS (signal space separation) instead of SSP. It > would work also? And also I don´t know what number of components do I > want to reduce my data. How can I know which is the optimal number? > > Thank you Diego, > > Federico > > ----- Original Message ----- > From: "Lozano Soldevilla, D. (Diego)" > > To: "FieldTrip discussion list" > Sent: Friday, January 10, 2014 4:13:13 PM > Subject: Re: [FieldTrip] SVD and ICA > > Hi Federico, > > You might want to have a look to the different ICA algorithms > ft_componentanalysis has and see how to choose the proper option. For > example, if you select cfg.method='runica' then cfg.runica.pca = > number of components you want to reduce your data. > > Check help ft_componentanalysis for details > > best, > Diego > > > ----- Original Message ----- > > From: "Federico Grande" > > To: fieldtrip at science.ru.nl > > Sent: Friday, 10 January, 2014 3:54:56 PM > > Subject: [FieldTrip] SVD and ICA > > Hello everyone, > > > > In order to remove the artefacts like blink eyes or hearbeat, I > > wanted > > to apply ICA to my data. I've been told that is better to apply > > first > > SVD and then ICA, but I don't really know how to apply it. What do > > you > > recommend me in order to do it? I've not found any tutorial for > > doing > > it. All help and information ins greatly welcomed. > > > > Thank you very much, > > > > King Regards, > > > > Federico Grande > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ From fgrande at cbs.mpg.de Sat Jan 11 12:37:38 2014 From: fgrande at cbs.mpg.de (Federico Grande) Date: Sat, 11 Jan 2014 12:37:38 +0100 (CET) Subject: [FieldTrip] SVD and ICA In-Reply-To: <1593461380.4660324.1389374837434.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <403977934.633.1389440258730.JavaMail.root@zimbra> Hi Diego, I'm sorry, I was probably not clear enough. When you uses SSP (Signal Space Projection), to process the rawdata, it projects the data in 8 or 10 PCA, but when you uses SSS in the rawdata, it has a much higher amount of components , around 150 or almost 200. That is the reason that makes me having no idea about how should I reduce it. Cheers, Federico ----- Mensaje original ----- De: "Lozano Soldevilla, D. (Diego)" Para: "FieldTrip discussion list" Enviados: Viernes, 10 de Enero 2014 18:27:17 Asunto: Re: [FieldTrip] SVD and ICA Hi Federico, I don't follow you. What's SSP? In any case, what I explained it's the way that I know to reduce data dimensionality prior ICA computation. I don't know a procedure to know optimal number of PCA component but here 25 were used: http://www.ncbi.nlm.nih.gov/pubmed/19699307 best, Diego ----- Original Message ----- > From: "Federico Grande" > To: "Diego Lozano" , "FieldTrip discussion list" > Sent: Friday, 10 January, 2014 6:14:28 PM > Subject: Re: [FieldTrip] SVD and ICA > Aham, that is what I've done, do the runica method, but I didn´t use > the parameter pca: pca are not principal component analysis associated > to SSP? I have used SSS (signal space separation) instead of SSP. It > would work also? And also I don´t know what number of components do I > want to reduce my data. How can I know which is the optimal number? > > Thank you Diego, > > Federico > > ----- Original Message ----- > From: "Lozano Soldevilla, D. (Diego)" > > To: "FieldTrip discussion list" > Sent: Friday, January 10, 2014 4:13:13 PM > Subject: Re: [FieldTrip] SVD and ICA > > Hi Federico, > > You might want to have a look to the different ICA algorithms > ft_componentanalysis has and see how to choose the proper option. For > example, if you select cfg.method='runica' then cfg.runica.pca = > number of components you want to reduce your data. > > Check help ft_componentanalysis for details > > best, > Diego > > > ----- Original Message ----- > > From: "Federico Grande" > > To: fieldtrip at science.ru.nl > > Sent: Friday, 10 January, 2014 3:54:56 PM > > Subject: [FieldTrip] SVD and ICA > > Hello everyone, > > > > In order to remove the artefacts like blink eyes or hearbeat, I > > wanted > > to apply ICA to my data. I've been told that is better to apply > > first > > SVD and then ICA, but I don't really know how to apply it. What do > > you > > recommend me in order to do it? I've not found any tutorial for > > doing > > it. All help and information ins greatly welcomed. > > > > Thank you very much, > > > > King Regards, > > > > Federico Grande > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From aestnth at hum.au.dk Sat Jan 11 12:41:12 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Sat, 11 Jan 2014 12:41:12 +0100 Subject: [FieldTrip] SVD and ICA Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pgoodin at swin.edu.au Sat Jan 11 13:47:56 2014 From: pgoodin at swin.edu.au (Peter Goodin) Date: Sat, 11 Jan 2014 12:47:56 +0000 Subject: [FieldTrip] SVD and ICA In-Reply-To: <403977934.633.1389440258730.JavaMail.root@zimbra> References: <1593461380.4660324.1389374837434.JavaMail.root@sculptor.zimbra.ru.nl>, <403977934.633.1389440258730.JavaMail.root@zimbra> Message-ID: Hi Federico, Seeing as how you've stated using SSS, I'm going to assume you're using a neuromag system which has decreased the dimensionality of your data already through the extraction of "B-out" components. There are two options - the first is to use runica and and reduce the number of components to ~70 through PCA (covered in a couple of posts on this list). The second is to use the fastica algorithm which will automagically calculate the optimal amount of components to be extracted from the data. ICA will typically give far more components than SSP will projectors as ICA a model free method (so includes things such as EOG + ECG + EMG + external arefact + brain components). SSP however is model based and will only return projectors based on input (such as examples of eye blinks / ECG). Hope this helps, Peter __________________________ Peter Goodin, BSc (Hons), Ph.D Candidate. Brain and Psychological Sciences Research Centre (BPsych) Swinburne University, Hawthorn, Vic, 3122 Monash Alfred Psychiatry Research Centre (MAPrc) Level 4, 607 St Kilda Road, Melbourne 3004 ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Federico Grande [fgrande at cbs.mpg.de] Sent: Saturday, 11 January 2014 10:37 PM To: Diego Lozano; FieldTrip discussion list Subject: Re: [FieldTrip] SVD and ICA Hi Diego, I'm sorry, I was probably not clear enough. When you uses SSP (Signal Space Projection), to process the rawdata, it projects the data in 8 or 10 PCA, but when you uses SSS in the rawdata, it has a much higher amount of components , around 150 or almost 200. That is the reason that makes me having no idea about how should I reduce it. Cheers, Federico ----- Mensaje original ----- De: "Lozano Soldevilla, D. (Diego)" Para: "FieldTrip discussion list" Enviados: Viernes, 10 de Enero 2014 18:27:17 Asunto: Re: [FieldTrip] SVD and ICA Hi Federico, I don't follow you. What's SSP? In any case, what I explained it's the way that I know to reduce data dimensionality prior ICA computation. I don't know a procedure to know optimal number of PCA component but here 25 were used: http://www.ncbi.nlm.nih.gov/pubmed/19699307 best, Diego ----- Original Message ----- > From: "Federico Grande" > To: "Diego Lozano" , "FieldTrip discussion list" > Sent: Friday, 10 January, 2014 6:14:28 PM > Subject: Re: [FieldTrip] SVD and ICA > Aham, that is what I've done, do the runica method, but I didn´t use > the parameter pca: pca are not principal component analysis associated > to SSP? I have used SSS (signal space separation) instead of SSP. It > would work also? And also I don´t know what number of components do I > want to reduce my data. How can I know which is the optimal number? > > Thank you Diego, > > Federico > > ----- Original Message ----- > From: "Lozano Soldevilla, D. (Diego)" > > To: "FieldTrip discussion list" > Sent: Friday, January 10, 2014 4:13:13 PM > Subject: Re: [FieldTrip] SVD and ICA > > Hi Federico, > > You might want to have a look to the different ICA algorithms > ft_componentanalysis has and see how to choose the proper option. For > example, if you select cfg.method='runica' then cfg.runica.pca = > number of components you want to reduce your data. > > Check help ft_componentanalysis for details > > best, > Diego > > > ----- Original Message ----- > > From: "Federico Grande" > > To: fieldtrip at science.ru.nl > > Sent: Friday, 10 January, 2014 3:54:56 PM > > Subject: [FieldTrip] SVD and ICA > > Hello everyone, > > > > In order to remove the artefacts like blink eyes or hearbeat, I > > wanted > > to apply ICA to my data. I've been told that is better to apply > > first > > SVD and then ICA, but I don't really know how to apply it. What do > > you > > recommend me in order to do it? I've not found any tutorial for > > doing > > it. All help and information ins greatly welcomed. > > > > Thank you very much, > > > > King Regards, > > > > Federico Grande > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > PhD Student > Neuronal Oscillations Group > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > NL-6525 EN Nijmegen > The Netherlands > http://www.ru.nl/people/donders/lozano-soldevilla-d/ > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http://www.ru.nl/people/donders/lozano-soldevilla-d/ _______________________________________________ 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 ayobimpe2004 at hotmail.com Mon Jan 13 10:24:09 2014 From: ayobimpe2004 at hotmail.com (Azeez Adebimpe) Date: Mon, 13 Jan 2014 10:24:09 +0100 Subject: [FieldTrip] Source level statistics Message-ID: Dear all, I have sources for the same condition and I am not sure of if my design matrix is ok. I want to test to be sure that there is no significant difference between the group. Please can somebody help me with the design matrix? Azeez Adebimpe -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Mon Jan 13 10:27:28 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Mon, 13 Jan 2014 10:27:28 +0100 Subject: [FieldTrip] Source level statistics Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Tue Jan 14 07:19:37 2014 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Tue, 14 Jan 2014 06:19:37 +0000 Subject: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series Message-ID: Hi all, Reading through the discussion list, I see others have also had some issues with creating grand averaged source space time series (ERFs) and subsequent statistical analysis, but I can't see any solutions.... Questions: How can I create time series (ERFs) for grand averaged source space data? And, how can I do cluster analysis on these (yet to be created) grand averaged source space ERFs? I have used ft_SOURCEANALYSIS with method 'lcmv' for individual participants to generate source space time series, in data.avg.mom. Subsequently I used ft_sourcegrandaverage to combine source space data across subjects. However my grand averaged source data.avg only contains 'pow' and no 'mom'. Eg, no time series for the grand averaged source space data. As such, I can not do cluster analysis on grand averaged ERFs in source space. It appears that ft_sourcestatistics only works with parameters that have not more than one value per grid point (e.g. pow, nai etc) and is unable to work with ERF time series? Is this true? Can any one help with this? Much obliged. Kaelasha -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Tue Jan 14 07:23:04 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Tue, 14 Jan 2014 07:23:04 +0100 Subject: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 14 07:52:09 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 14 Jan 2014 07:52:09 +0100 Subject: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series In-Reply-To: References: Message-ID: Hi Kaelasha, You actually don't need to use ft_sourcegrandaverage if your goal is to do statistics. Ft_sourcestatistics in principle knows how to deal with multiple inputs. Thus, rather than doing cfg = []; cfg.keepindividual = 'yes'; grandavg = ft_sourcegrandaverage(cfg, subjectdata{:}); you can do something like this cfg = your cfg to ft_sourcestatistics stat = ft_sourcestatistics(cfg, grandavg{:}); Now, the question boils down to 'how to fool ft_sourcestatistics to swallow my data?'. The following should more or less work (but requires some manual labour): The time courses at the voxel level are present in source.avg.mom. These are most likely 3xN, 3 dipole orientations times N time points. In order to reduce this, one can project the orientation along the first pca-axis. This can be achieved by a call to ft_sourcedescriptives with cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place with cfg.fixedori = 'yes'. Then, you could do something like: pow = zeros(size(source.pos,1),length(source.time); pow(source.inside,:) = cat(1,source.avg.mom{source.inside}); source.avg.pow = pow; Just to be sure, add a time-axis to the source structure, i.e. source.time = tlck.time (tlck being the data structure used to create the lcmv-output). I think this should bring you close to doing statistics. Best, Jan-Mathijs On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote: > Hi all, > > Reading through the discussion list, I see others have also had some issues with creating grand averaged source space time series (ERFs) and subsequent statistical analysis, but I can't see any solutions.... > > Questions: > How can I create time series (ERFs) for grand averaged source space data? > And, how can I do cluster analysis on these (yet to be created) grand averaged source space ERFs? > > > I have used ft_SOURCEANALYSIS with method 'lcmv' for individual participants to generate source space time series, in data.avg.mom. > > Subsequently I used ft_sourcegrandaverage to combine source space data across subjects. > > However my grand averaged source data.avg only contains 'pow' and no 'mom'. Eg, no time series for the grand averaged source space data. > > As such, I can not do cluster analysis on grand averaged ERFs in source space. > > It appears that ft_sourcestatistics only works with parameters that have not more than one value per grid point (e.g. pow, nai etc) and is unable to work with ERF time series? Is this true? > > Can any one help with this? > > Much obliged. > Kaelasha > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Jan 14 09:24:55 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 14 Jan 2014 09:24:55 +0100 Subject: [FieldTrip] ft_volumerealign: issue when coregistering to headshape Message-ID: <74251E8E-6F80-463B-8073-7D81FC311B00@donders.ru.nl> Dear all, I have fixed a somewhat critical issue in ft_volumerealign. Please disregard this e-mail (i.e. don't worry about it) if you have never used this function to coregister your anatomical MRI to a headshape (with cfg.headshape = something) in the past couple of months (starting from October 2013). The long story short: when supplying ft_volumerealign with a headshape in the configuration, the function tries to register the anatomical MRI to this headshape, by creating a 3D model of the scalp surface (based on the MRI) and using an iterative closest point algorithm for registration. So far so good. Yet, as of revision 8576 (committed to svn on Sept 30 2013) I added an interactive alignment step to this procedure, because the icp-algorithm is known to behave well only if the point clouds are already approximately registered. That is, in my experience an approximate registration based on the fiducials only was not always sufficient to achieve a nice coregistration. This being said, the introduction of this additional interactive step also introduced a bug, in that the transformation matrix that was estimated with the icp-algorithm was not properly dealt with. Actually, this information was never used for the registration and as a result the coregistration matrix outputted in ft_volumerealign was the one that resulted from the interactive realignment only. Not a total disaster, because I expect the user to get an as good as possible coregistration by hand to begin with, but also not how it should be. My apologies for any inconvenience caused. The issue has been fixed as of svn revision 9096. Happy computing, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From ktyler at swin.edu.au Wed Jan 15 09:14:16 2014 From: ktyler at swin.edu.au (Kaelasha Tyler) Date: Wed, 15 Jan 2014 08:14:16 +0000 Subject: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series In-Reply-To: References: , Message-ID: Hi Jan-Mathijs, Thanks for this response. I still have a question though. You mentioned that it is not necessary to use ft_sourcegrandaverage to perform statistical analysis with source space ERFs across multiple participants. However, what you appeared to suggest in your email, does appear to still use a grand average, e.g. you wrote: >you can do something like this >cfg = your cfg to ft_sourcestatistics >stat = ft_sourcestatistics(cfg, grandavg{:}); Having played around with it a bit more, I am still unclear how to use multiple inputs (e.g., multiple subjects source data) when using ft_sourcestatistics. I had thought that ft_sourcegrandavarge was a necessity. Can you make this a bit clearer? Also, I did go back and use cfg.fixedori='yes' when calling my first ft_srouceanalysis and moved also my source.avg.mom data into source.avg.pow as you suggested, but this still leaves me with the question above- how to use multiple subjects source data in ft_sourcestatistics? Once again, any help from anyone would be much appreciated! Kaelasha ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] Sent: Tuesday, 14 January 2014 5:52 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series Hi Kaelasha, You actually don't need to use ft_sourcegrandaverage if your goal is to do statistics. Ft_sourcestatistics in principle knows how to deal with multiple inputs. Thus, rather than doing cfg = []; cfg.keepindividual = 'yes'; grandavg = ft_sourcegrandaverage(cfg, subjectdata{:}); you can do something like this cfg = your cfg to ft_sourcestatistics stat = ft_sourcestatistics(cfg, grandavg{:}); Now, the question boils down to 'how to fool ft_sourcestatistics to swallow my data?'. The following should more or less work (but requires some manual labour): The time courses at the voxel level are present in source.avg.mom. These are most likely 3xN, 3 dipole orientations times N time points. In order to reduce this, one can project the orientation along the first pca-axis. This can be achieved by a call to ft_sourcedescriptives with cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place with cfg.fixedori = 'yes'. Then, you could do something like: pow = zeros(size(source.pos,1),length(source.time); pow(source.inside,:) = cat(1,source.avg.mom{source.inside}); source.avg.pow = pow; Just to be sure, add a time-axis to the source structure, i.e. source.time = tlck.time (tlck being the data structure used to create the lcmv-output). I think this should bring you close to doing statistics. Best, Jan-Mathijs On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote: Hi all, Reading through the discussion list, I see others have also had some issues with creating grand averaged source space time series (ERFs) and subsequent statistical analysis, but I can't see any solutions.... Questions: How can I create time series (ERFs) for grand averaged source space data? And, how can I do cluster analysis on these (yet to be created) grand averaged source space ERFs? I have used ft_SOURCEANALYSIS with method 'lcmv' for individual participants to generate source space time series, in data.avg.mom. Subsequently I used ft_sourcegrandaverage to combine source space data across subjects. However my grand averaged source data.avg only contains 'pow' and no 'mom'. Eg, no time series for the grand averaged source space data. As such, I can not do cluster analysis on grand averaged ERFs in source space. It appears that ft_sourcestatistics only works with parameters that have not more than one value per grid point (e.g. pow, nai etc) and is unable to work with ERF time series? Is this true? Can any one help with this? Much obliged. Kaelasha _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Wed Jan 15 09:20:24 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Wed, 15 Jan 2014 09:20:24 +0100 Subject: [FieldTrip] =?utf-8?q?ft=5Fsourcestatistics_and_sourcegrandaverag?= =?utf-8?q?e_=09time=09series?= Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thomas.Baumgarten at med.uni-duesseldorf.de Wed Jan 15 09:35:07 2014 From: Thomas.Baumgarten at med.uni-duesseldorf.de (Thomas.Baumgarten at med.uni-duesseldorf.de) Date: Wed, 15 Jan 2014 08:35:07 +0000 Subject: [FieldTrip] Problems with statistics for circular data Message-ID: <6C58B92C2519E64688A9E25C7A0D07236E38677D@MAIL1-UKD.VMED.UKD> Dear FieldTrip users, I am working on a set of circular data (phase angles of ongoing oscillations computed via Hilbert transform) and would like to statistically compare two conditions (A,B). For this, I use the circular statistics toolbox for matlab by P. Berens. I worked on this problem from two different angles: 1. First, I tried to directly compare the two conditions via the Watson-Williams two-sample test (function: circ_wwtest). Unfortunately, this didn't work out, since the test requires an average resultant vector length of > 0.45 for n >= 11 entries/ subjects, an assumption which is not met by my data. 2. Second, I tried to calculate the angle of difference between the two conditions (angle(A) - angle(B)) and then used the one-sample mean angle test (function: circ_mtest) to test if the resulting angle of difference is significantly different from zero. Here, the following problems arise: Since the resulting angles for A and B range from -pi to +pi, there are cases when the subtraction of the two angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) - (B = -pi) = 2pi), resulting in an error from the circ_mtest function. I tried to solve this problem by using a modulus (2pi) operation (i.e. by 'cleaning out' the redundant circumventions while at the same time preserving the angle information), but unfortunately this didn't work out either. The only other option I can think of would be to generate surrogate data (i.e. a matrix with the same dimensions as the matrix with the angles of difference , only filled with zeros) and to apply a cluster-based permutation test (similar to ft_freqstatitics). Although this would take care of my multiple-comparison problem, I am not quite sure if the cluster correction is still valid in this case and if this test would work for circular data. I would greatly appreciate any comments and advice on this matter. Thanks for your help, Thomas Thomas Baumgarten, PhD Student Institute of Clinical Neuroscience and Medical Psychology, Medical Faculty, Heinrich-Heine-University Düsseldorf, Universitätsstraße 1, 40225 Düsseldorf, Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias.staudigl at uni-konstanz.de Wed Jan 15 10:19:04 2014 From: tobias.staudigl at uni-konstanz.de (Tobias Staudigl) Date: Wed, 15 Jan 2014 10:19:04 +0100 Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: <6C58B92C2519E64688A9E25C7A0D07236E38677D@MAIL1-UKD.VMED.UKD> References: <6C58B92C2519E64688A9E25C7A0D07236E38677D@MAIL1-UKD.VMED.UKD> Message-ID: <52D65288.3070207@uni-konstanz.de> Dear Thomas, try using circ_dist.m (in the circ_stats toolbox by Berens). This should solve the circular difference issue. all the best, Tobias Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: > > Dear FieldTrip users, > > I am working on a set of circular data (phase angles of ongoing > oscillations computed via Hilbert transform) and would like to > statistically compare two conditions (A,B). For this, I use the > circular statistics toolbox for matlab by P. Berens. I worked on this > problem from two different angles: > > 1. First, I tried to directly compare the two conditions via the > Watson-Williams two-sample test (function: circ_wwtest). > Unfortunately, this didn't work out, since the test requires an > average resultant vector length of > 0.45 for n >= 11 entries/ > subjects, an assumption which is not met by my data. > > 2. Second, I tried to calculate the angle of difference between the > two conditions (angle(A) -- angle(B)) and then used the one-sample > mean angle test (function: circ_mtest) to test if the resulting angle > of difference is significantly different from zero. Here, the > following problems arise: Since the resulting angles for A and B range > from --pi to +pi, there are cases when the subtraction of the two > angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) -- > (B = -pi) = 2pi), resulting in an error from the circ_mtest function. > I tried to solve this problem by using a modulus (2pi) operation (i.e. > by 'cleaning out' the redundant circumventions while at the same time > preserving the angle information), but unfortunately this didn't work > out either. > > The only other option I can think of would be to generate surrogate > data (i.e. a matrix with the same dimensions as the matrix with the > angles of difference , only filled with zeros) and to apply a > cluster-based permutation test (similar to ft_freqstatitics). Although > this would take care of my multiple-comparison problem, I am not quite > sure if the cluster correction is still valid in this case and if this > test would work for circular data. > > I would greatly appreciate any comments and advice on this matter. > > Thanks for your help, > > Thomas > > Thomas Baumgarten, PhD Student > > Institute of Clinical Neuroscience and Medical Psychology, Medical > Faculty, Heinrich-Heine-University Düsseldorf, Universitätsstraße 1, > 40225 Düsseldorf, Germany > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Tobias Staudigl Fachbereich Psychologie - ZPR Postfach ZPR 78457 Konstanz ZPR, Haus 12 Tel.: +49 (0)7531 / 88 - 5703 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Jan 15 11:18:53 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 15 Jan 2014 11:18:53 +0100 Subject: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series In-Reply-To: References: , Message-ID: <14425A96-E395-4757-904B-5AFB8FEED3EB@donders.ru.nl> Hi Kaelasha, Sorry for being unclear. You can do something like: stat = ft_sourcestatistics(cfg, data1, data2, data3, data4, ....), or stat = ft_sourcestatistics(cfg, data{:}); where data is a cell-array of structures (1 cell for each participant/condition). Best, Jan-Mathijs On Jan 15, 2014, at 9:14 AM, Kaelasha Tyler wrote: > Hi Jan-Mathijs, > > Thanks for this response. > I still have a question though. > You mentioned that it is not necessary to use ft_sourcegrandaverage to perform statistical analysis with source space ERFs across multiple participants. However, what you appeared to suggest in your email, does appear to still use a grand average, e.g. you wrote: > > >you can do something like this > > >cfg = your cfg to ft_sourcestatistics > >stat = ft_sourcestatistics(cfg, grandavg{:}); > > Having played around with it a bit more, I am still unclear how to use multiple inputs (e.g., multiple subjects source data) when using ft_sourcestatistics. I had thought that ft_sourcegrandavarge was a necessity. > Can you make this a bit clearer? > > Also, I did go back and use cfg.fixedori='yes' when calling my first ft_srouceanalysis and moved also my source.avg.mom data into source.avg.pow as you suggested, but this still leaves me with the question above- how to use multiple subjects source data in ft_sourcestatistics? > > Once again, any help from anyone would be much appreciated! > > Kaelasha > > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] > Sent: Tuesday, 14 January 2014 5:52 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series > > Hi Kaelasha, > > You actually don't need to use ft_sourcegrandaverage if your goal is to do statistics. Ft_sourcestatistics in principle knows how to deal with multiple inputs. > Thus, > rather than doing > > cfg = []; > cfg.keepindividual = 'yes'; > grandavg = ft_sourcegrandaverage(cfg, subjectdata{:}); > > you can do something like this > > cfg = your cfg to ft_sourcestatistics > stat = ft_sourcestatistics(cfg, grandavg{:}); > > Now, the question boils down to 'how to fool ft_sourcestatistics to swallow my data?'. > > The following should more or less work (but requires some manual labour): > > The time courses at the voxel level are present in source.avg.mom. These are most likely 3xN, 3 dipole orientations times N time points. In order to reduce this, one can project the orientation along the first pca-axis. This can be achieved by a call to ft_sourcedescriptives with cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place with cfg.fixedori = 'yes'. > Then, you could do something like: > > pow = zeros(size(source.pos,1),length(source.time); > pow(source.inside,:) = cat(1,source.avg.mom{source.inside}); > source.avg.pow = pow; > > Just to be sure, add a time-axis to the source structure, i.e. source.time = tlck.time (tlck being the data structure used to create the lcmv-output). > > I think this should bring you close to doing statistics. > > Best, > Jan-Mathijs > > > > On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote: > >> Hi all, >> >> Reading through the discussion list, I see others have also had some issues with creating grand averaged source space time series (ERFs) and subsequent statistical analysis, but I can't see any solutions.... >> >> Questions: >> How can I create time series (ERFs) for grand averaged source space data? >> And, how can I do cluster analysis on these (yet to be created) grand averaged source space ERFs? >> >> >> I have used ft_SOURCEANALYSIS with method 'lcmv' for individual participants to generate source space time series, in data.avg.mom. >> >> Subsequently I used ft_sourcegrandaverage to combine source space data across subjects. >> >> However my grand averaged source data.avg only contains 'pow' and no 'mom'. Eg, no time series for the grand averaged source space data. >> >> As such, I can not do cluster analysis on grand averaged ERFs in source space. >> >> It appears that ft_sourcestatistics only works with parameters that have not more than one value per grid point (e.g. pow, nai etc) and is unable to work with ERF time series? Is this true? >> >> Can any one help with this? >> >> Much obliged. >> Kaelasha >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrecravo at gmail.com Wed Jan 15 13:04:53 2014 From: andrecravo at gmail.com (Andre Cravo) Date: Wed, 15 Jan 2014 10:04:53 -0200 Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: <52D65288.3070207@uni-konstanz.de> References: <6C58B92C2519E64688A9E25C7A0D07236E38677D@MAIL1-UKD.VMED.UKD> <52D65288.3070207@uni-konstanz.de> Message-ID: Dear Thomas, Is it a paired test? If you are interested, I have implemented some paired t-tests for circular data based on Zar's book. Best -- Andre M. Cravo Center for Mathematics, Computation and Cognition Federal University of ABC., Brazil http://neuro.ufabc.edu.br/timing On 15 January 2014 07:19, Tobias Staudigl wrote: > Dear Thomas, > > try using circ_dist.m (in the circ_stats toolbox by Berens). > This should solve the circular difference issue. > > all the best, > Tobias > > Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: > > Dear FieldTrip users, > > I am working on a set of circular data (phase angles of ongoing oscillations > computed via Hilbert transform) and would like to statistically compare two > conditions (A,B). For this, I use the circular statistics toolbox for matlab > by P. Berens. I worked on this problem from two different angles: > > 1. First, I tried to directly compare the two conditions via the > Watson-Williams two-sample test (function: circ_wwtest). Unfortunately, this > didn’t work out, since the test requires an average resultant vector length > of > 0.45 for n >= 11 entries/ subjects, an assumption which is not met by > my data. > > 2. Second, I tried to calculate the angle of difference between the two > conditions (angle(A) – angle(B)) and then used the one-sample mean angle > test (function: circ_mtest) to test if the resulting angle of difference is > significantly different from zero. Here, the following problems arise: Since > the resulting angles for A and B range from –pi to +pi, there are cases when > the subtraction of the two angles results in roughly +2pi or -2pi (e.g. > cases where (A = pi) – (B = -pi) = 2pi), resulting in an error from the > circ_mtest function. I tried to solve this problem by using a modulus (2pi) > operation (i.e. by ‘cleaning out’ the redundant circumventions while at the > same time preserving the angle information), but unfortunately this didn’t > work out either. > > The only other option I can think of would be to generate surrogate data > (i.e. a matrix with the same dimensions as the matrix with the angles of > difference , only filled with zeros) and to apply a cluster-based > permutation test (similar to ft_freqstatitics). Although this would take > care of my multiple-comparison problem, I am not quite sure if the cluster > correction is still valid in this case and if this test would work for > circular data. > > I would greatly appreciate any comments and advice on this matter. > > Thanks for your help, > > Thomas > > > > > > Thomas Baumgarten, PhD Student > > Institute of Clinical Neuroscience and Medical Psychology, Medical Faculty, > Heinrich-Heine-University Düsseldorf, Universitätsstraße 1, 40225 > Düsseldorf, Germany > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Dr. Tobias Staudigl > Fachbereich Psychologie - ZPR > Postfach ZPR > 78457 Konstanz > ZPR, Haus 12 > Tel.: +49 (0)7531 / 88 - 5703 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From pierre.megevand at gmail.com Wed Jan 15 15:47:30 2014 From: pierre.megevand at gmail.com (=?ISO-8859-1?Q?Pierre_M=E9gevand?=) Date: Wed, 15 Jan 2014 09:47:30 -0500 Subject: [FieldTrip] Problems with statistics for circular data Message-ID: Dear Thomas, When the assumptions of the parametric Watson-Williams test aren't met, you can use non-parametric statistical tests for circular data, such as Watson's Yr or U2 tests. The Yr test is implemented in the MATLAB toolbox PhasePACK by Daniel Rizzuto: cmean_test.m function, https://github.com/iandol/spikes/tree/master/Various/PhasePACK). You can find matlab code for the U2 test here: http://www.mathworks.com/matlabcentral/fileexchange/43543-watsons-u2-statistic-based-permutation-test-for-circular-data. I programmed this; it runs very slowly, so if anyone is interested in looking into it I'm sure we could make it much better. Pierre -- Pierre Mégevand, MD, PhD Post-doctoral research fellow Laboratory for Multimodal Human Brain Mapping Feinstein Institute for Medical Research Manhasset, NY, USA On Wed, Jan 15, 2014 at 5:20 AM, wrote: > 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. Re: Problems with statistics for circular data (Tobias Staudigl) > 2. Re: ft_sourcestatistics and sourcegrandaverage time series > (jan-mathijs schoffelen) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 15 Jan 2014 10:19:04 +0100 > From: Tobias Staudigl > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Problems with statistics for circular data > Message-ID: <52D65288.3070207 at uni-konstanz.de> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Dear Thomas, > > try using circ_dist.m (in the circ_stats toolbox by Berens). > This should solve the circular difference issue. > > all the best, > Tobias > > Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: > > > > Dear FieldTrip users, > > > > I am working on a set of circular data (phase angles of ongoing > > oscillations computed via Hilbert transform) and would like to > > statistically compare two conditions (A,B). For this, I use the > > circular statistics toolbox for matlab by P. Berens. I worked on this > > problem from two different angles: > > > > 1. First, I tried to directly compare the two conditions via the > > Watson-Williams two-sample test (function: circ_wwtest). > > Unfortunately, this didn't work out, since the test requires an > > average resultant vector length of > 0.45 for n >= 11 entries/ > > subjects, an assumption which is not met by my data. > > > > 2. Second, I tried to calculate the angle of difference between the > > two conditions (angle(A) -- angle(B)) and then used the one-sample > > mean angle test (function: circ_mtest) to test if the resulting angle > > of difference is significantly different from zero. Here, the > > following problems arise: Since the resulting angles for A and B range > > from --pi to +pi, there are cases when the subtraction of the two > > angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) -- > > (B = -pi) = 2pi), resulting in an error from the circ_mtest function. > > I tried to solve this problem by using a modulus (2pi) operation (i.e. > > by 'cleaning out' the redundant circumventions while at the same time > > preserving the angle information), but unfortunately this didn't work > > out either. > > > > The only other option I can think of would be to generate surrogate > > data (i.e. a matrix with the same dimensions as the matrix with the > > angles of difference , only filled with zeros) and to apply a > > cluster-based permutation test (similar to ft_freqstatitics). Although > > this would take care of my multiple-comparison problem, I am not quite > > sure if the cluster correction is still valid in this case and if this > > test would work for circular data. > > > > I would greatly appreciate any comments and advice on this matter. > > > > Thanks for your help, > > > > Thomas > > > > Thomas Baumgarten, PhD Student > > > > Institute of Clinical Neuroscience and Medical Psychology, Medical > > Faculty, Heinrich-Heine-University D?sseldorf, Universit?tsstra?e 1, > > 40225 D?sseldorf, Germany > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Dr. Tobias Staudigl > Fachbereich Psychologie - ZPR > Postfach ZPR > 78457 Konstanz > ZPR, Haus 12 > Tel.: +49 (0)7531 / 88 - 5703 > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140115/c71480a1/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Wed, 15 Jan 2014 11:18:53 +0100 > From: jan-mathijs schoffelen > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage > time series > Message-ID: <14425A96-E395-4757-904B-5AFB8FEED3EB at donders.ru.nl> > Content-Type: text/plain; charset="us-ascii" > > Hi Kaelasha, > > Sorry for being unclear. You can do something like: > > stat = ft_sourcestatistics(cfg, data1, data2, data3, data4, ....), or stat > = ft_sourcestatistics(cfg, data{:}); where data is a cell-array of > structures (1 cell for each participant/condition). > > Best, > Jan-Mathijs > > > > > On Jan 15, 2014, at 9:14 AM, Kaelasha Tyler wrote: > > > Hi Jan-Mathijs, > > > > Thanks for this response. > > I still have a question though. > > You mentioned that it is not necessary to use ft_sourcegrandaverage to > perform statistical analysis with source space ERFs across multiple > participants. However, what you appeared to suggest in your email, does > appear to still use a grand average, e.g. you wrote: > > > > >you can do something like this > > > > >cfg = your cfg to ft_sourcestatistics > > >stat = ft_sourcestatistics(cfg, grandavg{:}); > > > > Having played around with it a bit more, I am still unclear how to use > multiple inputs (e.g., multiple subjects source data) when using > ft_sourcestatistics. I had thought that ft_sourcegrandavarge was a > necessity. > > Can you make this a bit clearer? > > > > Also, I did go back and use cfg.fixedori='yes' when calling my first > ft_srouceanalysis and moved also my source.avg.mom data into source.avg.pow > as you suggested, but this still leaves me with the question above- how to > use multiple subjects source data in ft_sourcestatistics? > > > > Once again, any help from anyone would be much appreciated! > > > > Kaelasha > > > > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] > on behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] > > Sent: Tuesday, 14 January 2014 5:52 PM > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time > series > > > > Hi Kaelasha, > > > > You actually don't need to use ft_sourcegrandaverage if your goal is to > do statistics. Ft_sourcestatistics in principle knows how to deal with > multiple inputs. > > Thus, > > rather than doing > > > > cfg = []; > > cfg.keepindividual = 'yes'; > > grandavg = ft_sourcegrandaverage(cfg, subjectdata{:}); > > > > you can do something like this > > > > cfg = your cfg to ft_sourcestatistics > > stat = ft_sourcestatistics(cfg, grandavg{:}); > > > > Now, the question boils down to 'how to fool ft_sourcestatistics to > swallow my data?'. > > > > The following should more or less work (but requires some manual labour): > > > > The time courses at the voxel level are present in source.avg.mom. These > are most likely 3xN, 3 dipole orientations times N time points. In order to > reduce this, one can project the orientation along the first pca-axis. This > can be achieved by a call to ft_sourcedescriptives with > cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place > with cfg.fixedori = 'yes'. > > Then, you could do something like: > > > > pow = zeros(size(source.pos,1),length(source.time); > > pow(source.inside,:) = cat(1,source.avg.mom{source.inside}); > > source.avg.pow = pow; > > > > Just to be sure, add a time-axis to the source structure, i.e. > source.time = tlck.time (tlck being the data structure used to create the > lcmv-output). > > > > I think this should bring you close to doing statistics. > > > > Best, > > Jan-Mathijs > > > > > > > > On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote: > > > >> Hi all, > >> > >> Reading through the discussion list, I see others have also had some > issues with creating grand averaged source space time series (ERFs) and > subsequent statistical analysis, but I can't see any solutions.... > >> > >> Questions: > >> How can I create time series (ERFs) for grand averaged source space > data? > >> And, how can I do cluster analysis on these (yet to be created) grand > averaged source space ERFs? > >> > >> > >> I have used ft_SOURCEANALYSIS with method 'lcmv' for individual > participants to generate source space time series, in data.avg.mom. > >> > >> Subsequently I used ft_sourcegrandaverage to combine source space data > across subjects. > >> > >> However my grand averaged source data.avg only contains 'pow' and no > 'mom'. Eg, no time series for the grand averaged source space data. > >> > >> As such, I can not do cluster analysis on grand averaged ERFs in source > space. > >> > >> It appears that ft_sourcestatistics only works with parameters that > have not more than one value per grid point (e.g. pow, nai etc) and is > unable to work with ERF time series? Is this true? > >> > >> Can any one help with this? > >> > >> Much obliged. > >> Kaelasha > >> > >> > >> > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > Jan-Mathijs Schoffelen, MD PhD > > > > Donders Institute for Brain, Cognition and Behaviour, > > Centre for Cognitive Neuroimaging, > > Radboud University Nijmegen, The Netherlands > > > > Max Planck Institute for Psycholinguistics, > > Nijmegen, The Netherlands > > > > J.Schoffelen at donders.ru.nl > > Telephone: +31-24-3614793 > > > > http://www.hettaligebrein.nl > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140115/a1878500/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 38, Issue 18 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thomas.Baumgarten at med.uni-duesseldorf.de Wed Jan 15 16:07:37 2014 From: Thomas.Baumgarten at med.uni-duesseldorf.de (Thomas.Baumgarten at med.uni-duesseldorf.de) Date: Wed, 15 Jan 2014 15:07:37 +0000 Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: <52D65288.3070207@uni-konstanz.de> References: <6C58B92C2519E64688A9E25C7A0D07236E38677D@MAIL1-UKD.VMED.UKD> <52D65288.3070207@uni-konstanz.de> Message-ID: <6C58B92C2519E64688A9E25C7A0D07236E387058@MAIL1-UKD.VMED.UKD> Dear Tobias, Thank you for the hint! Indeed, this makes the calculation of the circular difference much easier and the resulting values stay between -pi and pi. Sorry that I didn't think of this, since the purpose of the function is rather obvious. Best regards, Thomas Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Tobias Staudigl Gesendet: Mittwoch, 15. Januar 2014 10:19 An: FieldTrip discussion list Betreff: Re: [FieldTrip] Problems with statistics for circular data Dear Thomas, try using circ_dist.m (in the circ_stats toolbox by Berens). This should solve the circular difference issue. all the best, Tobias Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: Dear FieldTrip users, I am working on a set of circular data (phase angles of ongoing oscillations computed via Hilbert transform) and would like to statistically compare two conditions (A,B). For this, I use the circular statistics toolbox for matlab by P. Berens. I worked on this problem from two different angles: 1. First, I tried to directly compare the two conditions via the Watson-Williams two-sample test (function: circ_wwtest). Unfortunately, this didn't work out, since the test requires an average resultant vector length of > 0.45 for n >= 11 entries/ subjects, an assumption which is not met by my data. 2. Second, I tried to calculate the angle of difference between the two conditions (angle(A) - angle(B)) and then used the one-sample mean angle test (function: circ_mtest) to test if the resulting angle of difference is significantly different from zero. Here, the following problems arise: Since the resulting angles for A and B range from -pi to +pi, there are cases when the subtraction of the two angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) - (B = -pi) = 2pi), resulting in an error from the circ_mtest function. I tried to solve this problem by using a modulus (2pi) operation (i.e. by 'cleaning out' the redundant circumventions while at the same time preserving the angle information), but unfortunately this didn't work out either. The only other option I can think of would be to generate surrogate data (i.e. a matrix with the same dimensions as the matrix with the angles of difference , only filled with zeros) and to apply a cluster-based permutation test (similar to ft_freqstatitics). Although this would take care of my multiple-comparison problem, I am not quite sure if the cluster correction is still valid in this case and if this test would work for circular data. I would greatly appreciate any comments and advice on this matter. Thanks for your help, Thomas Thomas Baumgarten, PhD Student Institute of Clinical Neuroscience and Medical Psychology, Medical Faculty, Heinrich-Heine-University Düsseldorf, Universitätsstraße 1, 40225 Düsseldorf, Germany _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Tobias Staudigl Fachbereich Psychologie - ZPR Postfach ZPR 78457 Konstanz ZPR, Haus 12 Tel.: +49 (0)7531 / 88 - 5703 -------------- next part -------------- An HTML attachment was scrubbed... URL: From strauss at cbs.mpg.de Wed Jan 15 16:42:23 2014 From: strauss at cbs.mpg.de (Antje Strauss) Date: Wed, 15 Jan 2014 16:42:23 +0100 (CET) Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: Message-ID: <1136676999.7333.1389800543739.JavaMail.root@zimbra> Dear Thomas, my experience with EEG data is that your resultant vector length will hardly ever exceed 0.45 making the Watson-Williams test unapplicable. But I used a solution suggested by Niko Busch and colleagues in 2009 (J Neuroscience). There, they introduce a measure called "bifurcation index" which you could calculate for each time-frequency bin and then run a fieldtrip style cluster permutation statistic against zero. Best, Antje > Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: > > Dear FieldTrip users, > > I am working on a set of circular data (phase angles of ongoing oscillations > computed via Hilbert transform) and would like to statistically compare two > conditions (A,B). For this, I use the circular statistics toolbox for matlab > by P. Berens. I worked on this problem from two different angles: > > 1. First, I tried to directly compare the two conditions via the > Watson-Williams two-sample test (function: circ_wwtest). Unfortunately, this > didn?t work out, since the test requires an average resultant vector length > of > 0.45 for n >= 11 entries/ subjects, an assumption which is not met by > my data. > > 2. Second, I tried to calculate the angle of difference between the two > conditions (angle(A) ? angle(B)) and then used the one-sample mean angle > test (function: circ_mtest) to test if the resulting angle of difference is > significantly different from zero. Here, the following problems arise: Since > the resulting angles for A and B range from ?pi to +pi, there are cases when > the subtraction of the two angles results in roughly +2pi or -2pi (e.g. > cases where (A = pi) ? (B = -pi) = 2pi), resulting in an error from the > circ_mtest function. I tried to solve this problem by using a modulus (2pi) > operation (i.e. by ?cleaning out? the redundant circumventions while at the > same time preserving the angle information), but unfortunately this didn?t > work out either. > > The only other option I can think of would be to generate surrogate data > (i.e. a matrix with the same dimensions as the matrix with the angles of > difference , only filled with zeros) and to apply a cluster-based > permutation test (similar to ft_freqstatitics). Although this would take > care of my multiple-comparison problem, I am not quite sure if the cluster > correction is still valid in this case and if this test would work for > circular data. > > I would greatly appreciate any comments and advice on this matter. > > Thanks for your help, > > Thomas > > > > > > Thomas Baumgarten, PhD Student > > Institute of Clinical Neuroscience and Medical Psychology, Medical Faculty, > Heinrich-Heine-University D?sseldorf, Universit?tsstra?e 1, 40225 > D?sseldorf, Germany > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Dr. Tobias Staudigl > Fachbereich Psychologie - ZPR > Postfach ZPR > 78457 Konstanz > ZPR, Haus 12 > Tel.: +49 (0)7531 / 88 - 5703 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Antje Strauß, M.A. Auditory Cognition Research Group Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a - Leipzig, Germany (p) +49 (0)341 9940 2482 (e) strauss at cbs.mpg.de From sklein at berkeley.edu Wed Jan 15 16:50:07 2014 From: sklein at berkeley.edu (Stanley A. KLEIN) Date: Wed, 15 Jan 2014 10:50:07 -0500 Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: <6C58B92C2519E64688A9E25C7A0D07236E387058@MAIL1-UKD.VMED.UKD> References: <6C58B92C2519E64688A9E25C7A0D07236E38677D@MAIL1-UKD.VMED.UKD> <52D65288.3070207@uni-konstanz.de> <6C58B92C2519E64688A9E25C7A0D07236E387058@MAIL1-UKD.VMED.UKD> Message-ID: Could someone clarify for me the solution for dealing with circular data. Suppose I simple want to calculate the standard deviation of measuring the phase of something. Since the distribution isn't Gaussian, what does one do other than permutation cluster analysis sort of stuff (but not for calculating standard deviation). Stan On Wed, Jan 15, 2014 at 10:07 AM, wrote: > Dear Tobias, > > Thank you for the hint! Indeed, this makes the calculation of the circular > difference much easier and the resulting values stay between -pi and pi. > Sorry that I didn’t think of this, since the purpose of the function is > rather obvious. > > > > Best regards, > > Thomas > > > > *Von:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *Im Auftrag von *Tobias Staudigl > *Gesendet:* Mittwoch, 15. Januar 2014 10:19 > *An:* FieldTrip discussion list > *Betreff:* Re: [FieldTrip] Problems with statistics for circular data > > > > Dear Thomas, > > try using circ_dist.m (in the circ_stats toolbox by Berens). > This should solve the circular difference issue. > > all the best, > Tobias > > Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: > > Dear FieldTrip users, > > I am working on a set of circular data (phase angles of ongoing > oscillations computed via Hilbert transform) and would like to > statistically compare two conditions (A,B). For this, I use the circular > statistics toolbox for matlab by P. Berens. I worked on this problem from > two different angles: > > 1. First, I tried to directly compare the two conditions via the > Watson-Williams two-sample test (function: circ_wwtest). Unfortunately, > this didn’t work out, since the test requires an average resultant vector > length of > 0.45 for n >= 11 entries/ subjects, an assumption which is not > met by my data. > > 2. Second, I tried to calculate the angle of difference between the two > conditions (angle(A) – angle(B)) and then used the one-sample mean angle > test (function: circ_mtest) to test if the resulting angle of difference is > significantly different from zero. Here, the following problems arise: > Since the resulting angles for A and B range from –pi to +pi, there are > cases when the subtraction of the two angles results in roughly +2pi or > -2pi (e.g. cases where (A = pi) – (B = -pi) = 2pi), resulting in an error > from the circ_mtest function. I tried to solve this problem by using a > modulus (2pi) operation (i.e. by ‘cleaning out’ the redundant > circumventions while at the same time preserving the angle information), > but unfortunately this didn’t work out either. > > The only other option I can think of would be to generate surrogate data > (i.e. a matrix with the same dimensions as the matrix with the angles of > difference , only filled with zeros) and to apply a cluster-based > permutation test (similar to ft_freqstatitics). Although this would take > care of my multiple-comparison problem, I am not quite sure if the cluster > correction is still valid in this case and if this test would work for > circular data. > > I would greatly appreciate any comments and advice on this matter. > > Thanks for your help, > > Thomas > > > > > > Thomas Baumgarten, PhD Student > > Institute of Clinical Neuroscience and Medical Psychology, Medical > Faculty, Heinrich-Heine-University Düsseldorf, Universitätsstraße 1, 40225 > Düsseldorf, Germany > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > > Dr. Tobias Staudigl > > Fachbereich Psychologie - ZPR > > Postfach ZPR > > 78457 Konstanz > > ZPR, Haus 12 > > Tel.: +49 (0)7531 / 88 - 5703 > > > _______________________________________________ > 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 Thomas.Baumgarten at med.uni-duesseldorf.de Thu Jan 16 07:52:58 2014 From: Thomas.Baumgarten at med.uni-duesseldorf.de (Thomas.Baumgarten at med.uni-duesseldorf.de) Date: Thu, 16 Jan 2014 06:52:58 +0000 Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: References: Message-ID: <6C58B92C2519E64688A9E25C7A0D07236E387103@MAIL1-UKD.VMED.UKD> Dear Pierre, Thank you very much for your quick reply. I downloaded the scripts for the two non-parametrical tests and will give it a try. Again, thanks for the help! Best regards, Thomas Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Pierre Mégevand Gesendet: Mittwoch, 15. Januar 2014 15:48 An: fieldtrip at science.ru.nl Betreff: Re: [FieldTrip] Problems with statistics for circular data Dear Thomas, When the assumptions of the parametric Watson-Williams test aren't met, you can use non-parametric statistical tests for circular data, such as Watson's Yr or U2 tests. The Yr test is implemented in the MATLAB toolbox PhasePACK by Daniel Rizzuto: cmean_test.m function, https://github.com/iandol/spikes/tree/master/Various/PhasePACK). You can find matlab code for the U2 test here: http://www.mathworks.com/matlabcentral/fileexchange/43543-watsons-u2-statistic-based-permutation-test-for-circular-data. I programmed this; it runs very slowly, so if anyone is interested in looking into it I'm sure we could make it much better. Pierre -- Pierre Mégevand, MD, PhD Post-doctoral research fellow Laboratory for Multimodal Human Brain Mapping Feinstein Institute for Medical Research Manhasset, NY, USA On Wed, Jan 15, 2014 at 5:20 AM, > wrote: 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. Re: Problems with statistics for circular data (Tobias Staudigl) 2. Re: ft_sourcestatistics and sourcegrandaverage time series (jan-mathijs schoffelen) ---------------------------------------------------------------------- Message: 1 Date: Wed, 15 Jan 2014 10:19:04 +0100 From: Tobias Staudigl > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Problems with statistics for circular data Message-ID: <52D65288.3070207 at uni-konstanz.de> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Dear Thomas, try using circ_dist.m (in the circ_stats toolbox by Berens). This should solve the circular difference issue. all the best, Tobias Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: > > Dear FieldTrip users, > > I am working on a set of circular data (phase angles of ongoing > oscillations computed via Hilbert transform) and would like to > statistically compare two conditions (A,B). For this, I use the > circular statistics toolbox for matlab by P. Berens. I worked on this > problem from two different angles: > > 1. First, I tried to directly compare the two conditions via the > Watson-Williams two-sample test (function: circ_wwtest). > Unfortunately, this didn't work out, since the test requires an > average resultant vector length of > 0.45 for n >= 11 entries/ > subjects, an assumption which is not met by my data. > > 2. Second, I tried to calculate the angle of difference between the > two conditions (angle(A) -- angle(B)) and then used the one-sample > mean angle test (function: circ_mtest) to test if the resulting angle > of difference is significantly different from zero. Here, the > following problems arise: Since the resulting angles for A and B range > from --pi to +pi, there are cases when the subtraction of the two > angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) -- > (B = -pi) = 2pi), resulting in an error from the circ_mtest function. > I tried to solve this problem by using a modulus (2pi) operation (i.e. > by 'cleaning out' the redundant circumventions while at the same time > preserving the angle information), but unfortunately this didn't work > out either. > > The only other option I can think of would be to generate surrogate > data (i.e. a matrix with the same dimensions as the matrix with the > angles of difference , only filled with zeros) and to apply a > cluster-based permutation test (similar to ft_freqstatitics). Although > this would take care of my multiple-comparison problem, I am not quite > sure if the cluster correction is still valid in this case and if this > test would work for circular data. > > I would greatly appreciate any comments and advice on this matter. > > Thanks for your help, > > Thomas > > Thomas Baumgarten, PhD Student > > Institute of Clinical Neuroscience and Medical Psychology, Medical > Faculty, Heinrich-Heine-University D?sseldorf, Universit?tsstra?e 1, > 40225 D?sseldorf, Germany > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Tobias Staudigl Fachbereich Psychologie - ZPR Postfach ZPR 78457 Konstanz ZPR, Haus 12 Tel.: +49 (0)7531 / 88 - 5703 -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Wed, 15 Jan 2014 11:18:53 +0100 From: jan-mathijs schoffelen > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series Message-ID: <14425A96-E395-4757-904B-5AFB8FEED3EB at donders.ru.nl> Content-Type: text/plain; charset="us-ascii" Hi Kaelasha, Sorry for being unclear. You can do something like: stat = ft_sourcestatistics(cfg, data1, data2, data3, data4, ....), or stat = ft_sourcestatistics(cfg, data{:}); where data is a cell-array of structures (1 cell for each participant/condition). Best, Jan-Mathijs On Jan 15, 2014, at 9:14 AM, Kaelasha Tyler wrote: > Hi Jan-Mathijs, > > Thanks for this response. > I still have a question though. > You mentioned that it is not necessary to use ft_sourcegrandaverage to perform statistical analysis with source space ERFs across multiple participants. However, what you appeared to suggest in your email, does appear to still use a grand average, e.g. you wrote: > > >you can do something like this > > >cfg = your cfg to ft_sourcestatistics > >stat = ft_sourcestatistics(cfg, grandavg{:}); > > Having played around with it a bit more, I am still unclear how to use multiple inputs (e.g., multiple subjects source data) when using ft_sourcestatistics. I had thought that ft_sourcegrandavarge was a necessity. > Can you make this a bit clearer? > > Also, I did go back and use cfg.fixedori='yes' when calling my first ft_srouceanalysis and moved also my source.avg.mom data into source.avg.pow as you suggested, but this still leaves me with the question above- how to use multiple subjects source data in ft_sourcestatistics? > > Once again, any help from anyone would be much appreciated! > > Kaelasha > > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] > Sent: Tuesday, 14 January 2014 5:52 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time series > > Hi Kaelasha, > > You actually don't need to use ft_sourcegrandaverage if your goal is to do statistics. Ft_sourcestatistics in principle knows how to deal with multiple inputs. > Thus, > rather than doing > > cfg = []; > cfg.keepindividual = 'yes'; > grandavg = ft_sourcegrandaverage(cfg, subjectdata{:}); > > you can do something like this > > cfg = your cfg to ft_sourcestatistics > stat = ft_sourcestatistics(cfg, grandavg{:}); > > Now, the question boils down to 'how to fool ft_sourcestatistics to swallow my data?'. > > The following should more or less work (but requires some manual labour): > > The time courses at the voxel level are present in source.avg.mom. These are most likely 3xN, 3 dipole orientations times N time points. In order to reduce this, one can project the orientation along the first pca-axis. This can be achieved by a call to ft_sourcedescriptives with cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place with cfg.fixedori = 'yes'. > Then, you could do something like: > > pow = zeros(size(source.pos,1),length(source.time); > pow(source.inside,:) = cat(1,source.avg.mom{source.inside}); > source.avg.pow = pow; > > Just to be sure, add a time-axis to the source structure, i.e. source.time = tlck.time (tlck being the data structure used to create the lcmv-output). > > I think this should bring you close to doing statistics. > > Best, > Jan-Mathijs > > > > On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote: > >> Hi all, >> >> Reading through the discussion list, I see others have also had some issues with creating grand averaged source space time series (ERFs) and subsequent statistical analysis, but I can't see any solutions.... >> >> Questions: >> How can I create time series (ERFs) for grand averaged source space data? >> And, how can I do cluster analysis on these (yet to be created) grand averaged source space ERFs? >> >> >> I have used ft_SOURCEANALYSIS with method 'lcmv' for individual participants to generate source space time series, in data.avg.mom. >> >> Subsequently I used ft_sourcegrandaverage to combine source space data across subjects. >> >> However my grand averaged source data.avg only contains 'pow' and no 'mom'. Eg, no time series for the grand averaged source space data. >> >> As such, I can not do cluster analysis on grand averaged ERFs in source space. >> >> It appears that ft_sourcestatistics only works with parameters that have not more than one value per grid point (e.g. pow, nai etc) and is unable to work with ERF time series? Is this true? >> >> Can any one help with this? >> >> Much obliged. >> Kaelasha >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 38, Issue 18 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Thu Jan 16 07:58:52 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Thu, 16 Jan 2014 07:58:52 +0100 Subject: [FieldTrip] Problems with statistics for circular data Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bertram0611 at pku.edu.cn Thu Jan 16 10:27:40 2014 From: bertram0611 at pku.edu.cn (=?utf-8?B?6JSh5p6X?=) Date: Thu, 16 Jan 2014 17:27:40 +0800 (CST) Subject: [FieldTrip] =?gbk?q?something_wrong_with_my_permutation_test_for_?= =?gbk?q?ERP?= Message-ID: <1496187365.22750.1389864460364.JavaMail.root@bj-mail07.pku.edu.cn> Dear fieldtripers, I have already understood the tuitorials about how to do a permutation test for ERP analysis. I made some codes to do that. But I got some strange results and plots. And I couldnot find problems about my codes. %%%%%%%%%%%Codes: cfg = []; cfg.keepindividual = 'yes'; cfg.channel = 'all'; avg_12 = ft_timelockgrandaverage (cfg, data_12(:).ERP); avg_22 = ft_timelockgrandaverage (cfg, data_22(:).ERP); clear data*; outfil = strcat('/EEG/Discourse_Exp2/n16_grandavg_keeptrial_all_12vs22'); save(outfil, 'avg_12', 'avg_22'); load /EEG/Discourse_Exp2/n16_grandavg_keeptrial_all_12vs22; load (sprintf('E:/EEG/Discourse_Exp2/neighbours_Lin.mat')); % cfgneigh.neighbourdist = 42; %or 45, define the cluster neighbours % select all channels within 40 mm distance of the current channel as neighbours % cfgneigh.elec = elec; % read channel locations and labels from this file cfg.neighbours = neighbours_build; % load J:/new_4_names/data_valence/fieldtrip/elec_60; % cfgneigh.neighbourdist = 42; % select all channels within 36 mm distance of the current channel as neighbours % cfgneigh.elec = elec; % read channel locations and labels from this file % cfg.neighbours = ft_prepare_neighbours(cfgneigh); cfg.channel = {'all'}; cfg.method = 'montecarlo'; % cfg.design = [1:24 1:24; ones(1,24), ones(1,24) * 2]; cfg.design = [1:16 1:16; ones(1,16), ones(1,16) * 2]; cfg.uvar = 1; % subject number (unit variable) on line 1 of the design matrix cfg.ivar = 2; % condition number (independent variable) on line 2 of the design matrix cfg.latency = [0.2 1]; cfg.avgovertime = 'no';%(default = 'no') cfg.numrandomization = 1000; cfg.correctm = 'cluster'; cfg.alpha = 0.05; cfg.tail = 0; % one-or two-sided testing cfg.clusterstatistic = 'maxsum'; % maximum sum of t-values within one cluster is the test statistic cfg.clusterthreshold = 'parametric'; % paired-sample t-test for the uncorrected t-values cfg.clusteralpha = 0.05; cfg.clustertail = 0; % two-sided testing; cfg.statistic = 'depsamplesT'; statis_all_12vs22 = ft_timelockstatistics(cfg, avg_12, avg_22); outfil = strcat('/EEG/Discourse_Exp2/n16_statis_all_12vs22'); save(outfil, 'statis_all_12vs22') %%%%%clustor plot load /EEG/Discourse_Exp2/n16_grandavgERP_resp; load /EEG/Discourse_Exp2/n16_statis_all_12vs22; GA_RvsC = grandavg_12; GA_RvsC.avg = grandavg_22.avg - grandavg_12.avg; figure; timestep = 0.05; %(in seconds) sampling_rate = 500; sample_count = length(statis_all_12vs22.time); j = [0:timestep:1]; % Temporal endpoints (in seconds) of the ERP average computed in each subplot m = [1:timestep*500:sample_count]; % temporal endpoints in MEEG samples pos_cluster_pvals = [statis_all_12vs22.posclusters(:).prob]; pos_signif_clust = find(pos_cluster_pvals < statis_all_12vs22.cfg.alpha); pos = ismember(statis_all_12vs22.posclusterslabelmat, pos_signif_clust); neg_cluster_pvals = [statis_all_12vs22.negclusters(:).prob]; neg_signif_clust = find(neg_cluster_pvals < statis_all_12vs22.cfg.alpha); neg = ismember(statis_all_12vs22.negclusterslabelmat, neg_signif_clust); pos = statis_all_12vs22.posclusterslabelmat == 1; % or == 2, or 3, etc. neg = statis_all_12vs22.negclusterslabelmat == 1; for k = 1:16; subplot(4,4,k); cfg = []; cfg.layout = 'Lin_use.lay'; cfg.xlim=[j(k) j(k+1)]; %cfg.zlim = [-1.0e-13 1.0e-13]; pos_int = all(pos(:, m(k):m(k+1)), 2); neg_int = all(neg(:, m(k):m(k+1)), 2); cfg.highlight = 'on'; cfg.highlightchannel = find(pos_int | neg_int); cfg.comment = 'xlim'; cfg.commentpos = 'title'; ft_topoplotER(cfg, GA_RvsC); end Please help me. Thanks a lot! -- Lin Cai Department of Psychology, Peking University, Beijing 100871, P.R.China -------------- next part -------------- A non-text attachment was scrubbed... Name: strange2.jpg Type: image/jpeg Size: 150724 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: strange.jpg Type: image/jpeg Size: 49512 bytes Desc: not available URL: From f.roux at bcbl.eu Thu Jan 16 13:00:24 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 16 Jan 2014 13:00:24 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing Message-ID: <897231397.337853.1389873624028.JavaMail.root@bcbl.eu> Dear all, does anyone know of a good method to downsample MEG-data acquired with a CTF system before reading it into Matlab/fieldtrip. I remember that there is a command-line tool provided by CTF which can do preprocessing, but I don't remember exactly if it does the job. Or does anyone know of a good alternative solution? Best, Fred From andrecravo at gmail.com Thu Jan 16 13:04:30 2014 From: andrecravo at gmail.com (Andre Cravo) Date: Thu, 16 Jan 2014 10:04:30 -0200 Subject: [FieldTrip] Problems with statistics for circular data In-Reply-To: <6C58B92C2519E64688A9E25C7A0D07236E387103@MAIL1-UKD.VMED.UKD> References: <6C58B92C2519E64688A9E25C7A0D07236E387103@MAIL1-UKD.VMED.UKD> Message-ID: Dear Thomas, Please find attached two scripts with parametric paired t-tests for circular data. The first is for first order data, so the input are two vectors with the data. The second one is for second order data, so you need four vectors as inputs: two with the phase values and two with the respective mean resultant length for each phase value. This is important since in second order data(as when you are comparing data from different participants) you should give higher weights to values that are more concentrated around their mean phase. I wrote the scripts to myself, so they are not as commented as they should be, but I hope they are straight forward enough. Please write me if you have any doubts or find any mistakes. Best -- Andre M. Cravo Center for Mathematics, Computation and Cognition Federal University of ABC., Brazil http://neuro.ufabc.edu.br/timing On 16 January 2014 04:52, wrote: > Dear Pierre, > > > > Thank you very much for your quick reply. I downloaded the scripts for the > two non-parametrical tests and will give it a try. Again, thanks for the > help! > > > > Best regards, > > Thomas > > > > Von: fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Pierre Mégevand > Gesendet: Mittwoch, 15. Januar 2014 15:48 > An: fieldtrip at science.ru.nl > > > Betreff: Re: [FieldTrip] Problems with statistics for circular data > > > > Dear Thomas, > > > > When the assumptions of the parametric Watson-Williams test aren't met, you > can use non-parametric statistical tests for circular data, such as Watson's > Yr or U2 tests. > > > > The Yr test is implemented in the MATLAB toolbox PhasePACK by Daniel > Rizzuto: cmean_test.m function, > https://github.com/iandol/spikes/tree/master/Various/PhasePACK). > > > > You can find matlab code for the U2 test here: > http://www.mathworks.com/matlabcentral/fileexchange/43543-watsons-u2-statistic-based-permutation-test-for-circular-data. > I programmed this; it runs very slowly, so if anyone is interested in > looking into it I'm sure we could make it much better. > > > > Pierre > > -- > > Pierre Mégevand, MD, PhD > > Post-doctoral research fellow > > Laboratory for Multimodal Human Brain Mapping > > Feinstein Institute for Medical Research > > Manhasset, NY, USA > > > > On Wed, Jan 15, 2014 at 5:20 AM, wrote: > > 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. Re: Problems with statistics for circular data (Tobias Staudigl) > 2. Re: ft_sourcestatistics and sourcegrandaverage time series > (jan-mathijs schoffelen) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 15 Jan 2014 10:19:04 +0100 > From: Tobias Staudigl > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Problems with statistics for circular data > Message-ID: <52D65288.3070207 at uni-konstanz.de> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > > > Dear Thomas, > > try using circ_dist.m (in the circ_stats toolbox by Berens). > This should solve the circular difference issue. > > all the best, > Tobias > > Am 15.01.2014 09:35, schrieb Thomas.Baumgarten at med.uni-duesseldorf.de: >> >> Dear FieldTrip users, >> >> I am working on a set of circular data (phase angles of ongoing >> oscillations computed via Hilbert transform) and would like to >> statistically compare two conditions (A,B). For this, I use the >> circular statistics toolbox for matlab by P. Berens. I worked on this >> problem from two different angles: >> >> 1. First, I tried to directly compare the two conditions via the >> Watson-Williams two-sample test (function: circ_wwtest). >> Unfortunately, this didn't work out, since the test requires an >> average resultant vector length of > 0.45 for n >= 11 entries/ >> subjects, an assumption which is not met by my data. >> >> 2. Second, I tried to calculate the angle of difference between the >> two conditions (angle(A) -- angle(B)) and then used the one-sample > >> mean angle test (function: circ_mtest) to test if the resulting angle >> of difference is significantly different from zero. Here, the >> following problems arise: Since the resulting angles for A and B range >> from --pi to +pi, there are cases when the subtraction of the two >> angles results in roughly +2pi or -2pi (e.g. cases where (A = pi) -- > >> (B = -pi) = 2pi), resulting in an error from the circ_mtest function. >> I tried to solve this problem by using a modulus (2pi) operation (i.e. >> by 'cleaning out' the redundant circumventions while at the same time >> preserving the angle information), but unfortunately this didn't work >> out either. >> >> The only other option I can think of would be to generate surrogate >> data (i.e. a matrix with the same dimensions as the matrix with the >> angles of difference , only filled with zeros) and to apply a >> cluster-based permutation test (similar to ft_freqstatitics). Although >> this would take care of my multiple-comparison problem, I am not quite >> sure if the cluster correction is still valid in this case and if this >> test would work for circular data. >> >> I would greatly appreciate any comments and advice on this matter. >> >> Thanks for your help, >> >> Thomas >> >> Thomas Baumgarten, PhD Student >> >> Institute of Clinical Neuroscience and Medical Psychology, Medical >> Faculty, Heinrich-Heine-University D?sseldorf, Universit?tsstra?e 1, >> 40225 D?sseldorf, Germany > >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Dr. Tobias Staudigl > Fachbereich Psychologie - ZPR > Postfach ZPR > 78457 Konstanz > ZPR, Haus 12 > Tel.: +49 (0)7531 / 88 - 5703 > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > > ------------------------------ > > Message: 2 > Date: Wed, 15 Jan 2014 11:18:53 +0100 > From: jan-mathijs schoffelen > To: FieldTrip discussion list > Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage > time series > Message-ID: <14425A96-E395-4757-904B-5AFB8FEED3EB at donders.ru.nl> > Content-Type: text/plain; charset="us-ascii" > > Hi Kaelasha, > > Sorry for being unclear. You can do something like: > > stat = ft_sourcestatistics(cfg, data1, data2, data3, data4, ....), or stat = > ft_sourcestatistics(cfg, data{:}); where data is a cell-array of structures > (1 cell for each participant/condition). > > Best, > Jan-Mathijs > > > > > On Jan 15, 2014, at 9:14 AM, Kaelasha Tyler wrote: > >> Hi Jan-Mathijs, >> >> Thanks for this response. >> I still have a question though. >> You mentioned that it is not necessary to use ft_sourcegrandaverage to >> perform statistical analysis with source space ERFs across multiple >> participants. However, what you appeared to suggest in your email, does >> appear to still use a grand average, e.g. you wrote: >> >> >you can do something like this >> >> >cfg = your cfg to ft_sourcestatistics >> >stat = ft_sourcestatistics(cfg, grandavg{:}); >> >> Having played around with it a bit more, I am still unclear how to use >> multiple inputs (e.g., multiple subjects source data) when using >> ft_sourcestatistics. I had thought that ft_sourcegrandavarge was a >> necessity. >> Can you make this a bit clearer? >> >> Also, I did go back and use cfg.fixedori='yes' when calling my first >> ft_srouceanalysis and moved also my source.avg.mom data into source.avg.pow >> as you suggested, but this still leaves me with the question above- how to >> use multiple subjects source data in ft_sourcestatistics? >> >> Once again, any help from anyone would be much appreciated! >> >> Kaelasha >> >> From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on >> behalf of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] >> Sent: Tuesday, 14 January 2014 5:52 PM >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] ft_sourcestatistics and sourcegrandaverage time >> series >> >> Hi Kaelasha, >> >> You actually don't need to use ft_sourcegrandaverage if your goal is to do >> statistics. Ft_sourcestatistics in principle knows how to deal with multiple >> inputs. >> Thus, >> rather than doing >> >> cfg = []; >> cfg.keepindividual = 'yes'; >> grandavg = ft_sourcegrandaverage(cfg, subjectdata{:}); >> >> you can do something like this >> >> cfg = your cfg to ft_sourcestatistics >> stat = ft_sourcestatistics(cfg, grandavg{:}); >> >> Now, the question boils down to 'how to fool ft_sourcestatistics to >> swallow my data?'. >> >> The following should more or less work (but requires some manual labour): >> >> The time courses at the voxel level are present in source.avg.mom. These >> are most likely 3xN, 3 dipole orientations times N time points. In order to >> reduce this, one can project the orientation along the first pca-axis. This >> can be achieved by a call to ft_sourcedescriptives with >> cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place >> with cfg.fixedori = 'yes'. >> Then, you could do something like: >> >> pow = zeros(size(source.pos,1),length(source.time); >> pow(source.inside,:) = cat(1,source.avg.mom{source.inside}); >> source.avg.pow = pow; >> >> Just to be sure, add a time-axis to the source structure, i.e. source.time >> = tlck.time (tlck being the data structure used to create the lcmv-output). >> >> I think this should bring you close to doing statistics. >> >> Best, >> Jan-Mathijs >> >> >> >> On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote: >> >>> Hi all, >>> >>> Reading through the discussion list, I see others have also had some >>> issues with creating grand averaged source space time series (ERFs) and >>> subsequent statistical analysis, but I can't see any solutions.... >>> >>> Questions: >>> How can I create time series (ERFs) for grand averaged source space data? >>> And, how can I do cluster analysis on these (yet to be created) grand >>> averaged source space ERFs? >>> >>> >>> I have used ft_SOURCEANALYSIS with method 'lcmv' for individual >>> participants to generate source space time series, in data.avg.mom. >>> >>> Subsequently I used ft_sourcegrandaverage to combine source space data >>> across subjects. >>> >>> However my grand averaged source data.avg only contains 'pow' and no >>> 'mom'. Eg, no time series for the grand averaged source space data. >>> >>> As such, I can not do cluster analysis on grand averaged ERFs in source >>> space. >>> >>> It appears that ft_sourcestatistics only works with parameters that have >>> not more than one value per grid point (e.g. pow, nai etc) and is unable to >>> work with ERF time series? Is this true? >>> >>> Can any one help with this? >>> >>> Much obliged. >>> Kaelasha > >>> >>> >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> Jan-Mathijs Schoffelen, MD PhD >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> >> Max Planck Institute for Psycholinguistics, >> Nijmegen, The Netherlands >> >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl > >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > > ------------------------------ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 38, Issue 18 > ***************************************** > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: circ_ttest_p_first.m Type: text/x-objcsrc Size: 1167 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: circ_ttest_p_second.m Type: text/x-objcsrc Size: 1188 bytes Desc: not available URL: From eelke.spaak at donders.ru.nl Thu Jan 16 13:16:06 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 16 Jan 2014 13:16:06 +0100 Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: <897231397.337853.1389873624028.JavaMail.root@bcbl.eu> References: <897231397.337853.1389873624028.JavaMail.root@bcbl.eu> Message-ID: Hi Fred, What about ft_resampledata? This is of course applied only after reading it in, but I'm not sure if it matters. Best, Eelke On 16 January 2014 13:00, Frédéric Roux wrote: > Dear all, > > does anyone know of a good method to downsample MEG-data > acquired with a CTF system before reading it into Matlab/fieldtrip. > > I remember that there is a command-line tool provided by CTF which can do > preprocessing, but I don't remember exactly if it does the job. > > Or does anyone know of a good alternative solution? > > Best, > Fred > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From j.herring at fcdonders.ru.nl Thu Jan 16 13:22:07 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 16 Jan 2014 13:22:07 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: <897231397.337853.1389873624028.JavaMail.root@bcbl.eu> References: <897231397.337853.1389873624028.JavaMail.root@bcbl.eu> Message-ID: <008801cf12b5$929f55d0$b7de0170$@herring@fcdonders.ru.nl> Hi Fred, If memory is an issue you could try reading-in the data per channel, resample, and appending afterwards. Best, Jim -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Frédéric Roux Sent: donderdag 16 januari 2014 13:00 To: FieldTrip discussion list Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear all, does anyone know of a good method to downsample MEG-data acquired with a CTF system before reading it into Matlab/fieldtrip. I remember that there is a command-line tool provided by CTF which can do preprocessing, but I don't remember exactly if it does the job. Or does anyone know of a good alternative solution? Best, Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From hweeling.lee at gmail.com Thu Jan 16 13:22:14 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 16 Jan 2014 13:22:14 +0100 Subject: [FieldTrip] problem with ICA Message-ID: Dear all, I've collected data using a 128 channel EEG cap, and I tried to perform ICA on the data. However, I got an error message with fieldtrip on Matlab. Here's the error message: the input is raw data with 127 channels and 1 trials selecting 123 channels baseline correcting data scaling data with 1 over 148.247820 concatenating data. concatenated data matrix size 123x2789000 starting decomposition using runica Input data size [123,2789000] = 123 channels, 2789000 frames/nFinding 123 ICA components using logistic ICA. Decomposing 184 frames per ICA weight ((15129)^2 = 2789000 weights, Initial learning rate will be 0.001, block size 75. Learning rate will be multiplied by 0.9 whenever angledelta >= 60 deg. More than 32 channels: default stopping weight change 1E-7 Training will end when wchange < 1e-07 or after 512 steps. Online bias adjustment will be used. Removing mean of each channel ... Final training data range: -3.46556 to 6.39436 Computing the sphering matrix... Starting weights are the identity matrix ... Sphering the data ... Beginning ICA training ... Data has rank 119. Cannot compute 123 components. the call to "ft_componentanalysis" took 148 seconds Could someone please let me know what went wrong? Thanks! Cheers, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at fcdonders.ru.nl Thu Jan 16 13:30:30 2014 From: stan.vanpelt at fcdonders.ru.nl (Stan van Pelt) Date: Thu, 16 Jan 2014 13:30:30 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: References: <897231397.337853.1389873624028.JavaMail.root@bcbl.eu> Message-ID: <00a201cf12b6$be30c9d0$3a925d70$@vanpelt@fcdonders.ru.nl> Hi Frederic, You might be able to do that with CTF software, most likely DataEditor. Best, Stan -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak Sent: donderdag 16 januari 2014 13:16 To: FieldTrip discussion list Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Hi Fred, What about ft_resampledata? This is of course applied only after reading it in, but I'm not sure if it matters. Best, Eelke On 16 January 2014 13:00, Frédéric Roux wrote: > Dear all, > > does anyone know of a good method to downsample MEG-data acquired with > a CTF system before reading it into Matlab/fieldtrip. > > I remember that there is a command-line tool provided by CTF which can > do preprocessing, but I don't remember exactly if it does the job. > > Or does anyone know of a good alternative solution? > > Best, > Fred > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From f.roux at bcbl.eu Thu Jan 16 13:30:28 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 16 Jan 2014 13:30:28 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: <008801cf12b5$929f55d0$b7de0170$@herring@fcdonders.ru.nl> Message-ID: <145116688.338728.1389875428825.JavaMail.root@bcbl.eu> Hi Jim, Hi Eelke, thanks for the fast response. My issue is that I would like to use ft_definetrial to get to my trigger events, hence the reason why I want to downsample the raw-data before accessing it with ft. But technically, I guess I should be able to write up my own trigger detection code. It's just more convenient without having to do that extra step. I thought I'd ask before doing that. In any case if anyone comes up with an idea how to do the downsampling on the raw-data, please let me know. Best, Fred Frédéric Roux ----- Original Message ----- From: "J.D. Herring (Jim)" To: "FieldTrip discussion list" Sent: Thursday, January 16, 2014 1:22:07 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Hi Fred, If memory is an issue you could try reading-in the data per channel, resample, and appending afterwards. Best, Jim -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Frédéric Roux Sent: donderdag 16 januari 2014 13:00 To: FieldTrip discussion list Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear all, does anyone know of a good method to downsample MEG-data acquired with a CTF system before reading it into Matlab/fieldtrip. I remember that there is a command-line tool provided by CTF which can do preprocessing, but I don't remember exactly if it does the job. Or does anyone know of a good alternative solution? Best, Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From aaron.schurger at gmail.com Thu Jan 16 13:42:53 2014 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Thu, 16 Jan 2014 13:42:53 +0100 Subject: [FieldTrip] problem with ICA In-Reply-To: References: Message-ID: Sounds like you may have done something to your data, like interpolating channels, before you ran ICA. It is OK to filter your data before running ICA, and some other operations are OK too, but if you do anything that mixes activity from different channels in any way, then you can run into problems with ICA (and results from ICA can be invalid). Aaron On Thu, Jan 16, 2014 at 1:22 PM, Hwee Ling Lee wrote: > Dear all, > > I've collected data using a 128 channel EEG cap, and I tried to perform ICA > on the data. However, I got an error message with fieldtrip on Matlab. > Here's the error message: > > the input is raw data with 127 channels and 1 trials > selecting 123 channels > baseline correcting data > scaling data with 1 over 148.247820 > concatenating data. > concatenated data matrix size 123x2789000 > starting decomposition using runica > > Input data size [123,2789000] = 123 channels, 2789000 frames/nFinding 123 > ICA components using logistic ICA. > Decomposing 184 frames per ICA weight ((15129)^2 = 2789000 weights, Initial > learning rate will be 0.001, block size 75. > Learning rate will be multiplied by 0.9 whenever angledelta >= 60 deg. > More than 32 channels: default stopping weight change 1E-7 > Training will end when wchange < 1e-07 or after 512 steps. > Online bias adjustment will be used. > Removing mean of each channel ... > Final training data range: -3.46556 to 6.39436 > Computing the sphering matrix... > Starting weights are the identity matrix ... > Sphering the data ... > Beginning ICA training ... > Data has rank 119. Cannot compute 123 components. > the call to "ft_componentanalysis" took 148 seconds > > Could someone please let me know what went wrong? > > Thanks! > > Cheers, > Hweeling > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Senior researcher Laboratory of Cognitive Neuroscience Brain-Mind Institute, Department of Life Sciences École Polytechnique Fédérale de Lausanne Station 19, AI 2101 1015 Lausanne, Switzerland +41 21 693 1771 aaron.schurger at epfl.ch http://lnco.epfl.ch/ From eelke.spaak at donders.ru.nl Thu Jan 16 13:54:29 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 16 Jan 2014 13:54:29 +0100 Subject: [FieldTrip] problem with ICA In-Reply-To: References: Message-ID: Hi Hweeling, To add to Aaron's explanation, you can instruct the algorithm to use a subspace projection of your data by specifying cfg.runica.pca = N, where N is the rank of your data (in your case 119, it seems). Best, Eelke On 16 January 2014 13:42, Aaron Schurger wrote: > Sounds like you may have done something to your data, like > interpolating channels, before you ran ICA. It is OK to filter your > data before running ICA, and some other operations are OK too, but if > you do anything that mixes activity from different channels in any > way, then you can run into problems with ICA (and results from ICA can > be invalid). > Aaron > > On Thu, Jan 16, 2014 at 1:22 PM, Hwee Ling Lee wrote: >> Dear all, >> >> I've collected data using a 128 channel EEG cap, and I tried to perform ICA >> on the data. However, I got an error message with fieldtrip on Matlab. >> Here's the error message: >> >> the input is raw data with 127 channels and 1 trials >> selecting 123 channels >> baseline correcting data >> scaling data with 1 over 148.247820 >> concatenating data. >> concatenated data matrix size 123x2789000 >> starting decomposition using runica >> >> Input data size [123,2789000] = 123 channels, 2789000 frames/nFinding 123 >> ICA components using logistic ICA. >> Decomposing 184 frames per ICA weight ((15129)^2 = 2789000 weights, Initial >> learning rate will be 0.001, block size 75. >> Learning rate will be multiplied by 0.9 whenever angledelta >= 60 deg. >> More than 32 channels: default stopping weight change 1E-7 >> Training will end when wchange < 1e-07 or after 512 steps. >> Online bias adjustment will be used. >> Removing mean of each channel ... >> Final training data range: -3.46556 to 6.39436 >> Computing the sphering matrix... >> Starting weights are the identity matrix ... >> Sphering the data ... >> Beginning ICA training ... >> Data has rank 119. Cannot compute 123 components. >> the call to "ft_componentanalysis" took 148 seconds >> >> Could someone please let me know what went wrong? >> >> Thanks! >> >> Cheers, >> Hweeling >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Aaron Schurger, PhD > Senior researcher > Laboratory of Cognitive Neuroscience > Brain-Mind Institute, Department of Life Sciences > École Polytechnique Fédérale de Lausanne > Station 19, AI 2101 > 1015 Lausanne, Switzerland > +41 21 693 1771 > aaron.schurger at epfl.ch > http://lnco.epfl.ch/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From litvak.vladimir at gmail.com Thu Jan 16 13:57:25 2014 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 16 Jan 2014 12:57:25 +0000 Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: <145116688.338728.1389875428825.JavaMail.root@bcbl.eu> References: <145116688.338728.1389875428825.JavaMail.root@bcbl.eu> Message-ID: Dear Fred, The CTF command line tool is called newDs . There is a configuration file that you should set-up to specify that you want it to downsample. I used it a long time ago but I can try to find out more details if you can't figure it out yourself. The documentation for the function should be in CTF PDF files. Best, Vladimir On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux wrote: > Hi Jim, Hi Eelke, > > thanks for the fast response. > > My issue is that I would like to use ft_definetrial > to get to my trigger events, hence the reason why > I want to downsample the raw-data before accessing it > with ft. > > But technically, I guess I should be able to write up > my own trigger detection code. It's just more convenient > without having to do that extra step. > > I thought I'd ask before doing that. > > In any case if anyone comes up with an idea how to do the > downsampling on the raw-data, please let me know. > > Best, > Fred > > > > Frédéric Roux > > ----- Original Message ----- > From: "J.D. Herring (Jim)" > To: "FieldTrip discussion list" > Sent: Thursday, January 16, 2014 1:22:07 PM > Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > Hi Fred, > > If memory is an issue you could try reading-in the data per channel, > resample, and appending afterwards. > > Best, > > Jim > > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Frédéric Roux > Sent: donderdag 16 januari 2014 13:00 > To: FieldTrip discussion list > Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > Dear all, > > does anyone know of a good method to downsample MEG-data acquired with a > CTF system before reading it into Matlab/fieldtrip. > > I remember that there is a command-line tool provided by CTF which can do > preprocessing, but I don't remember exactly if it does the job. > > Or does anyone know of a good alternative solution? > > Best, > Fred > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Thu Jan 16 14:10:58 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 16 Jan 2014 14:10:58 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: Message-ID: <2116649278.339295.1389877858745.JavaMail.root@bcbl.eu> Hi Vladimir, yes now I remember - newDs - will give it a try. Thanks a lot everyone for the fast and helpful comments! Fred ----- Original Message ----- From: "Vladimir Litvak" To: "FieldTrip discussion list" Sent: Thursday, January 16, 2014 1:57:25 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear Fred, The CTF command line tool is called newDs . There is a configuration file that you should set-up to specify that you want it to downsample. I used it a long time ago but I can try to find out more details if you can't figure it out yourself. The documentation for the function should be in CTF PDF files. Best, Vladimir On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: Hi Jim, Hi Eelke, thanks for the fast response. My issue is that I would like to use ft_definetrial to get to my trigger events, hence the reason why I want to downsample the raw-data before accessing it with ft. But technically, I guess I should be able to write up my own trigger detection code. It's just more convenient without having to do that extra step. I thought I'd ask before doing that. In any case if anyone comes up with an idea how to do the downsampling on the raw-data, please let me know. Best, Fred Frédéric Roux ----- Original Message ----- From: "J.D. Herring (Jim)" < j.herring at fcdonders.ru.nl > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Thursday, January 16, 2014 1:22:07 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Hi Fred, If memory is an issue you could try reading-in the data per channel, resample, and appending afterwards. Best, Jim -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto: fieldtrip-bounces at science.ru.nl ] On Behalf Of Frédéric Roux Sent: donderdag 16 januari 2014 13:00 To: FieldTrip discussion list Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear all, does anyone know of a good method to downsample MEG-data acquired with a CTF system before reading it into Matlab/fieldtrip. I remember that there is a command-line tool provided by CTF which can do preprocessing, but I don't remember exactly if it does the job. Or does anyone know of a good alternative solution? Best, Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From litvak.vladimir at gmail.com Thu Jan 16 14:28:03 2014 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 16 Jan 2014 13:28:03 +0000 Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: <2116649278.339295.1389877858745.JavaMail.root@bcbl.eu> References: <2116649278.339295.1389877858745.JavaMail.root@bcbl.eu> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: warning1.txt URL: -------------- next part -------------- Here is my old code. Actually the config file is just for filtering but I think you must low-pass before downsampling as it won't do it automatically. It might do more than you need as I also had to convert pseudo-epoched to continuous data. Vladimir On Thu, Jan 16, 2014 at 1:10 PM, Frédéric Roux wrote: > Hi Vladimir, > > yes now I remember - newDs - will give it a try. > > Thanks a lot everyone for the fast and helpful comments! > > Fred > > ----- Original Message ----- > From: "Vladimir Litvak" > To: "FieldTrip discussion list" > Sent: Thursday, January 16, 2014 1:57:25 PM > Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > > > Dear Fred, > > > The CTF command line tool is called newDs . There is a configuration file > that you should set-up to specify that you want it to downsample. I used it > a long time ago but I can try to find out more details if you can't figure > it out yourself. The documentation for the function should be in CTF PDF > files. > > > Best, > > > Vladimir > > > > On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: > > > Hi Jim, Hi Eelke, > > thanks for the fast response. > > My issue is that I would like to use ft_definetrial > to get to my trigger events, hence the reason why > I want to downsample the raw-data before accessing it > with ft. > > But technically, I guess I should be able to write up > my own trigger detection code. It's just more convenient > without having to do that extra step. > > I thought I'd ask before doing that. > > In any case if anyone comes up with an idea how to do the > downsampling on the raw-data, please let me know. > > Best, > Fred > > > > Frédéric Roux > > > ----- Original Message ----- > From: "J.D. Herring (Jim)" < j.herring at fcdonders.ru.nl > > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > > Sent: Thursday, January 16, 2014 1:22:07 PM > Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > Hi Fred, > > > If memory is an issue you could try reading-in the data per channel, > resample, and appending afterwards. > > Best, > > Jim > > > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl > [mailto: fieldtrip-bounces at science.ru.nl ] On Behalf Of Frédéric Roux > Sent: donderdag 16 januari 2014 13:00 > To: FieldTrip discussion list > > > Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > Dear all, > > does anyone know of a good method to downsample MEG-data acquired with a > CTF system before reading it into Matlab/fieldtrip. > > I remember that there is a command-line tool provided by CTF which can do > preprocessing, but I don't remember exactly if it does the job. > > Or does anyone know of a good alternative solution? > > Best, > Fred > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > 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: processing.cfg Type: application/octet-stream Size: 1237 bytes Desc: not available URL: From f.roux at bcbl.eu Thu Jan 16 15:51:06 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 16 Jan 2014 15:51:06 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: Message-ID: <1097371150.341210.1389883866905.JavaMail.root@bcbl.eu> Hi Vladimir, looks like the shell-script got blocked my the mail-server. would you mind sending it to froux at bcbl.eu ? Thanks, Fred Frédéric Roux ----- Original Message ----- From: "Vladimir Litvak" To: "FieldTrip discussion list" Sent: Thursday, January 16, 2014 2:28:03 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing [Text File:warning1.txt] Here is my old code. Actually the config file is just for filtering but I think you must low-pass before downsampling as it won't do it automatically. It might do more than you need as I also had to convert pseudo-epoched to continuous data. Vladimir On Thu, Jan 16, 2014 at 1:10 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: Hi Vladimir, yes now I remember - newDs - will give it a try. Thanks a lot everyone for the fast and helpful comments! Fred ----- Original Message ----- From: "Vladimir Litvak" < litvak.vladimir at gmail.com > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Thursday, January 16, 2014 1:57:25 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear Fred, The CTF command line tool is called newDs . There is a configuration file that you should set-up to specify that you want it to downsample. I used it a long time ago but I can try to find out more details if you can't figure it out yourself. The documentation for the function should be in CTF PDF files. Best, Vladimir On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: Hi Jim, Hi Eelke, thanks for the fast response. My issue is that I would like to use ft_definetrial to get to my trigger events, hence the reason why I want to downsample the raw-data before accessing it with ft. But technically, I guess I should be able to write up my own trigger detection code. It's just more convenient without having to do that extra step. I thought I'd ask before doing that. In any case if anyone comes up with an idea how to do the downsampling on the raw-data, please let me know. Best, Fred Frédéric Roux ----- Original Message ----- From: "J.D. Herring (Jim)" < j.herring at fcdonders.ru.nl > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Thursday, January 16, 2014 1:22:07 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Hi Fred, If memory is an issue you could try reading-in the data per channel, resample, and appending afterwards. Best, Jim -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto: fieldtrip-bounces at science.ru.nl ] On Behalf Of Frédéric Roux Sent: donderdag 16 januari 2014 13:00 To: FieldTrip discussion list Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear all, does anyone know of a good method to downsample MEG-data acquired with a CTF system before reading it into Matlab/fieldtrip. I remember that there is a command-line tool provided by CTF which can do preprocessing, but I don't remember exactly if it does the job. Or does anyone know of a good alternative solution? Best, Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ 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 litvak.vladimir at gmail.com Thu Jan 16 15:58:31 2014 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 16 Jan 2014 14:58:31 +0000 Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: <1097371150.341210.1389883866905.JavaMail.root@bcbl.eu> References: <1097371150.341210.1389883866905.JavaMail.root@bcbl.eu> Message-ID: Here it is, just in case some else will need it in the future. #!/bin/sh files=`ls -1Ad ${1}` for f in $files do newSingleTrialDs $f ./s_`basename $f` newDs -f -filter processing.cfg -resample 8 ./s_`basename $f` ./r_`basename $f` rm -rf ./s_`basename $f` done On Thu, Jan 16, 2014 at 2:51 PM, Frédéric Roux wrote: > Hi Vladimir, > > looks like the shell-script got blocked my the mail-server. > would you mind sending it to froux at bcbl.eu ? > > Thanks, > > Fred > > Frédéric Roux > > ----- Original Message ----- > From: "Vladimir Litvak" > To: "FieldTrip discussion list" > Sent: Thursday, January 16, 2014 2:28:03 PM > Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > > [Text File:warning1.txt] > > > > Here is my old code. Actually the config file is just for filtering but I > think you must low-pass before downsampling as it won't do it > automatically. It might do more than you need as I also had to convert > pseudo-epoched to continuous data. > > > Vladimir > > > > On Thu, Jan 16, 2014 at 1:10 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: > > > Hi Vladimir, > > yes now I remember - newDs - will give it a try. > > Thanks a lot everyone for the fast and helpful comments! > > Fred > > > ----- Original Message ----- > From: "Vladimir Litvak" < litvak.vladimir at gmail.com > > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > > > > Sent: Thursday, January 16, 2014 1:57:25 PM > Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > > > Dear Fred, > > > The CTF command line tool is called newDs . There is a configuration file > that you should set-up to specify that you want it to downsample. I used it > a long time ago but I can try to find out more details if you can't figure > it out yourself. The documentation for the function should be in CTF PDF > files. > > > Best, > > > Vladimir > > > > On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: > > > Hi Jim, Hi Eelke, > > thanks for the fast response. > > My issue is that I would like to use ft_definetrial > to get to my trigger events, hence the reason why > I want to downsample the raw-data before accessing it > with ft. > > But technically, I guess I should be able to write up > my own trigger detection code. It's just more convenient > without having to do that extra step. > > I thought I'd ask before doing that. > > In any case if anyone comes up with an idea how to do the > downsampling on the raw-data, please let me know. > > Best, > Fred > > > > Frédéric Roux > > > ----- Original Message ----- > From: "J.D. Herring (Jim)" < j.herring at fcdonders.ru.nl > > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > > Sent: Thursday, January 16, 2014 1:22:07 PM > Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > Hi Fred, > > > If memory is an issue you could try reading-in the data per channel, > resample, and appending afterwards. > > Best, > > Jim > > > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl > [mailto: fieldtrip-bounces at science.ru.nl ] On Behalf Of Frédéric Roux > Sent: donderdag 16 januari 2014 13:00 > To: FieldTrip discussion list > > > Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing > > Dear all, > > does anyone know of a good method to downsample MEG-data acquired with a > CTF system before reading it into Matlab/fieldtrip. > > I remember that there is a command-line tool provided by CTF which can do > preprocessing, but I don't remember exactly if it does the job. > > Or does anyone know of a good alternative solution? > > Best, > Fred > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > 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 hweeling.lee at gmail.com Thu Jan 16 16:09:13 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 16 Jan 2014 16:09:13 +0100 Subject: [FieldTrip] problem with ICA In-Reply-To: References: Message-ID: Hi, Thanks for suggestion. Actually, prior to running ICA, I did a notch filter of 50 Hz and also to remove cardioballistic effects based on the ECG channel. Does it consider to be mixing the channels? Cheers, Hweeling On 16 January 2014 13:54, Eelke Spaak wrote: > Hi Hweeling, > > To add to Aaron's explanation, you can instruct the algorithm to use a > subspace projection of your data by specifying cfg.runica.pca = N, > where N is the rank of your data (in your case 119, it seems). > > Best, > Eelke > > On 16 January 2014 13:42, Aaron Schurger wrote: > > Sounds like you may have done something to your data, like > > interpolating channels, before you ran ICA. It is OK to filter your > > data before running ICA, and some other operations are OK too, but if > > you do anything that mixes activity from different channels in any > > way, then you can run into problems with ICA (and results from ICA can > > be invalid). > > Aaron > > > > On Thu, Jan 16, 2014 at 1:22 PM, Hwee Ling Lee > wrote: > >> Dear all, > >> > >> I've collected data using a 128 channel EEG cap, and I tried to perform > ICA > >> on the data. However, I got an error message with fieldtrip on Matlab. > >> Here's the error message: > >> > >> the input is raw data with 127 channels and 1 trials > >> selecting 123 channels > >> baseline correcting data > >> scaling data with 1 over 148.247820 > >> concatenating data. > >> concatenated data matrix size 123x2789000 > >> starting decomposition using runica > >> > >> Input data size [123,2789000] = 123 channels, 2789000 frames/nFinding > 123 > >> ICA components using logistic ICA. > >> Decomposing 184 frames per ICA weight ((15129)^2 = 2789000 weights, > Initial > >> learning rate will be 0.001, block size 75. > >> Learning rate will be multiplied by 0.9 whenever angledelta >= 60 deg. > >> More than 32 channels: default stopping weight change 1E-7 > >> Training will end when wchange < 1e-07 or after 512 steps. > >> Online bias adjustment will be used. > >> Removing mean of each channel ... > >> Final training data range: -3.46556 to 6.39436 > >> Computing the sphering matrix... > >> Starting weights are the identity matrix ... > >> Sphering the data ... > >> Beginning ICA training ... > >> Data has rank 119. Cannot compute 123 components. > >> the call to "ft_componentanalysis" took 148 seconds > >> > >> Could someone please let me know what went wrong? > >> > >> Thanks! > >> > >> Cheers, > >> Hweeling > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > -- > > Aaron Schurger, PhD > > Senior researcher > > Laboratory of Cognitive Neuroscience > > Brain-Mind Institute, Department of Life Sciences > > École Polytechnique Fédérale de Lausanne > > Station 19, AI 2101 > > 1015 Lausanne, Switzerland > > +41 21 693 1771 > > aaron.schurger at epfl.ch > > http://lnco.epfl.ch/ > > > > _______________________________________________ > > 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 > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Thu Jan 16 17:17:01 2014 From: mcantor at umich.edu (Max Cantor) Date: Thu, 16 Jan 2014 11:17:01 -0500 Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: References: <1097371150.341210.1389883866905.JavaMail.root@bcbl.eu> Message-ID: Hi, So I'm having an issue involving, well I think the issue may not be the downsampling per se, but it does involve attempting to recreate a code similar to the above but in fieldtrip. I'm currently attempting two different methods: 1. Method One: Define trials as a cfg_(condition), with the preprocessing parameters contained within the cfg. Then preprocess the cfg_condition. Finally, downsample using ft_resampledata 2. Method Two: Preprocess the data by channel in a for loop, then concatenate using ft_appenddata, followed by epoching, and finally downsampling. In the original version of this method I downsampled in the for loop, as doing it without downsampling in the loop still strains my computers memory, but when I do that the epoching doesn't seem to work for reasons I partially understand, but in any case can't figure out a workaround for that would be reasonably straightforward. In any case, when I do either of these methods, I run into an error: 1. For the first method reading and preprocessing trial 1 from 100 getCTFdata: dataList error: points=21086:21085 trial=1 points/trial=1584000 No. of trials=1 2. The Second method Attempted to access data.time.%cell(1); index out of bounds because numel(data.time.%cell)=0. Error in ft_resampledata (line 149) firstsmp(itr) = data.time{itr}(1); Again, I'm not entirely convinced the issue is with downsampling per se, but that is my best guess at the moment. Any help would be greatly appreciated. Max Cantor Research Assistant Computational Neurolinguistics Lab University of Michigan On Thu, Jan 16, 2014 at 9:58 AM, Vladimir Litvak wrote: > Here it is, just in case some else will need it in the future. > > #!/bin/sh > files=`ls -1Ad ${1}` > > for f in $files > do > newSingleTrialDs $f ./s_`basename $f` > newDs -f -filter processing.cfg -resample 8 ./s_`basename $f` > ./r_`basename $f` > rm -rf ./s_`basename $f` > done > > > > > On Thu, Jan 16, 2014 at 2:51 PM, Frédéric Roux wrote: > >> Hi Vladimir, >> >> looks like the shell-script got blocked my the mail-server. >> would you mind sending it to froux at bcbl.eu ? >> >> Thanks, >> >> Fred >> >> Frédéric Roux >> >> ----- Original Message ----- >> From: "Vladimir Litvak" >> To: "FieldTrip discussion list" >> Sent: Thursday, January 16, 2014 2:28:03 PM >> Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing >> >> >> [Text File:warning1.txt] >> >> >> >> Here is my old code. Actually the config file is just for filtering but I >> think you must low-pass before downsampling as it won't do it >> automatically. It might do more than you need as I also had to convert >> pseudo-epoched to continuous data. >> >> >> Vladimir >> >> >> >> On Thu, Jan 16, 2014 at 1:10 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: >> >> >> Hi Vladimir, >> >> yes now I remember - newDs - will give it a try. >> >> Thanks a lot everyone for the fast and helpful comments! >> >> Fred >> >> >> ----- Original Message ----- >> From: "Vladimir Litvak" < litvak.vladimir at gmail.com > >> To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > >> >> >> Sent: Thursday, January 16, 2014 1:57:25 PM >> Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing >> >> >> >> Dear Fred, >> >> >> The CTF command line tool is called newDs . There is a configuration file >> that you should set-up to specify that you want it to downsample. I used it >> a long time ago but I can try to find out more details if you can't figure >> it out yourself. The documentation for the function should be in CTF PDF >> files. >> >> >> Best, >> >> >> Vladimir >> >> >> >> On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: >> >> >> Hi Jim, Hi Eelke, >> >> thanks for the fast response. >> >> My issue is that I would like to use ft_definetrial >> to get to my trigger events, hence the reason why >> I want to downsample the raw-data before accessing it >> with ft. >> >> But technically, I guess I should be able to write up >> my own trigger detection code. It's just more convenient >> without having to do that extra step. >> >> I thought I'd ask before doing that. >> >> In any case if anyone comes up with an idea how to do the >> downsampling on the raw-data, please let me know. >> >> Best, >> Fred >> >> >> >> Frédéric Roux >> >> >> ----- Original Message ----- >> From: "J.D. Herring (Jim)" < j.herring at fcdonders.ru.nl > >> To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > >> Sent: Thursday, January 16, 2014 1:22:07 PM >> Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing >> >> Hi Fred, >> >> >> If memory is an issue you could try reading-in the data per channel, >> resample, and appending afterwards. >> >> Best, >> >> Jim >> >> >> -----Original Message----- >> From: fieldtrip-bounces at science.ru.nl >> [mailto: fieldtrip-bounces at science.ru.nl ] On Behalf Of Frédéric Roux >> Sent: donderdag 16 januari 2014 13:00 >> To: FieldTrip discussion list >> >> >> Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing >> >> Dear all, >> >> does anyone know of a good method to downsample MEG-data acquired with a >> CTF system before reading it into Matlab/fieldtrip. >> >> I remember that there is a command-line tool provided by CTF which can do >> preprocessing, but I don't remember exactly if it does the job. >> >> Or does anyone know of a good alternative solution? >> >> Best, >> Fred >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Thu Jan 16 20:32:53 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 16 Jan 2014 20:32:53 +0100 (CET) Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing In-Reply-To: Message-ID: <1884515464.344585.1389900773892.JavaMail.root@bcbl.eu> Thanks Vladimir, this is very helpful. Best, Fred ----- Original Message ----- From: "Vladimir Litvak" To: "FieldTrip discussion list" Sent: Thursday, January 16, 2014 3:58:31 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Here it is, just in case some else will need it in the future. #!/bin/sh files=`ls -1Ad ${1}` for f in $files do newSingleTrialDs $f ./s_`basename $f` newDs -f -filter processing.cfg -resample 8 ./s_`basename $f` ./r_`basename $f` rm -rf ./s_`basename $f` done On Thu, Jan 16, 2014 at 2:51 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: Hi Vladimir, looks like the shell-script got blocked my the mail-server. would you mind sending it to froux at bcbl.eu ? Thanks, Fred Frédéric Roux ----- Original Message ----- From: "Vladimir Litvak" < litvak.vladimir at gmail.com > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Thursday, January 16, 2014 2:28:03 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing [Text File:warning1.txt] Here is my old code. Actually the config file is just for filtering but I think you must low-pass before downsampling as it won't do it automatically. It might do more than you need as I also had to convert pseudo-epoched to continuous data. Vladimir On Thu, Jan 16, 2014 at 1:10 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: Hi Vladimir, yes now I remember - newDs - will give it a try. Thanks a lot everyone for the fast and helpful comments! Fred ----- Original Message ----- From: "Vladimir Litvak" < litvak.vladimir at gmail.com > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Thursday, January 16, 2014 1:57:25 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear Fred, The CTF command line tool is called newDs . There is a configuration file that you should set-up to specify that you want it to downsample. I used it a long time ago but I can try to find out more details if you can't figure it out yourself. The documentation for the function should be in CTF PDF files. Best, Vladimir On Thu, Jan 16, 2014 at 12:30 PM, Frédéric Roux < f.roux at bcbl.eu > wrote: Hi Jim, Hi Eelke, thanks for the fast response. My issue is that I would like to use ft_definetrial to get to my trigger events, hence the reason why I want to downsample the raw-data before accessing it with ft. But technically, I guess I should be able to write up my own trigger detection code. It's just more convenient without having to do that extra step. I thought I'd ask before doing that. In any case if anyone comes up with an idea how to do the downsampling on the raw-data, please let me know. Best, Fred Frédéric Roux ----- Original Message ----- From: "J.D. Herring (Jim)" < j.herring at fcdonders.ru.nl > To: "FieldTrip discussion list" < fieldtrip at science.ru.nl > Sent: Thursday, January 16, 2014 1:22:07 PM Subject: Re: [FieldTrip] downsampling CTF data prior to ft_preprocessing Hi Fred, If memory is an issue you could try reading-in the data per channel, resample, and appending afterwards. Best, Jim -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto: fieldtrip-bounces at science.ru.nl ] On Behalf Of Frédéric Roux Sent: donderdag 16 januari 2014 13:00 To: FieldTrip discussion list Subject: [FieldTrip] downsampling CTF data prior to ft_preprocessing Dear all, does anyone know of a good method to downsample MEG-data acquired with a CTF system before reading it into Matlab/fieldtrip. I remember that there is a command-line tool provided by CTF which can do preprocessing, but I don't remember exactly if it does the job. Or does anyone know of a good alternative solution? Best, Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From berryv.dberg at gmail.com Thu Jan 16 23:11:50 2014 From: berryv.dberg at gmail.com (berry van den berg) Date: Thu, 16 Jan 2014 14:11:50 -0800 Subject: [FieldTrip] ft_statistics_montecarlo runs slow under ubuntu 13.10 Message-ID: Dear Fieldtrip experts, This might be an odd question, but maybe someone has an idea where to start. I just got a fancy new laptop (gigabyte p34g) and dual boot with ubuntu and windows. I usually work in Ubuntu for analysis, so I ran a time freq statistics analysis and noticed that ft_statistics_montecarlo runs extremely slow under Ubuntu.... In windows it runs at normal speed. The difference is huge, 97 seconds vs, 2 seconds for 100 iterations, 24 subjects. Speed also doesnt seem influenced by averaging over freq or/and time, it is just slow. It is not the cpu clock speed (ubuntu nicely utilizes turbo mode, running max 3ghz), the cpu is not fully utilized though (only 30 percent or so)... I run matlab 2013b, fieldtrip 20140115 Specs are 8gb ram; only 4gb utilized. 4700HQ cpu Any ideas, because I am clueless Cheers, -- Berry van den Berg berryv.dberg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Sun Jan 19 12:21:36 2014 From: roeysc at gmail.com (Roey Schurr) Date: Sun, 19 Jan 2014 13:21:36 +0200 Subject: [FieldTrip] Creating a head model using OPENMEEG - Intersecting mesh error Message-ID: Dear fieldtrippers, I am writing you after encountering an error using the OPENMEEG method for creating a head model, which I need for source reconstruction of EEG data (using 19 electrodes), e.g.: ... triangles 5018 and 5129 are intersecting triangles 5305 and 5781 are intersecting triangles 5879 and 5907 are intersecting !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!! WARNING !!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Mesh is self intersecting ! ... 2 meshes are intersecting ! It seems to be the same problem reported by Olivia about two years ago: http://mailman.science.ru.nl/pipermail/fieldtrip/2012-March/004881.html In what follows I will describe the main steps in my script: 1) I create a segmented 'brain','skull','scalp' mri structure of the subject: cfg.output = {'brain','skull','scalp'}; [bss_segmentedmri] = ft_volumesegment(cfg, mri); 2) I try using ft_sourceanalysis 3) which in turn tries to compute the leadfield using ft_compute_leadfield through ft_leadfield_openmeeg. yes this doesn't work, and I get the following error: Error using fprintf Invalid file identifier. Use fopen to generate a valid file identifier. Error in ft_leadfield_openmeeg (line 112) fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, sens.chanpos(ii,:)); Since it is crucial that I use a realistic head model, do you have any suggestions? Any advice would be greatly appreciated! Thank you, and have a nice week, roey -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Sun Jan 19 12:35:47 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Sun, 19 Jan 2014 12:35:47 +0100 Subject: [FieldTrip] =?utf-8?q?Creating_a_head_model_using_OPENMEEG_-_Inte?= =?utf-8?q?rsecting_=09mesh__error?= Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dominik.bach at uzh.ch Sun Jan 19 14:07:30 2014 From: dominik.bach at uzh.ch (Dominik R Bach) Date: Sun, 19 Jan 2014 14:07:30 +0100 Subject: [FieldTrip] Postdoc position in comparative/computational emotion neuroscience at University of Zurich, starting 2014 Message-ID: <52DBCE12.7040905@uzh.ch> Applications are invited for a post-doctoral position to work on the neurobiology of anxiety and fear, with a methodical focus on either MEG, high-field MRI, or computational modelling. The Comparative Emotion Neuroscience Group (www.bachlab.org) currently hosts 1 PostDoc, 3 PhD students, and several support staff, and is looking for a second post-doctoral fellow. The group's aim is to develop formal models of animal and human defensive emotions (panic, fear, anxiety), characterise their neuroanatomy and the underlying neural computations using neuroimaging techniques (fMRI, M/EEG) in humans, andapply this knowledge to psychiatric syndromes involving pathological emotions. The laboratory offers a friendly and collaborative research environment, a research-dedicated 3T MRI scanner, a fully equipped psychological/psychophysiological testing facility, access to EEG, and collaboration with MEG and 7T MRI facilities. The position is funded by the Swiss National Science Foundation for 3 years and paid according to work experience, usually in grade 18. The lab, behavioural testing facilities, EEG, and 3T scanner are located in the Department of Psychiatry, University of Zurich, Switzerland.** The successfull applicant will have either (a) an undergraduate degree in physics/engineering/mathematics/computer science, and a PhD in cognitive neuroscience, or (b) an undergraduate degree in biology/psychology/neuroscience, and a PhD in neuroscience with a computational or technological focus. The candidate will be experienced in human experimentation, in particular fMRI or M/EEG. Fluent English is mandatory, German is not. We are looking for a highly motivated individal with interest in neurobiology who develops independent research ideas within the group's framework. Starting date is 2014. Applications are accepted until the position is filled. Applicants should send, in one merged PDF, a CV, publication list, letter of intent with a statement of research interest, and the name and contact of two references to: jobs at bachlab.org -- Dominik R Bach University of Zurich www.bachlab.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gregor.Volberg at psychologie.uni-regensburg.de Mon Jan 20 12:21:26 2014 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Mon, 20 Jan 2014 12:21:26 +0100 Subject: [FieldTrip] Antw: Creating a head model using OPENMEEG - Intersecting mesh error In-Reply-To: References: Message-ID: <52DD14C60200005700015398@gwsmtp1.uni-regensburg.de> Dear Roey, just two or three hints that might be helpful: I assume that the segmentation itself was successful; you can check this with ft_plot_vol for each of your tissues. Given that the segmentation is correct and the tissue borders are not intersecting, the error occurred during the mesh construction. I experienced that the number of triangles used for the mesh is often critical, with large numbers producing self-intersections. You could play around a bit with the number of triangles used for each compartement as specified in cfg.numvertices. Then, check the effect on the resulting volume. You do not need to call the ft_sourceanalysis for that; there is the funktion om_check_vol in the external/openmeeg folder that checks the integrity of the volumes and reports intersections or self-intersections. During the leadfield computation, OpenMEEG writes some files to the hard disk for later use. If the meshes are incorrect, then the leadfield fails and no file can be written to the disk. So the error warning on the file identifiers is presumably secondary to the mesh issue. Kind regards, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> Roey Schurr 19.01.2014 12:21 >>> Dear fieldtrippers, I am writing you after encountering an error using the OPENMEEG method for creating a head model, which I need for source reconstruction of EEG data (using 19 electrodes), e.g.: ... triangles 5018 and 5129 are intersecting triangles 5305 and 5781 are intersecting triangles 5879 and 5907 are intersecting !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!! WARNING !!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Mesh is self intersecting ! ... 2 meshes are intersecting ! It seems to be the same problem reported by Olivia about two years ago: http://mailman.science.ru.nl/pipermail/fieldtrip/2012-March/004881.html In what follows I will describe the main steps in my script: 1) I create a segmented 'brain','skull','scalp' mri structure of the subject: cfg.output = {'brain','skull','scalp'}; [bss_segmentedmri] = ft_volumesegment(cfg, mri); 2) I try using ft_sourceanalysis 3) which in turn tries to compute the leadfield using ft_compute_leadfield through ft_leadfield_openmeeg. yes this doesn't work, and I get the following error: Error using fprintf Invalid file identifier. Use fopen to generate a valid file identifier. Error in ft_leadfield_openmeeg (line 112) fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, sens.chanpos(ii,:)); Since it is crucial that I use a realistic head model, do you have any suggestions? Any advice would be greatly appreciated! Thank you, and have a nice week, roey -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Mon Jan 20 12:27:00 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Mon, 20 Jan 2014 12:27:00 +0100 Subject: [FieldTrip] Antw: Creating a head model using OPENMEEG - Intersecting mesh er Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Mon Jan 20 12:32:45 2014 From: roeysc at gmail.com (Roey Schurr) Date: Mon, 20 Jan 2014 13:32:45 +0200 Subject: [FieldTrip] Antw: Creating a head model using OPENMEEG - Intersecting mesh error In-Reply-To: <52DD14C60200005700015398@gwsmtp1.uni-regensburg.de> References: <52DD14C60200005700015398@gwsmtp1.uni-regensburg.de> Message-ID: Dear Gregor, Thank you so much for your helpful advice! I will try this soon and report back to you all. Best regards, roey On Mon, Jan 20, 2014 at 1:21 PM, Gregor Volberg < Gregor.Volberg at psychologie.uni-regensburg.de> wrote: > Dear Roey, > > just two or three hints that might be helpful: > > I assume that the segmentation itself was successful; you can check this > with ft_plot_vol for each of your tissues. Given that the segmentation is > correct and the tissue borders are not intersecting, the error occurred > during the mesh construction. I experienced that the number of triangles > used for the mesh is often critical, with large numbers producing > self-intersections. You could play around a bit with the number of > triangles used for each compartement as specified in cfg.numvertices. Then, > check the effect on the resulting volume. You do not need to call the > ft_sourceanalysis for that; there is the funktion om_check_vol in the > external/openmeeg folder that checks the integrity of the volumes and > reports intersections or self-intersections. > During the leadfield computation, OpenMEEG writes some files to the hard > disk for later use. If the meshes are incorrect, then the leadfield fails > and no file can be written to the disk. So the error warning on the file > identifiers is presumably secondary to the mesh issue. > > Kind regards, > Gregor > > > > > -- > Dr. rer. nat. Gregor Volberg > ( mailto:gregor.volberg at psychologie.uni-regensburg.de) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > >>> Roey Schurr 19.01.2014 12:21 >>> > Dear fieldtrippers, > > I am writing you after encountering an error using the OPENMEEG method for > creating a head model, which I need for source reconstruction of EEG data > (using 19 electrodes), e.g.: > ... > triangles 5018 and 5129 are intersecting > triangles 5305 and 5781 are intersecting > triangles 5879 and 5907 are intersecting > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > !!!!!!!!!!! WARNING !!!!!!!!!!! > !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > Mesh is self intersecting ! > ... > 2 meshes are intersecting ! > > It seems to be the same problem reported by Olivia about two years ago: > http://mailman.science.ru.nl/pipermail/fieldtrip/2012-March/004881.html > > In what follows I will describe the main steps in my script: > > 1) I create a segmented 'brain','skull','scalp' mri structure of the > subject: > cfg.output = {'brain','skull','scalp'}; > [bss_segmentedmri] = ft_volumesegment(cfg, mri); > > 2) I try using ft_sourceanalysis > > 3) which in turn tries to compute the leadfield using ft_compute_leadfield > through ft_leadfield_openmeeg. > > yes this doesn't work, and I get the following error: > Error using fprintf > Invalid file identifier. Use fopen to generate a valid file identifier. > > Error in ft_leadfield_openmeeg (line 112) > fprintf(fid,'%s\t%.15f\t%.15f\t%.15f\n', sens.label{ii}, > sens.chanpos(ii,:)); > > > Since it is crucial that I use a realistic head model, do you have any > suggestions? > > Any advice would be greatly appreciated! > Thank you, and have a nice week, > > roey > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berryv.dberg at gmail.com Mon Jan 20 17:45:30 2014 From: berryv.dberg at gmail.com (berry van den berg) Date: Mon, 20 Jan 2014 11:45:30 -0500 Subject: [FieldTrip] ft_statistics_montecarlo runs slow under ubuntu 13.10 In-Reply-To: References: Message-ID: Ok, I dove a bit deeper into the problem, using the matlab profiler I was able to pinpoint the problem to ft_hastoolbox.m called by findcluster.m, and specifically the functions fileparts and exist.... Copy pasting those two functions to ft_statistics_montecarlo solves the issue for me for now. The problem seems to be that matlab accessing my filesystem runs slow under linux compared to windows.. I have no idea why and how to solve it but it is not related to fieldtrip. If anyone has suggestions what this might be I would be glad to hear them! Cheers, On 16 January 2014 17:11, berry van den berg wrote: > Dear Fieldtrip experts, > > This might be an odd question, but maybe someone has an idea where to > start. > > I just got a fancy new laptop (gigabyte p34g) and dual boot with ubuntu > and windows. I usually work in Ubuntu for analysis, so I ran a time freq > statistics analysis and noticed that ft_statistics_montecarlo runs > extremely slow under Ubuntu.... In windows it runs at normal speed. The > difference is huge, 97 seconds vs, 2 seconds for 100 iterations, 24 > subjects. > > Speed also doesnt seem influenced by averaging over freq or/and time, it > is just slow. > > It is not the cpu clock speed (ubuntu nicely utilizes turbo mode, running > max 3ghz), the cpu is not fully utilized though (only 30 percent or so)... > > I run matlab 2013b, fieldtrip 20140115 > > Specs are > 8gb ram; only 4gb utilized. > 4700HQ cpu > > Any ideas, because I am clueless > > Cheers, > > -- > Berry van den Berg > berryv.dberg at gmail.com > -- Berry van den Berg berryv.dberg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.wong.c at utoronto.ca Mon Jan 20 19:10:51 2014 From: dan.wong.c at utoronto.ca (Daniel Wong) Date: Mon, 20 Jan 2014 13:10:51 -0500 Subject: [FieldTrip] Antw: Creating a head model using OPENMEEG - Intersecting mesh error Message-ID: <20140120131051.9fkbl6n8ysg0og4s@webmail.utoronto.ca> You can try using the new iso2mesh meshing option that was recently added by myself, Sarang Dalal, and Robert Oostenveld: cfg.method = 'iso2mesh'; cfg.numvertices = 10000; % We'll decimate later - this gives nicer results bnd = ft_prepare_mesh(cfg,seg); % Decimate to a 1000, 2000, 3000 node mesh (scalp, skull, brain) [bnd(1).pnt, bnd(1).tri] = meshresample(bnd(1).pnt, bnd(1).tri, 1000/size(bnd(1).pnt,1)); [bnd(2).pnt, bnd(2).tri] = meshresample(bnd(2).pnt, bnd(2).tri, 2000/size(bnd(2).pnt,1)); [bnd(3).pnt, bnd(3).tri] = meshresample(bnd(3).pnt, bnd(3).tri, 3000/size(bnd(3).pnt,1)); The latest version of OpenMEEG automatically fixes mesh orientations, but if you have an older version of OpenMEEG, you'll need to set bnd(ii).tri = bnd(ii).tri(:,[3 2 1]) to fix the orientation error that you'll get - at least until we hard code that fix into FieldTrip. Also, assuming your meshes look like they should (use ft_plot_mesh to check), if you still have a problem with meshes intersecting each other, you will find a subfunction called decouplesurf that is temporarily stashed at the end of prepare_mesh_segmentation.m. Copy this function into a new m-file (decouplesurf.m) and use it to fix those intersections as follows: bnd = decouplesurf(bnd); Note, this will not fix self-intersections. If you're really having a bad day, try using the iso2mesh toolbox meshcheckrepair function: % Check and repair mesh [bnd(ii).pnt, bnd(ii).tri] = meshcheckrepair(bnd(ii).pnt, bnd(ii).tri, 'dup'); [bnd(ii).pnt, bnd(ii).tri] = meshcheckrepair(bnd(ii).pnt, bnd(ii).tri, 'isolated'); [bnd(ii).pnt, bnd(ii).tri] = meshcheckrepair(bnd(ii).pnt, bnd(ii).tri, 'deep'); [bnd(ii).pnt, bnd(ii).tri] = meshcheckrepair(bnd(ii).pnt, bnd(ii).tri, 'meshfix'); This info should eventually find its way onto the FieldTrip tutorial pages... Best Regards, Daniel Wong Daniel Wong, PhD (IBBME, University of Toronto) Postdoctoral Researcher Department of Psychology University of Konstanz From raminazodiaval at gmail.com Mon Jan 20 19:58:53 2014 From: raminazodiaval at gmail.com (Ramin Azodi) Date: Mon, 20 Jan 2014 19:58:53 +0100 Subject: [FieldTrip] Negative values of debiased wPLI Message-ID: Hello, I a bit confused about result which I got from debiased wPLI, because it has the negative value inside the 'wpli_debiasedspctrm'. As I searched for that I found this strange explanation, "...We therefore estimated the squared wPLI by using the debiased wPLI estimator (Vinck et al., 2011), ranging from zero *(negative values can incidentally occur because of limited sampling)* to one (maximum coherence)......." Beta coherence within human ventromedial prefrontal cortex precedes affective value choices, N. Lipsman et al, NeuroImage 85 (2014) 769–778. Could someone explain me, what it means and what should I do with these negative values? Best, Ramin -------------- next part -------------- An HTML attachment was scrubbed... URL: From gopalar.ccf at gmail.com Mon Jan 20 23:07:36 2014 From: gopalar.ccf at gmail.com (Raghavan Gopalakrishnan) Date: Mon, 20 Jan 2014 17:07:36 -0500 Subject: [FieldTrip] ft_timelockstatistics Message-ID: I have a grand averaged data structure that has two conditions. For example, two evoked responses 1 sec apart. I have not saved them as separate data structures. Is there a way to run statistics to compare one evoked response over another within the same data structure with different latencies? or is it necessary to create two grand averaged data structures one for each evoked response. Thanks, Raghavan -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhegde at gru.edu Tue Jan 21 02:30:40 2014 From: jhegde at gru.edu (=?ISO-8859-1?Q?Jay_Hegd=E9?=) Date: Mon, 20 Jan 2014 20:30:40 -0500 Subject: [FieldTrip] Sample script for spike+LFP analysis? Message-ID: <52DDCDC0.3010505@gru.edu> Hi Everyone, I'd like to use FieldTrip for the joint analysis of spike and local field potential (LFP) data. I'm proficient in Matlab, but very new to FieldTrip. I'm trying to write a script by precisely following the relevant tutorial (http://fieldtrip.fcdonders.nl/tutorial/spikefield). Everything goes OK for the first couple of steps, but I'm getting stuck when it comes to constructing "a cfg.trl matrix to preprocess the LFP data" described in the tutorial. So can anyone share an example script that actually runs and does this analysis, so I can see what the tutorial is talking about? Thank you very much in advance, Jay Hegdé Medical College of Georgia Georgia Regents University Augusta, GA, USA From aestnth at hum.au.dk Tue Jan 21 02:43:03 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Tue, 21 Jan 2014 02:43:03 +0100 Subject: [FieldTrip] Sample script for spike+LFP analysis? Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Jan 21 09:30:14 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 21 Jan 2014 09:30:14 +0100 Subject: [FieldTrip] Sample script for spike+LFP analysis? In-Reply-To: <52DDCDC0.3010505@gru.edu> References: <52DDCDC0.3010505@gru.edu> Message-ID: Hi Jay, A "trl" matrix is an Nx3 matrix that gives, for each of N trials, the begin and end sample, and the 'offset' (shift in time axis to determine t=0; offset=0 means begin sample will be t=0). In typical cognitive experiments, such a matrix is generated by a call to ft_definetrial, which in turn calls either a user-specified "trialfun" to find events of interest in the data (recorded in a trigger channel), or ft_trialfun_general. ft_trialfun_general is a simple trialfun that looks for specified event values in a specified trigger channel, and creates trials spanning from X seconds before the event to Y seconds after the event. For using ft_definetrial, see this tutorial: http://fieldtrip.fcdonders.nl/tutorial/preprocessing If for any reason (e.g. you don't have triggers) you don't want to use ft_definetrial, you can simply create a trl matrix yourself by specifying the sample indices and offset. Best, Eelke On 21 January 2014 02:30, Jay Hegdé wrote: > Hi Everyone, > > I'd like to use FieldTrip for the joint analysis of spike and local field > potential (LFP) data. I'm proficient in Matlab, but very new to FieldTrip. > > I'm trying to write a script by precisely following the relevant tutorial > (http://fieldtrip.fcdonders.nl/tutorial/spikefield). Everything goes OK for > the first couple of steps, but I'm getting stuck when it comes to > constructing "a cfg.trl matrix to preprocess the LFP data" described in the > tutorial. > > So can anyone share an example script that actually runs and does this > analysis, so I can see what the tutorial is talking about? > > Thank you very much in advance, > Jay Hegdé > Medical College of Georgia > Georgia Regents University > Augusta, GA, USA > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Tue Jan 21 09:36:04 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 21 Jan 2014 09:36:04 +0100 Subject: [FieldTrip] ft_timelockstatistics In-Reply-To: References: Message-ID: Dear Raghavan, The statistics routines (specifically, the cluster statistics) need each individual observation, and not just the grand average. If your grand average data structure was generated with cfg.keepindividual = 'yes', then this should be fine. If you did not specify this, then it will only contain the average (and possibly the variance), and you would need to either rerun ft_timelockgrandaverage, or input the individual data structures into ft_timelockstatistics directly. The latter is nowadays the recommended approach; you use it e.g. like so: ft_timelockstatistics(cfg, condA{:}, condB{:}); where condA and condB are cell arrays with the timelocked structures for each subject. Even if you do have a grandaverage with cfg.keepindividual = 'yes', the statistics routine still needs one input argument per condition. So if you want to compare two time intervals in the same structure, you need to separate them first e.g. like so: cfg = []; cfg.latency = [0 1]; condA = ft_selectdata(cfg, bigstructure); cfg = []; cfg.latency = [1 2]; condB = ft_selectdata(cfg, bigstructure); Best, Eelke On 20 January 2014 23:07, Raghavan Gopalakrishnan wrote: > I have a grand averaged data structure that has two conditions. For example, > two evoked responses 1 sec apart. I have not saved them as separate data > structures. Is there a way to run statistics to compare one evoked response > over another within the same data structure with different latencies? or is > it necessary to create two grand averaged data structures one for each > evoked response. > > Thanks, > Raghavan > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jhegde at gru.edu Tue Jan 21 10:20:18 2014 From: jhegde at gru.edu (=?ISO-8859-1?Q?Jay_Hegd=E9?=) Date: Tue, 21 Jan 2014 04:20:18 -0500 Subject: [FieldTrip] Sample script for spike+LFP analysis? In-Reply-To: References: <52DDCDC0.3010505@gru.edu> Message-ID: <52DE3BD2.1050706@gru.edu> Hi Eelke, Thank you very much. But I'm afraid this doesn't solve my problem. My problem is not that I don't understand the nature of the trl matrix (which is easy enough to surmise by looking at ft_definetrial.m). Rather, it is understanding how the whole script is supposed to work -- which is why I was looking for a working script. (I haven't been able to find one in http://fieldtrip.fcdonders.nl/example.) So in this case, one script would be worth a thousand words for me. Which is why I'd like to respectfully ask again: does anyone have a working script (plus a datafile, if the script does something other than spike-LFP analysis) that they can share? Best, Jay On 1/21/2014 3:30 AM, Eelke Spaak wrote: > Hi Jay, > > A "trl" matrix is an Nx3 matrix that gives, for each of N trials, the > begin and end sample, and the 'offset' (shift in time axis to > determine t=0; offset=0 means begin sample will be t=0). > > In typical cognitive experiments, such a matrix is generated by a call > to ft_definetrial, which in turn calls either a user-specified > "trialfun" to find events of interest in the data (recorded in a > trigger channel), or ft_trialfun_general. ft_trialfun_general is a > simple trialfun that looks for specified event values in a specified > trigger channel, and creates trials spanning from X seconds before the > event to Y seconds after the event. For using ft_definetrial, see this > tutorial: http://fieldtrip.fcdonders.nl/tutorial/preprocessing > > If for any reason (e.g. you don't have triggers) you don't want to use > ft_definetrial, you can simply create a trl matrix yourself by > specifying the sample indices and offset. > > Best, > Eelke > > On 21 January 2014 02:30, Jay Hegdé wrote: >> Hi Everyone, >> >> I'd like to use FieldTrip for the joint analysis of spike and local field >> potential (LFP) data. I'm proficient in Matlab, but very new to FieldTrip. >> >> I'm trying to write a script by precisely following the relevant tutorial >> (http://fieldtrip.fcdonders.nl/tutorial/spikefield). Everything goes OK for >> the first couple of steps, but I'm getting stuck when it comes to >> constructing "a cfg.trl matrix to preprocess the LFP data" described in the >> tutorial. >> >> So can anyone share an example script that actually runs and does this >> analysis, so I can see what the tutorial is talking about? >> >> Thank you very much in advance, >> Jay Hegdé >> Medical College of Georgia >> Georgia Regents University >> Augusta, GA, USA >> >> _______________________________________________ >> 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 stan.vanpelt at fcdonders.ru.nl Tue Jan 21 10:23:00 2014 From: stan.vanpelt at fcdonders.ru.nl (Stan van Pelt) Date: Tue, 21 Jan 2014 10:23:00 +0100 (CET) Subject: [FieldTrip] Sample script for spike+LFP analysis? In-Reply-To: References: <52DDCDC0.3010505@gru.edu> Message-ID: <041701cf168a$60ee94a0$22cbbde0$@vanpelt@fcdonders.ru.nl> Hi Jay, In addition to Eelke's reply, you may also find the examples in these pages useful in creating your trial definition (cfg.trl): http://fieldtrip.fcdonders.nl/walkthrough http://fieldtrip.fcdonders.nl/example/detect_the_muscle_activity_in_an_emg _channel_and_use_that_as_trial_definition Best, Stan Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Centre for Cognition Montessorilaan 3, B.01.34 6525 HR Nijmegen, the Netherlands tel: +31 24 3616288 -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak Sent: dinsdag 21 januari 2014 9:30 To: FieldTrip discussion list Subject: Re: [FieldTrip] Sample script for spike+LFP analysis? Hi Jay, A "trl" matrix is an Nx3 matrix that gives, for each of N trials, the begin and end sample, and the 'offset' (shift in time axis to determine t=0; offset=0 means begin sample will be t=0). In typical cognitive experiments, such a matrix is generated by a call to ft_definetrial, which in turn calls either a user-specified "trialfun" to find events of interest in the data (recorded in a trigger channel), or ft_trialfun_general. ft_trialfun_general is a simple trialfun that looks for specified event values in a specified trigger channel, and creates trials spanning from X seconds before the event to Y seconds after the event. For using ft_definetrial, see this tutorial: http://fieldtrip.fcdonders.nl/tutorial/preprocessing If for any reason (e.g. you don't have triggers) you don't want to use ft_definetrial, you can simply create a trl matrix yourself by specifying the sample indices and offset. Best, Eelke On 21 January 2014 02:30, Jay Hegdé wrote: > Hi Everyone, > > I'd like to use FieldTrip for the joint analysis of spike and local > field potential (LFP) data. I'm proficient in Matlab, but very new to FieldTrip. > > I'm trying to write a script by precisely following the relevant > tutorial (http://fieldtrip.fcdonders.nl/tutorial/spikefield). > Everything goes OK for the first couple of steps, but I'm getting > stuck when it comes to constructing "a cfg.trl matrix to preprocess > the LFP data" described in the tutorial. > > So can anyone share an example script that actually runs and does this > analysis, so I can see what the tutorial is talking about? > > Thank you very much in advance, > Jay Hegdé > Medical College of Georgia > Georgia Regents University > Augusta, GA, USA > > _______________________________________________ > 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 Tue Jan 21 10:27:43 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 21 Jan 2014 10:27:43 +0100 Subject: [FieldTrip] Sample script for spike+LFP analysis? In-Reply-To: <52DE3BD2.1050706@gru.edu> References: <52DDCDC0.3010505@gru.edu> <52DE3BD2.1050706@gru.edu> Message-ID: <490AEEC5-90E6-4568-98AE-7AB40064B592@donders.ru.nl> Hi Jay, I think the best you could get in terms of script would be the one from the tutorial. If it does not work for you, could you specify what causes you to get stuck exactly? Best, Jan-Mathijs On Jan 21, 2014, at 10:20 AM, Jay Hegdé wrote: > Hi Eelke, > > Thank you very much. But I'm afraid this doesn't solve my problem. My problem is not that I don't understand the nature of the trl matrix (which is easy enough to surmise by looking at ft_definetrial.m). Rather, it is understanding how the whole script is supposed to work -- which is why I was looking for a working script. (I haven't been able to find one in http://fieldtrip.fcdonders.nl/example.) So in this case, one script would be worth a thousand words for me. > > Which is why I'd like to respectfully ask again: does anyone have a working script (plus a datafile, if the script does something other than spike-LFP analysis) that they can share? > > Best, > Jay > > On 1/21/2014 3:30 AM, Eelke Spaak wrote: >> Hi Jay, >> >> A "trl" matrix is an Nx3 matrix that gives, for each of N trials, the >> begin and end sample, and the 'offset' (shift in time axis to >> determine t=0; offset=0 means begin sample will be t=0). >> >> In typical cognitive experiments, such a matrix is generated by a call >> to ft_definetrial, which in turn calls either a user-specified >> "trialfun" to find events of interest in the data (recorded in a >> trigger channel), or ft_trialfun_general. ft_trialfun_general is a >> simple trialfun that looks for specified event values in a specified >> trigger channel, and creates trials spanning from X seconds before the >> event to Y seconds after the event. For using ft_definetrial, see this >> tutorial: http://fieldtrip.fcdonders.nl/tutorial/preprocessing >> >> If for any reason (e.g. you don't have triggers) you don't want to use >> ft_definetrial, you can simply create a trl matrix yourself by >> specifying the sample indices and offset. >> >> Best, >> Eelke >> >> On 21 January 2014 02:30, Jay Hegdé wrote: >>> Hi Everyone, >>> >>> I'd like to use FieldTrip for the joint analysis of spike and local field >>> potential (LFP) data. I'm proficient in Matlab, but very new to FieldTrip. >>> >>> I'm trying to write a script by precisely following the relevant tutorial >>> (http://fieldtrip.fcdonders.nl/tutorial/spikefield). Everything goes OK for >>> the first couple of steps, but I'm getting stuck when it comes to >>> constructing "a cfg.trl matrix to preprocess the LFP data" described in the >>> tutorial. >>> >>> So can anyone share an example script that actually runs and does this >>> analysis, so I can see what the tutorial is talking about? >>> >>> Thank you very much in advance, >>> Jay Hegdé >>> Medical College of Georgia >>> Georgia Regents University >>> Augusta, GA, USA >>> >>> _______________________________________________ >>> 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From berryv.dberg at gmail.com Tue Jan 21 15:51:51 2014 From: berryv.dberg at gmail.com (berry van den berg) Date: Tue, 21 Jan 2014 09:51:51 -0500 Subject: [FieldTrip] ft_statistics_montecarlo runs slow under ubuntu 13.10 In-Reply-To: References: Message-ID: I pinpointed the problem to being the access time of the second HDD mounted as a ntfs filesystem. Not having this HDD in my searchpath solves my problem. Berry ---------- Forwarded message ---------- From: Gio Piantoni Date: 20 January 2014 14:01 Subject: Re: [FieldTrip] ft_statistics_montecarlo runs slow under ubuntu 13.10 To: berry van den berg sorry, I don't know much more than this, but it makes sense that Linux needs some extra time to access a non-native filesystem. If I were you, I'd just comment out the part in ft_statistics_montecarlo that checks for the toolbox, once you know that the toolbox is installed, you don't need to check it every time. Good luck! On Mon, Jan 20, 2014 at 12:56 PM, berry van den berg wrote: > Yeah, you are right, having a folder on that harddisk added to the search > path slowed those functions (which, exist) by A LOT! I copied fieldtrip to > the main SSD and removed everything from the path in matlab on the ntfs > drive, which is mounted through ntfs-3g. Even though I dont actually use > those functions, it slows up the process by a lot: 1 second versus 6 seconds > when fieldtrip is on the ssd with ext4.... > > I wonder if it is due to the drive being ntfs, or something else... Any > ideas? > > > On 20 January 2014 12:00, Gio Piantoni wrote: >> >> Hi Berry, >> >> interesting debugging. Not sure exactly what's going on, but I noticed >> that Linux might become slower if you have samba/cifs disks mounted. >> Is that the case for you maybe? >> >> HTH, >> -g >> >> On Mon, Jan 20, 2014 at 11:45 AM, berry van den berg >> wrote: >> > Ok, I dove a bit deeper into the problem, using the matlab profiler I >> > was >> > able to pinpoint the problem to ft_hastoolbox.m called by findcluster.m, >> > and >> > specifically the functions fileparts and exist.... Copy pasting those >> > two >> > functions to ft_statistics_montecarlo solves the issue for me for now. >> > >> > The problem seems to be that matlab accessing my filesystem runs slow >> > under >> > linux compared to windows.. I have no idea why and how to solve it but >> > it is >> > not related to fieldtrip. If anyone has suggestions what this might be I >> > would be glad to hear them! >> > >> > Cheers, >> > >> > >> > >> > >> > On 16 January 2014 17:11, berry van den berg >> > wrote: >> >> >> >> Dear Fieldtrip experts, >> >> >> >> This might be an odd question, but maybe someone has an idea where to >> >> start. >> >> >> >> I just got a fancy new laptop (gigabyte p34g) and dual boot with ubuntu >> >> and windows. I usually work in Ubuntu for analysis, so I ran a time >> >> freq >> >> statistics analysis and noticed that ft_statistics_montecarlo runs >> >> extremely >> >> slow under Ubuntu.... In windows it runs at normal speed. The >> >> difference is >> >> huge, 97 seconds vs, 2 seconds for 100 iterations, 24 subjects. >> >> >> >> Speed also doesnt seem influenced by averaging over freq or/and time, >> >> it >> >> is just slow. >> >> >> >> It is not the cpu clock speed (ubuntu nicely utilizes turbo mode, >> >> running >> >> max 3ghz), the cpu is not fully utilized though (only 30 percent or >> >> so)... >> >> >> >> I run matlab 2013b, fieldtrip 20140115 >> >> >> >> Specs are >> >> 8gb ram; only 4gb utilized. >> >> 4700HQ cpu >> >> >> >> Any ideas, because I am clueless >> >> >> >> Cheers, >> >> >> >> -- >> >> Berry van den Berg >> >> berryv.dberg at gmail.com >> > >> > >> > >> > >> > -- >> > Berry van den Berg >> > berryv.dberg at gmail.com >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Berry van den Berg > berryv.dberg at gmail.com -- Berry van den Berg berryv.dberg at gmail.com On 20 January 2014 11:45, berry van den berg wrote: > Ok, I dove a bit deeper into the problem, using the matlab profiler I was > able to pinpoint the problem to ft_hastoolbox.m called by findcluster.m, > and specifically the functions fileparts and exist.... Copy pasting those > two functions to ft_statistics_montecarlo solves the issue for me for now. > > The problem seems to be that matlab accessing my filesystem runs slow > under linux compared to windows.. I have no idea why and how to solve it > but it is not related to fieldtrip. If anyone has suggestions what this > might be I would be glad to hear them! > > Cheers, > > > > > On 16 January 2014 17:11, berry van den berg wrote: > >> Dear Fieldtrip experts, >> >> This might be an odd question, but maybe someone has an idea where to >> start. >> >> I just got a fancy new laptop (gigabyte p34g) and dual boot with ubuntu >> and windows. I usually work in Ubuntu for analysis, so I ran a time freq >> statistics analysis and noticed that ft_statistics_montecarlo runs >> extremely slow under Ubuntu.... In windows it runs at normal speed. The >> difference is huge, 97 seconds vs, 2 seconds for 100 iterations, 24 >> subjects. >> >> Speed also doesnt seem influenced by averaging over freq or/and time, it >> is just slow. >> >> It is not the cpu clock speed (ubuntu nicely utilizes turbo mode, running >> max 3ghz), the cpu is not fully utilized though (only 30 percent or so)... >> >> I run matlab 2013b, fieldtrip 20140115 >> >> Specs are >> 8gb ram; only 4gb utilized. >> 4700HQ cpu >> >> Any ideas, because I am clueless >> >> Cheers, >> >> -- >> Berry van den Berg >> berryv.dberg at gmail.com >> > > > > -- > Berry van den Berg > berryv.dberg at gmail.com > -- Berry van den Berg berryv.dberg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.rombetto at cib.na.cnr.it Tue Jan 21 18:15:22 2014 From: s.rombetto at cib.na.cnr.it (s.rombetto at cib.na.cnr.it) Date: Tue, 21 Jan 2014 18:15:22 +0100 Subject: [FieldTrip] fit volume segment and sensors Message-ID: <20140121181522.e24pixvc8okg0o8c@arco.cib.na.cnr.it> Dear Jörn, dear Fieldtrippers, I have downloaded the 20140114 version of Fieldtrip and tried again to use the command ft_volumerealign in the following way (as suggested in the tutorials) mri = ft_read_mri('*....\Subject01.mri'); cfg=[]; cfg.method = 'interactive'; mri_realigned = ft_volumerealign(cfg, mri); Then I identify it by pressing either n/l/r for fiducials and finally I press q in order to quit. But no results appear on my screen. I have tried to use also the following command [mri] = ft_convert_coordsys(mri, 'itab'); but I get the error message [mri] = ft_convert_coordsys(mri, 'itab'); ??? Error using ==> ft_convert_coordsys at 102 conversion from ctf to itab is not yet supported There is also a command ft_transform_geometry. But this asks for a transformation matrix that is created by using ft_volumerealign. So I cannot use it at the moment. Any idea or suggestion to solve this problem? Maybe there is something I am missing? > Dear Sara, > > the procedure described on the FT-page is tailored towards data > gathered from CTF data just because we happen to have a CTF-system > here. Since you have itab-data, the coordinate system of your sensors > (gradiometers) is not in ctf-space. Some more information on the > different coordinate systems can be found here: > http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined?s[]=coordinate&s[]=system#details_of_the_chieti_itab_coordinate_system > > Your first step needs to be to coregister the gradiometer information > with the MRI. Afaik, ft_volumerealign will then also take care of the > coordinate system then (or, more precisely, return the appropriate > transformation). See also here > http://fieldtrip.fcdonders.nl/faq/how_to_coregister_an_anatomical_mri_with_the_gradiometer_or_electrode_positions?s[]=coordinate&s[]=system > > If I remember correctly, this will not change the coordinate system of > the gradiometers, but adjust the transformation matrix of the MRI > instead. You do not need to be in CTF-space, you just need to make sure > that all your data are in the same coordinate-system. Once you got > that, it should work. For example, for EEG source reconstruction you > can stay in MNI-space all the time. Dealing with these transformation > between coordinate systems is some nasty job, so take care you do it > correctly and e.g. not get confused by neurological and radiological > convention > And note that there is also ft_convert_coordsys for transformation, but > I am not sure whether that works for gradiometers, yet. I think this > all just works for volumes. I hope this works for you. > > Best, > Jörn > > s.rombetto at cib.na.cnr.it wrote: >> Dear Fieldtrippers >> >> I 'm trying to perform source analysis on MEG data. >> I use an AtB system (usually it is described as 'itab' in fieldtrip) >> >> First I have preprocessed my data and I have calculated the cross >> spectral density matrix >> >> Then I have constructed the forward model >> >> mri = ft_read_mri('Subject01.mri'); >> cfg = []; >> cfg.write = 'no'; >> cfg.coordsys = 'ctf'; >> [segmentedmri] = ft_volumesegment(cfg, mri); >> >> and segmented the brain surface: >> >> cfg = []; >> cfg.method = 'singleshell'; >> vol = ft_prepare_headmodel(cfg, segmentedmri); >> >> With the command ft_read_sens I have also read the sensors positions. >> >> Before going on I have checked the results plotting the volume and >> the sensors using the commands >> vol = ft_convert_units(vol,'cm'); >> sens = ft_read_sens(rawdataname); >> figure >> ft_plot_sens(sens, 'style', '*b'); >> hold on >> ft_plot_vol(vol); >> >> and I have noticed that the result is wrong because the volume >> soesn't fit the sensors as shown in the attachment >> Moreover, following some topics in the mailing list I have used >> >> ft_determine_coordsys(mri) >> ft_determine_coordsys(vol) >> ft_determine_coordsys(sens) >> >> and I have found that the coordinate systems are diffeerent. >> >> As far as I understand I should use the ctf coordinate system to >> perform the source analysis. But even if I try to specify this >> coordinate system it did not work. >> Any suggestion to solve this problem? >> >> Kind regards >> ------------------------- >> Dott.ssa Sara Rombetto >> Istituto di Cibernetica >> "E. Caianiello" >> Via Campi Flegrei, 34 >> 80078 Pozzuoli (NA) >> Italy >> mob +39 3401689815 >> tel +39 0818675361 >> fax +39 0818675128 >> -------------------------- >> "I disapprove of what you say, but I will defend to the death your >> right to say >> it." [Evelyn Beatrice Hall, The Friends Of Voltaire] >> >> ---------------------------------------------------------------- >> This message was sent using IMP, the Internet Messaging Program. >> >> >> >> _______________________________________________ >> 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 ------------------------- Dott.ssa Sara Rombetto Istituto di Cibernetica "E. Caianiello" Via Campi Flegrei, 34 80078 Pozzuoli (NA) Italy mob +39 3401689815 tel +39 0818675361 fax +39 0818675128 -------------------------- "I disapprove of what you say, but I will defend to the death your right to say it." [Evelyn Beatrice Hall, The Friends Of Voltaire] ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From ozancag at gmail.com Wed Jan 22 14:07:02 2014 From: ozancag at gmail.com (=?UTF-8?B?T3phbiDDh2HEn2xheWFu?=) Date: Wed, 22 Jan 2014 15:07:02 +0200 Subject: [FieldTrip] ft_rejectvisual problem Message-ID: Hi, When I call ft_rejectvisual, I receive the following matlab error: >> [data] = ft_rejectvisual(cfg, data) the input is raw data with 14 channels and 1 trials showing a summary of the data for all channels and trials computing metric [--------------------------------------------------------|] Error using set Bad property value found. Object Name: axes Property Name: 'XLim' Values must be increasing and non-NaN. Error in axis>LocSetLimits (line 201) set(ax,... Error in axis (line 93) LocSetLimits(ax(j),cur_arg); Error in rejectvisual_summary>redraw (line 252) abc = axis; axis([1 info.ntrl abc(3:4)]); Error in rejectvisual_summary (line 126) redraw(h); Error in ft_rejectvisual (line 274) [chansel, trlsel, cfg] = rejectvisual_summary(cfg, tmpdata); -------- my cfg is empty. Data is a one trial x 14 channel EEG data. The visual rejection GUI appears but when I change the metric the figures in the GUI are not redrawn. Is this expected? Is the above error important? This is Matlab 2013a on Linux with the latest FieldTrip from GIT. Thanks. -- Ozan Çağlayan Research Assistant Galatasaray University - Computer Engineering Dept. http://www.ozancaglayan.com From aestnth at hum.au.dk Wed Jan 22 14:12:45 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Wed, 22 Jan 2014 14:12:45 +0100 Subject: [FieldTrip] ft_rejectvisual problem Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrea.brovelli at univ-amu.fr Wed Jan 22 14:39:08 2014 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Wed, 22 Jan 2014 14:39:08 +0100 (CET) Subject: [FieldTrip] Spherical coordinates of Brodmann areas (latitude, longitude) Message-ID: <954828467.14846.1390397948383.JavaMail.root@bureau-frontal2.univ-amu.fr> Dear all, does anyone have the listing of the spherical coordinates of Brodmann areas in latitude and longitude ? A single coordinate for Brodmann area would be enough (e.g., the centre of mass), given I need it for visualisation. The coordinate space would be similar to the one developed in this paper: http://www.ncbi.nlm.nih.gov/pubmed/9931269 Thanks a lot bye Andrea From hweeling.lee at gmail.com Wed Jan 22 15:41:45 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 22 Jan 2014 15:41:45 +0100 Subject: [FieldTrip] BrainProducts Easycap layout Message-ID: Dear all, I would like to know if anyone has the layout for 128 EEG channels for BrainProduct easycap. I have the information of the theta/phi coordinates for each of the channels, but I'm not sure how to use these values to create the layout in fieldtrip. It'll be great if someone can help me on this! Thanks. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Wed Jan 22 15:55:21 2014 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 22 Jan 2014 15:55:21 +0100 Subject: [FieldTrip] BrainProducts Easycap layout In-Reply-To: References: Message-ID: <52DFDBD9.9000803@donders.ru.nl> Hi Hweeling, have you checked FieldTrip/template/layout? There are a bunch of easycap layout already available. Otherwise, you can easily transform your coordinates to the x/y/z plane, you just need to estimate the size of the head. This is what is happening inside ft_read_sens: % it contains theta and phi sens.label = cellfun(@str2double, tmp{1}(2:end)); theta = cellfun(@str2double, tmp{2}(2:end)); phi = cellfun(@str2double, tmp{3}(2:end)); radians = @(x) pi*x/180; warning('assuming a head radius of 85 mm'); x = 85*cos(radians(phi)).*sin(radians(theta)); y = 85*sin(radians(theta)).*sin(radians(phi)); z = 85*cos(radians(theta)); sens.unit = 'cm'; sens.elecpos = [x y z]; sens.chanpos = [x y z]; Then you can project to a 2D plane, there are a number of methods available in Matlab for that. Best, Jörn On 1/22/2014 3:41 PM, Hwee Ling Lee wrote: > Dear all, > > I would like to know if anyone has the layout for 128 EEG channels for > BrainProduct easycap. > > I have the information of the theta/phi coordinates for each of the > channels, but I'm not sure how to use these values to create the > layout in fieldtrip. > > It'll be great if someone can help me on this! > > Thanks. > > Best regards, > Hweeling > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From julian.keil at gmail.com Wed Jan 22 15:56:35 2014 From: julian.keil at gmail.com (Julian Keil) Date: Wed, 22 Jan 2014 15:56:35 +0100 Subject: [FieldTrip] BrainProducts Easycap layout In-Reply-To: References: Message-ID: Dear Hweeling, you can transform the polar coordinates to carthesian coordinates using the elp2coor.m function I attached. The way it works for me is like this: %% Import ELP cap=importdata('128_channel_easycap.elp'); % Import the Vendor-Provided 3d Positions %%Make an electrode file elec.pnt=elp2coor(cap.data',100)'; % Transform elec.label=cap.textdata; % Make Labels cfg=[]; cfg.elec=elec; lay= ft_prepare_layout(cfg); % Make Layout Good luck! Julian On Wed, Jan 22, 2014 at 3:41 PM, Hwee Ling Lee wrote: > Dear all, > > I would like to know if anyone has the layout for 128 EEG channels for > BrainProduct easycap. > > I have the information of the theta/phi coordinates for each of the > channels, but I'm not sure how to use these values to create the layout in > fieldtrip. > > It'll be great if someone can help me on this! > > Thanks. > > Best regards, > Hweeling > > > _______________________________________________ > 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: elp2coor.m Type: text/x-objcsrc Size: 651 bytes Desc: not available URL: From j.herring at fcdonders.ru.nl Wed Jan 22 16:00:43 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 22 Jan 2014 16:00:43 +0100 (CET) Subject: [FieldTrip] BrainProducts Easycap layout In-Reply-To: References: Message-ID: <011a01cf1782$b92794c0$2b76be40$@herring@fcdonders.ru.nl> Hi Hweeling, If you create a text-file that has three columns: Label, Theta, and Phi coordinate, you can use elec = ft_read_sens(filename) to read the layout into a fieldtrip useable elec structure. The first line of the text file has to be: Site Theta Phi You can also have a look at easycap-M1.txt and easycap-M10.txt in the fieldtrip/template/electrode folder for an example of how the text-file should look like. The theta and phi coordinates will be converted to 3d coordinates assuming a head-radius of 85mm (by default, you can specify this) Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Hwee Ling Lee Sent: woensdag 22 januari 2014 15:42 To: FieldTrip discussion list Subject: [FieldTrip] BrainProducts Easycap layout Dear all, I would like to know if anyone has the layout for 128 EEG channels for BrainProduct easycap. I have the information of the theta/phi coordinates for each of the channels, but I'm not sure how to use these values to create the layout in fieldtrip. It'll be great if someone can help me on this! Thanks. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Wed Jan 22 16:18:08 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 22 Jan 2014 16:18:08 +0100 Subject: [FieldTrip] BrainProducts Easycap layout In-Reply-To: <52dfdd1c.c8380f0a.13a9.30a9SMTPIN_ADDED_BROKEN@mx.google.com> References: <52dfdd1c.c8380f0a.13a9.30a9SMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: Dear all, Thanks for the suggestions. For Jörn, I checked the Fieldtrip/template/layout, but none of them fits my data. I tried the suggestion from Herring, however, I keep getting an error message: Error using ft_convert_units (line 121) cannot determine geometrical units Error in ft_datatype_sens (line 189) sens = ft_convert_units(sens); Error in ft_read_sens (line 331) sens = ft_datatype_sens(sens); I had my data in a text format previously, and it didn't work either. So I'm not sure what to do! I've attached my file in this email, the values are gotten from the pdf info from Easycap regarding the theta/phi coordinates for each site. Thanks! Cheers, Hweeling On 22 January 2014 16:00, Herring, J.D. (Jim) wrote: > Hi Hweeling, > > > > If you create a text-file that has three columns: Label, Theta, and Phi > coordinate, you can use elec = ft_read_sens(filename) to read the layout > into a fieldtrip useable elec structure. > > > The first line of the text file has to be: > > > > Site Theta Phi > > > > You can also have a look at easycap-M1.txt and easycap-M10.txt in the > fieldtrip/template/electrode folder for an example of how the text-file > should look like. > > > > The theta and phi coordinates will be converted to 3d coordinates assuming > a head-radius of 85mm (by default, you can specify this) > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Hwee Ling Lee > *Sent:* woensdag 22 januari 2014 15:42 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] BrainProducts Easycap layout > > > > Dear all, > > > > I would like to know if anyone has the layout for 128 EEG channels for > BrainProduct easycap. > > > > I have the information of the theta/phi coordinates for each of the > channels, but I'm not sure how to use these values to create the layout in > fieldtrip. > > > > It'll be great if someone can help me on this! > > > > Thanks. > > > > Best regards, > > Hweeling > > > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 128Channel.sfp Type: application/octet-stream Size: 1642 bytes Desc: not available URL: From s.rombetto at cib.na.cnr.it Wed Jan 22 16:18:46 2014 From: s.rombetto at cib.na.cnr.it (s.rombetto at cib.na.cnr.it) Date: Wed, 22 Jan 2014 16:18:46 +0100 Subject: [FieldTrip] problem with ft_volumerealign and ft_convert_coordsys Message-ID: <20140122161846.id5xoorlkw444ssc@arco.cib.na.cnr.it> Dear Fieldtrippers, I have downloaded the 20140114 version of Fieldtrip and tried again to use the command ft_volumerealign in the following way (as suggested in the tutorials) mri = ft_read_mri('*....\Subject01.mri'); cfg=[]; cfg.method = 'interactive'; mri_realigned = ft_volumerealign(cfg, mri); Then I identify it by pressing either n/l/r for fiducials and finally I press q in order to quit. But no results appear on my screen. Any suggestion to solve this? I have tried to use also the following command [mri] = ft_convert_coordsys(mri, 'itab'); but I get the error message [mri] = ft_convert_coordsys(mri, 'itab'); ??? Error using ==> ft_convert_coordsys at 102 conversion from ctf to itab is not yet supported In order to better understand the problem, I have tried to perform a different transformation with the code [mri] = ft_convert_coordsys(mri, 'spm', 2) and I get the following message Converting the coordinate system from ctf to spm ??? Undefined function or method 'spm' for input arguments of type 'char'. Error in ==> align_ctf2spm at 121 switch spm('ver') Error in ==> ft_convert_coordsys at 90 obj = align_ctf2spm(obj, opt); Finally I tried to use the function align_itab2spm in the following way mri = align_itab2spm(mri, 2) but I get the error message ??? Undefined function or method 'spm' for input arguments of type 'char'. Error in ==> align_itab2spm at 108 switch spm('ver') Do you have any idea or suggestion to solve this problem? Thanks in advance for any advice, Sara ------------------------- Dott.ssa Sara Rombetto Istituto di Cibernetica "E. Caianiello" Via Campi Flegrei, 34 80078 Pozzuoli (NA) Italy mob +39 3401689815 tel +39 0818675361 fax +39 0818675128 -------------------------- "I disapprove of what you say, but I will defend to the death your right to say it." [Evelyn Beatrice Hall, The Friends Of Voltaire] ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From jan.schoffelen at donders.ru.nl Wed Jan 22 16:30:12 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 22 Jan 2014 16:30:12 +0100 Subject: [FieldTrip] problem with ft_volumerealign and ft_convert_coordsys In-Reply-To: <20140122161846.id5xoorlkw444ssc@arco.cib.na.cnr.it> References: <20140122161846.id5xoorlkw444ssc@arco.cib.na.cnr.it> Message-ID: <9250261B-57E7-457E-BD21-539221F13E6D@donders.ru.nl> Hi Sara, > I have downloaded the 20140114 version of Fieldtrip and tried again to > use the command ft_volumerealign in the following way (as suggested in > the tutorials) > > mri = ft_read_mri('*....\Subject01.mri'); > cfg=[]; > cfg.method = 'interactive'; > mri_realigned = ft_volumerealign(cfg, mri); > > Then I identify it by pressing either n/l/r for fiducials and finally > I press q in order to quit. But no results appear on my screen. > Any suggestion to solve this? I don't understand what you mean by 'no results appear on my screen'. Does this mean that mri_realigned is not created? > I have tried to use also the following command > [mri] = ft_convert_coordsys(mri, 'itab'); > > but I get the error message > [mri] = ft_convert_coordsys(mri, 'itab'); > ??? Error using ==> ft_convert_coordsys at 102 > conversion from ctf to itab is not yet supported > > In order to better understand the problem, I have tried to perform a different transformation with the code > > [mri] = ft_convert_coordsys(mri, 'spm', 2) > and I get the following message > > Converting the coordinate system from ctf to spm > ??? Undefined function or method 'spm' for input arguments of type 'char'. You have to have spm on your path in order to get this. try ft_hastoolbox('spm',1) and try again. > > Error in ==> align_ctf2spm at 121 > switch spm('ver') > > Error in ==> ft_convert_coordsys at 90 > obj = align_ctf2spm(obj, opt); > > Finally I tried to use the function align_itab2spm in the following way > mri = align_itab2spm(mri, 2) > but I get the error message > > ??? Undefined function or method 'spm' for input arguments of type 'char'. > > Error in ==> align_itab2spm at 108 > switch spm('ver') > See above. Best, Jan-Mathijs > Do you have any idea or suggestion to solve this problem? > > Thanks in advance for any advice, > Sara > > ------------------------- > Dott.ssa Sara Rombetto > Istituto di Cibernetica > "E. Caianiello" > Via Campi Flegrei, 34 > 80078 Pozzuoli (NA) > Italy > mob +39 3401689815 > tel +39 0818675361 > fax +39 0818675128 > -------------------------- > "I disapprove of what you say, but I will defend to the death your right to say > it." [Evelyn Beatrice Hall, The Friends Of Voltaire] > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Wed Jan 22 16:43:19 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 22 Jan 2014 16:43:19 +0100 (CET) Subject: [FieldTrip] BrainProducts Easycap layout In-Reply-To: References: <52dfdd1c.c8380f0a.13a9.30a9SMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: <013301cf1788$ac70f9f0$0552edd0$@herring@fcdonders.ru.nl> Dear Hweeling, First of all you should rename the file to 128Channel.txt, if you use the .sfp extension Fieldtrip will recognize it as a different filetype. Furthermore, I just noticed that there is a bug in ft_read_sens. It tries to convert the channel label to a double, which is of course not possible and not wanted in case of channel labels. The bug will be fixed a.s.a.p. so you should be able to download the updated version by tomorrow, if I am not mistaken. Best, Jim From: Hwee Ling Lee [mailto:hweeling.lee at gmail.com] Sent: woensdag 22 januari 2014 16:18 To: Herring, J.D. (Jim) Cc: FieldTrip discussion list Subject: Re: [FieldTrip] BrainProducts Easycap layout Dear all, Thanks for the suggestions. For Jörn, I checked the Fieldtrip/template/layout, but none of them fits my data. I tried the suggestion from Herring, however, I keep getting an error message: Error using ft_convert_units (line 121) cannot determine geometrical units Error in ft_datatype_sens (line 189) sens = ft_convert_units(sens); Error in ft_read_sens (line 331) sens = ft_datatype_sens(sens); I had my data in a text format previously, and it didn't work either. So I'm not sure what to do! I've attached my file in this email, the values are gotten from the pdf info from Easycap regarding the theta/phi coordinates for each site. Thanks! Cheers, Hweeling On 22 January 2014 16:00, Herring, J.D. (Jim) wrote: Hi Hweeling, If you create a text-file that has three columns: Label, Theta, and Phi coordinate, you can use elec = ft_read_sens(filename) to read the layout into a fieldtrip useable elec structure. The first line of the text file has to be: Site Theta Phi You can also have a look at easycap-M1.txt and easycap-M10.txt in the fieldtrip/template/electrode folder for an example of how the text-file should look like. The theta and phi coordinates will be converted to 3d coordinates assuming a head-radius of 85mm (by default, you can specify this) Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Hwee Ling Lee Sent: woensdag 22 januari 2014 15:42 To: FieldTrip discussion list Subject: [FieldTrip] BrainProducts Easycap layout Dear all, I would like to know if anyone has the layout for 128 EEG channels for BrainProduct easycap. I have the information of the theta/phi coordinates for each of the channels, but I'm not sure how to use these values to create the layout in fieldtrip. It'll be great if someone can help me on this! Thanks. Best regards, Hweeling -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Wed Jan 22 16:51:59 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 22 Jan 2014 16:51:59 +0100 Subject: [FieldTrip] BrainProducts Easycap layout In-Reply-To: <52dfe764.09240f0a.0ed0.ffff8384SMTPIN_ADDED_BROKEN@mx.google.com> References: <52dfdd1c.c8380f0a.13a9.30a9SMTPIN_ADDED_BROKEN@mx.google.com> <52dfe764.09240f0a.0ed0.ffff8384SMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: Dear Jim, Thanks. I did try the file as a text file, but it didn't work previously. I'll download the latest version of Fieldtrip tomorrow, and try again. Thanks again! Cheers, Hweeling On 22 January 2014 16:43, Herring, J.D. (Jim) wrote: > Dear Hweeling, > > > > First of all you should rename the file to 128Channel.txt, if you use the > .sfp extension Fieldtrip will recognize it as a different filetype. > > > > Furthermore, I just noticed that there is a bug in ft_read_sens. It tries > to convert the channel label to a double, which is of course not possible > and not wanted in case of channel labels. > > > > The bug will be fixed a.s.a.p. so you should be able to download the > updated version by tomorrow, if I am not mistaken. > > > > Best, > > > > Jim > > *From:* Hwee Ling Lee [mailto:hweeling.lee at gmail.com] > *Sent:* woensdag 22 januari 2014 16:18 > *To:* Herring, J.D. (Jim) > *Cc:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] BrainProducts Easycap layout > > > > Dear all, > > > > Thanks for the suggestions. For Jörn, I checked the > Fieldtrip/template/layout, but none of them fits my data. I tried the > suggestion from Herring, however, I keep getting an error message: > > Error using ft_convert_units (line 121) > > cannot determine geometrical units > > > > Error in ft_datatype_sens (line 189) > > sens = ft_convert_units(sens); > > > > Error in ft_read_sens (line 331) > > sens = ft_datatype_sens(sens); > > > > I had my data in a text format previously, and it didn't work either. So > I'm not sure what to do! > > > > I've attached my file in this email, the values are gotten from the pdf > info from Easycap regarding the theta/phi coordinates for each site. > > > > Thanks! > > > > Cheers, > > Hweeling > > > > > > On 22 January 2014 16:00, Herring, J.D. (Jim) > wrote: > > Hi Hweeling, > > > > If you create a text-file that has three columns: Label, Theta, and Phi > coordinate, you can use elec = ft_read_sens(filename) to read the layout > into a fieldtrip useable elec structure. > > > The first line of the text file has to be: > > > > Site Theta Phi > > > > You can also have a look at easycap-M1.txt and easycap-M10.txt in the > fieldtrip/template/electrode folder for an example of how the text-file > should look like. > > > > The theta and phi coordinates will be converted to 3d coordinates assuming > a head-radius of 85mm (by default, you can specify this) > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Hwee Ling Lee > *Sent:* woensdag 22 januari 2014 15:42 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] BrainProducts Easycap layout > > > > Dear all, > > > > I would like to know if anyone has the layout for 128 EEG channels for > BrainProduct easycap. > > > > I have the information of the theta/phi coordinates for each of the > channels, but I'm not sure how to use these values to create the layout in > fieldtrip. > > > > It'll be great if someone can help me on this! > > > > Thanks. > > > > Best regards, > > Hweeling > > > > > > > > -- > > ================================================= > Dr. rer. nat. Lee, Hwee Ling > Postdoc > German Center for Neurodegenerative Diseases (DZNE) Bonn > > Email 1: hwee-ling.leedzne.de > Email 2: hweeling.leegmail.com > > > > https://sites.google.com/site/hweelinglee/home > > Correspondence Address: > Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany > ================================================= > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.rombetto at cib.na.cnr.it Wed Jan 22 16:53:55 2014 From: s.rombetto at cib.na.cnr.it (s.rombetto at cib.na.cnr.it) Date: Wed, 22 Jan 2014 16:53:55 +0100 Subject: [FieldTrip] problem with ft_volumerealign and ft_convert_coordsys In-Reply-To: <9250261B-57E7-457E-BD21-539221F13E6D@donders.ru.nl> References: <20140122161846.id5xoorlkw444ssc@arco.cib.na.cnr.it> <9250261B-57E7-457E-BD21-539221F13E6D@donders.ru.nl> Message-ID: <20140122165355.pkocefgu684gcg40@arco.cib.na.cnr.it> Hi Jan-Mathijs thanks for the fast answer > I don't understand what you mean by 'no results appear on my > screen'. Does this mean that mri_realigned is not created? yes, I mean that I have no output at all. > You have to have spm on your path in order to get this. try > ft_hastoolbox('spm',1) and try again. you were right, this was a stupid mistake. I didn't install the spm toolbox. Now I have installed it and tried again. So I get a different erro message: ??? Error using ==> spm_platform>init_platform at 173 PCWIN64 not supported architecture for SPM Error in ==> spm_platform at 65 if isempty(PLATFORM), PLATFORM = init_platform; end Error in ==> spm_vol_minc at 80 if ~spm_platform('bigend') & datatype~=2 & datatype~=2+128, datatype = datatype*256; end; Error in ==> ft_read_mri at 132 hdr = spm_vol_minc(filename); Error in ==> align_ctf2spm at 137 mri2 = ft_read_mri(template); Error in ==> ft_convert_coordsys at 90 obj = align_ctf2spm(obj, opt); as far as I understand one of the problem is that I use a 64 bit pc. Do you know any solution for this? Moreover why the conversion from ctf to itab is not yet supported? Best regards Sara >> >> Error in ==> align_ctf2spm at 121 >> switch spm('ver') >> >> Error in ==> ft_convert_coordsys at 90 >> obj = align_ctf2spm(obj, opt); >> >> Finally I tried to use the function align_itab2spm in the following way >> mri = align_itab2spm(mri, 2) >> but I get the error message >> >> ??? Undefined function or method 'spm' for input arguments of type 'char'. >> >> Error in ==> align_itab2spm at 108 >> switch spm('ver') >> > > > See above. > > Best, > Jan-Mathijs > > >> Do you have any idea or suggestion to solve this problem? >> >> Thanks in advance for any advice, >> Sara >> >> ------------------------- >> Dott.ssa Sara Rombetto >> Istituto di Cibernetica >> "E. Caianiello" >> Via Campi Flegrei, 34 >> 80078 Pozzuoli (NA) >> Italy >> mob +39 3401689815 >> tel +39 0818675361 >> fax +39 0818675128 >> -------------------------- >> "I disapprove of what you say, but I will defend to the death your >> right to say >> it." [Evelyn Beatrice Hall, The Friends Of Voltaire] >> >> ---------------------------------------------------------------- >> This message was sent using IMP, the Internet Messaging Program. >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > ------------------------- Dott.ssa Sara Rombetto Istituto di Cibernetica "E. Caianiello" Via Campi Flegrei, 34 80078 Pozzuoli (NA) Italy mob +39 3401689815 tel +39 0818675361 fax +39 0818675128 -------------------------- "I disapprove of what you say, but I will defend to the death your right to say it." [Evelyn Beatrice Hall, The Friends Of Voltaire] ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From r.oostenveld at donders.ru.nl Wed Jan 22 17:02:21 2014 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 22 Jan 2014 17:02:21 +0100 Subject: [FieldTrip] ft_rejectvisual problem In-Reply-To: References: Message-ID: Hi Ozan The error suggests that the variance that is computed is either 0, or is nan. A zero variance could be the cause of a channel that is clipping. The consequence of that is that the scaling of the vertical axis cannot be determined correctly. Using the following code data = [] data.label = {'a'} data.time = {1:1000}; data.trial = {zeros(1,1000)}; cfg = []; ft_rejectvisual(cfg, data) I was able to reproduce your error. I only have a single all-zero channel (and one trial), but it suggests that your data is all zero. I suggest you check your data with ft_databrowser or standard MATLAB plotting functions. The error of ft_rejectvisual however should not occur, so I have filed it on our bug tracking system as http://bugzilla.fcdonders.nl/show_bug.cgi?id=2450 If you want to keep track of the bug and be notified when we fix it, please register at bugzilla.fcdonders.nl and add yourself as CC to the bug. best regards and thanks for reporting the issue, Robert On 22 Jan 2014, at 14:07, Ozan Çağlayan wrote: > Hi, > > When I call ft_rejectvisual, I receive the following matlab error: > >>> [data] = ft_rejectvisual(cfg, data) > the input is raw data with 14 channels and 1 trials > showing a summary of the data for all channels and trials > computing metric [--------------------------------------------------------|] > Error using set > Bad property value found. > Object Name: axes > Property Name: 'XLim' > Values must be increasing and non-NaN. > > Error in axis>LocSetLimits (line 201) > set(ax,... > > Error in axis (line 93) > LocSetLimits(ax(j),cur_arg); > > Error in rejectvisual_summary>redraw (line 252) > abc = axis; axis([1 info.ntrl abc(3:4)]); > > Error in rejectvisual_summary (line 126) > redraw(h); > > Error in ft_rejectvisual (line 274) > [chansel, trlsel, cfg] = rejectvisual_summary(cfg, tmpdata); > > -------- > > my cfg is empty. Data is a one trial x 14 channel EEG data. The visual > rejection GUI appears but when I change the metric the figures in the > GUI are not redrawn. Is this expected? Is the above error important? > This is Matlab 2013a on Linux with the latest FieldTrip from GIT. > > Thanks. > > -- > Ozan Çağlayan > Research Assistant > Galatasaray University - Computer Engineering Dept. > http://www.ozancaglayan.com > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From catanese.julien at gmail.com Wed Jan 22 19:22:43 2014 From: catanese.julien at gmail.com (Julien Catanese) Date: Wed, 22 Jan 2014 13:22:43 -0500 Subject: [FieldTrip] ft_connectivityanalysis for one long trial Message-ID: Hi dear FieldTrip community, I'm trying to get the coherence spectrum between 2 LFP signals (based on the tutorial: "Analysis of sensor- and source-level connectivity"). This is sleep data, so I have only one long "trial" generated with ft_redefinetrial(). I can run ft_freqanalysis() without problems, but both for 'mtmconvol' and 'mtmfft' the next step, ft_connectivityanalysis(), fails: 1/ using 'mtmconvol': the cohspctrum consists of all '1' (the same happens when using 'fourier' instead of 'powandcsd') 2/ using 'mtmfft': "Error using ft_connectivityplot (line 99) the data should have a dimord of chan_chan_freq or chancmb_freq" How can I get a coherence spectrum for this data? Do I have to artificially chop it up into say, 2-second "fake trials"? notice that MATLAB's mscohere() works fine on the same data (so data are ok). More details below: 1/ using mtmconvol : %% starting point: loaded data data = hdr: [1x1 struct] label: {'LFP1' 'LFP2'} time: {[1x200000 double]} trial: {[2x200000 double]} fsample: 2000 cfg: [1x1 struct] sampleinfo: [1 200000] %% make one long trial cfg = []; cfg.trl = [1 200000 0]; data_faketrl = ft_redefinetrial(cfg,data); %% do frequqency anlaysis cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:1:150; cfg.t_ftimwin = ones(size(cfg.foi)).*2; % 2-second window cfg.toi = 0:1:10; cfg.keeptrials = 'yes'; cfg.channel = {'LFP1', 'LFP2'}; cfg.channelcmb = {'LFP1', 'LFP2'}; >> freq = ft_freqanalysis(cfg, data_faketrl) freq = label: {'LFP1' 'LFP2'} dimord: 'rpt_chan_freq_time' freq: [1x150 double] time: [0 1 2 3 4 5 6 7 8 9 10] powspctrm: [4-D double] labelcmb: {'LFP1' 'LFP2'} crsspctrm: [4-D double] cumtapcnt: [1x150 double] cfg: [1x1 struct] %% coherence spectrum has all ones cfg = []; cfg.method = 'coh'; coh = ft_connectivityanalysis(cfg, freq); coh = labelcmb: {'LFP1' 'LFP2'} dimord: 'chan_freq_time' cohspctrm: [1x150x11 double] freq: [1x150 double] time: [0 1 2 3 4 5 6 7 8 9 10] dof: 150 cfg: [1x1 struct] % coh.cohspctrm(:,:,2:end) is all ones --> fail 2/ using mtmfft: %% cfg = []; cfg.output = 'powandcsd' cfg.method = 'mtmfft'; cfg.taper = 'hanning'; cfg.foi = 1:1:150; cfg.channel = {'LFP1', 'LFP2'}; cfg.channelcmb = {'LFP1', 'LFP2'}; >> freq = ft_freqanalysis(cfg, data_faketrl) freq = label: {'LFP1' 'LFP2'} dimord: 'rpt_chan_freq' freq: [1x150 double] powspctrm: [1x2x150 double] labelcmb: {'LFP1' 'LFP2'} crsspctrm: [1x1x150 double] cumsumcnt: 200000 cumtapcnt: 1 cfg: [1x1 struct] %% coherence spectrum fails: cfg = []; cfg.parameter = 'cohspctrm'; cfg.channelcmb = {'LFP1', 'LFP2'}; >> ft_connectivityplot(cfg, coh); Error using ft_connectivityplot (line 99) the data should have a dimord of chan_chan_freq or chancmb_freq coh = labelcmb: {'LFP1' 'LFP2'} dimord: 'chan_freq' cohspctrm: [1x150 double] freq: [1x150 double] dof: 1 cfg: [1x1 struct] >> unique([coh.cohspctrm(:)]) ans = 1.000000000000000 1.000000000000000 1.000000000000000 1.000000000000000 1.000000000000000 Thanks for your help, Julien C -- *Dr. Julien Catanese* *VanderMeerLab post-doc. University of Waterloo, Ontario, Canada. * *cell : +1 (519) 781 7575* *tel lab : +1 (519) 888 4567 ext 31354* -------------- next part -------------- An HTML attachment was scrubbed... URL: From instanton at gmail.com Wed Jan 22 22:27:21 2014 From: instanton at gmail.com (woun zoo) Date: Wed, 22 Jan 2014 13:27:21 -0800 Subject: [FieldTrip] Questions about transfer entropy Message-ID: Hi all I'd like to get some insight from you for transfer entropy analysis of my ECoG data before I run all possible parameters. I'd like to establish some connectivity between frontal and visual channels in ECoG recording. However, in our data, there is a very strong driven component, namely, steady state visually evoked potentials. SSVEPs in our data appear at several frequencies that are harmonics of the input frequencies and their sum and difference frequencies. So our data has a completely deterministic (SSVEPs) dynamics and the rest of stochastic (non-stimulus locked) activities. Data has 20 trials in total. Each trial lasts 2.4sec. Sampling rate is 1200hz. Raw data were bandpass filtered from 0.1Hz to 500hz. In order to find an effective connectivity, I chose to use TRENTOOL box for transfer entropy. I used Ragwitz method from TRENTOOL (nonlinear locally constant prediction method). This is where I'd like to get some good insight for choosing parameters. Just below, I wrote my questions in blue text. I'm sorry to bother you with all these. But I really want to get some good insight from you because I am not exactly sure if I'm putting garbage inputs or not. At the end of this email, I put my code. OR do you think granger causality is better? But granger causality wants your data to satisfy several requirements. So I went for Transfer Entropy... cfgTEP.toi = [min(data.time{1,1}) max(data.time{1,1})] --> Basically from trial start to trial end. cfgTEP.predicttimemin_u= 10; cfgTEP.predicttimemax_u= 240; --> I am not sure where and how these min and max were used in TEragwitz calculation in TEprepare.m. VW_ds fixed 1 as a prediction horizon. I'm not sure if it's good to predict just next time sample point for SSVEP + noisy data? cfgTEP.actthrvalue = 100; --> I don't know the reason why this autocorrelation time value needs to be set by hand cause I thought embedding delay time gets automatically decided by autocorrelation. Is there a special logic behind setting this by hand? For particular two channels, their ACT values were 54 sample points, etc. Max ACT was 134 or something. Is this due to noise? If I have strong oscillatory activities, am I not supposed to see ACT values close to oscillatory period? cfgTEP.maxlag = 1000; --> 1000 is default. What will be a good lag number to see autocorrelation? Should I use a half of total sample points of data (2880/2 = 1440)? cfgTEP.minnrtrials = 7; --> Does this mean if trial selection rule by ACT value rejects more than 13 trials out of total 20 trials, program won't run? What is a good number for this when I have 20 trials? For main parameters for TEragwitz, cfgTEP.optimizemethod ='ragwitz'; cfgTEP.ragdim = 1:10; --> I just chose all possible embedding dimension from 1 to 10. Should I try to put more than 10? But TE analysis always says, embedding dimension maybe 2, which sounds about right for pure sine waves like SSVEPs. But with 0.1Hz~500hz bandpass, I have tons of non-stimulus locked low and high noisy activities. But when I chose Cao's method, it says, 5 or 6. cfgTEP.ragtaurange = [0.1 2]; --> For delay time, I chose this range. But Ragwitz always chose the smallest value. If I put this range from [1 2], then it chooses 1. If it was [0.5 3], it chose 0.5. So I'd really like to know what kind of values I should put here. cfgTEP.ragtausteps = 15; % steps for ragwitz tau steps 15 cfgTEP.repPred = 600; --> I just chose this. I could vary this. Depending on what I put here, final significance of TE changes too. cfgTEP.flagNei = 'Mass' ; %neigbour analyse type cfgTEP.sizeNei = 4; --> Ideally I guess I might have to vary size of neighborhood in phase space For Surrogate analysis, cfgTESS.optdimusage = 'indivdim'; cfgTGAA.select_opt_u = 'product_evidence'; % 'max_TEdiff'; --> I just chose 'product_evidence' because help file of InteractionDelayReconstruction_analyze.m says 'max_TEdiff' could be problematic in certain case. Which one is normal to use? cfgTGAA.select_opt_u_pos = 'shortest'; --> Also for this, I don't know which one is normal to use. I'm sorry if this questions are too hectic. I really appreciate if you could give me some good insight about parameters for ECoG steady-state visual evoked potential data. Thank you very much. Have a nice day. ======================== ======================== code here load data %% define cfg for TEprepare.m cfgTEP = []; % path to OpenTSTOOL cfgTEP.Path2TSTOOL = '../OpenTSTOOL'; %strcat(work_dir,'toolboxes/','OpenTSTOOL'); % data cfgTEP.toi = [min(data.time{1,1}) max(data.time{1,1})]; % time of interest % cfgTEP.sgncmb = {'2' '43'}; % channels to be analyzed % or: datalabels = data.label; %select channels for TE compute cfgTEP.channel = datalabels; % scanning of interaction delays u cfgTEP.predicttimemin_u= 41; % minimum u to be scanned cfgTEP.predicttimemax_u= 240; % maximum u to be scanned cfgTEP.predicttimestepsize = 1; % time steps between u's to be scanned % estimator cfgTEP.TEcalctype='VW_ds'; % use the new TE estimator (Wibral, 2013) % ACT estimation and constraints on allowed ACT(autocorelation time) cfgTEP.actthrvalue = 100; % threshold for ACT cfgTEP.maxlag = 1000; cfgTEP.minnrtrials = 7; % minimum acceptable number of trials % optimizing embedding cfgTEP.optimizemethod ='ragwitz'; % criterion used cfgTEP.ragdim = 1:10; % criterion dimension cfgTEP.ragtaurange = [0.1 2]; % range for tau cfgTEP.ragtausteps = 15; % steps for ragwitz tau steps 15 cfgTEP.repPred = 600; % size(data.trial{1,1},2)*(3/4); % kernel-based TE estimation cfgTEP.flagNei = 'Mass' ; %neigbour analyse type cfgTEP.sizeNei = 4; %neigbours to analyse % optimizing embedding % cfgTEP.optimizemethod = 'cao'; % cfgTEP.caodim = 1:10; % cfgTEP.caokth_neighbors = 4; %% define cfg for TEsurrogatestats_ensemble.m cfgTESS= []; % use individual dimensions for embedding cfgTESS.optdimusage = 'indivdim'; % statistical and shift testing cfgTESS.tail = 1; cfgTESS.numpermutation = 5e4; cfgTESS.shifttesttype ='TEshift>TE'; cfgTESS.surrogatetype = 'blockreverse1'; %'trialshuffling'; % results file name data_save_path = strcat(data_dir,'TE'); if ~isdir(data_save_path); mkdir(data_save_path); end partial_save_dir = strcat(data_save_path,'/','dataset'); if ~isdir(partial_save_dir); mkdir(partial_save_dir); end cfgTESS.fileidout = strcat(partial_save_dir,'/','dataset'); %% calculation - scan over specified values for u f_time=tic; TGA_results=InteractionDelayReconstruction_calculate(cfgTEP,cfgTESS,data); toc(f_time); savename=strcat(data_save_path,'/','dataset_results'); save(savename,'TGA_results'); %% analysis - find maximum TE value to reconstruct the interaction delay u cfgTGAA = []; cfgTGAA.select_opt_u = 'product_evidence'; % 'max_TEdiff'; cfgTGAA.select_opt_u_pos = 'shortest'; TGA_analyzed=InteractionDelayReconstruction_analyze(cfgTGAA,TGA_results); savename2=strcat(data_save_path,'/','dataset_complete_analyzed.mat'); save(savename2,'TGA_analyzed'); -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jan 23 08:41:39 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 23 Jan 2014 08:41:39 +0100 Subject: [FieldTrip] ft_rejectvisual problem In-Reply-To: References: Message-ID: <901C3C2D-197C-4B75-8FF9-3DF33BDD1C98@donders.ru.nl> Hi Robert and Ozan, I think that the problem reported is due to the fact that there was just one single trial in the input. In the drawing of the figure, the axis limits are set as [1 numtrl yax1 yax2] (or something), where in Ozan's case numtrl is 1. Matlab does not like the axis limits to be non increasing On Jan 22, 2014, at 5:02 PM, Robert Oostenveld wrote: > Hi Ozan > > The error suggests that the variance that is computed is either 0, or is nan. A zero variance could be the cause of a channel that is clipping. The consequence of that is that the scaling of the vertical axis cannot be determined correctly. > > Using the following code > > data = [] > data.label = {'a'} > data.time = {1:1000}; > data.trial = {zeros(1,1000)}; > > cfg = []; > ft_rejectvisual(cfg, data) > > I was able to reproduce your error. I only have a single all-zero channel (and one trial), but it suggests that your data is all zero. I suggest you check your data with ft_databrowser or standard MATLAB plotting functions. > > The error of ft_rejectvisual however should not occur, so I have filed it on our bug tracking system as http://bugzilla.fcdonders.nl/show_bug.cgi?id=2450 > > If you want to keep track of the bug and be notified when we fix it, please register at bugzilla.fcdonders.nl and add yourself as CC to the bug. > > best regards and thanks for reporting the issue, > Robert > > > > On 22 Jan 2014, at 14:07, Ozan Çağlayan wrote: > >> Hi, >> >> When I call ft_rejectvisual, I receive the following matlab error: >> >>>> [data] = ft_rejectvisual(cfg, data) >> the input is raw data with 14 channels and 1 trials >> showing a summary of the data for all channels and trials >> computing metric [--------------------------------------------------------|] >> Error using set >> Bad property value found. >> Object Name: axes >> Property Name: 'XLim' >> Values must be increasing and non-NaN. >> >> Error in axis>LocSetLimits (line 201) >> set(ax,... >> >> Error in axis (line 93) >> LocSetLimits(ax(j),cur_arg); >> >> Error in rejectvisual_summary>redraw (line 252) >> abc = axis; axis([1 info.ntrl abc(3:4)]); >> >> Error in rejectvisual_summary (line 126) >> redraw(h); >> >> Error in ft_rejectvisual (line 274) >> [chansel, trlsel, cfg] = rejectvisual_summary(cfg, tmpdata); >> >> -------- >> >> my cfg is empty. Data is a one trial x 14 channel EEG data. The visual >> rejection GUI appears but when I change the metric the figures in the >> GUI are not redrawn. Is this expected? Is the above error important? >> This is Matlab 2013a on Linux with the latest FieldTrip from GIT. >> >> Thanks. >> >> -- >> Ozan Çağlayan >> Research Assistant >> Galatasaray University - Computer Engineering Dept. >> http://www.ozancaglayan.com >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Thu Jan 23 08:45:24 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Thu, 23 Jan 2014 08:45:24 +0100 Subject: [FieldTrip] ft_rejectvisual problem Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ayobimpe2004 at hotmail.com Thu Jan 23 14:43:45 2014 From: ayobimpe2004 at hotmail.com (Azeez Adebimpe) Date: Thu, 23 Jan 2014 14:43:45 +0100 Subject: [FieldTrip] connectivity from source analysis Message-ID: Dear all, I am trying to calculate connectivity from source data using powcorr method but I am getting below error. Please your assistance will be highly appreciated. /Warning: conversion from mom to pow is not possible, either because there is nomom in the data, or because the dimension of mom>1. in that case callft_sourcedescriptives first with cfg.projectmom > In ft_checkdata>fixsource at 1488 In ft_checkdata at 708 In ft_connectivityanalysis at 407??? Out of memory. Type HELP MEMORY for your options. Error in ==> ft_connectivity_corr at 176 p1 = p1(:,ones(1,siz(3)),:,:,:,:); Error in ==> ft_connectivityanalysis at 554 [datout, varout, nrpt] = ft_connectivity_corr(data.(inparam), optarg{:});/ Azeez Adebimpe -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.cox at uva.nl Thu Jan 23 16:19:58 2014 From: r.cox at uva.nl (Roy Cox) Date: Thu, 23 Jan 2014 16:19:58 +0100 Subject: [FieldTrip] degrees of freedom Message-ID: Hi all, I'm using ft_timelockstatistics with indepsamplesT to compare spatial topographies between two groups (n=15 and n=13). The measure I'm interested in has no time dimension, so I basically have one sample per electrode for each subject. This works fine (I get the effects I hoped for). In order to make the statistics 'slightly more valid', however, I need to adjust the degrees of freedom. That is, the data I'm comparing between groups has already had a covariate taken out. So df has to be df-1. Doesn't look like Fieldtrip allows you to set this in the cfg struct somewhere, so any suggestions where I need to hack? Thanks, Roy -- Roy Cox, M.Sc. | Brain & Cognition Group | Department of Psychology | University of Amsterdam | Weesperplein 4 | 1018 XA Amsterdam | the Netherlands | room 3.21 | phone: +31 20 525 6847 | email: r.cox at uva.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Fri Jan 24 08:54:24 2014 From: joramvandriel at gmail.com (Joram van Driel) Date: Fri, 24 Jan 2014 08:54:24 +0100 Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' Message-ID: Hi all, I'm getting stuck with ft_sourcestatistics. I want to do a simple two-condition contrast on neuromag MEG data, where I did frequency beamforming on a pre vs. post tf-window. I followed the instructions of the tutorial, so for each subject and condition: 1) ft_sourceanalysis with subject-specific vol and grid structures, where I did the pre vs post contrast as follows: sourceAll = ft_sourceanalysis(cfg, freqAll(condi)); cfg.grid.filter = sourceAll.avg.filter; sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) ); sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi)); sourceDiff(condi) = sourcePost_con; sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow - sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; 2) ft_sourceinterpolate with the subject-specific mri 3) ft_volumenormalize to MNI with coordsys 'neuromag'. 4) The output is stored in a subject-by-condition cell array, which I put into ft_sourcestatistics with the following cfg: cfg = []; cfg.parameter = 'avg.pow'; cfg.method = 'analytic'; cfg.statistic = 'depsamplesT'; cfg.correctm = 'no'; cfg.alpha = 0.05; Nsub = 10; cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.tail = 0; % number, -1, 1 or 0 (default = 0) cfg.ivar = 1; % number or list with indices, independent variable(s) cfg.uvar = 2; % number or list with indices, unit variable(s) stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, sourceDiffNorm{:,2}); This results in the error that it cannot find the field 'pos'; however this field is only present in the result from ft_sourceanalysis (and differs for each subject), but disappears as soon as ft_sourceinterpolate is applied. I tried to put the result from ft_sourceanalysis straight into ft_sourcestatistics (which according to the help should be possible), but this doesn't recognize the input as volume data (and apart from that, the subjects aren't spatially aligned this way). I hope someone can help me with this; any help is much appreciated! Thanks, Joram -- Joram van Driel, MSc. PhD student @ University of Amsterdam Brain & Cognition @ Department of Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Fri Jan 24 09:00:18 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Fri, 24 Jan 2014 09:00:18 +0100 Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Fri Jan 24 09:14:13 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Fri, 24 Jan 2014 09:14:13 +0100 (CET) Subject: [FieldTrip] degrees of freedom In-Reply-To: References: Message-ID: <000c01cf18dc$448b10f0$cda132d0$@herring@fcdonders.ru.nl> Hi Roy, Fieldtrip allows you to create and use your own functions to calculate statistics. What you could also do is adjust the indepsamplesT statistic function (fieldtrip/statfun/ft_statfun_indepsamplesT.m) to suite your needs (E.g. change the Df in line 89). Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Roy Cox Sent: donderdag 23 januari 2014 16:20 To: fieldtrip at science.ru.nl Subject: [FieldTrip] degrees of freedom Hi all, I'm using ft_timelockstatistics with indepsamplesT to compare spatial topographies between two groups (n=15 and n=13). The measure I'm interested in has no time dimension, so I basically have one sample per electrode for each subject. This works fine (I get the effects I hoped for). In order to make the statistics 'slightly more valid', however, I need to adjust the degrees of freedom. That is, the data I'm comparing between groups has already had a covariate taken out. So df has to be df-1. Doesn't look like Fieldtrip allows you to set this in the cfg struct somewhere, so any suggestions where I need to hack? Thanks, Roy -- Roy Cox, M.Sc. | Brain & Cognition Group | Department of Psychology | University of Amsterdam | Weesperplein 4 | 1018 XA Amsterdam | the Netherlands | room 3.21 | phone: +31 20 525 6847 | email: r.cox at uva.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.lam at fcdonders.ru.nl Fri Jan 24 09:55:39 2014 From: n.lam at fcdonders.ru.nl (Lam, Nietzsche) Date: Fri, 24 Jan 2014 09:55:39 +0100 (CET) Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' In-Reply-To: Message-ID: <711157447.420800.1390553739013.JavaMail.root@indus.zimbra.ru.nl> Hi Joram, I'm not entirely sure if this is the solution, but when you call ft_sourcestatistics, you can try this: FieldTrip statistics functions understands that you want to use the data from all subjects when you use {:}, so there's no need to call individual columns with {:,X}. Best, Nietzsche ----- Original Message ----- > From: "Joram van Driel" > To: "FieldTrip discussion list" > Sent: Friday, 24 January, 2014 8:54:24 AM > Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' > Hi all, > > > I'm getting stuck with ft_sourcestatistics. > I want to do a simple two-condition contrast on neuromag MEG data, > where I did frequency beamforming on a pre vs. post tf-window. > > > I followed the instructions of the tutorial, so for each subject and > condition: > > > 1) ft_sourceanalysis with subject-specific vol and grid structures, > where I did the pre vs post contrast as follows: > > > > sourceAll = ft_sourceanalysis(cfg, freqAll(condi)); > > cfg.grid.filter = sourceAll.avg.filter; > sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) ); > sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi)); > > > > sourceDiff(condi) = sourcePost_con; > sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow - > sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; > > > 2) ft_sourceinterpolate with the subject-specific mri > 3) ft_volumenormalize to MNI with coordsys 'neuromag'. > 4) The output is stored in a subject-by-condition cell array, which I > put into ft_sourcestatistics with the following cfg: > > > > cfg = []; > cfg.parameter = 'avg.pow'; > cfg.method = 'analytic'; > cfg.statistic = 'depsamplesT'; > cfg.correctm = 'no'; > cfg.alpha = 0.05; > > > Nsub = 10; > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; > cfg.tail = 0; % number, -1, 1 or 0 (default = 0) > cfg.ivar = 1; % number or list with indices, independent variable(s) > cfg.uvar = 2; % number or list with indices, unit variable(s) > > > stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, > sourceDiffNorm{:,2}); > > > > > This results in the error that it cannot find the field 'pos'; however > this field is only present in the result from ft_sourceanalysis (and > differs for each subject), but disappears as soon as > ft_sourceinterpolate is applied. I tried to put the result from > ft_sourceanalysis straight into ft_sourcestatistics (which according > to the help should be possible), but this doesn't recognize the input > as volume data (and apart from that, the subjects aren't spatially > aligned this way). > > > I hope someone can help me with this; any help is much appreciated! > > > Thanks, > Joram > > > -- > > Joram van Driel, MSc. > PhD student @ University of Amsterdam > Brain & Cognition @ Department of Psychology > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Nietzsche H.L. Lam, MSc PhD Candidate Max Planck Institute for Psycholinguistics Wundtlaan 1, 6525 XD Nijmegen, The Netherlands Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Kapittelweg 29, 6525EN Nijmegen, The Netherlands n.lam at fcdonders.ru.nl +31-24-3668219 neurobiologyoflanguage.com From hweeling.lee at gmail.com Fri Jan 24 10:14:11 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Fri, 24 Jan 2014 10:14:11 +0100 Subject: [FieldTrip] Fieldtrip on Mac Message-ID: Dear all, I downloaded the latest version of fieldtrip, and tried to use fieldtrip toolbox on Matlab R2012b, but I keep experiencing problems with reading the files. Here's the command I use: cfg.trialfun = 'trial_def_AV'; % self-made function located in D:\New_Scripts_2013\my_trialfun_name.m cfg.trialdef.eventtype = 'Stimulus'; cfg.trialdef.eventvalue = 3; % 1 for AV; 2 for AN; 3 for both AV and AN cfg.trialdef.pre = 0.5; cfg.trialdef.post = 4.0; cfg = ft_definetrial(cfg); [data] = ft_preprocessing(cfg); % loading eeg data into memory evaluating trialfunction 'trial_def_AV' Error using ft_read_event (line 383) cannot open BrainVision marker file Error in trial_def_AV (line 4) event = ft_read_event(cfg.event); Error in ft_definetrial (line 169) [trl, event] = feval(cfg.trialfun, cfg); I'm lost, and do not know what to do. Could someone please help? Thanks. Cheers, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Fri Jan 24 10:56:50 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Fri, 24 Jan 2014 10:56:50 +0100 (CET) Subject: [FieldTrip] ft_combineplanar on Neuromagdata Message-ID: <935899657.429750.1390557410212.JavaMail.root@bcbl.eu> Dear fieldtrip users, sorry to bother you with this really trivial question. I am running into an issue using ft_combineplanar on Neuromag data. The code I am using is as follows: cfg = []; cfg.channel = {'MEGGRAD'}; grad_data = ft_selectdata(meg_data); %after this step there are only planar-gradients left cfg = []; cfg.method = 'mtmfft'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.foi = 0:100; cfg.keeptrials = 'no'; spectrum1 = ft_freqanalysis(cfg,grad_data); % returns the FFT power spectrum cfg = []; spectrum2 = ft_combineplanar(cfg,spectrum); % this step should combine horizontal and vertical gradients into % one single gradient aka reduce the number of channels However, spectrum does not change. This can be seen by isequal(spectrum1.powspctrm,spectrum2.powspctrm) == 1 Also the number of channels (n = 204) is not reduced after ft_combineplanar when in fact there should only be n = 102 channels left. Is this related to the fact that ft_combineplanar is designed to take only time-frequency maps as input or am I doing something wrong here? Any advice would be highly appreciated. Fred From alik.widge at gmail.com Fri Jan 24 11:57:42 2014 From: alik.widge at gmail.com (Alik Widge) Date: Fri, 24 Jan 2014 05:57:42 -0500 Subject: [FieldTrip] Choice of repairchannel algorithm Message-ID: Hello all, I notice that I have a choice of calculation options for ft_repairchannel, including simple interpolation and what appear to be CSD-like calculations. However, I've been unable to find any advice on which method to use. Is anyone aware of a discussion or head-to-head evaluation of the various available methods? I could not find one in the literature or past archives of this list, and right now am working on the assumption that it's basically whatever smoothness/computation tradeoff I care to choose. Thanks, Alik Widge, MD, PhD Massachusetts General Hospital alik.widge at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Fri Jan 24 12:09:25 2014 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 24 Jan 2014 15:09:25 +0400 Subject: [FieldTrip] Fieldtrip on Mac Message-ID: Hello Hwee Ling, Without knowing the code that's in your trial function, it's hard to tell what the problem might be. Based on the error message, it looks like it's not finding the .vmrk file where it's supposed to be. Do you need to specify your own trial function? In my experience, Brain Vision data can be imported into Fieldtrip very easily just using the general trial function; specify cfg.filename to be the .vhdr file, then run ft_definetrial and ft_preprocessing. Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ > Message: 2 > Date: Fri, 24 Jan 2014 10:14:11 +0100 > From: Hwee Ling Lee > To: FieldTrip discussion list > Subject: [FieldTrip] Fieldtrip on Mac > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Dear all, > > I downloaded the latest version of fieldtrip, and tried to use fieldtrip > toolbox on Matlab R2012b, but I keep experiencing problems with reading the > files. > > Here's the command I use: > > cfg.trialfun = 'trial_def_AV'; % self-made function located in > D:\New_Scripts_2013\my_trialfun_name.m > cfg.trialdef.eventtype = 'Stimulus'; > cfg.trialdef.eventvalue = 3; % 1 for AV; 2 for AN; 3 for both AV and AN > cfg.trialdef.pre = 0.5; > cfg.trialdef.post = 4.0; > cfg = ft_definetrial(cfg); > > [data] = ft_preprocessing(cfg); % loading eeg data into memory > > evaluating trialfunction 'trial_def_AV' > Error using ft_read_event (line 383) > cannot open BrainVision marker file > > Error in trial_def_AV (line 4) > event = ft_read_event(cfg.event); > > Error in ft_definetrial (line 169) > [trl, event] = feval(cfg.trialfun, cfg); > > I'm lost, and do not know what to do. Could someone please help? > Thanks. > > Cheers, > Hweeling From joramvandriel at gmail.com Fri Jan 24 12:16:26 2014 From: joramvandriel at gmail.com (Joram van Driel) Date: Fri, 24 Jan 2014 12:16:26 +0100 Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' In-Reply-To: <711157447.420800.1390553739013.JavaMail.root@indus.zimbra.ru.nl> References: <711157447.420800.1390553739013.JavaMail.root@indus.zimbra.ru.nl> Message-ID: Hi Nietzsche, Thanks for the suggestion, but unfortunately that's not what's going wrong. My input data is a subject-by-condition array, so if I fill in sourcedat{:,1} and sourcedat{:,2}, that would be equivalent to having two separate variables and do source_condition1{:},source_condition2{:}. I tried that but I get the same error "??? Reference to non-existent field 'pos'." In fact, the error is I think a bug of the newest fieldtrip version, because when I tried an older version (fieldtrip-20131031), it works (although it later crashes on a design array issue, but that's something I have to figure out myself ;)). The 'pos' field is a field that is present in the output of ft_sourceanalysis; according to the help it's a N-by-3 matrix of the x-y-z position of all the sources, where N is the sum of the length of the 'inside' and 'outside' fields. This 'pos' field is removed in further steps (ft_sourceinterpolate). When calling ft_sourceanalysis in version fieldtrip-20140109, the function statistics_wrapper searches for this field (line 228) and can't find it. Chrs, - Joram On Fri, Jan 24, 2014 at 9:55 AM, Lam, Nietzsche wrote: > Hi Joram, > > I'm not entirely sure if this is the solution, but when you call > ft_sourcestatistics, you can try this: > > > > FieldTrip statistics functions understands that you want to use the data > from all subjects when you use {:}, so there's no need to call individual > columns with {:,X}. > > Best, > Nietzsche > > > > ----- Original Message ----- > > From: "Joram van Driel" > > To: "FieldTrip discussion list" > > Sent: Friday, 24 January, 2014 8:54:24 AM > > Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' > > Hi all, > > > > > > I'm getting stuck with ft_sourcestatistics. > > I want to do a simple two-condition contrast on neuromag MEG data, > > where I did frequency beamforming on a pre vs. post tf-window. > > > > > > I followed the instructions of the tutorial, so for each subject and > > condition: > > > > > > 1) ft_sourceanalysis with subject-specific vol and grid structures, > > where I did the pre vs post contrast as follows: > > > > > > > > sourceAll = ft_sourceanalysis(cfg, freqAll(condi)); > > > > cfg.grid.filter = sourceAll.avg.filter; > > sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) ); > > sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi)); > > > > > > > > sourceDiff(condi) = sourcePost_con; > > sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow - > > sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; > > > > > > 2) ft_sourceinterpolate with the subject-specific mri > > 3) ft_volumenormalize to MNI with coordsys 'neuromag'. > > 4) The output is stored in a subject-by-condition cell array, which I > > put into ft_sourcestatistics with the following cfg: > > > > > > > > cfg = []; > > cfg.parameter = 'avg.pow'; > > cfg.method = 'analytic'; > > cfg.statistic = 'depsamplesT'; > > cfg.correctm = 'no'; > > cfg.alpha = 0.05; > > > > > > Nsub = 10; > > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; > > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; > > cfg.tail = 0; % number, -1, 1 or 0 (default = 0) > > cfg.ivar = 1; % number or list with indices, independent variable(s) > > cfg.uvar = 2; % number or list with indices, unit variable(s) > > > > > > stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, > > sourceDiffNorm{:,2}); > > > > > > > > > > This results in the error that it cannot find the field 'pos'; however > > this field is only present in the result from ft_sourceanalysis (and > > differs for each subject), but disappears as soon as > > ft_sourceinterpolate is applied. I tried to put the result from > > ft_sourceanalysis straight into ft_sourcestatistics (which according > > to the help should be possible), but this doesn't recognize the input > > as volume data (and apart from that, the subjects aren't spatially > > aligned this way). > > > > > > I hope someone can help me with this; any help is much appreciated! > > > > > > Thanks, > > Joram > > > > > > -- > > > > Joram van Driel, MSc. > > PhD student @ University of Amsterdam > > Brain & Cognition @ Department of Psychology > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Nietzsche H.L. Lam, MSc > PhD Candidate > > Max Planck Institute for Psycholinguistics > Wundtlaan 1, 6525 XD Nijmegen, The Netherlands > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Kapittelweg 29, 6525EN Nijmegen, The Netherlands > > n.lam at fcdonders.ru.nl > +31-24-3668219 > > > neurobiologyoflanguage.com > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Joram van Driel, MSc. PhD student @ University of Amsterdam Brain & Cognition @ Department of Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Fri Jan 24 12:21:52 2014 From: joramvandriel at gmail.com (Joram van Driel) Date: Fri, 24 Jan 2014 12:21:52 +0100 Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' In-Reply-To: References: <711157447.420800.1390553739013.JavaMail.root@indus.zimbra.ru.nl> Message-ID: Sorry, this should have been: This 'pos' field is removed in further steps (ft_sourceinterpolate). When calling *ft_sourcestatistics* in version fieldtrip-20140109, the function statistics_wrapper searches for this field (line 228) and can't find it. On Fri, Jan 24, 2014 at 12:16 PM, Joram van Driel wrote: > Hi Nietzsche, > > Thanks for the suggestion, but unfortunately that's not what's going > wrong. My input data is a subject-by-condition array, so if I fill in > sourcedat{:,1} and sourcedat{:,2}, that would be equivalent to having two > separate variables and do source_condition1{:},source_condition2{:}. I > tried that but I get the same error "??? Reference to non-existent field > 'pos'." > > In fact, the error is I think a bug of the newest fieldtrip version, > because when I tried an older version (fieldtrip-20131031), it works > (although it later crashes on a design array issue, but that's something I > have to figure out myself ;)). > > The 'pos' field is a field that is present in the output of > ft_sourceanalysis; according to the help it's a N-by-3 matrix of the x-y-z > position of all the sources, where N is the sum of the length of the > 'inside' and 'outside' fields. > This 'pos' field is removed in further steps (ft_sourceinterpolate). When > calling ft_sourceanalysis in version fieldtrip-20140109, the function > statistics_wrapper searches for this field (line 228) and can't find it. > > Chrs, > > - Joram > > > > On Fri, Jan 24, 2014 at 9:55 AM, Lam, Nietzsche wrote: > >> Hi Joram, >> >> I'm not entirely sure if this is the solution, but when you call >> ft_sourcestatistics, you can try this: >> >> >> >> FieldTrip statistics functions understands that you want to use the data >> from all subjects when you use {:}, so there's no need to call individual >> columns with {:,X}. >> >> Best, >> Nietzsche >> >> >> >> ----- Original Message ----- >> > From: "Joram van Driel" >> > To: "FieldTrip discussion list" >> > Sent: Friday, 24 January, 2014 8:54:24 AM >> > Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' >> > Hi all, >> > >> > >> > I'm getting stuck with ft_sourcestatistics. >> > I want to do a simple two-condition contrast on neuromag MEG data, >> > where I did frequency beamforming on a pre vs. post tf-window. >> > >> > >> > I followed the instructions of the tutorial, so for each subject and >> > condition: >> > >> > >> > 1) ft_sourceanalysis with subject-specific vol and grid structures, >> > where I did the pre vs post contrast as follows: >> > >> > >> > >> > sourceAll = ft_sourceanalysis(cfg, freqAll(condi)); >> > >> > cfg.grid.filter = sourceAll.avg.filter; >> > sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) ); >> > sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi)); >> > >> > >> > >> > sourceDiff(condi) = sourcePost_con; >> > sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow - >> > sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; >> > >> > >> > 2) ft_sourceinterpolate with the subject-specific mri >> > 3) ft_volumenormalize to MNI with coordsys 'neuromag'. >> > 4) The output is stored in a subject-by-condition cell array, which I >> > put into ft_sourcestatistics with the following cfg: >> > >> > >> > >> > cfg = []; >> > cfg.parameter = 'avg.pow'; >> > cfg.method = 'analytic'; >> > cfg.statistic = 'depsamplesT'; >> > cfg.correctm = 'no'; >> > cfg.alpha = 0.05; >> > >> > >> > Nsub = 10; >> > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; >> > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; >> > cfg.tail = 0; % number, -1, 1 or 0 (default = 0) >> > cfg.ivar = 1; % number or list with indices, independent variable(s) >> > cfg.uvar = 2; % number or list with indices, unit variable(s) >> > >> > >> > stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, >> > sourceDiffNorm{:,2}); >> > >> > >> > >> > >> > This results in the error that it cannot find the field 'pos'; however >> > this field is only present in the result from ft_sourceanalysis (and >> > differs for each subject), but disappears as soon as >> > ft_sourceinterpolate is applied. I tried to put the result from >> > ft_sourceanalysis straight into ft_sourcestatistics (which according >> > to the help should be possible), but this doesn't recognize the input >> > as volume data (and apart from that, the subjects aren't spatially >> > aligned this way). >> > >> > >> > I hope someone can help me with this; any help is much appreciated! >> > >> > >> > Thanks, >> > Joram >> > >> > >> > -- >> > >> > Joram van Driel, MSc. >> > PhD student @ University of Amsterdam >> > Brain & Cognition @ Department of Psychology >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -- >> Nietzsche H.L. Lam, MSc >> PhD Candidate >> >> Max Planck Institute for Psycholinguistics >> Wundtlaan 1, 6525 XD Nijmegen, The Netherlands >> >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Kapittelweg 29, 6525EN Nijmegen, The Netherlands >> >> n.lam at fcdonders.ru.nl >> +31-24-3668219 >> >> >> neurobiologyoflanguage.com >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Joram van Driel, MSc. > PhD student @ University of Amsterdam > Brain & Cognition @ Department of Psychology > -- Joram van Driel, MSc. PhD student @ University of Amsterdam Brain & Cognition @ Department of Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jan 24 12:40:21 2014 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 24 Jan 2014 12:40:21 +0100 Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' In-Reply-To: References: <711157447.420800.1390553739013.JavaMail.root@indus.zimbra.ru.nl> Message-ID: Hi Joram, Probably this is my bad. ft_sourceinterpolate intentionally removes the pos field, which has to do with the representation of the data. FieldTrip either represents source reconstructed data that can be defined on a regular 3D grid as a so-called 'source-structure' (with a pos field), or as a so-called volume-structure (without a pos field). After the sourceinterpolate step your data is represented as the latter, lacking a pos field (intentionally), but unintentionally causing a crash in ft_sourcestatistics. A workaround for now would be for you to change line 228 in statistics_wrapper into if isfield(varargin{1}, 'transform') || (isfield(varargin{1}, 'dim') && prod(varargin{1}.dim)==size(varargin{1}.pos,1)). Could you try this out and let me know if that works? Then I can incorporate it in FT. Best and sorry for the inconvenience, JM On Jan 24, 2014, at 12:21 PM, Joram van Driel wrote: > Sorry, this should have been: > This 'pos' field is removed in further steps (ft_sourceinterpolate). When calling ft_sourcestatistics in version fieldtrip-20140109, the function statistics_wrapper searches for this field (line 228) and can't find it. > > > On Fri, Jan 24, 2014 at 12:16 PM, Joram van Driel wrote: > Hi Nietzsche, > > Thanks for the suggestion, but unfortunately that's not what's going wrong. My input data is a subject-by-condition array, so if I fill in sourcedat{:,1} and sourcedat{:,2}, that would be equivalent to having two separate variables and do source_condition1{:},source_condition2{:}. I tried that but I get the same error "??? Reference to non-existent field 'pos'." > > In fact, the error is I think a bug of the newest fieldtrip version, because when I tried an older version (fieldtrip-20131031), it works (although it later crashes on a design array issue, but that's something I have to figure out myself ;)). > > The 'pos' field is a field that is present in the output of ft_sourceanalysis; according to the help it's a N-by-3 matrix of the x-y-z position of all the sources, where N is the sum of the length of the 'inside' and 'outside' fields. > This 'pos' field is removed in further steps (ft_sourceinterpolate). When calling ft_sourceanalysis in version fieldtrip-20140109, the function statistics_wrapper searches for this field (line 228) and can't find it. > > Chrs, > > - Joram > > > > On Fri, Jan 24, 2014 at 9:55 AM, Lam, Nietzsche wrote: > Hi Joram, > > I'm not entirely sure if this is the solution, but when you call ft_sourcestatistics, you can try this: > > > > FieldTrip statistics functions understands that you want to use the data from all subjects when you use {:}, so there's no need to call individual columns with {:,X}. > > Best, > Nietzsche > > > > ----- Original Message ----- > > From: "Joram van Driel" > > To: "FieldTrip discussion list" > > Sent: Friday, 24 January, 2014 8:54:24 AM > > Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' > > Hi all, > > > > > > I'm getting stuck with ft_sourcestatistics. > > I want to do a simple two-condition contrast on neuromag MEG data, > > where I did frequency beamforming on a pre vs. post tf-window. > > > > > > I followed the instructions of the tutorial, so for each subject and > > condition: > > > > > > 1) ft_sourceanalysis with subject-specific vol and grid structures, > > where I did the pre vs post contrast as follows: > > > > > > > > sourceAll = ft_sourceanalysis(cfg, freqAll(condi)); > > > > cfg.grid.filter = sourceAll.avg.filter; > > sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) ); > > sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi)); > > > > > > > > sourceDiff(condi) = sourcePost_con; > > sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow - > > sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; > > > > > > 2) ft_sourceinterpolate with the subject-specific mri > > 3) ft_volumenormalize to MNI with coordsys 'neuromag'. > > 4) The output is stored in a subject-by-condition cell array, which I > > put into ft_sourcestatistics with the following cfg: > > > > > > > > cfg = []; > > cfg.parameter = 'avg.pow'; > > cfg.method = 'analytic'; > > cfg.statistic = 'depsamplesT'; > > cfg.correctm = 'no'; > > cfg.alpha = 0.05; > > > > > > Nsub = 10; > > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; > > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; > > cfg.tail = 0; % number, -1, 1 or 0 (default = 0) > > cfg.ivar = 1; % number or list with indices, independent variable(s) > > cfg.uvar = 2; % number or list with indices, unit variable(s) > > > > > > stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, > > sourceDiffNorm{:,2}); > > > > > > > > > > This results in the error that it cannot find the field 'pos'; however > > this field is only present in the result from ft_sourceanalysis (and > > differs for each subject), but disappears as soon as > > ft_sourceinterpolate is applied. I tried to put the result from > > ft_sourceanalysis straight into ft_sourcestatistics (which according > > to the help should be possible), but this doesn't recognize the input > > as volume data (and apart from that, the subjects aren't spatially > > aligned this way). > > > > > > I hope someone can help me with this; any help is much appreciated! > > > > > > Thanks, > > Joram > > > > > > -- > > > > Joram van Driel, MSc. > > PhD student @ University of Amsterdam > > Brain & Cognition @ Department of Psychology > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Nietzsche H.L. Lam, MSc > PhD Candidate > > Max Planck Institute for Psycholinguistics > Wundtlaan 1, 6525 XD Nijmegen, The Netherlands > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Kapittelweg 29, 6525EN Nijmegen, The Netherlands > > n.lam at fcdonders.ru.nl > +31-24-3668219 > > > neurobiologyoflanguage.com > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Joram van Driel, MSc. > PhD student @ University of Amsterdam > Brain & Cognition @ Department of Psychology > > > > -- > Joram van Driel, MSc. > PhD student @ University of Amsterdam > Brain & Cognition @ Department of Psychology > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands Max Planck Institute for Psycholinguistics, Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hanneke.vanDijk at med.uni-duesseldorf.de Fri Jan 24 13:11:05 2014 From: Hanneke.vanDijk at med.uni-duesseldorf.de (Hanneke.vanDijk at med.uni-duesseldorf.de) Date: Fri, 24 Jan 2014 12:11:05 +0000 Subject: [FieldTrip] ft_combineplanar on Neuromagdata In-Reply-To: <935899657.429750.1390557410212.JavaMail.root@bcbl.eu> References: <935899657.429750.1390557410212.JavaMail.root@bcbl.eu> Message-ID: <495873C58A622E45A3ABF4813B9451EC6E41986C@MAIL1-UKD.VMED.UKD> Dear Fred, First of all I think there is a typo, you refer to spectrum1 (in the isequal line), and but you use 'spectrum' as input in ft_combineplanar. My workflow is slightly different, but maybe that makes the difference...., in preprocessing I use (but I suppose you could also try that in freqanalysis) > cfg.channel = {'all', '-MEG***1'}; %with the goal to also only use the planar gradiometer data for further analysis (magnetometers end with a 1). p = label: {204x1 cell} Then after freqanalysis (which I also first do with the 204 channels), I use ft_combineplanar and I get the right result. I hope this somehow helps.. Best, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -----Ursprüngliche Nachricht----- Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Frédéric Roux Gesendet: Freitag, 24. Januar 2014 10:57 An: FieldTrip discussion list Betreff: [FieldTrip] ft_combineplanar on Neuromagdata Dear fieldtrip users, sorry to bother you with this really trivial question. I am running into an issue using ft_combineplanar on Neuromag data. The code I am using is as follows: cfg = []; cfg.channel = {'MEGGRAD'}; grad_data = ft_selectdata(meg_data); %after this step there are only planar-gradients left cfg = []; cfg.method = 'mtmfft'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.foi = 0:100; cfg.keeptrials = 'no'; spectrum1 = ft_freqanalysis(cfg,grad_data); % returns the FFT power spectrum cfg = []; spectrum2 = ft_combineplanar(cfg,spectrum); % this step should combine horizontal and vertical gradients into % one single gradient aka reduce the number of channels However, spectrum does not change. This can be seen by isequal(spectrum1.powspctrm,spectrum2.powspctrm) == 1 Also the number of channels (n = 204) is not reduced after ft_combineplanar when in fact there should only be n = 102 channels left. Is this related to the fact that ft_combineplanar is designed to take only time-frequency maps as input or am I doing something wrong here? Any advice would be highly appreciated. Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.cox at uva.nl Fri Jan 24 13:53:45 2014 From: r.cox at uva.nl (Roy Cox) Date: Fri, 24 Jan 2014 13:53:45 +0100 Subject: [FieldTrip] degrees of freedom In-Reply-To: <52e2233b.c5cc0e0a.2f09.665cSMTPIN_ADDED_BROKEN@mx.google.com> References: <52e2233b.c5cc0e0a.2f09.665cSMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: thanks Jim, looks like that should do the trick. Roy On Fri, Jan 24, 2014 at 9:14 AM, Herring, J.D. (Jim) < j.herring at fcdonders.ru.nl> wrote: > Hi Roy, > > > > Fieldtrip allows you to create and use your own functions to calculate > statistics. What you could also do is adjust the indepsamplesT statistic > function (fieldtrip/statfun/ft_statfun_indepsamplesT.m) to suite your needs > (E.g. change the Df in line 89). > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Roy Cox > *Sent:* donderdag 23 januari 2014 16:20 > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] degrees of freedom > > > > Hi all, > > I'm using ft_timelockstatistics with indepsamplesT to compare spatial > topographies between two groups (n=15 and n=13). The measure I'm interested > in has no time dimension, so I basically have one sample per electrode for > each subject. > > > > This works fine (I get the effects I hoped for). In order to make the > statistics 'slightly more valid', however, I need to adjust the degrees of > freedom. That is, the data I'm comparing between groups has already had a > covariate taken out. So df has to be df-1. > > Doesn't look like Fieldtrip allows you to set this in the cfg struct > somewhere, so any suggestions where I need to hack? > > Thanks, > > Roy > > > -- > > Roy Cox, M.Sc. | Brain & Cognition Group | Department of Psychology | > University of Amsterdam | Weesperplein 4 | 1018 XA Amsterdam | the > Netherlands | room 3.21 | phone: +31 20 525 6847 | email: r.cox at uva.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Roy Cox, M.Sc. | Brain & Cognition Group | Department of Psychology | University of Amsterdam | Weesperplein 4 | 1018 XA Amsterdam | the Netherlands | room 3.21 | phone: +31 20 525 6847 | email: r.cox at uva.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Fri Jan 24 14:09:35 2014 From: joramvandriel at gmail.com (Joram van Driel) Date: Fri, 24 Jan 2014 14:09:35 +0100 Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' In-Reply-To: References: <711157447.420800.1390553739013.JavaMail.root@indus.zimbra.ru.nl> Message-ID: Hi Jan-Mathijs, Thanks, that works. I also had to change line 643 into (copied from statistics_wrapper in FT version 20131031): fprintf('only selecting voxels inside the brain for statistics (%.1f%%)\n', 100*length(varargin{1}.inside)/prod(varargin{1}.dim)); This line also used the non-existing .pos field. Thanks again, Joram On Fri, Jan 24, 2014 at 12:40 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Joram, > > Probably this is my bad. > ft_sourceinterpolate intentionally removes the pos field, which has to do > with the representation of the data. FieldTrip either represents source > reconstructed data that can be defined on a regular 3D grid as a so-called > 'source-structure' (with a pos field), or as a so-called volume-structure > (without a pos field). After the sourceinterpolate step your data is > represented as the latter, lacking a pos field (intentionally), but > unintentionally causing a crash in ft_sourcestatistics. > A workaround for now would be for you to change line 228 in > statistics_wrapper into if isfield(varargin{1}, 'transform') || > (isfield(varargin{1}, 'dim') && > prod(varargin{1}.dim)==size(varargin{1}.pos,1)). > Could you try this out and let me know if that works? Then I can > incorporate it in FT. > > Best and sorry for the inconvenience, > JM > > > > On Jan 24, 2014, at 12:21 PM, Joram van Driel wrote: > > Sorry, this should have been: > This 'pos' field is removed in further steps (ft_sourceinterpolate). When > calling *ft_sourcestatistics* in version fieldtrip-20140109, the function > statistics_wrapper searches for this field (line 228) and can't find it. > > > On Fri, Jan 24, 2014 at 12:16 PM, Joram van Driel > wrote: > >> Hi Nietzsche, >> >> Thanks for the suggestion, but unfortunately that's not what's going >> wrong. My input data is a subject-by-condition array, so if I fill in >> sourcedat{:,1} and sourcedat{:,2}, that would be equivalent to having two >> separate variables and do source_condition1{:},source_condition2{:}. I >> tried that but I get the same error "??? Reference to non-existent field >> 'pos'." >> >> In fact, the error is I think a bug of the newest fieldtrip version, >> because when I tried an older version (fieldtrip-20131031), it works >> (although it later crashes on a design array issue, but that's something I >> have to figure out myself ;)). >> >> The 'pos' field is a field that is present in the output of >> ft_sourceanalysis; according to the help it's a N-by-3 matrix of the x-y-z >> position of all the sources, where N is the sum of the length of the >> 'inside' and 'outside' fields. >> This 'pos' field is removed in further steps (ft_sourceinterpolate). When >> calling ft_sourceanalysis in version fieldtrip-20140109, the function >> statistics_wrapper searches for this field (line 228) and can't find it. >> >> Chrs, >> >> - Joram >> >> >> >> On Fri, Jan 24, 2014 at 9:55 AM, Lam, Nietzsche wrote: >> >>> Hi Joram, >>> >>> I'm not entirely sure if this is the solution, but when you call >>> ft_sourcestatistics, you can try this: >>> >>> >>> >>> FieldTrip statistics functions understands that you want to use the data >>> from all subjects when you use {:}, so there's no need to call individual >>> columns with {:,X}. >>> >>> Best, >>> Nietzsche >>> >>> >>> >>> ----- Original Message ----- >>> > From: "Joram van Driel" >>> > To: "FieldTrip discussion list" >>> > Sent: Friday, 24 January, 2014 8:54:24 AM >>> > Subject: [FieldTrip] ft_sourcestatistics cannot find field 'pos' >>> > Hi all, >>> > >>> > >>> > I'm getting stuck with ft_sourcestatistics. >>> > I want to do a simple two-condition contrast on neuromag MEG data, >>> > where I did frequency beamforming on a pre vs. post tf-window. >>> > >>> > >>> > I followed the instructions of the tutorial, so for each subject and >>> > condition: >>> > >>> > >>> > 1) ft_sourceanalysis with subject-specific vol and grid structures, >>> > where I did the pre vs post contrast as follows: >>> > >>> > >>> > >>> > sourceAll = ft_sourceanalysis(cfg, freqAll(condi)); >>> > >>> > cfg.grid.filter = sourceAll.avg.filter; >>> > sourcePre_con = ft_sourceanalysis(cfg, freqPre(condi) ); >>> > sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi)); >>> > >>> > >>> > >>> > sourceDiff(condi) = sourcePost_con; >>> > sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow - >>> > sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow; >>> > >>> > >>> > 2) ft_sourceinterpolate with the subject-specific mri >>> > 3) ft_volumenormalize to MNI with coordsys 'neuromag'. >>> > 4) The output is stored in a subject-by-condition cell array, which I >>> > put into ft_sourcestatistics with the following cfg: >>> > >>> > >>> > >>> > cfg = []; >>> > cfg.parameter = 'avg.pow'; >>> > cfg.method = 'analytic'; >>> > cfg.statistic = 'depsamplesT'; >>> > cfg.correctm = 'no'; >>> > cfg.alpha = 0.05; >>> > >>> > >>> > Nsub = 10; >>> > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; >>> > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; >>> > cfg.tail = 0; % number, -1, 1 or 0 (default = 0) >>> > cfg.ivar = 1; % number or list with indices, independent variable(s) >>> > cfg.uvar = 2; % number or list with indices, unit variable(s) >>> > >>> > >>> > stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, >>> > sourceDiffNorm{:,2}); >>> > >>> > >>> > >>> > >>> > This results in the error that it cannot find the field 'pos'; however >>> > this field is only present in the result from ft_sourceanalysis (and >>> > differs for each subject), but disappears as soon as >>> > ft_sourceinterpolate is applied. I tried to put the result from >>> > ft_sourceanalysis straight into ft_sourcestatistics (which according >>> > to the help should be possible), but this doesn't recognize the input >>> > as volume data (and apart from that, the subjects aren't spatially >>> > aligned this way). >>> > >>> > >>> > I hope someone can help me with this; any help is much appreciated! >>> > >>> > >>> > Thanks, >>> > Joram >>> > >>> > >>> > -- >>> > >>> > Joram van Driel, MSc. >>> > PhD student @ University of Amsterdam >>> > Brain & Cognition @ Department of Psychology >>> > _______________________________________________ >>> > fieldtrip mailing list >>> > fieldtrip at donders.ru.nl >>> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> -- >>> Nietzsche H.L. Lam, MSc >>> PhD Candidate >>> >>> Max Planck Institute for Psycholinguistics >>> Wundtlaan 1, 6525 XD Nijmegen, The Netherlands >>> >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Kapittelweg 29, 6525EN Nijmegen, The Netherlands >>> >>> n.lam at fcdonders.ru.nl >>> +31-24-3668219 >>> >>> >>> neurobiologyoflanguage.com >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Joram van Driel, MSc. >> PhD student @ University of Amsterdam >> Brain & Cognition @ Department of Psychology >> > > > > -- > Joram van Driel, MSc. > PhD student @ University of Amsterdam > Brain & Cognition @ Department of Psychology > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Joram van Driel, MSc. PhD student @ University of Amsterdam Brain & Cognition @ Department of Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.rombetto at cib.na.cnr.it Fri Jan 24 16:05:52 2014 From: s.rombetto at cib.na.cnr.it (s.rombetto at cib.na.cnr.it) Date: Fri, 24 Jan 2014 16:05:52 +0100 Subject: [FieldTrip] problem with ft_volumerealign and ft_convert_coordsys Message-ID: <20140124160552.wy6hoz6lcg888oo4@arco.cib.na.cnr.it> Dear Jan-Mathijs > I don't understand what you mean by 'no results appear on my > screen'. Does this mean that mri_realigned is not created? yes, I mean that I have no output at all. > You have to have spm on your path in order to get this. try > ft_hastoolbox('spm',1) and try again. you were right, this was a stupid mistake. I didn't install the spm toolbox. Now I have installed it and tried again. So I get a different erro message: ??? Error using ==> spm_platform>init_platform at 173 PCWIN64 not supported architecture for SPM Error in ==> spm_platform at 65 if isempty(PLATFORM), PLATFORM = init_platform; end Error in ==> spm_vol_minc at 80 if ~spm_platform('bigend') & datatype~=2 & datatype~=2+128, datatype = datatype*256; end; Error in ==> ft_read_mri at 132 hdr = spm_vol_minc(filename); Error in ==> align_ctf2spm at 137 mri2 = ft_read_mri(template); Error in ==> ft_convert_coordsys at 90 obj = align_ctf2spm(obj, opt); Do you know any solution for this problem? Moreover why the conversion from ctf to itab is not yet supported? May I perform this conversion by using 2 different conversion (like ctf to spm and from spm to itab?) Best regards Sara >> >> Error in ==> align_ctf2spm at 121 >> switch spm('ver') >> >> Error in ==> ft_convert_coordsys at 90 >> obj = align_ctf2spm(obj, opt); >> >> Finally I tried to use the function align_itab2spm in the following way >> mri = align_itab2spm(mri, 2) >> but I get the error message >> >> ??? Undefined function or method 'spm' for input arguments of type 'char'. >> >> Error in ==> align_itab2spm at 108 >> switch spm('ver') >> > > > See above. > > Best, > Jan-Mathijs > > >> Do you have any idea or suggestion to solve this problem? >> >> Thanks in advance for any advice, >> Sara >> >> ------------------------- >> Dott.ssa Sara Rombetto >> Istituto di Cibernetica >> "E. Caianiello" >> Via Campi Flegrei, 34 >> 80078 Pozzuoli (NA) >> Italy >> mob +39 3401689815 >> tel +39 0818675361 >> fax +39 0818675128 >> -------------------------- >> "I disapprove of what you say, but I will defend to the death your >> right to say >> it." [Evelyn Beatrice Hall, The Friends Of Voltaire] >> >> ---------------------------------------------------------------- >> This message was sent using IMP, the Internet Messaging Program. >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > > Max Planck Institute for Psycholinguistics, > Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > ------------------------- Dott.ssa Sara Rombetto Istituto di Cibernetica "E. Caianiello" Via Campi Flegrei, 34 80078 Pozzuoli (NA) Italy mob +39 3401689815 tel +39 0818675361 fax +39 0818675128 -------------------------- "I disapprove of what you say, but I will defend to the death your right to say it." [Evelyn Beatrice Hall, The Friends Of Voltaire] ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From jkhartshorne at gmail.com Fri Jan 24 16:54:10 2014 From: jkhartshorne at gmail.com (Joshua Hartshorne) Date: Fri, 24 Jan 2014 10:54:10 -0500 Subject: [FieldTrip] interactions Message-ID: Hi List! I have seen around a dozen comments in the archives that interactions can't be tested by permutation for within-subject designs. I haven't been able to find a thread that explains why not. It seems like in a 2x2 design, you could still pick one of the conditions and permute the labels. I'm sure there's a proof somewhere for why this doesn't work, and it would be great to see it. Similarly, for the mixed design, why permute the between-subject labels? Why not permute the within-subject labels instead? Actually, why not do both? I follow the reasoning why permuting both is overkill, but not why it's wrong. If someone could explain, it would be much appreciated. Knowing what to do is good, but it would be even better to understand why. Thanks, Josh -------------- next part -------------- An HTML attachment was scrubbed... URL: From haristz at umn.edu Sat Jan 25 02:08:41 2014 From: haristz at umn.edu (Haris Tzagarakis) Date: Fri, 24 Jan 2014 19:08:41 -0600 Subject: [FieldTrip] 2-dipole beamformer Message-ID: <52E30E99.5070507@umn.edu> Hi There, I have been trying to implement a '2-dipole' DICS beamformer as in for example Schoffelen et al 2008 based on the literature and some postings on this list. This is not to use for coherence work but simply to take into account a strong source. In essence, I have been augmenting every element of my precomputed leadfield grid with the leadfield of a selected reference location that represents the strong source. Then, at the beamformer level I get a 6x6 csd matrix for every location in the grid and from that, I use the 3x3 diagonal martix that corresponds to the 'moving/non-reference' dipole for power estimation. This all seems to work except that the brain power maps I get show a preferential attenuation of the signal in the area of the strong source (now other sources are stronger) - and in fact the location selected for reference seems to be completely silent. I may be misinterpreting the technique here but I wasn't expecting that outcome - I thought that what would happen would be that my output map would be similar to the original although with lower power levels and that the 'extra' contribution of the strong source for every leadfield location would find itself in the second 3x3 diagonal (when I plot the power of that this seems to indeed be the case *but* the area of reference is again attenuated). I think I may have failed to interpret or implement something correctly here (most likely both!). Am I doing something wrong at the leadfield grid level (does the leadfield matrix of the location of reference require special treatment for example?) or should I be using the 6x6 csd matrix differently? - or maybe it could be something else? I would be grateful for comments from anyone who has tried this before. Best, Haris -- Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych Senior Research Associate University of Minnesota Dept of Neuroscience office: Brain Sciences Center Minneapolis VA Medical Center Tel:612-467-1363 From aestnth at hum.au.dk Sat Jan 25 02:14:46 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Sat, 25 Jan 2014 02:14:46 +0100 Subject: [FieldTrip] 2-dipole beamformer Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sun Jan 26 08:24:36 2014 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sun, 26 Jan 2014 11:24:36 +0400 Subject: [FieldTrip] interactions Message-ID: Hi Josh, Have you seen this [admittedly pretty old now] message from the archives: http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html ? My understanding was that it is ok to test interactions in within-subjects designs, and that you could do it by faking a dataset that represents the interaction (step 3 in that message) and then doing a dependent samples t-test. I had never heard before that interactions can't be tested in a within-subjects design, but also it's been a long time since I've looked at this issue--I'd definitely be interested to hear if this is no longer the recommended way to test interactions. I have seen messages saying that it doesn't work for between-subjects designs (e.g. http://mailman.science.ru.nl/pipermail/fieldtrip/2011-September/004244.html), but I'm not sure if that's still current. Hopefully someone on the list can offer more insight about the second question. Best, Steve > > Message: 2 > Date: Fri, 24 Jan 2014 10:54:10 -0500 > From: Joshua Hartshorne > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] interactions > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hi List! > > I have seen around a dozen comments in the archives that interactions can't > be tested by permutation for within-subject designs. I haven't been able to > find a thread that explains why not. It seems like in a 2x2 design, you > could still pick one of the conditions and permute the labels. I'm sure > there's a proof somewhere for why this doesn't work, and it would be great > to see it. > > Similarly, for the mixed design, why permute the between-subject labels? > Why not permute the within-subject labels instead? Actually, why not do > both? I follow the reasoning why permuting both is overkill, but not why > it's wrong. > > If someone could explain, it would be much appreciated. Knowing what to do > is good, but it would be even better to understand why. > > Thanks, > Josh > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > From aestnth at hum.au.dk Sun Jan 26 08:30:51 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Sun, 26 Jan 2014 08:30:51 +0100 Subject: [FieldTrip] interactions Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chaitanya.pro at gmail.com Sun Jan 26 08:46:24 2014 From: chaitanya.pro at gmail.com (Chaitanya Srinivas) Date: Sun, 26 Jan 2014 08:46:24 +0100 Subject: [FieldTrip] Urgent: Error in Source Statistics, Group level Message-ID: Dear fieldtrip users, I would like to do sourcestatistics on a group level with eeg data. I have a pre and post intervention measurement for each of my 10 subjects . After source reconstruction using an DICS beamformer and volume normalization, I calculated the sourcegrandaverage for the pre and post condition and i have avg.pow for each subject. However, when I use the grandaverage results in ft_sourcestatistics in the configuration shown below and plot the result I just get a blank anatomical mri. It only runs with cfg.parameter="pow" .I tried with cfg.parameter = 'avg.pow' it doesnt run. Do I have to set any additional parameters or am I making some mistake? cfg=[]; cfg.dim = grandAVGsourcePre.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; cfg.alpha = 0.05; cfg.tail = 0; nsubj=length(sourcePre.trial); cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg, grandAVGsourcePre, grandAVGsourcePost); *and next interpolation* cfg = []; cfg.voxelcoord = 'no'; cfg.parameter = 'mask'; cfg.interpmethod = 'nearest'; cfg.coordsys = 'mni'; mask = ft_sourceinterpolate(cfg,stat,mri); statplot.mask = mask.mask; *and then for plotting* cfg = []; cfg.method = 'slice'; cfg.funparameter = 'stat'; cfg.maskparameter = 'mask'; cfg.funcolorlim = [-0.1 0.1]; cfg.opacitylim = [-0.1 0.1]; figure ft_sourceplot(cfg, statplot); *===============================================* *[image: Inline image 1]* *Best Regards* *Chaitanya Srinivas Lanka Wiss. Mitarbeiter * *PhD StudentFunctional and Restorative Neurosurgery Neural Information ProcessingNeurosurgical University Hospital* * Graduate Training Center for Neuroscience Eberhard Karls University Eberhard Karls University **Otfried-Mueller-Str.45 Österbergstr. 3* * D-72076 Tuebingen **D-72074 Tuebingen* *Mobile Phone Number : +49-176-79035731* *===============================================* -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 23195 bytes Desc: not available URL: From eelke.spaak at donders.ru.nl Sun Jan 26 08:53:50 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Sun, 26 Jan 2014 08:53:50 +0100 Subject: [FieldTrip] Urgent: Error in Source Statistics, Group level In-Reply-To: References: Message-ID: Dear Chaitanya, Perhaps an obvious question: do you find any significant differences in the statistics step (inspect the stat structure)? If not, the mask will consist of all zeroes, hence giving you a 'blank' plot. Best, Eelke On 26 January 2014 08:46, Chaitanya Srinivas wrote: > Dear fieldtrip users, > I would like to do sourcestatistics on a group level with eeg data. I have a > pre and post intervention measurement for each of my 10 subjects > . After source reconstruction using an DICS beamformer > and volume normalization, I calculated the sourcegrandaverage for the pre and > post condition and i have avg.pow for each subject. > > However, when I use the grandaverage results in ft_sourcestatistics in the > configuration shown below and plot the result I just get a blank anatomical > mri. It only runs with cfg.parameter="pow" .I tried with cfg.parameter = 'avg.pow' it doesnt run. > Do I have to set any additional parameters or am I making some mistake? > > > cfg=[]; > cfg.dim = grandAVGsourcePre.dim; > cfg.method = 'montecarlo'; > cfg.statistic = 'depsamplesT'; > cfg.parameter = 'pow'; > cfg.correctm = 'cluster'; > cfg.numrandomization = 1000; > cfg.alpha = 0.05; > cfg.tail = 0; > > nsubj=length(sourcePre.trial); > cfg.design(1,:) = [1:nsubj 1:nsubj]; > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > cfg.uvar = 1; > cfg.ivar = 2; > stat = ft_sourcestatistics(cfg, grandAVGsourcePre, grandAVGsourcePost); > > > *and next interpolation* > cfg = []; > > cfg.voxelcoord = 'no'; > cfg.parameter = 'mask'; > cfg.interpmethod = 'nearest'; > cfg.coordsys = 'mni'; > > mask = ft_sourceinterpolate(cfg,stat,mri); > statplot.mask = mask.mask; > > > *and then for plotting* > > cfg = []; > cfg.method = 'slice'; > cfg.funparameter = 'stat'; > cfg.maskparameter = 'mask'; > cfg.funcolorlim = [-0.1 0.1]; > cfg.opacitylim = [-0.1 0.1]; > figure > ft_sourceplot(cfg, statplot); > > > > > > > > > > * ===============================================* > > > *[image: Inline image 1]* > *Best Regards* > > > *Chaitanya Srinivas Lanka Wiss. Mitarbeiter > * > > *PhD Student Functional and Restorative Neurosurgery Neural Information > ProcessingNeurosurgical University Hospital* > > * Graduate Training Center for Neuroscience Eberhard Karls > University Eberhard Karls University **Otfried-Mueller-Str.45 > Österbergstr. 3* > * D-72076 Tuebingen **D-72074 > Tuebingen* > > *Mobile Phone Number : +49-176-79035731* > *===============================================* > > _______________________________________________ > 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: image.png Type: image/png Size: 23195 bytes Desc: not available URL: From chaitanya.pro at gmail.com Sun Jan 26 09:06:28 2014 From: chaitanya.pro at gmail.com (Chaitanya Srinivas) Date: Sun, 26 Jan 2014 09:06:28 +0100 Subject: [FieldTrip] Urgent: Error in Source Statistics, Group level In-Reply-To: References: Message-ID: Hi Eelke, I looked at the stat.stat values if that is what you mean. There are some NaNs , but also some values. Similarly in stat.prob, there are some 1's. The stat.mask is all zeros as you say. Any further suggestions from you? Thank you *===============================================* *[image: Inline image 1]* *Best Regards* *Chaitanya Srinivas Lanka Wiss. Mitarbeiter * *PhD StudentFunctional and Restorative Neurosurgery Neural Information ProcessingNeurosurgical University Hospital* * Graduate Training Center for Neuroscience Eberhard Karls University Eberhard Karls University **Otfried-Mueller-Str.45 Österbergstr. 3* * D-72076 Tuebingen **D-72074 Tuebingen* *Mobile Phone Number : +49-176-79035731* *===============================================* On Sun, Jan 26, 2014 at 8:53 AM, Eelke Spaak wrote: > Dear Chaitanya, > > Perhaps an obvious question: do you find any significant differences in > the statistics step (inspect the stat structure)? If not, the mask will > consist of all zeroes, hence giving you a 'blank' plot. > > Best, > Eelke > > > On 26 January 2014 08:46, Chaitanya Srinivas wrote: > >> Dear fieldtrip users, >> I would like to do sourcestatistics on a group level with eeg data. I have a >> pre and post intervention measurement for each of my 10 subjects >> . After source reconstruction using an DICS beamformer >> and volume normalization, I calculated the sourcegrandaverage for the pre and >> post condition and i have avg.pow for each subject. >> >> However, when I use the grandaverage results in ft_sourcestatistics in the >> configuration shown below and plot the result I just get a blank anatomical >> mri. It only runs with cfg.parameter="pow" .I tried with cfg.parameter = 'avg.pow' it doesnt run. >> Do I have to set any additional parameters or am I making some mistake? >> >> >> cfg=[]; >> cfg.dim = grandAVGsourcePre.dim; >> cfg.method = 'montecarlo'; >> cfg.statistic = 'depsamplesT'; >> cfg.parameter = 'pow'; >> cfg.correctm = 'cluster'; >> cfg.numrandomization = 1000; >> cfg.alpha = 0.05; >> cfg.tail = 0; >> >> nsubj=length(sourcePre.trial); >> cfg.design(1,:) = [1:nsubj 1:nsubj]; >> cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >> cfg.uvar = 1; >> cfg.ivar = 2; >> stat = ft_sourcestatistics(cfg, grandAVGsourcePre, grandAVGsourcePost); >> >> >> *and next interpolation* >> cfg = []; >> >> >> cfg.voxelcoord = 'no'; >> cfg.parameter = 'mask'; >> cfg.interpmethod = 'nearest'; >> cfg.coordsys = 'mni'; >> >> >> mask = ft_sourceinterpolate(cfg,stat,mri); >> statplot.mask = mask.mask; >> >> >> *and then for plotting* >> >> >> cfg = []; >> cfg.method = 'slice'; >> cfg.funparameter = 'stat'; >> cfg.maskparameter = 'mask'; >> cfg.funcolorlim = [-0.1 0.1]; >> cfg.opacitylim = [-0.1 0.1]; >> figure >> ft_sourceplot(cfg, statplot); >> >> >> >> >> >> >> >> >> >> >> * ===============================================* >> >> >> *[image: Inline image 1]* >> *Best Regards* >> >> >> *Chaitanya Srinivas Lanka Wiss. Mitarbeiter >> * >> >> *PhD Student Functional and Restorative Neurosurgery Neural Information >> ProcessingNeurosurgical University Hospital* >> >> * Graduate Training Center for Neuroscience Eberhard Karls >> University Eberhard Karls University **Otfried-Mueller-Str.45 >> Österbergstr. 3* >> * D-72076 Tuebingen **D-72074 >> Tuebingen* >> >> *Mobile Phone Number : +49-176-79035731* >> *===============================================* >> >> _______________________________________________ >> 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: image.png Type: image/png Size: 23195 bytes Desc: not available URL: From eelke.spaak at donders.ru.nl Sun Jan 26 09:40:47 2014 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Sun, 26 Jan 2014 09:40:47 +0100 Subject: [FieldTrip] Urgent: Error in Source Statistics, Group level In-Reply-To: References: Message-ID: Hi Chaitanya, stat.prob reflects the 'p-values' resulting from your statistical test. So voxels expressing e.g. stat.prob < 0.05 should be considered reflecting a significant difference between conditions. The NaNs correspond to voxels outside the brain. Since stat.mask is all zeros (which by default is just stat.prob < 0.05), this indicates there are no significant differences between your conditions. There is nothing we can help you with in this respect :) Best, Eelke On 26 January 2014 09:06, Chaitanya Srinivas wrote: > Hi Eelke, > > I looked at the stat.stat values if that is what you mean. There > are some NaNs , but also some values. Similarly in stat.prob, there are > some 1's. The stat.mask is all zeros as you say. > > Any further suggestions from you? > Thank you > > *=============================================== * > > > *[image: Inline image 1]* > *Best Regards* > > > *Chaitanya Srinivas Lanka Wiss. Mitarbeiter > * > > *PhD Student Functional and Restorative Neurosurgery Neural Information > ProcessingNeurosurgical University Hospital* > > * Graduate Training Center for Neuroscience Eberhard Karls > University Eberhard Karls University **Otfried-Mueller-Str.45 > Österbergstr. 3* > * D-72076 Tuebingen **D-72074 > Tuebingen* > > *Mobile Phone Number : +49-176-79035731* > *===============================================* > > > On Sun, Jan 26, 2014 at 8:53 AM, Eelke Spaak wrote: > >> Dear Chaitanya, >> >> Perhaps an obvious question: do you find any significant differences in >> the statistics step (inspect the stat structure)? If not, the mask will >> consist of all zeroes, hence giving you a 'blank' plot. >> >> Best, >> Eelke >> >> >> On 26 January 2014 08:46, Chaitanya Srinivas wrote: >> >>> Dear fieldtrip users, >>> I would like to do sourcestatistics on a group level with eeg data. I have a >>> pre and post intervention measurement for each of my 10 subjects >>> . After source reconstruction using an DICS beamformer >>> and volume normalization, I calculated the sourcegrandaverage for the pre and >>> post condition and i have avg.pow for each subject. >>> >>> However, when I use the grandaverage results in ft_sourcestatistics in the >>> configuration shown below and plot the result I just get a blank anatomical >>> mri. It only runs with cfg.parameter="pow" .I tried with cfg.parameter = 'avg.pow' it doesnt run. >>> Do I have to set any additional parameters or am I making some mistake? >>> >>> >>> cfg=[]; >>> cfg.dim = grandAVGsourcePre.dim; >>> cfg.method = 'montecarlo'; >>> cfg.statistic = 'depsamplesT'; >>> cfg.parameter = 'pow'; >>> cfg.correctm = 'cluster'; >>> cfg.numrandomization = 1000; >>> cfg.alpha = 0.05; >>> cfg.tail = 0; >>> >>> nsubj=length(sourcePre.trial); >>> cfg.design(1,:) = [1:nsubj 1:nsubj]; >>> cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >>> cfg.uvar = 1; >>> cfg.ivar = 2; >>> stat = ft_sourcestatistics(cfg, grandAVGsourcePre, grandAVGsourcePost); >>> >>> >>> *and next interpolation* >>> cfg = []; >>> >>> >>> >>> cfg.voxelcoord = 'no'; >>> cfg.parameter = 'mask'; >>> cfg.interpmethod = 'nearest'; >>> cfg.coordsys = 'mni'; >>> >>> >>> >>> mask = ft_sourceinterpolate(cfg,stat,mri); >>> statplot.mask = mask.mask; >>> >>> >>> *and then for plotting* >>> >>> >>> >>> cfg = []; >>> cfg.method = 'slice'; >>> cfg.funparameter = 'stat'; >>> cfg.maskparameter = 'mask'; >>> cfg.funcolorlim = [-0.1 0.1]; >>> cfg.opacitylim = [-0.1 0.1]; >>> figure >>> ft_sourceplot(cfg, statplot); >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> * ===============================================* >>> >>> >>> *[image: Inline image 1]* >>> *Best Regards* >>> >>> >>> *Chaitanya Srinivas Lanka Wiss. Mitarbeiter >>> * >>> >>> *PhD Student Functional and Restorative Neurosurgery Neural Information >>> ProcessingNeurosurgical University Hospital* >>> >>> * Graduate Training Center for Neuroscience Eberhard Karls >>> University Eberhard Karls University **Otfried-Mueller-Str.45 >>> Österbergstr. 3* >>> * D-72076 Tuebingen **D-72074 >>> Tuebingen* >>> >>> *Mobile Phone Number : +49-176-79035731* >>> *===============================================* >>> >>> _______________________________________________ >>> 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 23195 bytes Desc: not available URL: From chaitanya.pro at gmail.com Sun Jan 26 09:46:03 2014 From: chaitanya.pro at gmail.com (Chaitanya Srinivas) Date: Sun, 26 Jan 2014 09:46:03 +0100 Subject: [FieldTrip] Urgent: Error in Source Statistics, Group level In-Reply-To: References: Message-ID: Hi Eelke, No significant results then in my data. I wonder how my boss takes it :P. Anyway, thanks for your help on a Sunday that too. >From your reply I also understand that the code doesn't have any mistakes :) *===============================================* *[image: Inline image 1]* *Best Regards* *Chaitanya Srinivas Lanka Wiss. Mitarbeiter * *PhD StudentFunctional and Restorative Neurosurgery Neural Information ProcessingNeurosurgical University Hospital* * Graduate Training Center for Neuroscience Eberhard Karls University Eberhard Karls University **Otfried-Mueller-Str.45 Österbergstr. 3* * D-72076 Tuebingen **D-72074 Tuebingen* *Mobile Phone Number : +49-176-79035731* *===============================================* On Sun, Jan 26, 2014 at 9:40 AM, Eelke Spaak wrote: > Hi Chaitanya, > > stat.prob reflects the 'p-values' resulting from your statistical test. So > voxels expressing e.g. stat.prob < 0.05 should be considered reflecting a > significant difference between conditions. The NaNs correspond to voxels > outside the brain. > > Since stat.mask is all zeros (which by default is just stat.prob < 0.05), > this indicates there are no significant differences between your > conditions. There is nothing we can help you with in this respect :) > > Best, > Eelke > > > On 26 January 2014 09:06, Chaitanya Srinivas wrote: > >> Hi Eelke, >> >> I looked at the stat.stat values if that is what you mean. There >> are some NaNs , but also some values. Similarly in stat.prob, there are >> some 1's. The stat.mask is all zeros as you say. >> >> Any further suggestions from you? >> Thank you >> >> * =============================================== * >> >> >> *[image: Inline image 1]* >> *Best Regards* >> >> >> *Chaitanya Srinivas Lanka Wiss. Mitarbeiter >> * >> >> *PhD Student Functional and Restorative Neurosurgery Neural Information >> ProcessingNeurosurgical University Hospital* >> >> * Graduate Training Center for Neuroscience Eberhard Karls >> University Eberhard Karls University **Otfried-Mueller-Str.45 >> Österbergstr. 3* >> * D-72076 Tuebingen **D-72074 >> Tuebingen* >> >> *Mobile Phone Number : +49-176-79035731* >> *===============================================* >> >> >> On Sun, Jan 26, 2014 at 8:53 AM, Eelke Spaak wrote: >> >>> Dear Chaitanya, >>> >>> Perhaps an obvious question: do you find any significant differences in >>> the statistics step (inspect the stat structure)? If not, the mask will >>> consist of all zeroes, hence giving you a 'blank' plot. >>> >>> Best, >>> Eelke >>> >>> >>> On 26 January 2014 08:46, Chaitanya Srinivas wrote: >>> >>>> Dear fieldtrip users, >>>> I would like to do sourcestatistics on a group level with eeg data. I have a >>>> pre and post intervention measurement for each of my 10 subjects >>>> . After source reconstruction using an DICS beamformer >>>> and volume normalization, I calculated the sourcegrandaverage for the pre and >>>> post condition and i have avg.pow for each subject. >>>> >>>> However, when I use the grandaverage results in ft_sourcestatistics in the >>>> configuration shown below and plot the result I just get a blank anatomical >>>> mri. It only runs with cfg.parameter="pow" .I tried with cfg.parameter = 'avg.pow' it doesnt run. >>>> Do I have to set any additional parameters or am I making some mistake? >>>> >>>> >>>> cfg=[]; >>>> cfg.dim = grandAVGsourcePre.dim; >>>> cfg.method = 'montecarlo'; >>>> cfg.statistic = 'depsamplesT'; >>>> cfg.parameter = 'pow'; >>>> cfg.correctm = 'cluster'; >>>> cfg.numrandomization = 1000; >>>> cfg.alpha = 0.05; >>>> cfg.tail = 0; >>>> >>>> nsubj=length(sourcePre.trial); >>>> cfg.design(1,:) = [1:nsubj 1:nsubj]; >>>> cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; >>>> cfg.uvar = 1; >>>> cfg.ivar = 2; >>>> stat = ft_sourcestatistics(cfg, grandAVGsourcePre, grandAVGsourcePost); >>>> >>>> >>>> *and next interpolation* >>>> cfg = []; >>>> >>>> >>>> >>>> >>>> cfg.voxelcoord = 'no'; >>>> cfg.parameter = 'mask'; >>>> cfg.interpmethod = 'nearest'; >>>> cfg.coordsys = 'mni'; >>>> >>>> >>>> >>>> >>>> mask = ft_sourceinterpolate(cfg,stat,mri); >>>> statplot.mask = mask.mask; >>>> >>>> >>>> *and then for plotting* >>>> >>>> >>>> >>>> >>>> cfg = []; >>>> cfg.method = 'slice'; >>>> cfg.funparameter = 'stat'; >>>> cfg.maskparameter = 'mask'; >>>> cfg.funcolorlim = [-0.1 0.1]; >>>> cfg.opacitylim = [-0.1 0.1]; >>>> figure >>>> ft_sourceplot(cfg, statplot); >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> * ===============================================* >>>> >>>> >>>> *[image: Inline image 1]* >>>> *Best Regards* >>>> >>>> >>>> *Chaitanya Srinivas Lanka Wiss. Mitarbeiter >>>> * >>>> >>>> *PhD Student Functional and Restorative Neurosurgery Neural Information >>>> ProcessingNeurosurgical University Hospital* >>>> >>>> * Graduate Training Center for Neuroscience Eberhard Karls >>>> University Eberhard Karls University **Otfried-Mueller-Str.45 >>>> Österbergstr. 3* >>>> * D-72076 Tuebingen **D-72074 >>>> Tuebingen* >>>> >>>> *Mobile Phone Number : +49-176-79035731* >>>> *===============================================* >>>> >>>> _______________________________________________ >>>> 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 23195 bytes Desc: not available URL: From e.maris at psych.ru.nl Sun Jan 26 10:08:35 2014 From: e.maris at psych.ru.nl (Eric Maris) Date: Sun, 26 Jan 2014 10:08:35 +0100 (CET) Subject: [FieldTrip] interactions In-Reply-To: References: Message-ID: <040701cf1a76$2fd5fd50$8f81f7f0$@maris@psych.ru.nl> Hi Steve and Josh, Josh writes > > labels. I'm sure there's a proof somewhere for why this doesn't work, > > and it would be great to see it. In general, questions like these are very hard to answer satisfactorily on a discussion list. It is dealt with much more easily in person, say at one of the Fieldtrip courses. However, let me give it a try. To prove that something does not work it suffices to produces a single example that shows the contrary. Try the following: Generate random data in a 2-by-2 between-subjects design (say, normally distributed within every cell). Add large main effects (relative to the within-cell variance; say, MS_beween 50 times larger than MS_within) and no interaction effect. Take a small number of subjects (say, 5 per cell). Now, calculate a permutation p-value for the interaction-effect F-statistic by permuting across all 4 cells. Do this for a large number of simulated data set. My prediction is that, on average, the F-statistic p-value is less than 0.05, which it should be (because there is no interaction effect). I have not run this simulation study myself. Let me know if it does not produce the predicted result. (I cannot guarantee that I'm not missing something when producing this recipe.) Best, Eric > -----Original Message----- > From: Stephen Politzer-Ahles [mailto:politzerahless at gmail.com] > Sent: zondag 26 januari 2014 8:25 > To: fieldtrip at science.ru.nl > Subject: Re: [FieldTrip] interactions > > Hi Josh, > > Have you seen this [admittedly pretty old now] message from the > archives: http://mailman.science.ru.nl/pipermail/fieldtrip/2011- > January/003447.html > ? My understanding was that it is ok to test interactions in within- > subjects designs, and that you could do it by faking a dataset that > represents the interaction (step 3 in that message) and then doing a > dependent samples t-test. I had never heard before that interactions > can't be tested in a within-subjects design, but also it's been a long > time since I've looked at this issue--I'd definitely be interested to > hear if this is no longer the recommended way to test interactions. I > have seen messages saying that it doesn't work for between-subjects > designs (e.g. > http://mailman.science.ru.nl/pipermail/fieldtrip/2011- > September/004244.html), > but I'm not sure if that's still current. Hopefully someone on the list > can offer more insight about the second question. > > Best, > Steve > > > > > Message: 2 > > Date: Fri, 24 Jan 2014 10:54:10 -0500 > > From: Joshua Hartshorne > > To: fieldtrip at science.ru.nl > > Subject: [FieldTrip] interactions > > Message-ID: > > > > > > Content-Type: text/plain; charset="iso-8859-1" > > > > Hi List! > > > > I have seen around a dozen comments in the archives that interactions > > can't be tested by permutation for within-subject designs. I haven't > > been able to find a thread that explains why not. It seems like in a > > 2x2 design, you could still pick one of the conditions and permute > the > > labels. I'm sure there's a proof somewhere for why this doesn't work, > > and it would be great to see it. > > > > Similarly, for the mixed design, why permute the between-subject > labels? > > Why not permute the within-subject labels instead? Actually, why not > > do both? I follow the reasoning why permuting both is overkill, but > > not why it's wrong. > > > > If someone could explain, it would be much appreciated. Knowing what > > to do is good, but it would be even better to understand why. > > > > Thanks, > > Josh > > -------------- next part -------------- An HTML attachment was > > scrubbed... > > URL: > > > b885cb4a/attachment-0001.html> > > From ayobimpe2004 at hotmail.com Sun Jan 26 10:43:58 2014 From: ayobimpe2004 at hotmail.com (Azeez Adebimpe) Date: Sun, 26 Jan 2014 10:43:58 +0100 Subject: [FieldTrip] Urgent: Error in Source Statistics, Group level In-Reply-To: References: , , , , Message-ID: Hi Chaitanya , I would suggest you try analyitcs instead of montecarlo and use stat= ft_sourcestatitics(cfg, source1a, source2a .................., source1b,source2b.............);a and b are for the conditions. Azeez Adebimpe Date: Sun, 26 Jan 2014 09:46:03 +0100 From: chaitanya.pro at gmail.com To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Urgent: Error in Source Statistics, Group level Hi Eelke, No significant results then in my data. I wonder how my boss takes it :P. Anyway, thanks for your help on a Sunday that too. >From your reply I also understand that the code doesn't have any mistakes :) =============================================== Best RegardsChaitanya Srinivas Lanka Wiss. Mitarbeiter PhD Student Functional and Restorative Neurosurgery Neural Information Processing Neurosurgical University Hospital Graduate Training Center for Neuroscience Eberhard Karls University Eberhard Karls University Otfried-Mueller-Str.45 Österbergstr. 3 D-72076 Tuebingen D-72074 Tuebingen Mobile Phone Number : +49-176-79035731 =============================================== On Sun, Jan 26, 2014 at 9:40 AM, Eelke Spaak wrote: Hi Chaitanya, stat.prob reflects the 'p-values' resulting from your statistical test. So voxels expressing e.g. stat.prob < 0.05 should be considered reflecting a significant difference between conditions. The NaNs correspond to voxels outside the brain. Since stat.mask is all zeros (which by default is just stat.prob < 0.05), this indicates there are no significant differences between your conditions. There is nothing we can help you with in this respect :) Best,Eelke On 26 January 2014 09:06, Chaitanya Srinivas wrote: Hi Eelke, I looked at the stat.stat values if that is what you mean. There are some NaNs , but also some values. Similarly in stat.prob, there are some 1's. The stat.mask is all zeros as you say. Any further suggestions from you? Thank you =============================================== Best RegardsChaitanya Srinivas Lanka Wiss. Mitarbeiter PhD Student Functional and Restorative Neurosurgery Neural Information Processing Neurosurgical University Hospital Graduate Training Center for Neuroscience Eberhard Karls University Eberhard Karls University Otfried-Mueller-Str.45 Österbergstr. 3 D-72076 Tuebingen D-72074 Tuebingen Mobile Phone Number : +49-176-79035731 =============================================== On Sun, Jan 26, 2014 at 8:53 AM, Eelke Spaak wrote: Dear Chaitanya, Perhaps an obvious question: do you find any significant differences in the statistics step (inspect the stat structure)? If not, the mask will consist of all zeroes, hence giving you a 'blank' plot. Best,Eelke On 26 January 2014 08:46, Chaitanya Srinivas wrote: Dear fieldtrip users, I would like to do sourcestatistics on a group level with eeg data. I have a pre and post intervention measurement for each of my 10 subjects . After source reconstruction using an DICS beamformer and volume normalization, I calculated the sourcegrandaverage for the pre and post condition and i have avg.pow for each subject. However, when I use the grandaverage results in ft_sourcestatistics in the configuration shown below and plot the result I just get a blank anatomical mri. It only runs with cfg.parameter="pow" .I tried with cfg.parameter = 'avg.pow' it doesnt run. Do I have to set any additional parameters or am I making some mistake? cfg=[]; cfg.dim = grandAVGsourcePre.dim; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'pow'; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; cfg.alpha = 0.05; cfg.tail = 0; nsubj=length(sourcePre.trial); cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; cfg.ivar = 2; stat = ft_sourcestatistics(cfg, grandAVGsourcePre, grandAVGsourcePost); and next interpolation cfg = []; cfg.voxelcoord = 'no'; cfg.parameter = 'mask'; cfg.interpmethod = 'nearest'; cfg.coordsys = 'mni'; mask = ft_sourceinterpolate(cfg,stat,mri); statplot.mask = mask.mask; and then for plotting cfg = []; cfg.method = 'slice'; cfg.funparameter = 'stat'; cfg.maskparameter = 'mask'; cfg.funcolorlim = [-0.1 0.1]; cfg.opacitylim = [-0.1 0.1]; figure ft_sourceplot(cfg, statplot); =============================================== Best RegardsChaitanya Srinivas Lanka Wiss. Mitarbeiter PhD Student Functional and Restorative Neurosurgery Neural Information Processing Neurosurgical University Hospital Graduate Training Center for Neuroscience Eberhard Karls University Eberhard Karls University Otfried-Mueller-Str.45 Österbergstr. 3 D-72076 Tuebingen D-72074 Tuebingen Mobile Phone Number : +49-176-79035731 =============================================== _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 23195 bytes Desc: not available URL: From tessa.van-leeuwen at brain.mpg.de Mon Jan 27 16:31:23 2014 From: tessa.van-leeuwen at brain.mpg.de (van Leeuwen, Tessa) Date: Mon, 27 Jan 2014 15:31:23 +0000 Subject: [FieldTrip] 'Synaesthesia in Perspective' symposium programme update: registration still open Message-ID: <87CB345598E7E64D82323FFCA3C8126330439AFA@UM-EXCDAG-A01.um.gwdg.de> Dear all, The programme of our symposium ' Synaesthesia in Perspective' has been finalized and the on line version now lists presentation titles: http://www.multisense.org/index.php/symposium-2014. Registration is still possible via the website. Taking place in Hamburg, Germany on February 28th and March 1st, 2014, the 2-day symposium includes presentations from highly renowned speakers on the topics of synaesthesia and multisensory processing. Besides contributions from invited speakers, the symposium includes posters sessions during which participants are invited to present their studies. Registration through the website is free but mandatory. Registration is still open for those who have not yet registered. Please register as soon as possible! Topic outline: Synaesthesia is a fascinating phenomenon in which different senses are mixed. For synaesthetes, specific sensory stimuli automatically trigger additional perceptual experiences. Studying synaesthesia is interesting by itself; the aim of the symposium, however, is to put synaesthesia in perspective by also emphasizing the relationships of synaesthesia with other fields of study, such as multisensory processing, sensory substitution, development of sensory processing, and connectivity in sensory systems. Confirmed speakers: Peter König, Andreas Engel, Brigitte Röder, Christopher Sinke, Jianwei Zhang, Amir Amedi, Anil Seth, Charles Spence, Christoph Kayser, Danko Nikolic, Devin Blair Terhune, Jamie Ward, Julia Simner, Fiona Newell, Micah Murray, Nicolas Rothen, Olympia Colizoli, Petra Stoerig, David Brang, Romke Rouw, Mark Wallace, Tessa M. van Leeuwen, Virginie van Wassenhove, Toemme Noesselt, Uta Noppeney, and Alexandra Kirschner For more information, please visit our website (http://www.multisense.org/index.php/symposium-2014) or send an email to the organizers at symposium2014 at multisense.org. We would be very happy to welcome you in Hamburg! Best regards, The Organizing Committee (Tessa M. van Leeuwen, Sina A. Trautmann-Lengsfeld, Peter König, Jianwei Zhang, Andreas K. Engel) -- Tessa van Leeuwen, PhD postdoctoral researcher Department of Neurophysiology Max Planck Institute for Brain Research Deutschordenstr. 46 60528 Frankfurt am Main Germany tessa.van-leeuwen at brain.mpg.de T: +49 (0)69 96769 240 www.brain.mpg.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From aestnth at hum.au.dk Mon Jan 27 16:36:59 2014 From: aestnth at hum.au.dk (Niels Trusbak Haumann) Date: Mon, 27 Jan 2014 16:36:59 +0100 Subject: [FieldTrip] 'Synaesthesia in Perspective' symposium programme update: registr Message-ID: Jeg er på ferie fra 11. januar til og med 25. januar og svarer derfor muligvis ikke på mail før jeg er tilbage. Venlig hilsen Niels. / I'm on vacation from January 11th to January 25th and possibly won't answer mails before I return. Gretings, Niels. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gopalar.ccf at gmail.com Mon Jan 27 18:45:48 2014 From: gopalar.ccf at gmail.com (Raghavan Gopalakrishnan) Date: Mon, 27 Jan 2014 12:45:48 -0500 Subject: [FieldTrip] bootstrap Message-ID: Dear all, I have a statistical question. In an experiment, I have 2 conditions. We deliberately collected lesser trials in one condition than another. Cond1 has 96 trials and Cond2 has 144 trials, basically in 40:60 ratio rather than 50:50. In order to avoid any sample bias, do I need to bootstrap the Cond1 so it equals Cond2? If so, Is there a way to do it in FT? Any suggestion would be of great help. Thanks, Raghavan -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Tue Jan 28 10:19:52 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Tue, 28 Jan 2014 10:19:52 +0100 (CET) Subject: [FieldTrip] ft_combineplanar on Neuromagdata In-Reply-To: <495873C58A622E45A3ABF4813B9451EC6E41986C@MAIL1-UKD.VMED.UKD> Message-ID: <1917402501.460159.1390900792946.JavaMail.root@bcbl.eu> Dear Hanneke, the reason why ft_combineplanar didn't return 102 channels in my case was that I had excluded faulty channels during ft_preprocessing. After repairing these channels, ft_combineplanar returned 102 instead of 204 channels. Thanks for your help. Fred ----- Original Message ----- From: "Hanneke vanDijk" To: fieldtrip at science.ru.nl Sent: Friday, January 24, 2014 1:11:05 PM Subject: Re: [FieldTrip] ft_combineplanar on Neuromagdata Dear Fred, First of all I think there is a typo, you refer to spectrum1 (in the isequal line), and but you use 'spectrum' as input in ft_combineplanar. My workflow is slightly different, but maybe that makes the difference...., in preprocessing I use (but I suppose you could also try that in freqanalysis) > cfg.channel = {'all', '-MEG***1'}; %with the goal to also only use the planar gradiometer data for further analysis (magnetometers end with a 1). p = label: {204x1 cell} Then after freqanalysis (which I also first do with the 204 channels), I use ft_combineplanar and I get the right result. I hope this somehow helps.. Best, Hanneke __________________________________________ Hanneke van Dijk, PhD http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html Institute for Clinical Neuroscience, Heinrich Heine Universität Düsseldorf, Germany Hanneke.vanDijk at med.uni-duesseldorf.de Tel. +49 (0) 211 81 13074 __________________________________________ -----Ursprüngliche Nachricht----- Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Frédéric Roux Gesendet: Freitag, 24. Januar 2014 10:57 An: FieldTrip discussion list Betreff: [FieldTrip] ft_combineplanar on Neuromagdata Dear fieldtrip users, sorry to bother you with this really trivial question. I am running into an issue using ft_combineplanar on Neuromag data. The code I am using is as follows: cfg = []; cfg.channel = {'MEGGRAD'}; grad_data = ft_selectdata(meg_data); %after this step there are only planar-gradients left cfg = []; cfg.method = 'mtmfft'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.foi = 0:100; cfg.keeptrials = 'no'; spectrum1 = ft_freqanalysis(cfg,grad_data); % returns the FFT power spectrum cfg = []; spectrum2 = ft_combineplanar(cfg,spectrum); % this step should combine horizontal and vertical gradients into % one single gradient aka reduce the number of channels However, spectrum does not change. This can be seen by isequal(spectrum1.powspctrm,spectrum2.powspctrm) == 1 Also the number of channels (n = 204) is not reduced after ft_combineplanar when in fact there should only be n = 102 channels left. Is this related to the fact that ft_combineplanar is designed to take only time-frequency maps as input or am I doing something wrong here? Any advice would be highly appreciated. Fred _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From f.roux at bcbl.eu Tue Jan 28 15:42:57 2014 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Tue, 28 Jan 2014 15:42:57 +0100 (CET) Subject: [FieldTrip] Post-Doctoral Position available in Glasgow Message-ID: <394484066.466637.1390920177229.JavaMail.root@bcbl.eu> On behalf of Peter Uhlhaas: Dear colleagues, I would like to alert you to a post-doctoral position for MEG-research at the Centre for Cognitive Neuroimaging (CCNi) at the University of Glasgow (Grade 6/7: £26,527 - £29,837 / £32,590 - £36,661 per annum). The post-doctoral fellow will contribute to a project, funded by the Medical Research Council (MRC), entitled “Using Magnetoencephalography to Investigate Aberrant Neural Synchrony in Prodromal Schizophrenia”. Specifically, the job requires the analysis and acquisition of MEG-data sets and implementation of novel analytic tools, contributing to the design and programming of MEG experiments, assisting in analysing the results, and participating in the writing up of the results. This post is initially funded for 2 years with a possible extension of 1 year. Approximate starting data: 1st of July 2014 For further information please contact Dr Peter Uhlhaas (peter.uhlhaas at glasgow.ac.uk) Please submit your applications online at: www.gla.ac.uk/jobs Closing date: 23 February 2014 Dr. Peter J. Uhlhaas Reader Institute for Neuroscience and Psychology University of Glasgow 58 Hillhead Street Glasgow G12 8QB Telephone +44 (0)141 330 8730 From hweeling.lee at gmail.com Wed Jan 29 14:57:58 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 29 Jan 2014 14:57:58 +0100 Subject: [FieldTrip] Problem with ICA using data exported via Brainvision analyser Message-ID: Dear all, Whenever I export my EEG data using Brainvision analyser, I get problems with running ICA on Fieldtrip. The data has a different rank, although I specify to compute ICA using all channels. However, when I use the raw EEG data collected from Brainvision recorder, I do not get this problem. Does anyone know why and how to resolve this issue? My purpose of using Brainvision analyser is to downsample the EEG raw data before further analyses. Thanks. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Wed Jan 29 15:31:55 2014 From: mcantor at umich.edu (Max Cantor) Date: Wed, 29 Jan 2014 09:31:55 -0500 Subject: [FieldTrip] Problem with ICA using data exported via Brainvision analyser In-Reply-To: References: Message-ID: Hi Hwee, It may be your reference channel. Try removing your reference channel from ICA and it should resolve the rank issue. Max Cantor Research Assistant Computational Neurolinguistics Lab University of Michigan On Wed, Jan 29, 2014 at 8:57 AM, Hwee Ling Lee wrote: > Dear all, > > Whenever I export my EEG data using Brainvision analyser, I get problems > with running ICA on Fieldtrip. The data has a different rank, although I > specify to compute ICA using all channels. > > However, when I use the raw EEG data collected from Brainvision recorder, > I do not get this problem. > > Does anyone know why and how to resolve this issue? > > My purpose of using Brainvision analyser is to downsample the EEG raw data > before further analyses. > > Thanks. > > Best regards, > Hweeling > > > _______________________________________________ > 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 normanbenbrahim at gmail.com Wed Jan 29 16:21:52 2014 From: normanbenbrahim at gmail.com (Norman Benbrahim) Date: Wed, 29 Jan 2014 10:21:52 -0500 Subject: [FieldTrip] Problems loading in m BrainVision files Message-ID: Hi guys, I'm having trouble loading my files in via ft_preprocessing. I've ensured that the function actually works on my matlab by running it on sample data found here: http://fieldtrip.fcdonders.nl/tutorial/continuous and everything works just fine. I do always get the warning that FT misbehaves with matlab version >= 2013a though, so I'm not sure if that might have an impact on my trial. I'm running 2013b on a Red Hat Linux Server. I've attached the data to this email. -Norman scan1.zip -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at fcdonders.ru.nl Thu Jan 30 10:35:04 2014 From: j.herring at fcdonders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 30 Jan 2014 10:35:04 +0100 (CET) Subject: [FieldTrip] Problems loading in m BrainVision files In-Reply-To: References: Message-ID: <002f01cf1d9e$8e293fe0$aa7bbfa0$@herring@fcdonders.ru.nl> Dear Norman, I've reproduced the problem and have posted it as a bug on bugzilla (http://bugzilla.fcdonders.nl/show_bug.cgi?id=2462). You can follow progress on solving the issue on this website. There seems to be a problem with estimating the number of samples in the dataset. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Norman Benbrahim Sent: woensdag 29 januari 2014 16:22 To: FieldTrip discussion list Subject: [FieldTrip] Problems loading in m BrainVision files Hi guys, I'm having trouble loading my files in via ft_preprocessing. I've ensured that the function actually works on my matlab by running it on sample data found here: http://fieldtrip.fcdonders.nl/tutorial/continuous and everything works just fine. I do always get the warning that FT misbehaves with matlab version >= 2013a though, so I'm not sure if that might have an impact on my trial. I'm running 2013b on a Red Hat Linux Server. I've attached the data to this email. -Norman Image removed by sender. scan1.zip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ~WRD000.jpg Type: image/jpeg Size: 823 bytes Desc: not available URL: From victorias at dsv.su.se Thu Jan 30 11:33:08 2014 From: victorias at dsv.su.se (=?UTF-8?Q?Victoria_Schr=C3=B6der?=) Date: Thu, 30 Jan 2014 11:33:08 +0100 Subject: [FieldTrip] freqanalysis Message-ID: <4cf9dcb0c4ce6d9726b56a7ee78e1653@dsv.su.se> Hello I am currently working on a freqanalysis as a first step to do a connectivityanalysis. I am a bit unsure about the method to use for the freqanalysis. My stimuli are very long: between 29 and 30 sec. In total i have 4 stimuli per condition and 2 seperate conditions. I am looking at the beta range so fairly low frequencies. this is my code: Am i using the right taper and method. Should i smooth the data? and if so, what should such a smoothing parameter depend on? %fourier analysis cfg=[]; cfg.output='fourier'; cfg.method='mtmfft'; cfg.foi=[12:30]; cfg.taper='hanning'; cfg.keeptrials='yes'; cfg.channel={'C15' 'C10' 'B23' 'B3'}; frefourier=ft_freqanalysis(cfg,data_clean); %coherence analysis cfg=[]; cfg.method='coh'; cfg.channelcmb={'B3' 'C15' 'B3' 'C10' 'B23' 'C15' 'B23' 'C10'} coherence=ft_connectivityanalysis(cfg, frefourier); Thank you very much for the suggestions! Best Victoria From hweeling.lee at gmail.com Thu Jan 30 11:58:08 2014 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 30 Jan 2014 11:58:08 +0100 Subject: [FieldTrip] Problem with ICA using data exported via Brainvision analyser In-Reply-To: References: Message-ID: Hi Max, Thanks for your suggestion. However, I checked the data, there was no data from the reference channel, so I doubt this is the problem for the rank issue. Cheers, Hweeling On 29 January 2014 15:31, Max Cantor wrote: > Hi Hwee, > > It may be your reference channel. Try removing your reference channel from > ICA and it should resolve the rank issue. > > Max Cantor > Research Assistant > Computational Neurolinguistics Lab > University of Michigan > > > On Wed, Jan 29, 2014 at 8:57 AM, Hwee Ling Lee wrote: > >> Dear all, >> >> Whenever I export my EEG data using Brainvision analyser, I get problems >> with running ICA on Fieldtrip. The data has a different rank, although I >> specify to compute ICA using all channels. >> >> However, when I use the raw EEG data collected from Brainvision recorder, >> I do not get this problem. >> >> Does anyone know why and how to resolve this issue? >> >> My purpose of using Brainvision analyser is to downsample the EEG raw >> data before further analyses. >> >> Thanks. >> >> Best regards, >> Hweeling >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -- ================================================= Dr. rer. nat. Lee, Hwee Ling Postdoc German Center for Neurodegenerative Diseases (DZNE) Bonn Email 1: hwee-ling.leedzne.de Email 2: hweeling.leegmail.com https://sites.google.com/site/hweelinglee/home Correspondence Address: Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany ================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Thu Jan 30 16:22:47 2014 From: mcantor at umich.edu (Max Cantor) Date: Thu, 30 Jan 2014 10:22:47 -0500 Subject: [FieldTrip] Fwd: Problem with ICA using data exported via Brainvision analyser In-Reply-To: References: Message-ID: I just realized I accidentally forgot to do reply all and the subsequent responses weren't posted on the mailing list, so I'm forwarding it back on for anyone else who was following. Sorry! ---------- Forwarded message ---------- From: Max Cantor Date: Thu, Jan 30, 2014 at 9:24 AM Subject: Re: [FieldTrip] Problem with ICA using data exported via Brainvision analyser To: Hwee Ling Lee I'm not sure I understand what you mean by not being able to find the data that corresponds to the reference channel. For your call to ft_componentanalysis, for cfg.channel, if you set it to {'all', '-refchan'}, where refchan stands for whatever your reference channel is called, that should remove the reference channel from ICA. If you're issue is what I think it is, this tutorial should reiterate what I'm talking about: http://fieldtrip.fcdonders.nl/faq/why_does_my_ica_output_contain_complex_numbers Sorry if I'm misunderstanding the problem you're having, but hopefully this clarifies things. On Thu, Jan 30, 2014 at 8:35 AM, Hwee Ling Lee wrote: > Dear Max, > Thanks for taking your time to explain this. I would like to try your > suggestion, but the problem is that i don't know which channel i should > remove from my data since i can't find the data that corresponds to the > reference channel. > The funny thing for me at least is that this problem does not occur when i > use the raw data that has not been exported by brainvision analyser. I'll > try to look at the archives regarding this. > Thanks again. > Cheers, > Hweeling > On 30 Jan 2014 13:54, "Max Cantor" wrote: > >> Hm, did you try it? I had a similar issue awhile back and that solved it >> for me. Let me see if I can explain this correctly: I think the fact that >> there is no data from the reference channel is exactly the problem. ICA is >> performing a transform on the data, 'rotating' the data from channel space >> to component space, based on rank. If there is no data in any of the >> channels, you're asking ICA to transform the data into more components than >> effectively there are channels; in other words the dimensions in the >> 'rotation' of the data (if you think of the transform like a geometric >> rotation) are off. Hopefully that explanation makes sense, or somebody else >> can explain it more adequately. I think somewhere in the archives there was >> a long thread about ICA where I and a few other people ask about this >> issue, so that may help as well. >> >> >> On Thu, Jan 30, 2014 at 5:58 AM, Hwee Ling Lee wrote: >> >>> Hi Max, >>> >>> Thanks for your suggestion. However, I checked the data, there was no >>> data from the reference channel, so I doubt this is the problem for the >>> rank issue. >>> >>> Cheers, >>> Hweeling >>> >>> >>> >>> On 29 January 2014 15:31, Max Cantor wrote: >>> >>>> Hi Hwee, >>>> >>>> It may be your reference channel. Try removing your reference channel >>>> from ICA and it should resolve the rank issue. >>>> >>>> Max Cantor >>>> Research Assistant >>>> Computational Neurolinguistics Lab >>>> University of Michigan >>>> >>>> >>>> On Wed, Jan 29, 2014 at 8:57 AM, Hwee Ling Lee wrote: >>>> >>>>> Dear all, >>>>> >>>>> Whenever I export my EEG data using Brainvision analyser, I get >>>>> problems with running ICA on Fieldtrip. The data has a different rank, >>>>> although I specify to compute ICA using all channels. >>>>> >>>>> However, when I use the raw EEG data collected from Brainvision >>>>> recorder, I do not get this problem. >>>>> >>>>> Does anyone know why and how to resolve this issue? >>>>> >>>>> My purpose of using Brainvision analyser is to downsample the EEG raw >>>>> data before further analyses. >>>>> >>>>> Thanks. >>>>> >>>>> Best regards, >>>>> Hweeling >>>>> >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>>> >>>> >>>> >>> >>> >>> -- >>> ================================================= >>> Dr. rer. nat. Lee, Hwee Ling >>> Postdoc >>> German Center for Neurodegenerative Diseases (DZNE) Bonn >>> >>> Email 1: hwee-ling.leedzne.de >>> Email 2: hweeling.leegmail.com >>> >>> https://sites.google.com/site/hweelinglee/home >>> >>> Correspondence Address: >>> Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany >>> ================================================= >>> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From normanbenbrahim at gmail.com Thu Jan 30 16:33:42 2014 From: normanbenbrahim at gmail.com (Norman Benbrahim) Date: Thu, 30 Jan 2014 10:33:42 -0500 Subject: [FieldTrip] Problems loading in m BrainVision files In-Reply-To: <52ea1cee.85570e0a.4256.ffffaaa0SMTPIN_ADDED_BROKEN@mx.google.com> References: <52ea1cee.85570e0a.4256.ffffaaa0SMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: Thanks Jim I really appreciate you taking the time to look at my data, I will follow the bugzilla page On Thursday, January 30, 2014, Herring, J.D. (Jim) < j.herring at fcdonders.ru.nl> wrote: > Dear Norman, > > > > I've reproduced the problem and have posted it as a bug on bugzilla ( > http://bugzilla.fcdonders.nl/show_bug.cgi?id=2462). You can follow > progress on solving the issue on this website. > > > > There seems to be a problem with estimating the number of samples in the > dataset. > > > > Best, > > > > Jim > > > > > > > > *From:* fieldtrip-bounces at science.ru.nl[mailto: > fieldtrip-bounces at science.ru.nl] > *On Behalf Of *Norman Benbrahim > *Sent:* woensdag 29 januari 2014 16:22 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] Problems loading in m BrainVision files > > > > Hi guys, > > I'm having trouble loading my files in via ft_preprocessing. I've ensured > that the function actually works on my matlab by running it on sample data > found here: http://fieldtrip.fcdonders.nl/tutorial/continuous > > and everything works just fine. I do always get the warning that FT > misbehaves with matlab version >= 2013a though, so I'm not sure if that > might have an impact on my trial. I'm running 2013b on a Red Hat Linux > Server. I've attached the data to this email. > > > > -Norman > > > > > > *[image: Image removed by sender.] scan1.zip > * > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ~WRD000.jpg Type: image/jpeg Size: 823 bytes Desc: not available URL: From instanton at gmail.com Thu Jan 30 19:38:20 2014 From: instanton at gmail.com (woun zoo) Date: Thu, 30 Jan 2014 10:38:20 -0800 Subject: [FieldTrip] Any insight about Transfer Entropy? Message-ID: How are you? I'd like to get some insight from you for transfer entropy analysis of my ECoG data before I run all possible parameters. I know this message doesn't exactly fit in fieldtrip email list cause question is not exactly about fieldtrip. But there are a few connectivity methods in fieldtrip. So I'd like to get my questions to reach some of experts in this causality analysis field. Besides, I don't know if there is nonlinear time series analysis discussion list out there or not. I'd like to establish some connectivity (functional or effective) between frontal and visual channels in ECoG recording. However, in our data, there is a very strong driven component, namely, steady state visually evoked potentials. SSVEPs in our data appear at several frequencies that are harmonics of the input frequencies and their sum and difference frequencies So our data has a completely deterministic (SSVEPs) dynamics and the rest of background activities. Data has 20 trials in total. Each trial lasts 2.4sec. Sampling rate is 1200hz. Raw data were bandpass filtered from 0.1Hz to 500hz. In order to find an effective connectivity, I chose to use TRENTOOL box that can be incorporated with fieldtrip. I chose Ragwitz method to determine delay time and embedding dimension. This is where I'd like to get some good insight for choosing parameters. I attached a script that I'm using now. I wrote my questions in blue text down below. I really wish to get some good insight from you because I don't know if my input parameters are garbage or not. cfgTEP.toi = [min(data.time{1,1}) max(data.time{1,1})] --> Basically from trial start to trial end. cfgTEP.predicttimemin_u= 10; cfgTEP.predicttimemax_u= 240; --> For these prediction horizon values, I don't know where and how these min and max were used in TEragwitz.m calculation in TEprepare.m. Transfer Entropy calculation method (VW_ds) fixed 1 as a prediction horizon. I can't find where this min or max of predicttime goes inside TEragwitz calculation. VW_ds seems to try to predict one time sample point ahead from the current time sample point. Is this proper to determine embedding dimension and delay time for SSVEP + background activities? cfgTEP.actthrvalue = 100; --> I don't know the reason why this autocorrelation time value needs to be set by hand. I know with this threshold value, you can selectively choose trials. In my data, particular channels' autocorrelation values were 54 (sample points), etc. Max autocorrelation was 134 or something. Is this due to noise? If I have strong oscillatory activities at the driving frequencies, am I not supposed to see autocorrelation values close to oscillatory period? cfgTEP.maxlag = 1000; --> What will be a good lag number? Isn't it better to use whole trial length? cfgTEP.minnrtrials = 7; --> What is a good number for this when there are 20 trials? For main parameters for TEragwitz, cfgTEP.optimizemethod ='ragwitz'; cfgTEP.ragdim = 1:10; --> I just chose all possible embedding dimension from 1 to 10. Should I try go more than 10? But TE analysis always says, embedding dimension maybe 2, which sounds about right for pure sine waves like my SSVEP. But with 0.1Hz~500hz bandpass, I have tons of non-stimulus locked high background activities. I'd like to know if 2 is really good estimation or not for my data. Also when I chose Cao's method, it says, 5 or 6. cfgTEP.ragtaurange = [0.1 2]; --> For delay time as an initial guess, I chose this range. But Ragwitz always chose the smallest value. If I put this range from [1 2], then it chooses 1. If it was [0.5 3], it chose 0.5. Whatever minimum value I put will be chosen as its delay time, which makes me wonder about what kind of values I should put here. cfgTEP.ragtausteps = 15; % steps for ragwitz tau steps 15 cfgTEP.repPred = 600; --> I just chose this. Depending on what I put here, final significance of TE changes too. cfgTEP.flagNei = 'Mass' ; %neigbour analyse type cfgTEP.sizeNei = 4; --> It follows the results of Kraskov (2004) paper. I think this range is between [embedding dimension 2*embedding dimension]. But should I vary this too? For example, should I try 15, 30, 50 etc? For Surrogate analysis in the below, I don't know which options are common to use for non-parametric statistical analysis. cfgTESS.optdimusage = 'indivdim'; cfgTGAA.select_opt_u = 'product_evidence'; % 'max_TEdiff'; cfgTGAA.select_opt_u_pos = 'shortest'; I'm sorry if these questions are not exactly relevant to fieldtrip community. If there is nonlinear time series analysis community, I'd like to post this message over there. But I really appreciate if you could give me some good insight about playing with parameters for ECoG steady-state visual evoked potential data. Thank you very much. Have a nice day. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tomh at kurage.nimh.nih.gov Thu Jan 30 20:09:09 2014 From: tomh at kurage.nimh.nih.gov (Tom Holroyd (NIH/NIMH) [E]) Date: Thu, 30 Jan 2014 14:09:09 -0500 Subject: [FieldTrip] Any insight about Transfer Entropy? In-Reply-To: References: Message-ID: <52EAA355.8040405@kurage.nimh.nih.gov> I saw your earlier message. I think I would be worried that 48 seconds total is not very much data, and only 20 trials is also a small number. I'm not familiar enough with the Ragwitz method so I don't know if it can accurately estimate the embedding dimension from so little data. But it might be a problem. woun zoo wrote: > How are you? > > I'd like to get some insight from you for transfer entropy analysis of my > ECoG data before I run all possible parameters. I know this message doesn't > exactly fit in fieldtrip email list cause question is not exactly about > fieldtrip. But there are a few connectivity methods in fieldtrip. So I'd > like to get my questions to reach some of experts in this causality > analysis field. Besides, I don't know if there is nonlinear time series > analysis discussion list out there or not. > > I'd like to establish some connectivity (functional or effective) between > frontal and visual channels in ECoG recording. However, in our data, there > is a very strong driven component, namely, steady state visually evoked > potentials. SSVEPs in our data appear at several frequencies that are > harmonics of the input frequencies and their sum and difference frequencies > So our data has a completely deterministic (SSVEPs) dynamics and the rest > of background activities. > > Data has 20 trials in total. Each trial lasts 2.4sec. Sampling rate is > 1200hz. Raw data were bandpass filtered from 0.1Hz to 500hz. > > In order to find an effective connectivity, I chose to use TRENTOOL box > that can be incorporated with fieldtrip. I chose Ragwitz method to > determine delay time and embedding dimension. This is where I'd like to get > some good insight for choosing parameters. I attached a script that I'm > using now. I wrote my questions in blue text down below. I really wish to > get some good insight from you because I don't know if my input parameters > are garbage or not. > > cfgTEP.toi = [min(data.time{1,1}) max(data.time{1,1})] --> Basically from > trial start to trial end. > > cfgTEP.predicttimemin_u= 10; > cfgTEP.predicttimemax_u= 240; --> For these prediction horizon values, I > don't know where and how these min and max were used in TEragwitz.m > calculation in TEprepare.m. Transfer Entropy calculation method (VW_ds) > fixed 1 as a prediction horizon. I can't find where this min or max of > predicttime goes inside TEragwitz calculation. VW_ds seems to try to > predict one time sample point ahead from the current time sample point. Is > this proper to determine embedding dimension and delay time for SSVEP + > background activities? > > cfgTEP.actthrvalue = 100; --> I don't know the reason why this > autocorrelation time value needs to be set by hand. I know with this > threshold value, you can selectively choose trials. In my data, particular > channels' autocorrelation values were 54 (sample points), etc. Max > autocorrelation was 134 or something. Is this due to noise? If I have > strong oscillatory activities at the driving frequencies, am I not supposed > to see autocorrelation values close to oscillatory period? > > cfgTEP.maxlag = 1000; --> What will be a good lag number? Isn't it > better to use whole trial length? > > cfgTEP.minnrtrials = 7; --> What is a good number for this when there are > 20 trials? > > For main parameters for TEragwitz, > > cfgTEP.optimizemethod ='ragwitz'; > cfgTEP.ragdim = 1:10; --> I just chose all possible embedding > dimension from 1 to 10. Should I try go more than 10? But TE analysis > always says, embedding dimension maybe 2, which sounds about right for pure > sine waves like my SSVEP. But with 0.1Hz~500hz bandpass, I have tons of > non-stimulus locked high background activities. I'd like to know if 2 is > really good estimation or not for my data. Also when I chose Cao's method, > it says, 5 or 6. > > cfgTEP.ragtaurange = [0.1 2]; --> For delay time as an initial guess, I > chose this range. But Ragwitz always chose the smallest value. If I put > this range from [1 2], then it chooses 1. If it was [0.5 3], it chose 0.5. > Whatever minimum value I put will be chosen as its delay time, which makes > me wonder about what kind of values I should put here. > > cfgTEP.ragtausteps = 15; % steps for ragwitz tau steps 15 > > cfgTEP.repPred = 600; --> I just chose this. Depending on what I > put here, final significance of TE changes too. > > cfgTEP.flagNei = 'Mass' ; %neigbour analyse type > > cfgTEP.sizeNei = 4; --> It follows the results of Kraskov (2004) paper. I > think this range is between [embedding dimension 2*embedding dimension]. > But should I vary this too? For example, should I try 15, 30, 50 etc? > > > For Surrogate analysis in the below, I don't know which options are common > to use for non-parametric statistical analysis. > > cfgTESS.optdimusage = 'indivdim'; > cfgTGAA.select_opt_u = 'product_evidence'; % 'max_TEdiff'; > cfgTGAA.select_opt_u_pos = 'shortest'; > > I'm sorry if these questions are not exactly relevant to fieldtrip > community. If there is nonlinear time series analysis community, I'd like > to post this message over there. But I really appreciate if you could give > me some good insight about playing with parameters for ECoG steady-state > visual evoked potential data. > > Thank you very much. > Have a nice day. > > > > ------------------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- "There are not more than five musical notes, yet the combinations of these five give rise to more melodies than can ever be heard." -- Sun Tzu From joramvandriel at gmail.com Fri Jan 31 12:44:25 2014 From: joramvandriel at gmail.com (Joram van Driel) Date: Fri, 31 Jan 2014 12:44:25 +0100 Subject: [FieldTrip] missing anatomy in source plot of ft_sourcegrandaverage Message-ID: Hi all, I'm trying to plot the grand average of a source analysis. However no matter what I try, the result of ft_sourcegrandaverage keeps giving me only the functional data, no anatomy. My cfg for ft_sourceplot is: cfg = []; cfg.method = 'ortho'; cfg.interactive = 'no'; cfg.funparameter = 'avg.pow'; cfg.maskparameter = cfg.funparameter; cfg.funcolorlim = [0 0.2]; cfg.opacitylim = [0 0.2]; cfg.opacitymap = 'rampup'; ft_sourceplot(cfg,grandavg{1}) I thus created my own grandaverage, like this (where sourceDiffAll{:,:} is a subject-by-condition cell structure): temp = zeros([length(nsubjects) size(sourceDiffAll{1,1}.avg.pow)]); for s=1:length(nsubjects) temp(s,:,:,:) = sourceDiffAll{s,2}.avg.pow - sourceDiffAll{s,1}.avg.pow; % create condition contrast end customavg = sourceDiffAll{1,1}; % just copy one subject one condition customavg.avg.pow = squeeze(mean(temp,1)); % and replace power with the grand average power condition-contrast Now using ft_sourceplot on customavg works just fine. Any idea of what's going wrong with ft_sourceplot on ft_sourcegrandaverage? Thanks! - Joram -- Joram van Driel, MSc. PhD student @ University of Amsterdam Brain & Cognition @ Department of Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From Patricia.Wollstadt at gmx.de Fri Jan 31 20:05:09 2014 From: Patricia.Wollstadt at gmx.de (Patricia Wollstadt) Date: Fri, 31 Jan 2014 20:05:09 +0100 Subject: [FieldTrip] Any insight about Transfer Entropy? In-Reply-To: References: Message-ID: <52EBF3E5.8080804@gmx.de> Hello, I tried to answer your questions regarding the TRENTOOL parameters below. We will soon provide a user manual for the current TRENTOOL version on the website (www.trentool.de), which should also help with some of the questions raised in your email. cfgTEP.toi = [min(data.time{1,1}) max(data.time{1,1})] --> Basically from trial start to trial end. PW: This is correct, you should use as much data as possible. cfgTEP.predicttimemin_u= 10; cfgTEP.predicttimemax_u= 240; --> I am not sure where and how these min and max were used in TEragwitz calculation in TEprepare.m. VW_ds fixed 1 as a prediction horizon. I'm not sure if it's good to predict just next time sample point for SSVEP + noisy data? PW: TRENTOOL allows you to reconstruct the delays of an interaction (see Wibral, 2013, /Measuring Information Transfer Delays/). Interaction delays are reconstructed by scanning over a range of assumed interaction delays u, specified by the parameters 'predicttimemin_u', 'predicttimemax_u', and 'predicttimestepsize'. TRENTOOL will actually run the TE estimation for each assumed u, i.e. TE will be estimated between all pairs of channels for each prediction time u. The Ragwitz criterion will be used for each estimation to determine the respective embedding parameters. In a second step, TRENTOOL will reconstruct the interaction delay by finding the value for u for which TE becomes maximal. Note, that you also have to provide the step size in 'cfgTEP.predicttimestepsize'. TRENTOOL will build a vector [cfgTEP.predicttimemin_u:cfgTEP.predicttimestepsize:cfgTEP.predicttimemax_u] to estimate TE for each u. You have specified a rather broad range of interaction delays to be scanned here. This will result in a very long running time. Maybe you could reconsider the values for u that you want to scan (i.e. use assumed interaction delays that are biologically plausible)? cfgTEP.actthrvalue = 100; --> I don't know the reason why this autocorrelation time value needs to be set by hand cause I thought embedding delay time gets automatically decided by autocorrelation. Is there a special logic behind setting this by hand? For particular two channels, their ACT values were 54 sample points, etc. Max ACT was 134 or something. Is this due to noise? If I have strong oscillatory activities, am I not supposed to see ACT values close to oscillatory period? PW: This is only a threshold value. If the actual ACT is higher for individual trials, these trials will be excluded from the analysis. The value you put here should be based on the filtering of the data prior to TE analysis. E.g. if you highpass filter your data at 10 Hz and have a sampling rate of 1200Hz, you shouldn't find any autocorrelation above 120 samples. Thus, you may use 120 as a threshold here. cfgTEP.maxlag = 1000; --> 1000 is default. What will be a good lag number to see autocorrelation? Should I use a half of total sample points of data (2880/2 = 1440)? PW: Half the number of sample points is fine. cfgTEP.minnrtrials = 7; --> Does this mean if trial selection rule by ACT value rejects more than 13 trials out of total 20 trials, program won't run? What is a good number for this when I have 20 trials? PW: This is correct, if you end up with less than the number of trials specified here, the analysis will not run. Because of the permutation statistics used later, this value should be set to at least 12. For main parameters for TEragwitz, cfgTEP.optimizemethod ='ragwitz'; cfgTEP.ragdim = 1:10; --> I just chose all possible embedding dimension from 1 to 10. Should I try to put more than 10? But TE analysis always says, embedding dimension maybe 2, which sounds about right for pure sine waves like SSVEPs. But with 0.1Hz~500hz bandpass, I have tons of non-stimulus locked low and high noisy activities. But when I chose Cao's method, it says, 5 or 6. PW: 1:10 is alright here. Ragwitz is the recommended method for parameter estimation. cfgTEP.ragtaurange = [0.1 2]; --> For delay time, I chose this range. But Ragwitz always chose the smallest value. If I put this range from [1 2], then it chooses 1. If it was [0.5 3], it chose 0.5. So I'd really like to know what kind of values I should put here. PW: The values you provided here are ok ('ragtaurange' determines the embedding delay). The values, that are returned by Ragwitz' optimization (tau = 0.1, dim = 2), indicate that there are a lot of fast dynamics in your data. This may indicate a lot of high frequency noise. Consider filtering (forward only!) in the range were you expect neural activity (e.g. 0.5 to 300 Hz or similar). cfgTEP.ragtausteps = 15; % steps for ragwitz tau steps 15 cfgTEP.repPred = 600; --> I just chose this. I could vary this. Depending on what I put here, final significance of TE changes too. PW: This parameter determines how many data points are used for optimization of the embedding parameters by the Ragwitz criterion. Here, TRENTOOL will use the first 600 points in each trial to optimize embedding parameters. This number should be as high as possible (depending on the values you chose for cfgTEP.actthrvalue, fgTEP.ragdim, cfgTEP.ragtaurange). cfgTEP.flagNei = 'Mass' ; %neigbour analyse type cfgTEP.sizeNei = 4; --> Ideally I guess I might have to vary size of neighborhood in phase space PW: 4 is fine here (default). For Surrogate analysis, cfgTESS.optdimusage = 'indivdim'; cfgTGAA.select_opt_u = 'product_evidence'; % 'max_TEdiff'; --> I just chose 'product_evidence' because help file of InteractionDelayReconstruction_analyze.m says 'max_TEdiff' could be problematic in certain case. Which one is normal to use? PW: We recommend the use of 'max_TEdiff' . We will change the help text in a future release. cfgTGAA.select_opt_u_pos = 'shortest'; --> Also for this, I don't know which one is normal to use. PW: 'shortest' is fine here. I hope this helps, best regards Patricia Am 30/01/2014 19:38, schrieb woun zoo: > How are you? > > I'd like to get some insight from you for transfer entropy analysis of > my ECoG data before I run all possible parameters. I know this message > doesn't exactly fit in fieldtrip email list cause question is not > exactly about fieldtrip. But there are a few connectivity methods in > fieldtrip. So I'd like to get my questions to reach some of experts in > this causality analysis field. Besides, I don't know if there is > nonlinear time series analysis discussion list out there or not. > > I'd like to establish some connectivity (functional or effective) > between frontal and visual channels in ECoG recording. However, in > our data, there is a very strong driven component, namely, steady > state visually evoked potentials. SSVEPs in our data appear at > several frequencies that are harmonics of the input frequencies and > their sum and difference frequencies So our data has a completely > deterministic (SSVEPs) dynamics and the rest of background activities. > > Data has 20 trials in total. Each trial lasts 2.4sec. Sampling rate is > 1200hz. Raw data were bandpass filtered from 0.1Hz to 500hz. > > In order to find an effective connectivity, I chose to use TRENTOOL > box that can be incorporated with fieldtrip. I chose Ragwitz method to > determine delay time and embedding dimension. This is where I'd like > to get some good insight for choosing parameters. I attached a script > that I'm using now. I wrote my questions in blue text down below. I > really wish to get some good insight from you because I don't know if > my input parameters are garbage or not. > > cfgTEP.toi = [min(data.time{1,1}) max(data.time{1,1})] --> Basically > from trial start to trial end. > > cfgTEP.predicttimemin_u= 10; > cfgTEP.predicttimemax_u= 240; --> For these prediction horizon values, > I don't know where and how these min and max were used in TEragwitz.m > calculation in TEprepare.m. Transfer Entropy calculation method > (VW_ds) fixed 1 as a prediction horizon. I can't find where this min > or max of predicttime goes inside TEragwitz calculation. VW_ds seems > to try to predict one time sample point ahead from the current time > sample point. Is this proper to determine embedding dimension and > delay time for SSVEP + background activities? > > cfgTEP.actthrvalue = 100; --> I don't know the reason why this > autocorrelation time value needs to be set by hand. I know with this > threshold value, you can selectively choose trials. In my data, > particular channels' autocorrelation values were 54 (sample points), > etc. Max autocorrelation was 134 or something. Is this due to noise? > If I have strong oscillatory activities at the driving frequencies, am > I not supposed to see autocorrelation values close to oscillatory period? > > cfgTEP.maxlag = 1000; --> What will be a good lag number? Isn't > it better to use whole trial length? > > cfgTEP.minnrtrials = 7; --> What is a good number for this when there > are 20 trials? > > For main parameters for TEragwitz, > > cfgTEP.optimizemethod ='ragwitz'; > cfgTEP.ragdim = 1:10; --> I just chose all possible embedding > dimension from 1 to 10. Should I try go more than 10? But TE analysis > always says, embedding dimension maybe 2, which sounds about right for > pure sine waves like my SSVEP. But with 0.1Hz~500hz bandpass, I have > tons of non-stimulus locked high background activities. I'd like to > know if 2 is really good estimation or not for my data. Also when I > chose Cao's method, it says, 5 or 6. > > cfgTEP.ragtaurange = [0.1 2]; --> For delay time as an initial > guess, I chose this range. But Ragwitz always chose the smallest > value. If I put this range from [1 2], then it chooses 1. If it was > [0.5 3], it chose 0.5. Whatever minimum value I put will be chosen as > its delay time, which makes me wonder about what kind of values I > should put here. > > cfgTEP.ragtausteps = 15; % steps for ragwitz tau steps 15 > > cfgTEP.repPred = 600; --> I just chose this. Depending on what > I put here, final significance of TE changes too. > > cfgTEP.flagNei = 'Mass' ; %neigbour analyse type > > cfgTEP.sizeNei = 4; --> It follows the results of Kraskov (2004) > paper. I think this range is between [embedding dimension 2*embedding > dimension]. But should I vary this too? For example, should I try 15, > 30, 50 etc? > > > For Surrogate analysisin the below, I don't know which options are > common to use for non-parametric statistical analysis. > > cfgTESS.optdimusage = 'indivdim'; > cfgTGAA.select_opt_u = 'product_evidence'; % 'max_TEdiff'; > cfgTGAA.select_opt_u_pos = 'shortest'; > > I'm sorry if these questions are not exactly relevant to fieldtrip > community. If there is nonlinear time series analysis community, I'd > like to post this message over there. But I really appreciate if you > could give me some good insight about playing with parameters for ECoG > steady-state visual evoked potential data. > > Thank you very much. > Have a nice day. > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: