From jm.horschig at donders.ru.nl Thu Aug 1 12:37:08 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 01 Aug 2013 12:37:08 +0200 Subject: [FieldTrip] ancova for sources analysis In-Reply-To: <2264a36963356fbe.51f8fb71@upo.es> References: <167095db43e3fd69.51f8d35e@upo.es> <1763660954.2174368.1375257362812.JavaMail.root@sculptor.zimbra.ru.nl> <2264a36963356fbe.51f8fb71@upo.es> Message-ID: <51FA3A54.8020001@donders.ru.nl> Dear Gabriel, if you have a .stat field, you did already run statistics on your data. I wouldn't regress anything out of e.g. t-values. Rather, the idea is to regress out confounding factors before doing statistics, so that you reduce variance across trials and subsequently maximize sensitivity of your statistical test. I could really advise you to read the paper I suggested, the rationale is explained there. Moreover, if you are interested in a covariate like 'age', a simple correlational analysis might make more sense. As stated, the idea of regressconfound is to explain and remove variance across observations, but depending on what you want, a correlation might make more sense. Want to improve your stats? Then go for regressconfound. Find out if there is age explains neural effects? Then go for a simple correlation. Best, Jörn On 7/31/2013 11:56 AM, Gabriel Gonzalez Escamilla wrote: > Thank you all for your responses. > > The last problem I did wrote is now solved, see below. > > I had a field called 'stat' instead of the 'pow', I'm guessing this > field was set before, so, now i'm using this field as if it was the > 'pow' I needed and it's working, Is that OK? > > Now it takes me to the next question, my data has the avg field, and > it says that will update the descriptives but that the 'method' is > missing, is this update necessary? or can I just skeep it? > > > Many thanks in advanced, > Gabriel > > > ----- Mensaje original ----- > De: "Stolk, A." > Fecha: Miércoles, 31 de Julio de 2013, 10:04 am > Asunto: Re: [FieldTrip] ancova for sources analysis > A: FieldTrip discussion list > > >Dear Gabriel, > > > > This page demonstrates how to remove contributions to the data > originating from head movement, but one could as well follow the same > principle for any other type of covariate (e.g. eye movement related > activity). > > > > http://fieldtrip.fcdonders.nl/example/how_to_incorporate_head_movements_in_meg_analysis? > > > > Yours, > > Arjen > > > ------------------------------------------------------------------------ > > *> Van: *"Gabriel Gonzalez Escamilla" > *> Aan: *"fieFieldTrip discussion list" > *> Verzonden: *Woensdag 31 juli 2013 09:05:34 > *> Onderwerp: *[FieldTrip] ancova for sources analysis > > > > Dear fieldtrip experts, > > > > I'm wondering if it is possible to perform an ancova or to remove > the effect of a covariate in a source analysis? > > > > Many thanks in advanced, > > Gabriel > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > --------------------------
PhD. student Gabriel > González-Escamilla
Laboratory of Functional Neuroscience
/>Department of Physiology, Anatomy, and Cell Biology
University > Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
/>- Spain -

Email: ggonesc at upo.es
/>http://www.upo.es/neuroaging/es/
> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From lzyang at ustc.edu.cn Sat Aug 3 10:49:59 2013 From: lzyang at ustc.edu.cn (lzyang) Date: Sat, 03 Aug 2013 16:49:59 +0800 Subject: [FieldTrip] units of data sample read from neuroscan avg file is incorrect Message-ID: <51FCC437.5070409@ustc.edu.cn> Dear fieldtrip list, I used ft_read_data to read in .avg files (neuroscan format) to do some advanced analysis. data=ft_read_data('sham.avg', 'dataformat', 'ns_avg'); I noticed that the unit of data sample read by this function is incorrect. Values of samples ranged from -0.1 to 0.1. I will appreciate if anyone can give me some hints on how to import avg files correctly using fieldtrip. Thanks very much! Best Regards, -Lizhuang From politzerahless at gmail.com Sat Aug 3 13:48:58 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 3 Aug 2013 07:48:58 -0400 Subject: [FieldTrip] fieldtrip Digest, Vol 33, Issue 3 In-Reply-To: References: Message-ID: Hi Lizhuang, I haven't used Fieldtrip to import .avg files so I'm not sure about this, but I wonder if this is related to the same problem in EEGLAB. EEGLAB also scales .avg files like this when importing them, for some reason, so if the Fieldtrip function is based on EEGLAB code these issues may be related. (However, I just looked at read_ns_avg.m, which is what ft_read_data calls, and it doesn't say it's copied from EEGLAB). If you have EEGLAB, you can add the custom function loadavg_bcl.m to your path (it is available at http://sccn.ucsd.edu/pipermail/eeglablist/2011/003986.html, as one of the attachments near the bottom), use that to import the .avg file, and then use the EEGLAB function eeglab2fieldtrip() to get the data into FieldTrip. Also, have you tried reading the data with ft_preprocessing() instead of ft_read_data? ft_read_data is kind of a low-level function; in the past I think I've had better luck just using ft_preprocessing. Best, Steve Stephen Politzer-Ahles New York University, Abu Dhabi Psychology Department > Message: 1 > Date: Sat, 03 Aug 2013 16:49:59 +0800 > From: lzyang > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] units of data sample read from neuroscan avg file > is incorrect > Message-ID: <51FCC437.5070409 at ustc.edu.cn> > Content-Type: text/plain; charset=GB2312 > > Dear fieldtrip list, > I used ft_read_data to read in .avg files (neuroscan format) to do some > advanced analysis. > data=ft_read_data('sham.avg', 'dataformat', 'ns_avg'); > I noticed that the unit of data sample read by this function is incorrect. > Values of samples ranged from -0.1 to 0.1. > I will appreciate if anyone can give me some hints on how to import avg > files correctly using fieldtrip. > > Thanks very much! > > Best Regards, > -Lizhuang -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sat Aug 3 13:50:40 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 3 Aug 2013 07:50:40 -0400 Subject: [FieldTrip] units of data sample read from neuroscan avg file is incorrect Message-ID: Hi Lizhuang, I haven't used Fieldtrip to import .avg files so I'm not sure about this, but I wonder if this is related to the same problem in EEGLAB. EEGLAB also scales .avg files like this when importing them, for some reason, so if the Fieldtrip function is based on EEGLAB code these issues may be related. (However, I just looked at read_ns_avg.m, which is what ft_read_data calls, and it doesn't say it's copied from EEGLAB). If you have EEGLAB, you can add the custom function loadavg_bcl.m to your path (it is available at http://sccn.ucsd.edu/pipermail/eeglablist/2011/003986.html, as one of the attachments near the bottom), use that to import the .avg file, and then use the EEGLAB function eeglab2fieldtrip() to get the data into FieldTrip. Also, have you tried reading the data with ft_preprocessing() instead of ft_read_data? ft_read_data is kind of a low-level function; in the past I think I've had better luck just using ft_preprocessing. Best, Steve Stephen Politzer-Ahles New York University, Abu Dhabi Psychology Department > Message: 1 > Date: Sat, 03 Aug 2013 16:49:59 +0800 > From: lzyang > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] units of data sample read from neuroscan avg file > is incorrect > Message-ID: <51FCC437.5070409 at ustc.edu.cn> > Content-Type: text/plain; charset=GB2312 > > Dear fieldtrip list, > I used ft_read_data to read in .avg files (neuroscan format) to do some > advanced analysis. > data=ft_read_data('sham.avg', 'dataformat', 'ns_avg'); > I noticed that the unit of data sample read by this function is incorrect. > Values of samples ranged from -0.1 to 0.1. > I will appreciate if anyone can give me some hints on how to import avg > files correctly using fieldtrip. > > Thanks very much! > > Best Regards, > -Lizhuang -------------- next part -------------- An HTML attachment was scrubbed... URL: From Izabela.Mikula at mpi.nl Tue Aug 6 12:10:32 2013 From: Izabela.Mikula at mpi.nl (Izabela Mikula) Date: Tue, 6 Aug 2013 12:10:32 +0200 Subject: [FieldTrip] Error in ft_rejectartifact for the newest fieldtrip version Message-ID: <9532B831-AB8E-4EBC-A984-5A3783E5313D@mpi.nl> Dear all, I was wondering if any of you have ever encountered similar problem and might know if I'm doing something wrong or it is a bug.. I have tried using (my old scripts for preprocessing) ft_rejectartifact(cfg, data) but I get an error: evaluating artifact_jump ??? Error using ==> feval Undefined function or method 'artifact_jump' for input arguments of type 'struct'. Error in ==> ft_rejectartifact at 257 cfg = feval(sprintf('artifact_%s', cfg.artfctdef.type{type}), cfg, data); It is important to note that this error only occurs when using the newest fieldtrip version. For previous versions it works without any problems. I have also tried multiple datasets, but the problem remains. data = fsample: 1200 grad: [1x1 struct] sampleinfo: [180x2 double] trialinfo: [180x1 double] trial: {1x180 cell} time: {1x180 cell} label: {273x1 cell} cfg: [1x1 struct] and cfg.artfctdef = reject: 'complete' jump: [1x1 struct] muscle: [1x1 struct] type: {2x1 cell} minaccepttim: 0.1000 crittoilim: [] feedback: 'no' Thanks in advance! Best, Izabela From jan.schoffelen at donders.ru.nl Tue Aug 6 13:13:09 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 6 Aug 2013 13:13:09 +0200 Subject: [FieldTrip] Error in ft_rejectartifact for the newest fieldtrip version In-Reply-To: <9532B831-AB8E-4EBC-A984-5A3783E5313D@mpi.nl> References: <9532B831-AB8E-4EBC-A984-5A3783E5313D@mpi.nl> Message-ID: Hi Izabela, This is indeed a bug. We reorganized our compat-directory, that is dealing with backward compatibility issues. One of these issues was to support backward compatibility for calling ft-functions without the ft_prefix. E.g. calling freqanalysis should redirect to a call to ft_freqanalysis. With this feature removed, ft_rejectartifact cannot execute artifact_xxx, because it is not redirected anymore to ft_artifact_xxx. I have fixed this. It should be available within 15 minutes on the DCCN Fieldtrip version, and in the download version as of tonight. Thanks for reporting, Jan-Mathijs On Aug 6, 2013, at 12:10 PM, Izabela Mikula wrote: > Dear all, > I was wondering if any of you have ever encountered similar problem and might know if I'm doing something wrong or it is a bug.. > > I have tried using (my old scripts for preprocessing) ft_rejectartifact(cfg, data) but I get an error: > > evaluating artifact_jump > ??? Error using ==> feval > Undefined function or method 'artifact_jump' for input arguments of type 'struct'. > > Error in ==> ft_rejectartifact at 257 > cfg = feval(sprintf('artifact_%s', cfg.artfctdef.type{type}), cfg, data); > > It is important to note that this error only occurs when using the newest fieldtrip version. For previous versions it works without any problems. I have also tried multiple datasets, but the problem remains. > > data = > > fsample: 1200 > grad: [1x1 struct] > sampleinfo: [180x2 double] > trialinfo: [180x1 double] > trial: {1x180 cell} > time: {1x180 cell} > label: {273x1 cell} > cfg: [1x1 struct] > > and > > cfg.artfctdef = > > reject: 'complete' > jump: [1x1 struct] > muscle: [1x1 struct] > type: {2x1 cell} > minaccepttim: 0.1000 > crittoilim: [] > feedback: 'no' > > Thanks in advance! > > Best, > Izabela > > > _______________________________________________ > 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 ben.vanlier at bsse.ethz.ch Tue Aug 6 17:56:55 2013 From: ben.vanlier at bsse.ethz.ch (van Lier Ben) Date: Tue, 6 Aug 2013 15:56:55 +0000 Subject: [FieldTrip] from trials to continuous and an error in selfromraw Message-ID: Hi guys, for testing purposes im trying to use data in trials as one continuous piece of data. when i do freqanalysis with cfg.trials = 'all' and then singleplotTFR, i get to see only 1 trial. it should plot the spectra of all of them right? i do use cfg.continuous = yes i can tell it is processing all the trials in the command window feedback and databrowser is putting them together fine. i guess related, when i do cfg.trials = '1' (or any) and then freqanalysis it gives me the following error: -------------------------- Error using selfromraw (line 13) incorrect specification of requested repetitions Error in ft_selectdata_old (line 547) data = selfromraw(data, 'rpt', selrpt); Error in ft_selectdata (line 45) [varargout{1:nargout}] = ft_selectdata_old(varargin{:}); Error in ft_freqanalysis (line 225) data = ft_selectdata(data, 'rpt', cfg.trials); ---------------------------- i tried with data coming from ft_appendata (2 copies of the same file) and also with ft_definetrial from one continuous file. i am using the version of 5 aug 13 anyone knows whats going wrong? cheers Ben From eelke.spaak at donders.ru.nl Tue Aug 6 19:44:33 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 6 Aug 2013 19:44:33 +0200 Subject: [FieldTrip] from trials to continuous and an error in selfromraw In-Reply-To: References: Message-ID: Hi Ben, The cfg.trials option for ft_freqanalysis refers to which trials should be used in the computation of the output. By default, ft_freqanalysis returns the average over all those trials. If you want to get estimates for each individual trial, you should specify cfg.keeptrials = 'yes'. (See also http://fieldtrip.fcdonders.nl/reference/ft_freqanalysis .) I am not sure if ft_singleplotTFR will give you plots for individual trials, though; I think it will do the averaging anyway. To get individual trial plots, you probably have to call the plotting function several times with cfg.trials = 1, 2, 3, etc. Regarding cfg.trials = '1', it is important to use just a regular scalar quantity, and not a string, so cfg.trials = 1. Best, Eelke On 6 August 2013 17:56, van Lier Ben wrote: > Hi guys, > > for testing purposes im trying to use data in trials as one continuous piece of data. when i do freqanalysis with cfg.trials = 'all' and then singleplotTFR, i get to see only 1 trial. it should plot the spectra of all of them right? i do use cfg.continuous = yes > i can tell it is processing all the trials in the command window feedback and databrowser is putting them together fine. > > i guess related, when i do cfg.trials = '1' (or any) and then freqanalysis it gives me the following error: > > -------------------------- > Error using selfromraw (line 13) > incorrect specification of requested repetitions > > Error in ft_selectdata_old (line 547) > data = selfromraw(data, 'rpt', selrpt); > > Error in ft_selectdata (line 45) > [varargout{1:nargout}] = ft_selectdata_old(varargin{:}); > > Error in ft_freqanalysis (line 225) > data = ft_selectdata(data, 'rpt', cfg.trials); > ---------------------------- > > i tried with data coming from ft_appendata (2 copies of the same file) and also with ft_definetrial from one continuous file. > > i am using the version of 5 aug 13 > > anyone knows whats going wrong? > > cheers > Ben > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From haristz at gmail.com Tue Aug 6 20:24:55 2013 From: haristz at gmail.com (Charidimos Tzagarakis) Date: Tue, 6 Aug 2013 13:24:55 -0500 Subject: [FieldTrip] question about virtual electrode MNI coordinates Message-ID: Hi there, I have a question regarding virtual electrodes: How can I double check that the MNI coordinates that I enter are correctly interpreted? More specifically: I have followed the the extended beamforming tutorial in the "Appendix" and have been able to transpose it to my data (I have 4D/BTi MEG files and Dicom mri volumes).The part I am not certain about is the call to the LCMV beamformer. Here it is in my case ( I just want to get the voxel were the power is max in the previous analysis): cfg = []; cfg.method = 'lcmv'; cfg.vol = volfcm; cfg.grid.pos = source_diff.pos(maxpowindx, :); cfg.grid.inside = 1:size(cfg.grid.pos, 1); cfg.grid.outside = []; cfg.grad=senscm source_idx = ft_sourceanalysis(cfg, tlock); My headmodel does not include MEG channel information so I need to also define the cfg.grad parameter. What I don't understand is how cfg.grid.pos (which is in MNI coordinates as per the previous part of the tutorial) can be correctly applied to the coordinates of the headmodel and the channels since these 2 are not in MNI coordinates (in my case they are in 4d/Bti coordinates and rescaled to cm).In the previous part of the tutorial this is (if I understand correctly) accomplished because the leadfield used when calling ft_sourceanalysis was created using and MNI-warped template. I don't see where the equivalent part is when estimating the virtual electrode though. Any advice you may have would be much appreciated. Best, Haris Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych University of Minnesota Dept of Neuroscience and Brain Sciences Center -------------- next part -------------- An HTML attachment was scrubbed... URL: From franziska.bilger at uni-ulm.de Wed Aug 7 11:23:50 2013 From: franziska.bilger at uni-ulm.de (franziska.bilger at uni-ulm.de) Date: Wed, 07 Aug 2013 11:23:50 +0200 Subject: [FieldTrip] topoplotER - how to plot a selection of channels ? Message-ID: <20130807112350.i24h5npq80sgscws@imap.uni-ulm.de> Dear subscribers, I´m using fieldtrip to analyze the data for my bachelor thesis (topic: motor imagery in patientens in vegetative state) and I would be happy to get some help concerning the function ft_topoplotER. Originally, my data derives from a 256-channel system, but I only like to plot a selection of 60 channels above the motor cortex. This is my Region of Interest. When I´m now plotting the data from these 60 channels with ft_topoplotER I receive a figure, which shows the plotted activation over the whole cortex. My Question: Is there a possibility to plot only the activation in my Region of Interest/over the selected 60 channels above the motor cortex? This would result in a figure where there´s only activation shown over the motor cortex and the rest of the plot is blank/white. Thank you very much! Kind regards, Franziska From jm.horschig at donders.ru.nl Wed Aug 7 11:41:26 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 07 Aug 2013 11:41:26 +0200 Subject: [FieldTrip] topoplotER - how to plot a selection of channels ? In-Reply-To: <20130807112350.i24h5npq80sgscws@imap.uni-ulm.de> References: <20130807112350.i24h5npq80sgscws@imap.uni-ulm.de> Message-ID: <52021646.4050203@donders.ru.nl> Hi Franziska, check out the help of ft_topoplotER and what options there are for cfg.interpolation, one of these does what you want (afair 'cubic'). An alternative would be to set datapoints of all irrelevant channels to nan and then use cfg.interpolatenan = 'no', but the former suggestion is cleaner/better/easier than the latter. Good luck with writing your thesis! Best, Jörm On 8/7/2013 11:23 AM, franziska.bilger at uni-ulm.de wrote: > Dear subscribers, > > I´m using fieldtrip to analyze the data for my bachelor thesis (topic: > motor imagery in patientens in vegetative state) and I would be happy > to get some help concerning the function ft_topoplotER. > > Originally, my data derives from a 256-channel system, but I only like > to plot a selection of 60 channels above the motor cortex. > This is my Region of Interest. > When I´m now plotting the data from these 60 channels with > ft_topoplotER I receive a figure, which shows the plotted activation > over the whole cortex. > > My Question: Is there a possibility to plot only the activation in my > Region of Interest/over the selected 60 channels above the motor cortex? > > This would result in a figure where there´s only activation shown over > the motor cortex and the rest of the plot is blank/white. > > Thank you very much! > > Kind regards, > Franziska > > > > _______________________________________________ > 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 ben.vanlier at bsse.ethz.ch Wed Aug 7 13:00:31 2013 From: ben.vanlier at bsse.ethz.ch (van Lier Ben) Date: Wed, 7 Aug 2013 11:00:31 +0000 Subject: [FieldTrip] from trials to continuous and an error in selfromraw In-Reply-To: References: Message-ID: Hi Eelke, thanks. its the little things you miss so cfg.trials = 1 works ofcourse :) for plotting all the trials in a continuous spectrum i just merge them into 1 big trial first cfg = []; cfg.trl = [1 max(max(data.sampleinfo)) 0]; data = ft_redefinetrial(cfg, data); perfect for my purposes, im trying to reanalyze old recordings chopped into several files but ft_append puts them in separate trials. liking fieldtrip alot so far, very flexible :) cheers Ben From jm.horschig at donders.ru.nl Wed Aug 7 14:52:32 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 07 Aug 2013 14:52:32 +0200 Subject: [FieldTrip] question about virtual electrode MNI coordinates In-Reply-To: References: Message-ID: <52024310.1020109@donders.ru.nl> Dear Charidimos, thanks very much for pointing to this, it is indeed an error in the appendix of the tutorial. cfg.grid.pos should be based on the subject-specific MRI or sourcemodel. So, correctly it should say that you need to load sourcemodel.mat (i.e. subject specific grid) and then use sourcemodel.pos(maxpowindx, :) The rationale in principle is that the warped grid has the same size and is indexed the same as the original grid; that is why you can use the index variable obtained from the MNI-warped source reconstructed data. The virtual channel reconstruction should however still be done in whatever coordinate system the subject's anatomical data is in. I will update the appendix accordingly. Best, Jörn On 8/6/2013 8:24 PM, Charidimos Tzagarakis wrote: > Hi there, > I have a question regarding virtual electrodes: How can I double check > that the MNI coordinates that I enter are correctly interpreted? > More specifically: > I have followed the the extended beamforming tutorial in the > "Appendix" and have been able to transpose it to my data (I have > 4D/BTi MEG files and Dicom mri volumes).The part I am not certain > about is the call to the LCMV beamformer. > Here it is in my case ( I just want to get the voxel were the power is > max in the previous analysis): > cfg = []; > cfg.method = 'lcmv'; > cfg.vol = volfcm; > cfg.grid.pos = source_diff.pos(maxpowindx, :); > cfg.grid.inside = 1:size(cfg.grid.pos, 1); > cfg.grid.outside = []; > cfg.grad=senscm > source_idx = ft_sourceanalysis(cfg, tlock); > My headmodel does not include MEG channel information so I need to > also define the cfg.grad parameter. What I don't understand is how > cfg.grid.pos (which is in MNI coordinates as per the previous part of > the tutorial) can be correctly applied to the coordinates of the > headmodel and the channels since these 2 are not in MNI coordinates > (in my case they are in 4d/Bti coordinates and rescaled to cm).In the > previous part of the tutorial this is (if I understand correctly) > accomplished because the leadfield used when calling ft_sourceanalysis > was created using and MNI-warped template. I don't see where the > equivalent part is when estimating the virtual electrode though. > Any advice you may have would be much appreciated. > Best, > Haris > > > Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych > University of Minnesota Dept of Neuroscience and Brain Sciences Center > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From annevanhoogmoed at email.arizona.edu Thu Aug 8 05:51:47 2013 From: annevanhoogmoed at email.arizona.edu (van Hoogmoed, Anne H - (annevanhoogmoed)) Date: Thu, 8 Aug 2013 03:51:47 +0000 Subject: [FieldTrip] reading in and segmenting Netstation data Message-ID: Dear all, I'm using Fieldtrip to analyze my Netstation data. The problem is that the segmented data (incl triggers) are shifted in Fieldtrip as compared to the Netstation analysis. I've checked several things: - The events are the same in Netstation and Fieldtrip - The raw data look the same in both programs - Fieldtrip produces the right trl based on the triggers. The script I'm using is this: cfg = []; cfg.dataset = 'c007_raw'; cfg.continuous = 'yes'; data_eeg = ft_preprocessing(cfg); hdr = ft_read_header('c007_raw'); event = ft_read_event('c007_raw'); cfg = []; cfg.trialfun = 'trialfun_first_enc'; cfg_trials = ft_definetrial(cfg); data_trials = ft_redefinetrial(cfg_trials, data_eeg); The trialfun I'm using is this: function [trl, event] = trialfun_first(cfg) load event; load hdr; value = [event.value]; sample = [event.sample]; % determine the number of samples before and after the trigger pretrig = -100; % = 200 ms posttrig = 400; % = 800 ms % for each trigger trl = []; for j = 1:length(event) if (strcmp(event(1,j).value, '+Lrt') || strcmp(event(1,j).value, '+OOt')) || strcmp(event(1,j).value, '+SOt') trlbegin = event(1,j).sample + pretrig; trlend = event(1,j).sample + posttrig; offset = pretrig; newtrl = [trlbegin trlend offset]; trl = [trl; newtrl]; end j = j + 1; end Does anyone know what I'm doing wrong here? Thank you very much for your help! Kind regards, Anne Anne van Hoogmoed Down Syndrome Research Group Department of Psychology, University of Arizona -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Thu Aug 8 08:12:42 2013 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Thu, 8 Aug 2013 08:12:42 +0200 (CEST) Subject: [FieldTrip] reading in and segmenting Netstation data In-Reply-To: Message-ID: <1178733115.2232641.1375942362693.JavaMail.root@sculptor.zimbra.ru.nl> Hi Anne, What do you mean by "shifted"? Time samples mismatch might be? I don't see what's going wrong with the code you pasted but it'd be nice if you could file a bug (I'll assign to me) with a piece of preprocessed data with fieldtrip and a plot about how data looks like with Netstation to have a bit more info. best, Diego ps : do you have a non-integer eeg sampling rate, like 511.3Hz? ----- Original Message ----- > From: "van Hoogmoed , Anne H - ( annevanhoogmoed )" < annevanhoogmoed > @email. arizona . edu > > To: fieldtrip @science. ru . nl > Sent: Thursday, 8 August, 2013 5:51:47 AM > Subject: [ FieldTrip ] reading in and segmenting Netstation data > Dear all, > I'm using Fieldtrip to analyze my Netstation data. The problem is that > the segmented data (incl triggers) are shifted in Fieldtrip as > compared to the Netstation analysis. > I've checked several things: > - The events are the same in Netstation and Fieldtrip > - The raw data look the same in both programs > - Fieldtrip produces the right trl based on the triggers. > The script I'm using is this: > cfg = []; > cfg . dataset = 'c007_ raw' ; > cfg .continuous = 'yes' ; > data_ eeg = ft_ preprocessing ( cfg ); > hdr = ft_read_header( 'c007_ raw' ); > event = ft_read_event( 'c007_ raw' ); > cfg = []; > cfg . trialfun = 'trialfun _first_ enc' ; > cfg _trials = ft_ definetrial ( cfg ); > data_trials = ft_ redefinetrial ( cfg _trials, data_ eeg ); > The trialfun I'm using is this: > function [ trl , event] = trialfun _first( cfg ) > load event ; > load hdr ; > value = [event.value]; > sample = [event.sample]; > % determine the number of samples before and after the trigger > pretrig = -100; % = 200 ms > posttrig = 400; % = 800 ms > % for each trigger > trl = []; > for j = 1:length(event) > if ( strcmp (event(1,j).value, '+ Lrt' ) || strcmp (event(1,j).value, > '+ OOt' )) || strcmp (event(1,j).value, '+ SOt' ) > trlbegin = event(1,j).sample + pretrig ; > trlend = event(1,j).sample + posttrig ; > offset = pretrig ; > newtrl = [ trlbegin trlend offset]; > trl = [ trl ; newtrl ]; > end > j = j + 1; > end > Does anyone know what I'm doing wrong here? > Thank you very much for your help! > Kind regards, > Anne > Anne van Hoogmoed > Down Syndrome Research Group > Department of Psychology, University of Arizona > _______________________________________________ > fieldtrip mailing list > fieldtrip @ donders . ru . nl > http ://mailman.science. ru . nl /mailman/ listinfo / fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http :// www . ru . nl /people/ donders /lozano-soldevilla-d/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From elisa at csl.psychol.cam.ac.uk Thu Aug 8 12:23:53 2013 From: elisa at csl.psychol.cam.ac.uk (Elisa Carrus) Date: Thu, 08 Aug 2013 11:23:53 +0100 Subject: [FieldTrip] question about virtual electrode MNI coordinates In-Reply-To: <52024310.1020109@donders.ru.nl> References: <52024310.1020109@donders.ru.nl> Message-ID: <520371B9.8060101@csl.psychol.cam.ac.uk> Hi all, From the previous email it seems that I'm doing something wrong then. I have previously used the MNI-aligned subject grid (warped template) for the positions, hence I didn't encounter any problem. However, this seems to be wrong, as Jorn suggested. The question is the following: The sourcediff.avg.pow is produced using the warped MNI template, therefore the grid positions and indexes will be different from the subject-specific MRI. Specifically in my case, the warped template has 11000 x 3 pos, whereas the subject-specific has 2652 x 3. My question is, when I therefore index the maxpos using: [maxval, maxind] = max(sourcediff.avg.pow), my index is 3171, which exceeds the matrix dimensions of the subject-specific MRI (2652). Which step am I missing? Thanks for your help in advance, Elisa On 07/08/2013 13:52, "Jörn M. Horschig" wrote: > Dear Charidimos, > > thanks very much for pointing to this, it is indeed an error in the > appendix of the tutorial. cfg.grid.pos should be based on the > subject-specific MRI or sourcemodel. So, correctly it should say that > you need to load sourcemodel.mat (i.e. subject specific grid) and then > use sourcemodel.pos(maxpowindx, :) > The rationale in principle is that the warped grid has the same size > and is indexed the same as the original grid; that is why you can use > the index variable obtained from the MNI-warped source reconstructed > data. The virtual channel reconstruction should however still be done > in whatever coordinate system the subject's anatomical data is in. I > will update the appendix accordingly. > > Best, > Jörn > > On 8/6/2013 8:24 PM, Charidimos Tzagarakis wrote: >> Hi there, >> I have a question regarding virtual electrodes: How can I double >> check that the MNI coordinates that I enter are correctly interpreted? >> More specifically: >> I have followed the the extended beamforming tutorial in the >> "Appendix" and have been able to transpose it to my data (I have >> 4D/BTi MEG files and Dicom mri volumes).The part I am not certain >> about is the call to the LCMV beamformer. >> Here it is in my case ( I just want to get the voxel were the power >> is max in the previous analysis): >> cfg = []; >> cfg.method = 'lcmv'; >> cfg.vol = volfcm; >> cfg.grid.pos = source_diff.pos(maxpowindx, :); >> cfg.grid.inside = 1:size(cfg.grid.pos, 1); >> cfg.grid.outside = []; >> cfg.grad=senscm >> source_idx = ft_sourceanalysis(cfg, tlock); >> My headmodel does not include MEG channel information so I need to >> also define the cfg.grad parameter. What I don't understand is how >> cfg.grid.pos (which is in MNI coordinates as per the previous part of >> the tutorial) can be correctly applied to the coordinates of the >> headmodel and the channels since these 2 are not in MNI coordinates >> (in my case they are in 4d/Bti coordinates and rescaled to cm).In the >> previous part of the tutorial this is (if I understand correctly) >> accomplished because the leadfield used when calling >> ft_sourceanalysis was created using and MNI-warped template. I don't >> see where the equivalent part is when estimating the virtual >> electrode though. >> Any advice you may have would be much appreciated. >> Best, >> Haris >> >> >> Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych >> University of Minnesota Dept of Neuroscience and Brain Sciences Center >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail:jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web:http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Aug 8 13:45:09 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 08 Aug 2013 13:45:09 +0200 Subject: [FieldTrip] question about virtual electrode MNI coordinates In-Reply-To: <520371B9.8060101@csl.psychol.cam.ac.uk> References: <52024310.1020109@donders.ru.nl> <520371B9.8060101@csl.psychol.cam.ac.uk> Message-ID: <520384C5.80703@donders.ru.nl> Dear Elisa, hard to tell, because you are not telling us exactly what you are doing :) The idea in the extended beamforming tutorial is that you first create an MNI template sourcemodel (or grid). Subsequently, you use exactly this grid and spatially transform it such that it fits to the subject-specific brain, based on the MRI. After following these steps, by definition, the number of grid points in the subject-specific grid and the MNI grid are the same - just the place where the grid points end up did change. (Otherwise, it would also not be possible to replace the .pos field from the source-reconstructed data by the template grid, as being done in the plotting part of the tutorial). The problem in the tutorial was exactly this replacement of the position description (which iself can be a perfectly fine step as e.g. earlier in the tutorial). Since we provide a sourcemodel based on the subject's mri, we need to specify the position based on that mri/sourcemodel and not based on the MNI template. You, obviously, do not have the same number of grid points for the subject-specific sourcemodel as in the template sourcemodel. I cannot guarantee that what you did is correct, but at least I can tell you that what you did is not affects by this - else you would have had the same number of elements for both sourcemodels. I cross my fingers that you're doing the right thing :) Best, Jörn On 8/8/2013 12:23 PM, Elisa Carrus wrote: > Hi all, > > From the previous email it seems that I'm doing something wrong then. > I have previously used the MNI-aligned subject grid (warped template) > for the positions, hence I didn't encounter any problem. However, this > seems to be wrong, as Jorn suggested. The question is the following: > > The sourcediff.avg.pow is produced using the warped MNI template, > therefore the grid positions and indexes will be different from the > subject-specific MRI. Specifically in my case, the warped template has > 11000 x 3 pos, whereas the subject-specific has 2652 x 3. > My question is, when I therefore index the maxpos using: > > [maxval, maxind] = max(sourcediff.avg.pow), my index is 3171, which > exceeds the matrix dimensions of the subject-specific MRI (2652). > > Which step am I missing? > > Thanks for your help in advance, > Elisa > > > > > > > On 07/08/2013 13:52, "Jörn M. Horschig" wrote: >> Dear Charidimos, >> >> thanks very much for pointing to this, it is indeed an error in the >> appendix of the tutorial. cfg.grid.pos should be based on the >> subject-specific MRI or sourcemodel. So, correctly it should say that >> you need to load sourcemodel.mat (i.e. subject specific grid) and >> then use sourcemodel.pos(maxpowindx, :) >> The rationale in principle is that the warped grid has the same size >> and is indexed the same as the original grid; that is why you can use >> the index variable obtained from the MNI-warped source reconstructed >> data. The virtual channel reconstruction should however still be done >> in whatever coordinate system the subject's anatomical data is in. I >> will update the appendix accordingly. >> >> Best, >> Jörn >> >> On 8/6/2013 8:24 PM, Charidimos Tzagarakis wrote: >>> Hi there, >>> I have a question regarding virtual electrodes: How can I double >>> check that the MNI coordinates that I enter are correctly interpreted? >>> More specifically: >>> I have followed the the extended beamforming tutorial in the >>> "Appendix" and have been able to transpose it to my data (I have >>> 4D/BTi MEG files and Dicom mri volumes).The part I am not certain >>> about is the call to the LCMV beamformer. >>> Here it is in my case ( I just want to get the voxel were the power >>> is max in the previous analysis): >>> cfg = []; >>> cfg.method = 'lcmv'; >>> cfg.vol = volfcm; >>> cfg.grid.pos = source_diff.pos(maxpowindx, :); >>> cfg.grid.inside = 1:size(cfg.grid.pos, 1); >>> cfg.grid.outside = []; >>> cfg.grad=senscm >>> source_idx = ft_sourceanalysis(cfg, tlock); >>> My headmodel does not include MEG channel information so I need to >>> also define the cfg.grad parameter. What I don't understand is how >>> cfg.grid.pos (which is in MNI coordinates as per the previous part >>> of the tutorial) can be correctly applied to the coordinates of the >>> headmodel and the channels since these 2 are not in MNI coordinates >>> (in my case they are in 4d/Bti coordinates and rescaled to cm).In >>> the previous part of the tutorial this is (if I understand >>> correctly) accomplished because the leadfield used when calling >>> ft_sourceanalysis was created using and MNI-warped template. I don't >>> see where the equivalent part is when estimating the virtual >>> electrode though. >>> Any advice you may have would be much appreciated. >>> Best, >>> Haris >>> >>> >>> Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych >>> University of Minnesota Dept of Neuroscience and Brain Sciences Center >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail:jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web:http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From K.Kalogianni at tudelft.nl Fri Aug 9 09:59:18 2013 From: K.Kalogianni at tudelft.nl (Konstantina Kalogianni) Date: Fri, 9 Aug 2013 07:59:18 +0000 Subject: [FieldTrip] ft_sourcegrandaverage & grid computation Message-ID: <4DF682D3A10EAC46B462A46E16F0B049128EE308@SRV364.tudelft.net> Dear fieldtripers, I have experienced a problem with ft_sourcegrandaverage and the calculation of my grid and I want to ask for help. The error I get is the following :different grid locations in source reconstructions. I will describe briefly the processing to give you a better idea about my error. For every subject I have 6 conditions and I want to average all subjects per condition. After preprocessing I calculate the covariance matrix and then I use the MUSIC algorithm for my sources. For the grid calculation I use a default MRI a default VOL and a default electrodes' positions. However for every subject the grid is not identical since cfg.channel in ft_prepare_leadfield is dependent on the channels I've discarded as noisy during the preprocessing. By the way for the grid calculation I had to change the order of cfg.elec because it didn't agree with the order of cfg,channel in my data. So apparently I end up with a different grid for every subject but still I want to average all of them per condition. Do I have to use another function to average my sources in this case? Because the grid would never be identical among subjects. I hope somebody out there experienced that before and can probably help me. Thank you. Konstantina [Nadia] Kalogianni PhD candidate, TU Delft -------------- next part -------------- An HTML attachment was scrubbed... URL: From elisa at csl.psychol.cam.ac.uk Fri Aug 9 11:25:15 2013 From: elisa at csl.psychol.cam.ac.uk (Elisa Carrus) Date: Fri, 09 Aug 2013 10:25:15 +0100 Subject: [FieldTrip] question about virtual electrode MNI coordinates In-Reply-To: <520384C5.80703@donders.ru.nl> References: <52024310.1020109@donders.ru.nl> <520371B9.8060101@csl.psychol.cam.ac.uk> <520384C5.80703@donders.ru.nl> Message-ID: <5204B57B.6040004@csl.psychol.cam.ac.uk> Dear Jorn, ah, I apologise for not writing a complete email! The good news is that I've done things correctly so far, as I do have the same number of grid points in both the subject-specific and template, as expected :) I gave you the wrong indices because I thought that in your previous email you referred to the MRI rather than the sourcemodel. My bad. Sorry for the misunderstanding and thanks a lot for explaining this again! Best, Elisa On 08/08/2013 12:45, "Jörn M. Horschig" wrote: > Dear Elisa, > > hard to tell, because you are not telling us exactly what you are > doing :) > The idea in the extended beamforming tutorial is that you first create > an MNI template sourcemodel (or grid). Subsequently, you use exactly > this grid and spatially transform it such that it fits to the > subject-specific brain, based on the MRI. After following these steps, > by definition, the number of grid points in the subject-specific grid > and the MNI grid are the same - just the place where the grid points > end up did change. (Otherwise, it would also not be possible to > replace the .pos field from the source-reconstructed data by the > template grid, as being done in the plotting part of the tutorial). > The problem in the tutorial was exactly this replacement of the > position description (which iself can be a perfectly fine step as e.g. > earlier in the tutorial). Since we provide a sourcemodel based on the > subject's mri, we need to specify the position based on that > mri/sourcemodel and not based on the MNI template. > > You, obviously, do not have the same number of grid points for the > subject-specific sourcemodel as in the template sourcemodel. I cannot > guarantee that what you did is correct, but at least I can tell you > that what you did is not affects by this - else you would have had the > same number of elements for both sourcemodels. I cross my fingers that > you're doing the right thing :) > > Best, > Jörn > > On 8/8/2013 12:23 PM, Elisa Carrus wrote: >> Hi all, >> >> From the previous email it seems that I'm doing something wrong then. >> I have previously used the MNI-aligned subject grid (warped template) >> for the positions, hence I didn't encounter any problem. However, >> this seems to be wrong, as Jorn suggested. The question is the following: >> >> The sourcediff.avg.pow is produced using the warped MNI template, >> therefore the grid positions and indexes will be different from the >> subject-specific MRI. Specifically in my case, the warped template >> has 11000 x 3 pos, whereas the subject-specific has 2652 x 3. >> My question is, when I therefore index the maxpos using: >> >> [maxval, maxind] = max(sourcediff.avg.pow), my index is 3171, which >> exceeds the matrix dimensions of the subject-specific MRI (2652). >> >> Which step am I missing? >> >> Thanks for your help in advance, >> Elisa >> >> >> >> >> >> >> On 07/08/2013 13:52, "Jörn M. Horschig" wrote: >>> Dear Charidimos, >>> >>> thanks very much for pointing to this, it is indeed an error in the >>> appendix of the tutorial. cfg.grid.pos should be based on the >>> subject-specific MRI or sourcemodel. So, correctly it should say >>> that you need to load sourcemodel.mat (i.e. subject specific grid) >>> and then use sourcemodel.pos(maxpowindx, :) >>> The rationale in principle is that the warped grid has the same size >>> and is indexed the same as the original grid; that is why you can >>> use the index variable obtained from the MNI-warped source >>> reconstructed data. The virtual channel reconstruction should >>> however still be done in whatever coordinate system the subject's >>> anatomical data is in. I will update the appendix accordingly. >>> >>> Best, >>> Jörn >>> >>> On 8/6/2013 8:24 PM, Charidimos Tzagarakis wrote: >>>> Hi there, >>>> I have a question regarding virtual electrodes: How can I double >>>> check that the MNI coordinates that I enter are correctly interpreted? >>>> More specifically: >>>> I have followed the the extended beamforming tutorial in the >>>> "Appendix" and have been able to transpose it to my data (I have >>>> 4D/BTi MEG files and Dicom mri volumes).The part I am not certain >>>> about is the call to the LCMV beamformer. >>>> Here it is in my case ( I just want to get the voxel were the power >>>> is max in the previous analysis): >>>> cfg = []; >>>> cfg.method = 'lcmv'; >>>> cfg.vol = volfcm; >>>> cfg.grid.pos = source_diff.pos(maxpowindx, :); >>>> cfg.grid.inside = 1:size(cfg.grid.pos, 1); >>>> cfg.grid.outside = []; >>>> cfg.grad=senscm >>>> source_idx = ft_sourceanalysis(cfg, tlock); >>>> My headmodel does not include MEG channel information so I need to >>>> also define the cfg.grad parameter. What I don't understand is how >>>> cfg.grid.pos (which is in MNI coordinates as per the previous part >>>> of the tutorial) can be correctly applied to the coordinates of the >>>> headmodel and the channels since these 2 are not in MNI coordinates >>>> (in my case they are in 4d/Bti coordinates and rescaled to cm).In >>>> the previous part of the tutorial this is (if I understand >>>> correctly) accomplished because the leadfield used when calling >>>> ft_sourceanalysis was created using and MNI-warped template. I >>>> don't see where the equivalent part is when estimating the virtual >>>> electrode though. >>>> Any advice you may have would be much appreciated. >>>> Best, >>>> Haris >>>> >>>> >>>> Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych >>>> University of Minnesota Dept of Neuroscience and Brain Sciences Center >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> -- >>> Jörn M. Horschig >>> PhD Student >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> Neuronal Oscillations Group >>> FieldTrip Development Team >>> >>> P.O. Box 9101 >>> NL-6500 HB Nijmegen >>> The Netherlands >>> >>> Contact: >>> E-Mail:jm.horschig at donders.ru.nl >>> Tel: +31-(0)24-36-68493 >>> Web:http://www.ru.nl/donders >>> >>> Visiting address: >>> Trigon, room 2.30 >>> Kapittelweg 29 >>> NL-6525 EN Nijmegen >>> The Netherlands >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail:jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web:http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > 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 g.dimitriadis at donders.ru.nl Fri Aug 9 17:22:50 2013 From: g.dimitriadis at donders.ru.nl (Dimitriadis, G. (George)) Date: Fri, 9 Aug 2013 17:22:50 +0200 (CEST) Subject: [FieldTrip] Error from postamble Message-ID: <1463263304.1956192.1376061770792.JavaMail.root@monoceros.zimbra.ru.nl> Hello guys, I seem to be getting an error relating to the generation of warnings withing the postamble. I am not doing anything that I haven't been doing for the past year. I had problems with the preamble (due to large file sizes) before and I am doing the cfg.stackcallinfo = 'no' trick. But now I am getting the following series of errors: --------------------------------------------------- Warning: '@(hObject,eventdata)mainRatAnalysisGUI('pushbutton_run_analysis_Callback',hObject,eventdata,guidata(hObject))' exceeds MATLAB's maximum name length of 63 characters and has been truncated to '@(hObject,eventdata)mainRatAnalysisGUI('pushbutton_run_analysis'. > In utilities/private/warning_once>fieldnameFromStack at 196 In utilities/private/warning_once at 123 In utilities/private/ft_postamble_history at 55 In ft_postamble at 55 In ft_preprocessing at 611 In gd_eri_preprocratdata at 71 In gd_eri_getratdatasignals at 39 In mainRatAnalysisGUI>pushbutton_run_analysis_Callback at 120 In gui_mainfcn at 96 In mainRatAnalysisGUI at 42 In @(hObject,eventdata)mainRatAnalysisGUI('pushbutton_run_analysis_Callback',hObject,eventdata,guidata(hObject)) Invalid field name: '@(hObject,eventdata)mainRatAnalysisGUI('pushbutton_run_analysis'. Error in warning_once>fieldnameFromStack (line 196) ft_previous_warnings.(stack(end).name) = []; % iteratively build up structure fields Error in warning_once (line 123) [tmpfname ft_default.warning.identifier line] = fieldnameFromStack(ft_default.warning.identifier); Error in ft_postamble_history (line 55) warning_once('-clear'); Error in ft_postamble (line 55) evalin('caller', ['ft_postamble_' cmd]); Error in ft_preprocessing (line 611) ft_postamble history data Error in gd_eri_preprocratdata (line 71) datacell{datindx}=ft_preprocessing(cfg_pp); Error in gd_eri_getratdatasignals (line 39) data=gd_eri_preprocratdata(cfg); Error in mainRatAnalysisGUI>pushbutton_run_analysis_Callback (line 120) data =gd_eri_getratdatasignals(cfg); Error in gui_mainfcn (line 96) feval(varargin{:}); Error in mainRatAnalysisGUI (line 42) gui_mainfcn(gui_State, varargin{:}); Error in @(hObject,eventdata)mainRatAnalysisGUI('pushbutton_run_analysis_Callback',hObject,eventdata,guidata(hObject)) Error while evaluating uicontrol Callback ---------------------------------------- I am calling my original function from within a gui. So it seems that in the postamble_history a warning gets generated which then throws an error for some reason I would really like not to have to find out by myself. Thanks for your time George Dimitriadis From r.cox at uva.nl Tue Aug 13 11:29:23 2013 From: r.cox at uva.nl (Roy Cox) Date: Tue, 13 Aug 2013 11:29:23 +0200 Subject: [FieldTrip] ft_freqstatistics Message-ID: Hi, Can anyone tell me how fieldtrip selects freq bins when calling ft_freqstatistics with cfg.frequency? That is, if I'm interested in two freq bands from, say, 10 to 20, and from 20 to 30 Hz, and I don't want a freq bin to be used twice, do I use cfg.frequency=[10 20] and cfg.frequency=[20 30]? Or would the freq bin closest to 20 be used twice? I guess I'm asking how precisely the find function (with arguments 'first', 'last') is applied. Best, 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 hweeling.lee at gmail.com Wed Aug 14 16:51:23 2013 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 14 Aug 2013 16:51:23 +0200 Subject: [FieldTrip] newbie Message-ID: Hi to all! I'm new to fieldtrip! I have a dataset that has been corrected for scanner artifacts and BC artifacts using Brainvision Analyser. I would like to export the corrected data as a .eeg file so that I can load the data onto Matlab and use fieldtrip to perform further analyses. However, I kept getting error messages from Matlab that the sub-file format is unsupported. I've been searching online the best way to export the corrected data from Brainvision Analyser, however, I could not find any solution at all. Would anyone please kindly instruct me the settings that I should have when I export the corrected data? Thanks! Best wishes, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From elisa at csl.psychol.cam.ac.uk Wed Aug 14 17:32:42 2013 From: elisa at csl.psychol.cam.ac.uk (Elisa Carrus) Date: Wed, 14 Aug 2013 16:32:42 +0100 Subject: [FieldTrip] newbie In-Reply-To: References: Message-ID: <520BA31A.9040803@csl.psychol.cam.ac.uk> Hi Hweeling, Welcome! Can you give us a bit more information about the script you used to load the data? I haven't used BrainVision before but you should be able to read the .eeg data directly from Fieldtrip http://fieldtrip.fcdonders.nl/dataformat Best, Elisa On 14/08/2013 15:51, Hwee Ling Lee wrote: > Hi to all! > > I'm new to fieldtrip! I have a dataset that has been corrected for > scanner artifacts and BC artifacts using Brainvision Analyser. I would > like to export the corrected data as a .eeg file so that I can load > the data onto Matlab and use fieldtrip to perform further analyses. > > However, I kept getting error messages from Matlab that the sub-file > format is unsupported. I've been searching online the best way to > export the corrected data from Brainvision Analyser, however, I could > not find any solution at all. > > Would anyone please kindly instruct me the settings that I should have > when I export the corrected data? > > Thanks! > > Best wishes, > 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 r.oostenveld at donders.ru.nl Wed Aug 14 21:34:02 2013 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 14 Aug 2013 21:34:02 +0200 Subject: [FieldTrip] newbie In-Reply-To: References: Message-ID: Hi Hweeling The channel level data in the BrainVision data file can be represented in ascii and binary format. Furthermore, the order can be one channel at a time or sample-by-sample. Finally there are different numeric precisions (integer, float, etc). This is something that you cannot see from the outside of the file, but if you open the *.vhdr file in a text editor you can see these details. Since there are so many possible combinations of these three factors, it is not difficult easy to support all possible variants. You could try storing the data as multiplexed and in single- or double-precision, which is the most common format. Otherwise, you can report it as feature request on http://bugzilla.fcdonders.nl and attach a small piece of data (with vhdr and vmrk file) there. best regards, Robert On 14 Aug 2013, at 16:51, Hwee Ling Lee wrote: > Hi to all! > > I'm new to fieldtrip! I have a dataset that has been corrected for scanner artifacts and BC artifacts using Brainvision Analyser. I would like to export the corrected data as a .eeg file so that I can load the data onto Matlab and use fieldtrip to perform further analyses. > > However, I kept getting error messages from Matlab that the sub-file format is unsupported. I've been searching online the best way to export the corrected data from Brainvision Analyser, however, I could not find any solution at all. > > Would anyone please kindly instruct me the settings that I should have when I export the corrected data? > > Thanks! > > Best wishes, > Hweeling > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From gopalar.ccf at gmail.com Wed Aug 14 22:58:34 2013 From: gopalar.ccf at gmail.com (Raghavan Gopalakrishnan) Date: Wed, 14 Aug 2013 16:58:34 -0400 Subject: [FieldTrip] Reading multiple NEX files Message-ID: I have multiple nex files that have LFP and spike data. I would like to read them and plot one raster, since the multple nex files are from same subject. ft_appendspike does not append data structures with same channel label. All my data structures from different nex files have same channel label. Any ideas? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Thu Aug 15 11:34:33 2013 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 15 Aug 2013 11:34:33 +0200 Subject: [FieldTrip] EEG sensor position layout Message-ID: Hi all! After performing ICA, I used the command to browse the data in component mode. However, I got a warning message: Warning: No layout specified - will try to construct one using sensor positions > In ft_databrowser at 217 Error using ft_databrowser (line 223) cannot infer sensor type I understand that one can manually create the layout, however, I was not sure how I can do it. Could someone please help? Thank you. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Thu Aug 15 12:45:51 2013 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Thu, 15 Aug 2013 12:45:51 +0200 Subject: [FieldTrip] EEG sensor position layout In-Reply-To: References: Message-ID: Dear Hweeling, You should indeed specify cfg.layout, naming the layout file for the data that you have. You can first check in the folder fieldtrip/template/layout to see if there is already an existing template that you can use. If not, please see ft_prepare_layout for more details. If you're still stuck, please ask again with more specific details on your layout. Best, Johanna 2013/8/15 Hwee Ling Lee > Hi all! > > After performing ICA, I used the command to browse the data in component > mode. > > However, I got a warning message: > > Warning: No layout specified - will try to construct one using sensor > positions > > In ft_databrowser at 217 > Error using ft_databrowser (line 223) > cannot infer sensor type > > I understand that one can manually create the layout, however, I was not > sure how I can do it. Could someone please help? > > Thank you. > > 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 hweeling.lee at gmail.com Thu Aug 15 13:21:19 2013 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 15 Aug 2013 13:21:19 +0200 Subject: [FieldTrip] EEG sensor position layout again Message-ID: Hi, A bit more details about my setup. I'm using a Easycap MRI compatible 128 channels cap. I tried to search for a layout on the templates/layout, and I found one that might closest fit to my needs ('QuikCap_NSL_128'). To view my components, I tried these series of commands: cfg = []; cfg.viewmode = 'component'; cfg.continuous = 'yes'; cfg.layout = ft_prepare_layout('QuikCap_NSL_128'); ft_databrowser(cfg,ic_data); However, I was prompted with error messages: Warning: Struct field assignment overwrites a value with class "char". See MATLAB R14SP2 Release Notes, Assigning Nonstructure Variables As Structures Displays Warning, for details. > In utilities\private\ft_preamble_provenance at 49 In ft_preamble at 54 In ft_prepare_layout at 91 Error using ft_prepare_layout (line 582) no layout detected, please specify cfg.layout Also when I tried the command, cfg = []; cfg.viewmode = 'component'; cfg.continuous = 'yes'; cfg.layout = 'QuikCap_NSL_128'; ft_databrowser(cfg,ic_data); I get this error message: Warning: could not open QuikCap_NSL_128 > In fileio\private\warning_once at 116 In fileio\private\filetype_check_header at 54 In ft_filetype at 328 In ft_prepare_layout at 253 In ft_databrowser at 226 Warning: could not determine filetype of QuikCap_NSL_128 > In fileio\private\warning_once at 116 In ft_filetype at 1115 In ft_prepare_layout at 253 In ft_databrowser at 226 creating layout from electrode file QuikCap_NSL_128 Error using ft_read_sens (line 68) file 'QuikCap_NSL_128' does not exist Error in ft_prepare_layout (line 275) lay = sens2lay(ft_read_sens(cfg.layout), cfg.rotate, cfg.projection, cfg.style, cfg.overlap); Error in ft_databrowser (line 226) cfg.layout = ft_prepare_layout(tmpcfg); Would anyone please help? Cheers, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at gmail.com Thu Aug 15 13:33:57 2013 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Thu, 15 Aug 2013 13:33:57 +0200 Subject: [FieldTrip] EEG sensor position layout again In-Reply-To: References: Message-ID: Hi Hweeling, Since it says that it cannot find the Quikcap file, it sounds like it's not on your path. Run ft_defaults on your Matlab command, then test if the file is on your path: >> ft_defaults >> which QuikCap_NSL_128.mat Assuming it finds the file on your path, then do you still get the browser error? Best, Johanna 2013/8/15 Hwee Ling Lee > Hi, > > A bit more details about my setup. > > I'm using a Easycap MRI compatible 128 channels cap. I tried to search for > a layout on the templates/layout, and I found one that might closest fit to > my needs ('QuikCap_NSL_128'). > To view my components, I tried these series of commands: > > cfg = []; > cfg.viewmode = 'component'; > cfg.continuous = 'yes'; > cfg.layout = ft_prepare_layout('QuikCap_NSL_128'); > ft_databrowser(cfg,ic_data); > > However, I was prompted with error messages: > Warning: Struct field assignment overwrites a value with class "char". See > MATLAB R14SP2 Release Notes, Assigning Nonstructure > Variables As Structures Displays Warning, for details. > > In utilities\private\ft_preamble_provenance at 49 > In ft_preamble at 54 > In ft_prepare_layout at 91 > Error using ft_prepare_layout (line 582) > no layout detected, please specify cfg.layout > > Also when I tried the command, > > cfg = []; > cfg.viewmode = 'component'; > cfg.continuous = 'yes'; > cfg.layout = 'QuikCap_NSL_128'; > ft_databrowser(cfg,ic_data); > > I get this error message: > Warning: could not open QuikCap_NSL_128 > > In fileio\private\warning_once at 116 > In fileio\private\filetype_check_header at 54 > In ft_filetype at 328 > In ft_prepare_layout at 253 > In ft_databrowser at 226 > Warning: could not determine filetype of QuikCap_NSL_128 > > In fileio\private\warning_once at 116 > In ft_filetype at 1115 > In ft_prepare_layout at 253 > In ft_databrowser at 226 > creating layout from electrode file QuikCap_NSL_128 > Error using ft_read_sens (line 68) > file 'QuikCap_NSL_128' does not exist > > Error in ft_prepare_layout (line 275) > lay = sens2lay(ft_read_sens(cfg.layout), cfg.rotate, cfg.projection, > cfg.style, cfg.overlap); > > Error in ft_databrowser (line 226) > cfg.layout = ft_prepare_layout(tmpcfg); > > > Would anyone please help? > > Cheers, > 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 hweeling.lee at gmail.com Thu Aug 15 13:59:17 2013 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 15 Aug 2013 13:59:17 +0200 Subject: [FieldTrip] EEG sensor position layout again In-Reply-To: References: Message-ID: Hi, It states that: 'QuikCap_NSL_128.mat' not found. However, when I checked fieldtrip/templates/layout, the mat file is stored in this folder. Cheers, Hweeling On 15 August 2013 13:33, Johanna Zumer wrote: > Hi Hweeling, > > Since it says that it cannot find the Quikcap file, it sounds like it's > not on your path. Run ft_defaults on your Matlab command, then test if > the file is on your path: > >> ft_defaults > >> which QuikCap_NSL_128.mat > > Assuming it finds the file on your path, then do you still get the browser > error? > > Best, > Johanna > > > 2013/8/15 Hwee Ling Lee > >> Hi, >> >> A bit more details about my setup. >> >> I'm using a Easycap MRI compatible 128 channels cap. I tried to search >> for a layout on the templates/layout, and I found one that might closest >> fit to my needs ('QuikCap_NSL_128'). >> To view my components, I tried these series of commands: >> >> cfg = []; >> cfg.viewmode = 'component'; >> cfg.continuous = 'yes'; >> cfg.layout = ft_prepare_layout('QuikCap_NSL_128'); >> ft_databrowser(cfg,ic_data); >> >> However, I was prompted with error messages: >> Warning: Struct field assignment overwrites a value with class "char". >> See MATLAB R14SP2 Release Notes, Assigning Nonstructure >> Variables As Structures Displays Warning, for details. >> > In utilities\private\ft_preamble_provenance at 49 >> In ft_preamble at 54 >> In ft_prepare_layout at 91 >> Error using ft_prepare_layout (line 582) >> no layout detected, please specify cfg.layout >> >> Also when I tried the command, >> >> cfg = []; >> cfg.viewmode = 'component'; >> cfg.continuous = 'yes'; >> cfg.layout = 'QuikCap_NSL_128'; >> ft_databrowser(cfg,ic_data); >> >> I get this error message: >> Warning: could not open QuikCap_NSL_128 >> > In fileio\private\warning_once at 116 >> In fileio\private\filetype_check_header at 54 >> In ft_filetype at 328 >> In ft_prepare_layout at 253 >> In ft_databrowser at 226 >> Warning: could not determine filetype of QuikCap_NSL_128 >> > In fileio\private\warning_once at 116 >> In ft_filetype at 1115 >> In ft_prepare_layout at 253 >> In ft_databrowser at 226 >> creating layout from electrode file QuikCap_NSL_128 >> Error using ft_read_sens (line 68) >> file 'QuikCap_NSL_128' does not exist >> >> Error in ft_prepare_layout (line 275) >> lay = sens2lay(ft_read_sens(cfg.layout), cfg.rotate, cfg.projection, >> cfg.style, cfg.overlap); >> >> Error in ft_databrowser (line 226) >> cfg.layout = ft_prepare_layout(tmpcfg); >> >> >> Would anyone please help? >> >> Cheers, >> 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 johanna.zumer at gmail.com Thu Aug 15 14:01:39 2013 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Thu, 15 Aug 2013 14:01:39 +0200 Subject: [FieldTrip] EEG sensor position layout again In-Reply-To: References: Message-ID: Hi Hweeling, I just checked on my computer, and it helped to restart matlab and try again. Maybe there is something strange if ft_defaults is called (again) during an already open session with previous calls to FT functions? Best, Johanna 2013/8/15 Hwee Ling Lee > Hi, > > It states that: > 'QuikCap_NSL_128.mat' not found. > > However, when I checked fieldtrip/templates/layout, the mat file is stored > in this folder. > > Cheers, > Hweeling > > > > On 15 August 2013 13:33, Johanna Zumer wrote: > >> Hi Hweeling, >> >> Since it says that it cannot find the Quikcap file, it sounds like it's >> not on your path. Run ft_defaults on your Matlab command, then test if >> the file is on your path: >> >> ft_defaults >> >> which QuikCap_NSL_128.mat >> >> Assuming it finds the file on your path, then do you still get the >> browser error? >> >> Best, >> Johanna >> >> >> 2013/8/15 Hwee Ling Lee >> >>> Hi, >>> >>> A bit more details about my setup. >>> >>> I'm using a Easycap MRI compatible 128 channels cap. I tried to search >>> for a layout on the templates/layout, and I found one that might closest >>> fit to my needs ('QuikCap_NSL_128'). >>> To view my components, I tried these series of commands: >>> >>> cfg = []; >>> cfg.viewmode = 'component'; >>> cfg.continuous = 'yes'; >>> cfg.layout = ft_prepare_layout('QuikCap_NSL_128'); >>> ft_databrowser(cfg,ic_data); >>> >>> However, I was prompted with error messages: >>> Warning: Struct field assignment overwrites a value with class "char". >>> See MATLAB R14SP2 Release Notes, Assigning Nonstructure >>> Variables As Structures Displays Warning, for details. >>> > In utilities\private\ft_preamble_provenance at 49 >>> In ft_preamble at 54 >>> In ft_prepare_layout at 91 >>> Error using ft_prepare_layout (line 582) >>> no layout detected, please specify cfg.layout >>> >>> Also when I tried the command, >>> >>> cfg = []; >>> cfg.viewmode = 'component'; >>> cfg.continuous = 'yes'; >>> cfg.layout = 'QuikCap_NSL_128'; >>> ft_databrowser(cfg,ic_data); >>> >>> I get this error message: >>> Warning: could not open QuikCap_NSL_128 >>> > In fileio\private\warning_once at 116 >>> In fileio\private\filetype_check_header at 54 >>> In ft_filetype at 328 >>> In ft_prepare_layout at 253 >>> In ft_databrowser at 226 >>> Warning: could not determine filetype of QuikCap_NSL_128 >>> > In fileio\private\warning_once at 116 >>> In ft_filetype at 1115 >>> In ft_prepare_layout at 253 >>> In ft_databrowser at 226 >>> creating layout from electrode file QuikCap_NSL_128 >>> Error using ft_read_sens (line 68) >>> file 'QuikCap_NSL_128' does not exist >>> >>> Error in ft_prepare_layout (line 275) >>> lay = sens2lay(ft_read_sens(cfg.layout), cfg.rotate, cfg.projection, >>> cfg.style, cfg.overlap); >>> >>> Error in ft_databrowser (line 226) >>> cfg.layout = ft_prepare_layout(tmpcfg); >>> >>> >>> Would anyone please help? >>> >>> Cheers, >>> 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 hweeling.lee at gmail.com Thu Aug 15 14:13:04 2013 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 15 Aug 2013 14:13:04 +0200 Subject: [FieldTrip] EEG sensor position layout again In-Reply-To: References: Message-ID: Hi, Thanks for your advice. I restarted Matlab, and call for ft_defaults and which QuikCap_NSL_128.mat, and I still get the same error message. Also, is this the right layout file to use for my data? Cheers, Hweeling On 15 August 2013 14:01, Johanna Zumer wrote: > Hi Hweeling, > > I just checked on my computer, and it helped to restart matlab and try > again. Maybe there is something strange if ft_defaults is called (again) > during an already open session with previous calls to FT functions? > > Best, > Johanna > > > 2013/8/15 Hwee Ling Lee > >> Hi, >> >> It states that: >> 'QuikCap_NSL_128.mat' not found. >> >> However, when I checked fieldtrip/templates/layout, the mat file is >> stored in this folder. >> >> Cheers, >> Hweeling >> >> >> >> On 15 August 2013 13:33, Johanna Zumer wrote: >> >>> Hi Hweeling, >>> >>> Since it says that it cannot find the Quikcap file, it sounds like it's >>> not on your path. Run ft_defaults on your Matlab command, then test if >>> the file is on your path: >>> >> ft_defaults >>> >> which QuikCap_NSL_128.mat >>> >>> Assuming it finds the file on your path, then do you still get the >>> browser error? >>> >>> Best, >>> Johanna >>> >>> >>> 2013/8/15 Hwee Ling Lee >>> >>>> Hi, >>>> >>>> A bit more details about my setup. >>>> >>>> I'm using a Easycap MRI compatible 128 channels cap. I tried to search >>>> for a layout on the templates/layout, and I found one that might closest >>>> fit to my needs ('QuikCap_NSL_128'). >>>> To view my components, I tried these series of commands: >>>> >>>> cfg = []; >>>> cfg.viewmode = 'component'; >>>> cfg.continuous = 'yes'; >>>> cfg.layout = ft_prepare_layout('QuikCap_NSL_128'); >>>> ft_databrowser(cfg,ic_data); >>>> >>>> However, I was prompted with error messages: >>>> Warning: Struct field assignment overwrites a value with class "char". >>>> See MATLAB R14SP2 Release Notes, Assigning Nonstructure >>>> Variables As Structures Displays Warning, for details. >>>> > In utilities\private\ft_preamble_provenance at 49 >>>> In ft_preamble at 54 >>>> In ft_prepare_layout at 91 >>>> Error using ft_prepare_layout (line 582) >>>> no layout detected, please specify cfg.layout >>>> >>>> Also when I tried the command, >>>> >>>> cfg = []; >>>> cfg.viewmode = 'component'; >>>> cfg.continuous = 'yes'; >>>> cfg.layout = 'QuikCap_NSL_128'; >>>> ft_databrowser(cfg,ic_data); >>>> >>>> I get this error message: >>>> Warning: could not open QuikCap_NSL_128 >>>> > In fileio\private\warning_once at 116 >>>> In fileio\private\filetype_check_header at 54 >>>> In ft_filetype at 328 >>>> In ft_prepare_layout at 253 >>>> In ft_databrowser at 226 >>>> Warning: could not determine filetype of QuikCap_NSL_128 >>>> > In fileio\private\warning_once at 116 >>>> In ft_filetype at 1115 >>>> In ft_prepare_layout at 253 >>>> In ft_databrowser at 226 >>>> creating layout from electrode file QuikCap_NSL_128 >>>> Error using ft_read_sens (line 68) >>>> file 'QuikCap_NSL_128' does not exist >>>> >>>> Error in ft_prepare_layout (line 275) >>>> lay = sens2lay(ft_read_sens(cfg.layout), cfg.rotate, cfg.projection, >>>> cfg.style, cfg.overlap); >>>> >>>> Error in ft_databrowser (line 226) >>>> cfg.layout = ft_prepare_layout(tmpcfg); >>>> >>>> >>>> Would anyone please help? >>>> >>>> Cheers, >>>> 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 >> ================================================= >> > > -- ================================================= 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 m.kandula at uu.nl Thu Aug 15 18:02:33 2013 From: m.kandula at uu.nl (Manasa Kandula) Date: Thu, 15 Aug 2013 18:02:33 +0200 Subject: [FieldTrip] ft_databrowser No artifact.sampleinfo Message-ID: <520CFB99.4060709@uu.nl> I've been trying to use /ft_databrowser/ on segmented EEG data right after /ft_preprocessing/. However, at the subfunction /redraw_cb/, it's crashing as a call to /ft_fetch_data/ is resulting in an error as /opt.artdata.sampleinfo/ is not a field present in the /opt.artdata/ struct (Error using ==> ft_fetch_data at 60 data does not contain a consistent trial definition, fetching data is not possible). As far as I can tell, there is no point in the code that actually sets the /sampleinfo/ field for the /artifact/ struct. Has anyone else encountered this problem? -------------- next part -------------- An HTML attachment was scrubbed... URL: From pattersons076 at gmail.com Thu Aug 15 20:01:32 2013 From: pattersons076 at gmail.com (Samantha Patterson) Date: Thu, 15 Aug 2013 11:01:32 -0700 Subject: [FieldTrip] Fwd: error using freqdescriptives In-Reply-To: References: Message-ID: Dear Fieldtrippers, l am trying to use ft_freqdescriptives on freq data but i get an error saying Error using ft_checkdata (line 366) This function requires freq or freqmvar data as input. Error in ft_freqdescriptives (line 103) freq = ft_checkdata(freq, 'datatype', {'freq', 'freqmvar'}, 'feedback', 'yes'); Specfied cfg for freqdescriptives is cfg = []; cfg.foilim = [10 35]; cfg.toilim = [1.0 2.5]; cfg.keeptrials = 'yes'; test = ft_freqdescriptives(cfg,freq1); output for freq1: freq1 ans = label: {202x1 cell} dimord: 'rpt_chan_freq_time' freq: [1x22 double] time: [1x201 double] powspctrm: [4-D double] cumtapcnt: [26x18 double] grad: [1x1 struct] cfg: [1x1 struct] trialinfo: [26x3 double] Any thoughts? Thanks!!!!! Samantha -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.Kandula at uu.nl Thu Aug 15 22:26:54 2013 From: M.Kandula at uu.nl (Kandula, M. (Manasa)) Date: Thu, 15 Aug 2013 20:26:54 +0000 Subject: [FieldTrip] ft_databrowser No artifact.sampleinfo In-Reply-To: <520CFB99.4060709@uu.nl> References: <520CFB99.4060709@uu.nl> Message-ID: <48A0B9F7F9A4BD4C836E1CC21805EB7E191D0BFC@ICTSC-W-S203.soliscom.uu.nl> Hey all, A minor correction.. I meant the artdata struct , not the artifact struct. Thanks!! Manasa ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Manasa Kandula [m.kandula at uu.nl] Sent: Thursday, August 15, 2013 6:02 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] ft_databrowser No artifact.sampleinfo I've been trying to use ft_databrowser on segmented EEG data right after ft_preprocessing. However, at the subfunction redraw_cb, it's crashing as a call to ft_fetch_data is resulting in an error as opt.artdata.sampleinfo is not a field present in the opt.artdata struct (Error using ==> ft_fetch_data at 60 data does not contain a consistent trial definition, fetching data is not possible). As far as I can tell, there is no point in the code that actually sets the sampleinfo field for the artifact struct. Has anyone else encountered this problem? -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbj0310 at gmail.com Sun Aug 18 14:31:53 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Sun, 18 Aug 2013 21:31:53 +0900 Subject: [FieldTrip] Visualizing grand-averaged ERPs with different channels Message-ID: Dear all. Hello What I want to do is visualizing ERPs in different channels, simultaneously in a single figure window. For example, CZ, CPZ, & PZ or P4 & P5 in a group. I use ft_singleplotER like below *figure; * *cfg = [];* *cfg.ylim = [-8 8];* *cfg.baseline = [-0.2 0];* *cfg.linewidth = [2];* *ft_singleplotER(cfg, group1_CP4, group1_CP3)* I succeeded visualizing 3 different groups simultaneously with certain same channel using the same manner above. (cfg, group1_CZ, group2_CZ) However, when I try the same code with different channels, the result only to show mean value (e.g. mean(CP4). I do not know how to solve it. Please help me. With regards. -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From Sara.Bogels at mpi.nl Mon Aug 19 11:39:54 2013 From: Sara.Bogels at mpi.nl (=?ISO-8859-1?Q?Sara_B=F6gels?=) Date: Mon, 19 Aug 2013 11:39:54 +0200 Subject: [FieldTrip] problem with ft_multiplotER In-Reply-To: <51E6838F.3050302@donders.ru.nl> References: <51E67229.8040001@mpi.nl> <51E6838F.3050302@donders.ru.nl> Message-ID: <5211E7EA.8090907@mpi.nl> Hi Jörn and others, Some time ago, I posted the question below to the mailinglist. I now have had this error many times for both ft_timelockgrandaverage and ft_multiplotER. It happens for some datasets but not others and this appears quite random to me. The error message is: "Subscripted assignment dimension mismatch" Error in ft_timelockgrandaverage (line 182). avgmat(s,:,:) = varargin{s}.(cfg.parameter{k}); It appears to have something to do with the different time limits of the different data I want to average or plot. I use cfg.latency to make sure the latency falls within the time limits of all files but this sometimes still does not help. Any ideas? Thank you, Sara "Jörn M. Horschig" wrote: > Dear Sara, > > What you describe sounds like a bug to me. It looks like that in these > lines the averages of the two conditions should be concatenated into one > matrix, and apparently something goes wrong. However, you truncated the > error message a bit (you pasted the line where the error occurs, but not > the error message itself). If one of us developers should look into this > further, it would be great if you register and create a bugreport on > bugzilla.fconders.nl. Preferably would be to upload a snippet of your > data, e.g. timelockstructures of one participant, and some lines of code > which reproduce the error. We can then look into this further and fix > this as soon as possible :) > > Best, > Jörn > > On 7/17/2013 12:30 PM, Sara Bögels wrote: >> Hi all, >> >> I have a very specific problem with the ft_multiplotER function. For 2 >> of my 24 participants, the function gives an error-message when I try >> to plot the averages of two conditions at the same time. Plotting them >> one by one is not a problem. There appears to be a specific point in >> time (different for the two participants) when this goes wrong. If I >> avoid that time (by using cfg.xlim) it works fine. My trials have >> different lengths and I used "cfg.vartrllength = 2;" when calling >> ft_timelockanalysis (not sure whether this is relevant). >> >> The error message I get is >> "Error in ft_multiplotER (line 616) >> yval(i,:) = datamatrix{i}(m,:);" >> >> I cannot find out what happens in this line. Can anyone tell me what >> this might be referring to? >> >> Thank you, >> Sara >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > From frank.ye.mei at gmail.com Mon Aug 19 22:18:39 2013 From: frank.ye.mei at gmail.com (Ye Mei) Date: Mon, 19 Aug 2013 16:18:39 -0400 Subject: [FieldTrip] Can beamformer give both the location and the orientation of the source? Message-ID: <52127D9F.3090102@gmail.com> Hi all, Can beamformer give both the location and the orientation of the source? If yes, how to do it in fieldtrip? thanks ahead, Ye From arr at uvic.ca Mon Aug 19 22:47:27 2013 From: arr at uvic.ca (Ashley Rose) Date: Mon, 19 Aug 2013 13:47:27 -0700 Subject: [FieldTrip] fieldtrip question Message-ID: <314d3147c1b422e458d033e10d7a6b17.squirrel@wm3.uvic.ca> Hi there, I'm having an issue running Fieldtrip. I keep getting this warning: "Warning: Dimensions of AlphaData must be 1x1, or must match CData." But I haven't done anything to AlphaData or CData that would make them inconsistent. Has anyone had this problem before? Thank you, Ashley Rose From imponderabilion at gmail.com Tue Aug 20 00:54:49 2013 From: imponderabilion at gmail.com (=?ISO-8859-2?Q?Miko=B3aj_Magnuski?=) Date: Tue, 20 Aug 2013 00:54:49 +0200 Subject: [FieldTrip] ft_neighbourplot does not plot new connections in 3D Message-ID: Hi FieldTrippers! just a short note in case it wasn'r reported before: ft_neighbourplot with option .enableedit = 'on' (the bleeding option) plots new connections (new - that means click-created) only as 2D projections even if everything else is plotted in 3D. changing lines 286 - 287 to something like: if size(proj,2) == 2 Coord = {X, Y}; elseif size(proj,2) > 2 Z = [proj(curSensId,3) proj(lastSensId,3)]; Coord = {X, Y, Z}; end hl(curSensId, lastSensId) = line(Coord{:}, 'color', 'r'); hl(lastSensId, curSensId) = line(Coord{:}, 'color', 'r'); fixes this problem. Regards, Mikołaj Magnuski -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Aug 23 09:28:18 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 23 Aug 2013 09:28:18 +0200 Subject: [FieldTrip] ft_neighbourplot does not plot new connections in 3D In-Reply-To: References: Message-ID: <52170F12.9020107@donders.ru.nl> Dear Miko?aj, thanks very much for reporting this. I fixed it and the fix should be available inthe next FieldTrip release (i.e. tomorrow). Best, Jörn On 8/20/2013 12:54 AM, Miko?aj Magnuski wrote: > Hi FieldTrippers! > > just a short note in case it wasn'r reported before: > ft_neighbourplot with option .enableedit = 'on' (the bleeding option) > plots new connections (new - that means click-created) only as 2D > projections even if everything else is plotted in 3D. > > changing lines 286 - 287 to something like: > if size(proj,2) == 2 > Coord = {X, Y}; > elseif size(proj,2) > 2 > Z = [proj(curSensId,3) proj(lastSensId,3)]; > Coord = {X, Y, Z}; > end > hl(curSensId, lastSensId) = line(Coord{:}, 'color', 'r'); > hl(lastSensId, curSensId) = line(Coord{:}, 'color', 'r'); > > fixes this problem. > > > Regards, > Miko?aj Magnuski > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From narayan.ps at tut.fi Fri Aug 23 12:37:20 2013 From: narayan.ps at tut.fi (Narayan Puthanmadam Subramaniyam) Date: Fri, 23 Aug 2013 13:37:20 +0300 Subject: [FieldTrip] simulation of EOG Message-ID: <001501ce9fec$bee80ce0$3cb826a0$@tut.fi> Dear FT experts I am not sure if I should be asking this question here. I want to simulate 'pure' EOG signal by placing rotating dipole in the eye. Can I use FT to compute the lead field matrix from eye to all scalp electrodes ? Has anyone used a BEM model where eyes are segmented ? Many Thanks Narayan From ingenieureniso at gmail.com Fri Aug 23 19:40:14 2013 From: ingenieureniso at gmail.com (ingenieur eniso) Date: Fri, 23 Aug 2013 18:40:14 +0100 Subject: [FieldTrip] how to open bdf and rdf files Message-ID: Dear all, I have EEG record files in rdf and bdf formats. but I do not know how to open them. Please can anyone send me a matlab function to open these files? 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 johanna.zumer at gmail.com Sun Aug 25 07:18:14 2013 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Sun, 25 Aug 2013 07:18:14 +0200 Subject: [FieldTrip] how to open bdf and rdf files In-Reply-To: References: Message-ID: Dear Ahmed, Does this help? (http://fieldtrip.fcdonders.nl/getting_started/bdf ) If you are still stuck, maybe try EEGlab import and then convert EEGlab format to FieldTrip format ( http://fieldtrip.fcdonders.nl/integrating_with/integrating_with_eeglab) Best, Johanna 2013/8/23 ingenieur eniso > Dear all, > > > I have EEG record files in rdf and bdf formats. but I do not know how to > open them. > > Please can anyone send me a matlab function to open these files? > > I hope you will send me positive and helpful response. > > Thanks a lot in advance! > > Best, > > ahmed > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Mon Aug 26 00:08:19 2013 From: roeysc at gmail.com (Roey Schurr) Date: Mon, 26 Aug 2013 01:08:19 +0300 Subject: [FieldTrip] Source Analysis Normalisation in-subject and in-group Message-ID: Hi all, We have a question regarding normalisation of EEG signals for source reconstruction analysis. We have EEG records (not ERP) of a few patients in two different conditions (each condition consists of several 2 seconds segments/trials). Each recording was done over a period of a few days, and in different sessions. We also have anatomycal MRI scans for each patient (subject). We would like to make two statistic comparisons: 1. Compare the source analysis of the two conditions in each subject. 2. Compare the source analysis of the two conditions, based upon all subjects. For the first comparison, we are puzzled about the appropriate way to normalise and standardize our data, since each EEG segment was recorded at a different time, and hence may be affected by different electrode conductivity, for example. How would you normalise the data? For the second comparison, of course, we would like to normalise the source analysis results in the anatomycal level using ft_volumenormalise. However, we are puzzled about the appropriate way to normalise and standardize our data, since subjects differ from each other (for example, anatomycally, resulting in changes of power spectrum). How would you standartize the data between subjects? Thank you very much, best regards, Aia and Roey -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Tue Aug 27 20:44:39 2013 From: polomacnenad at gmail.com (Nenad Polomac) Date: Tue, 27 Aug 2013 20:44:39 +0200 Subject: [FieldTrip] ICA on highpass filtered MEG data Message-ID: Dear Fieldtrip users, I have CTF 275 channels MEG data and I am interested in gamma band. For this purpose I would like to remove microsaccade artifacts from the data using the ICA. In order to obtain the microsacade components I have filtered data ( highpass and lowpass; 30-150 Hz) and than I've wanted to run ICA calculation. However, I've read here http://sccn.ucsd.edu/pipermail/eeglablist/2013/006710.html that after filtering data are more dependent and that is a big problem for ICA calculation. And I also experienced that ICA takes very long time and sometimes doesn't converge. So, to overcome this problem, the data dimensionality has to be reduced. I have found two different solutions from different sources. One solution might be to estimate variance with PCA and than choose the amount of variance that should stay in the data. e.g. [COEFF,SCORE,eigenvalues ] = princomp(data_matrix); A= cumsum(eigenvalues); num_of_comp=find(A/A(end)>0.98,1); % 98% is the percentage of variance that will be used for the ICA, 2% will be discarded This percentage will be the same for all subjects. The second option might be to use the same eigenvalue cutoff value for all subjects: [COEFF,SCORE,eigenvalues ] = princomp(data_matrix); A=(find(eigenvalues>0.005)); %0.005 here is just for example num_of_comp=A(end); The variable num_of_comp represents the number of component to which filtered data will be reduced before ICA. e.g. cfg = []; cfg.method = 'runica'; cfg.runica.pca = num_of_comp; cfg.runica.maxsteps = 600; cfg.runica.stop = 1e-7; cfg.runica.extended = 1; ica_comp = ft_componentanalysis(cfg, data); Finally, my question is which of this two methods is more objective? And is there any other possibility I should consider? I would like to add that in my case second calculation gives me less variant number of components among 22 subjects. Thank you in advance! All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron.schurger at gmail.com Tue Aug 27 21:49:21 2013 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Tue, 27 Aug 2013 21:49:21 +0200 Subject: [FieldTrip] ICA on highpass filtered MEG data In-Reply-To: References: Message-ID: I am not aware of any good way to remove microsaccade artifacts from EEG or MEG data. ICA might find a microsaccade component if you have sufficient data, but you will have to hunt through the components to find the "right" one. The difficult question is how to know which is the right component, or whether or not microsaccades are incorporated into two or more components (or not at all). Having an MEG-compatible eye tracker with a high sampling rate is what I would want. Best wishes, Aaron On Tue, Aug 27, 2013 at 8:44 PM, Nenad Polomac wrote: > Dear Fieldtrip users, > > I have CTF 275 channels MEG data and I am interested in gamma band. For this > purpose I would like to remove microsaccade artifacts from the data using > the ICA. In order to obtain the microsacade components I have filtered data > ( highpass and lowpass; 30-150 Hz) and than I've wanted to run ICA > calculation. However, I've read here > http://sccn.ucsd.edu/pipermail/eeglablist/2013/006710.html that after > filtering data are more dependent and that is a big problem for ICA > calculation. And I also experienced that ICA takes very long time and > sometimes doesn't converge. So, to overcome this problem, the data > dimensionality has to be reduced. I have found two different solutions from > different sources. > > One solution might be to estimate variance with PCA and than choose the > amount of variance that should stay in the data. e.g. > [COEFF,SCORE,eigenvalues ] = princomp(data_matrix); > A= cumsum(eigenvalues); > num_of_comp=find(A/A(end)>0.98,1); % 98% is the percentage of variance that > will be used for the ICA, 2% will be discarded > This percentage will be the same for all subjects. > > The second option might be to use the same eigenvalue cutoff value for all > subjects: > [COEFF,SCORE,eigenvalues ] = princomp(data_matrix); > A=(find(eigenvalues>0.005)); %0.005 here is just for example > num_of_comp=A(end); > > The variable num_of_comp represents the number of component to which > filtered data will be reduced before ICA. > e.g. > cfg = []; > cfg.method = 'runica'; > cfg.runica.pca = num_of_comp; > cfg.runica.maxsteps = 600; > cfg.runica.stop = 1e-7; > cfg.runica.extended = 1; > ica_comp = ft_componentanalysis(cfg, data); > > > > Finally, my question is which of this two methods is more objective? And is > there any other possibility I should consider? > I would like to add that in my case second calculation gives me less variant > number of components among 22 subjects. > > Thank you in advance! > > All the best! > Nenad > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Post-doctoral researcher INSERM U992 / NeuroSpin CEA - Saclay, France +33-1-69-08-66-47 aaron.schurger at gmail.com http://www.unicog.org From sreenivasan.r.nadar at gmail.com Tue Aug 27 22:17:03 2013 From: sreenivasan.r.nadar at gmail.com (Sreenivasan R. Nadar, Ph.D.) Date: Tue, 27 Aug 2013 16:17:03 -0400 Subject: [FieldTrip] 19 channel EEG for source modeling of epileptic focus Message-ID: Hi All, I have a 19 channel Nihon - Kohden EEG for epilepsy monitoring and I use the following file for channel locations in ftp://sccn.ucsd.edu/pub/locfiles/eeglab/Standard-10-20-Cap19.ced for data analysis in EEGLab. Please let me know if anybody has pre-processing script to import the data in Fieldtrip and also for source localisation of epileptic focus. Thank you. Sreenivasan -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Aug 29 10:02:45 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 29 Aug 2013 10:02:45 +0200 Subject: [FieldTrip] 19 channel EEG for source modeling of epileptic focus In-Reply-To: References: Message-ID: <521F0025.8090104@donders.ru.nl> Dear Sreenivasan, I am not sure whether you can read in .ced files with the ft_read_sens function. You could give it a try though by specifying cfg.elecfile = 'PATH_TO_FILE/Standard-10-20-Cap19.ced' Otherwise, I can see two ways how you can make this work. First, you could change the content of the file to match the format of the other sensor-templates. For this, you can best have a look in fieldtrip/template/elec and have a look at one of these files. Then, you would need to rearrange the values of your .ced file to match the order of the .elc-format. Alternatively, you could write your own wrapper function, which reads in the x-, y- and z-position of the electrodes from the .ced file and stores them in a matrix. Also, you need to store the corresponding channel label. Using these, you can create an elec-structure that you can use as cfg.elec for whatever function you want to do. Maybe someone else here has worked with .ced files before and can thus can help with either of the two solutions. Good luck :) Best, Jörn On 8/27/2013 10:17 PM, Sreenivasan R. Nadar, Ph.D. wrote: > Hi All, > > I have a 19 channel Nihon - Kohden EEG for epilepsy monitoring and I > use the following file for channel locations in > ftp://sccn.ucsd.edu/pub/locfiles/eeglab/Standard-10-20-Cap19.ced for > data analysis in EEGLab. > > Please let me know if anybody has pre-processing script to import the > data in Fieldtrip and also for source localisation of epileptic focus. > > Thank you. > > Sreenivasan > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.vanlier at bsse.ethz.ch Thu Aug 29 13:53:26 2013 From: ben.vanlier at bsse.ethz.ch (van Lier Ben) Date: Thu, 29 Aug 2013 11:53:26 +0000 Subject: [FieldTrip] slow reading with ft_preprocessing of a fcdc_matbin file? Message-ID: Hi all, I have a pretty big data file of 120 channels for 20min continuous at 20khz. clearly i need to downsample. to do so, i convert the original file to fcdc_matbin, creating a 22gb bin file with all the data. then its time for downsampling as shown on http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory this is very slow. ft_preprocessing takes 230 seconds per channel (using 380 mb), doing nothing but just reading 1 channel. the subsequent downsampling with ft_resample to 1khz is surprisingly fast with only 4 seconds. does that make any sense? it seems like a very long time to read in 380mb... :( Best, Ben From jan.schoffelen at donders.ru.nl Thu Aug 29 14:01:59 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 29 Aug 2013 14:01:59 +0200 Subject: [FieldTrip] slow reading with ft_preprocessing of a fcdc_matbin file? In-Reply-To: References: Message-ID: <264BF553-0691-4AC9-95B8-D78000F0CA6B@donders.ru.nl> Hi Ben, I guess MATLAB needs to read in the whole datafile each time (for each channel). What about creating separate files for each channel? JM On Aug 29, 2013, at 1:53 PM, van Lier Ben wrote: > Hi all, > > I have a pretty big data file of 120 channels for 20min continuous at 20khz. clearly i need to downsample. to do so, i convert the original file to fcdc_matbin, creating a 22gb bin file with all the data. > > then its time for downsampling as shown on http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory > > this is very slow. ft_preprocessing takes 230 seconds per channel (using 380 mb), doing nothing but just reading 1 channel. the subsequent downsampling with ft_resample to 1khz is surprisingly fast with only 4 seconds. > > does that make any sense? it seems like a very long time to read in 380mb... :( > > Best, > Ben > > _______________________________________________ > 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 jm.horschig at donders.ru.nl Thu Aug 1 12:37:08 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 01 Aug 2013 12:37:08 +0200 Subject: [FieldTrip] ancova for sources analysis In-Reply-To: <2264a36963356fbe.51f8fb71@upo.es> References: <167095db43e3fd69.51f8d35e@upo.es> <1763660954.2174368.1375257362812.JavaMail.root@sculptor.zimbra.ru.nl> <2264a36963356fbe.51f8fb71@upo.es> Message-ID: <51FA3A54.8020001@donders.ru.nl> Dear Gabriel, if you have a .stat field, you did already run statistics on your data. I wouldn't regress anything out of e.g. t-values. Rather, the idea is to regress out confounding factors before doing statistics, so that you reduce variance across trials and subsequently maximize sensitivity of your statistical test. I could really advise you to read the paper I suggested, the rationale is explained there. Moreover, if you are interested in a covariate like 'age', a simple correlational analysis might make more sense. As stated, the idea of regressconfound is to explain and remove variance across observations, but depending on what you want, a correlation might make more sense. Want to improve your stats? Then go for regressconfound. Find out if there is age explains neural effects? Then go for a simple correlation. Best, Jörn On 7/31/2013 11:56 AM, Gabriel Gonzalez Escamilla wrote: > Thank you all for your responses. > > The last problem I did wrote is now solved, see below. > > I had a field called 'stat' instead of the 'pow', I'm guessing this > field was set before, so, now i'm using this field as if it was the > 'pow' I needed and it's working, Is that OK? > > Now it takes me to the next question, my data has the avg field, and > it says that will update the descriptives but that the 'method' is > missing, is this update necessary? or can I just skeep it? > > > Many thanks in advanced, > Gabriel > > > ----- Mensaje original ----- > De: "Stolk, A." > Fecha: Miércoles, 31 de Julio de 2013, 10:04 am > Asunto: Re: [FieldTrip] ancova for sources analysis > A: FieldTrip discussion list > > >Dear Gabriel, > > > > This page demonstrates how to remove contributions to the data > originating from head movement, but one could as well follow the same > principle for any other type of covariate (e.g. eye movement related > activity). > > > > http://fieldtrip.fcdonders.nl/example/how_to_incorporate_head_movements_in_meg_analysis? > > > > Yours, > > Arjen > > > ------------------------------------------------------------------------ > > *> Van: *"Gabriel Gonzalez Escamilla" > *> Aan: *"fieFieldTrip discussion list" > *> Verzonden: *Woensdag 31 juli 2013 09:05:34 > *> Onderwerp: *[FieldTrip] ancova for sources analysis > > > > Dear fieldtrip experts, > > > > I'm wondering if it is possible to perform an ancova or to remove > the effect of a covariate in a source analysis? > > > > Many thanks in advanced, > > Gabriel > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > --------------------------
PhD. student Gabriel > González-Escamilla
Laboratory of Functional Neuroscience
/>Department of Physiology, Anatomy, and Cell Biology
University > Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
/>- Spain -

Email: ggonesc at upo.es
/>http://www.upo.es/neuroaging/es/
> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From lzyang at ustc.edu.cn Sat Aug 3 10:49:59 2013 From: lzyang at ustc.edu.cn (lzyang) Date: Sat, 03 Aug 2013 16:49:59 +0800 Subject: [FieldTrip] units of data sample read from neuroscan avg file is incorrect Message-ID: <51FCC437.5070409@ustc.edu.cn> Dear fieldtrip list, I used ft_read_data to read in .avg files (neuroscan format) to do some advanced analysis. data=ft_read_data('sham.avg', 'dataformat', 'ns_avg'); I noticed that the unit of data sample read by this function is incorrect. Values of samples ranged from -0.1 to 0.1. I will appreciate if anyone can give me some hints on how to import avg files correctly using fieldtrip. Thanks very much! Best Regards, -Lizhuang From politzerahless at gmail.com Sat Aug 3 13:48:58 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 3 Aug 2013 07:48:58 -0400 Subject: [FieldTrip] fieldtrip Digest, Vol 33, Issue 3 In-Reply-To: References: Message-ID: Hi Lizhuang, I haven't used Fieldtrip to import .avg files so I'm not sure about this, but I wonder if this is related to the same problem in EEGLAB. EEGLAB also scales .avg files like this when importing them, for some reason, so if the Fieldtrip function is based on EEGLAB code these issues may be related. (However, I just looked at read_ns_avg.m, which is what ft_read_data calls, and it doesn't say it's copied from EEGLAB). If you have EEGLAB, you can add the custom function loadavg_bcl.m to your path (it is available at http://sccn.ucsd.edu/pipermail/eeglablist/2011/003986.html, as one of the attachments near the bottom), use that to import the .avg file, and then use the EEGLAB function eeglab2fieldtrip() to get the data into FieldTrip. Also, have you tried reading the data with ft_preprocessing() instead of ft_read_data? ft_read_data is kind of a low-level function; in the past I think I've had better luck just using ft_preprocessing. Best, Steve Stephen Politzer-Ahles New York University, Abu Dhabi Psychology Department > Message: 1 > Date: Sat, 03 Aug 2013 16:49:59 +0800 > From: lzyang > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] units of data sample read from neuroscan avg file > is incorrect > Message-ID: <51FCC437.5070409 at ustc.edu.cn> > Content-Type: text/plain; charset=GB2312 > > Dear fieldtrip list, > I used ft_read_data to read in .avg files (neuroscan format) to do some > advanced analysis. > data=ft_read_data('sham.avg', 'dataformat', 'ns_avg'); > I noticed that the unit of data sample read by this function is incorrect. > Values of samples ranged from -0.1 to 0.1. > I will appreciate if anyone can give me some hints on how to import avg > files correctly using fieldtrip. > > Thanks very much! > > Best Regards, > -Lizhuang -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sat Aug 3 13:50:40 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 3 Aug 2013 07:50:40 -0400 Subject: [FieldTrip] units of data sample read from neuroscan avg file is incorrect Message-ID: Hi Lizhuang, I haven't used Fieldtrip to import .avg files so I'm not sure about this, but I wonder if this is related to the same problem in EEGLAB. EEGLAB also scales .avg files like this when importing them, for some reason, so if the Fieldtrip function is based on EEGLAB code these issues may be related. (However, I just looked at read_ns_avg.m, which is what ft_read_data calls, and it doesn't say it's copied from EEGLAB). If you have EEGLAB, you can add the custom function loadavg_bcl.m to your path (it is available at http://sccn.ucsd.edu/pipermail/eeglablist/2011/003986.html, as one of the attachments near the bottom), use that to import the .avg file, and then use the EEGLAB function eeglab2fieldtrip() to get the data into FieldTrip. Also, have you tried reading the data with ft_preprocessing() instead of ft_read_data? ft_read_data is kind of a low-level function; in the past I think I've had better luck just using ft_preprocessing. Best, Steve Stephen Politzer-Ahles New York University, Abu Dhabi Psychology Department > Message: 1 > Date: Sat, 03 Aug 2013 16:49:59 +0800 > From: lzyang > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] units of data sample read from neuroscan avg file > is incorrect > Message-ID: <51FCC437.5070409 at ustc.edu.cn> > Content-Type: text/plain; charset=GB2312 > > Dear fieldtrip list, > I used ft_read_data to read in .avg files (neuroscan format) to do some > advanced analysis. > data=ft_read_data('sham.avg', 'dataformat', 'ns_avg'); > I noticed that the unit of data sample read by this function is incorrect. > Values of samples ranged from -0.1 to 0.1. > I will appreciate if anyone can give me some hints on how to import avg > files correctly using fieldtrip. > > Thanks very much! > > Best Regards, > -Lizhuang -------------- next part -------------- An HTML attachment was scrubbed... URL: From Izabela.Mikula at mpi.nl Tue Aug 6 12:10:32 2013 From: Izabela.Mikula at mpi.nl (Izabela Mikula) Date: Tue, 6 Aug 2013 12:10:32 +0200 Subject: [FieldTrip] Error in ft_rejectartifact for the newest fieldtrip version Message-ID: <9532B831-AB8E-4EBC-A984-5A3783E5313D@mpi.nl> Dear all, I was wondering if any of you have ever encountered similar problem and might know if I'm doing something wrong or it is a bug.. I have tried using (my old scripts for preprocessing) ft_rejectartifact(cfg, data) but I get an error: evaluating artifact_jump ??? Error using ==> feval Undefined function or method 'artifact_jump' for input arguments of type 'struct'. Error in ==> ft_rejectartifact at 257 cfg = feval(sprintf('artifact_%s', cfg.artfctdef.type{type}), cfg, data); It is important to note that this error only occurs when using the newest fieldtrip version. For previous versions it works without any problems. I have also tried multiple datasets, but the problem remains. data = fsample: 1200 grad: [1x1 struct] sampleinfo: [180x2 double] trialinfo: [180x1 double] trial: {1x180 cell} time: {1x180 cell} label: {273x1 cell} cfg: [1x1 struct] and cfg.artfctdef = reject: 'complete' jump: [1x1 struct] muscle: [1x1 struct] type: {2x1 cell} minaccepttim: 0.1000 crittoilim: [] feedback: 'no' Thanks in advance! Best, Izabela From jan.schoffelen at donders.ru.nl Tue Aug 6 13:13:09 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 6 Aug 2013 13:13:09 +0200 Subject: [FieldTrip] Error in ft_rejectartifact for the newest fieldtrip version In-Reply-To: <9532B831-AB8E-4EBC-A984-5A3783E5313D@mpi.nl> References: <9532B831-AB8E-4EBC-A984-5A3783E5313D@mpi.nl> Message-ID: Hi Izabela, This is indeed a bug. We reorganized our compat-directory, that is dealing with backward compatibility issues. One of these issues was to support backward compatibility for calling ft-functions without the ft_prefix. E.g. calling freqanalysis should redirect to a call to ft_freqanalysis. With this feature removed, ft_rejectartifact cannot execute artifact_xxx, because it is not redirected anymore to ft_artifact_xxx. I have fixed this. It should be available within 15 minutes on the DCCN Fieldtrip version, and in the download version as of tonight. Thanks for reporting, Jan-Mathijs On Aug 6, 2013, at 12:10 PM, Izabela Mikula wrote: > Dear all, > I was wondering if any of you have ever encountered similar problem and might know if I'm doing something wrong or it is a bug.. > > I have tried using (my old scripts for preprocessing) ft_rejectartifact(cfg, data) but I get an error: > > evaluating artifact_jump > ??? Error using ==> feval > Undefined function or method 'artifact_jump' for input arguments of type 'struct'. > > Error in ==> ft_rejectartifact at 257 > cfg = feval(sprintf('artifact_%s', cfg.artfctdef.type{type}), cfg, data); > > It is important to note that this error only occurs when using the newest fieldtrip version. For previous versions it works without any problems. I have also tried multiple datasets, but the problem remains. > > data = > > fsample: 1200 > grad: [1x1 struct] > sampleinfo: [180x2 double] > trialinfo: [180x1 double] > trial: {1x180 cell} > time: {1x180 cell} > label: {273x1 cell} > cfg: [1x1 struct] > > and > > cfg.artfctdef = > > reject: 'complete' > jump: [1x1 struct] > muscle: [1x1 struct] > type: {2x1 cell} > minaccepttim: 0.1000 > crittoilim: [] > feedback: 'no' > > Thanks in advance! > > Best, > Izabela > > > _______________________________________________ > 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 ben.vanlier at bsse.ethz.ch Tue Aug 6 17:56:55 2013 From: ben.vanlier at bsse.ethz.ch (van Lier Ben) Date: Tue, 6 Aug 2013 15:56:55 +0000 Subject: [FieldTrip] from trials to continuous and an error in selfromraw Message-ID: Hi guys, for testing purposes im trying to use data in trials as one continuous piece of data. when i do freqanalysis with cfg.trials = 'all' and then singleplotTFR, i get to see only 1 trial. it should plot the spectra of all of them right? i do use cfg.continuous = yes i can tell it is processing all the trials in the command window feedback and databrowser is putting them together fine. i guess related, when i do cfg.trials = '1' (or any) and then freqanalysis it gives me the following error: -------------------------- Error using selfromraw (line 13) incorrect specification of requested repetitions Error in ft_selectdata_old (line 547) data = selfromraw(data, 'rpt', selrpt); Error in ft_selectdata (line 45) [varargout{1:nargout}] = ft_selectdata_old(varargin{:}); Error in ft_freqanalysis (line 225) data = ft_selectdata(data, 'rpt', cfg.trials); ---------------------------- i tried with data coming from ft_appendata (2 copies of the same file) and also with ft_definetrial from one continuous file. i am using the version of 5 aug 13 anyone knows whats going wrong? cheers Ben From eelke.spaak at donders.ru.nl Tue Aug 6 19:44:33 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 6 Aug 2013 19:44:33 +0200 Subject: [FieldTrip] from trials to continuous and an error in selfromraw In-Reply-To: References: Message-ID: Hi Ben, The cfg.trials option for ft_freqanalysis refers to which trials should be used in the computation of the output. By default, ft_freqanalysis returns the average over all those trials. If you want to get estimates for each individual trial, you should specify cfg.keeptrials = 'yes'. (See also http://fieldtrip.fcdonders.nl/reference/ft_freqanalysis .) I am not sure if ft_singleplotTFR will give you plots for individual trials, though; I think it will do the averaging anyway. To get individual trial plots, you probably have to call the plotting function several times with cfg.trials = 1, 2, 3, etc. Regarding cfg.trials = '1', it is important to use just a regular scalar quantity, and not a string, so cfg.trials = 1. Best, Eelke On 6 August 2013 17:56, van Lier Ben wrote: > Hi guys, > > for testing purposes im trying to use data in trials as one continuous piece of data. when i do freqanalysis with cfg.trials = 'all' and then singleplotTFR, i get to see only 1 trial. it should plot the spectra of all of them right? i do use cfg.continuous = yes > i can tell it is processing all the trials in the command window feedback and databrowser is putting them together fine. > > i guess related, when i do cfg.trials = '1' (or any) and then freqanalysis it gives me the following error: > > -------------------------- > Error using selfromraw (line 13) > incorrect specification of requested repetitions > > Error in ft_selectdata_old (line 547) > data = selfromraw(data, 'rpt', selrpt); > > Error in ft_selectdata (line 45) > [varargout{1:nargout}] = ft_selectdata_old(varargin{:}); > > Error in ft_freqanalysis (line 225) > data = ft_selectdata(data, 'rpt', cfg.trials); > ---------------------------- > > i tried with data coming from ft_appendata (2 copies of the same file) and also with ft_definetrial from one continuous file. > > i am using the version of 5 aug 13 > > anyone knows whats going wrong? > > cheers > Ben > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From haristz at gmail.com Tue Aug 6 20:24:55 2013 From: haristz at gmail.com (Charidimos Tzagarakis) Date: Tue, 6 Aug 2013 13:24:55 -0500 Subject: [FieldTrip] question about virtual electrode MNI coordinates Message-ID: Hi there, I have a question regarding virtual electrodes: How can I double check that the MNI coordinates that I enter are correctly interpreted? More specifically: I have followed the the extended beamforming tutorial in the "Appendix" and have been able to transpose it to my data (I have 4D/BTi MEG files and Dicom mri volumes).The part I am not certain about is the call to the LCMV beamformer. Here it is in my case ( I just want to get the voxel were the power is max in the previous analysis): cfg = []; cfg.method = 'lcmv'; cfg.vol = volfcm; cfg.grid.pos = source_diff.pos(maxpowindx, :); cfg.grid.inside = 1:size(cfg.grid.pos, 1); cfg.grid.outside = []; cfg.grad=senscm source_idx = ft_sourceanalysis(cfg, tlock); My headmodel does not include MEG channel information so I need to also define the cfg.grad parameter. What I don't understand is how cfg.grid.pos (which is in MNI coordinates as per the previous part of the tutorial) can be correctly applied to the coordinates of the headmodel and the channels since these 2 are not in MNI coordinates (in my case they are in 4d/Bti coordinates and rescaled to cm).In the previous part of the tutorial this is (if I understand correctly) accomplished because the leadfield used when calling ft_sourceanalysis was created using and MNI-warped template. I don't see where the equivalent part is when estimating the virtual electrode though. Any advice you may have would be much appreciated. Best, Haris Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych University of Minnesota Dept of Neuroscience and Brain Sciences Center -------------- next part -------------- An HTML attachment was scrubbed... URL: From franziska.bilger at uni-ulm.de Wed Aug 7 11:23:50 2013 From: franziska.bilger at uni-ulm.de (franziska.bilger at uni-ulm.de) Date: Wed, 07 Aug 2013 11:23:50 +0200 Subject: [FieldTrip] topoplotER - how to plot a selection of channels ? Message-ID: <20130807112350.i24h5npq80sgscws@imap.uni-ulm.de> Dear subscribers, I´m using fieldtrip to analyze the data for my bachelor thesis (topic: motor imagery in patientens in vegetative state) and I would be happy to get some help concerning the function ft_topoplotER. Originally, my data derives from a 256-channel system, but I only like to plot a selection of 60 channels above the motor cortex. This is my Region of Interest. When I´m now plotting the data from these 60 channels with ft_topoplotER I receive a figure, which shows the plotted activation over the whole cortex. My Question: Is there a possibility to plot only the activation in my Region of Interest/over the selected 60 channels above the motor cortex? This would result in a figure where there´s only activation shown over the motor cortex and the rest of the plot is blank/white. Thank you very much! Kind regards, Franziska From jm.horschig at donders.ru.nl Wed Aug 7 11:41:26 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 07 Aug 2013 11:41:26 +0200 Subject: [FieldTrip] topoplotER - how to plot a selection of channels ? In-Reply-To: <20130807112350.i24h5npq80sgscws@imap.uni-ulm.de> References: <20130807112350.i24h5npq80sgscws@imap.uni-ulm.de> Message-ID: <52021646.4050203@donders.ru.nl> Hi Franziska, check out the help of ft_topoplotER and what options there are for cfg.interpolation, one of these does what you want (afair 'cubic'). An alternative would be to set datapoints of all irrelevant channels to nan and then use cfg.interpolatenan = 'no', but the former suggestion is cleaner/better/easier than the latter. Good luck with writing your thesis! Best, Jörm On 8/7/2013 11:23 AM, franziska.bilger at uni-ulm.de wrote: > Dear subscribers, > > I´m using fieldtrip to analyze the data for my bachelor thesis (topic: > motor imagery in patientens in vegetative state) and I would be happy > to get some help concerning the function ft_topoplotER. > > Originally, my data derives from a 256-channel system, but I only like > to plot a selection of 60 channels above the motor cortex. > This is my Region of Interest. > When I´m now plotting the data from these 60 channels with > ft_topoplotER I receive a figure, which shows the plotted activation > over the whole cortex. > > My Question: Is there a possibility to plot only the activation in my > Region of Interest/over the selected 60 channels above the motor cortex? > > This would result in a figure where there´s only activation shown over > the motor cortex and the rest of the plot is blank/white. > > Thank you very much! > > Kind regards, > Franziska > > > > _______________________________________________ > 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 ben.vanlier at bsse.ethz.ch Wed Aug 7 13:00:31 2013 From: ben.vanlier at bsse.ethz.ch (van Lier Ben) Date: Wed, 7 Aug 2013 11:00:31 +0000 Subject: [FieldTrip] from trials to continuous and an error in selfromraw In-Reply-To: References: Message-ID: Hi Eelke, thanks. its the little things you miss so cfg.trials = 1 works ofcourse :) for plotting all the trials in a continuous spectrum i just merge them into 1 big trial first cfg = []; cfg.trl = [1 max(max(data.sampleinfo)) 0]; data = ft_redefinetrial(cfg, data); perfect for my purposes, im trying to reanalyze old recordings chopped into several files but ft_append puts them in separate trials. liking fieldtrip alot so far, very flexible :) cheers Ben From jm.horschig at donders.ru.nl Wed Aug 7 14:52:32 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 07 Aug 2013 14:52:32 +0200 Subject: [FieldTrip] question about virtual electrode MNI coordinates In-Reply-To: References: Message-ID: <52024310.1020109@donders.ru.nl> Dear Charidimos, thanks very much for pointing to this, it is indeed an error in the appendix of the tutorial. cfg.grid.pos should be based on the subject-specific MRI or sourcemodel. So, correctly it should say that you need to load sourcemodel.mat (i.e. subject specific grid) and then use sourcemodel.pos(maxpowindx, :) The rationale in principle is that the warped grid has the same size and is indexed the same as the original grid; that is why you can use the index variable obtained from the MNI-warped source reconstructed data. The virtual channel reconstruction should however still be done in whatever coordinate system the subject's anatomical data is in. I will update the appendix accordingly. Best, Jörn On 8/6/2013 8:24 PM, Charidimos Tzagarakis wrote: > Hi there, > I have a question regarding virtual electrodes: How can I double check > that the MNI coordinates that I enter are correctly interpreted? > More specifically: > I have followed the the extended beamforming tutorial in the > "Appendix" and have been able to transpose it to my data (I have > 4D/BTi MEG files and Dicom mri volumes).The part I am not certain > about is the call to the LCMV beamformer. > Here it is in my case ( I just want to get the voxel were the power is > max in the previous analysis): > cfg = []; > cfg.method = 'lcmv'; > cfg.vol = volfcm; > cfg.grid.pos = source_diff.pos(maxpowindx, :); > cfg.grid.inside = 1:size(cfg.grid.pos, 1); > cfg.grid.outside = []; > cfg.grad=senscm > source_idx = ft_sourceanalysis(cfg, tlock); > My headmodel does not include MEG channel information so I need to > also define the cfg.grad parameter. What I don't understand is how > cfg.grid.pos (which is in MNI coordinates as per the previous part of > the tutorial) can be correctly applied to the coordinates of the > headmodel and the channels since these 2 are not in MNI coordinates > (in my case they are in 4d/Bti coordinates and rescaled to cm).In the > previous part of the tutorial this is (if I understand correctly) > accomplished because the leadfield used when calling ft_sourceanalysis > was created using and MNI-warped template. I don't see where the > equivalent part is when estimating the virtual electrode though. > Any advice you may have would be much appreciated. > Best, > Haris > > > Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych > University of Minnesota Dept of Neuroscience and Brain Sciences Center > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From annevanhoogmoed at email.arizona.edu Thu Aug 8 05:51:47 2013 From: annevanhoogmoed at email.arizona.edu (van Hoogmoed, Anne H - (annevanhoogmoed)) Date: Thu, 8 Aug 2013 03:51:47 +0000 Subject: [FieldTrip] reading in and segmenting Netstation data Message-ID: Dear all, I'm using Fieldtrip to analyze my Netstation data. The problem is that the segmented data (incl triggers) are shifted in Fieldtrip as compared to the Netstation analysis. I've checked several things: - The events are the same in Netstation and Fieldtrip - The raw data look the same in both programs - Fieldtrip produces the right trl based on the triggers. The script I'm using is this: cfg = []; cfg.dataset = 'c007_raw'; cfg.continuous = 'yes'; data_eeg = ft_preprocessing(cfg); hdr = ft_read_header('c007_raw'); event = ft_read_event('c007_raw'); cfg = []; cfg.trialfun = 'trialfun_first_enc'; cfg_trials = ft_definetrial(cfg); data_trials = ft_redefinetrial(cfg_trials, data_eeg); The trialfun I'm using is this: function [trl, event] = trialfun_first(cfg) load event; load hdr; value = [event.value]; sample = [event.sample]; % determine the number of samples before and after the trigger pretrig = -100; % = 200 ms posttrig = 400; % = 800 ms % for each trigger trl = []; for j = 1:length(event) if (strcmp(event(1,j).value, '+Lrt') || strcmp(event(1,j).value, '+OOt')) || strcmp(event(1,j).value, '+SOt') trlbegin = event(1,j).sample + pretrig; trlend = event(1,j).sample + posttrig; offset = pretrig; newtrl = [trlbegin trlend offset]; trl = [trl; newtrl]; end j = j + 1; end Does anyone know what I'm doing wrong here? Thank you very much for your help! Kind regards, Anne Anne van Hoogmoed Down Syndrome Research Group Department of Psychology, University of Arizona -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Thu Aug 8 08:12:42 2013 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Thu, 8 Aug 2013 08:12:42 +0200 (CEST) Subject: [FieldTrip] reading in and segmenting Netstation data In-Reply-To: Message-ID: <1178733115.2232641.1375942362693.JavaMail.root@sculptor.zimbra.ru.nl> Hi Anne, What do you mean by "shifted"? Time samples mismatch might be? I don't see what's going wrong with the code you pasted but it'd be nice if you could file a bug (I'll assign to me) with a piece of preprocessed data with fieldtrip and a plot about how data looks like with Netstation to have a bit more info. best, Diego ps : do you have a non-integer eeg sampling rate, like 511.3Hz? ----- Original Message ----- > From: "van Hoogmoed , Anne H - ( annevanhoogmoed )" < annevanhoogmoed > @email. arizona . edu > > To: fieldtrip @science. ru . nl > Sent: Thursday, 8 August, 2013 5:51:47 AM > Subject: [ FieldTrip ] reading in and segmenting Netstation data > Dear all, > I'm using Fieldtrip to analyze my Netstation data. The problem is that > the segmented data (incl triggers) are shifted in Fieldtrip as > compared to the Netstation analysis. > I've checked several things: > - The events are the same in Netstation and Fieldtrip > - The raw data look the same in both programs > - Fieldtrip produces the right trl based on the triggers. > The script I'm using is this: > cfg = []; > cfg . dataset = 'c007_ raw' ; > cfg .continuous = 'yes' ; > data_ eeg = ft_ preprocessing ( cfg ); > hdr = ft_read_header( 'c007_ raw' ); > event = ft_read_event( 'c007_ raw' ); > cfg = []; > cfg . trialfun = 'trialfun _first_ enc' ; > cfg _trials = ft_ definetrial ( cfg ); > data_trials = ft_ redefinetrial ( cfg _trials, data_ eeg ); > The trialfun I'm using is this: > function [ trl , event] = trialfun _first( cfg ) > load event ; > load hdr ; > value = [event.value]; > sample = [event.sample]; > % determine the number of samples before and after the trigger > pretrig = -100; % = 200 ms > posttrig = 400; % = 800 ms > % for each trigger > trl = []; > for j = 1:length(event) > if ( strcmp (event(1,j).value, '+ Lrt' ) || strcmp (event(1,j).value, > '+ OOt' )) || strcmp (event(1,j).value, '+ SOt' ) > trlbegin = event(1,j).sample + pretrig ; > trlend = event(1,j).sample + posttrig ; > offset = pretrig ; > newtrl = [ trlbegin trlend offset]; > trl = [ trl ; newtrl ]; > end > j = j + 1; > end > Does anyone know what I'm doing wrong here? > Thank you very much for your help! > Kind regards, > Anne > Anne van Hoogmoed > Down Syndrome Research Group > Department of Psychology, University of Arizona > _______________________________________________ > fieldtrip mailing list > fieldtrip @ donders . ru . nl > http ://mailman.science. ru . nl /mailman/ listinfo / fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http :// www . ru . nl /people/ donders /lozano-soldevilla-d/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From elisa at csl.psychol.cam.ac.uk Thu Aug 8 12:23:53 2013 From: elisa at csl.psychol.cam.ac.uk (Elisa Carrus) Date: Thu, 08 Aug 2013 11:23:53 +0100 Subject: [FieldTrip] question about virtual electrode MNI coordinates In-Reply-To: <52024310.1020109@donders.ru.nl> References: <52024310.1020109@donders.ru.nl> Message-ID: <520371B9.8060101@csl.psychol.cam.ac.uk> Hi all, From the previous email it seems that I'm doing something wrong then. I have previously used the MNI-aligned subject grid (warped template) for the positions, hence I didn't encounter any problem. However, this seems to be wrong, as Jorn suggested. The question is the following: The sourcediff.avg.pow is produced using the warped MNI template, therefore the grid positions and indexes will be different from the subject-specific MRI. Specifically in my case, the warped template has 11000 x 3 pos, whereas the subject-specific has 2652 x 3. My question is, when I therefore index the maxpos using: [maxval, maxind] = max(sourcediff.avg.pow), my index is 3171, which exceeds the matrix dimensions of the subject-specific MRI (2652). Which step am I missing? Thanks for your help in advance, Elisa On 07/08/2013 13:52, "Jörn M. Horschig" wrote: > Dear Charidimos, > > thanks very much for pointing to this, it is indeed an error in the > appendix of the tutorial. cfg.grid.pos should be based on the > subject-specific MRI or sourcemodel. So, correctly it should say that > you need to load sourcemodel.mat (i.e. subject specific grid) and then > use sourcemodel.pos(maxpowindx, :) > The rationale in principle is that the warped grid has the same size > and is indexed the same as the original grid; that is why you can use > the index variable obtained from the MNI-warped source reconstructed > data. The virtual channel reconstruction should however still be done > in whatever coordinate system the subject's anatomical data is in. I > will update the appendix accordingly. > > Best, > Jörn > > On 8/6/2013 8:24 PM, Charidimos Tzagarakis wrote: >> Hi there, >> I have a question regarding virtual electrodes: How can I double >> check that the MNI coordinates that I enter are correctly interpreted? >> More specifically: >> I have followed the the extended beamforming tutorial in the >> "Appendix" and have been able to transpose it to my data (I have >> 4D/BTi MEG files and Dicom mri volumes).The part I am not certain >> about is the call to the LCMV beamformer. >> Here it is in my case ( I just want to get the voxel were the power >> is max in the previous analysis): >> cfg = []; >> cfg.method = 'lcmv'; >> cfg.vol = volfcm; >> cfg.grid.pos = source_diff.pos(maxpowindx, :); >> cfg.grid.inside = 1:size(cfg.grid.pos, 1); >> cfg.grid.outside = []; >> cfg.grad=senscm >> source_idx = ft_sourceanalysis(cfg, tlock); >> My headmodel does not include MEG channel information so I need to >> also define the cfg.grad parameter. What I don't understand is how >> cfg.grid.pos (which is in MNI coordinates as per the previous part of >> the tutorial) can be correctly applied to the coordinates of the >> headmodel and the channels since these 2 are not in MNI coordinates >> (in my case they are in 4d/Bti coordinates and rescaled to cm).In the >> previous part of the tutorial this is (if I understand correctly) >> accomplished because the leadfield used when calling >> ft_sourceanalysis was created using and MNI-warped template. I don't >> see where the equivalent part is when estimating the virtual >> electrode though. >> Any advice you may have would be much appreciated. >> Best, >> Haris >> >> >> Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych >> University of Minnesota Dept of Neuroscience and Brain Sciences Center >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail:jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web:http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Aug 8 13:45:09 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 08 Aug 2013 13:45:09 +0200 Subject: [FieldTrip] question about virtual electrode MNI coordinates In-Reply-To: <520371B9.8060101@csl.psychol.cam.ac.uk> References: <52024310.1020109@donders.ru.nl> <520371B9.8060101@csl.psychol.cam.ac.uk> Message-ID: <520384C5.80703@donders.ru.nl> Dear Elisa, hard to tell, because you are not telling us exactly what you are doing :) The idea in the extended beamforming tutorial is that you first create an MNI template sourcemodel (or grid). Subsequently, you use exactly this grid and spatially transform it such that it fits to the subject-specific brain, based on the MRI. After following these steps, by definition, the number of grid points in the subject-specific grid and the MNI grid are the same - just the place where the grid points end up did change. (Otherwise, it would also not be possible to replace the .pos field from the source-reconstructed data by the template grid, as being done in the plotting part of the tutorial). The problem in the tutorial was exactly this replacement of the position description (which iself can be a perfectly fine step as e.g. earlier in the tutorial). Since we provide a sourcemodel based on the subject's mri, we need to specify the position based on that mri/sourcemodel and not based on the MNI template. You, obviously, do not have the same number of grid points for the subject-specific sourcemodel as in the template sourcemodel. I cannot guarantee that what you did is correct, but at least I can tell you that what you did is not affects by this - else you would have had the same number of elements for both sourcemodels. I cross my fingers that you're doing the right thing :) Best, Jörn On 8/8/2013 12:23 PM, Elisa Carrus wrote: > Hi all, > > From the previous email it seems that I'm doing something wrong then. > I have previously used the MNI-aligned subject grid (warped template) > for the positions, hence I didn't encounter any problem. However, this > seems to be wrong, as Jorn suggested. The question is the following: > > The sourcediff.avg.pow is produced using the warped MNI template, > therefore the grid positions and indexes will be different from the > subject-specific MRI. Specifically in my case, the warped template has > 11000 x 3 pos, whereas the subject-specific has 2652 x 3. > My question is, when I therefore index the maxpos using: > > [maxval, maxind] = max(sourcediff.avg.pow), my index is 3171, which > exceeds the matrix dimensions of the subject-specific MRI (2652). > > Which step am I missing? > > Thanks for your help in advance, > Elisa > > > > > > > On 07/08/2013 13:52, "Jörn M. Horschig" wrote: >> Dear Charidimos, >> >> thanks very much for pointing to this, it is indeed an error in the >> appendix of the tutorial. cfg.grid.pos should be based on the >> subject-specific MRI or sourcemodel. So, correctly it should say that >> you need to load sourcemodel.mat (i.e. subject specific grid) and >> then use sourcemodel.pos(maxpowindx, :) >> The rationale in principle is that the warped grid has the same size >> and is indexed the same as the original grid; that is why you can use >> the index variable obtained from the MNI-warped source reconstructed >> data. The virtual channel reconstruction should however still be done >> in whatever coordinate system the subject's anatomical data is in. I >> will update the appendix accordingly. >> >> Best, >> Jörn >> >> On 8/6/2013 8:24 PM, Charidimos Tzagarakis wrote: >>> Hi there, >>> I have a question regarding virtual electrodes: How can I double >>> check that the MNI coordinates that I enter are correctly interpreted? >>> More specifically: >>> I have followed the the extended beamforming tutorial in the >>> "Appendix" and have been able to transpose it to my data (I have >>> 4D/BTi MEG files and Dicom mri volumes).The part I am not certain >>> about is the call to the LCMV beamformer. >>> Here it is in my case ( I just want to get the voxel were the power >>> is max in the previous analysis): >>> cfg = []; >>> cfg.method = 'lcmv'; >>> cfg.vol = volfcm; >>> cfg.grid.pos = source_diff.pos(maxpowindx, :); >>> cfg.grid.inside = 1:size(cfg.grid.pos, 1); >>> cfg.grid.outside = []; >>> cfg.grad=senscm >>> source_idx = ft_sourceanalysis(cfg, tlock); >>> My headmodel does not include MEG channel information so I need to >>> also define the cfg.grad parameter. What I don't understand is how >>> cfg.grid.pos (which is in MNI coordinates as per the previous part >>> of the tutorial) can be correctly applied to the coordinates of the >>> headmodel and the channels since these 2 are not in MNI coordinates >>> (in my case they are in 4d/Bti coordinates and rescaled to cm).In >>> the previous part of the tutorial this is (if I understand >>> correctly) accomplished because the leadfield used when calling >>> ft_sourceanalysis was created using and MNI-warped template. I don't >>> see where the equivalent part is when estimating the virtual >>> electrode though. >>> Any advice you may have would be much appreciated. >>> Best, >>> Haris >>> >>> >>> Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych >>> University of Minnesota Dept of Neuroscience and Brain Sciences Center >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail:jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web:http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From K.Kalogianni at tudelft.nl Fri Aug 9 09:59:18 2013 From: K.Kalogianni at tudelft.nl (Konstantina Kalogianni) Date: Fri, 9 Aug 2013 07:59:18 +0000 Subject: [FieldTrip] ft_sourcegrandaverage & grid computation Message-ID: <4DF682D3A10EAC46B462A46E16F0B049128EE308@SRV364.tudelft.net> Dear fieldtripers, I have experienced a problem with ft_sourcegrandaverage and the calculation of my grid and I want to ask for help. The error I get is the following :different grid locations in source reconstructions. I will describe briefly the processing to give you a better idea about my error. For every subject I have 6 conditions and I want to average all subjects per condition. After preprocessing I calculate the covariance matrix and then I use the MUSIC algorithm for my sources. For the grid calculation I use a default MRI a default VOL and a default electrodes' positions. However for every subject the grid is not identical since cfg.channel in ft_prepare_leadfield is dependent on the channels I've discarded as noisy during the preprocessing. By the way for the grid calculation I had to change the order of cfg.elec because it didn't agree with the order of cfg,channel in my data. So apparently I end up with a different grid for every subject but still I want to average all of them per condition. Do I have to use another function to average my sources in this case? Because the grid would never be identical among subjects. I hope somebody out there experienced that before and can probably help me. Thank you. Konstantina [Nadia] Kalogianni PhD candidate, TU Delft -------------- next part -------------- An HTML attachment was scrubbed... URL: From elisa at csl.psychol.cam.ac.uk Fri Aug 9 11:25:15 2013 From: elisa at csl.psychol.cam.ac.uk (Elisa Carrus) Date: Fri, 09 Aug 2013 10:25:15 +0100 Subject: [FieldTrip] question about virtual electrode MNI coordinates In-Reply-To: <520384C5.80703@donders.ru.nl> References: <52024310.1020109@donders.ru.nl> <520371B9.8060101@csl.psychol.cam.ac.uk> <520384C5.80703@donders.ru.nl> Message-ID: <5204B57B.6040004@csl.psychol.cam.ac.uk> Dear Jorn, ah, I apologise for not writing a complete email! The good news is that I've done things correctly so far, as I do have the same number of grid points in both the subject-specific and template, as expected :) I gave you the wrong indices because I thought that in your previous email you referred to the MRI rather than the sourcemodel. My bad. Sorry for the misunderstanding and thanks a lot for explaining this again! Best, Elisa On 08/08/2013 12:45, "Jörn M. Horschig" wrote: > Dear Elisa, > > hard to tell, because you are not telling us exactly what you are > doing :) > The idea in the extended beamforming tutorial is that you first create > an MNI template sourcemodel (or grid). Subsequently, you use exactly > this grid and spatially transform it such that it fits to the > subject-specific brain, based on the MRI. After following these steps, > by definition, the number of grid points in the subject-specific grid > and the MNI grid are the same - just the place where the grid points > end up did change. (Otherwise, it would also not be possible to > replace the .pos field from the source-reconstructed data by the > template grid, as being done in the plotting part of the tutorial). > The problem in the tutorial was exactly this replacement of the > position description (which iself can be a perfectly fine step as e.g. > earlier in the tutorial). Since we provide a sourcemodel based on the > subject's mri, we need to specify the position based on that > mri/sourcemodel and not based on the MNI template. > > You, obviously, do not have the same number of grid points for the > subject-specific sourcemodel as in the template sourcemodel. I cannot > guarantee that what you did is correct, but at least I can tell you > that what you did is not affects by this - else you would have had the > same number of elements for both sourcemodels. I cross my fingers that > you're doing the right thing :) > > Best, > Jörn > > On 8/8/2013 12:23 PM, Elisa Carrus wrote: >> Hi all, >> >> From the previous email it seems that I'm doing something wrong then. >> I have previously used the MNI-aligned subject grid (warped template) >> for the positions, hence I didn't encounter any problem. However, >> this seems to be wrong, as Jorn suggested. The question is the following: >> >> The sourcediff.avg.pow is produced using the warped MNI template, >> therefore the grid positions and indexes will be different from the >> subject-specific MRI. Specifically in my case, the warped template >> has 11000 x 3 pos, whereas the subject-specific has 2652 x 3. >> My question is, when I therefore index the maxpos using: >> >> [maxval, maxind] = max(sourcediff.avg.pow), my index is 3171, which >> exceeds the matrix dimensions of the subject-specific MRI (2652). >> >> Which step am I missing? >> >> Thanks for your help in advance, >> Elisa >> >> >> >> >> >> >> On 07/08/2013 13:52, "Jörn M. Horschig" wrote: >>> Dear Charidimos, >>> >>> thanks very much for pointing to this, it is indeed an error in the >>> appendix of the tutorial. cfg.grid.pos should be based on the >>> subject-specific MRI or sourcemodel. So, correctly it should say >>> that you need to load sourcemodel.mat (i.e. subject specific grid) >>> and then use sourcemodel.pos(maxpowindx, :) >>> The rationale in principle is that the warped grid has the same size >>> and is indexed the same as the original grid; that is why you can >>> use the index variable obtained from the MNI-warped source >>> reconstructed data. The virtual channel reconstruction should >>> however still be done in whatever coordinate system the subject's >>> anatomical data is in. I will update the appendix accordingly. >>> >>> Best, >>> Jörn >>> >>> On 8/6/2013 8:24 PM, Charidimos Tzagarakis wrote: >>>> Hi there, >>>> I have a question regarding virtual electrodes: How can I double >>>> check that the MNI coordinates that I enter are correctly interpreted? >>>> More specifically: >>>> I have followed the the extended beamforming tutorial in the >>>> "Appendix" and have been able to transpose it to my data (I have >>>> 4D/BTi MEG files and Dicom mri volumes).The part I am not certain >>>> about is the call to the LCMV beamformer. >>>> Here it is in my case ( I just want to get the voxel were the power >>>> is max in the previous analysis): >>>> cfg = []; >>>> cfg.method = 'lcmv'; >>>> cfg.vol = volfcm; >>>> cfg.grid.pos = source_diff.pos(maxpowindx, :); >>>> cfg.grid.inside = 1:size(cfg.grid.pos, 1); >>>> cfg.grid.outside = []; >>>> cfg.grad=senscm >>>> source_idx = ft_sourceanalysis(cfg, tlock); >>>> My headmodel does not include MEG channel information so I need to >>>> also define the cfg.grad parameter. What I don't understand is how >>>> cfg.grid.pos (which is in MNI coordinates as per the previous part >>>> of the tutorial) can be correctly applied to the coordinates of the >>>> headmodel and the channels since these 2 are not in MNI coordinates >>>> (in my case they are in 4d/Bti coordinates and rescaled to cm).In >>>> the previous part of the tutorial this is (if I understand >>>> correctly) accomplished because the leadfield used when calling >>>> ft_sourceanalysis was created using and MNI-warped template. I >>>> don't see where the equivalent part is when estimating the virtual >>>> electrode though. >>>> Any advice you may have would be much appreciated. >>>> Best, >>>> Haris >>>> >>>> >>>> Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych >>>> University of Minnesota Dept of Neuroscience and Brain Sciences Center >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> -- >>> Jörn M. Horschig >>> PhD Student >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> Neuronal Oscillations Group >>> FieldTrip Development Team >>> >>> P.O. Box 9101 >>> NL-6500 HB Nijmegen >>> The Netherlands >>> >>> Contact: >>> E-Mail:jm.horschig at donders.ru.nl >>> Tel: +31-(0)24-36-68493 >>> Web:http://www.ru.nl/donders >>> >>> Visiting address: >>> Trigon, room 2.30 >>> Kapittelweg 29 >>> NL-6525 EN Nijmegen >>> The Netherlands >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail:jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web:http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > 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 g.dimitriadis at donders.ru.nl Fri Aug 9 17:22:50 2013 From: g.dimitriadis at donders.ru.nl (Dimitriadis, G. (George)) Date: Fri, 9 Aug 2013 17:22:50 +0200 (CEST) Subject: [FieldTrip] Error from postamble Message-ID: <1463263304.1956192.1376061770792.JavaMail.root@monoceros.zimbra.ru.nl> Hello guys, I seem to be getting an error relating to the generation of warnings withing the postamble. I am not doing anything that I haven't been doing for the past year. I had problems with the preamble (due to large file sizes) before and I am doing the cfg.stackcallinfo = 'no' trick. But now I am getting the following series of errors: --------------------------------------------------- Warning: '@(hObject,eventdata)mainRatAnalysisGUI('pushbutton_run_analysis_Callback',hObject,eventdata,guidata(hObject))' exceeds MATLAB's maximum name length of 63 characters and has been truncated to '@(hObject,eventdata)mainRatAnalysisGUI('pushbutton_run_analysis'. > In utilities/private/warning_once>fieldnameFromStack at 196 In utilities/private/warning_once at 123 In utilities/private/ft_postamble_history at 55 In ft_postamble at 55 In ft_preprocessing at 611 In gd_eri_preprocratdata at 71 In gd_eri_getratdatasignals at 39 In mainRatAnalysisGUI>pushbutton_run_analysis_Callback at 120 In gui_mainfcn at 96 In mainRatAnalysisGUI at 42 In @(hObject,eventdata)mainRatAnalysisGUI('pushbutton_run_analysis_Callback',hObject,eventdata,guidata(hObject)) Invalid field name: '@(hObject,eventdata)mainRatAnalysisGUI('pushbutton_run_analysis'. Error in warning_once>fieldnameFromStack (line 196) ft_previous_warnings.(stack(end).name) = []; % iteratively build up structure fields Error in warning_once (line 123) [tmpfname ft_default.warning.identifier line] = fieldnameFromStack(ft_default.warning.identifier); Error in ft_postamble_history (line 55) warning_once('-clear'); Error in ft_postamble (line 55) evalin('caller', ['ft_postamble_' cmd]); Error in ft_preprocessing (line 611) ft_postamble history data Error in gd_eri_preprocratdata (line 71) datacell{datindx}=ft_preprocessing(cfg_pp); Error in gd_eri_getratdatasignals (line 39) data=gd_eri_preprocratdata(cfg); Error in mainRatAnalysisGUI>pushbutton_run_analysis_Callback (line 120) data =gd_eri_getratdatasignals(cfg); Error in gui_mainfcn (line 96) feval(varargin{:}); Error in mainRatAnalysisGUI (line 42) gui_mainfcn(gui_State, varargin{:}); Error in @(hObject,eventdata)mainRatAnalysisGUI('pushbutton_run_analysis_Callback',hObject,eventdata,guidata(hObject)) Error while evaluating uicontrol Callback ---------------------------------------- I am calling my original function from within a gui. So it seems that in the postamble_history a warning gets generated which then throws an error for some reason I would really like not to have to find out by myself. Thanks for your time George Dimitriadis From r.cox at uva.nl Tue Aug 13 11:29:23 2013 From: r.cox at uva.nl (Roy Cox) Date: Tue, 13 Aug 2013 11:29:23 +0200 Subject: [FieldTrip] ft_freqstatistics Message-ID: Hi, Can anyone tell me how fieldtrip selects freq bins when calling ft_freqstatistics with cfg.frequency? That is, if I'm interested in two freq bands from, say, 10 to 20, and from 20 to 30 Hz, and I don't want a freq bin to be used twice, do I use cfg.frequency=[10 20] and cfg.frequency=[20 30]? Or would the freq bin closest to 20 be used twice? I guess I'm asking how precisely the find function (with arguments 'first', 'last') is applied. Best, 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 hweeling.lee at gmail.com Wed Aug 14 16:51:23 2013 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 14 Aug 2013 16:51:23 +0200 Subject: [FieldTrip] newbie Message-ID: Hi to all! I'm new to fieldtrip! I have a dataset that has been corrected for scanner artifacts and BC artifacts using Brainvision Analyser. I would like to export the corrected data as a .eeg file so that I can load the data onto Matlab and use fieldtrip to perform further analyses. However, I kept getting error messages from Matlab that the sub-file format is unsupported. I've been searching online the best way to export the corrected data from Brainvision Analyser, however, I could not find any solution at all. Would anyone please kindly instruct me the settings that I should have when I export the corrected data? Thanks! Best wishes, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From elisa at csl.psychol.cam.ac.uk Wed Aug 14 17:32:42 2013 From: elisa at csl.psychol.cam.ac.uk (Elisa Carrus) Date: Wed, 14 Aug 2013 16:32:42 +0100 Subject: [FieldTrip] newbie In-Reply-To: References: Message-ID: <520BA31A.9040803@csl.psychol.cam.ac.uk> Hi Hweeling, Welcome! Can you give us a bit more information about the script you used to load the data? I haven't used BrainVision before but you should be able to read the .eeg data directly from Fieldtrip http://fieldtrip.fcdonders.nl/dataformat Best, Elisa On 14/08/2013 15:51, Hwee Ling Lee wrote: > Hi to all! > > I'm new to fieldtrip! I have a dataset that has been corrected for > scanner artifacts and BC artifacts using Brainvision Analyser. I would > like to export the corrected data as a .eeg file so that I can load > the data onto Matlab and use fieldtrip to perform further analyses. > > However, I kept getting error messages from Matlab that the sub-file > format is unsupported. I've been searching online the best way to > export the corrected data from Brainvision Analyser, however, I could > not find any solution at all. > > Would anyone please kindly instruct me the settings that I should have > when I export the corrected data? > > Thanks! > > Best wishes, > 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 r.oostenveld at donders.ru.nl Wed Aug 14 21:34:02 2013 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 14 Aug 2013 21:34:02 +0200 Subject: [FieldTrip] newbie In-Reply-To: References: Message-ID: Hi Hweeling The channel level data in the BrainVision data file can be represented in ascii and binary format. Furthermore, the order can be one channel at a time or sample-by-sample. Finally there are different numeric precisions (integer, float, etc). This is something that you cannot see from the outside of the file, but if you open the *.vhdr file in a text editor you can see these details. Since there are so many possible combinations of these three factors, it is not difficult easy to support all possible variants. You could try storing the data as multiplexed and in single- or double-precision, which is the most common format. Otherwise, you can report it as feature request on http://bugzilla.fcdonders.nl and attach a small piece of data (with vhdr and vmrk file) there. best regards, Robert On 14 Aug 2013, at 16:51, Hwee Ling Lee wrote: > Hi to all! > > I'm new to fieldtrip! I have a dataset that has been corrected for scanner artifacts and BC artifacts using Brainvision Analyser. I would like to export the corrected data as a .eeg file so that I can load the data onto Matlab and use fieldtrip to perform further analyses. > > However, I kept getting error messages from Matlab that the sub-file format is unsupported. I've been searching online the best way to export the corrected data from Brainvision Analyser, however, I could not find any solution at all. > > Would anyone please kindly instruct me the settings that I should have when I export the corrected data? > > Thanks! > > Best wishes, > Hweeling > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From gopalar.ccf at gmail.com Wed Aug 14 22:58:34 2013 From: gopalar.ccf at gmail.com (Raghavan Gopalakrishnan) Date: Wed, 14 Aug 2013 16:58:34 -0400 Subject: [FieldTrip] Reading multiple NEX files Message-ID: I have multiple nex files that have LFP and spike data. I would like to read them and plot one raster, since the multple nex files are from same subject. ft_appendspike does not append data structures with same channel label. All my data structures from different nex files have same channel label. Any ideas? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Thu Aug 15 11:34:33 2013 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 15 Aug 2013 11:34:33 +0200 Subject: [FieldTrip] EEG sensor position layout Message-ID: Hi all! After performing ICA, I used the command to browse the data in component mode. However, I got a warning message: Warning: No layout specified - will try to construct one using sensor positions > In ft_databrowser at 217 Error using ft_databrowser (line 223) cannot infer sensor type I understand that one can manually create the layout, however, I was not sure how I can do it. Could someone please help? Thank you. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Thu Aug 15 12:45:51 2013 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Thu, 15 Aug 2013 12:45:51 +0200 Subject: [FieldTrip] EEG sensor position layout In-Reply-To: References: Message-ID: Dear Hweeling, You should indeed specify cfg.layout, naming the layout file for the data that you have. You can first check in the folder fieldtrip/template/layout to see if there is already an existing template that you can use. If not, please see ft_prepare_layout for more details. If you're still stuck, please ask again with more specific details on your layout. Best, Johanna 2013/8/15 Hwee Ling Lee > Hi all! > > After performing ICA, I used the command to browse the data in component > mode. > > However, I got a warning message: > > Warning: No layout specified - will try to construct one using sensor > positions > > In ft_databrowser at 217 > Error using ft_databrowser (line 223) > cannot infer sensor type > > I understand that one can manually create the layout, however, I was not > sure how I can do it. Could someone please help? > > Thank you. > > 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 hweeling.lee at gmail.com Thu Aug 15 13:21:19 2013 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 15 Aug 2013 13:21:19 +0200 Subject: [FieldTrip] EEG sensor position layout again Message-ID: Hi, A bit more details about my setup. I'm using a Easycap MRI compatible 128 channels cap. I tried to search for a layout on the templates/layout, and I found one that might closest fit to my needs ('QuikCap_NSL_128'). To view my components, I tried these series of commands: cfg = []; cfg.viewmode = 'component'; cfg.continuous = 'yes'; cfg.layout = ft_prepare_layout('QuikCap_NSL_128'); ft_databrowser(cfg,ic_data); However, I was prompted with error messages: Warning: Struct field assignment overwrites a value with class "char". See MATLAB R14SP2 Release Notes, Assigning Nonstructure Variables As Structures Displays Warning, for details. > In utilities\private\ft_preamble_provenance at 49 In ft_preamble at 54 In ft_prepare_layout at 91 Error using ft_prepare_layout (line 582) no layout detected, please specify cfg.layout Also when I tried the command, cfg = []; cfg.viewmode = 'component'; cfg.continuous = 'yes'; cfg.layout = 'QuikCap_NSL_128'; ft_databrowser(cfg,ic_data); I get this error message: Warning: could not open QuikCap_NSL_128 > In fileio\private\warning_once at 116 In fileio\private\filetype_check_header at 54 In ft_filetype at 328 In ft_prepare_layout at 253 In ft_databrowser at 226 Warning: could not determine filetype of QuikCap_NSL_128 > In fileio\private\warning_once at 116 In ft_filetype at 1115 In ft_prepare_layout at 253 In ft_databrowser at 226 creating layout from electrode file QuikCap_NSL_128 Error using ft_read_sens (line 68) file 'QuikCap_NSL_128' does not exist Error in ft_prepare_layout (line 275) lay = sens2lay(ft_read_sens(cfg.layout), cfg.rotate, cfg.projection, cfg.style, cfg.overlap); Error in ft_databrowser (line 226) cfg.layout = ft_prepare_layout(tmpcfg); Would anyone please help? Cheers, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at gmail.com Thu Aug 15 13:33:57 2013 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Thu, 15 Aug 2013 13:33:57 +0200 Subject: [FieldTrip] EEG sensor position layout again In-Reply-To: References: Message-ID: Hi Hweeling, Since it says that it cannot find the Quikcap file, it sounds like it's not on your path. Run ft_defaults on your Matlab command, then test if the file is on your path: >> ft_defaults >> which QuikCap_NSL_128.mat Assuming it finds the file on your path, then do you still get the browser error? Best, Johanna 2013/8/15 Hwee Ling Lee > Hi, > > A bit more details about my setup. > > I'm using a Easycap MRI compatible 128 channels cap. I tried to search for > a layout on the templates/layout, and I found one that might closest fit to > my needs ('QuikCap_NSL_128'). > To view my components, I tried these series of commands: > > cfg = []; > cfg.viewmode = 'component'; > cfg.continuous = 'yes'; > cfg.layout = ft_prepare_layout('QuikCap_NSL_128'); > ft_databrowser(cfg,ic_data); > > However, I was prompted with error messages: > Warning: Struct field assignment overwrites a value with class "char". See > MATLAB R14SP2 Release Notes, Assigning Nonstructure > Variables As Structures Displays Warning, for details. > > In utilities\private\ft_preamble_provenance at 49 > In ft_preamble at 54 > In ft_prepare_layout at 91 > Error using ft_prepare_layout (line 582) > no layout detected, please specify cfg.layout > > Also when I tried the command, > > cfg = []; > cfg.viewmode = 'component'; > cfg.continuous = 'yes'; > cfg.layout = 'QuikCap_NSL_128'; > ft_databrowser(cfg,ic_data); > > I get this error message: > Warning: could not open QuikCap_NSL_128 > > In fileio\private\warning_once at 116 > In fileio\private\filetype_check_header at 54 > In ft_filetype at 328 > In ft_prepare_layout at 253 > In ft_databrowser at 226 > Warning: could not determine filetype of QuikCap_NSL_128 > > In fileio\private\warning_once at 116 > In ft_filetype at 1115 > In ft_prepare_layout at 253 > In ft_databrowser at 226 > creating layout from electrode file QuikCap_NSL_128 > Error using ft_read_sens (line 68) > file 'QuikCap_NSL_128' does not exist > > Error in ft_prepare_layout (line 275) > lay = sens2lay(ft_read_sens(cfg.layout), cfg.rotate, cfg.projection, > cfg.style, cfg.overlap); > > Error in ft_databrowser (line 226) > cfg.layout = ft_prepare_layout(tmpcfg); > > > Would anyone please help? > > Cheers, > 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 hweeling.lee at gmail.com Thu Aug 15 13:59:17 2013 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 15 Aug 2013 13:59:17 +0200 Subject: [FieldTrip] EEG sensor position layout again In-Reply-To: References: Message-ID: Hi, It states that: 'QuikCap_NSL_128.mat' not found. However, when I checked fieldtrip/templates/layout, the mat file is stored in this folder. Cheers, Hweeling On 15 August 2013 13:33, Johanna Zumer wrote: > Hi Hweeling, > > Since it says that it cannot find the Quikcap file, it sounds like it's > not on your path. Run ft_defaults on your Matlab command, then test if > the file is on your path: > >> ft_defaults > >> which QuikCap_NSL_128.mat > > Assuming it finds the file on your path, then do you still get the browser > error? > > Best, > Johanna > > > 2013/8/15 Hwee Ling Lee > >> Hi, >> >> A bit more details about my setup. >> >> I'm using a Easycap MRI compatible 128 channels cap. I tried to search >> for a layout on the templates/layout, and I found one that might closest >> fit to my needs ('QuikCap_NSL_128'). >> To view my components, I tried these series of commands: >> >> cfg = []; >> cfg.viewmode = 'component'; >> cfg.continuous = 'yes'; >> cfg.layout = ft_prepare_layout('QuikCap_NSL_128'); >> ft_databrowser(cfg,ic_data); >> >> However, I was prompted with error messages: >> Warning: Struct field assignment overwrites a value with class "char". >> See MATLAB R14SP2 Release Notes, Assigning Nonstructure >> Variables As Structures Displays Warning, for details. >> > In utilities\private\ft_preamble_provenance at 49 >> In ft_preamble at 54 >> In ft_prepare_layout at 91 >> Error using ft_prepare_layout (line 582) >> no layout detected, please specify cfg.layout >> >> Also when I tried the command, >> >> cfg = []; >> cfg.viewmode = 'component'; >> cfg.continuous = 'yes'; >> cfg.layout = 'QuikCap_NSL_128'; >> ft_databrowser(cfg,ic_data); >> >> I get this error message: >> Warning: could not open QuikCap_NSL_128 >> > In fileio\private\warning_once at 116 >> In fileio\private\filetype_check_header at 54 >> In ft_filetype at 328 >> In ft_prepare_layout at 253 >> In ft_databrowser at 226 >> Warning: could not determine filetype of QuikCap_NSL_128 >> > In fileio\private\warning_once at 116 >> In ft_filetype at 1115 >> In ft_prepare_layout at 253 >> In ft_databrowser at 226 >> creating layout from electrode file QuikCap_NSL_128 >> Error using ft_read_sens (line 68) >> file 'QuikCap_NSL_128' does not exist >> >> Error in ft_prepare_layout (line 275) >> lay = sens2lay(ft_read_sens(cfg.layout), cfg.rotate, cfg.projection, >> cfg.style, cfg.overlap); >> >> Error in ft_databrowser (line 226) >> cfg.layout = ft_prepare_layout(tmpcfg); >> >> >> Would anyone please help? >> >> Cheers, >> 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 johanna.zumer at gmail.com Thu Aug 15 14:01:39 2013 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Thu, 15 Aug 2013 14:01:39 +0200 Subject: [FieldTrip] EEG sensor position layout again In-Reply-To: References: Message-ID: Hi Hweeling, I just checked on my computer, and it helped to restart matlab and try again. Maybe there is something strange if ft_defaults is called (again) during an already open session with previous calls to FT functions? Best, Johanna 2013/8/15 Hwee Ling Lee > Hi, > > It states that: > 'QuikCap_NSL_128.mat' not found. > > However, when I checked fieldtrip/templates/layout, the mat file is stored > in this folder. > > Cheers, > Hweeling > > > > On 15 August 2013 13:33, Johanna Zumer wrote: > >> Hi Hweeling, >> >> Since it says that it cannot find the Quikcap file, it sounds like it's >> not on your path. Run ft_defaults on your Matlab command, then test if >> the file is on your path: >> >> ft_defaults >> >> which QuikCap_NSL_128.mat >> >> Assuming it finds the file on your path, then do you still get the >> browser error? >> >> Best, >> Johanna >> >> >> 2013/8/15 Hwee Ling Lee >> >>> Hi, >>> >>> A bit more details about my setup. >>> >>> I'm using a Easycap MRI compatible 128 channels cap. I tried to search >>> for a layout on the templates/layout, and I found one that might closest >>> fit to my needs ('QuikCap_NSL_128'). >>> To view my components, I tried these series of commands: >>> >>> cfg = []; >>> cfg.viewmode = 'component'; >>> cfg.continuous = 'yes'; >>> cfg.layout = ft_prepare_layout('QuikCap_NSL_128'); >>> ft_databrowser(cfg,ic_data); >>> >>> However, I was prompted with error messages: >>> Warning: Struct field assignment overwrites a value with class "char". >>> See MATLAB R14SP2 Release Notes, Assigning Nonstructure >>> Variables As Structures Displays Warning, for details. >>> > In utilities\private\ft_preamble_provenance at 49 >>> In ft_preamble at 54 >>> In ft_prepare_layout at 91 >>> Error using ft_prepare_layout (line 582) >>> no layout detected, please specify cfg.layout >>> >>> Also when I tried the command, >>> >>> cfg = []; >>> cfg.viewmode = 'component'; >>> cfg.continuous = 'yes'; >>> cfg.layout = 'QuikCap_NSL_128'; >>> ft_databrowser(cfg,ic_data); >>> >>> I get this error message: >>> Warning: could not open QuikCap_NSL_128 >>> > In fileio\private\warning_once at 116 >>> In fileio\private\filetype_check_header at 54 >>> In ft_filetype at 328 >>> In ft_prepare_layout at 253 >>> In ft_databrowser at 226 >>> Warning: could not determine filetype of QuikCap_NSL_128 >>> > In fileio\private\warning_once at 116 >>> In ft_filetype at 1115 >>> In ft_prepare_layout at 253 >>> In ft_databrowser at 226 >>> creating layout from electrode file QuikCap_NSL_128 >>> Error using ft_read_sens (line 68) >>> file 'QuikCap_NSL_128' does not exist >>> >>> Error in ft_prepare_layout (line 275) >>> lay = sens2lay(ft_read_sens(cfg.layout), cfg.rotate, cfg.projection, >>> cfg.style, cfg.overlap); >>> >>> Error in ft_databrowser (line 226) >>> cfg.layout = ft_prepare_layout(tmpcfg); >>> >>> >>> Would anyone please help? >>> >>> Cheers, >>> 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 hweeling.lee at gmail.com Thu Aug 15 14:13:04 2013 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 15 Aug 2013 14:13:04 +0200 Subject: [FieldTrip] EEG sensor position layout again In-Reply-To: References: Message-ID: Hi, Thanks for your advice. I restarted Matlab, and call for ft_defaults and which QuikCap_NSL_128.mat, and I still get the same error message. Also, is this the right layout file to use for my data? Cheers, Hweeling On 15 August 2013 14:01, Johanna Zumer wrote: > Hi Hweeling, > > I just checked on my computer, and it helped to restart matlab and try > again. Maybe there is something strange if ft_defaults is called (again) > during an already open session with previous calls to FT functions? > > Best, > Johanna > > > 2013/8/15 Hwee Ling Lee > >> Hi, >> >> It states that: >> 'QuikCap_NSL_128.mat' not found. >> >> However, when I checked fieldtrip/templates/layout, the mat file is >> stored in this folder. >> >> Cheers, >> Hweeling >> >> >> >> On 15 August 2013 13:33, Johanna Zumer wrote: >> >>> Hi Hweeling, >>> >>> Since it says that it cannot find the Quikcap file, it sounds like it's >>> not on your path. Run ft_defaults on your Matlab command, then test if >>> the file is on your path: >>> >> ft_defaults >>> >> which QuikCap_NSL_128.mat >>> >>> Assuming it finds the file on your path, then do you still get the >>> browser error? >>> >>> Best, >>> Johanna >>> >>> >>> 2013/8/15 Hwee Ling Lee >>> >>>> Hi, >>>> >>>> A bit more details about my setup. >>>> >>>> I'm using a Easycap MRI compatible 128 channels cap. I tried to search >>>> for a layout on the templates/layout, and I found one that might closest >>>> fit to my needs ('QuikCap_NSL_128'). >>>> To view my components, I tried these series of commands: >>>> >>>> cfg = []; >>>> cfg.viewmode = 'component'; >>>> cfg.continuous = 'yes'; >>>> cfg.layout = ft_prepare_layout('QuikCap_NSL_128'); >>>> ft_databrowser(cfg,ic_data); >>>> >>>> However, I was prompted with error messages: >>>> Warning: Struct field assignment overwrites a value with class "char". >>>> See MATLAB R14SP2 Release Notes, Assigning Nonstructure >>>> Variables As Structures Displays Warning, for details. >>>> > In utilities\private\ft_preamble_provenance at 49 >>>> In ft_preamble at 54 >>>> In ft_prepare_layout at 91 >>>> Error using ft_prepare_layout (line 582) >>>> no layout detected, please specify cfg.layout >>>> >>>> Also when I tried the command, >>>> >>>> cfg = []; >>>> cfg.viewmode = 'component'; >>>> cfg.continuous = 'yes'; >>>> cfg.layout = 'QuikCap_NSL_128'; >>>> ft_databrowser(cfg,ic_data); >>>> >>>> I get this error message: >>>> Warning: could not open QuikCap_NSL_128 >>>> > In fileio\private\warning_once at 116 >>>> In fileio\private\filetype_check_header at 54 >>>> In ft_filetype at 328 >>>> In ft_prepare_layout at 253 >>>> In ft_databrowser at 226 >>>> Warning: could not determine filetype of QuikCap_NSL_128 >>>> > In fileio\private\warning_once at 116 >>>> In ft_filetype at 1115 >>>> In ft_prepare_layout at 253 >>>> In ft_databrowser at 226 >>>> creating layout from electrode file QuikCap_NSL_128 >>>> Error using ft_read_sens (line 68) >>>> file 'QuikCap_NSL_128' does not exist >>>> >>>> Error in ft_prepare_layout (line 275) >>>> lay = sens2lay(ft_read_sens(cfg.layout), cfg.rotate, cfg.projection, >>>> cfg.style, cfg.overlap); >>>> >>>> Error in ft_databrowser (line 226) >>>> cfg.layout = ft_prepare_layout(tmpcfg); >>>> >>>> >>>> Would anyone please help? >>>> >>>> Cheers, >>>> 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 >> ================================================= >> > > -- ================================================= 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 m.kandula at uu.nl Thu Aug 15 18:02:33 2013 From: m.kandula at uu.nl (Manasa Kandula) Date: Thu, 15 Aug 2013 18:02:33 +0200 Subject: [FieldTrip] ft_databrowser No artifact.sampleinfo Message-ID: <520CFB99.4060709@uu.nl> I've been trying to use /ft_databrowser/ on segmented EEG data right after /ft_preprocessing/. However, at the subfunction /redraw_cb/, it's crashing as a call to /ft_fetch_data/ is resulting in an error as /opt.artdata.sampleinfo/ is not a field present in the /opt.artdata/ struct (Error using ==> ft_fetch_data at 60 data does not contain a consistent trial definition, fetching data is not possible). As far as I can tell, there is no point in the code that actually sets the /sampleinfo/ field for the /artifact/ struct. Has anyone else encountered this problem? -------------- next part -------------- An HTML attachment was scrubbed... URL: From pattersons076 at gmail.com Thu Aug 15 20:01:32 2013 From: pattersons076 at gmail.com (Samantha Patterson) Date: Thu, 15 Aug 2013 11:01:32 -0700 Subject: [FieldTrip] Fwd: error using freqdescriptives In-Reply-To: References: Message-ID: Dear Fieldtrippers, l am trying to use ft_freqdescriptives on freq data but i get an error saying Error using ft_checkdata (line 366) This function requires freq or freqmvar data as input. Error in ft_freqdescriptives (line 103) freq = ft_checkdata(freq, 'datatype', {'freq', 'freqmvar'}, 'feedback', 'yes'); Specfied cfg for freqdescriptives is cfg = []; cfg.foilim = [10 35]; cfg.toilim = [1.0 2.5]; cfg.keeptrials = 'yes'; test = ft_freqdescriptives(cfg,freq1); output for freq1: freq1 ans = label: {202x1 cell} dimord: 'rpt_chan_freq_time' freq: [1x22 double] time: [1x201 double] powspctrm: [4-D double] cumtapcnt: [26x18 double] grad: [1x1 struct] cfg: [1x1 struct] trialinfo: [26x3 double] Any thoughts? Thanks!!!!! Samantha -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.Kandula at uu.nl Thu Aug 15 22:26:54 2013 From: M.Kandula at uu.nl (Kandula, M. (Manasa)) Date: Thu, 15 Aug 2013 20:26:54 +0000 Subject: [FieldTrip] ft_databrowser No artifact.sampleinfo In-Reply-To: <520CFB99.4060709@uu.nl> References: <520CFB99.4060709@uu.nl> Message-ID: <48A0B9F7F9A4BD4C836E1CC21805EB7E191D0BFC@ICTSC-W-S203.soliscom.uu.nl> Hey all, A minor correction.. I meant the artdata struct , not the artifact struct. Thanks!! Manasa ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Manasa Kandula [m.kandula at uu.nl] Sent: Thursday, August 15, 2013 6:02 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] ft_databrowser No artifact.sampleinfo I've been trying to use ft_databrowser on segmented EEG data right after ft_preprocessing. However, at the subfunction redraw_cb, it's crashing as a call to ft_fetch_data is resulting in an error as opt.artdata.sampleinfo is not a field present in the opt.artdata struct (Error using ==> ft_fetch_data at 60 data does not contain a consistent trial definition, fetching data is not possible). As far as I can tell, there is no point in the code that actually sets the sampleinfo field for the artifact struct. Has anyone else encountered this problem? -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbj0310 at gmail.com Sun Aug 18 14:31:53 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Sun, 18 Aug 2013 21:31:53 +0900 Subject: [FieldTrip] Visualizing grand-averaged ERPs with different channels Message-ID: Dear all. Hello What I want to do is visualizing ERPs in different channels, simultaneously in a single figure window. For example, CZ, CPZ, & PZ or P4 & P5 in a group. I use ft_singleplotER like below *figure; * *cfg = [];* *cfg.ylim = [-8 8];* *cfg.baseline = [-0.2 0];* *cfg.linewidth = [2];* *ft_singleplotER(cfg, group1_CP4, group1_CP3)* I succeeded visualizing 3 different groups simultaneously with certain same channel using the same manner above. (cfg, group1_CZ, group2_CZ) However, when I try the same code with different channels, the result only to show mean value (e.g. mean(CP4). I do not know how to solve it. Please help me. With regards. -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From Sara.Bogels at mpi.nl Mon Aug 19 11:39:54 2013 From: Sara.Bogels at mpi.nl (=?ISO-8859-1?Q?Sara_B=F6gels?=) Date: Mon, 19 Aug 2013 11:39:54 +0200 Subject: [FieldTrip] problem with ft_multiplotER In-Reply-To: <51E6838F.3050302@donders.ru.nl> References: <51E67229.8040001@mpi.nl> <51E6838F.3050302@donders.ru.nl> Message-ID: <5211E7EA.8090907@mpi.nl> Hi Jörn and others, Some time ago, I posted the question below to the mailinglist. I now have had this error many times for both ft_timelockgrandaverage and ft_multiplotER. It happens for some datasets but not others and this appears quite random to me. The error message is: "Subscripted assignment dimension mismatch" Error in ft_timelockgrandaverage (line 182). avgmat(s,:,:) = varargin{s}.(cfg.parameter{k}); It appears to have something to do with the different time limits of the different data I want to average or plot. I use cfg.latency to make sure the latency falls within the time limits of all files but this sometimes still does not help. Any ideas? Thank you, Sara "Jörn M. Horschig" wrote: > Dear Sara, > > What you describe sounds like a bug to me. It looks like that in these > lines the averages of the two conditions should be concatenated into one > matrix, and apparently something goes wrong. However, you truncated the > error message a bit (you pasted the line where the error occurs, but not > the error message itself). If one of us developers should look into this > further, it would be great if you register and create a bugreport on > bugzilla.fconders.nl. Preferably would be to upload a snippet of your > data, e.g. timelockstructures of one participant, and some lines of code > which reproduce the error. We can then look into this further and fix > this as soon as possible :) > > Best, > Jörn > > On 7/17/2013 12:30 PM, Sara Bögels wrote: >> Hi all, >> >> I have a very specific problem with the ft_multiplotER function. For 2 >> of my 24 participants, the function gives an error-message when I try >> to plot the averages of two conditions at the same time. Plotting them >> one by one is not a problem. There appears to be a specific point in >> time (different for the two participants) when this goes wrong. If I >> avoid that time (by using cfg.xlim) it works fine. My trials have >> different lengths and I used "cfg.vartrllength = 2;" when calling >> ft_timelockanalysis (not sure whether this is relevant). >> >> The error message I get is >> "Error in ft_multiplotER (line 616) >> yval(i,:) = datamatrix{i}(m,:);" >> >> I cannot find out what happens in this line. Can anyone tell me what >> this might be referring to? >> >> Thank you, >> Sara >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > From frank.ye.mei at gmail.com Mon Aug 19 22:18:39 2013 From: frank.ye.mei at gmail.com (Ye Mei) Date: Mon, 19 Aug 2013 16:18:39 -0400 Subject: [FieldTrip] Can beamformer give both the location and the orientation of the source? Message-ID: <52127D9F.3090102@gmail.com> Hi all, Can beamformer give both the location and the orientation of the source? If yes, how to do it in fieldtrip? thanks ahead, Ye From arr at uvic.ca Mon Aug 19 22:47:27 2013 From: arr at uvic.ca (Ashley Rose) Date: Mon, 19 Aug 2013 13:47:27 -0700 Subject: [FieldTrip] fieldtrip question Message-ID: <314d3147c1b422e458d033e10d7a6b17.squirrel@wm3.uvic.ca> Hi there, I'm having an issue running Fieldtrip. I keep getting this warning: "Warning: Dimensions of AlphaData must be 1x1, or must match CData." But I haven't done anything to AlphaData or CData that would make them inconsistent. Has anyone had this problem before? Thank you, Ashley Rose From imponderabilion at gmail.com Tue Aug 20 00:54:49 2013 From: imponderabilion at gmail.com (=?ISO-8859-2?Q?Miko=B3aj_Magnuski?=) Date: Tue, 20 Aug 2013 00:54:49 +0200 Subject: [FieldTrip] ft_neighbourplot does not plot new connections in 3D Message-ID: Hi FieldTrippers! just a short note in case it wasn'r reported before: ft_neighbourplot with option .enableedit = 'on' (the bleeding option) plots new connections (new - that means click-created) only as 2D projections even if everything else is plotted in 3D. changing lines 286 - 287 to something like: if size(proj,2) == 2 Coord = {X, Y}; elseif size(proj,2) > 2 Z = [proj(curSensId,3) proj(lastSensId,3)]; Coord = {X, Y, Z}; end hl(curSensId, lastSensId) = line(Coord{:}, 'color', 'r'); hl(lastSensId, curSensId) = line(Coord{:}, 'color', 'r'); fixes this problem. Regards, Mikołaj Magnuski -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Aug 23 09:28:18 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 23 Aug 2013 09:28:18 +0200 Subject: [FieldTrip] ft_neighbourplot does not plot new connections in 3D In-Reply-To: References: Message-ID: <52170F12.9020107@donders.ru.nl> Dear Miko?aj, thanks very much for reporting this. I fixed it and the fix should be available inthe next FieldTrip release (i.e. tomorrow). Best, Jörn On 8/20/2013 12:54 AM, Miko?aj Magnuski wrote: > Hi FieldTrippers! > > just a short note in case it wasn'r reported before: > ft_neighbourplot with option .enableedit = 'on' (the bleeding option) > plots new connections (new - that means click-created) only as 2D > projections even if everything else is plotted in 3D. > > changing lines 286 - 287 to something like: > if size(proj,2) == 2 > Coord = {X, Y}; > elseif size(proj,2) > 2 > Z = [proj(curSensId,3) proj(lastSensId,3)]; > Coord = {X, Y, Z}; > end > hl(curSensId, lastSensId) = line(Coord{:}, 'color', 'r'); > hl(lastSensId, curSensId) = line(Coord{:}, 'color', 'r'); > > fixes this problem. > > > Regards, > Miko?aj Magnuski > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From narayan.ps at tut.fi Fri Aug 23 12:37:20 2013 From: narayan.ps at tut.fi (Narayan Puthanmadam Subramaniyam) Date: Fri, 23 Aug 2013 13:37:20 +0300 Subject: [FieldTrip] simulation of EOG Message-ID: <001501ce9fec$bee80ce0$3cb826a0$@tut.fi> Dear FT experts I am not sure if I should be asking this question here. I want to simulate 'pure' EOG signal by placing rotating dipole in the eye. Can I use FT to compute the lead field matrix from eye to all scalp electrodes ? Has anyone used a BEM model where eyes are segmented ? Many Thanks Narayan From ingenieureniso at gmail.com Fri Aug 23 19:40:14 2013 From: ingenieureniso at gmail.com (ingenieur eniso) Date: Fri, 23 Aug 2013 18:40:14 +0100 Subject: [FieldTrip] how to open bdf and rdf files Message-ID: Dear all, I have EEG record files in rdf and bdf formats. but I do not know how to open them. Please can anyone send me a matlab function to open these files? 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 johanna.zumer at gmail.com Sun Aug 25 07:18:14 2013 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Sun, 25 Aug 2013 07:18:14 +0200 Subject: [FieldTrip] how to open bdf and rdf files In-Reply-To: References: Message-ID: Dear Ahmed, Does this help? (http://fieldtrip.fcdonders.nl/getting_started/bdf ) If you are still stuck, maybe try EEGlab import and then convert EEGlab format to FieldTrip format ( http://fieldtrip.fcdonders.nl/integrating_with/integrating_with_eeglab) Best, Johanna 2013/8/23 ingenieur eniso > Dear all, > > > I have EEG record files in rdf and bdf formats. but I do not know how to > open them. > > Please can anyone send me a matlab function to open these files? > > I hope you will send me positive and helpful response. > > Thanks a lot in advance! > > Best, > > ahmed > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Mon Aug 26 00:08:19 2013 From: roeysc at gmail.com (Roey Schurr) Date: Mon, 26 Aug 2013 01:08:19 +0300 Subject: [FieldTrip] Source Analysis Normalisation in-subject and in-group Message-ID: Hi all, We have a question regarding normalisation of EEG signals for source reconstruction analysis. We have EEG records (not ERP) of a few patients in two different conditions (each condition consists of several 2 seconds segments/trials). Each recording was done over a period of a few days, and in different sessions. We also have anatomycal MRI scans for each patient (subject). We would like to make two statistic comparisons: 1. Compare the source analysis of the two conditions in each subject. 2. Compare the source analysis of the two conditions, based upon all subjects. For the first comparison, we are puzzled about the appropriate way to normalise and standardize our data, since each EEG segment was recorded at a different time, and hence may be affected by different electrode conductivity, for example. How would you normalise the data? For the second comparison, of course, we would like to normalise the source analysis results in the anatomycal level using ft_volumenormalise. However, we are puzzled about the appropriate way to normalise and standardize our data, since subjects differ from each other (for example, anatomycally, resulting in changes of power spectrum). How would you standartize the data between subjects? Thank you very much, best regards, Aia and Roey -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Tue Aug 27 20:44:39 2013 From: polomacnenad at gmail.com (Nenad Polomac) Date: Tue, 27 Aug 2013 20:44:39 +0200 Subject: [FieldTrip] ICA on highpass filtered MEG data Message-ID: Dear Fieldtrip users, I have CTF 275 channels MEG data and I am interested in gamma band. For this purpose I would like to remove microsaccade artifacts from the data using the ICA. In order to obtain the microsacade components I have filtered data ( highpass and lowpass; 30-150 Hz) and than I've wanted to run ICA calculation. However, I've read here http://sccn.ucsd.edu/pipermail/eeglablist/2013/006710.html that after filtering data are more dependent and that is a big problem for ICA calculation. And I also experienced that ICA takes very long time and sometimes doesn't converge. So, to overcome this problem, the data dimensionality has to be reduced. I have found two different solutions from different sources. One solution might be to estimate variance with PCA and than choose the amount of variance that should stay in the data. e.g. [COEFF,SCORE,eigenvalues ] = princomp(data_matrix); A= cumsum(eigenvalues); num_of_comp=find(A/A(end)>0.98,1); % 98% is the percentage of variance that will be used for the ICA, 2% will be discarded This percentage will be the same for all subjects. The second option might be to use the same eigenvalue cutoff value for all subjects: [COEFF,SCORE,eigenvalues ] = princomp(data_matrix); A=(find(eigenvalues>0.005)); %0.005 here is just for example num_of_comp=A(end); The variable num_of_comp represents the number of component to which filtered data will be reduced before ICA. e.g. cfg = []; cfg.method = 'runica'; cfg.runica.pca = num_of_comp; cfg.runica.maxsteps = 600; cfg.runica.stop = 1e-7; cfg.runica.extended = 1; ica_comp = ft_componentanalysis(cfg, data); Finally, my question is which of this two methods is more objective? And is there any other possibility I should consider? I would like to add that in my case second calculation gives me less variant number of components among 22 subjects. Thank you in advance! All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron.schurger at gmail.com Tue Aug 27 21:49:21 2013 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Tue, 27 Aug 2013 21:49:21 +0200 Subject: [FieldTrip] ICA on highpass filtered MEG data In-Reply-To: References: Message-ID: I am not aware of any good way to remove microsaccade artifacts from EEG or MEG data. ICA might find a microsaccade component if you have sufficient data, but you will have to hunt through the components to find the "right" one. The difficult question is how to know which is the right component, or whether or not microsaccades are incorporated into two or more components (or not at all). Having an MEG-compatible eye tracker with a high sampling rate is what I would want. Best wishes, Aaron On Tue, Aug 27, 2013 at 8:44 PM, Nenad Polomac wrote: > Dear Fieldtrip users, > > I have CTF 275 channels MEG data and I am interested in gamma band. For this > purpose I would like to remove microsaccade artifacts from the data using > the ICA. In order to obtain the microsacade components I have filtered data > ( highpass and lowpass; 30-150 Hz) and than I've wanted to run ICA > calculation. However, I've read here > http://sccn.ucsd.edu/pipermail/eeglablist/2013/006710.html that after > filtering data are more dependent and that is a big problem for ICA > calculation. And I also experienced that ICA takes very long time and > sometimes doesn't converge. So, to overcome this problem, the data > dimensionality has to be reduced. I have found two different solutions from > different sources. > > One solution might be to estimate variance with PCA and than choose the > amount of variance that should stay in the data. e.g. > [COEFF,SCORE,eigenvalues ] = princomp(data_matrix); > A= cumsum(eigenvalues); > num_of_comp=find(A/A(end)>0.98,1); % 98% is the percentage of variance that > will be used for the ICA, 2% will be discarded > This percentage will be the same for all subjects. > > The second option might be to use the same eigenvalue cutoff value for all > subjects: > [COEFF,SCORE,eigenvalues ] = princomp(data_matrix); > A=(find(eigenvalues>0.005)); %0.005 here is just for example > num_of_comp=A(end); > > The variable num_of_comp represents the number of component to which > filtered data will be reduced before ICA. > e.g. > cfg = []; > cfg.method = 'runica'; > cfg.runica.pca = num_of_comp; > cfg.runica.maxsteps = 600; > cfg.runica.stop = 1e-7; > cfg.runica.extended = 1; > ica_comp = ft_componentanalysis(cfg, data); > > > > Finally, my question is which of this two methods is more objective? And is > there any other possibility I should consider? > I would like to add that in my case second calculation gives me less variant > number of components among 22 subjects. > > Thank you in advance! > > All the best! > Nenad > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Post-doctoral researcher INSERM U992 / NeuroSpin CEA - Saclay, France +33-1-69-08-66-47 aaron.schurger at gmail.com http://www.unicog.org From sreenivasan.r.nadar at gmail.com Tue Aug 27 22:17:03 2013 From: sreenivasan.r.nadar at gmail.com (Sreenivasan R. Nadar, Ph.D.) Date: Tue, 27 Aug 2013 16:17:03 -0400 Subject: [FieldTrip] 19 channel EEG for source modeling of epileptic focus Message-ID: Hi All, I have a 19 channel Nihon - Kohden EEG for epilepsy monitoring and I use the following file for channel locations in ftp://sccn.ucsd.edu/pub/locfiles/eeglab/Standard-10-20-Cap19.ced for data analysis in EEGLab. Please let me know if anybody has pre-processing script to import the data in Fieldtrip and also for source localisation of epileptic focus. Thank you. Sreenivasan -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Aug 29 10:02:45 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 29 Aug 2013 10:02:45 +0200 Subject: [FieldTrip] 19 channel EEG for source modeling of epileptic focus In-Reply-To: References: Message-ID: <521F0025.8090104@donders.ru.nl> Dear Sreenivasan, I am not sure whether you can read in .ced files with the ft_read_sens function. You could give it a try though by specifying cfg.elecfile = 'PATH_TO_FILE/Standard-10-20-Cap19.ced' Otherwise, I can see two ways how you can make this work. First, you could change the content of the file to match the format of the other sensor-templates. For this, you can best have a look in fieldtrip/template/elec and have a look at one of these files. Then, you would need to rearrange the values of your .ced file to match the order of the .elc-format. Alternatively, you could write your own wrapper function, which reads in the x-, y- and z-position of the electrodes from the .ced file and stores them in a matrix. Also, you need to store the corresponding channel label. Using these, you can create an elec-structure that you can use as cfg.elec for whatever function you want to do. Maybe someone else here has worked with .ced files before and can thus can help with either of the two solutions. Good luck :) Best, Jörn On 8/27/2013 10:17 PM, Sreenivasan R. Nadar, Ph.D. wrote: > Hi All, > > I have a 19 channel Nihon - Kohden EEG for epilepsy monitoring and I > use the following file for channel locations in > ftp://sccn.ucsd.edu/pub/locfiles/eeglab/Standard-10-20-Cap19.ced for > data analysis in EEGLab. > > Please let me know if anybody has pre-processing script to import the > data in Fieldtrip and also for source localisation of epileptic focus. > > Thank you. > > Sreenivasan > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.vanlier at bsse.ethz.ch Thu Aug 29 13:53:26 2013 From: ben.vanlier at bsse.ethz.ch (van Lier Ben) Date: Thu, 29 Aug 2013 11:53:26 +0000 Subject: [FieldTrip] slow reading with ft_preprocessing of a fcdc_matbin file? Message-ID: Hi all, I have a pretty big data file of 120 channels for 20min continuous at 20khz. clearly i need to downsample. to do so, i convert the original file to fcdc_matbin, creating a 22gb bin file with all the data. then its time for downsampling as shown on http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory this is very slow. ft_preprocessing takes 230 seconds per channel (using 380 mb), doing nothing but just reading 1 channel. the subsequent downsampling with ft_resample to 1khz is surprisingly fast with only 4 seconds. does that make any sense? it seems like a very long time to read in 380mb... :( Best, Ben From jan.schoffelen at donders.ru.nl Thu Aug 29 14:01:59 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 29 Aug 2013 14:01:59 +0200 Subject: [FieldTrip] slow reading with ft_preprocessing of a fcdc_matbin file? In-Reply-To: References: Message-ID: <264BF553-0691-4AC9-95B8-D78000F0CA6B@donders.ru.nl> Hi Ben, I guess MATLAB needs to read in the whole datafile each time (for each channel). What about creating separate files for each channel? JM On Aug 29, 2013, at 1:53 PM, van Lier Ben wrote: > Hi all, > > I have a pretty big data file of 120 channels for 20min continuous at 20khz. clearly i need to downsample. to do so, i convert the original file to fcdc_matbin, creating a 22gb bin file with all the data. > > then its time for downsampling as shown on http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory > > this is very slow. ft_preprocessing takes 230 seconds per channel (using 380 mb), doing nothing but just reading 1 channel. the subsequent downsampling with ft_resample to 1khz is surprisingly fast with only 4 seconds. > > does that make any sense? it seems like a very long time to read in 380mb... :( > > Best, > Ben > > _______________________________________________ > 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 jm.horschig at donders.ru.nl Thu Aug 1 12:37:08 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 01 Aug 2013 12:37:08 +0200 Subject: [FieldTrip] ancova for sources analysis In-Reply-To: <2264a36963356fbe.51f8fb71@upo.es> References: <167095db43e3fd69.51f8d35e@upo.es> <1763660954.2174368.1375257362812.JavaMail.root@sculptor.zimbra.ru.nl> <2264a36963356fbe.51f8fb71@upo.es> Message-ID: <51FA3A54.8020001@donders.ru.nl> Dear Gabriel, if you have a .stat field, you did already run statistics on your data. I wouldn't regress anything out of e.g. t-values. Rather, the idea is to regress out confounding factors before doing statistics, so that you reduce variance across trials and subsequently maximize sensitivity of your statistical test. I could really advise you to read the paper I suggested, the rationale is explained there. Moreover, if you are interested in a covariate like 'age', a simple correlational analysis might make more sense. As stated, the idea of regressconfound is to explain and remove variance across observations, but depending on what you want, a correlation might make more sense. Want to improve your stats? Then go for regressconfound. Find out if there is age explains neural effects? Then go for a simple correlation. Best, Jörn On 7/31/2013 11:56 AM, Gabriel Gonzalez Escamilla wrote: > Thank you all for your responses. > > The last problem I did wrote is now solved, see below. > > I had a field called 'stat' instead of the 'pow', I'm guessing this > field was set before, so, now i'm using this field as if it was the > 'pow' I needed and it's working, Is that OK? > > Now it takes me to the next question, my data has the avg field, and > it says that will update the descriptives but that the 'method' is > missing, is this update necessary? or can I just skeep it? > > > Many thanks in advanced, > Gabriel > > > ----- Mensaje original ----- > De: "Stolk, A." > Fecha: Miércoles, 31 de Julio de 2013, 10:04 am > Asunto: Re: [FieldTrip] ancova for sources analysis > A: FieldTrip discussion list > > >Dear Gabriel, > > > > This page demonstrates how to remove contributions to the data > originating from head movement, but one could as well follow the same > principle for any other type of covariate (e.g. eye movement related > activity). > > > > http://fieldtrip.fcdonders.nl/example/how_to_incorporate_head_movements_in_meg_analysis? > > > > Yours, > > Arjen > > > ------------------------------------------------------------------------ > > *> Van: *"Gabriel Gonzalez Escamilla" > *> Aan: *"fieFieldTrip discussion list" > *> Verzonden: *Woensdag 31 juli 2013 09:05:34 > *> Onderwerp: *[FieldTrip] ancova for sources analysis > > > > Dear fieldtrip experts, > > > > I'm wondering if it is possible to perform an ancova or to remove > the effect of a covariate in a source analysis? > > > > Many thanks in advanced, > > Gabriel > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > --------------------------
PhD. student Gabriel > González-Escamilla
Laboratory of Functional Neuroscience
/>Department of Physiology, Anatomy, and Cell Biology
University > Pablo de Olavide
Ctra. de Utrera, Km.1
41013 - Seville
/>- Spain -

Email: ggonesc at upo.es
/>http://www.upo.es/neuroaging/es/
> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From lzyang at ustc.edu.cn Sat Aug 3 10:49:59 2013 From: lzyang at ustc.edu.cn (lzyang) Date: Sat, 03 Aug 2013 16:49:59 +0800 Subject: [FieldTrip] units of data sample read from neuroscan avg file is incorrect Message-ID: <51FCC437.5070409@ustc.edu.cn> Dear fieldtrip list, I used ft_read_data to read in .avg files (neuroscan format) to do some advanced analysis. data=ft_read_data('sham.avg', 'dataformat', 'ns_avg'); I noticed that the unit of data sample read by this function is incorrect. Values of samples ranged from -0.1 to 0.1. I will appreciate if anyone can give me some hints on how to import avg files correctly using fieldtrip. Thanks very much! Best Regards, -Lizhuang From politzerahless at gmail.com Sat Aug 3 13:48:58 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 3 Aug 2013 07:48:58 -0400 Subject: [FieldTrip] fieldtrip Digest, Vol 33, Issue 3 In-Reply-To: References: Message-ID: Hi Lizhuang, I haven't used Fieldtrip to import .avg files so I'm not sure about this, but I wonder if this is related to the same problem in EEGLAB. EEGLAB also scales .avg files like this when importing them, for some reason, so if the Fieldtrip function is based on EEGLAB code these issues may be related. (However, I just looked at read_ns_avg.m, which is what ft_read_data calls, and it doesn't say it's copied from EEGLAB). If you have EEGLAB, you can add the custom function loadavg_bcl.m to your path (it is available at http://sccn.ucsd.edu/pipermail/eeglablist/2011/003986.html, as one of the attachments near the bottom), use that to import the .avg file, and then use the EEGLAB function eeglab2fieldtrip() to get the data into FieldTrip. Also, have you tried reading the data with ft_preprocessing() instead of ft_read_data? ft_read_data is kind of a low-level function; in the past I think I've had better luck just using ft_preprocessing. Best, Steve Stephen Politzer-Ahles New York University, Abu Dhabi Psychology Department > Message: 1 > Date: Sat, 03 Aug 2013 16:49:59 +0800 > From: lzyang > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] units of data sample read from neuroscan avg file > is incorrect > Message-ID: <51FCC437.5070409 at ustc.edu.cn> > Content-Type: text/plain; charset=GB2312 > > Dear fieldtrip list, > I used ft_read_data to read in .avg files (neuroscan format) to do some > advanced analysis. > data=ft_read_data('sham.avg', 'dataformat', 'ns_avg'); > I noticed that the unit of data sample read by this function is incorrect. > Values of samples ranged from -0.1 to 0.1. > I will appreciate if anyone can give me some hints on how to import avg > files correctly using fieldtrip. > > Thanks very much! > > Best Regards, > -Lizhuang -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sat Aug 3 13:50:40 2013 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 3 Aug 2013 07:50:40 -0400 Subject: [FieldTrip] units of data sample read from neuroscan avg file is incorrect Message-ID: Hi Lizhuang, I haven't used Fieldtrip to import .avg files so I'm not sure about this, but I wonder if this is related to the same problem in EEGLAB. EEGLAB also scales .avg files like this when importing them, for some reason, so if the Fieldtrip function is based on EEGLAB code these issues may be related. (However, I just looked at read_ns_avg.m, which is what ft_read_data calls, and it doesn't say it's copied from EEGLAB). If you have EEGLAB, you can add the custom function loadavg_bcl.m to your path (it is available at http://sccn.ucsd.edu/pipermail/eeglablist/2011/003986.html, as one of the attachments near the bottom), use that to import the .avg file, and then use the EEGLAB function eeglab2fieldtrip() to get the data into FieldTrip. Also, have you tried reading the data with ft_preprocessing() instead of ft_read_data? ft_read_data is kind of a low-level function; in the past I think I've had better luck just using ft_preprocessing. Best, Steve Stephen Politzer-Ahles New York University, Abu Dhabi Psychology Department > Message: 1 > Date: Sat, 03 Aug 2013 16:49:59 +0800 > From: lzyang > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] units of data sample read from neuroscan avg file > is incorrect > Message-ID: <51FCC437.5070409 at ustc.edu.cn> > Content-Type: text/plain; charset=GB2312 > > Dear fieldtrip list, > I used ft_read_data to read in .avg files (neuroscan format) to do some > advanced analysis. > data=ft_read_data('sham.avg', 'dataformat', 'ns_avg'); > I noticed that the unit of data sample read by this function is incorrect. > Values of samples ranged from -0.1 to 0.1. > I will appreciate if anyone can give me some hints on how to import avg > files correctly using fieldtrip. > > Thanks very much! > > Best Regards, > -Lizhuang -------------- next part -------------- An HTML attachment was scrubbed... URL: From Izabela.Mikula at mpi.nl Tue Aug 6 12:10:32 2013 From: Izabela.Mikula at mpi.nl (Izabela Mikula) Date: Tue, 6 Aug 2013 12:10:32 +0200 Subject: [FieldTrip] Error in ft_rejectartifact for the newest fieldtrip version Message-ID: <9532B831-AB8E-4EBC-A984-5A3783E5313D@mpi.nl> Dear all, I was wondering if any of you have ever encountered similar problem and might know if I'm doing something wrong or it is a bug.. I have tried using (my old scripts for preprocessing) ft_rejectartifact(cfg, data) but I get an error: evaluating artifact_jump ??? Error using ==> feval Undefined function or method 'artifact_jump' for input arguments of type 'struct'. Error in ==> ft_rejectartifact at 257 cfg = feval(sprintf('artifact_%s', cfg.artfctdef.type{type}), cfg, data); It is important to note that this error only occurs when using the newest fieldtrip version. For previous versions it works without any problems. I have also tried multiple datasets, but the problem remains. data = fsample: 1200 grad: [1x1 struct] sampleinfo: [180x2 double] trialinfo: [180x1 double] trial: {1x180 cell} time: {1x180 cell} label: {273x1 cell} cfg: [1x1 struct] and cfg.artfctdef = reject: 'complete' jump: [1x1 struct] muscle: [1x1 struct] type: {2x1 cell} minaccepttim: 0.1000 crittoilim: [] feedback: 'no' Thanks in advance! Best, Izabela From jan.schoffelen at donders.ru.nl Tue Aug 6 13:13:09 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 6 Aug 2013 13:13:09 +0200 Subject: [FieldTrip] Error in ft_rejectartifact for the newest fieldtrip version In-Reply-To: <9532B831-AB8E-4EBC-A984-5A3783E5313D@mpi.nl> References: <9532B831-AB8E-4EBC-A984-5A3783E5313D@mpi.nl> Message-ID: Hi Izabela, This is indeed a bug. We reorganized our compat-directory, that is dealing with backward compatibility issues. One of these issues was to support backward compatibility for calling ft-functions without the ft_prefix. E.g. calling freqanalysis should redirect to a call to ft_freqanalysis. With this feature removed, ft_rejectartifact cannot execute artifact_xxx, because it is not redirected anymore to ft_artifact_xxx. I have fixed this. It should be available within 15 minutes on the DCCN Fieldtrip version, and in the download version as of tonight. Thanks for reporting, Jan-Mathijs On Aug 6, 2013, at 12:10 PM, Izabela Mikula wrote: > Dear all, > I was wondering if any of you have ever encountered similar problem and might know if I'm doing something wrong or it is a bug.. > > I have tried using (my old scripts for preprocessing) ft_rejectartifact(cfg, data) but I get an error: > > evaluating artifact_jump > ??? Error using ==> feval > Undefined function or method 'artifact_jump' for input arguments of type 'struct'. > > Error in ==> ft_rejectartifact at 257 > cfg = feval(sprintf('artifact_%s', cfg.artfctdef.type{type}), cfg, data); > > It is important to note that this error only occurs when using the newest fieldtrip version. For previous versions it works without any problems. I have also tried multiple datasets, but the problem remains. > > data = > > fsample: 1200 > grad: [1x1 struct] > sampleinfo: [180x2 double] > trialinfo: [180x1 double] > trial: {1x180 cell} > time: {1x180 cell} > label: {273x1 cell} > cfg: [1x1 struct] > > and > > cfg.artfctdef = > > reject: 'complete' > jump: [1x1 struct] > muscle: [1x1 struct] > type: {2x1 cell} > minaccepttim: 0.1000 > crittoilim: [] > feedback: 'no' > > Thanks in advance! > > Best, > Izabela > > > _______________________________________________ > 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 ben.vanlier at bsse.ethz.ch Tue Aug 6 17:56:55 2013 From: ben.vanlier at bsse.ethz.ch (van Lier Ben) Date: Tue, 6 Aug 2013 15:56:55 +0000 Subject: [FieldTrip] from trials to continuous and an error in selfromraw Message-ID: Hi guys, for testing purposes im trying to use data in trials as one continuous piece of data. when i do freqanalysis with cfg.trials = 'all' and then singleplotTFR, i get to see only 1 trial. it should plot the spectra of all of them right? i do use cfg.continuous = yes i can tell it is processing all the trials in the command window feedback and databrowser is putting them together fine. i guess related, when i do cfg.trials = '1' (or any) and then freqanalysis it gives me the following error: -------------------------- Error using selfromraw (line 13) incorrect specification of requested repetitions Error in ft_selectdata_old (line 547) data = selfromraw(data, 'rpt', selrpt); Error in ft_selectdata (line 45) [varargout{1:nargout}] = ft_selectdata_old(varargin{:}); Error in ft_freqanalysis (line 225) data = ft_selectdata(data, 'rpt', cfg.trials); ---------------------------- i tried with data coming from ft_appendata (2 copies of the same file) and also with ft_definetrial from one continuous file. i am using the version of 5 aug 13 anyone knows whats going wrong? cheers Ben From eelke.spaak at donders.ru.nl Tue Aug 6 19:44:33 2013 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 6 Aug 2013 19:44:33 +0200 Subject: [FieldTrip] from trials to continuous and an error in selfromraw In-Reply-To: References: Message-ID: Hi Ben, The cfg.trials option for ft_freqanalysis refers to which trials should be used in the computation of the output. By default, ft_freqanalysis returns the average over all those trials. If you want to get estimates for each individual trial, you should specify cfg.keeptrials = 'yes'. (See also http://fieldtrip.fcdonders.nl/reference/ft_freqanalysis .) I am not sure if ft_singleplotTFR will give you plots for individual trials, though; I think it will do the averaging anyway. To get individual trial plots, you probably have to call the plotting function several times with cfg.trials = 1, 2, 3, etc. Regarding cfg.trials = '1', it is important to use just a regular scalar quantity, and not a string, so cfg.trials = 1. Best, Eelke On 6 August 2013 17:56, van Lier Ben wrote: > Hi guys, > > for testing purposes im trying to use data in trials as one continuous piece of data. when i do freqanalysis with cfg.trials = 'all' and then singleplotTFR, i get to see only 1 trial. it should plot the spectra of all of them right? i do use cfg.continuous = yes > i can tell it is processing all the trials in the command window feedback and databrowser is putting them together fine. > > i guess related, when i do cfg.trials = '1' (or any) and then freqanalysis it gives me the following error: > > -------------------------- > Error using selfromraw (line 13) > incorrect specification of requested repetitions > > Error in ft_selectdata_old (line 547) > data = selfromraw(data, 'rpt', selrpt); > > Error in ft_selectdata (line 45) > [varargout{1:nargout}] = ft_selectdata_old(varargin{:}); > > Error in ft_freqanalysis (line 225) > data = ft_selectdata(data, 'rpt', cfg.trials); > ---------------------------- > > i tried with data coming from ft_appendata (2 copies of the same file) and also with ft_definetrial from one continuous file. > > i am using the version of 5 aug 13 > > anyone knows whats going wrong? > > cheers > Ben > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From haristz at gmail.com Tue Aug 6 20:24:55 2013 From: haristz at gmail.com (Charidimos Tzagarakis) Date: Tue, 6 Aug 2013 13:24:55 -0500 Subject: [FieldTrip] question about virtual electrode MNI coordinates Message-ID: Hi there, I have a question regarding virtual electrodes: How can I double check that the MNI coordinates that I enter are correctly interpreted? More specifically: I have followed the the extended beamforming tutorial in the "Appendix" and have been able to transpose it to my data (I have 4D/BTi MEG files and Dicom mri volumes).The part I am not certain about is the call to the LCMV beamformer. Here it is in my case ( I just want to get the voxel were the power is max in the previous analysis): cfg = []; cfg.method = 'lcmv'; cfg.vol = volfcm; cfg.grid.pos = source_diff.pos(maxpowindx, :); cfg.grid.inside = 1:size(cfg.grid.pos, 1); cfg.grid.outside = []; cfg.grad=senscm source_idx = ft_sourceanalysis(cfg, tlock); My headmodel does not include MEG channel information so I need to also define the cfg.grad parameter. What I don't understand is how cfg.grid.pos (which is in MNI coordinates as per the previous part of the tutorial) can be correctly applied to the coordinates of the headmodel and the channels since these 2 are not in MNI coordinates (in my case they are in 4d/Bti coordinates and rescaled to cm).In the previous part of the tutorial this is (if I understand correctly) accomplished because the leadfield used when calling ft_sourceanalysis was created using and MNI-warped template. I don't see where the equivalent part is when estimating the virtual electrode though. Any advice you may have would be much appreciated. Best, Haris Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych University of Minnesota Dept of Neuroscience and Brain Sciences Center -------------- next part -------------- An HTML attachment was scrubbed... URL: From franziska.bilger at uni-ulm.de Wed Aug 7 11:23:50 2013 From: franziska.bilger at uni-ulm.de (franziska.bilger at uni-ulm.de) Date: Wed, 07 Aug 2013 11:23:50 +0200 Subject: [FieldTrip] topoplotER - how to plot a selection of channels ? Message-ID: <20130807112350.i24h5npq80sgscws@imap.uni-ulm.de> Dear subscribers, I´m using fieldtrip to analyze the data for my bachelor thesis (topic: motor imagery in patientens in vegetative state) and I would be happy to get some help concerning the function ft_topoplotER. Originally, my data derives from a 256-channel system, but I only like to plot a selection of 60 channels above the motor cortex. This is my Region of Interest. When I´m now plotting the data from these 60 channels with ft_topoplotER I receive a figure, which shows the plotted activation over the whole cortex. My Question: Is there a possibility to plot only the activation in my Region of Interest/over the selected 60 channels above the motor cortex? This would result in a figure where there´s only activation shown over the motor cortex and the rest of the plot is blank/white. Thank you very much! Kind regards, Franziska From jm.horschig at donders.ru.nl Wed Aug 7 11:41:26 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 07 Aug 2013 11:41:26 +0200 Subject: [FieldTrip] topoplotER - how to plot a selection of channels ? In-Reply-To: <20130807112350.i24h5npq80sgscws@imap.uni-ulm.de> References: <20130807112350.i24h5npq80sgscws@imap.uni-ulm.de> Message-ID: <52021646.4050203@donders.ru.nl> Hi Franziska, check out the help of ft_topoplotER and what options there are for cfg.interpolation, one of these does what you want (afair 'cubic'). An alternative would be to set datapoints of all irrelevant channels to nan and then use cfg.interpolatenan = 'no', but the former suggestion is cleaner/better/easier than the latter. Good luck with writing your thesis! Best, Jörm On 8/7/2013 11:23 AM, franziska.bilger at uni-ulm.de wrote: > Dear subscribers, > > I´m using fieldtrip to analyze the data for my bachelor thesis (topic: > motor imagery in patientens in vegetative state) and I would be happy > to get some help concerning the function ft_topoplotER. > > Originally, my data derives from a 256-channel system, but I only like > to plot a selection of 60 channels above the motor cortex. > This is my Region of Interest. > When I´m now plotting the data from these 60 channels with > ft_topoplotER I receive a figure, which shows the plotted activation > over the whole cortex. > > My Question: Is there a possibility to plot only the activation in my > Region of Interest/over the selected 60 channels above the motor cortex? > > This would result in a figure where there´s only activation shown over > the motor cortex and the rest of the plot is blank/white. > > Thank you very much! > > Kind regards, > Franziska > > > > _______________________________________________ > 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 ben.vanlier at bsse.ethz.ch Wed Aug 7 13:00:31 2013 From: ben.vanlier at bsse.ethz.ch (van Lier Ben) Date: Wed, 7 Aug 2013 11:00:31 +0000 Subject: [FieldTrip] from trials to continuous and an error in selfromraw In-Reply-To: References: Message-ID: Hi Eelke, thanks. its the little things you miss so cfg.trials = 1 works ofcourse :) for plotting all the trials in a continuous spectrum i just merge them into 1 big trial first cfg = []; cfg.trl = [1 max(max(data.sampleinfo)) 0]; data = ft_redefinetrial(cfg, data); perfect for my purposes, im trying to reanalyze old recordings chopped into several files but ft_append puts them in separate trials. liking fieldtrip alot so far, very flexible :) cheers Ben From jm.horschig at donders.ru.nl Wed Aug 7 14:52:32 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 07 Aug 2013 14:52:32 +0200 Subject: [FieldTrip] question about virtual electrode MNI coordinates In-Reply-To: References: Message-ID: <52024310.1020109@donders.ru.nl> Dear Charidimos, thanks very much for pointing to this, it is indeed an error in the appendix of the tutorial. cfg.grid.pos should be based on the subject-specific MRI or sourcemodel. So, correctly it should say that you need to load sourcemodel.mat (i.e. subject specific grid) and then use sourcemodel.pos(maxpowindx, :) The rationale in principle is that the warped grid has the same size and is indexed the same as the original grid; that is why you can use the index variable obtained from the MNI-warped source reconstructed data. The virtual channel reconstruction should however still be done in whatever coordinate system the subject's anatomical data is in. I will update the appendix accordingly. Best, Jörn On 8/6/2013 8:24 PM, Charidimos Tzagarakis wrote: > Hi there, > I have a question regarding virtual electrodes: How can I double check > that the MNI coordinates that I enter are correctly interpreted? > More specifically: > I have followed the the extended beamforming tutorial in the > "Appendix" and have been able to transpose it to my data (I have > 4D/BTi MEG files and Dicom mri volumes).The part I am not certain > about is the call to the LCMV beamformer. > Here it is in my case ( I just want to get the voxel were the power is > max in the previous analysis): > cfg = []; > cfg.method = 'lcmv'; > cfg.vol = volfcm; > cfg.grid.pos = source_diff.pos(maxpowindx, :); > cfg.grid.inside = 1:size(cfg.grid.pos, 1); > cfg.grid.outside = []; > cfg.grad=senscm > source_idx = ft_sourceanalysis(cfg, tlock); > My headmodel does not include MEG channel information so I need to > also define the cfg.grad parameter. What I don't understand is how > cfg.grid.pos (which is in MNI coordinates as per the previous part of > the tutorial) can be correctly applied to the coordinates of the > headmodel and the channels since these 2 are not in MNI coordinates > (in my case they are in 4d/Bti coordinates and rescaled to cm).In the > previous part of the tutorial this is (if I understand correctly) > accomplished because the leadfield used when calling ft_sourceanalysis > was created using and MNI-warped template. I don't see where the > equivalent part is when estimating the virtual electrode though. > Any advice you may have would be much appreciated. > Best, > Haris > > > Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych > University of Minnesota Dept of Neuroscience and Brain Sciences Center > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From annevanhoogmoed at email.arizona.edu Thu Aug 8 05:51:47 2013 From: annevanhoogmoed at email.arizona.edu (van Hoogmoed, Anne H - (annevanhoogmoed)) Date: Thu, 8 Aug 2013 03:51:47 +0000 Subject: [FieldTrip] reading in and segmenting Netstation data Message-ID: Dear all, I'm using Fieldtrip to analyze my Netstation data. The problem is that the segmented data (incl triggers) are shifted in Fieldtrip as compared to the Netstation analysis. I've checked several things: - The events are the same in Netstation and Fieldtrip - The raw data look the same in both programs - Fieldtrip produces the right trl based on the triggers. The script I'm using is this: cfg = []; cfg.dataset = 'c007_raw'; cfg.continuous = 'yes'; data_eeg = ft_preprocessing(cfg); hdr = ft_read_header('c007_raw'); event = ft_read_event('c007_raw'); cfg = []; cfg.trialfun = 'trialfun_first_enc'; cfg_trials = ft_definetrial(cfg); data_trials = ft_redefinetrial(cfg_trials, data_eeg); The trialfun I'm using is this: function [trl, event] = trialfun_first(cfg) load event; load hdr; value = [event.value]; sample = [event.sample]; % determine the number of samples before and after the trigger pretrig = -100; % = 200 ms posttrig = 400; % = 800 ms % for each trigger trl = []; for j = 1:length(event) if (strcmp(event(1,j).value, '+Lrt') || strcmp(event(1,j).value, '+OOt')) || strcmp(event(1,j).value, '+SOt') trlbegin = event(1,j).sample + pretrig; trlend = event(1,j).sample + posttrig; offset = pretrig; newtrl = [trlbegin trlend offset]; trl = [trl; newtrl]; end j = j + 1; end Does anyone know what I'm doing wrong here? Thank you very much for your help! Kind regards, Anne Anne van Hoogmoed Down Syndrome Research Group Department of Psychology, University of Arizona -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.lozanosoldevilla at fcdonders.ru.nl Thu Aug 8 08:12:42 2013 From: d.lozanosoldevilla at fcdonders.ru.nl (Lozano Soldevilla, D. (Diego)) Date: Thu, 8 Aug 2013 08:12:42 +0200 (CEST) Subject: [FieldTrip] reading in and segmenting Netstation data In-Reply-To: Message-ID: <1178733115.2232641.1375942362693.JavaMail.root@sculptor.zimbra.ru.nl> Hi Anne, What do you mean by "shifted"? Time samples mismatch might be? I don't see what's going wrong with the code you pasted but it'd be nice if you could file a bug (I'll assign to me) with a piece of preprocessed data with fieldtrip and a plot about how data looks like with Netstation to have a bit more info. best, Diego ps : do you have a non-integer eeg sampling rate, like 511.3Hz? ----- Original Message ----- > From: "van Hoogmoed , Anne H - ( annevanhoogmoed )" < annevanhoogmoed > @email. arizona . edu > > To: fieldtrip @science. ru . nl > Sent: Thursday, 8 August, 2013 5:51:47 AM > Subject: [ FieldTrip ] reading in and segmenting Netstation data > Dear all, > I'm using Fieldtrip to analyze my Netstation data. The problem is that > the segmented data (incl triggers) are shifted in Fieldtrip as > compared to the Netstation analysis. > I've checked several things: > - The events are the same in Netstation and Fieldtrip > - The raw data look the same in both programs > - Fieldtrip produces the right trl based on the triggers. > The script I'm using is this: > cfg = []; > cfg . dataset = 'c007_ raw' ; > cfg .continuous = 'yes' ; > data_ eeg = ft_ preprocessing ( cfg ); > hdr = ft_read_header( 'c007_ raw' ); > event = ft_read_event( 'c007_ raw' ); > cfg = []; > cfg . trialfun = 'trialfun _first_ enc' ; > cfg _trials = ft_ definetrial ( cfg ); > data_trials = ft_ redefinetrial ( cfg _trials, data_ eeg ); > The trialfun I'm using is this: > function [ trl , event] = trialfun _first( cfg ) > load event ; > load hdr ; > value = [event.value]; > sample = [event.sample]; > % determine the number of samples before and after the trigger > pretrig = -100; % = 200 ms > posttrig = 400; % = 800 ms > % for each trigger > trl = []; > for j = 1:length(event) > if ( strcmp (event(1,j).value, '+ Lrt' ) || strcmp (event(1,j).value, > '+ OOt' )) || strcmp (event(1,j).value, '+ SOt' ) > trlbegin = event(1,j).sample + pretrig ; > trlend = event(1,j).sample + posttrig ; > offset = pretrig ; > newtrl = [ trlbegin trlend offset]; > trl = [ trl ; newtrl ]; > end > j = j + 1; > end > Does anyone know what I'm doing wrong here? > Thank you very much for your help! > Kind regards, > Anne > Anne van Hoogmoed > Down Syndrome Research Group > Department of Psychology, University of Arizona > _______________________________________________ > fieldtrip mailing list > fieldtrip @ donders . ru . nl > http ://mailman.science. ru . nl /mailman/ listinfo / fieldtrip -- PhD Student Neuronal Oscillations Group Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen NL-6525 EN Nijmegen The Netherlands http :// www . ru . nl /people/ donders /lozano-soldevilla-d/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From elisa at csl.psychol.cam.ac.uk Thu Aug 8 12:23:53 2013 From: elisa at csl.psychol.cam.ac.uk (Elisa Carrus) Date: Thu, 08 Aug 2013 11:23:53 +0100 Subject: [FieldTrip] question about virtual electrode MNI coordinates In-Reply-To: <52024310.1020109@donders.ru.nl> References: <52024310.1020109@donders.ru.nl> Message-ID: <520371B9.8060101@csl.psychol.cam.ac.uk> Hi all, From the previous email it seems that I'm doing something wrong then. I have previously used the MNI-aligned subject grid (warped template) for the positions, hence I didn't encounter any problem. However, this seems to be wrong, as Jorn suggested. The question is the following: The sourcediff.avg.pow is produced using the warped MNI template, therefore the grid positions and indexes will be different from the subject-specific MRI. Specifically in my case, the warped template has 11000 x 3 pos, whereas the subject-specific has 2652 x 3. My question is, when I therefore index the maxpos using: [maxval, maxind] = max(sourcediff.avg.pow), my index is 3171, which exceeds the matrix dimensions of the subject-specific MRI (2652). Which step am I missing? Thanks for your help in advance, Elisa On 07/08/2013 13:52, "Jörn M. Horschig" wrote: > Dear Charidimos, > > thanks very much for pointing to this, it is indeed an error in the > appendix of the tutorial. cfg.grid.pos should be based on the > subject-specific MRI or sourcemodel. So, correctly it should say that > you need to load sourcemodel.mat (i.e. subject specific grid) and then > use sourcemodel.pos(maxpowindx, :) > The rationale in principle is that the warped grid has the same size > and is indexed the same as the original grid; that is why you can use > the index variable obtained from the MNI-warped source reconstructed > data. The virtual channel reconstruction should however still be done > in whatever coordinate system the subject's anatomical data is in. I > will update the appendix accordingly. > > Best, > Jörn > > On 8/6/2013 8:24 PM, Charidimos Tzagarakis wrote: >> Hi there, >> I have a question regarding virtual electrodes: How can I double >> check that the MNI coordinates that I enter are correctly interpreted? >> More specifically: >> I have followed the the extended beamforming tutorial in the >> "Appendix" and have been able to transpose it to my data (I have >> 4D/BTi MEG files and Dicom mri volumes).The part I am not certain >> about is the call to the LCMV beamformer. >> Here it is in my case ( I just want to get the voxel were the power >> is max in the previous analysis): >> cfg = []; >> cfg.method = 'lcmv'; >> cfg.vol = volfcm; >> cfg.grid.pos = source_diff.pos(maxpowindx, :); >> cfg.grid.inside = 1:size(cfg.grid.pos, 1); >> cfg.grid.outside = []; >> cfg.grad=senscm >> source_idx = ft_sourceanalysis(cfg, tlock); >> My headmodel does not include MEG channel information so I need to >> also define the cfg.grad parameter. What I don't understand is how >> cfg.grid.pos (which is in MNI coordinates as per the previous part of >> the tutorial) can be correctly applied to the coordinates of the >> headmodel and the channels since these 2 are not in MNI coordinates >> (in my case they are in 4d/Bti coordinates and rescaled to cm).In the >> previous part of the tutorial this is (if I understand correctly) >> accomplished because the leadfield used when calling >> ft_sourceanalysis was created using and MNI-warped template. I don't >> see where the equivalent part is when estimating the virtual >> electrode though. >> Any advice you may have would be much appreciated. >> Best, >> Haris >> >> >> Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych >> University of Minnesota Dept of Neuroscience and Brain Sciences Center >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail:jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web:http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Aug 8 13:45:09 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 08 Aug 2013 13:45:09 +0200 Subject: [FieldTrip] question about virtual electrode MNI coordinates In-Reply-To: <520371B9.8060101@csl.psychol.cam.ac.uk> References: <52024310.1020109@donders.ru.nl> <520371B9.8060101@csl.psychol.cam.ac.uk> Message-ID: <520384C5.80703@donders.ru.nl> Dear Elisa, hard to tell, because you are not telling us exactly what you are doing :) The idea in the extended beamforming tutorial is that you first create an MNI template sourcemodel (or grid). Subsequently, you use exactly this grid and spatially transform it such that it fits to the subject-specific brain, based on the MRI. After following these steps, by definition, the number of grid points in the subject-specific grid and the MNI grid are the same - just the place where the grid points end up did change. (Otherwise, it would also not be possible to replace the .pos field from the source-reconstructed data by the template grid, as being done in the plotting part of the tutorial). The problem in the tutorial was exactly this replacement of the position description (which iself can be a perfectly fine step as e.g. earlier in the tutorial). Since we provide a sourcemodel based on the subject's mri, we need to specify the position based on that mri/sourcemodel and not based on the MNI template. You, obviously, do not have the same number of grid points for the subject-specific sourcemodel as in the template sourcemodel. I cannot guarantee that what you did is correct, but at least I can tell you that what you did is not affects by this - else you would have had the same number of elements for both sourcemodels. I cross my fingers that you're doing the right thing :) Best, Jörn On 8/8/2013 12:23 PM, Elisa Carrus wrote: > Hi all, > > From the previous email it seems that I'm doing something wrong then. > I have previously used the MNI-aligned subject grid (warped template) > for the positions, hence I didn't encounter any problem. However, this > seems to be wrong, as Jorn suggested. The question is the following: > > The sourcediff.avg.pow is produced using the warped MNI template, > therefore the grid positions and indexes will be different from the > subject-specific MRI. Specifically in my case, the warped template has > 11000 x 3 pos, whereas the subject-specific has 2652 x 3. > My question is, when I therefore index the maxpos using: > > [maxval, maxind] = max(sourcediff.avg.pow), my index is 3171, which > exceeds the matrix dimensions of the subject-specific MRI (2652). > > Which step am I missing? > > Thanks for your help in advance, > Elisa > > > > > > > On 07/08/2013 13:52, "Jörn M. Horschig" wrote: >> Dear Charidimos, >> >> thanks very much for pointing to this, it is indeed an error in the >> appendix of the tutorial. cfg.grid.pos should be based on the >> subject-specific MRI or sourcemodel. So, correctly it should say that >> you need to load sourcemodel.mat (i.e. subject specific grid) and >> then use sourcemodel.pos(maxpowindx, :) >> The rationale in principle is that the warped grid has the same size >> and is indexed the same as the original grid; that is why you can use >> the index variable obtained from the MNI-warped source reconstructed >> data. The virtual channel reconstruction should however still be done >> in whatever coordinate system the subject's anatomical data is in. I >> will update the appendix accordingly. >> >> Best, >> Jörn >> >> On 8/6/2013 8:24 PM, Charidimos Tzagarakis wrote: >>> Hi there, >>> I have a question regarding virtual electrodes: How can I double >>> check that the MNI coordinates that I enter are correctly interpreted? >>> More specifically: >>> I have followed the the extended beamforming tutorial in the >>> "Appendix" and have been able to transpose it to my data (I have >>> 4D/BTi MEG files and Dicom mri volumes).The part I am not certain >>> about is the call to the LCMV beamformer. >>> Here it is in my case ( I just want to get the voxel were the power >>> is max in the previous analysis): >>> cfg = []; >>> cfg.method = 'lcmv'; >>> cfg.vol = volfcm; >>> cfg.grid.pos = source_diff.pos(maxpowindx, :); >>> cfg.grid.inside = 1:size(cfg.grid.pos, 1); >>> cfg.grid.outside = []; >>> cfg.grad=senscm >>> source_idx = ft_sourceanalysis(cfg, tlock); >>> My headmodel does not include MEG channel information so I need to >>> also define the cfg.grad parameter. What I don't understand is how >>> cfg.grid.pos (which is in MNI coordinates as per the previous part >>> of the tutorial) can be correctly applied to the coordinates of the >>> headmodel and the channels since these 2 are not in MNI coordinates >>> (in my case they are in 4d/Bti coordinates and rescaled to cm).In >>> the previous part of the tutorial this is (if I understand >>> correctly) accomplished because the leadfield used when calling >>> ft_sourceanalysis was created using and MNI-warped template. I don't >>> see where the equivalent part is when estimating the virtual >>> electrode though. >>> Any advice you may have would be much appreciated. >>> Best, >>> Haris >>> >>> >>> Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych >>> University of Minnesota Dept of Neuroscience and Brain Sciences Center >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> -- >> Jörn M. Horschig >> PhD Student >> Donders Institute for Brain, Cognition and Behaviour >> Centre for Cognitive Neuroimaging >> Radboud University Nijmegen >> Neuronal Oscillations Group >> FieldTrip Development Team >> >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Contact: >> E-Mail:jm.horschig at donders.ru.nl >> Tel: +31-(0)24-36-68493 >> Web:http://www.ru.nl/donders >> >> Visiting address: >> Trigon, room 2.30 >> Kapittelweg 29 >> NL-6525 EN Nijmegen >> The Netherlands >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From K.Kalogianni at tudelft.nl Fri Aug 9 09:59:18 2013 From: K.Kalogianni at tudelft.nl (Konstantina Kalogianni) Date: Fri, 9 Aug 2013 07:59:18 +0000 Subject: [FieldTrip] ft_sourcegrandaverage & grid computation Message-ID: <4DF682D3A10EAC46B462A46E16F0B049128EE308@SRV364.tudelft.net> Dear fieldtripers, I have experienced a problem with ft_sourcegrandaverage and the calculation of my grid and I want to ask for help. The error I get is the following :different grid locations in source reconstructions. I will describe briefly the processing to give you a better idea about my error. For every subject I have 6 conditions and I want to average all subjects per condition. After preprocessing I calculate the covariance matrix and then I use the MUSIC algorithm for my sources. For the grid calculation I use a default MRI a default VOL and a default electrodes' positions. However for every subject the grid is not identical since cfg.channel in ft_prepare_leadfield is dependent on the channels I've discarded as noisy during the preprocessing. By the way for the grid calculation I had to change the order of cfg.elec because it didn't agree with the order of cfg,channel in my data. So apparently I end up with a different grid for every subject but still I want to average all of them per condition. Do I have to use another function to average my sources in this case? Because the grid would never be identical among subjects. I hope somebody out there experienced that before and can probably help me. Thank you. Konstantina [Nadia] Kalogianni PhD candidate, TU Delft -------------- next part -------------- An HTML attachment was scrubbed... URL: From elisa at csl.psychol.cam.ac.uk Fri Aug 9 11:25:15 2013 From: elisa at csl.psychol.cam.ac.uk (Elisa Carrus) Date: Fri, 09 Aug 2013 10:25:15 +0100 Subject: [FieldTrip] question about virtual electrode MNI coordinates In-Reply-To: <520384C5.80703@donders.ru.nl> References: <52024310.1020109@donders.ru.nl> <520371B9.8060101@csl.psychol.cam.ac.uk> <520384C5.80703@donders.ru.nl> Message-ID: <5204B57B.6040004@csl.psychol.cam.ac.uk> Dear Jorn, ah, I apologise for not writing a complete email! The good news is that I've done things correctly so far, as I do have the same number of grid points in both the subject-specific and template, as expected :) I gave you the wrong indices because I thought that in your previous email you referred to the MRI rather than the sourcemodel. My bad. Sorry for the misunderstanding and thanks a lot for explaining this again! Best, Elisa On 08/08/2013 12:45, "Jörn M. Horschig" wrote: > Dear Elisa, > > hard to tell, because you are not telling us exactly what you are > doing :) > The idea in the extended beamforming tutorial is that you first create > an MNI template sourcemodel (or grid). Subsequently, you use exactly > this grid and spatially transform it such that it fits to the > subject-specific brain, based on the MRI. After following these steps, > by definition, the number of grid points in the subject-specific grid > and the MNI grid are the same - just the place where the grid points > end up did change. (Otherwise, it would also not be possible to > replace the .pos field from the source-reconstructed data by the > template grid, as being done in the plotting part of the tutorial). > The problem in the tutorial was exactly this replacement of the > position description (which iself can be a perfectly fine step as e.g. > earlier in the tutorial). Since we provide a sourcemodel based on the > subject's mri, we need to specify the position based on that > mri/sourcemodel and not based on the MNI template. > > You, obviously, do not have the same number of grid points for the > subject-specific sourcemodel as in the template sourcemodel. I cannot > guarantee that what you did is correct, but at least I can tell you > that what you did is not affects by this - else you would have had the > same number of elements for both sourcemodels. I cross my fingers that > you're doing the right thing :) > > Best, > Jörn > > On 8/8/2013 12:23 PM, Elisa Carrus wrote: >> Hi all, >> >> From the previous email it seems that I'm doing something wrong then. >> I have previously used the MNI-aligned subject grid (warped template) >> for the positions, hence I didn't encounter any problem. However, >> this seems to be wrong, as Jorn suggested. The question is the following: >> >> The sourcediff.avg.pow is produced using the warped MNI template, >> therefore the grid positions and indexes will be different from the >> subject-specific MRI. Specifically in my case, the warped template >> has 11000 x 3 pos, whereas the subject-specific has 2652 x 3. >> My question is, when I therefore index the maxpos using: >> >> [maxval, maxind] = max(sourcediff.avg.pow), my index is 3171, which >> exceeds the matrix dimensions of the subject-specific MRI (2652). >> >> Which step am I missing? >> >> Thanks for your help in advance, >> Elisa >> >> >> >> >> >> >> On 07/08/2013 13:52, "Jörn M. Horschig" wrote: >>> Dear Charidimos, >>> >>> thanks very much for pointing to this, it is indeed an error in the >>> appendix of the tutorial. cfg.grid.pos should be based on the >>> subject-specific MRI or sourcemodel. So, correctly it should say >>> that you need to load sourcemodel.mat (i.e. subject specific grid) >>> and then use sourcemodel.pos(maxpowindx, :) >>> The rationale in principle is that the warped grid has the same size >>> and is indexed the same as the original grid; that is why you can >>> use the index variable obtained from the MNI-warped source >>> reconstructed data. The virtual channel reconstruction should >>> however still be done in whatever coordinate system the subject's >>> anatomical data is in. I will update the appendix accordingly. >>> >>> Best, >>> Jörn >>> >>> On 8/6/2013 8:24 PM, Charidimos Tzagarakis wrote: >>>> Hi there, >>>> I have a question regarding virtual electrodes: How can I double >>>> check that the MNI coordinates that I enter are correctly interpreted? >>>> More specifically: >>>> I have followed the the extended beamforming tutorial in the >>>> "Appendix" and have been able to transpose it to my data (I have >>>> 4D/BTi MEG files and Dicom mri volumes).The part I am not certain >>>> about is the call to the LCMV beamformer. >>>> Here it is in my case ( I just want to get the voxel were the power >>>> is max in the previous analysis): >>>> cfg = []; >>>> cfg.method = 'lcmv'; >>>> cfg.vol = volfcm; >>>> cfg.grid.pos = source_diff.pos(maxpowindx, :); >>>> cfg.grid.inside = 1:size(cfg.grid.pos, 1); >>>> cfg.grid.outside = []; >>>> cfg.grad=senscm >>>> source_idx = ft_sourceanalysis(cfg, tlock); >>>> My headmodel does not include MEG channel information so I need to >>>> also define the cfg.grad parameter. What I don't understand is how >>>> cfg.grid.pos (which is in MNI coordinates as per the previous part >>>> of the tutorial) can be correctly applied to the coordinates of the >>>> headmodel and the channels since these 2 are not in MNI coordinates >>>> (in my case they are in 4d/Bti coordinates and rescaled to cm).In >>>> the previous part of the tutorial this is (if I understand >>>> correctly) accomplished because the leadfield used when calling >>>> ft_sourceanalysis was created using and MNI-warped template. I >>>> don't see where the equivalent part is when estimating the virtual >>>> electrode though. >>>> Any advice you may have would be much appreciated. >>>> Best, >>>> Haris >>>> >>>> >>>> Charidimos [Haris] Tzagarakis MD, PhD, MRCPsych >>>> University of Minnesota Dept of Neuroscience and Brain Sciences Center >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> >>> -- >>> Jörn M. Horschig >>> PhD Student >>> Donders Institute for Brain, Cognition and Behaviour >>> Centre for Cognitive Neuroimaging >>> Radboud University Nijmegen >>> Neuronal Oscillations Group >>> FieldTrip Development Team >>> >>> P.O. Box 9101 >>> NL-6500 HB Nijmegen >>> The Netherlands >>> >>> Contact: >>> E-Mail:jm.horschig at donders.ru.nl >>> Tel: +31-(0)24-36-68493 >>> Web:http://www.ru.nl/donders >>> >>> Visiting address: >>> Trigon, room 2.30 >>> Kapittelweg 29 >>> NL-6525 EN Nijmegen >>> The Netherlands >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > FieldTrip Development Team > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail:jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web:http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > 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 g.dimitriadis at donders.ru.nl Fri Aug 9 17:22:50 2013 From: g.dimitriadis at donders.ru.nl (Dimitriadis, G. (George)) Date: Fri, 9 Aug 2013 17:22:50 +0200 (CEST) Subject: [FieldTrip] Error from postamble Message-ID: <1463263304.1956192.1376061770792.JavaMail.root@monoceros.zimbra.ru.nl> Hello guys, I seem to be getting an error relating to the generation of warnings withing the postamble. I am not doing anything that I haven't been doing for the past year. I had problems with the preamble (due to large file sizes) before and I am doing the cfg.stackcallinfo = 'no' trick. But now I am getting the following series of errors: --------------------------------------------------- Warning: '@(hObject,eventdata)mainRatAnalysisGUI('pushbutton_run_analysis_Callback',hObject,eventdata,guidata(hObject))' exceeds MATLAB's maximum name length of 63 characters and has been truncated to '@(hObject,eventdata)mainRatAnalysisGUI('pushbutton_run_analysis'. > In utilities/private/warning_once>fieldnameFromStack at 196 In utilities/private/warning_once at 123 In utilities/private/ft_postamble_history at 55 In ft_postamble at 55 In ft_preprocessing at 611 In gd_eri_preprocratdata at 71 In gd_eri_getratdatasignals at 39 In mainRatAnalysisGUI>pushbutton_run_analysis_Callback at 120 In gui_mainfcn at 96 In mainRatAnalysisGUI at 42 In @(hObject,eventdata)mainRatAnalysisGUI('pushbutton_run_analysis_Callback',hObject,eventdata,guidata(hObject)) Invalid field name: '@(hObject,eventdata)mainRatAnalysisGUI('pushbutton_run_analysis'. Error in warning_once>fieldnameFromStack (line 196) ft_previous_warnings.(stack(end).name) = []; % iteratively build up structure fields Error in warning_once (line 123) [tmpfname ft_default.warning.identifier line] = fieldnameFromStack(ft_default.warning.identifier); Error in ft_postamble_history (line 55) warning_once('-clear'); Error in ft_postamble (line 55) evalin('caller', ['ft_postamble_' cmd]); Error in ft_preprocessing (line 611) ft_postamble history data Error in gd_eri_preprocratdata (line 71) datacell{datindx}=ft_preprocessing(cfg_pp); Error in gd_eri_getratdatasignals (line 39) data=gd_eri_preprocratdata(cfg); Error in mainRatAnalysisGUI>pushbutton_run_analysis_Callback (line 120) data =gd_eri_getratdatasignals(cfg); Error in gui_mainfcn (line 96) feval(varargin{:}); Error in mainRatAnalysisGUI (line 42) gui_mainfcn(gui_State, varargin{:}); Error in @(hObject,eventdata)mainRatAnalysisGUI('pushbutton_run_analysis_Callback',hObject,eventdata,guidata(hObject)) Error while evaluating uicontrol Callback ---------------------------------------- I am calling my original function from within a gui. So it seems that in the postamble_history a warning gets generated which then throws an error for some reason I would really like not to have to find out by myself. Thanks for your time George Dimitriadis From r.cox at uva.nl Tue Aug 13 11:29:23 2013 From: r.cox at uva.nl (Roy Cox) Date: Tue, 13 Aug 2013 11:29:23 +0200 Subject: [FieldTrip] ft_freqstatistics Message-ID: Hi, Can anyone tell me how fieldtrip selects freq bins when calling ft_freqstatistics with cfg.frequency? That is, if I'm interested in two freq bands from, say, 10 to 20, and from 20 to 30 Hz, and I don't want a freq bin to be used twice, do I use cfg.frequency=[10 20] and cfg.frequency=[20 30]? Or would the freq bin closest to 20 be used twice? I guess I'm asking how precisely the find function (with arguments 'first', 'last') is applied. Best, 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 hweeling.lee at gmail.com Wed Aug 14 16:51:23 2013 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Wed, 14 Aug 2013 16:51:23 +0200 Subject: [FieldTrip] newbie Message-ID: Hi to all! I'm new to fieldtrip! I have a dataset that has been corrected for scanner artifacts and BC artifacts using Brainvision Analyser. I would like to export the corrected data as a .eeg file so that I can load the data onto Matlab and use fieldtrip to perform further analyses. However, I kept getting error messages from Matlab that the sub-file format is unsupported. I've been searching online the best way to export the corrected data from Brainvision Analyser, however, I could not find any solution at all. Would anyone please kindly instruct me the settings that I should have when I export the corrected data? Thanks! Best wishes, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From elisa at csl.psychol.cam.ac.uk Wed Aug 14 17:32:42 2013 From: elisa at csl.psychol.cam.ac.uk (Elisa Carrus) Date: Wed, 14 Aug 2013 16:32:42 +0100 Subject: [FieldTrip] newbie In-Reply-To: References: Message-ID: <520BA31A.9040803@csl.psychol.cam.ac.uk> Hi Hweeling, Welcome! Can you give us a bit more information about the script you used to load the data? I haven't used BrainVision before but you should be able to read the .eeg data directly from Fieldtrip http://fieldtrip.fcdonders.nl/dataformat Best, Elisa On 14/08/2013 15:51, Hwee Ling Lee wrote: > Hi to all! > > I'm new to fieldtrip! I have a dataset that has been corrected for > scanner artifacts and BC artifacts using Brainvision Analyser. I would > like to export the corrected data as a .eeg file so that I can load > the data onto Matlab and use fieldtrip to perform further analyses. > > However, I kept getting error messages from Matlab that the sub-file > format is unsupported. I've been searching online the best way to > export the corrected data from Brainvision Analyser, however, I could > not find any solution at all. > > Would anyone please kindly instruct me the settings that I should have > when I export the corrected data? > > Thanks! > > Best wishes, > 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 r.oostenveld at donders.ru.nl Wed Aug 14 21:34:02 2013 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 14 Aug 2013 21:34:02 +0200 Subject: [FieldTrip] newbie In-Reply-To: References: Message-ID: Hi Hweeling The channel level data in the BrainVision data file can be represented in ascii and binary format. Furthermore, the order can be one channel at a time or sample-by-sample. Finally there are different numeric precisions (integer, float, etc). This is something that you cannot see from the outside of the file, but if you open the *.vhdr file in a text editor you can see these details. Since there are so many possible combinations of these three factors, it is not difficult easy to support all possible variants. You could try storing the data as multiplexed and in single- or double-precision, which is the most common format. Otherwise, you can report it as feature request on http://bugzilla.fcdonders.nl and attach a small piece of data (with vhdr and vmrk file) there. best regards, Robert On 14 Aug 2013, at 16:51, Hwee Ling Lee wrote: > Hi to all! > > I'm new to fieldtrip! I have a dataset that has been corrected for scanner artifacts and BC artifacts using Brainvision Analyser. I would like to export the corrected data as a .eeg file so that I can load the data onto Matlab and use fieldtrip to perform further analyses. > > However, I kept getting error messages from Matlab that the sub-file format is unsupported. I've been searching online the best way to export the corrected data from Brainvision Analyser, however, I could not find any solution at all. > > Would anyone please kindly instruct me the settings that I should have when I export the corrected data? > > Thanks! > > Best wishes, > Hweeling > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From gopalar.ccf at gmail.com Wed Aug 14 22:58:34 2013 From: gopalar.ccf at gmail.com (Raghavan Gopalakrishnan) Date: Wed, 14 Aug 2013 16:58:34 -0400 Subject: [FieldTrip] Reading multiple NEX files Message-ID: I have multiple nex files that have LFP and spike data. I would like to read them and plot one raster, since the multple nex files are from same subject. ft_appendspike does not append data structures with same channel label. All my data structures from different nex files have same channel label. Any ideas? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hweeling.lee at gmail.com Thu Aug 15 11:34:33 2013 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 15 Aug 2013 11:34:33 +0200 Subject: [FieldTrip] EEG sensor position layout Message-ID: Hi all! After performing ICA, I used the command to browse the data in component mode. However, I got a warning message: Warning: No layout specified - will try to construct one using sensor positions > In ft_databrowser at 217 Error using ft_databrowser (line 223) cannot infer sensor type I understand that one can manually create the layout, however, I was not sure how I can do it. Could someone please help? Thank you. Best regards, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at donders.ru.nl Thu Aug 15 12:45:51 2013 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Thu, 15 Aug 2013 12:45:51 +0200 Subject: [FieldTrip] EEG sensor position layout In-Reply-To: References: Message-ID: Dear Hweeling, You should indeed specify cfg.layout, naming the layout file for the data that you have. You can first check in the folder fieldtrip/template/layout to see if there is already an existing template that you can use. If not, please see ft_prepare_layout for more details. If you're still stuck, please ask again with more specific details on your layout. Best, Johanna 2013/8/15 Hwee Ling Lee > Hi all! > > After performing ICA, I used the command to browse the data in component > mode. > > However, I got a warning message: > > Warning: No layout specified - will try to construct one using sensor > positions > > In ft_databrowser at 217 > Error using ft_databrowser (line 223) > cannot infer sensor type > > I understand that one can manually create the layout, however, I was not > sure how I can do it. Could someone please help? > > Thank you. > > 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 hweeling.lee at gmail.com Thu Aug 15 13:21:19 2013 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 15 Aug 2013 13:21:19 +0200 Subject: [FieldTrip] EEG sensor position layout again Message-ID: Hi, A bit more details about my setup. I'm using a Easycap MRI compatible 128 channels cap. I tried to search for a layout on the templates/layout, and I found one that might closest fit to my needs ('QuikCap_NSL_128'). To view my components, I tried these series of commands: cfg = []; cfg.viewmode = 'component'; cfg.continuous = 'yes'; cfg.layout = ft_prepare_layout('QuikCap_NSL_128'); ft_databrowser(cfg,ic_data); However, I was prompted with error messages: Warning: Struct field assignment overwrites a value with class "char". See MATLAB R14SP2 Release Notes, Assigning Nonstructure Variables As Structures Displays Warning, for details. > In utilities\private\ft_preamble_provenance at 49 In ft_preamble at 54 In ft_prepare_layout at 91 Error using ft_prepare_layout (line 582) no layout detected, please specify cfg.layout Also when I tried the command, cfg = []; cfg.viewmode = 'component'; cfg.continuous = 'yes'; cfg.layout = 'QuikCap_NSL_128'; ft_databrowser(cfg,ic_data); I get this error message: Warning: could not open QuikCap_NSL_128 > In fileio\private\warning_once at 116 In fileio\private\filetype_check_header at 54 In ft_filetype at 328 In ft_prepare_layout at 253 In ft_databrowser at 226 Warning: could not determine filetype of QuikCap_NSL_128 > In fileio\private\warning_once at 116 In ft_filetype at 1115 In ft_prepare_layout at 253 In ft_databrowser at 226 creating layout from electrode file QuikCap_NSL_128 Error using ft_read_sens (line 68) file 'QuikCap_NSL_128' does not exist Error in ft_prepare_layout (line 275) lay = sens2lay(ft_read_sens(cfg.layout), cfg.rotate, cfg.projection, cfg.style, cfg.overlap); Error in ft_databrowser (line 226) cfg.layout = ft_prepare_layout(tmpcfg); Would anyone please help? Cheers, Hweeling -------------- next part -------------- An HTML attachment was scrubbed... URL: From johanna.zumer at gmail.com Thu Aug 15 13:33:57 2013 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Thu, 15 Aug 2013 13:33:57 +0200 Subject: [FieldTrip] EEG sensor position layout again In-Reply-To: References: Message-ID: Hi Hweeling, Since it says that it cannot find the Quikcap file, it sounds like it's not on your path. Run ft_defaults on your Matlab command, then test if the file is on your path: >> ft_defaults >> which QuikCap_NSL_128.mat Assuming it finds the file on your path, then do you still get the browser error? Best, Johanna 2013/8/15 Hwee Ling Lee > Hi, > > A bit more details about my setup. > > I'm using a Easycap MRI compatible 128 channels cap. I tried to search for > a layout on the templates/layout, and I found one that might closest fit to > my needs ('QuikCap_NSL_128'). > To view my components, I tried these series of commands: > > cfg = []; > cfg.viewmode = 'component'; > cfg.continuous = 'yes'; > cfg.layout = ft_prepare_layout('QuikCap_NSL_128'); > ft_databrowser(cfg,ic_data); > > However, I was prompted with error messages: > Warning: Struct field assignment overwrites a value with class "char". See > MATLAB R14SP2 Release Notes, Assigning Nonstructure > Variables As Structures Displays Warning, for details. > > In utilities\private\ft_preamble_provenance at 49 > In ft_preamble at 54 > In ft_prepare_layout at 91 > Error using ft_prepare_layout (line 582) > no layout detected, please specify cfg.layout > > Also when I tried the command, > > cfg = []; > cfg.viewmode = 'component'; > cfg.continuous = 'yes'; > cfg.layout = 'QuikCap_NSL_128'; > ft_databrowser(cfg,ic_data); > > I get this error message: > Warning: could not open QuikCap_NSL_128 > > In fileio\private\warning_once at 116 > In fileio\private\filetype_check_header at 54 > In ft_filetype at 328 > In ft_prepare_layout at 253 > In ft_databrowser at 226 > Warning: could not determine filetype of QuikCap_NSL_128 > > In fileio\private\warning_once at 116 > In ft_filetype at 1115 > In ft_prepare_layout at 253 > In ft_databrowser at 226 > creating layout from electrode file QuikCap_NSL_128 > Error using ft_read_sens (line 68) > file 'QuikCap_NSL_128' does not exist > > Error in ft_prepare_layout (line 275) > lay = sens2lay(ft_read_sens(cfg.layout), cfg.rotate, cfg.projection, > cfg.style, cfg.overlap); > > Error in ft_databrowser (line 226) > cfg.layout = ft_prepare_layout(tmpcfg); > > > Would anyone please help? > > Cheers, > 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 hweeling.lee at gmail.com Thu Aug 15 13:59:17 2013 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 15 Aug 2013 13:59:17 +0200 Subject: [FieldTrip] EEG sensor position layout again In-Reply-To: References: Message-ID: Hi, It states that: 'QuikCap_NSL_128.mat' not found. However, when I checked fieldtrip/templates/layout, the mat file is stored in this folder. Cheers, Hweeling On 15 August 2013 13:33, Johanna Zumer wrote: > Hi Hweeling, > > Since it says that it cannot find the Quikcap file, it sounds like it's > not on your path. Run ft_defaults on your Matlab command, then test if > the file is on your path: > >> ft_defaults > >> which QuikCap_NSL_128.mat > > Assuming it finds the file on your path, then do you still get the browser > error? > > Best, > Johanna > > > 2013/8/15 Hwee Ling Lee > >> Hi, >> >> A bit more details about my setup. >> >> I'm using a Easycap MRI compatible 128 channels cap. I tried to search >> for a layout on the templates/layout, and I found one that might closest >> fit to my needs ('QuikCap_NSL_128'). >> To view my components, I tried these series of commands: >> >> cfg = []; >> cfg.viewmode = 'component'; >> cfg.continuous = 'yes'; >> cfg.layout = ft_prepare_layout('QuikCap_NSL_128'); >> ft_databrowser(cfg,ic_data); >> >> However, I was prompted with error messages: >> Warning: Struct field assignment overwrites a value with class "char". >> See MATLAB R14SP2 Release Notes, Assigning Nonstructure >> Variables As Structures Displays Warning, for details. >> > In utilities\private\ft_preamble_provenance at 49 >> In ft_preamble at 54 >> In ft_prepare_layout at 91 >> Error using ft_prepare_layout (line 582) >> no layout detected, please specify cfg.layout >> >> Also when I tried the command, >> >> cfg = []; >> cfg.viewmode = 'component'; >> cfg.continuous = 'yes'; >> cfg.layout = 'QuikCap_NSL_128'; >> ft_databrowser(cfg,ic_data); >> >> I get this error message: >> Warning: could not open QuikCap_NSL_128 >> > In fileio\private\warning_once at 116 >> In fileio\private\filetype_check_header at 54 >> In ft_filetype at 328 >> In ft_prepare_layout at 253 >> In ft_databrowser at 226 >> Warning: could not determine filetype of QuikCap_NSL_128 >> > In fileio\private\warning_once at 116 >> In ft_filetype at 1115 >> In ft_prepare_layout at 253 >> In ft_databrowser at 226 >> creating layout from electrode file QuikCap_NSL_128 >> Error using ft_read_sens (line 68) >> file 'QuikCap_NSL_128' does not exist >> >> Error in ft_prepare_layout (line 275) >> lay = sens2lay(ft_read_sens(cfg.layout), cfg.rotate, cfg.projection, >> cfg.style, cfg.overlap); >> >> Error in ft_databrowser (line 226) >> cfg.layout = ft_prepare_layout(tmpcfg); >> >> >> Would anyone please help? >> >> Cheers, >> 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 johanna.zumer at gmail.com Thu Aug 15 14:01:39 2013 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Thu, 15 Aug 2013 14:01:39 +0200 Subject: [FieldTrip] EEG sensor position layout again In-Reply-To: References: Message-ID: Hi Hweeling, I just checked on my computer, and it helped to restart matlab and try again. Maybe there is something strange if ft_defaults is called (again) during an already open session with previous calls to FT functions? Best, Johanna 2013/8/15 Hwee Ling Lee > Hi, > > It states that: > 'QuikCap_NSL_128.mat' not found. > > However, when I checked fieldtrip/templates/layout, the mat file is stored > in this folder. > > Cheers, > Hweeling > > > > On 15 August 2013 13:33, Johanna Zumer wrote: > >> Hi Hweeling, >> >> Since it says that it cannot find the Quikcap file, it sounds like it's >> not on your path. Run ft_defaults on your Matlab command, then test if >> the file is on your path: >> >> ft_defaults >> >> which QuikCap_NSL_128.mat >> >> Assuming it finds the file on your path, then do you still get the >> browser error? >> >> Best, >> Johanna >> >> >> 2013/8/15 Hwee Ling Lee >> >>> Hi, >>> >>> A bit more details about my setup. >>> >>> I'm using a Easycap MRI compatible 128 channels cap. I tried to search >>> for a layout on the templates/layout, and I found one that might closest >>> fit to my needs ('QuikCap_NSL_128'). >>> To view my components, I tried these series of commands: >>> >>> cfg = []; >>> cfg.viewmode = 'component'; >>> cfg.continuous = 'yes'; >>> cfg.layout = ft_prepare_layout('QuikCap_NSL_128'); >>> ft_databrowser(cfg,ic_data); >>> >>> However, I was prompted with error messages: >>> Warning: Struct field assignment overwrites a value with class "char". >>> See MATLAB R14SP2 Release Notes, Assigning Nonstructure >>> Variables As Structures Displays Warning, for details. >>> > In utilities\private\ft_preamble_provenance at 49 >>> In ft_preamble at 54 >>> In ft_prepare_layout at 91 >>> Error using ft_prepare_layout (line 582) >>> no layout detected, please specify cfg.layout >>> >>> Also when I tried the command, >>> >>> cfg = []; >>> cfg.viewmode = 'component'; >>> cfg.continuous = 'yes'; >>> cfg.layout = 'QuikCap_NSL_128'; >>> ft_databrowser(cfg,ic_data); >>> >>> I get this error message: >>> Warning: could not open QuikCap_NSL_128 >>> > In fileio\private\warning_once at 116 >>> In fileio\private\filetype_check_header at 54 >>> In ft_filetype at 328 >>> In ft_prepare_layout at 253 >>> In ft_databrowser at 226 >>> Warning: could not determine filetype of QuikCap_NSL_128 >>> > In fileio\private\warning_once at 116 >>> In ft_filetype at 1115 >>> In ft_prepare_layout at 253 >>> In ft_databrowser at 226 >>> creating layout from electrode file QuikCap_NSL_128 >>> Error using ft_read_sens (line 68) >>> file 'QuikCap_NSL_128' does not exist >>> >>> Error in ft_prepare_layout (line 275) >>> lay = sens2lay(ft_read_sens(cfg.layout), cfg.rotate, cfg.projection, >>> cfg.style, cfg.overlap); >>> >>> Error in ft_databrowser (line 226) >>> cfg.layout = ft_prepare_layout(tmpcfg); >>> >>> >>> Would anyone please help? >>> >>> Cheers, >>> 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 hweeling.lee at gmail.com Thu Aug 15 14:13:04 2013 From: hweeling.lee at gmail.com (Hwee Ling Lee) Date: Thu, 15 Aug 2013 14:13:04 +0200 Subject: [FieldTrip] EEG sensor position layout again In-Reply-To: References: Message-ID: Hi, Thanks for your advice. I restarted Matlab, and call for ft_defaults and which QuikCap_NSL_128.mat, and I still get the same error message. Also, is this the right layout file to use for my data? Cheers, Hweeling On 15 August 2013 14:01, Johanna Zumer wrote: > Hi Hweeling, > > I just checked on my computer, and it helped to restart matlab and try > again. Maybe there is something strange if ft_defaults is called (again) > during an already open session with previous calls to FT functions? > > Best, > Johanna > > > 2013/8/15 Hwee Ling Lee > >> Hi, >> >> It states that: >> 'QuikCap_NSL_128.mat' not found. >> >> However, when I checked fieldtrip/templates/layout, the mat file is >> stored in this folder. >> >> Cheers, >> Hweeling >> >> >> >> On 15 August 2013 13:33, Johanna Zumer wrote: >> >>> Hi Hweeling, >>> >>> Since it says that it cannot find the Quikcap file, it sounds like it's >>> not on your path. Run ft_defaults on your Matlab command, then test if >>> the file is on your path: >>> >> ft_defaults >>> >> which QuikCap_NSL_128.mat >>> >>> Assuming it finds the file on your path, then do you still get the >>> browser error? >>> >>> Best, >>> Johanna >>> >>> >>> 2013/8/15 Hwee Ling Lee >>> >>>> Hi, >>>> >>>> A bit more details about my setup. >>>> >>>> I'm using a Easycap MRI compatible 128 channels cap. I tried to search >>>> for a layout on the templates/layout, and I found one that might closest >>>> fit to my needs ('QuikCap_NSL_128'). >>>> To view my components, I tried these series of commands: >>>> >>>> cfg = []; >>>> cfg.viewmode = 'component'; >>>> cfg.continuous = 'yes'; >>>> cfg.layout = ft_prepare_layout('QuikCap_NSL_128'); >>>> ft_databrowser(cfg,ic_data); >>>> >>>> However, I was prompted with error messages: >>>> Warning: Struct field assignment overwrites a value with class "char". >>>> See MATLAB R14SP2 Release Notes, Assigning Nonstructure >>>> Variables As Structures Displays Warning, for details. >>>> > In utilities\private\ft_preamble_provenance at 49 >>>> In ft_preamble at 54 >>>> In ft_prepare_layout at 91 >>>> Error using ft_prepare_layout (line 582) >>>> no layout detected, please specify cfg.layout >>>> >>>> Also when I tried the command, >>>> >>>> cfg = []; >>>> cfg.viewmode = 'component'; >>>> cfg.continuous = 'yes'; >>>> cfg.layout = 'QuikCap_NSL_128'; >>>> ft_databrowser(cfg,ic_data); >>>> >>>> I get this error message: >>>> Warning: could not open QuikCap_NSL_128 >>>> > In fileio\private\warning_once at 116 >>>> In fileio\private\filetype_check_header at 54 >>>> In ft_filetype at 328 >>>> In ft_prepare_layout at 253 >>>> In ft_databrowser at 226 >>>> Warning: could not determine filetype of QuikCap_NSL_128 >>>> > In fileio\private\warning_once at 116 >>>> In ft_filetype at 1115 >>>> In ft_prepare_layout at 253 >>>> In ft_databrowser at 226 >>>> creating layout from electrode file QuikCap_NSL_128 >>>> Error using ft_read_sens (line 68) >>>> file 'QuikCap_NSL_128' does not exist >>>> >>>> Error in ft_prepare_layout (line 275) >>>> lay = sens2lay(ft_read_sens(cfg.layout), cfg.rotate, cfg.projection, >>>> cfg.style, cfg.overlap); >>>> >>>> Error in ft_databrowser (line 226) >>>> cfg.layout = ft_prepare_layout(tmpcfg); >>>> >>>> >>>> Would anyone please help? >>>> >>>> Cheers, >>>> 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 >> ================================================= >> > > -- ================================================= 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 m.kandula at uu.nl Thu Aug 15 18:02:33 2013 From: m.kandula at uu.nl (Manasa Kandula) Date: Thu, 15 Aug 2013 18:02:33 +0200 Subject: [FieldTrip] ft_databrowser No artifact.sampleinfo Message-ID: <520CFB99.4060709@uu.nl> I've been trying to use /ft_databrowser/ on segmented EEG data right after /ft_preprocessing/. However, at the subfunction /redraw_cb/, it's crashing as a call to /ft_fetch_data/ is resulting in an error as /opt.artdata.sampleinfo/ is not a field present in the /opt.artdata/ struct (Error using ==> ft_fetch_data at 60 data does not contain a consistent trial definition, fetching data is not possible). As far as I can tell, there is no point in the code that actually sets the /sampleinfo/ field for the /artifact/ struct. Has anyone else encountered this problem? -------------- next part -------------- An HTML attachment was scrubbed... URL: From pattersons076 at gmail.com Thu Aug 15 20:01:32 2013 From: pattersons076 at gmail.com (Samantha Patterson) Date: Thu, 15 Aug 2013 11:01:32 -0700 Subject: [FieldTrip] Fwd: error using freqdescriptives In-Reply-To: References: Message-ID: Dear Fieldtrippers, l am trying to use ft_freqdescriptives on freq data but i get an error saying Error using ft_checkdata (line 366) This function requires freq or freqmvar data as input. Error in ft_freqdescriptives (line 103) freq = ft_checkdata(freq, 'datatype', {'freq', 'freqmvar'}, 'feedback', 'yes'); Specfied cfg for freqdescriptives is cfg = []; cfg.foilim = [10 35]; cfg.toilim = [1.0 2.5]; cfg.keeptrials = 'yes'; test = ft_freqdescriptives(cfg,freq1); output for freq1: freq1 ans = label: {202x1 cell} dimord: 'rpt_chan_freq_time' freq: [1x22 double] time: [1x201 double] powspctrm: [4-D double] cumtapcnt: [26x18 double] grad: [1x1 struct] cfg: [1x1 struct] trialinfo: [26x3 double] Any thoughts? Thanks!!!!! Samantha -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.Kandula at uu.nl Thu Aug 15 22:26:54 2013 From: M.Kandula at uu.nl (Kandula, M. (Manasa)) Date: Thu, 15 Aug 2013 20:26:54 +0000 Subject: [FieldTrip] ft_databrowser No artifact.sampleinfo In-Reply-To: <520CFB99.4060709@uu.nl> References: <520CFB99.4060709@uu.nl> Message-ID: <48A0B9F7F9A4BD4C836E1CC21805EB7E191D0BFC@ICTSC-W-S203.soliscom.uu.nl> Hey all, A minor correction.. I meant the artdata struct , not the artifact struct. Thanks!! Manasa ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Manasa Kandula [m.kandula at uu.nl] Sent: Thursday, August 15, 2013 6:02 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] ft_databrowser No artifact.sampleinfo I've been trying to use ft_databrowser on segmented EEG data right after ft_preprocessing. However, at the subfunction redraw_cb, it's crashing as a call to ft_fetch_data is resulting in an error as opt.artdata.sampleinfo is not a field present in the opt.artdata struct (Error using ==> ft_fetch_data at 60 data does not contain a consistent trial definition, fetching data is not possible). As far as I can tell, there is no point in the code that actually sets the sampleinfo field for the artifact struct. Has anyone else encountered this problem? -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbj0310 at gmail.com Sun Aug 18 14:31:53 2013 From: mbj0310 at gmail.com (Beom Jun Min) Date: Sun, 18 Aug 2013 21:31:53 +0900 Subject: [FieldTrip] Visualizing grand-averaged ERPs with different channels Message-ID: Dear all. Hello What I want to do is visualizing ERPs in different channels, simultaneously in a single figure window. For example, CZ, CPZ, & PZ or P4 & P5 in a group. I use ft_singleplotER like below *figure; * *cfg = [];* *cfg.ylim = [-8 8];* *cfg.baseline = [-0.2 0];* *cfg.linewidth = [2];* *ft_singleplotER(cfg, group1_CP4, group1_CP3)* I succeeded visualizing 3 different groups simultaneously with certain same channel using the same manner above. (cfg, group1_CZ, group2_CZ) However, when I try the same code with different channels, the result only to show mean value (e.g. mean(CP4). I do not know how to solve it. Please help me. With regards. -- BeomJun Min, M.D. Department of Medical System Engineering (DMSE) Gwangju Institute of Science and Technology (GIST) 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju 500-712, Republic of Korea (South) Phone: +82-62-715-3266 / Fax: +82-62-715-3244 E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr -------------- next part -------------- An HTML attachment was scrubbed... URL: From Sara.Bogels at mpi.nl Mon Aug 19 11:39:54 2013 From: Sara.Bogels at mpi.nl (=?ISO-8859-1?Q?Sara_B=F6gels?=) Date: Mon, 19 Aug 2013 11:39:54 +0200 Subject: [FieldTrip] problem with ft_multiplotER In-Reply-To: <51E6838F.3050302@donders.ru.nl> References: <51E67229.8040001@mpi.nl> <51E6838F.3050302@donders.ru.nl> Message-ID: <5211E7EA.8090907@mpi.nl> Hi Jörn and others, Some time ago, I posted the question below to the mailinglist. I now have had this error many times for both ft_timelockgrandaverage and ft_multiplotER. It happens for some datasets but not others and this appears quite random to me. The error message is: "Subscripted assignment dimension mismatch" Error in ft_timelockgrandaverage (line 182). avgmat(s,:,:) = varargin{s}.(cfg.parameter{k}); It appears to have something to do with the different time limits of the different data I want to average or plot. I use cfg.latency to make sure the latency falls within the time limits of all files but this sometimes still does not help. Any ideas? Thank you, Sara "Jörn M. Horschig" wrote: > Dear Sara, > > What you describe sounds like a bug to me. It looks like that in these > lines the averages of the two conditions should be concatenated into one > matrix, and apparently something goes wrong. However, you truncated the > error message a bit (you pasted the line where the error occurs, but not > the error message itself). If one of us developers should look into this > further, it would be great if you register and create a bugreport on > bugzilla.fconders.nl. Preferably would be to upload a snippet of your > data, e.g. timelockstructures of one participant, and some lines of code > which reproduce the error. We can then look into this further and fix > this as soon as possible :) > > Best, > Jörn > > On 7/17/2013 12:30 PM, Sara Bögels wrote: >> Hi all, >> >> I have a very specific problem with the ft_multiplotER function. For 2 >> of my 24 participants, the function gives an error-message when I try >> to plot the averages of two conditions at the same time. Plotting them >> one by one is not a problem. There appears to be a specific point in >> time (different for the two participants) when this goes wrong. If I >> avoid that time (by using cfg.xlim) it works fine. My trials have >> different lengths and I used "cfg.vartrllength = 2;" when calling >> ft_timelockanalysis (not sure whether this is relevant). >> >> The error message I get is >> "Error in ft_multiplotER (line 616) >> yval(i,:) = datamatrix{i}(m,:);" >> >> I cannot find out what happens in this line. Can anyone tell me what >> this might be referring to? >> >> Thank you, >> Sara >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > From frank.ye.mei at gmail.com Mon Aug 19 22:18:39 2013 From: frank.ye.mei at gmail.com (Ye Mei) Date: Mon, 19 Aug 2013 16:18:39 -0400 Subject: [FieldTrip] Can beamformer give both the location and the orientation of the source? Message-ID: <52127D9F.3090102@gmail.com> Hi all, Can beamformer give both the location and the orientation of the source? If yes, how to do it in fieldtrip? thanks ahead, Ye From arr at uvic.ca Mon Aug 19 22:47:27 2013 From: arr at uvic.ca (Ashley Rose) Date: Mon, 19 Aug 2013 13:47:27 -0700 Subject: [FieldTrip] fieldtrip question Message-ID: <314d3147c1b422e458d033e10d7a6b17.squirrel@wm3.uvic.ca> Hi there, I'm having an issue running Fieldtrip. I keep getting this warning: "Warning: Dimensions of AlphaData must be 1x1, or must match CData." But I haven't done anything to AlphaData or CData that would make them inconsistent. Has anyone had this problem before? Thank you, Ashley Rose From imponderabilion at gmail.com Tue Aug 20 00:54:49 2013 From: imponderabilion at gmail.com (=?ISO-8859-2?Q?Miko=B3aj_Magnuski?=) Date: Tue, 20 Aug 2013 00:54:49 +0200 Subject: [FieldTrip] ft_neighbourplot does not plot new connections in 3D Message-ID: Hi FieldTrippers! just a short note in case it wasn'r reported before: ft_neighbourplot with option .enableedit = 'on' (the bleeding option) plots new connections (new - that means click-created) only as 2D projections even if everything else is plotted in 3D. changing lines 286 - 287 to something like: if size(proj,2) == 2 Coord = {X, Y}; elseif size(proj,2) > 2 Z = [proj(curSensId,3) proj(lastSensId,3)]; Coord = {X, Y, Z}; end hl(curSensId, lastSensId) = line(Coord{:}, 'color', 'r'); hl(lastSensId, curSensId) = line(Coord{:}, 'color', 'r'); fixes this problem. Regards, Mikołaj Magnuski -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Aug 23 09:28:18 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 23 Aug 2013 09:28:18 +0200 Subject: [FieldTrip] ft_neighbourplot does not plot new connections in 3D In-Reply-To: References: Message-ID: <52170F12.9020107@donders.ru.nl> Dear Miko?aj, thanks very much for reporting this. I fixed it and the fix should be available inthe next FieldTrip release (i.e. tomorrow). Best, Jörn On 8/20/2013 12:54 AM, Miko?aj Magnuski wrote: > Hi FieldTrippers! > > just a short note in case it wasn'r reported before: > ft_neighbourplot with option .enableedit = 'on' (the bleeding option) > plots new connections (new - that means click-created) only as 2D > projections even if everything else is plotted in 3D. > > changing lines 286 - 287 to something like: > if size(proj,2) == 2 > Coord = {X, Y}; > elseif size(proj,2) > 2 > Z = [proj(curSensId,3) proj(lastSensId,3)]; > Coord = {X, Y, Z}; > end > hl(curSensId, lastSensId) = line(Coord{:}, 'color', 'r'); > hl(lastSensId, curSensId) = line(Coord{:}, 'color', 'r'); > > fixes this problem. > > > Regards, > Miko?aj Magnuski > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From narayan.ps at tut.fi Fri Aug 23 12:37:20 2013 From: narayan.ps at tut.fi (Narayan Puthanmadam Subramaniyam) Date: Fri, 23 Aug 2013 13:37:20 +0300 Subject: [FieldTrip] simulation of EOG Message-ID: <001501ce9fec$bee80ce0$3cb826a0$@tut.fi> Dear FT experts I am not sure if I should be asking this question here. I want to simulate 'pure' EOG signal by placing rotating dipole in the eye. Can I use FT to compute the lead field matrix from eye to all scalp electrodes ? Has anyone used a BEM model where eyes are segmented ? Many Thanks Narayan From ingenieureniso at gmail.com Fri Aug 23 19:40:14 2013 From: ingenieureniso at gmail.com (ingenieur eniso) Date: Fri, 23 Aug 2013 18:40:14 +0100 Subject: [FieldTrip] how to open bdf and rdf files Message-ID: Dear all, I have EEG record files in rdf and bdf formats. but I do not know how to open them. Please can anyone send me a matlab function to open these files? 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 johanna.zumer at gmail.com Sun Aug 25 07:18:14 2013 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Sun, 25 Aug 2013 07:18:14 +0200 Subject: [FieldTrip] how to open bdf and rdf files In-Reply-To: References: Message-ID: Dear Ahmed, Does this help? (http://fieldtrip.fcdonders.nl/getting_started/bdf ) If you are still stuck, maybe try EEGlab import and then convert EEGlab format to FieldTrip format ( http://fieldtrip.fcdonders.nl/integrating_with/integrating_with_eeglab) Best, Johanna 2013/8/23 ingenieur eniso > Dear all, > > > I have EEG record files in rdf and bdf formats. but I do not know how to > open them. > > Please can anyone send me a matlab function to open these files? > > I hope you will send me positive and helpful response. > > Thanks a lot in advance! > > Best, > > ahmed > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From roeysc at gmail.com Mon Aug 26 00:08:19 2013 From: roeysc at gmail.com (Roey Schurr) Date: Mon, 26 Aug 2013 01:08:19 +0300 Subject: [FieldTrip] Source Analysis Normalisation in-subject and in-group Message-ID: Hi all, We have a question regarding normalisation of EEG signals for source reconstruction analysis. We have EEG records (not ERP) of a few patients in two different conditions (each condition consists of several 2 seconds segments/trials). Each recording was done over a period of a few days, and in different sessions. We also have anatomycal MRI scans for each patient (subject). We would like to make two statistic comparisons: 1. Compare the source analysis of the two conditions in each subject. 2. Compare the source analysis of the two conditions, based upon all subjects. For the first comparison, we are puzzled about the appropriate way to normalise and standardize our data, since each EEG segment was recorded at a different time, and hence may be affected by different electrode conductivity, for example. How would you normalise the data? For the second comparison, of course, we would like to normalise the source analysis results in the anatomycal level using ft_volumenormalise. However, we are puzzled about the appropriate way to normalise and standardize our data, since subjects differ from each other (for example, anatomycally, resulting in changes of power spectrum). How would you standartize the data between subjects? Thank you very much, best regards, Aia and Roey -------------- next part -------------- An HTML attachment was scrubbed... URL: From polomacnenad at gmail.com Tue Aug 27 20:44:39 2013 From: polomacnenad at gmail.com (Nenad Polomac) Date: Tue, 27 Aug 2013 20:44:39 +0200 Subject: [FieldTrip] ICA on highpass filtered MEG data Message-ID: Dear Fieldtrip users, I have CTF 275 channels MEG data and I am interested in gamma band. For this purpose I would like to remove microsaccade artifacts from the data using the ICA. In order to obtain the microsacade components I have filtered data ( highpass and lowpass; 30-150 Hz) and than I've wanted to run ICA calculation. However, I've read here http://sccn.ucsd.edu/pipermail/eeglablist/2013/006710.html that after filtering data are more dependent and that is a big problem for ICA calculation. And I also experienced that ICA takes very long time and sometimes doesn't converge. So, to overcome this problem, the data dimensionality has to be reduced. I have found two different solutions from different sources. One solution might be to estimate variance with PCA and than choose the amount of variance that should stay in the data. e.g. [COEFF,SCORE,eigenvalues ] = princomp(data_matrix); A= cumsum(eigenvalues); num_of_comp=find(A/A(end)>0.98,1); % 98% is the percentage of variance that will be used for the ICA, 2% will be discarded This percentage will be the same for all subjects. The second option might be to use the same eigenvalue cutoff value for all subjects: [COEFF,SCORE,eigenvalues ] = princomp(data_matrix); A=(find(eigenvalues>0.005)); %0.005 here is just for example num_of_comp=A(end); The variable num_of_comp represents the number of component to which filtered data will be reduced before ICA. e.g. cfg = []; cfg.method = 'runica'; cfg.runica.pca = num_of_comp; cfg.runica.maxsteps = 600; cfg.runica.stop = 1e-7; cfg.runica.extended = 1; ica_comp = ft_componentanalysis(cfg, data); Finally, my question is which of this two methods is more objective? And is there any other possibility I should consider? I would like to add that in my case second calculation gives me less variant number of components among 22 subjects. Thank you in advance! All the best! Nenad -------------- next part -------------- An HTML attachment was scrubbed... URL: From aaron.schurger at gmail.com Tue Aug 27 21:49:21 2013 From: aaron.schurger at gmail.com (Aaron Schurger) Date: Tue, 27 Aug 2013 21:49:21 +0200 Subject: [FieldTrip] ICA on highpass filtered MEG data In-Reply-To: References: Message-ID: I am not aware of any good way to remove microsaccade artifacts from EEG or MEG data. ICA might find a microsaccade component if you have sufficient data, but you will have to hunt through the components to find the "right" one. The difficult question is how to know which is the right component, or whether or not microsaccades are incorporated into two or more components (or not at all). Having an MEG-compatible eye tracker with a high sampling rate is what I would want. Best wishes, Aaron On Tue, Aug 27, 2013 at 8:44 PM, Nenad Polomac wrote: > Dear Fieldtrip users, > > I have CTF 275 channels MEG data and I am interested in gamma band. For this > purpose I would like to remove microsaccade artifacts from the data using > the ICA. In order to obtain the microsacade components I have filtered data > ( highpass and lowpass; 30-150 Hz) and than I've wanted to run ICA > calculation. However, I've read here > http://sccn.ucsd.edu/pipermail/eeglablist/2013/006710.html that after > filtering data are more dependent and that is a big problem for ICA > calculation. And I also experienced that ICA takes very long time and > sometimes doesn't converge. So, to overcome this problem, the data > dimensionality has to be reduced. I have found two different solutions from > different sources. > > One solution might be to estimate variance with PCA and than choose the > amount of variance that should stay in the data. e.g. > [COEFF,SCORE,eigenvalues ] = princomp(data_matrix); > A= cumsum(eigenvalues); > num_of_comp=find(A/A(end)>0.98,1); % 98% is the percentage of variance that > will be used for the ICA, 2% will be discarded > This percentage will be the same for all subjects. > > The second option might be to use the same eigenvalue cutoff value for all > subjects: > [COEFF,SCORE,eigenvalues ] = princomp(data_matrix); > A=(find(eigenvalues>0.005)); %0.005 here is just for example > num_of_comp=A(end); > > The variable num_of_comp represents the number of component to which > filtered data will be reduced before ICA. > e.g. > cfg = []; > cfg.method = 'runica'; > cfg.runica.pca = num_of_comp; > cfg.runica.maxsteps = 600; > cfg.runica.stop = 1e-7; > cfg.runica.extended = 1; > ica_comp = ft_componentanalysis(cfg, data); > > > > Finally, my question is which of this two methods is more objective? And is > there any other possibility I should consider? > I would like to add that in my case second calculation gives me less variant > number of components among 22 subjects. > > Thank you in advance! > > All the best! > Nenad > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Aaron Schurger, PhD Post-doctoral researcher INSERM U992 / NeuroSpin CEA - Saclay, France +33-1-69-08-66-47 aaron.schurger at gmail.com http://www.unicog.org From sreenivasan.r.nadar at gmail.com Tue Aug 27 22:17:03 2013 From: sreenivasan.r.nadar at gmail.com (Sreenivasan R. Nadar, Ph.D.) Date: Tue, 27 Aug 2013 16:17:03 -0400 Subject: [FieldTrip] 19 channel EEG for source modeling of epileptic focus Message-ID: Hi All, I have a 19 channel Nihon - Kohden EEG for epilepsy monitoring and I use the following file for channel locations in ftp://sccn.ucsd.edu/pub/locfiles/eeglab/Standard-10-20-Cap19.ced for data analysis in EEGLab. Please let me know if anybody has pre-processing script to import the data in Fieldtrip and also for source localisation of epileptic focus. Thank you. Sreenivasan -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Thu Aug 29 10:02:45 2013 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Thu, 29 Aug 2013 10:02:45 +0200 Subject: [FieldTrip] 19 channel EEG for source modeling of epileptic focus In-Reply-To: References: Message-ID: <521F0025.8090104@donders.ru.nl> Dear Sreenivasan, I am not sure whether you can read in .ced files with the ft_read_sens function. You could give it a try though by specifying cfg.elecfile = 'PATH_TO_FILE/Standard-10-20-Cap19.ced' Otherwise, I can see two ways how you can make this work. First, you could change the content of the file to match the format of the other sensor-templates. For this, you can best have a look in fieldtrip/template/elec and have a look at one of these files. Then, you would need to rearrange the values of your .ced file to match the order of the .elc-format. Alternatively, you could write your own wrapper function, which reads in the x-, y- and z-position of the electrodes from the .ced file and stores them in a matrix. Also, you need to store the corresponding channel label. Using these, you can create an elec-structure that you can use as cfg.elec for whatever function you want to do. Maybe someone else here has worked with .ced files before and can thus can help with either of the two solutions. Good luck :) Best, Jörn On 8/27/2013 10:17 PM, Sreenivasan R. Nadar, Ph.D. wrote: > Hi All, > > I have a 19 channel Nihon - Kohden EEG for epilepsy monitoring and I > use the following file for channel locations in > ftp://sccn.ucsd.edu/pub/locfiles/eeglab/Standard-10-20-Cap19.ced for > data analysis in EEGLab. > > Please let me know if anybody has pre-processing script to import the > data in Fieldtrip and also for source localisation of epileptic focus. > > Thank you. > > Sreenivasan > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group FieldTrip Development Team P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.vanlier at bsse.ethz.ch Thu Aug 29 13:53:26 2013 From: ben.vanlier at bsse.ethz.ch (van Lier Ben) Date: Thu, 29 Aug 2013 11:53:26 +0000 Subject: [FieldTrip] slow reading with ft_preprocessing of a fcdc_matbin file? Message-ID: Hi all, I have a pretty big data file of 120 channels for 20min continuous at 20khz. clearly i need to downsample. to do so, i convert the original file to fcdc_matbin, creating a 22gb bin file with all the data. then its time for downsampling as shown on http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory this is very slow. ft_preprocessing takes 230 seconds per channel (using 380 mb), doing nothing but just reading 1 channel. the subsequent downsampling with ft_resample to 1khz is surprisingly fast with only 4 seconds. does that make any sense? it seems like a very long time to read in 380mb... :( Best, Ben From jan.schoffelen at donders.ru.nl Thu Aug 29 14:01:59 2013 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 29 Aug 2013 14:01:59 +0200 Subject: [FieldTrip] slow reading with ft_preprocessing of a fcdc_matbin file? In-Reply-To: References: Message-ID: <264BF553-0691-4AC9-95B8-D78000F0CA6B@donders.ru.nl> Hi Ben, I guess MATLAB needs to read in the whole datafile each time (for each channel). What about creating separate files for each channel? JM On Aug 29, 2013, at 1:53 PM, van Lier Ben wrote: > Hi all, > > I have a pretty big data file of 120 channels for 20min continuous at 20khz. clearly i need to downsample. to do so, i convert the original file to fcdc_matbin, creating a 22gb bin file with all the data. > > then its time for downsampling as shown on http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory > > this is very slow. ft_preprocessing takes 230 seconds per channel (using 380 mb), doing nothing but just reading 1 channel. the subsequent downsampling with ft_resample to 1khz is surprisingly fast with only 4 seconds. > > does that make any sense? it seems like a very long time to read in 380mb... :( > > Best, > Ben > > _______________________________________________ > 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: